emlabcpp
modern opinionated embedded C++ library
|
Command group represents a segment in the message, that may contain multiple different variants of value, that are identified by ID at the beginning of the segment. More...
#include <command_group.h>
Public Types | |
using | id_type = decltype(ID) |
using | value_type = std::tuple< tag< ID >, typename proto_traits< Defs >::value_type... > |
using | def_type = std::tuple< tag< ID >, Defs... > |
template<typename... NewDefs> | |
using | with_args = command< ID, Defs..., NewDefs... > |
Static Public Member Functions | |
constexpr static value_type | make_val (typename proto_traits< Defs >::value_type const &... args) |
Creates value of the command based on the args. More... | |
Static Public Attributes | |
static constexpr id_type | id = ID |
Command group represents a segment in the message, that may contain multiple different variants of value, that are identified by ID at the beginning of the segment.
The ID is defined in the definition. This simulates abstraction of set of commands that can be sent
that is frequently used by embedded devices. One command in a group defined by ID and definitions for items contained in this command. It is preferable to use the command::with_args<...>
alias that just extens the list of defined items in the command. For example: command<32>::with_args<uint32_t, uint32_t> Internally, the example leads to definition std::tuple< tag<32>, uint32_t, uint32_t >
using emlabcpp::protocol::command< ID, Defs >::def_type = std::tuple< tag< ID >, Defs... > |
using emlabcpp::protocol::command< ID, Defs >::id_type = decltype( ID ) |
using emlabcpp::protocol::command< ID, Defs >::value_type = std::tuple< tag< ID >, typename proto_traits< Defs >::value_type... > |
using emlabcpp::protocol::command< ID, Defs >::with_args = command< ID, Defs..., NewDefs... > |
|
inlinestaticconstexpr |
Creates value of the command based on the args.
References emlabcpp::args.
|
staticconstexpr |