The FrameTag.Tx class describes the transmit configuration of a Tag in a Frame. More...
Methods | |
Description.Get | |
Returns a textual description of the object. | |
Disable | |
Method to disable the tag on the Frame. More... | |
Enable | |
Method to enable the tag on the Frame. More... | |
Format.String.Get | |
This returns the format string of this tag. More... | |
IsEnabled | |
Method which will return whether a tag is activated or not. More... | |
Metrics.Get | |
Returns the FrameTag.Metrics of this tag. More... | |
Parent.Get | |
Returns the parent object. | |
Position.Automatic.Set | |
This method will use the automatic position for the tag. More... | |
Position.Get | |
Returns the current configured location of the tag within the Frame. More... | |
Position.Set position | |
Sets the location of the tag in the Frame. More... | |
Type.Get | |
Returns the FrameTag type. More... | |
The FrameTag.Tx class describes the transmit configuration of a Tag in a Frame.
ByteBlower supports optional tagging of frames. Such a tag can have different formats, locations, ... These parameters can be set and retrieved using this class.
Currently, two different types of FrameTags are supported:
Adding tags is a very powerful and flexible feature of ByteBlower. Please have a look at ByteBlower API Knowledgebase: Background: Adding FrameTags to your ByteBlower frame - structure and behaviour for a very detailed explanation.
To perform latency measurements or out of sequence detection, configuration needs to be done both at TX and RX side:
FrameTag.Tx::Disable |
Method to disable the tag on the Frame.
This will deactivate the tag on the Frame. The original content of the frame will be restored.
Note the configuration of other enabled frames may change when this frame is disabled.
To disable the sequence tag on frame, one can do:
FrameTag.Tx::Enable |
Method to enable the tag on the Frame.
This will activate the tag on the Frame, and apply its configuration. As long as this method is not called, the tag will not be active.
Note the configuration of other enabled frames may change when this frame is disabled.
To enable the sequence tag on frame, one can do:
FrameTag.Tx::Format.String.Get |
This returns the format string of this tag.
The exact format of the different tags may vary between the different versions of the ByteBlower software. To match the receiving part of a flow with then transmitting part, it is necessary to configure the same format.
Each tag format has a unique format code. The following formats are currently defined:
|--------|--------|--------|--------|--------|--------|--------|--------| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | |--------|--------|--------|--------|--------|--------|--------|--------| | SEQUENCE NUMBER | CRC | |-----------------------------------------------------------------------|The sequence number is incremented for each packet leaving the ByteBlower server. The CRC will invert the changes in value so the checksum over the full payload remains constant. This makes sure other checksums (e.g. UDP) remain valid.
For a Time Tag, two formats are currently defined:
Please note that support for Microseconds resolution has been dropped since 2.9.0 This format is used on pre-1.10.16 software versions on the ByteBlower 1000 series. This Tag is 8 bytes long and looks like this:
|--------|--------|--------|--------|--------|--------|--------|--------| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | |--------|--------|--------|--------|--------|--------|--------|--------| | TIMESTAMP MICROSECONDS | CRC | |-----------------------------------------------------------------------|
This format carries the server timestamp when this frame was sent in units of microseconds. The CRC will invert the changes in value so the checksum over the full payload remains constant. This makes sure other checksums (e.g. UDP) remain valid.
This example will return the type of a Sequence Tag:
Returns:
SequenceNumber-0_CRC
FrameTag.Tx::IsEnabled |
Method which will return whether a tag is activated or not.
This method is used to retrieve the current state of the tag. If this tag is activated/enabled, true is returned. Otherwise, this method will return false.
To see if a timestamp tag is enabled on a frame, this code can be used:
Returns:
false
FrameTag.Tx::Metrics.Get |
Returns the FrameTag.Metrics of this tag.
The FrameTag.Metrics represent the configuration like the length and alignment of a tag. This method returns this information for this object.
This example will return the FrameTag.Metrics object for a sequence tag:
Returns:
<FrameTag.Metrics object>
FrameTag.Tx::Position.Automatic.Set |
This method will use the automatic position for the tag.
ByteBlower is very flexible in positioning the tag, and the combination of different tags. If the position of the tag is not important, the automatic positioning of tags is the easiest way for the user.
Note that the automatic position is used by default. This method is only useful when you want to reset positions that were previously set by the user.
Automatic placement of FrameTags has multiple advantages:
Tags are automatically placed at the end of the frame. If both Tags are enabled and have an automatic position, the SequenceTag is placed in front of the TimeTag.
If a tag has an explicit position, this is always respected. The automatic position will adapt to it as follows:
In this example, we will reset the position of the sequence tag to automatic.
FrameTag.Tx::Position.Get |
Returns the current configured location of the tag within the Frame.
A user can choose where in a the Frame a tag will be placed (TX) or looked for (RX).
This position is configured relative to the end of the frame in units of bytes. This eliminates the complexity caused by VLAN tagging or other protocols that may influence the header structure of a frame.
The meaning of the position value is shown like this:
| Position | | <---------------------| |-----------------------------------------------------------------------------| | | TAG | | |-----------------------------------------------------------------------------|
If no position is specified by the user, the server sert (TX) or look for (RX) the tag at a default location.
This method returns the current configured value for this position.
This example will return the position of a sequence tag:
Returns:
8
FrameTag.Tx::Position.Set | position | ||
Sets the location of the tag in the Frame.
A user can choose where in a the Frame a tag will be placed (TX) or looked for (RX).
This position is configured relative to the end of the frame in units of bytes. This eliminates the complexity caused by VLAN tagging or other protocols that may influence the header structure of a frame.
The meaning of the position value is shown like this:
| Position | | <---------------------| |-----------------------------------------------------------------------------| | | TAG | | |-----------------------------------------------------------------------------|
If no position is specified by the user, the server sert (TX) or look for (RX) the tag at a default location.
This method allows the user to configure this value.
position | The new value of the position. This value must be between <taglength> and <framelength>. |
This example will sets the position of a sequence tag:
FrameTag.Tx::Type.Get |
Returns the FrameTag type.
Currently two FrameTags are in use:
This example will return the type of a Sequence Tag:
Returns:
SequenceNr