USRP Hardware Driver and USRP Manual Version: 4.1.0.3
UHD and USRP Manual
uhd::transport::vrt::chdr Namespace Reference

CHDR related function. More...

Functions

UHD_API void if_hdr_pack_be (uint32_t *packet_buff, if_packet_info_t &if_packet_info)
 
UHD_API void if_hdr_unpack_be (const uint32_t *packet_buff, if_packet_info_t &if_packet_info)
 
UHD_API void if_hdr_pack_le (uint32_t *packet_buff, if_packet_info_t &if_packet_info)
 
UHD_API void if_hdr_unpack_le (const uint32_t *packet_buff, if_packet_info_t &if_packet_info)
 

Detailed Description

CHDR related function.

See CHDR for details on the CHDR protocol.

All packers take the host format into account. Choose the _le functions if the transport uses little endian format (e.g. PCIe) and the _be functions if the transport uses big endian format (e.g. Ethernet).

Note 1: All packers assume there to be enough space at the address provided by packet_buff. See also Packing contract.

Note 2: All these packers assume the following options without checking them:

  • if_packet_info.link_type == LINK_TYPE_CHDR
  • if_packet_info.has_cid == false
  • if_packet_info.has_sid == true
  • if_packet_info.has_tsi == false
  • if_packet_info.has_tlr == false This relaxes some of Packing contract, but adds the additional constraint that the input data must be CHDR.

In the unpacker, these values will be set accordingly.

Function Documentation

◆ if_hdr_pack_be()

UHD_API void uhd::transport::vrt::chdr::if_hdr_pack_be ( uint32_t *  packet_buff,
if_packet_info_t if_packet_info 
)

Pack a CHDR header from metadata (big endian format).

See Packing contract, but link_type is assumed to be LINK_TYPE_CHDR.

Parameters
packet_buffmemory to write the packed vrt header
if_packet_infothe if packet info (read/write)

◆ if_hdr_pack_le()

UHD_API void uhd::transport::vrt::chdr::if_hdr_pack_le ( uint32_t *  packet_buff,
if_packet_info_t if_packet_info 
)

Pack a CHDR header from metadata (little endian format).

See Packing contract, but link_type is assumed to be LINK_TYPE_CHDR.

Parameters
packet_buffmemory to write the packed vrt header
if_packet_infothe if packet info (read/write)

◆ if_hdr_unpack_be()

UHD_API void uhd::transport::vrt::chdr::if_hdr_unpack_be ( const uint32_t *  packet_buff,
if_packet_info_t if_packet_info 
)

Unpack a CHDR header to metadata (big endian format).

See Unpacking contract, but link_type is assumed to be LINK_TYPE_CHDR.

Parameters
packet_buffmemory to read the packed vrt header
if_packet_infothe if packet info (read/write)

◆ if_hdr_unpack_le()

UHD_API void uhd::transport::vrt::chdr::if_hdr_unpack_le ( const uint32_t *  packet_buff,
if_packet_info_t if_packet_info 
)

Unpack a CHDR header to metadata (little endian format).

See Unpacking contract, but link_type is assumed to be LINK_TYPE_CHDR.

Parameters
packet_buffmemory to read the packed vrt header
if_packet_infothe if packet info (read/write)