CommRaT 2.0.0
C++20 Real-Time Messaging Framework
Loading...
Searching...
No Matches
commrat.hpp
Go to the documentation of this file.
1#pragma once
2
16// Core framework components
17#include "commrat/messages.hpp"
29
46namespace commrat {
47
110template<typename... MessageDefs>
111class CommRaT : public MessageRegistry<MessageDefs...> {
112private:
113 using Registry = MessageRegistry<MessageDefs...>;
114
115public:
116 // Inherit all registry functionality
121 using Registry::visit;
122 using Registry::dispatch;
124
125 // Expose payload types tuple for introspection
127
159 template<typename OutputSpec_, typename InputSpec_, typename... CommandTypes>
160 using Module = commrat::Module<Registry, OutputSpec_, InputSpec_, CommandTypes...>;
161
188 template<typename PayloadT>
190
223 template<std::size_t HistorySize>
225
264};
265
266} // namespace commrat
CommRaT Application Template - Main User-Facing Interface.
Definition commrat.hpp:111
typename Registry::PayloadTypes payload_types
Definition commrat.hpp:126
Mailbox with timestamped history for getData synchronization.
Compile-time message type registry using MessageDefinition templates.
static auto serialize(T &message)
Serialize a message with automatic type registration check.
static bool dispatch(uint32_t msg_id, std::span< const std::byte > data, Callback &&callback)
Deserialize message by ID and dispatch to callback.
static constexpr bool is_registered
Check if a payload type is registered.
static constexpr uint32_t get_message_id()
Get the message ID for a given payload type.
static bool visit(uint32_t msg_id, std::span< const std::byte > data, Visitor &&visitor)
Visit a message by its message ID using a visitor.
typename ExtractPayloads< ProcessedDefs >::PayloadTypes PayloadTypes
static auto deserialize(std::span< const std::byte > data)
Deserialize a message with known type at compile time.
Timestamp Management Architecture.
Mailbox that takes a MessageRegistry and exposes payload-only interface.
Registry-wide introspection and schema export.
Input/Output specifications for multi-I/O modules.
Simplified message definition helpers.
CommRaT - Modern C++ Real-Time Communication Framework.
Registry-wide introspection and schema export.
Type-restricted mailbox with optimized buffer sizing (Phase 7)