Teledyne-lecroy UWBTrainer Exerciser Script Language Instrukcja Użytkownika Strona 100

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 124
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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.
}
}
Przeglądanie stron 99
1 2 ... 95 96 97 98 99 100 101 102 103 104 105 ... 123 124

Komentarze do niniejszej Instrukcji

Brak uwag