beautypg.com

2 local structure parser variables, Local structure parser variables – Teledyne LeCroy UWBTrainer Exerciser Script Language User Manual

Page 80

background image

LeCroy Corporation

UWBTrainer Exerciser - Generation Script Language Reference Manual

72

10.2 Local Structure Parser Variables

You can declare a local "structure" parser variable, which is seen only inside the generation
procedure, and use it in a Send Frame instruction and field assignments.

Format

[ Local

]

$var = template_or_var_name

[ Local

]

$var = $variable_name

Note: The Local keyword is required if you already have a global variable with the same name.
Using this keyword explicitly instructs the script parser to declare a local variable with the same
name.

Example

Main

{

# Declare a variable X as a frame of type MY_TX_FRAME.

$X = MY_TX_FRAME

# Note: Frame variables can be declared/redeclared and used many times.

# Declare a variable Y and change the default frame.

$Y = MY_TX_FRAME

# Template field values.

{

DestAddr =

0xAABB

SrcAddr =

0xEFBE

}

# Declare a variable Z using the frame variable Y as a prototype.

$Z = Y

{

DestAddr =

0x1122

SrcAddr =

0x3344

}

Local

$Z = Y

# Explicitly declare a local variable.

# Declare a structure variable having the same name as one of the

# templates.

$MY_TX_FRAME = MY_TX_FRAME

{

DestAddr =

0xAABB

SrcAddr =

0xEFBE

}