beautypg.com

Teledyne LeCroy UWBTrainer Exerciser Script Language User Manual

Page 85

background image

LeCroy Corporation

UWBTrainer Exerciser - Generation Script Language Reference Manual

77

# Send a frame of {FF 00 FE FD FC 66 77 88 00 00 00 00 FF FF} by

# modifying $Y from the above and

# instantiate local variables V3_1 and V3_2 for use

# in this send instruction only. [ No $ = send ]

Y

{

V1 = 255

V2 = 254

V3_1 : 16, 8 = 253

V3_2 : 24, 8 = 252

}

# COMPLEX LOCAL FIELD MANIPULATION EXAMPLES

$X = MY_STRUCT_2

# Change the structure variable from a hex stream.

$X = {

11 AA BB CC DD 22 33 44 BE EF BE EF

}

# After the above change, the variable X fields have the

# following values:

# X.F1 = 0x11

# X.F2 = { AA BB CC DD }

# X.F3 = { 22 33 44 }

# X.F4 = empty

# X.F5 = { BE EF BE EF }

# Change $X from the above to

# {11 AA BB CC DD 22 33 44 BE F0 0D F0 0D}

# and add local field F6 to variable X.

# The variable length fields F3 & F4 are treated as empty

# and F5 is treated as having offset 40-71,

# hence F6 occupies offset 72-103.

$X { F6 :

32

= {

F0 0D F0 0D

} }

# Change $X from the above to

# {11 02 01 04 03 22 33 44 BE F0 0D F0 0D}

# and add local fields F2Lower and F2Upper to variable X.

$X{

F2Lower :

8

,

16

= {

02 01

}

F2Upper :

24

,

16

= {

04 03

}

}