beautypg.com

Initialize the infusion library – Teledyne LeCroy Sierra SAS_SATA Protocol Analyzer STX API Reference Manual User Manual

Page 162

background image


Sierra SAS/SATA Protocol Suite, STX Software API Reference Manual

Using Infusion API 162

Create an object from Callback class and initialize it

// Create an object from Callback class.

CAppNotificationCallback*

pSysCallback;

pSysCallback = new CAppNotificationCallback(this);

NOTE:”this” is the pointer to an App or Dialog class in the API project.

Initialize the Infusion Library

// Create an object from the Infusion API.

CINFAPI * pInfApi;

pInfApi =

new

CINFAPI;

// Call the Initalize function by passing the reference of the
Callback object.

pInfApi->Initialize(&SysCallback);

NOTE: “SysCallback” was created at step 2 above.

Get main objects from Infusion library to work with them

// Get device management object.

CIBApiDeviceManager*

pDeviceManager;

pDeviceManager = pInfApi->GetDeviceManager();

// Get the Monitor object, if you want to use it.

CIMApiMonitor*

pMonitor;

pMonitor = pInfApi->GetMonitor();

// Get the Configuration Manager.

CICApiConfigManager*

pConfigManager;

pConfigManager = pInfApi->GetConfigManager();