beautypg.com

7 using structure variables to assign field values, Using structure variables to assign field values – Teledyne LeCroy Voyager Exerciser Generation Script Language Manual User Manual

Page 112

background image

Teledyne LeCroy

Voyager USB 3.0 Exerciser Generation Script Language Reference Manual

103

10.7 Using Structure Variables to Assign Field Values

You can use structure variables in field assignments. Also see the

Using Multipliers to Assign

Field Values

section.

Examples

Main

{

# Use structure variables to assign field values.
# Declare a 'structure' instance based on the template S1.

$S = S1

# Declare a 'structure' instance based on the template S2
# and change the default value for the S16 field.

$W = S2 { S16 =

2

}


Send

TX_PACKET

{
Data = $S

# Data field contains the payload of structure S

.

}

Send

TX_PACKET

{

# Example of concatenation of structures.
# Data field contains combined payload of structures

S and W

Data = $S + $W
}
}