| USRP Hardware Driver and Device Manual Version: 4.10.0.0 UHD and USRP Manual |

Loading...
Searching...
No Matches
uhd::rfnoc::chdr::strc_payload Class Reference

`#include <uhd/rfnoc/chdr_types.hpp>`

## Public Member Functions
| strc_payload ()=default
| strc_payload (const strc_payload &rhs)=default
| strc_payload (strc_payload &&rhs)=default
strc_payload & | operator= (const strc_payload &rhs)=default
void | populate_header (chdr_header &header) const
| Populate the header for this type of packet.
size_t | serialize (uint64_t *buff, size_t max_size_bytes, const std::function< uint64_t(uint64_t)> &conv_byte_order) const
| Serialize the payload to a uint64_t buffer.
template<endianness_t endianness>
size_t | serialize (uint64_t *buff, size_t max_size_bytes) const
| Serialize the payload to a uint64_t buffer (no conversion function).
void | deserialize (const uint64_t *buff, size_t buff_size, const std::function< uint64_t(uint64_t)> &conv_byte_order)
template<endianness_t endianness>
void | deserialize (const uint64_t *buff, size_t buff_size)
size_t | get_length () const
| Get the serialized size of this payload in 64 bit words.
bool | operator== (const strc_payload &rhs) const
| Comparison operator (==).
bool | operator!= (const strc_payload &rhs) const
| Comparison operator (!=).
std::string | to_string () const
| Return a string representation of this object.

## Public Attributes
uint16_t | src_epid = 0
| The source EPID for the stream (16 bits).
strc_op_code_t | op_code = STRC_INIT
| Operation code for the command (4 bits).
uint8_t | op_data = 0
| Data associated with the operation (4 bits).
uint64_t | num_pkts = 0
| Number of packets to use for operation (40 bits).
uint64_t | num_bytes = 0
| Number of bytes to use for operation (64 bits).

## Static Public Attributes
static constexpr size_t | MAX_PACKET_SIZE = 128
| Worst-case size of a strc packet (including header).

## Constructor & Destructor Documentation

## ◆ strc_payload() [1/3]

uhd::rfnoc::chdr::strc_payload::strc_payload | ( |  | ) |
| default

## ◆ strc_payload() [2/3]

uhd::rfnoc::chdr::strc_payload::strc_payload | ( | const strc_payload & | rhs | ) |
| default

## ◆ strc_payload() [3/3]

uhd::rfnoc::chdr::strc_payload::strc_payload | ( | strc_payload && | rhs | ) |
| default

## Member Function Documentation

## ◆ deserialize() [1/2]

template<endianness_t endianness>

void uhd::rfnoc::chdr::strc_payload::deserialize | ( | const uint64_t * | buff,
|  | size_t | buff_size )
| inline

Deserialize the payload from a uint64_t buffer (no conversion function)

Parameters

  buff | Buffer to deserialize the payload from
  buff_size | Number of elements in the buffer

## ◆ deserialize() [2/2]

void uhd::rfnoc::chdr::strc_payload::deserialize | ( | const uint64_t * | buff,
|  | size_t | buff_size,
|  | const std::function< uint64_t(uint64_t)> & | conv_byte_order )

Deserialize the payload from a uint64_t buffer

Parameters

  buff | Buffer to deserialize the payload from
  buff_size | Number of elements in the buffer
  conv_byte_order | Byte order converter function (buffer to host endianness)

## ◆ get_length()

size_t uhd::rfnoc::chdr::strc_payload::get_length | ( |  | ) | const

Get the serialized size of this payload in 64 bit words.

## ◆ operator!=()

bool uhd::rfnoc::chdr::strc_payload::operator!= | ( | const strc_payload & | rhs | ) | const
| inline

Comparison operator (!=).

## ◆ operator=()

strc_payload & uhd::rfnoc::chdr::strc_payload::operator= | ( | const strc_payload & | rhs | ) |
| default

## ◆ operator==()

bool uhd::rfnoc::chdr::strc_payload::operator== | ( | const strc_payload & | rhs | ) | const

Comparison operator (==).

## ◆ populate_header()

void uhd::rfnoc::chdr::strc_payload::populate_header | ( | chdr_header & | header | ) | const

Populate the header for this type of packet.

## ◆ serialize() [1/2]

template<endianness_t endianness>

size_t uhd::rfnoc::chdr::strc_payload::serialize | ( | uint64_t * | buff,
|  | size_t | max_size_bytes ) const
| inline

Serialize the payload to a uint64_t buffer (no conversion function).

## ◆ serialize() [2/2]

size_t uhd::rfnoc::chdr::strc_payload::serialize | ( | uint64_t * | buff,
|  | size_t | max_size_bytes,
|  | const std::function< uint64_t(uint64_t)> & | conv_byte_order ) const

Serialize the payload to a uint64_t buffer.

## ◆ to_string()

std::string uhd::rfnoc::chdr::strc_payload::to_string | ( |  | ) | const

Return a string representation of this object.

## Member Data Documentation

## ◆ MAX_PACKET_SIZE

size_t uhd::rfnoc::chdr::strc_payload::MAX_PACKET_SIZE = 128
| static constexpr

Worst-case size of a strc packet (including header).

## ◆ num_bytes

uint64_t uhd::rfnoc::chdr::strc_payload::num_bytes = 0

Number of bytes to use for operation (64 bits).

## ◆ num_pkts

uint64_t uhd::rfnoc::chdr::strc_payload::num_pkts = 0

Number of packets to use for operation (40 bits).

## ◆ op_code

strc_op_code_t uhd::rfnoc::chdr::strc_payload::op_code = STRC_INIT

Operation code for the command (4 bits).

## ◆ op_data

uint8_t uhd::rfnoc::chdr::strc_payload::op_data = 0

Data associated with the operation (4 bits).

## ◆ src_epid

uint16_t uhd::rfnoc::chdr::strc_payload::src_epid = 0

The source EPID for the stream (16 bits).

The documentation for this class was generated from the following file:

- chdr_types.hpp