beautypg.com

Teledyne LeCroy UWBTrainer Exerciser Script Language User Manual

Page 93

background image

LeCroy Corporation

UWBTrainer Exerciser - Generation Script Language Reference Manual

85

10.10.2 Assignments for Variables with Variable Length Fields

For structure variables that have one variable length field:

1. The hex stream fills all fixed-length fields prior to the first variable-length field, using a top-

down approach.

2. The hex stream fills all fixed-length fields following the variable-length field using a bottom-up

approach, in which the required number of bytes come from the end of the hex stream and
the fixed-length fields are filled in order.

3. The hex stream fills the variable-length field with the remaining bytes from the middle of the

hex stream.


If a structure variable has more than one variable-length field (including interleaved variable-
length and fixed-length fields), only the first variable-length field receives data. Later variable-
length fields receive no data and are blank. For these types of structure variables, it is not
recommended to explicitly modify fields after assignment from a hex stream because data will not
be logically assigned. Essentially, a structure variable with more than one variable-length field
becomes a structure variable with only one variable-length field, the first one listed in offset order.

Example

Frame

SF_Beacon

{
PHY : 40
MAC : 80
BH : 64
IEs : *
DATA: *
}

Frame

GenericSample

{
First3_Bytes : 24
More_Bytes : *
Some_More_Len : 8
Some_More_Bytes : *
Even_More_Len : 8
Even_More_Bytes : *

Total_Len : 16

}
SF_Beacon $BeaconSlot2
GenericSample $X

set

SuperFramePeriod =

65538

# Set Length of SuperFrame (65,538 us).