Teledyne-lecroy UWBTrainer Exerciser Script Language Bedienungsanleitung Seite 95

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 124
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 94
LeCroy Corporation UWBTrainer Exerciser - Generation Script Language Reference Manual
87
10.11 Sizeof Operators
Several kinds of sizeof operators are currently supported:
fld_size (field_name): Returns the length of the field in bits.
pkt_size (template): Returns the length of the template payload in bits.
pkt_size ($pkt_var_name): Returns the length of the structure variable payload in bits.
pttn_size (data_pattern): Returns the length of the data pattern payload in bits.
Note: Fields that are not initialized with a variable length (declared as
f : *) have 0 length.
Examples
Main
{
# Examples of using 'sizeof' operators.
# Declare a 'structure' instance based on the template S1.
$S = S1
# Declare a 'structure' instance based on the template S2,
# changing the default value for the S16 field.
$W = S2 { S16 = 2 }
Send TX_FRAME
{
# Set the Len to the size of
# combined payload + the size of the 'Len' field.
Len = ( fld_size( Len ) + pkt_size( $S ) + pkt_size( $W ) ) / 8
# Same as the previous assignment.
Len = ( fld_size( Len ) + pkt_size( S1 ) + pkt_size( S2 ) ) / 8
# Data field contains combined payload of structures S and W.
Data = $S + $W
}
}
Seitenansicht 94
1 2 ... 90 91 92 93 94 95 96 97 98 99 100 ... 123 124

Kommentare zu diesen Handbüchern

Keine Kommentare