All Classes Namespaces Files Functions Pages
Frame Class Reference

A ByteBlower Frame is an object representing a Frame which can be used in a Tx.Stream for transmission by a ByteBlower Port. More...

Methods

 Bytes.Get
 A method which returns the current content of a Frame in a hexadecimal format. More...
 
 Bytes.Set bytes
 A method which sets the content of a Frame in a hexadecimal format. More...
 
 Description.Get
 Returns a textual description of the object.
 
 FrameTag.Sequence.Get
 Returns the FrameTag.Tx object related to the sequence number injection for this frame. More...
 
 FrameTag.Time.Get
 Returns the FrameTag.Tx object related to the timestamp injection for this frame. More...
 
 L3.Auto.Checksum.Enable bool
 Enable or disable the automatic checksum calculation of the Layer3 header of this frame. More...
 
 L3.Auto.Checksum.Get
 Method returning the current configuration of the automatic checksum calculation option. More...
 
 L3.Auto.Length.Enable bool
 Enable or disable the automatic Layer3 header length field calculation of this frame. More...
 
 L3.Auto.Length.Get
 Method returning the current configuration of the automatic Layer3 length field adaption option. More...
 
 L4.Auto.Checksum.Enable bool
 Enable or disable the automatic Layer4 checksum calculation of this frame. More...
 
 L4.Auto.Checksum.Get
 Method returning the current configuration of the automatic Layer4 checksum recalculation option. More...
 
 L4.Auto.Length.Enable bool
 Enable or disable the automatic Layer4 header length field calculation of this frame. More...
 
 L4.Auto.Length.Get
 Method returning the current configuration of the automatic Layer4 length field adaption option. More...
 
 Modifier.Field.Add type
 Adds a frame field modifier. More...
 
 Modifier.Field.Get
 Returns the active frame field modifier(s). More...
 
 Modifier.Field.Incremental.Add
 Adds an incremental frame field modifier. More...
 
 Modifier.Field.Incremental.Get
 Returns the active incremental frame field modifier(s). More...
 
 Modifier.Field.Random.Add
 Adds a random frame field modifier. More...
 
 Modifier.Field.Random.Get
 Returns the active random frame field modifier(s). More...
 
 Modifier.Get
 Returns the active frame size modifier. More...
 
 Modifier.Set type
 Sets a frame size modifier. More...
 
 Modifier.Size.Get
 Returns the active frame size modifier. More...
 
 Modifier.Size.Growing.Get
 Returns the active frame growing size modifier. More...
 
 Modifier.Size.Growing.Set
 Sets a growing frame size modifier. More...
 
 Modifier.Size.Random.Get
 Returns the active frame random size modifier. More...
 
 Modifier.Size.Random.Set
 Sets a random frame size modifier. More...
 
 Modifier.Size.Set type
 Sets a frame size modifier. More...
 
 Parent.Get
 Returns the parent object.
 
 Result.Clear
 Resets the current transmit counters to zero. More...
 
 Result.Get
 Returns the current transmit counters. More...
 
 Result.History.Get
 Returns the current transmit history counters.
 
 SequenceTag.Enable bool
 This method will enable of disable the insertion of a sequence number in the Frame. More...
 
 SequenceTag.Get
 Indicates whether or not a sequence number will be added to each frame. More...
 
 TimeTag.Enable bool
 This method will enable of disable the insertion of a timestamp in the Frame. More...
 
 TimeTag.Get
 Indicates whether or not a time tag will be added to each frame. More...
 

Class overview

A ByteBlower Frame is an object representing a Frame which can be used in a Tx.Stream for transmission by a ByteBlower Port.

A Frame is used in stateless traffic testing. It will be sent by a ByteBlowerPort. For each Frame, different options can be enabled:

  1. Tagging
    Sequence
    Defines if a sequence number must be set. This is used for out-of-sequence detection.
    Timestamping
    Defines if the timestamp of transmission must be set in the frame. This is used for latency measurements.
  2. Checksumming
    L3
    IPv4/IPv6 automatic header checksumming.
    L4
    UDP/TCP automatic checksumming.
  3. Length field correction
    L3
    Automatic correction of the IPv4 length field. This is usefull when using a FrameSizeModifier.
    L4
    Automatic correction of the UDP/TCP length field. This is usefull when using a FrameSizeModifier.

Also the frame can be modified during the test using modifiers:

  1. Field
    Incremental
    A field in the frame will be incremented every time the frame is sent out. The field's position and size is configurable.
    Random
    A field in the frame will be a random value every time the frame is sent out. The field's position and size is configurable.
  2. Size
    GrowingSize
    The frame will grow between a minimum and a maximum value. When the maximum value is reached, the frame resizes to the given minimum.
    RandomSize
    The frame will have a different size every time it is sent out. The sizes will be random between a given minimum and maximum size.

Definition at line 3301 of file api.tcl.

Method documentation

Frame::Bytes.Get

A method which returns the current content of a Frame in a hexadecimal format.

This method will return the current content of a Frame. A ByteBlower Frame is an Ethernet Frame, excluding the frame check sequence ( aka CRC ).

Note
The real content of a Frame can differ if Modifiers such as the FrameSizeModifier are applied on the Flow containing this Frame.
Returns
This method returns the content in a hexadecimal string. All bytes are concatenated into one string.
Example

The current content of a frame can be requested like this:

1 $frame Bytes.Get

Returns:

0001020304050607000102030405060700010203040506070001020304050607000102030405060700010203040506070001020304050607 

Definition at line 3317 of file api.tcl.

Frame::Bytes.Set   bytes  

A method which sets the content of a Frame in a hexadecimal format.

This method will change the content of a Frame. A ByteBlower Frame is an Ethernet Frame excluding the four CRC bytes. The value can be in different formats, e.g.

  1. 0x01 0x02 0x03 0x04 0x05 ...
  2. 0001020304050607
  3. 00 01 02 03 04 05 ...
Note
You can call this method even during transmission of a flow, the value will be updated in real-time.
Exceptions
ByteBlower.Exception.ConfigErrorwhen the value does contain non-hexadecimal characters or when the length is not even.
Parameters
bytesBytes can be of any of the following formats :
  1. 0x01 0x02 0x03 0x04 0x05 ...
  2. 0001020304050607
  3. 00 01 02 03 04 05 ...
and must be at least 60 bytes.
Exceptions
ByteBlower.Exception.API.ConfigErrorwhen the frame is too small (<60 bytes) or when the frame is too big (>8192)
Example

The content of a frame can be set like this:

1 $frame Bytes.Set 0001020304050607000102030405060700010203040506070001020304050607000102030405060700010203040506070001020304050607

Definition at line 3337 of file api.tcl.

Frame::FrameTag.Sequence.Get

Returns the FrameTag.Tx object related to the sequence number injection for this frame.

Each frame can be enabled to have a sequence number inserted into the frame.

The FrameTag.Tx object which is returned by this method represents the current configuration of the SequenceTag injection. This object can be used to configure the SequenceTag injection.

Warning
On older ByteBlower servers, this requires a lot of resources, so this option must be used with care.
Since
1.8.18
Returns
This method returns the FrameTag.Tx object for SequenceTag injection of this frame.
Example
1 $frame FrameTag.Sequence.Get

Returns:

<FrameTag.Tx object> 

Definition at line 3362 of file api.tcl.

Frame::FrameTag.Time.Get

Returns the FrameTag.Tx object related to the timestamp injection for this frame.

Each frame can be enabled to have a timestamp inserted into the frame.

The FrameTag.Tx object which is returned by this method represents the current configuration of the TimeTag injection. This object can be used to configure the TimeTag injection.

For more detailed information about Frame tagging, you can also take a look at ByteBlower API Knowledgebase: Background: Adding FrameTags to your ByteBlower frame - structure and behaviour

Warning
On older ByteBlower servers, this requires a lot of resources, so this option must be used with care.
Since
1.8.18
Returns
This method returns the FrameTag.Tx object for TimeTag injection of this frame.
Example

In this example, we will retrieve the FrameTag.Tx object for the TimeTag:

1 $frame FrameTag.Time.Get

Returns:

<FrameTag.Tx object> 

Definition at line 3384 of file api.tcl.

Frame::L3.Auto.Checksum.Enable   bool  

