8 using multipliers to assign field values, Using multipliers to assign field values, Multiplier in – Teledyne LeCroy UWBTrainer Exerciser Script Language User Manual
Page 90

LeCroy Corporation
UWBTrainer Exerciser - Generation Script Language Reference Manual
82
10.8 Using Multipliers to Assign Field Values
You can use a "multiplier" to assign repeated data and create complex assignments. This
multiplier only works on structure variables when assigning fields.
Note: Though this multiplier uses the symbol
*
, this multiplier is not the arithmetic multiplier.
Examples
Generic $X
Generic $Y
Main
{
# Use multipliers to assign field values.
# Declare a packet variable of 'structure' instance Generic with
# data FB 01 02
$TestIE = Generic { Data = {
FB 01 02
} }
# Declare a 'structure' instance based on the template S2
# and change the default value for the S16 field.
$S2_Var = S2 { S16 =
2
}
Send
TX_FRAME
{
Data =
10
*$TestIE
# Data field contains the sequence of $TestIE
# repeated 10 times:
# { FB 01 02 FB 01 02
FB 01 02 FB 01 02 FB 01
# 02 FB 01 02 FB 01 02 FB 01 02 FB 01 02 }
}
# Declare Packet Variable $X of structure Generic with data FF
$X = Generic { Data =
0xFF
}
# Packet Variable $Y contains the sequence of $TestIE repeated
# three times and $X repeated two times:
# { FB 01 02 FB 01 02 FB 01 02 FF FF }
$Y { Data =
3
*$TestIE +
2
*$X }
Num_of_Y =
5
# Local Numeric Variable
Send
TX_FRAME
{
# Example of concatenation and multiplication of structures.
# Data field contains combined payload of:
#
$S2_Var + $S2_Var + $X + $X + $X + $X + $X + $X + $X + $X +
$X + $X
#
+ $X + $X + $X + $X + $Y + $Y + $Y + $Y + $Y
Data = $S2_Var*
2
+
16
*$X + Num_of_Y*$Y
}
}