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

RandomSample Element Documentation

NAME

RandomSample -- Click element; samples packets with some probability

SYNOPSIS

RandomSample([P, KEYWORDS])

Ports: 1 input, 1-2 outputs
Processing: agnostic, but output 1 is push
Package: standard (core)

DESCRIPTION

Samples packets with probability P. One out of 1/P packets are sent to the first output. The remaining packets are dropped, unless the element has two outputs, in which case they are emitted on output 1. If you don't specify P, you must supply one of the SAMPLE and DROP keyword arguments. Keyword arguments are:

SAMPLE P
Sets the sampling probability to P.
DROP Q
The element will drop packets with probability Q. Same as suppling (1 - Q) as the sampling probability.
ACTIVE
Boolean. RandomSample is active or inactive; when inactive, it sends all packets to output 0. Default is true (active).

ELEMENT HANDLERS

sampling_prob (read/write)
Returns or sets the sampling probability.
drop_prob (read/write)
Returns or sets the drop probability, which is 1 minus the sampling probability.
active (read/write)
Makes the element active or inactive.
drops (read-only)
Returns the number of packets dropped.

SEE ALSO

RandomBitErrors

Generated by 'click-elem2man' from '../elements/standard/randomsample.hh' on 24/May/2007.

COMMENTS

 
elements/randomsample.txt · Last modified: 2007/05/24 00:16 (external edit)
 
Recent changes RSS feed Driven by DokuWiki