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

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

Collaboration diagram for uhd::rfnoc::chdr::ctrl_payload:
[legend]

## Public Member Functions

| ctrl_payload ()=default
| ctrl_payload (const ctrl_payload &rhs)=default
| ctrl_payload (ctrl_payload &&rhs)=default
ctrl_payload & | operator= (const ctrl_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 | has_timestamp () const
bool | operator== (const ctrl_payload &rhs) const
| Comparison operator (==).
bool | operator!= (const ctrl_payload &rhs) const
| Comparison operator (!=).
std::string | to_string () const
| Return a string representation of this object.

## Public Attributes

uint16_t | dst_port = 0
| Destination port for transaction (10 bits).
uint16_t | src_port = 0
| Source port for transaction (10 bits).
uint8_t | seq_num = 0
| Sequence number (6 bits).
boost::optional< uint64_t > | timestamp = boost::none
| Has Time Flag (1 bit) and timestamp (64 bits).
bool | is_ack = false
| Is Acknowledgment Flag (1 bit).
uint16_t | src_epid = 0
| Source endpoint ID of transaction (16 bits).
uint32_t | address = 0
| Address for transaction (20 bits).
std::vector< uint32_t > | data_vtr = {0}
| Data for transaction (vector of 32 bits).
uint8_t | byte_enable = 0xF
| Byte-enable mask for transaction (4 bits).
ctrl_opcode_t | op_code = OP_SLEEP
| Operation code (4 bits).
ctrl_status_t | status = CMD_OKAY
| Transaction status (4 bits).

## Constructor & Destructor Documentation

## ctrl_payload() [1/3]

uhd::rfnoc::chdr::ctrl_payload::ctrl_payload | ( |  | ) |

default

## ctrl_payload() [2/3]

uhd::rfnoc::chdr::ctrl_payload::ctrl_payload | ( | const ctrl_payload & | rhs | ) |

default

## ctrl_payload() [3/3]

uhd::rfnoc::chdr::ctrl_payload::ctrl_payload | ( | ctrl_payload && | rhs | ) |

default

## Member Function Documentation

## deserialize() [1/2]

template<endianness_t endianness>

void uhd::rfnoc::chdr::ctrl_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::ctrl_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::ctrl_payload::get_length | ( |  | ) | const

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

## has_timestamp()

bool uhd::rfnoc::chdr::ctrl_payload::has_timestamp | ( |  | ) | const

inline

## operator!=()

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

inline

Comparison operator (!=).

## operator=()

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

default

## operator==()

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

Comparison operator (==).

## populate_header()

void uhd::rfnoc::chdr::ctrl_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::ctrl_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::ctrl_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::ctrl_payload::to_string | ( |  | ) | const

Return a string representation of this object.

## Member Data Documentation

## address

uint32_t uhd::rfnoc::chdr::ctrl_payload::address = 0

Address for transaction (20 bits).

## byte_enable

uint8_t uhd::rfnoc::chdr::ctrl_payload::byte_enable = 0xF

Byte-enable mask for transaction (4 bits).

## data_vtr

std::vector<uint32_t> uhd::rfnoc::chdr::ctrl_payload::data_vtr = {0}

Data for transaction (vector of 32 bits).

## dst_port

uint16_t uhd::rfnoc::chdr::ctrl_payload::dst_port = 0

Destination port for transaction (10 bits).

## is_ack

bool uhd::rfnoc::chdr::ctrl_payload::is_ack = false

Is Acknowledgment Flag (1 bit).

## op_code

ctrl_opcode_t uhd::rfnoc::chdr::ctrl_payload::op_code = OP_SLEEP

Operation code (4 bits).

## seq_num

uint8_t uhd::rfnoc::chdr::ctrl_payload::seq_num = 0

Sequence number (6 bits).

## src_epid

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

Source endpoint ID of transaction (16 bits).

## src_port

uint16_t uhd::rfnoc::chdr::ctrl_payload::src_port = 0

Source port for transaction (10 bits).

## status

ctrl_status_t uhd::rfnoc::chdr::ctrl_payload::status = CMD_OKAY

Transaction status (4 bits).

## timestamp

boost::optional<uint64_t> uhd::rfnoc::chdr::ctrl_payload::timestamp = boost::none

Has Time Flag (1 bit) and timestamp (64 bits).

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

- chdr_types.hpp