Teledyne-lecroy UWBTrainer Exerciser Script Language Uživatelský manuál Strana 90

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 124
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 89
LeCroy Corporation UWBTrainer Exerciser - Generation Script Language Reference Manual
82
10.8 Using Multipliers to Assign Field Values
You can use a "multiplier" to assign repeated data and create complex assignments. This
multiplier only works on structure variables when assigning fields.
Note: Though this multiplier uses the symbol
*, this multiplier is not the arithmetic multiplier.
Examples
Generic $X
Generic $Y
Main
{
# Use multipliers to assign field values.
# Declare a packet variable of 'structure' instance Generic with
# data FB 01 02
$TestIE = Generic { Data = { FB 01 02 } }
# Declare a 'structure' instance based on the template S2
# and change the default value for the S16 field.
$S2_Var = S2 { S16 = 2 }
Send TX_FRAME
{
Data = 10*$TestIE # Data field contains the sequence of $TestIE
# repeated 10 times:
# { FB 01 02 FB 01 02 FB 01 02 FB 01 02 FB 01
# 02 FB 01 02 FB 01 02 FB 01 02 FB 01 02 }
}
# Declare Packet Variable $X of structure Generic with data FF
$X = Generic { Data = 0xFF }
# Packet Variable $Y contains the sequence of $TestIE repeated
# three times and $X repeated two times:
# { FB 01 02 FB 01 02 FB 01 02 FF FF }
$Y { Data = 3*$TestIE + 2*$X }
Num_of_Y = 5 # Local Numeric Variable
Send TX_FRAME
{
# Example of concatenation and multiplication of structures.
# Data field contains combined payload of:
#
$S2_Var + $S2_Var + $X + $X + $X + $X + $X + $X + $X + $X + $X + $X
#
+ $X + $X + $X + $X + $Y + $Y + $Y + $Y + $Y
Data = $S2_Var*2 + 16*$X + Num_of_Y*$Y
}
}
Zobrazit stránku 89
1 2 ... 85 86 87 88 89 90 91 92 93 94 95 ... 123 124

Komentáře k této Příručce

Žádné komentáře