Gethexpktfield() - LeCroy USB Protocol Suite Reference Manual

Verification script engine
Table of Contents

Advertisement

LeCroy Corporation

9.2 GetHexPktField()

Extracts the raw hexadecimal value of the USB3 packet field.
Format :
GetHexPktField ( fld_name )
Parameters
fld_name
Return Values
If the field name is in the current packet, the function returns the hex value of the decoded field:
integer value if field length is less than 32 bits
o
raw binary value if field length is greater than 32 bits. The raw binary value gives a list of bytes.
o
See the CSL Manual for further details about raw binary values.
null value if the field was not found.
o
Example
# Link Control Word
if( ( in.TraceEvent == _USB3_TP_PKT ) ||
( in.TraceEvent == _USB3_DP_PKT ) )
{
ReportText( "LCW:" );
val = GetHexPktField ( "Hseq" );
str = FormatEx( "\tHseq = %d", val );
ReportText( str );
val = GetHexPktField ( "Hdepth" );
str = FormatEx( "\tHDepth = %d", val );
ReportText( str );
val = GetHexPktField ( "D1" );
str = FormatEx( "\tDelayed (D1) = %d", val );
ReportText( str );
val = GetHexPktField ( "D2" );
str = FormatEx( "\tDeferred (D2) = %d\n", val );
ReportText( str );
}
Remark
The field name should be exactly the same as it is in the trace. The field name is case sensitive.
Name of the field supposedly existing in the current packet
Verification Script Engine Reference Manual
Page 56 of 107

Advertisement

Table of Contents
loading

Table of Contents