16 rand token, 17 randstream( n ) primitive, Rand token – Teledyne LeCroy UWBTrainer Exerciser Script Language User Manual
Page 100: Randstream( n ) primitive, Randstream

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.
}
}