OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::msgbus::message_info Struct Reference

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.
 

Detailed Description

Structure storing information about a sigle message bus message.

See also
message_view
stored_message

Member Typedef Documentation

◆ sequence_t

Alias for the sequence number type.

See also
set_sequence_no

Member Function Documentation

◆ add_age()

auto eagine::msgbus::message_info::add_age ( message_age  age) -> auto&
inlinenoexcept

Adds to the age seconds counter.

See also
age
too_old

◆ add_hop()

auto eagine::msgbus::message_info::add_hop ( ) -> auto&
inlinenoexcept

Increments the hop counter.

See also
hop_count
too_many_hops

◆ age()

auto eagine::msgbus::message_info::age ( ) const -> message_age
inlinenoexcept

Returns the message age.

See also
too_old
add_age

Referenced by add_age().

◆ has_serializer_id()

auto eagine::msgbus::message_info::has_serializer_id ( identifier  id) const -> bool
inlinenoexcept

Tests if a data serializer with the specified id was used.

See also
serializer_id
set_serializer_id

◆ set_sequence_no()

auto eagine::msgbus::message_info::set_sequence_no ( message_sequence_t  no) -> auto&
inlinenoexcept

Sets the sequence number of this message (has message-type specific meaning).

See also
sequence_no

◆ set_serializer_id()

auto eagine::msgbus::message_info::set_serializer_id ( identifier  id) -> auto&
inlinenoexcept

Sets the id of the used data content serializer.

See also
serializer_id
has_serializer_id

◆ setup_response()

auto eagine::msgbus::message_info::setup_response ( const message_info info) -> auto&
inlinenoexcept

Sets the target id to be the source id from info, copies sequence number.

See also
source_id
target_id
sequence_no

◆ too_many_hops()

auto eagine::msgbus::message_info::too_many_hops ( ) const -> bool
inlinenoexcept

Indicates that the message made too many hops.

See also
hop_count
add_hop

◆ too_old()

auto eagine::msgbus::message_info::too_old ( ) const -> bool
inlinenoexcept

Indicates that the message is too old.

See also
age
add_age

Member Data Documentation

◆ age_quarter_seconds

age_t eagine::msgbus::message_info::age_quarter_seconds

The message age in quarter seconds.

See also
age
add_age
too_old Accumulated time the message spent in various queues.

Referenced by add_age(), age(), setup_response(), and too_old().

◆ hop_count

hop_count_t eagine::msgbus::message_info::hop_count

The message hop counter.

See also
add_hop
too_many_hops Counts how many times the message passed through a router or a bridge.

Referenced by too_many_hops().

◆ priority

message_priority eagine::msgbus::message_info::priority

The message priority.

See also
set_priority

Referenced by set_priority(), setup_response(), and too_old().

◆ sequence_no

sequence_t eagine::msgbus::message_info::sequence_no

The message sequence number.

See also
set_sequence_no

Referenced by set_sequence_no(), and setup_response().

◆ serializer_id

identifier_t eagine::msgbus::message_info::serializer_id

Returns the identifier of the used serializer.

See also
set_serializer_id
has_serializer_id

Referenced by has_serializer_id(), and set_serializer_id().

◆ source_id

identifier_t eagine::msgbus::message_info::source_id

Returns the source endpoint identifier.

See also
target_id
set_source_id

Referenced by set_source_id().

◆ target_id

identifier_t eagine::msgbus::message_info::target_id

Returns the target endpoint identifier.

See also
source_id
set_target_id

Referenced by set_target_id(), and setup_response().


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

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).