All Classes Namespaces Files Functions Pages
FrameTag.Rx Class Reference

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

Class overview

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:

Sequence Number
A tag which contains the sequence number within the stream.
Timestamp
A tag containing the timestamp this frame has left the transmit interface.

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.

Definition at line 4704 of file api.tcl.

Method documentation

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.

Exceptions
ByteBlower.Rx.Counter.UnsupportedThe format string is a valid value, but is not supported by the server.
<tcl_error>The format string is not a valid value.
Example

In this example, we restore the format of a sequence tag to the default format:

1 [$rxsequence FrameTag.Get ] Format.Default.Set

Definition at line 4727 of file api.tcl.

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.

Parameters
formatThis defines the format of the tag, the following format strings are currently supported:
TimeStamp-Microseconds_CRC
Timestamp in microseconds followed by a CRC. Not supported since 2.9.0
TimeStamp-10Nanoseconds
Timestamp in nanoseconds.
SequenceNumber-0_CRC
Sequence number followed by a CRC.
Example

In this example, we set the format of the timestamp to 10 nanoseconds.

1 [$rxsequence FrameTag.Get ] Format.String.Set TimeStamp-10Nanoseconds

Definition at line 4741 of file api.tcl.

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:

Sequence Tag
For a Sequence Tag, the following formats exist:
SequenceNumber-0_CRC
this format defines a tag of 8 bytes:
                 |--------|--------|--------|--------|--------|--------|--------|--------|
                 |    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.
Time Tag

For a Time Tag, two formats are currently defined:

TimeStamp-Microseconds_CRC
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.
TimeStamp-10Nanoseconds
This format is used by the ByteBlower 2000 series and by the 1000 series from version 1.10.18 onwards. This Tag is 8 bytes long, only containing the Timestamp in nanoseconds. It does not include a CRC compensation. This means that automatic checksum calculation must be enabled on the Frame or those CRC values will be incorrect.

Returns
One of
  • SequenceNumber-0_CRC
  • TimeStamp-Microseconds_CRC
  • TimeStamp-10Nanoseconds
Example

This example will return the type of a Sequence Tag:

1 [$frame FrameTag.Sequence.Get ] Format.String.Get

Returns:

SequenceNumber-0_CRC 

Definition at line 4773 of file api.tcl.

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.

Example

This example restores the default metrics of a sequence tag.

1 [$rxsequence FrameTag.Get ] Metrics.Default.Set

Definition at line 4787 of file api.tcl.

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.

Returns
<FrameTag.Metrics object>
Example

This example will return the FrameTag.Metrics object for a sequence tag:

1 [$frame FrameTag.Sequence.Get ] Metrics.Get

Returns:

<FrameTag.Metrics object> 

Definition at line 4801 of file api.tcl.

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.

Parameters
metricsThis parameter is an object of type FrameTag.Metrics.
Example

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.

1 [$rxsequence FrameTag.Get ] Metrics.Set [ [ $frame SequenceTag.Get ] Metrics.Get ]

Definition at line 4817 of file api.tcl.

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.

Example

This example restores the position of the sequence tag to the default value.

1 [$rxsequence FrameTag.Get ] Position.Default.Set

Definition at line 4834 of file api.tcl.

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.

Default value At the TX side, the default position places the tag at the end of the frame, without overlapping with other enabled tags. At the RX side, the default position is the length of the tag. This means the RX side guesses the location of the tag to be at the very end of the frame. Note that this guess is incorrect if multiple tags are enabled on a single frame!
Returns
Current configured position. If nothing was specified, the default position chosen by the server is returned.
Example

This example will return the position of a sequence tag:

1 [$frame FrameTag.Sequence.Get] Position.Get

Returns:

8 

Definition at line 4863 of file api.tcl.

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.

Parameters
positionThe new value of the position. This value must be between <taglength> and <framelength>.
Example

This example will sets the position of a sequence tag:

1 [$frame FrameTag.Sequence.Get] Position.Set 32

Definition at line 4890 of file api.tcl.

FrameTag.Rx::Type.Get

Returns the FrameTag type.

Currently two FrameTags are in use:

  • The TimeTag is used for latency measurements and contains a timestamp value. The server automatically determines it by looking at its clock for each frame sent in the stream.
  • The SequenceTag is used for out of sequence detection and contains a frame counter value. The server automatically increments it for each frame sent in the stream.
Returns
The current type of the FrameTag:
SequenceNr
This is a FrameTag with a sequence number.
TimeStamp
This is a FrameTag with a timestamp.
Example

This example will return the type of a Sequence Tag:

1 [$frame FrameTag.Sequence.Get ] Type.Get

Returns:

SequenceNr 

Definition at line 4906 of file api.tcl.