5 getpacketdata(), 6 formatrawbytes(rawbytes), Acket – Teledyne LeCroy SAS_SATA Protocol Suite Verification Script Engine Reference Manual User Manual

Page 84: Ormat, Ytes, Formatrawbytes(rawbytes)

Advertising
background image


84

22.5 GetPacketData()

This function returns packet’s data in unscramble 8 bits format as a list of DWORDs. Each item
of the list includes one DWORD of packet. It also returns 0xFFFFFFFF for XXXX.




Format :

GetPacketData();


Example

ListOfData = GetPacketData();

for(i=0;i<sizeof(ListOfData);i++)

{

ReportText(FormatEx("[%d]=0x%x\t", i, ListOfData[i]));

}

22.6 FormatRawBytes(RawBytes)


To convert any raw data field to a string. It is a utility method in VSTools.inc file, which can be
included and used.


Format :

FormatRawBytes(RawBytes)


Parameters

RawBytes: any raw data value.
}


Return Values

The converted RawBytes to string in Hex format.


Example

%include "VSTools.inc" # must be included
....
LBA = "0x" + FormatEx("%s",FormatRawBytes(in.App_LogicalBlockAddress));
ReportText(LBA);

Advertising