byteblowerll.byteblower.StreamGrowingSizeModifier

class byteblowerll.byteblower.StreamGrowingSizeModifier(*args, **kwargs)

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

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

A StreamGrowingSizeModifier will increment the frame size with a configured amount of bytes. The following parameters can be configured:

Minimum size
the minimum frame size. This size will be used when the Stream is started.
Maximum size
the maximum frame size. It this limit isreached, the modifier will return to the minimum size again.
Step size
the amount of bytes the size will increase. By default, a frame will grow with one byte but this parameter allows larger step sizes.
Iteration
this paramter defines the number of times the same frame size is iterated before increasing to the next frame size.

So, a stream with a StreamModifierGrowingSize installed, will start sending frames with a <Minimum size> size, will send this size <Iteration> times, increase the size with <Step size> bytes until the <Maximum size> is reached.

If the maximum size is reached, the next size is calculated as follows:

<next size> = <Minimum size>
  • ( <current size> + <Step size> - <Maximum size> )

All sizes define a frame size, excluding the 4 bytes Ethernet checksum.

The frame size modifier will change the sizes of the Frames added to the stream. It the original frame size is longer, 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 TxStream which is configured with a StreamModifierGrowingSize, the frames are sent alternately, while the modifier is applied on all of them. E.g.

{Frame A , size X}, {Frame B, size X}, {Frame A, size X+1}, {Frame B, size X+1}, …
..note:: It is possible that the maximum size is never reached. Depending on
both the <Step size> and the TxStream configuration (NumberOfFrames), the maximum size will never be used.
__init__(*args, **kwargs)

Initialize self. See help(type(self)) for accurate signature.

Methods

IterationGet() Method to get the current configured iteration.
IterationSet(inIteration) Sets the number of times the same frame size will be used.
MaximumGet() Method to get the current configured maximum frame size.
MaximumSet(inMaxSize) Sets the maximum size of a Frame of a growing size flow.
MinimumGet() Method to get the current configured minimum frame size.
MinimumSet(inMinSize) Sets the Minimum size of a Frame of a growing size flow.
ReCommitValues(inFrame)
StepGet() Method to get the current configured step size.
StepSet(inStep) Sets the number of bytes a frame will grow in one step.
__init__(*args, **kwargs) Initialize self.

Attributes

thisown The membership flag