A frame field modifier which will change the field value of the frame randomly between a minimum and maximum value. More...
Methods | |
Description.Get | |
Returns a textual description of the object. | |
Length.Get | |
Method to get the current configured field length. More... | |
Length.Set length | |
Sets the length of the frame field. More... | |
Maximum.Get | |
Method to get the current configured maximum field value. More... | |
Maximum.Set maximum | |
Sets the maximum value of the frame field for a random value field modifier. More... | |
Minimum.Get | |
Method to get the current configured minimum field value. More... | |
Minimum.Set minimum | |
Sets the Minimum value of the frame field for a random value field modifier. More... | |
Offset.Get | |
Method to get the current configured field offset within the frame content. More... | |
Offset.Set offset | |
Sets the offset of the frame field within the frame content. More... | |
Parent.Get | |
Returns the parent object. | |
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 FrameFieldModifier.Random 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 FrameFieldModifier.Random will change the value in the frame field randomly. The following parameters can be configured:
Parameters related to the location of the field in the frame:
The field cannot overwrite the 4 bytes Ethernet checksum. The allowed range for offset is 0 ... <ByteBlowerPort MDL>.
Please note that in both cases the field value will still move on to the next value.
Parameters related to the value written to the field:
The field value range is defined by the minimum and maximum value (both values inclusive).
So, a frame with a FrameFieldModifier.Random 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.
FrameFieldModifier.Random::Length.Get |
FrameFieldModifier.Random::Length.Set | length | ||
Sets the length of the frame field.
length | Length of the frame field. The value must be greater than zero and smaller than 8 (as for server version 2.3.x) Default: 2 |
ByteBlower.Exception.API.ConfigError | When the field length is not supported by the server. |
This example will set the field length to 4.
FrameFieldModifier.Random::Maximum.Get |
Method to get the current configured maximum field value.
This example shows how to retrieve the current maximum field value.
Returns:
65535
FrameFieldModifier.Random::Maximum.Set | maximum | ||
Sets the maximum value of the frame field for a random value field modifier.
maximum | Maximum value for the frame field. This value is limited to 64-bit signed integer range. The value must always be greater than the <Minimum value> configured. Default: 65535 |
ByteBlower.Exception.API.ConfigError | Maximum too big or too small. |
This example will set the maximum value to 16383 bytes.
FrameFieldModifier.Random::Minimum.Get |
Method to get the current configured minimum field value.
This example shows how to retrieve the current minimum field value.
Returns:
0
FrameFieldModifier.Random::Minimum.Set | minimum | ||
Sets the Minimum value of the frame field for a random value field modifier.
minimum | Minimum value for the frame field. This value is limited to 64-bit signed integer range. The value must always be less than the <Maximum value> configured. Default: 0 |
ByteBlower.Exception.API.ConfigError | Minimum too small or too big. |
This example will set the minimum value to 512.
FrameFieldModifier.Random::Offset.Get |
Method to get the current configured field offset within the frame content.
The field offset is the absolute offset from the start of the frame.
This example shows how to retrieve the current field offset.
Returns:
56
FrameFieldModifier.Random::Offset.Set | offset | ||
Sets the offset of the frame field within the frame content.
offset | Offset of the frame field within the frame content. This value is relative to the start of the frame. The value must be greater or equal than zero and must be smaller than the ByteBlowerPort MDL Default: 56 |
ByteBlower.Exception.API.ConfigError | When the field offset is out of valid range. |
This example will set the offset to 88.