CommRaT 2.0.0
C++20 Real-Time Messaging Framework
Loading...
Searching...
No Matches
commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes > Struct Template Reference

Centralized type computation for Module class. More...

#include <commrat/module/traits/module_types.hpp>

Public Types

using OutputSpec = NormalizeOutput_t< OutputSpec_ >
 
using InputSpec = NormalizeInput_t< InputSpec_ >
 
using InputTypesTuple = typename ExtractInputTypes< InputSpec >::type
 
using PrimaryPayloadType = typename ExtractPrimaryPayloadHelper< CommandTypes... >::type
 
using OutputTypesTuple = typename ::commrat::OutputTypesTuple< OutputSpec >::type
 
using CommandTuple = std::tuple< CommandTypes... >
 
using MailboxSetTuple = typename MakeMailboxSetTuple< UserRegistry, OutputTypesTuple, CommandTypes... >::type
 
using CombinedCmdTypes = decltype(std::tuple_cat(std::declval< CommandTuple >(), std::declval< OutputTypesTuple >()))
 
using CmdMailbox = typename MakeTypedCmdMailboxWithSend< UserRegistry, CommandTuple, OutputTypesTuple >::type
 
using WorkMailbox = RegistryMailbox< SystemRegistry >
 
using PublishMailbox = typename MakeTypedCmdMailbox< UserRegistry, OutputTypesTuple >::type
 
using DataTypesTuple = typename ExtractDataTypes< InputSpec >::type
 
using DataMailbox = typename MakeTypedDataMailbox< UserRegistry, DataTypesTuple >::type
 
using OutputData = typename ExtractOutputPayload< OutputSpec >::type
 
using InputData = typename ExtractInputPayload< InputSpec >::type
 

Static Public Attributes

static constexpr size_t InputCount = std::tuple_size_v<InputTypesTuple>
 
static constexpr bool has_multi_input = InputCount > 1
 
static constexpr bool has_primary_input_spec = HasPrimaryInputHelper<CommandTypes...>::value
 
static constexpr size_t num_output_types = std::tuple_size_v<OutputTypesTuple>
 
static constexpr bool has_multi_output = OutputCount_v<OutputSpec> > 1
 
static constexpr size_t num_command_types = sizeof...(CommandTypes)
 
static constexpr bool use_mailbox_sets = (num_output_types > 1)
 
static constexpr bool has_continuous_input = HasContinuousInput<InputSpec>
 
static constexpr bool has_periodic_input = std::is_same_v<InputSpec, PeriodicInput>
 
static constexpr bool has_loop_input = std::is_same_v<InputSpec, LoopInput>
 

Detailed Description

template<typename UserRegistry, typename OutputSpec_, typename InputSpec_, typename... CommandTypes>
struct commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >

Centralized type computation for Module class.

This struct computes all derived types needed by Module at compile time, extracting the complex metaprogramming logic from the Module class itself.

Template Parameters
UserRegistryThe application's MessageRegistry
OutputSpec_User-provided output specification (normalized internally)
InputSpec_User-provided input specification (normalized internally)
CommandTypesOptional command types this module handles

Definition at line 153 of file module_types.hpp.

Member Typedef Documentation

◆ CmdMailbox

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
using commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::CmdMailbox = typename MakeTypedCmdMailboxWithSend<UserRegistry, CommandTuple, OutputTypesTuple>::type

Definition at line 190 of file module_types.hpp.

◆ CombinedCmdTypes

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
using commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::CombinedCmdTypes = decltype(std::tuple_cat( std::declval<CommandTuple>(), std::declval<OutputTypesTuple>() ))

Definition at line 183 of file module_types.hpp.

◆ CommandTuple

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
using commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::CommandTuple = std::tuple<CommandTypes...>

Definition at line 173 of file module_types.hpp.

◆ DataMailbox

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
using commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::DataMailbox = typename MakeTypedDataMailbox<UserRegistry, DataTypesTuple>::type

Definition at line 195 of file module_types.hpp.

