A frame field modifier which will increase the value of the frame field between a minimum and maximum value. More...
Methods | |
Description.Get | |
Returns a textual description of the object. | |
InitialValue.Get | |
Method to get the current configured initial field value. More... | |
InitialValue.Set initial | |
Sets the initial value of the frame field. More... | |
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 an incremental 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 an incremental 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. | |
Step.Get | |
Method to get the current configured value step. More... | |
Step.Set step | |
Sets the value a field value will grow in one step. More... | |
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 FrameFieldModifier.Incremental 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.Incremental will increment the value in a frame field with a configured amount. 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).
Positive value step
A frame with a FrameFieldModifier.Incremental 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 FrameFieldModifier.Incremental 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>.
FrameFieldModifier.Incremental::InitialValue.Get |
Method to get the current configured initial field value.
This example shows how to retrieve the current initial field value.
Returns:
0
FrameFieldModifier.Incremental::InitialValue.Set | initial | ||
Sets the initial value of the frame field.
This value will be used when a Tx.Stream is started.
initial | Initial value of the frame field. 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. Default: 0 |
This example will set the initial value to 1024.
FrameFieldModifier.Incremental::Length.Get |
Method to get the current configured field length.
This example shows how to retrieve the current field length.
Returns:
2
FrameFieldModifier.Incremental::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.Incremental::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.Incremental::Maximum.Set | maximum | ||
Sets the maximum value of the frame field for an incremental 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.Incremental::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.Incremental::Minimum.Set | minimum | ||
Sets the Minimum value of the frame field for an incremental 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.Incremental::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.Incremental::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.
FrameFieldModifier.Incremental::Step.Get |
FrameFieldModifier.Incremental::Step.Set | step | ||
Sets the value a field value will grow in one step.
Each time the modifier needs to adapt the value of the frame field, it will be incremented with <Value step>.
step | This parameter defines the amount the field value will grow. This value can be positive or negative. Default: 1 |
ByteBlower.Exception.API.ConfigError | An error is returned when the value is zero. |
This example demonstrates a value step of 10:
This example demonstrates a negative value step of 2: