PS_PAYLOAD

code: 180

# set
<module-index>/<port-index> PS_PAYLOAD [<stream_index>] <payload_type> <hex_data>

# get
<module-index>/<port-index> PS_PAYLOAD [<stream_index>] ?

Description

The payload content of the packets transmitted for a stream. The payload portion of a packet starts after the header and continues up until the test payload or the frame checksum. The payload may vary in length and is filled with either an incrementing sequence of byte values or a repeated multi-byte pattern. Length variation complements and is independent of the content variation produced by header modifiers.

Actions

set, get

Parameters

  1. payload_type: byte, the type of payload content

  • PATTERN = 0, a pattern is repeated up through the packet.

  • INC8 = INCREMENTING = 1, Incrementing Byte, 8-bit value, bytes are incremented up through the packet.

  • PRBS = 2, bytes are randomized from packet to packet.

  • RANDOM = 3, a randomly generated pattern.

  • DEC8 = DECREMENTING = 4, Decrementing Byte, 8-bit value, bytes are decremented up through the packet.

  • INC16 = 5, Incrementing Word, 16-bit value, bytes are incremented up through the packet.

  • DEC16 = 6, Decrementing Word, 16-bit value, bytes are decremented up through the packet.

  1. hex_data: hex list, a pattern of bytes to be repeated. The maximum length of the pattern is 18 bytes. Only used if the type is set to PATTERN.

Important

The payload randomization feature has a limitation when utilizing either the PRBS or RANDOM modes. In these cases, the port initiates a process where it adds padding to the header portion in order to make it a multiple of 8 bytes. Subsequently, the remainder of the payload after this padding is randomized. This padding process employs a straightforward incrementing pattern, resulting in a set of fixed bytes following the header in each packet. An illustrative example of this limitation is presented below. Following the IP header, you will observe the initial 6 bytes of the payload, represented as 22 23 24 25 26 27 (incrementing), serving as the padding. Following the padding section, the payload undergoes randomization.

../../../../../_images/randomized_payload_limitation.png

Example

# set
input:  0/1 PS_PAYLOAD [0] PATTERN 0x000102030405060708090A0B0C0D0E0F
output: <OK>

# get
input:  0/1 PS_PAYLOAD [0] ?
output: 0/1 PS_PAYLOAD [0] PATTERN 0x000102030405060708090A0B0C0D0E0F