Teledyne-lecroy UWBTrainer Exerciser Script Language Manual do Utilizador Página 96

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 124
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 95
LeCroy Corporation UWBTrainer Exerciser - Generation Script Language Reference Manual
88
10.12 Preprocessor Integer Arithmetic
You can declare a preprocessor DWORD variable, make arithmetic operations with it, and use it
in field and setting/parameter assignments.
Note: Arithmetic expressions are allowed only in numeric variable assignments. Some legal
expressions are.
x = y + 2
TX_FRAME ( Duration = (x+y)*7 )
TX_FRAME ( x + 12 )
Examples
Main
{
x = 2
y = ( z = 12 ) + ( TX_PAYLOAD_OFFSET + 36 ) / 8
z = 0x1 << 5
s = "Some Hex Data" # Constants may be used in operations.
x++
y--
z += ( x + y )
x = ( ( y & 0xFF ) >> 5 ) / 12
Send TX_FRAME ( Delay = x )
Send TX_FRAME
{
SrcAddr = 0xEEEE
# Example of a data payload assignment that uses
# integer variables, constants, hex literals,
# and a data pattern.
Data = { y y y 7a7a7a "Some Hex Data"
"Some Hex Data" 8b 8b 8b z z z [PATTERN_3] }
}
( Delay = y ) # Use an integer variable for a parameter setting.
}
Vista de página 95
1 2 ... 91 92 93 94 95 96 97 98 99 100 101 ... 123 124

Comentários a estes Manuais

Sem comentários