All Classes Namespaces Files Functions Pages
StreamModifier.RandomSize Class Reference

A frame size modifier which will change the size of the frame randomly between a minimum and maximum value. More...

Methods

 Description.Get
 Returns a textual description of the object.
 
 Maximum.Get
 Method to get the current configured maximum frame size. More...
 
 Maximum.Set maximum
 Sets the Maximum size of a Frame of a flow with StreamModifier.RandomSize. More...
 
 Minimum.Get
 Method to get the currently configured minimum frame size. More...
 
 Minimum.Set minimum
 Sets the Minimum size of a Frame of a flow with StreamModifier.RandomSize. More...
 
 Parent.Get
 Returns the parent object.
 

Class overview

A frame size modifier which will change the size of the frame randomly between a minimum and maximum value.

Deprecated:
Since 2.3.0 this functionality is replaced by the FrameSizeModifier.Random, see Frame::Modifier.Size.Random.Set for more information.

ByteBlower allows different modifiers on a flow. Some modifiers work on the timing parameters of a frame, others on the size or content. The StreamModifier.RandomSize is a modifier which modifies the size of the frames added to the Tx.Stream on which this Modifier is added.

A StreamModifier.RandomSize will change the frame size randomly. The following parameters can be configured:

Minimum size
the minimum frame size.
Maximum size
the maximum frame size.

So, a stream with a StreamModifier.RandomSize installed, will start sending frames with a size randomly chosen between <Minimum size> size and <Maximum size> size. Each time a frame is sent, a new size is selected.

All sizes are without the additional 4 bytes Ethernet checksum.

The frame size modifier will change the sizes of the Frames added to the stream. If the original frame size is bigger, the size will truncated to the requested frame size. If automatic checksum calculations have been enabled on the Frame, they will be recalculated. This depends on the configuration of the Frame. See the Frame documentation on how this can be done.

If the original frame size of a Frame is too short, the Frame will be padded with zero-value bytes.

If multiple frames are added to a Tx.Stream which is configured with a StreamModifier.RandomSize, the frames are sent alternately, while the modifier is applied on all of them.

Definition at line 22228 of file api.tcl.

Method documentation

StreamModifier.RandomSize::Maximum.Get

Method to get the current configured maximum frame size.

Returns
The maximum frame size which will be used for a random size flow.
Example

This example show how to retrieve the current maximum frame size.

1 $randomSizeModifier Maximum.Get

Returns:

1514 

Definition at line 22245 of file api.tcl.

StreamModifier.RandomSize::Maximum.Set   maximum  

Sets the Maximum size of a Frame of a flow with StreamModifier.RandomSize.

This defines the maximum frame size of the stream.

Parameters
maximumMaximum byte length of the Frame. This value must be at least 61 bytes, and maximum 8192. The value must also be bigger than the <Minimum size> configured.
Default: 1514
Exceptions
tclerrorMaximum too small or too big.
Example

This example will set the maximum frame size to 128 bytes.

1 $randomSizeModifier Maximum.Set 128

Definition at line 22261 of file api.tcl.

StreamModifier.RandomSize::Minimum.Get

Method to get the currently configured minimum frame size.

Returns
The minimum frame size which will be used for a random size flow.
Example

This example show how to retrieve the current minimum frame size.

1 $randomSizeModifier Minimum.Get

Returns:

60 

Definition at line 22273 of file api.tcl.

StreamModifier.RandomSize::Minimum.Set   minimum  

Sets the Minimum size of a Frame of a flow with StreamModifier.RandomSize.

This defines the minimal frame size of the stream.

Parameters
minimumMinimum byte length of the Frame. This value must be at least 60 bytes, and maximum 8191. The value must also be less than the <Maximum size> configured.
Default: 60
Exceptions
tclerrorMinimum too small or too big.
Example

This example will set the minimum frame size to 128 bytes.

1 $randomSizeModifier Minimum.Set 128

Definition at line 22289 of file api.tcl.