Setcurrentprogramid, Getcurrentprogramid – Teledyne LeCroy Sierra SAS_SATA Protocol Analyzer STX API Reference Manual User Manual
Page 515
Sierra SAS/SATA Protocol Suite, STX Software API Reference Manual
IExerciserEngine 515
SetCurrentProgramId
SetCurrentProgramId(int nId);
Inputs
int nId
This parameter is a n integer ,made of 2 Words.
The High word is the Device Index and the Low word is the port
index of the specified unit.
For Example if id is 0x12, This means the third port of Second
attached unit.
Return Value
This function doesn’t return any value.
Remark
Each port of each device in Initiator Emulator has own program. But be careful after specifying
the Port functionality of each device, Specified which port is initiator emulator, You can
program each port speratley in attention to Port configuration. To change the active port to
program, you must call this function first before calling other functions of initiator to program
the port.
For Example if the port configuration of the first attached device is
DEVICE_CONFIG_A_A_HE_HE(See DeviceConfiguartionTypeEnum). Then
the third & forth cab be programmed seperatley. For Programming
third port first call this function with 0x2(Third port of the
first attached unit). After this function call if you call any
programming function, it would be for the third port.
SetDeviceType(DEVICE_CONFIG_A_A_HE_HE);
SetCurrentProgramId(0x2);
InsertPacket(LAYER_SCSI_COMMAND, SPC3_INQUIRY, “First Packet”);