beautypg.com

Stcompliance api methods, Attach, Detach – Teledyne LeCroy Sierra SAS_SATA Protocol Analyzer STX API Reference Manual User Manual

Page 173

background image


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

STCompliance API 173

3. To add tests, use the AddTest command to specify test IDs:

bRetVal = ComplianceObject.AddTest(

TEST_GDR_01

)

bRetVal = ComplianceObject.AddTest(

TEST_GDR_02

)

...
A list of available tests and their IDs is in

ComplianceTestsEnum

at the end of this section.


4. To run the tests, call the RunCompliance function:

bRetVal = ComplianceObject.RunCompliance()


5. To detach from board after the STCompliance run finishes, call the Detach function:

nErrorCode = ComplianceObject.Detach()

STCompliance API Methods

Attach

This function connects to the board.

Attach(BYTE yDefaultPort,
BSTR bstrDeviceId,
BSTR bstrSystemPath,
int* pnErrorCode)


yDefaultPort: Specifies the connection mode. Possible values are:

0x02 = USBconnection

0x04 = TCP connection

bstrDeviceId: Specifies the board ID. The first four characters specify the connection type and

the following characters specify the actual board ID. For example, for board ID = 00104CC47777,

use 020000104CC47777 for USB connection and 040000104CC47777 for TCP connection.

bstrSystemPath: Shows the path of installed software.

pnErrorCode: Returns the error code if there is an error.

Detach

This function disconnects from the board.

Detach (int* pnErrorCode);


pnErrorCode: Returns the error code if there is an error.