Teledyne-lecroy Voyager Exerciser Generation Script Language Manua Manual de usuario Pagina 43

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 167
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 42
Teledyne LeCroy Voyager USB 3.0 Exerciser Generation Script Language Reference Manual
34
8.2.3 Defining a Field with Variable Length
If the field length is set to *, the field’s length is defined by the value that is assigned to the field. If
no value is assigned to the variable length field, the field’s length is set to 0.
Note: When a value is assigned to a variable length field, the field's length is changed based on
the difference between the previous and current values. In this case, the offsets of following fields
not bound to fixed offsets are shifted by the difference.
Examples
# Declare packet template 'SomeTemplate'.
Packet Some Template
{
F1 : 16 # Declare the 16-bit field 'F1' at offset 0.
F2 : 32 # Declare the 32-bit field 'F2' at offset 16.
Data : * # Declare the variable-length field 'Data'. The field
# length is now 0.
CRC32 : 32 # Declare the 32-bit field 'CRC32' at offset 16+32.
}
# Declare packet template 'SomeTemplate1', inheriting fields from
# 'SomeTemplate'.
Packet Some Template1 : Some Template
{
Data = 0xAABB # Assign a value to the 'Data' field.
# Now the field has length 16 bits and the
# field 'CRC32' offset is shifted by 16 bits =
# 16+32+16.
}
Vista de pagina 42
1 2 ... 38 39 40 41 42 43 44 45 46 47 48 ... 166 167

Comentarios a estos manuales

Sin comentarios