CommRaT
2.0.0
C++20 Real-Time Messaging Framework
Loading...
Searching...
No Matches
message_schema.hpp
Go to the documentation of this file.
1
16
#pragma once
17
18
#include "
commrat/messages.hpp
"
19
#include <sertial/core/layout/struct_layout.hpp>
20
#include <rfl.hpp>
21
#include <string_view>
22
#include <cstdint>
23
24
namespace
commrat
{
25
50
template
<
typename
PayloadT,
typename
Registry>
51
struct
MessageSchema
{
61
struct
CommRaTMetadata
{
62
uint32_t
message_id
= Registry::template get_message_id<PayloadT>();
63
std::string
payload_type
= rfl::type_name_t<PayloadT>().str();
64
std::string
full_type
= rfl::type_name_t<TimsMessage<PayloadT>>().str();
65
size_t
max_message_size
= Registry::max_message_size;
66
std::string
registry_name
= rfl::type_name_t<Registry>().str();
67
};
68
69
CommRaTMetadata
commrat
;
70
sertial::StructLayout<TimsMessage<PayloadT>>
layout
;
71
};
72
73
}
// namespace commrat
messages.hpp
commrat
CommRaT - Modern C++ Real-Time Communication Framework.
commrat::MessageSchema::CommRaTMetadata
CommRaT-specific metadata (compile-time constants)
Definition
message_schema.hpp:61
commrat::MessageSchema::CommRaTMetadata::registry_name
std::string registry_name
Definition
message_schema.hpp:66
commrat::MessageSchema::CommRaTMetadata::payload_type
std::string payload_type
Definition
message_schema.hpp:63
commrat::MessageSchema::CommRaTMetadata::max_message_size
size_t max_message_size
Definition
message_schema.hpp:65
commrat::MessageSchema::CommRaTMetadata::full_type
std::string full_type
Definition
message_schema.hpp:64
commrat::MessageSchema::CommRaTMetadata::message_id
uint32_t message_id
Definition
message_schema.hpp:62
commrat::MessageSchema
Complete schema for a CommRaT message type.
Definition
message_schema.hpp:51
commrat::MessageSchema::commrat
CommRaTMetadata commrat
Definition
message_schema.hpp:69
commrat::MessageSchema::layout
sertial::StructLayout< TimsMessage< PayloadT > > layout
Definition
message_schema.hpp:70
commrat
introspection
message_schema.hpp
Generated by
1.9.8