Enable or disable the automatic checksum calculation of the Layer3 header of this frame.

This method provides the possibility to automatically recalculate the Layer3 checksum. Currently, only IPv4 is supported ( IPv6 has no header checksum ). This calculation will be done at the server side, just before transmitting the frame.

By default, the Layer3 checksum will not be calculated automatically.

Warning
On the ByteBlower 1000 series, this feature requires a lot of resources.
Note
This features is especially handy when combining a frame with a modifier like the FrameSizeModifier or with a FrameTag. In such a situation, the length or content of the Frame will change each time the frame has been sent, so the checksum must be calculated at the server side.
Default value: Disabled
Exceptions
ByteBlower.Exception.InvalidValuewhen the value is not an integer or true or false
Parameters
bool
True or 1
will enable the automatic Layer3 checksum calculation.
False or 0
will enable the automatic Layer3 checksum calculation.
Example

This example will enable the automatic Layer3 checksum calculation:

1 $frame L3.Auto.Checksum.Enable true

This example will disable the automatic Layer3 checksum calculation:

1 $frame L3.Auto.Checksum.Enable false

Definition at line 3408 of file api.tcl.

Frame::L3.Auto.Checksum.Get

Method returning the current configuration of the automatic checksum calculation option.

This method returns the current configuration of the automatic Layer3 checksum calculation.

See Frame::L3.Auto.Checksum.Enable on how to enable this feature.

Default value: Disabled
Returns
True if enabled, False if disabled.
Example

This examples shows the result when the Layer3 automatic checksum calculation option is enabled:

1 $frame L3.Auto.Checksum.Get

Returns:

True 

Definition at line 3426 of file api.tcl.

Frame::L3.Auto.Length.Enable   bool  

Enable or disable the automatic Layer3 header length field calculation of this frame.

This method provides the possibility to automatically recalculate the Layer3 length field. This calculation will be done at the server side, just before transmitting the frame.

Default value: Disabled
Warning
On the ByteBlower 1000 series, this feature requires a lot of resources.
Note
This features is especially handy when combining a frame with a modifier like the FrameSizeModifier. In such a situation, the length of the Frame can change each time the frame has been sent, so the length field must be adapted at the server side.
Exceptions
ByteBlower.Exception.InvalidValuewhen the value is not an integer or true or false
Parameters
bool
True or 1
will enable the automatic Layer3 length field adaption.
False or 0
will enable the automatic Layer3 length field adaption.
Example

This example will enable the automatic Layer3 length field adaption:

1 $frame L3.Auto.Length.Enable true

This example will disable the automatic Layer3 length field adaption:

1 $frame L3.Auto.Length.Enable false

Definition at line 3447 of file api.tcl.

Frame::L3.Auto.Length.Get

Method returning the current configuration of the automatic Layer3 length field adaption option.

This method returns the current configuration of the automatic Layer3 length field adaption.

See Frame::L3.Auto.Length.Enable on how to enable this option.

Default value: Disabled
Returns
True if enabled, False if disabled.
Example

This examples shows the result when the automatic Layer3 length field adaption option is enabled:

1 $frame L3.Auto.Length.Get

Returns:

True 

Definition at line 3465 of file api.tcl.

Frame::L4.Auto.Checksum.Enable   bool  

Enable or disable the automatic Layer4 checksum calculation of this frame.

This method provides the possibility to automatically recalculate the Layer4 (UDP or TCP) checksum. This calculation will be done at the server side, just before transmitting the frame.

Default value: Disabled
Warning
On the ByteBlower 1000 series, this feature requires a lot of resources.
Note
This features is especially handy when combining a frame with a modifier like the FrameSizeModifier or FrameTag. In such a situation, the length or content of the Frame can change each time the frame has been sent, so the checksum must be recalculated at the server side.
Exceptions
ByteBlower.Exception.InvalidValuewhen the value is not an integer or true or false
Parameters
bool
True or 1
will enable the automatic Layer4 checksum calculation.
False or 0
will enable the automatic Layer4 checksum calculation.
Example

This example will enable the automatic Layer4 checksum calculation:

1 $frame L4.Auto.Checksum.Enable true

This example will disable the automatic Layer3 checksum calculation:

1 $frame L4.Auto.Checksum.Enable false

Definition at line 3487 of file api.tcl.

Frame::L4.Auto.Checksum.Get

Method returning the current configuration of the automatic Layer4 checksum recalculation option.

This method returns the current configuration of the automatic Layer4 checksum recalculation.

See Frame::L4.Auto.Checksum.Enable on how to enable this option.

Default value: Disabled
Returns
True if enabled, False if disabled.
Example

This examples shows the result when the automatic Layer4 checksum recalculation option is enabled:

1 $frame L4.Auto.Checksum.Get

Returns:

True 

Definition at line 3505 of file api.tcl.

Frame::L4.Auto.Length.Enable   bool  

Enable or disable the automatic Layer4 header length field calculation of this frame.

This method provides the possibility to automatically recalculate the Layer4 (UDP or TCP) length field. This calculation will be done at the server side, just before transmitting the frame.

Default value: Disabled
Warning
On the ByteBlower 1000 series, this feature requires a lot of resources.
Note
This features is especially handy when combining a frame with a modifier like the FrameSizeModifier. In such a situation, the length of the Frame can change each time the frame has been sent, so the length field must be adapted at the server side.
Exceptions
ByteBlower.Exception.InvalidValuewhen the value is not an integer or true or false
Parameters
bool
True or 1
will enable the automatic Layer4 length field adaption.
False or 0
will enable the automatic Layer4 length field adaption.
Example

This example will enable the automatic Layer4 length field adaption:

1 $frame L4.Auto.Length.Enable true

This example will disable the automatic Layer3 length field adaption:

1 $frame L4.Auto.Length.Enable false

Definition at line 3527 of file api.tcl.

Frame::L4.Auto.Length.Get

Method returning the current configuration of the automatic Layer4 length field adaption option.

This method returns the current configuration of the automatic Layer4 length field adaption.

See Frame::L4.Auto.Length.Enable on how to enable this option.

Default value: Disabled
Returns
True if enabled, False if disabled.
Example

This examples shows the result when the automatic Layer4 length field adaption option is enabled:

1 $frame L4.Auto.Length.Get

Returns:

True 

Definition at line 3545 of file api.tcl.

Frame::Modifier.Field.Add   type  

Adds a frame field modifier.

Since
2.3.0
Deprecated:
since 2.5.0, please use Modifier.Field.Incremental.Add or Modifier.Field.Random.Add
Parameters
typeThe field modifier type to add.
incremental
Send frames with incremental field value
random
Send frames with random field values
Returns
The frame field modifier.
incremental
A FrameFieldModifier.Incremental object.
random
A FrameFieldModifier.Random object.
Example

This example adds a random value frame field modifier.

1 $frame Modifier.Field.Add "random"

Returns:

<FrameFieldModifier.Random object> 

Definition at line 3563 of file api.tcl.

Frame::Modifier.Field.Get

Returns the active frame field modifier(s).

Since
2.3.0
Deprecated:
since 2.5.0, please use Modifier.Field.Incremental.Get or Modifier.Field.Random.Get
Returns
List of current frame field modifiers.
incremental
A FrameFieldModifier.Incremental object.
random
A FrameFieldModifier.Random object.
Example

This example retrieves the current applied field modifiers.

1 $frame Modifier.Field.Get

Returns:

[ <FrameFieldModifier.Incremental|FrameFieldModifier.Random object> ... ] 

Definition at line 3579 of file api.tcl.

Frame::Modifier.Field.Incremental.Add

Adds an incremental frame field modifier.

Since
2.5.0
Returns
The frame field modifier. A FrameFieldModifier.Incremental object.
Example

This example adds an incremental value frame field modifier.

1 $frame Modifier.Field.Incremental.Add

Returns:

<FrameFieldModifier.Incremental object> 

Definition at line 3593 of file api.tcl.

Frame::Modifier.Field.Incremental.Get

Returns the active incremental frame field modifier(s).

Since
2.5.0
Returns
List of current incremental frame field modifiers. A FrameFieldModifier.Incremental object.
Example

This example retrieves the current applied field modifiers.

1 $frame Modifier.Field.Incremental.Get

Returns:

[ <FrameFieldModifier.Incremental object> ... ] 

Definition at line 3607 of file api.tcl.

Frame::Modifier.Field.Random.Add

Adds a random frame field modifier.

Since
2.5.0
Returns
The frame field modifier. A FrameFieldModifier.Random object.
Example

This example adds a random value frame field modifier.

1 $frame Modifier.Field.Random.Add

Returns:

<FrameFieldModifier.Random object> 

Definition at line 3621 of file api.tcl.

Frame::Modifier.Field.Random.Get

Returns the active random frame field modifier(s).

Since
2.5.0
Returns
List of current random frame field modifiers. A FrameFieldModifier.Random object.
Example

This example retrieves the current applied field modifiers.

1 $frame Modifier.Field.Random.Get

Returns:

[ <FrameFieldModifier.Random object> ... ] 

Definition at line 3635 of file api.tcl.

Frame::Modifier.Get

Returns the active frame size modifier.

Deprecated:
since 2.3.0 This method is deprecated since the introduction of frame field modifiers. Please use Modifier.Size.Random.Get or Modifier.Size.Growing.Get instead.
Returns
Current frame size modifier.
growing
A FrameSizeModifier.Growing object.
random
A FrameSizeModifier.Random object.
Example

This example gets the current applied size modifier. E.g. the growing

1 $frame Modifier.Get

Returns:

<FrameSizeModifier.Growing object> 

Definition at line 3649 of file api.tcl.

Frame::Modifier.Set   type  

Sets a frame size modifier.

Deprecated:
since 2.3.0. This method is deprecated since the introduction of frame field modifiers. Please use Modifier.Size.Growing.Set or Modifier.Size.Random.Set instead.
Parameters
typeThe size modifier type to set.
growing
Grow frame size over time
random
Send frames with random sizes
Returns
The frame size modifier.
growing
A FrameSizeModifier.Growing object.
random
A FrameSizeModifier.Random object.
Example

This example sets a growing size frame modifier.

1 $frame Modifier.Set "growing"

Returns:

<FrameSizeModifier.Growing object> 

Definition at line 3665 of file api.tcl.

Frame::Modifier.Size.Get

Returns the active frame size modifier.

Since
2.3.0
Deprecated:
since 2.5.0, please use Modifier.Size.Growing.Get or Modifier.Size.Random.Get
Returns
Current frame size modifier.
growing
A FrameSizeModifier.Growing object.
random
A FrameSizeModifier.Random object.
Example

This example gets the current applied size modifier. E.g. the growing

1 $frame Modifier.Size.Get

Returns:

<FrameSizeModifier.Growing object> 

Definition at line 3681 of file api.tcl.

Frame::Modifier.Size.Growing.Get

Returns the active frame growing size modifier.

Since
2.5.0
Returns
Current frame size modifier. A FrameSizeModifier.Growing object.
Example

This example gets the current applied size modifier. E.g. the growing

1 $frame Modifier.Size.Growing.Get

Returns:

<FrameSizeModifier.Growing object> 

Definition at line 3695 of file api.tcl.

Frame::Modifier.Size.Growing.Set

Sets a growing frame size modifier.

Since
2.5.0
Returns
The frame size modifier. A FrameSizeModifier.Growing object.
Example

This example sets a growing size frame modifier.

1 $frame Modifier.Size.Growing.Set

Returns:

<FrameSizeModifier.Growing object> 

Definition at line 3709 of file api.tcl.

Frame::Modifier.Size.Random.Get

Returns the active frame random size modifier.

Since
2.5.0
Returns
Current frame size modifier. A FrameSizeModifier.Random object.
Example

This example gets the current applied size modifier. E.g. the random

1 $frame Modifier.Size.Growing.Get

Returns:

<FrameSizeModifier.Growing object> 

Definition at line 3723 of file api.tcl.

Frame::Modifier.Size.Random.Set

Sets a random frame size modifier.

Since
2.5.0
Returns
The frame size modifier. A FrameSizeModifier.Random object.
Example

This example sets a random size frame modifier.

1 $frame Modifier.Size.Random.Set

Returns:

<FrameSizeModifier.Random object> 

Definition at line 3737 of file api.tcl.

