beautypg.com

Add/ insert a packet in initiator, Add/insert a packet in initiator – Teledyne LeCroy Sierra SAS_SATA Protocol Analyzer STX API Reference Manual User Manual

Page 79

background image


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

Using Initiator/Host Emulator API Functions 79

CExerciserEngine::SetDataBlock ()
Prototype

long SetDataBlock (IDataBlocks *pIDB);

Usage

-> SetDataBlock

();

Inputs

IDataBlocks* pIDB: Pointer to an Interface of CDataBlocks of DBELib

Return Value None
Description Call the SetDataBlock () method to set a DataBlocks interface for engine.

Add/ Insert a packet in Initiator

To add in initiator packet, call the InsertPacket () function of Exerciser Engine.
Types of the packets include ATA Packets, SCSI Packets, TASK Packets, SMP Packets, and

Frames.
(Refer to ATAPISample -> AddATAPIDlg.cpp -> OnOK ().)

int nRetVal = m_pExerciserEngine ->InsertPacket(nIndex, iLayerId,
iFormatId, bstrName);

CExerciserEngine::InsertPacket ()
Prototype

HRESULT InsertPacket (int nIndex, short iLayerId, short iFormatID,

BSTR bstrName int* pRetVal);

Usage

int nRetVal = -> InsertPacket

(< Packet Index>, ,

, );

Inputs

Int nIndex: Object Index to insert packet in that position

Z

Short iLayerId: Layer Index of the current command packet

(Refer to SASLayerEnum.)

Short iFormatID: Format or Type of the packet

For SCSI Commands, refer to SCSICommandsEnum

For SMP Commands, refer to SMPFrameFunctionsEnum

For Task Commands, refer to SSPTaskManagementEnum