Structure storing information about a sigle message bus message. More...
#include <eagine/message_bus/message.hpp>
Public Types | |
using | sequence_t = message_sequence_t |
Alias for the sequence number type. More... | |
using | hop_count_t = std::int8_t |
Alias for type used to store the message hop count. | |
using | age_t = std::int8_t |
Alias for type used to store the message age in quarter seconds. | |
Public Member Functions | |
auto | too_many_hops () const noexcept -> bool |
Indicates that the message made too many hops. More... | |
auto | add_hop () noexcept -> auto & |
Increments the hop counter. More... | |
auto | too_old () const noexcept -> bool |
Indicates that the message is too old. More... | |
auto | add_age (message_age age) noexcept -> auto & |
Adds to the age seconds counter. More... | |
auto | age () const noexcept -> message_age |
Returns the message age. More... | |
auto | set_priority (message_priority new_priority) noexcept -> auto & |
Sets the priority of this message. | |
auto | set_source_id (identifier_t id) noexcept -> auto & |
Sets the source endpoint identifier. | |
auto | set_target_id (identifier_t id) noexcept -> auto & |
Sets the target endpoint identifier. | |
auto | has_serializer_id (identifier id) const noexcept -> bool |
Tests if a data serializer with the specified id was used. More... | |
auto | set_serializer_id (identifier id) noexcept -> auto & |
Sets the id of the used data content serializer. More... | |
auto | set_sequence_no (message_sequence_t no) noexcept -> auto & |
Sets the sequence number of this message (has message-type specific meaning). More... | |
auto | setup_response (const message_info &info) noexcept -> auto & |
Sets the target id to be the source id from info, copies sequence number. More... | |
Public Attributes | |
identifier_t | source_id |
Returns the source endpoint identifier. More... | |
identifier_t | target_id |
Returns the target endpoint identifier. More... | |
identifier_t | serializer_id |
Returns the identifier of the used serializer. More... | |
sequence_t | sequence_no |
The message sequence number. More... | |
hop_count_t | hop_count |
The message hop counter. More... | |
age_t | age_quarter_seconds |
The message age in quarter seconds. More... | |
message_priority | priority |
The message priority. More... | |
message_crypto_flags | crypto_flags |
The message cryptography flags. | |
Structure storing information about a sigle message bus message.
Alias for the sequence number type.
|
inlinenoexcept |
|
inlinenoexcept |
Increments the hop counter.
|
inlinenoexcept |
|
inlinenoexcept |
Tests if a data serializer with the specified id was used.
|
inlinenoexcept |
Sets the sequence number of this message (has message-type specific meaning).
|
inlinenoexcept |
Sets the id of the used data content serializer.
|
inlinenoexcept |
Sets the target id to be the source id from info, copies sequence number.
|
inlinenoexcept |
|
inlinenoexcept |
age_t eagine::msgbus::message_info::age_quarter_seconds |
hop_count_t eagine::msgbus::message_info::hop_count |
The message hop counter.
Referenced by too_many_hops().
message_priority eagine::msgbus::message_info::priority |
The message priority.
Referenced by set_priority(), setup_response(), and too_old().
sequence_t eagine::msgbus::message_info::sequence_no |
The message sequence number.
Referenced by set_sequence_no(), and setup_response().
identifier_t eagine::msgbus::message_info::serializer_id |
Returns the identifier of the used serializer.
Referenced by has_serializer_id(), and set_serializer_id().
identifier_t eagine::msgbus::message_info::source_id |
Returns the source endpoint identifier.
Referenced by set_source_id().
identifier_t eagine::msgbus::message_info::target_id |
Returns the target endpoint identifier.
Referenced by set_target_id(), and setup_response().