BCNP 3.2.1
Batched Command Network Protocol
Loading...
Searching...
No Matches
bcnp::detail Namespace Reference

Type traits to detect container capabilities for packet storage. More...

Classes

struct  has_begin_end
 
struct  has_begin_end< T, std::void_t< decltype(std::declval< T >().begin()), decltype(std::declval< T >().end())> >
 
struct  has_clear
 
struct  has_clear< T, std::void_t< decltype(std::declval< T >().clear())> >
 
struct  has_push_back
 
struct  has_push_back< T, std::void_t< decltype(std::declval< T >().push_back(std::declval< typename T::value_type >()))> >
 
struct  has_reserve
 
struct  has_reserve< T, std::void_t< decltype(std::declval< T >().reserve(std::size_t{}))> >
 
struct  has_size
 
struct  has_size< T, std::void_t< decltype(std::declval< T >().size())> >
 
struct  has_subscript
 
struct  has_subscript< T, std::void_t< decltype(std::declval< T >()[std::size_t{}])> >
 

Functions

uint16_t LoadU16 (const uint8_t *p)
 
uint32_t LoadU32 (const uint8_t *p)
 
int16_t LoadS16 (const uint8_t *p)
 
int32_t LoadS32 (const uint8_t *p)
 
void StoreU16 (uint16_t v, uint8_t *p)
 
void StoreU32 (uint32_t v, uint8_t *p)
 
void StoreS16 (int16_t v, uint8_t *p)
 
void StoreS32 (int32_t v, uint8_t *p)
 
int32_t QuantizeFloat (float value, float scale)
 
float DequantizeFloat (int32_t fixed, float scale)
 

Detailed Description

Type traits to detect container capabilities for packet storage.

A valid packet storage must support all of the following. push_back(const T&) or push_back(T&&) size() -> size_type empty() -> bool clear() begin() / end() iterators operator[](size_type) -> T& reserve(size_type) (can be no-op for fixed storage)

Function Documentation

◆ DequantizeFloat()

float bcnp::detail::DequantizeFloat ( int32_t fixed,
float scale )
inline

Definition at line 96 of file message_types.h.

◆ LoadS16()

int16_t bcnp::detail::LoadS16 ( const uint8_t * p)
inline

Definition at line 60 of file message_types.h.

Here is the call graph for this function:

◆ LoadS32()

int32_t bcnp::detail::LoadS32 ( const uint8_t * p)
inline

Definition at line 64 of file message_types.h.

Here is the call graph for this function:

◆ LoadU16()

uint16_t bcnp::detail::LoadU16 ( const uint8_t * p)
inline

Definition at line 51 of file message_types.h.

Here is the caller graph for this function:

◆ LoadU32()

uint32_t bcnp::detail::LoadU32 ( const uint8_t * p)
inline

Definition at line 55 of file message_types.h.

Here is the caller graph for this function:

◆ QuantizeFloat()

int32_t bcnp::detail::QuantizeFloat ( float value,
float scale )
inline

Definition at line 88 of file message_types.h.

◆ StoreS16()

void bcnp::detail::StoreS16 ( int16_t v,
uint8_t * p )
inline

Definition at line 80 of file message_types.h.

Here is the call graph for this function:

◆ StoreS32()

void bcnp::detail::StoreS32 ( int32_t v,
uint8_t * p )
inline

Definition at line 84 of file message_types.h.

Here is the call graph for this function:

◆ StoreU16()

void bcnp::detail::StoreU16 ( uint16_t v,
uint8_t * p )
inline

Definition at line 68 of file message_types.h.

Here is the caller graph for this function:

◆ StoreU32()

void bcnp::detail::StoreU32 ( uint32_t v,
uint8_t * p )
inline

Definition at line 73 of file message_types.h.

Here is the caller graph for this function: