byteblowerll.byteblower.FrameFieldModifierIncremental

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

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

ByteBlower allows different modifiers on a Frame. Some modifiers work on the size of a frame, others content. The FrameFieldModifierIncremental is a modifier which modifies a certain field in the frame content.

A frame field is a number of subsequent bytes in the frame content. The value is defined as host-ordering signed integer and will be written to the frame content as network-ordering signed integer.

A FrameFieldModifierIncremental will increment the value in a frame field with a configured amount. The following parameters can be configured:

  1. Parameters related to the location of the field in the frame:

    Field offset

    Offset of the field counted in bytes from the start of the frame.

    Field length

    Length of the field counted in bytes. Minimum: 1Byte. Maximum: 8Bytes ( depends on server version).

    The field cannot overwrite the 4 bytes Ethernet checksum. The allowed range for offset is 0 … <ByteBlowerPort MDL>.

    • When the field offset is greater or equal than the actual frame size, nothing will be written to the frame.
    • When the field offset is smaller than the actual frame size, but the field offset + field length exceeds the frame size. Then the LSB part of the field will be written to the frame.

    Please note that in both cases the field value will still move on to the next value.

  2. Parameters related to the value written to the field:

    Minimum value

    The minimum field value.

    Maximum value

    The maximum field value.

    Value step

    The amount the value will increase. By default, the value will grow with one but this parameter allows larger value steps. The step can be positive or negative but cannot be zero.

    Initial value

    This field value will bewritten to the frame contents when the Stream is started.

    The field value range is defined by the minimum and maximum value (both valuesinclusive).

    • Positive value step A frame with a FrameFieldModifierIncremental installed, will start sending frames with field value <Initial value>, increase the value with <Value step> until the <Maximum value> is reached.

      When maximum value is reached, the modifier will return to the minimum value again. So if the <Maximum value> is reached, the next value will be the <Minimum value>.

    • Negative value step A frame with a FrameFieldModifierIncremental installed, will start sending frames with field value <Initial value>, increase the value with (the negative) <Value step> (thus decrease the value) until the <Minimum value> is reached.

      When the minimum value is reached, the modifier will return to the maximum value again. So if the <Minimum value> is reached, the next value will be the <Maximum value>.

Note

When the <Initial value> is smaller than the <Minimum value> when the stream is started, then the minimum value will be used as initial value. When the <Initial value> is greater than the <Maximum value> when the stream is started, then the maximum value will be used as initial value.

Note

If automatic checksum and/or length calculations have been enabled on the Frame and the frame field overlaps one or more of those. Then the automatic fields will overrule the field modifier value. This depends on the configuration of the Frame. See the Frame documentation on how this can be done.

Note

It is possible that the maximum value is never reached. Depending on the <Value step> and the Stream configuration (<NumberOfFrames>), the maximum value will never be reached.

New in version 2.3.0.

__init__(*args, **kwargs)

Methods

DescriptionGet(*args) Gets a textual description for the current object
FrameGet()
InitialValueGet() Method to get the current configured initial field value.
InitialValueSet(inInitialValue) Sets the initial value of the frame field.
LengthGet() Method to get the current configured field length.
LengthSet(inLength) Sets the length of the frame field.
MaximumGet() Method to get the current configured maximum field value.
MaximumSet(inMaxValue) Sets the maximum value of the frame field for an incremental value field modifier.
MinimumGet() Method to get the current configured minimum field value.
MinimumSet(inMinValue) Sets the Minimum value of the frame field for an incremental value field modifier.
OffsetGet() Method to get the current configured field offset within the frame content.
OffsetSet(inOffset) Sets the offset of the frame field within the frame content.
ParentGet() Returns the parent object.
Refresh() Retrieves the latest data from the server for this object.
StepGet() Method to get the current configured value step.
StepSet(inStep) Sets the value a field value will grow in one step.
__init__(*args, **kwargs)