The FrameTag.Rx class describes the receive configuration of a Tag in a Frame. More...
Methods | |
Description.Get | |
Returns a textual description of the object. | |
Format.Default.Set | |
Sets the format to the native, default format. More... | |
Format.Set.FromString format | |
Method to set the format by name. More... | |
Format.String.Get | |
This returns the format string of this tag. More... | |
Metrics.Default.Set | |
Sets the metrics to the default values. More... | |
Metrics.Get | |
Returns the FrameTag.Metrics of this tag. More... | |
Metrics.Set metrics | |
Sets the metric of the tag. More... | |
Parent.Get | |
Returns the parent object. | |
Position.Default.Set | |
This restores the position to the default value. 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.Rx class describes the receive 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 detailed explanation.
This class is represents the FrameTag configuration at the receiving side of the flow.
In typical situations this configuration must not be changed.
FrameTag.Rx::Format.Default.Set |
Sets the format to the native, default format.
This method sets the format to the default value. The default value depends on server type:
For sequence tags, the default value is the same for all systems <SequenceNumber-0_CRC>.
For time tags, the default value is <TimeStamp-10Nanoseconds>. However, on 1000 series servers with a software version before 1.10.18, the <TimeStamp-Microseconds_CRC> format is used instead.
ByteBlower.Rx.Counter.Unsupported | The format string is a valid value, but is not supported by the server. |
<tcl_error> | The format string is not a valid value. |
In this example, we restore the format of a sequence tag to the default format:
FrameTag.Rx::Format.Set.FromString | format | ||
Method to set the format by name.
This method allows to set the format by name. See {FrameTag.Rx::Format.String.Get} for details on the tag formats.
format | This defines the format of the tag, the following format strings are currently supported:
|
In this example, we set the format of the timestamp to 10 nanoseconds.
FrameTag.Rx::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:
|--------|--------|--------|--------|--------|--------|--------|--------| | 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.Rx::Metrics.Default.Set |
Sets the metrics to the default values.
This method restores the metrics to the default value.
Currently, both the sequence tag and time tag have metrics with an alignment of 1 bytes and a size of 8 bytes on all servers types and versions.
This example restores the default metrics of a sequence tag.
FrameTag.Rx::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.Rx::Metrics.Set | metrics | ||
Sets the metric of the tag.
This method allows to copy the metrics of a FrameTag.Tx to the recieve side of a flow.
Note that it is often better to copy the complete TX tag configuration to the receive side of a flow. See Rx.Latency.Basic::FrameTag.Set for an example.
metrics | This parameter is an object of type FrameTag.Metrics. |
This example demonstrates how you can set the metrics of a frame on the receiving object. The configuration is simply copied from the TX side.
FrameTag.Rx::Position.Default.Set |
This restores the position to the default value.
This method restores the default value for the position. By default, the tag is put at the end of the frame. This will restore the position of the receiving object to its default.
This example restores the position of the sequence tag to the default value.
FrameTag.Rx::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.Rx::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.Rx::Type.Get |
Returns the FrameTag type.
Currently two FrameTags are in use:
This example will return the type of a Sequence Tag:
Returns:
SequenceNr