beautypg.com

Teledyne LeCroy Sierra SAS_SATA Protocol Analyzer STX API Reference Manual User Manual

Page 118

background image


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

Using Target/Device Emulator API Functions 118

Example

m_pITargetEmulatorErrorInjection ->
ErInjSetSTPCommandGenerateError
(m_dwSelectedCommandType, m_bGenerateError,
(TargetEmulatorSTPCommandErrorTypeEnum) m_nErrorOn,
vLBAFromorCommandNo, vLBATO, m_nErrorCount, &nErrorCode);


Function Prototypes and Descriptions
Below are the function prototypes corresponding to every option of Error Injection –

ATA Commands in a SATA Target Emulator Project:
ATA Commands

STDMETHOD

(ErInjSetSTPCommandGenerateError) (

/*[in]*/

int

nCommand,

/*[in]*/

BOOL bEnable,

/*[in]*/

TargetEmulatorSTPCommandErrorTypeEnum eErrorOn,

/*[in]*/

VARIANT vLBAorCommandNumber,

/*[in]*/

VARIANT vLBATo,

/*[in]*/

BYTE yCountOfError,

/*[out]*/

int

* pErrorCode);

STDMETHOD

(ErInjSetSTPCommandRepeatedErrorOnCommandNumber) (

/*[in]*/

int

nCommandType,

/*[in]*/

BOOL bEnable,

/*[in]*/

short

iCountOfRepeatedErrorsOnCommands,

/*[out]*/

int

* pnErrorCode);

STDMETHOD

(ErInjSetSTPCommandErrorResponseType) (

/*[in]*/

int

nCommand,

/*[in]*/

BOOL bEnable,

/*[in]*/

ATADeviceEmulErrorStatusRegEnum eResponseType,

/*[out]*/

int

* pErrorCode);

STDMETHOD

(ErInjSetSTPCommandFrameOutGoingErrorAttribute) (

/*[in]*/

int

nCommand,

/*[in]*/

BOOL bEnable,

/*[in]*/

int

nFrameType,

/*[in]*/

short

iFrameNumberInCommand,

/*[out]*/

int

* pErrorCode);