
LeCroy Corporation UWBTrainer Exerciser - Generation Script Language Reference Manual
20
8.2.8 Defining Subfields
You can define named subfields for top-level template fields. Subfields allow you to set a field
value using DWORD little-endian bit order. Subfield and field names must be unique inside a
template. You can also assign field values using field names directly. Note: You cannot define
subfields for lower-level template fields.
Syntax
Field_Name [ : length ]
{
SubField [ : length ] [ (Byte Order attribute) [ = Field_Value ] [ [ list of possible values ] ]
SubField [ : length ] [ (Byte Order attribute) [ = Field_Value ] [ [ list of possible values ] ]
SubField [ : length ] [ (Byte Order attribute) [ = Field_Value ] [ [ list of possible values ] ]
…
} [ (Byte Order attribute) [ = Field_Value ] [ [ list of possible values ] ]
If the length of a parent field is less than the total length of its subfields, then the total length of
the subfields defines the parent field length.
Note: The subfields always use their parent field as a DWORD little-endian buffer. For example, if
the parent field has a 64-bit length for subfield assignments, the subfields use it as two little-
endian DWORDs.
Example
struct Templ_1
{
F1 : 8
F2
{
SF1 : 8 = 0xCC
SF2 : 16
SF3 : 8
}
}
struct Templ_2
{
F1 : 8
F2 : 16 # Declare parent field length.
{
SF1 : 8
}
}
Comentarios a estos manuales