Frame::Modifier.Size.Set   type  

Sets a frame size modifier.

Parameters
typeThe size modifier type to set.
growing
Grow frame size over time
random
Send frames with random sizes
Since
2.3.0
Deprecated:
since 2.5.0, please use Modifier.Size.Growing.Set or Modifier.Size.Random.Set
Returns
The frame size modifier.
growing
A FrameSizeModifier.Growing object.
random
A FrameSizeModifier.Random object.
Example

This example sets a growing size frame modifier.

1 $frame Modifier.Size.Set "growing"

Returns:

<FrameSizeModifier.Growing object> 

Definition at line 3755 of file api.tcl.

Frame::Result.Clear

Resets the current transmit counters to zero.

Since
2.1.0
Example
1 frame Result.Clear

Definition at line 3772 of file api.tcl.

Frame::Result.Get

Returns the current transmit counters.

Returns
Example
1 $frame Result.Get

Returns:

<Tx.Frame.ResultSnapshot object> 

Definition at line 3784 of file api.tcl.

Frame::SequenceTag.Enable   bool  

This method will enable of disable the insertion of a sequence number in the Frame.

If enabled, a sequence number is inserted into each frame sent. The size and location of the sequence number depends on the ByteBlower server type, and the FrameTagMetrics.

Deprecated:
This method is deprecated since the introduction of the FrameTag.Tx object. See FrameTag.Sequence.Get for a better approach.
Exceptions
ByteBlower.Exception.InvalidValuewhen the value is not an integer or true or false
Parameters
bool
True or 1
will enable the SequenceTag.
False or 0
will disable the SequenceTag.
Default value: Disabled
Example

In this example, we will enable the sequence number in the frame:

1 $frame SequenceTag.Enable True

In this example, we will disable the sequence number in the frame:

1 $frame SequenceTag.Enable False

Definition at line 3810 of file api.tcl.

Frame::SequenceTag.Get

Indicates whether or not a sequence number will be added to each frame.

This method returns if a sequence number will be inserted when this Frame has been sent or not.

Deprecated:
This method is deprecated since the introduction of the FrameTag.Tx object. See FrameTag.Sequence.Get for a better approach.
Exceptions
ByteBlower.Exception.InvalidValuewhen the value is not an integer or true or false
Returns
Will return True if a SequenceTag is enabled, will return False if not.
Default value: Disabled
Example

In this example, the SequenceTag is enabled on the frame:

1 $frame SequenceTag.Get

Returns:

True 

In this example, the SequenceTag is disabled on the frame:

1 $frame SequenceTag.Get

Returns:

False 

Definition at line 3830 of file api.tcl.

Frame::TimeTag.Enable   bool  

This method will enable of disable the insertion of a timestamp in the Frame.

If enabled, a timestamp is inserted into each frame. The size and location of the timestamp depends on the ByteBlower server type, and the FrameTagMetrics.

Deprecated:
This method is deprecated since the introduction of the TimeTag object. See FrameTag.Time.Get for a better approach.
Exceptions
ByteBlower.Exception.InvalidValuewhen the value is not an integer or true or false
Parameters
bool
True or 1
will enable the TimeTag.
False or 0
will disable the TimeTag.
Example

In this example, we will enable the TimeTag in the frame:

1 $frame TimeTag.Enable true

In this example, we will disable the TimeTag in the frame:

1 $frame TimeTag.Enable false

Definition at line 3848 of file api.tcl.

Frame::TimeTag.Get

Indicates whether or not a time tag will be added to each frame.

This method returns if a timestamp will be inserted when this Frame has been sent or not.

Deprecated:
This method is deprecated since the introduction of the FrameTag.Tx object. See FrameTag.Time.Get for a better approach.
Default value: Disabled
Exceptions
ByteBlower.Exception.InvalidValuewhen the value is not an integer or true or false
Returns
Will return True if a TimeTag is enabled, will return False if not.
Example

In this example, the TimeTag is enabled on the frame:

1 $frame TimeTag.Get

Returns:

True 

In this example, the TimeTag is disabled on the frame:

1 $frame TimeTag.Get

Returns:

False 

Definition at line 3868 of file api.tcl.