◆ DataTypesTuple

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
using commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::DataTypesTuple = typename ExtractDataTypes<InputSpec>::type

Definition at line 194 of file module_types.hpp.

◆ InputData

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
using commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::InputData = typename ExtractInputPayload<InputSpec>::type

Definition at line 199 of file module_types.hpp.

◆ InputSpec

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
using commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::InputSpec = NormalizeInput_t<InputSpec_>

Definition at line 156 of file module_types.hpp.

◆ InputTypesTuple

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
using commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::InputTypesTuple = typename ExtractInputTypes<InputSpec>::type

Definition at line 159 of file module_types.hpp.

◆ MailboxSetTuple

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
using commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::MailboxSetTuple = typename MakeMailboxSetTuple<UserRegistry, OutputTypesTuple, CommandTypes...>::type

Definition at line 180 of file module_types.hpp.

◆ OutputData

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
using commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::OutputData = typename ExtractOutputPayload<OutputSpec>::type

Definition at line 198 of file module_types.hpp.

◆ OutputSpec

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
using commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::OutputSpec = NormalizeOutput_t<OutputSpec_>

Definition at line 155 of file module_types.hpp.

◆ OutputTypesTuple

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
using commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::OutputTypesTuple = typename ::commrat::OutputTypesTuple<OutputSpec>::type

Definition at line 168 of file module_types.hpp.

◆ PrimaryPayloadType

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
using commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::PrimaryPayloadType = typename ExtractPrimaryPayloadHelper<CommandTypes...>::type

Definition at line 165 of file module_types.hpp.

◆ PublishMailbox

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
using commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::PublishMailbox = typename MakeTypedCmdMailbox<UserRegistry, OutputTypesTuple>::type

Definition at line 192 of file module_types.hpp.

◆ WorkMailbox

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
using commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::WorkMailbox = RegistryMailbox<SystemRegistry>

Definition at line 191 of file module_types.hpp.

Member Data Documentation

◆ has_continuous_input

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
constexpr bool commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::has_continuous_input = HasContinuousInput<InputSpec>
staticconstexpr

Definition at line 202 of file module_types.hpp.

◆ has_loop_input

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
constexpr bool commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::has_loop_input = std::is_same_v<InputSpec, LoopInput>
staticconstexpr

Definition at line 204 of file module_types.hpp.

◆ has_multi_input

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
constexpr bool commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::has_multi_input = InputCount > 1
staticconstexpr

Definition at line 161 of file module_types.hpp.

◆ has_multi_output

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
constexpr bool commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::has_multi_output = OutputCount_v<OutputSpec> > 1
staticconstexpr

Definition at line 170 of file module_types.hpp.

◆ has_periodic_input

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
constexpr bool commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::has_periodic_input = std::is_same_v<InputSpec, PeriodicInput>
staticconstexpr

Definition at line 203 of file module_types.hpp.

◆ has_primary_input_spec

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
constexpr bool commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::has_primary_input_spec = HasPrimaryInputHelper<CommandTypes...>::value
staticconstexpr

Definition at line 164 of file module_types.hpp.

◆ InputCount

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
constexpr size_t commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::InputCount = std::tuple_size_v<InputTypesTuple>
staticconstexpr

Definition at line 160 of file module_types.hpp.

◆ num_command_types

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
constexpr size_t commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::num_command_types = sizeof...(CommandTypes)
staticconstexpr

Definition at line 174 of file module_types.hpp.

◆ num_output_types

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
constexpr size_t commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::num_output_types = std::tuple_size_v<OutputTypesTuple>
staticconstexpr

Definition at line 169 of file module_types.hpp.

◆ use_mailbox_sets

template<typename UserRegistry , typename OutputSpec_ , typename InputSpec_ , typename... CommandTypes>
constexpr bool commrat::module_traits::ModuleTypes< UserRegistry, OutputSpec_, InputSpec_, CommandTypes >::use_mailbox_sets = (num_output_types > 1)
staticconstexpr

Definition at line 177 of file module_types.hpp.


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