All Classes Namespaces Files Functions Pages
FrameFieldModifier.Incremental Class Reference

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...
 

Class overview

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:

  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 be written to the frame contents when the Tx.Stream is started.

    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>.

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.
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.
It is possible that the maximum value is never reached. Depending on the <Value step> and the Tx.Stream configuration (<NumberOfFrames>), the maximum value will never be reached.
Since
2.3.0

Definition at line 3910 of file api.tcl.

Method documentation

FrameFieldModifier.Incremental::InitialValue.Get

Method to get the current configured initial field value.

Returns
The initial field value which will be used for this incremental value field modifier.
Example

This example shows how to retrieve the current initial field value.

1 $frameFieldModifierIncremental InitialValue.Get

Returns:

0 

Definition at line 3927 of file api.tcl.

FrameFieldModifier.Incremental::InitialValue.Set   initial  

Sets the initial value of the frame field.

This value will be used when a Tx.Stream is started.

Parameters
initialInitial 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
Example

This example will set the initial value to 1024.

1 $frameFieldModifierIncremental InitialValue.Set 1024

Definition at line 3941 of file api.tcl.

FrameFieldModifier.Incremental::Length.Get

Method to get the current configured field length.

Returns
The field length which will be used for this incremental value field modifier.
Example

This example shows how to retrieve the current field length.

1 $frameFieldModifierIncremental Length.Get

Returns:

2 

Definition at line 3953 of file api.tcl.

FrameFieldModifier.Incremental::Length.Set   length  

Sets the length of the frame field.

Parameters
lengthLength of the frame field. The value must be greater than zero and smaller than 8 (as for server version 2.3.x)
Default: 2
Exceptions
ByteBlower.Exception.API.ConfigErrorWhen the field length is not supported by the server.
Example

This example will set the field length to 4.

1 $frameFieldModifierIncremental Length.Set 4

Definition at line 3967 of file api.tcl.

FrameFieldModifier.Incremental::Maximum.Get

Method to get the current configured maximum field value.

Returns
The maximum field value which will be used for this incremental value field modifier.
Example

This example shows how to retrieve the current maximum field value.

1 $frameFieldModifierIncremental Maximum.Get

Returns:

65535 

Definition at line 3979 of file api.tcl.

FrameFieldModifier.Incremental::Maximum.Set   maximum  

Sets the maximum value of the frame field for an incremental value field modifier.

Parameters
maximumMaximum 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
Exceptions
ByteBlower.Exception.API.ConfigErrorMaximum too big or too small.
Example

This example will set the maximum value to 16383 bytes.

1 $frameFieldModifierIncremental Maximum.Set 16383

Definition at line 3993 of file api.tcl.

FrameFieldModifier.Incremental::Minimum.Get

Method to get the current configured minimum field value.

Returns
The minimum field value which will be used for this incremental value field modifier.
Example

This example shows how to retrieve the current minimum field value.

1 $frameFieldModifierIncremental Minimum.Get

Returns:

0 

Definition at line 4005 of file api.tcl.

FrameFieldModifier.Incremental::Minimum.Set   minimum  

Sets the Minimum value of the frame field for an incremental value field modifier.

Parameters
minimumMinimum 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
Exceptions
ByteBlower.Exception.API.ConfigErrorMinimum too small or too big.
Example

This example will set the minimum value to 512.

1 $frameFieldModifierIncremental Minimum.Set 512

Definition at line 4019 of file api.tcl.

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.

Returns
The field offset which will be used for this incremental value field modifier.
Example

This example shows how to retrieve the current field offset.

1 $frameFieldModifierIncremental Offset.Get

Returns:

56 

Definition at line 4033 of file api.tcl.

FrameFieldModifier.Incremental::Offset.Set   offset  

Sets the offset of the frame field within the frame content.

Parameters
offsetOffset 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
Exceptions
ByteBlower.Exception.API.ConfigErrorWhen the field offset is out of valid range.
Example

This example will set the offset to 88.

1 $frameFieldModifierIncremental Offset.Set 88

Definition at line 4047 of file api.tcl.

FrameFieldModifier.Incremental::Step.Get

Method to get the current configured value step.

Returns
The value step which will be used for an incremental value field modifier.
Example

This example shows how to retrieve the current value step.

1 $frameFieldModifierIncremental Step.Get

Returns:

1 

Definition at line 4064 of file api.tcl.

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>.

Parameters
stepThis parameter defines the amount the field value will grow. This value can be positive or negative.
Default: 1
Exceptions
ByteBlower.Exception.API.ConfigErrorAn error is returned when the value is zero.
Example

This example demonstrates a value step of 10:

1 $frameFieldModifierIncremental Step.Set 10

This example demonstrates a negative value step of 2:

1 $frameFieldModifierIncremental Step.Set -2

Definition at line 4080 of file api.tcl.