beautypg.com

5 specifying byte order in field definitions, 6 using byte stream literals in field assignments, Specifying byte order in field definitions – Teledyne LeCroy UWBTrainer Exerciser Script Language User Manual

Page 26: Using byte stream literals in field assignments

background image

LeCroy Corporation

UWBTrainer Exerciser - Generation Script Language Reference Manual

18

8.2.5 Specifying Byte Order in Field Definitions

You can specify the byte order for integer fields (length <= 32 bits) using the Byte Order field
attribute. The Byte Order field attribute indicates how numeric values are assigned to integer
fields. By default, the byte order for integer fields is Big Endian: MSB->LSB. For example, the
integer value 0xAABBCCDD is assigned as the {AA BB CC DD} byte stream.

Example

# Specify byte order for some fields of a template.

Frame

Mixed

{
F1 :

16

F2 :

32

(MSB)

F3 :

16

(MSB) =

0xAABB

F4 :

32

=

0xAABBCCDD

}

# Template with the same field layout as the template above

Frame

MSBMixed (MSB)

{
F1 :

16

(LSB)

F2 :

32

F3 :

16

=

0xAABB

F4 :

32

(LSB) =

0xAABBCCDD

}

8.2.6 Using Byte Stream Literals in Field Assignments

You can specify the byte order explicitly using byte stream literals:

Example

Field_32 :

32

=

{

AA BB CC DD

}