This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.

RandomSource Element Documentation

NAME

RandomSource -- Click element; generates random packets whenever scheduled

SYNOPSIS

RandomSource(LENGTH [, LIMIT, BURST, ACTIVE, KEYWORDS])

Ports: no inputs, 1 output
Processing: agnostic
Package: standard (core)

DESCRIPTION

Creates packets, of the indicated length, filled with random bytes. Packets' timestamp annotations are set to the current time. Pushes BURST such packets out its single output every time it is scheduled (which will be often). Stops sending after LIMIT packets are generated; but if LIMIT is negative, sends packets forever. Will send packets only if ACTIVE is true. (ACTIVE is true by default.) Default LIMIT is -1 (send packets forever). Default BURST is 1. Keyword arguments are:

LENGTH
Integer. The outgoing packet will have this length.
LIMIT
Integer. Same as the LIMIT argument.
BURST
Integer. Same as the BURST argument.
ACTIVE
Boolean. Same as the ACTIVE argument.
STOP
Boolean. If true, then stop the driver once LIMIT packets are sent. Default is false.
END_CALL
A write handler called once LIMIT packets are sent. END_CALL and STOP are mutually exclusive.

EXAMPLES

  RandomSource(64) -> Queue -> ...

NOTES

Useful for profiling and experiments. Packets' timestamp annotations are set to the current time. RandomSource listens for downstream full notification.

ELEMENT HANDLERS

count (read-only)
Returns the total number of packets that have been generated.
reset (write-only)
Resets the number of generated packets to 0. The RandomSource will then generate another LIMIT packets (if it is active).
length (read/write)
Returns or sets the LENGTH parameter.
limit (read/write)
Returns or sets the LIMIT parameter.
burst (read/write)
Returns or sets the BURST parameter.
active (read/write)
Makes the element active or inactive.

SEE ALSO

InfiniteSource

Generated by 'click-elem2man' from '../elements/standard/randomsource.hh:6' on 16/Jan/2012.

COMMENTS

 
elements/randomsource.txt · Last modified: 2012/01/16 21:23 (external edit)
 
Recent changes RSS feed Driven by DokuWiki