
Sierra M6
‐
2 SAS/SATA Protocol Analyzer User Manual
409
Trainer Script Enhancements
LeCroy Corporation
Assigning Variable Values
You can set variable values in different ways:
Constant
value:
@varName1 = 1234
Other
variable
value
:
@varName1 = @varName2
Result
of
expression
on
other
variables
:
@varName1 = @va @varName2
Fields
of
last
received
frame
:
@varName1 = (SSPFrame)LRF::Frame-
Type,
where LRF is Last Received Frame
Note:
Specifying packet type (SSPFrame) before LRF causes last received frame to be this packet type,
and field start
‐
bit position is calculated according to the packet
‐
type definition.
Part
of
last
received
frame
:
@varName1 = LRF[stratBitOffset:endBitOffset]
,
where offsets are bit based
Random
values
:
@varName1 = Random
Expression on Variables
Mathematical
expressions
, such as sum, subtract, and shift:
@va @varName2
@varName1 - @ varName2
@varName1 & @varName2
@varName1 | @varName2
@varName1 << 2
Logical
expressions
, such as compare, equal, not, and, and or:
@varName1 > @varName2
@varName1 < @ varName2
@varName1 == @varName2
@varName1 != @ varName2
(logical expression1) && (logical expression2)
(logical expression1) || (logical expression2)
Complex
expressions
(combination of different operators) with prioritizing supported:
(@va @varName2) > @varName3