emlabcpp
modern opinionated embedded C++ library
emlabcpp::protocol::serializer< T, Endianess > Struct Template Reference

#include <serializer.h>

Public Types

using size_type = bounded< std::size_t, max_size, max_size >
 

Static Public Member Functions

static constexpr auto & bget (auto &buffer, std::size_t const i)
 
static constexpr void serialize_at (std::span< std::byte, max_size > buffer, T item)
 
static constexpr T deserialize (std::span< std::byte const, max_size > const &buffer)
 

Static Public Attributes

static constexpr std::size_t max_size = sizeof( T )
 
static constexpr bool is_big_endian = Endianess == std::endian::big
 

Member Typedef Documentation

◆ size_type

template<base_type T, std::endian Endianess>
using emlabcpp::protocol::serializer< T, Endianess >::size_type = bounded< std::size_t, max_size, max_size >

Member Function Documentation

◆ bget()

template<base_type T, std::endian Endianess>
static constexpr auto& emlabcpp::protocol::serializer< T, Endianess >::bget ( auto &  buffer,
std::size_t const  i 
)
inlinestaticconstexpr

◆ deserialize()

template<base_type T, std::endian Endianess>
static constexpr T emlabcpp::protocol::serializer< T, Endianess >::deserialize ( std::span< std::byte const, max_size > const &  buffer)
inlinestaticconstexpr

◆ serialize_at()

template<base_type T, std::endian Endianess>
static constexpr void emlabcpp::protocol::serializer< T, Endianess >::serialize_at ( std::span< std::byte, max_size buffer,
item 
)
inlinestaticconstexpr

Member Data Documentation

◆ is_big_endian

template<base_type T, std::endian Endianess>
constexpr bool emlabcpp::protocol::serializer< T, Endianess >::is_big_endian = Endianess == std::endian::big
staticconstexpr

◆ max_size

template<base_type T, std::endian Endianess>
constexpr std::size_t emlabcpp::protocol::serializer< T, Endianess >::max_size = sizeof( T )
staticconstexpr

The documentation for this struct was generated from the following file: