byteblowerll.byteblower.FrameFieldModifierRandom

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

A frame field modifier which will change the field value of the frame randomly 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 FrameFieldModifierRandom 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 FrameFieldModifierRandom will change the value in the frame field randomly. 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.

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

    So, a frame with a FrameFieldModifierRandom installed, will start sending frames with field values randomly chosen between <Minimum value> and <Maximum value>. Each time a frame is sent, a new value is selected.

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.

New in version 2.3.0.

__init__(*args, **kwargs)

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

Methods

DescriptionGet(*args) Gets a textual description for the current object
FrameGet()
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 a random value field modifier.
MinimumGet() Method to get the current configured minimum field value.
MinimumSet(inMinValue) Sets the Minimum value of the frame field for a random 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.
__init__(*args, **kwargs) Initialize self.

Attributes

thisown The membership flag