USRP Hardware Driver and USRP Manual  Version: 4.4.0.HEAD-0-g5fac246b
UHD and USRP Manual
uhd::rfnoc::chdr::ctrl_payload Class Reference

#include <uhd/rfnoc/chdr_types.hpp>

Public Member Functions

 ctrl_payload ()=default
 
 ctrl_payload (const ctrl_payload &rhs)=default
 
 ctrl_payload (ctrl_payload &&rhs)=default
 
ctrl_payloadoperator= (const ctrl_payload &rhs)=default
 
void populate_header (chdr_header &header) const
 Populate the header for this type of packet. More...
 
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. More...
 
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) More...
 
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. More...
 
bool has_timestamp () const
 
bool operator== (const ctrl_payload &rhs) const
 Comparison operator (==) More...
 
bool operator!= (const ctrl_payload &rhs) const
 Comparison operator (!=) More...
 
const std::string to_string () const
 Return a string representation of this object. More...
 

Public Attributes

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

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
buffBuffer to deserialize the payload from
buff_sizeNumber 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
buffBuffer to deserialize the payload from
buff_sizeNumber of elements in the buffer
conv_byte_orderByte 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()

const 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: