WPILibC++ 2023.4.3-108-ge5452e3
SwapByteOrder.h File Reference
#include <cstddef>
#include <cstdint>
#include <type_traits>
#include <machine/endian.h>

Go to the source code of this file.

Namespaces

namespace  wpi
 
namespace  wpi::sys
 

Functions

uint16_t wpi::ByteSwap_16 (uint16_t value)
 ByteSwap_16 - This function returns a byte-swapped representation of the 16-bit argument. More...
 
uint32_t wpi::ByteSwap_32 (uint32_t value)
 This function returns a byte-swapped representation of the 32-bit argument. More...
 
uint64_t wpi::ByteSwap_64 (uint64_t value)
 This function returns a byte-swapped representation of the 64-bit argument. More...
 
unsigned char wpi::sys::getSwappedBytes (unsigned char C)
 
signed char wpi::sys::getSwappedBytes (signed char C)
 
char wpi::sys::getSwappedBytes (char C)
 
unsigned short wpi::sys::getSwappedBytes (unsigned short C)
 
signed short wpi::sys::getSwappedBytes (signed short C)
 
unsigned int wpi::sys::getSwappedBytes (unsigned int C)
 
signed int wpi::sys::getSwappedBytes (signed int C)
 
unsigned long wpi::sys::getSwappedBytes (unsigned long C)
 
signed long wpi::sys::getSwappedBytes (signed long C)
 
unsigned long long wpi::sys::getSwappedBytes (unsigned long long C)
 
signed long long wpi::sys::getSwappedBytes (signed long long C)
 
float wpi::sys::getSwappedBytes (float C)
 
double wpi::sys::getSwappedBytes (double C)
 
template<typename T >
std::enable_if_t< std::is_enum< T >::value, T > wpi::sys::getSwappedBytes (T C)
 
template<typename T >
void wpi::sys::swapByteOrder (T &Value)
 

Variables

constexpr bool wpi::sys::IsBigEndianHost = false
 
static const bool wpi::sys::IsLittleEndianHost = !IsBigEndianHost