Using infusion api, Initialize sierra infusion and connect to board, Use infusion api – Teledyne LeCroy Sierra SAS_SATA Protocol Analyzer STX API Reference Manual User Manual
Page 161

Sierra SAS/SATA Protocol Suite, STX Software API Reference Manual
Using Infusion API 161
Using Infusion API
To use the Infusion API and create your own APIs, go through the following routine step by step,
to familiarize yourself with the main and important functions needed to write and develop your
own APIs.
To specify the port configuration of Infusion API, you must connect to the board differently than
for Infusion. Connect to the board by the new function ConnectFromAPI.
NOTE: these are the minimal settings and initializations.
Initialize Sierra Infusion and Connect to Board
The first step is to initialize some objects and libraries and create some classes. Here are the
main initializations. To work with the board and use that board, you should connect to the
device, set your scenario, set the device type, start the selected scenario, and run it.
Create a Callback class which inherits from CINFAPINotificationCallback class
You need the CINFAPINotificationCallback class in your API project to catch Infusion important
events and working status. These events and statuses include connecting and disconnecting
devices and session starting and stopping. For this purpose, you have to overwrite these virtual
functions:
• OnDeviceConnected
• OnDeviceDisconnected
• OnEntityUpdated
• OnScenarioUpdated
• OnScenarioErased
• OnLicenseKeyUpdated
• OnSessionStarted
• OnSessionStopped
• OnDeviceJoined
• OnDeviceLeft
• OnDeviceBusy
• OnDeviceReady
• OnDeviceNameChanged
• OnDeviceHWStatusChanged
• OnDeviceDiscoveryStarted
• OnDeviceDiscoveryStopped