emlabcpp
modern opinionated embedded C++ library
|
Handler for serialization and extraction of datatypes used by the register_map. More...
#include <register_handler.h>
Public Types | |
using | map_type = Map |
using | key_type = typename map_type::key_type |
using | message_type = typename map_type::message_type |
template<key_type Key> | |
using | reg_value_type = typename map_type::template reg_value_type< Key > |
template<key_type Key> | |
using | reg_def_type = typename map_type::template reg_def_type< Key > |
Static Public Member Functions | |
template<key_type Key> | |
static message_type | serialize (reg_value_type< Key > val) |
static message_type | select (map_type const &m, key_type key) |
template<key_type Key> | |
static std::variant< reg_value_type< Key >, error_record > | extract (view< std::byte const * > const &msg) |
static std::optional< error_record > | insert (map_type &m, key_type key, view< std::byte const * > const &buff) |
Static Public Attributes | |
static constexpr std::size_t | max_size = map_type::max_value_size |
Handler for serialization and extraction of datatypes used by the register_map.
This provides interface for handling conversion of bytes to types used in the map. serialize
and extract
works directly with the types used by the map, based on compile time key. select
and insert
works with the map itself based on runtime information.
using emlabcpp::protocol::register_handler< Map >::key_type = typename map_type::key_type |
using emlabcpp::protocol::register_handler< Map >::map_type = Map |
using emlabcpp::protocol::register_handler< Map >::message_type = typename map_type::message_type |
using emlabcpp::protocol::register_handler< Map >::reg_def_type = typename map_type::template reg_def_type< Key > |
using emlabcpp::protocol::register_handler< Map >::reg_value_type = typename map_type::template reg_value_type< Key > |
|
inlinestatic |
References emlabcpp::view< Iterator, EndIterator >::begin(), emlabcpp::protocol::deserialize(), emlabcpp::bounded_view< Iterator, SizeType >::make(), emlabcpp::protocol::max_size, emlabcpp::min(), emlabcpp::res, emlabcpp::view< Iterator, EndIterator >::size(), emlabcpp::protocol::SIZE_ERR, and emlabcpp::view_n().
|
inlinestatic |
References emlabcpp::match(), and emlabcpp::res.
|
inlinestatic |
|
inlinestatic |
|
staticconstexpr |