9 using the append operator in field assignments, Using the append operator in field assignments, Append operator – Teledyne LeCroy UWBTrainer Exerciser Script Language User Manual
Page 91

LeCroy Corporation
UWBTrainer Exerciser - Generation Script Language Reference Manual
83
10.9 Using the Append Operator in Field Assignments
You can append data to fields using = + (append operator) in field assignments. Use the append
operator to generate dynamic packets and avoid restating previously assigned values. For
example, if a packet variable field SomeField contains “01 02 03”, to add “04 05 06” you can
assign SomeField = +{04 05 06} ), rather than assigning SomeField = {01 02 03 04 05 06}.
Note: Do not confuse this operator with the += operator, or a parse error will be generated!
You can write the append operator as = + or =+ (without a space), but it is recommended to use
the space to avoid confusion with the += operator.
Examples
Frame
BPOIE{
ElemID : 8 =
1
ElemLen : 8
BPLen : 8
Occupancy_Bitmap : *
DevAddrList : *
}
BPOIE $Beacon3_BPOIE
BPOIE $Beacon11_BPOIE
Main
{
$Beacon3_BPOIE
{
BPLen =
16
Occupancy_Bitmap = {
00 55 55 55 01
}
DevAddrList = {
04 00
}
}
# Generate DevAddrList for Addrs 5-16 : DevAddrList = {04 00} -->
# DevAddrList = { 04 00 05 00 06 00 07 00 08 00 09 00 0A 00
# 0B 00 0C 00 0D 00 0E 00 0F 00 10 00 }
for
( i=
5
, i<
17
, i++)
{
$Beacon3_BPOIE{ DevAddrList = +{
i 00
} }
}
$Beacon11_BPOIE
{
BPLen =
16
Occupancy_Bitmap = {
10 55 15 55 01
}
DevAddrList = {
03 00
}
}
# Generate DevAddrList for Addrs 4-10 and 12-16 :
# DevAddrList = {03 00} -->
# DevAddrList = { 03 00 04 00 05 00 06 00 07 00 08 00 09 00
# 0A 00 0C 00 0D 00 0E 00 0F 00 10 00 }
for
(i=
4
, i<
17
, i++)
{
if
(i!=
11
)
{
$Beacon11_BPOIE{ DevAddrList = +{
i 00
} }
}
}
... ... ... ...
}