Teledyne-lecroy UWBTrainer Exerciser Script Language Manual de usuario Pagina 100

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 124
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 99
LeCroy Corporation UWBTrainer Exerciser - Generation Script Language Reference Manual
92
10.16 RAND Token
You can use a RAND token in places where numeric literals are used to insert pseudo-random
numbers in the range 0 to 0x7fff.
Note: By default, RAND uses a different integer seed value every time the script is compiled. You
can set the seed using the RandSeed setting (for the RandSeed setting description, see the
"Generation Setting" topic).
Example
Main
{
# The frame template 'SOME_PKT_TEMPLATE' is declared later.
Send SOME_PKT_TEMPLATE
{
Field0 = { 00 RAND RAND RAND RAND 00 } # Set random hex
# stream.
}
x = RAND # Assign a random value to the numeric variable.
}
10.17 RandStream( n ) Primitive
The RandStream( n ) primitive is a utility, based on the RAND token, that produces a random
byte stream, where n is the number of bytes in the stream.
Note: For a description of random seeding, see the Note in the "Rand Token" section
(preceding).
Example
Main
{
# The frame template 'SOME_PKT_TEMPLATE' is declared later.
Send SOME_PKT_TEMPLATE
{
Fieldof32bytes = RandStream(32) # Set a random 32-byte stream.
}
}
Vista de pagina 99
1 2 ... 95 96 97 98 99 100 101 102 103 104 105 ... 123 124

Comentarios a estos manuales

Sin comentarios