USRP Hardware Driver and Device Manual  Version: 4.10.0.0-0-g2af4ddb9
UHD and USRP Manual
byteswap.hpp File Reference
#include <uhd/config.hpp>
#include <uhd/types/endianness.hpp>
#include <stdint.h>
#include <uhd/utils/byteswap.ipp>

Go to the source code of this file.

Namespaces

 uhd
 

Functions

uint16_t uhd::byteswap (uint16_t)
 perform a byteswap on a 16 bit integer More...
 
uint32_t uhd::byteswap (uint32_t)
 perform a byteswap on a 32 bit integer More...
 
uint64_t uhd::byteswap (uint64_t)
 perform a byteswap on a 64 bit integer More...
 
template<typename T >
uhd::ntohx (T)
 network to host: short, long, or long-long More...
 
template<typename T >
uhd::htonx (T)
 host to network: short, long, or long-long More...
 
template<typename T >
uhd::wtohx (T)
 worknet to host: short, long, or long-long More...
 
template<typename T >
uhd::htowx (T)
 host to worknet: short, long, or long-long More...
 
template<endianness_t endianness, typename T >
uhd::htolx (T num)
 Host to link with configurable endianness (16-bit, 32-bit, or 64-bit). More...
 
template<endianness_t endianness, typename T >
uhd::ltohx (T num)
 Link with configurable endianness to host (16-bit, 32-bit, or 64-bit). More...
 

Detailed Description

Provide fast byteswapping routines for 16, 32, and 64 bit integers, by using the system's native routines/intrinsics when available.