Trainer Script Enhancements
Assigning Variable Values
You can set variable values in different ways:
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.
Expression on Variables
Mathematical expressions, such as sum, subtract, and shift:
Logical expressions, such as compare, equal, not, and, and or:
Complex expressions (combination of different operators) with prioritizing supported:
S ierra M6‐2 SAS/SATA Protocol Analyzer User Manual
Constant value: @varName1 = 1234
Other variable value: @varName1 = @varName2
Result of expression on other variables:
@varName1 = @varName1 + @varName2
Fields of last received frame: @varName1 = (SSPFrame)LRF::Frame-
Type,
where LRF is Last Received Frame
Part of last received frame:
@varName1 = LRF[stratBitOffset:endBitOffset],
where offsets are bit based
Random values: @varName1 = Random
@varName1 + @varName2
@varName1 - @ varName2
@varName1 & @varName2
@varName1 | @varName2
@varName1
<<
2
@varName1
>
@varName2
@varName1 < @ varName2
@varName1 ==
@varName2
@varName1 != @ varName2
(logical expression1) &&
(logical expression1) || (logical expression2)
(@varName1 + @varName2) > @varName3
(logical expression2)
LeCroy Corporation
409