2 gethexpktfield(), Ield, Gethexpktfield – Teledyne LeCroy Verification Script Engine (VSE) Manual User Manual
Page 58

Teledyne LeCroy
Verification Script Engine Reference Manual
 
 
 
 
Page 58 of 115
 
 
 
9.2 GetHexPktField()
Extracts the raw hexadecimal value of the USB3 packet field.
Format :
GetHexPktField ( fld_name )
 
Parameters 
 
fld_name
Name of the field supposedly existing in the current packet
 
Return Values 
 
If the field name is in the current packet, the function returns the hex value of the decoded field: 
o 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. 
See the CSL Manual for further details about raw binary values.
o null value if the field was not found.
 
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. 
 
