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

Classes

struct  eagine::msgbus::acceptor
 Interface for message bus connection acceptors. More...
 
struct  eagine::msgbus::acceptor_user
 Interface for classes that can use message bus connection acceptors. More...
 
class  eagine::msgbus::actor< N, Subscriber >
 Base class for message bus actors with fixed number of message handlers. More...
 
struct  eagine::msgbus::connection_factory
 Interface for message bus connection and acceptor factories. More...
 
class  eagine::msgbus::connection_setup
 Class setting up connections based from configuration. More...
 
struct  eagine::msgbus::connection_info
 Basic interface for retrieving message bus connection information. More...
 
struct  eagine::msgbus::connection
 Interface for message bus connections. More...
 
struct  eagine::msgbus::connection_user
 Interface for classes that can use message bus connections. More...
 
class  eagine::msgbus::context
 Class holding common message bus utility objects. More...
 
class  eagine::msgbus::direct_connection_state
 Common shared state for a direct connection. More...
 
class  eagine::msgbus::direct_connection_address
 Class acting as the "address" of a direct connection. More...
 
class  eagine::msgbus::direct_connection_info< Base >
 Implementation of the connection_info interface for direct connections. More...
 
class  eagine::msgbus::direct_client_connection
 Implementation of client-side direct connection. More...
 
class  eagine::msgbus::direct_server_connection
 Implementation of server-side direct connection. More...
 
class  eagine::msgbus::direct_acceptor
 Implementation of acceptor for direct connections. More...
 
class  eagine::msgbus::direct_connection_factory
 Implementation of connection_factory for direct connections. More...
 
class  eagine::msgbus::endpoint
 Message bus client endpoint that can send and receive messages. More...
 
class  eagine::msgbus::friend_of_endpoint
 Base for classes that need access to enpoint internal functionality. More...
 
class  eagine::msgbus::promise< T >
 Message bus promise class. More...
 
class  eagine::msgbus::future< T >
 Message bus future class. More...
 
class  eagine::msgbus::pending_promises< T >
 Class that makes new and tracks existing pending message bus promises. More...
 
struct  eagine::msgbus::message_handler_map< MemFuncConst >
 Represents a mapping from a message type id to member function constant. More...
 
struct  eagine::msgbus::static_message_handler_map< MessageId, MemFuncConst >
 Represents a mapping from a message type id to member function constant. More...
 
class  eagine::msgbus::loopback_connection
 Loopback implementation of connection. Used mainly for testing and development. More...
 
struct  eagine::msgbus::message_info
 Structure storing information about a sigle message bus message. More...
 
struct  eagine::msgbus::message_view
 Combines message information and a non-owning view to message content. More...
 
class  eagine::msgbus::stored_message
 Combines message information and an owned message content buffer. More...
 
class  eagine::msgbus::message_storage
 Class storing message bus messages. More...
 
class  eagine::msgbus::posix_mqueue
 Class wrapping a POSIX message queue. More...
 
class  eagine::msgbus::posix_mqueue_connection_info< Base >
 Implementation of the connection_info interface for POSIX queue connection. More...
 
class  eagine::msgbus::posix_mqueue_connection
 Implementation of connection on top of POSIX message queues. More...
 
class  eagine::msgbus::posix_mqueue_connector
 Implementation of connection on top of POSIX message queues. More...
 
class  eagine::msgbus::posix_mqueue_acceptor
 Implementation of acceptor on top of POSIX message queues. More...
 
class  eagine::msgbus::posix_mqueue_connection_factory
 Implementation of connection_factory for POSIX message queue connections. More...
 
class  eagine::msgbus::registry
 Class combining a local bus router and a set of endpoints. More...
 
struct  eagine::msgbus::remote_node_changes
 Class providin and manipulating information about remote node changes. More...
 
class  eagine::msgbus::remote_node_tracker
 Class tracking the state of remote message bus nodes. More...
 
class  eagine::msgbus::remote_host
 Class providing information about a remote host of bus nodes. More...
 
class  eagine::msgbus::remote_host_state
 Class manipulating information about a remote host of bus nodes. More...
 
class  eagine::msgbus::remote_instance
 Class providing information about a remote instance running bus nodes. More...
 
class  eagine::msgbus::remote_instance_state
 Class manipulating information about a remote instance running bus nodes. More...
 
class  eagine::msgbus::remote_node
 Class providing information about a remote bus node. More...
 
class  eagine::msgbus::remote_node_state
 Class manipulating information about a remote bus node. More...
 
class  eagine::msgbus::node_connection
 Class providing information about connection between bus nodes. More...
 
class  eagine::msgbus::node_connection_state
 Class manipulating information about connection between bus nodes. More...
 
class  eagine::msgbus::node_connections
 Class providing information about connections from the perspective of a node. More...
 
class  eagine::msgbus::router_address
 Class loading and managing message bus router address(es). More...
 
class  eagine::msgbus::service_composition< Base >
 Helper mixin class for message bus services composed of several parts. More...
 
struct  eagine::msgbus::service_interface
 Interface for message bus services. More...
 
class  eagine::msgbus::subscriber_base
 Base class for message bus subscribers. More...
 
class  eagine::msgbus::static_subscriber< N >
 Template for subscribers with predefined count of handled message types. More...
 
class  eagine::msgbus::subscriber
 Template for subscribers with variable count of handled message types. More...
 
struct  eagine::msgbus::router_topology_info
 Structure holding part of router connection topology information. More...
 
struct  eagine::msgbus::bridge_topology_info
 Structure holding part of bridge connection topology information. More...
 
struct  eagine::msgbus::endpoint_topology_info
 Structure holding part of endpoint connection topology information. More...
 

Macros

#define EAGINE_MSG_MAP(CLASS_ID, METHOD_ID, CLASS, METHOD)
 Constructs an instance of static message handler map. More...
 

Typedefs

template<connection_addr_kind Kind>
using eagine::msgbus::connection_addr_kind_tag = std::integral_constant< connection_addr_kind, Kind >
 Tag template alias for specifying connection address kind.
 
template<connection_protocol Proto>
using eagine::msgbus::connection_protocol_tag = std::integral_constant< connection_protocol, Proto >
 Tag template alias for specifying connection protocol kind. More...
 
using eagine::msgbus::stream_protocol_tag = connection_protocol_tag< connection_protocol::stream >
 Tag type for specifying stream connection protocols. More...
 
using eagine::msgbus::datagram_protocol_tag = connection_protocol_tag< connection_protocol::datagram >
 Tag type for specifying datagram connection protocols. More...
 
using eagine::msgbus::connection_kinds = bitfield< connection_kind >
 Alias for connection kind bitfield.
 
using eagine::msgbus::message_timestamp = std::chrono::steady_clock::time_point
 Alias for message timestamp type. More...
 
using eagine::msgbus::message_age = std::chrono::duration< float >
 Alias for message age type. More...
 
using eagine::msgbus::message_crypto_flags = bitfield< message_crypto_flag >
 Alias for message crypto flags bitfield.
 
using eagine::msgbus::ipv4_port = unsigned short int
 Alias for IPv4 port number value type.
 
using eagine::msgbus::default_serializer_backend = string_serializer_backend
 Alias for default serialization backend for bus messages. More...
 
using eagine::msgbus::default_deserializer_backend = string_deserializer_backend
 Alias for default deserialization backend for bus messages. More...
 
using eagine::msgbus::message_sequence_t = std::uint32_t
 Alias for message sequence number type.
 
using eagine::msgbus::verification_bits = bitfield< verification_bit >
 Alias for a bus message verification bitfield.
 

Enumerations

enum  eagine::msgbus::connection_addr_kind { eagine::msgbus::connection_addr_kind::none, eagine::msgbus::connection_addr_kind::filepath, eagine::msgbus::connection_addr_kind::ipv4 }
 Message bus connection address kind enumeration. More...
 
enum  eagine::msgbus::connection_protocol { eagine::msgbus::connection_protocol::stream, eagine::msgbus::connection_protocol::datagram, eagine::msgbus::connection_protocol::message }
 Message bus connection protocol. More...
 
enum  eagine::msgbus::connection_kind : std::uint8_t { eagine::msgbus::connection_kind::unknown, eagine::msgbus::connection_kind::in_process, eagine::msgbus::connection_kind::local_interprocess, eagine::msgbus::connection_kind::remote_interprocess }
 Message bus connection kind bits enumeration. More...
 
enum  eagine::msgbus::message_priority : std::uint8_t {
  eagine::msgbus::message_priority::idle, eagine::msgbus::message_priority::low, eagine::msgbus::message_priority::normal, eagine::msgbus::message_priority::high,
  eagine::msgbus::message_priority::critical
}
 Message priority enumeration. More...
 
enum  eagine::msgbus::message_crypto_flag : std::uint8_t { eagine::msgbus::message_crypto_flag::asymmetric, eagine::msgbus::message_crypto_flag::signed_header, eagine::msgbus::message_crypto_flag::signed_content }
 Message cryptography-related flag bits enumeration. More...
 
enum  eagine::msgbus::node_kind : std::uint8_t { eagine::msgbus::node_kind::unknown, eagine::msgbus::node_kind::endpoint, eagine::msgbus::node_kind::bridge, eagine::msgbus::node_kind::router }
 Message bus node kind enumeration. More...
 
enum  eagine::msgbus::remote_node_change : std::uint16_t {
  eagine::msgbus::remote_node_change::kind, eagine::msgbus::remote_node_change::host_id, eagine::msgbus::remote_node_change::host_info, eagine::msgbus::remote_node_change::build_info,
  eagine::msgbus::remote_node_change::endpoint_info, eagine::msgbus::remote_node_change::methods_added, eagine::msgbus::remote_node_change::methods_removed, eagine::msgbus::remote_node_change::started_responding,
  eagine::msgbus::remote_node_change::stopped_responding, eagine::msgbus::remote_node_change::hardware_config, eagine::msgbus::remote_node_change::sensor_values, eagine::msgbus::remote_node_change::connection_info,
  eagine::msgbus::remote_node_change::instance_id
}
 Enumeration of changes tracked about remote message bus nodes. More...
 
enum  eagine::msgbus::verification_bit : std::uint8_t {
  eagine::msgbus::verification_bit::source_id, eagine::msgbus::verification_bit::source_certificate, eagine::msgbus::verification_bit::source_private_key, eagine::msgbus::verification_bit::message_id,
  eagine::msgbus::verification_bit::message_content
}
 Bus message verification bits enumeration,. More...
 

Functions

static constexpr auto eagine::msgbus::is_special_message (message_id msg_id) noexcept
 Indicates if the specified message id denotes a special message bus message.
 
static constexpr auto eagine::msgbus::broadcast_endpoint_id () noexcept -> identifier_t
 Returns the special broadcase message bus endpoint id.
 
static auto eagine::msgbus::parse_ipv4_addr (string_view addr_str) -> std::tuple< std::string, ipv4_port >
 Parses a IPv4 hostname:port pair,.
 
template<typename T >
auto eagine::msgbus::default_serialize_buffer_for (const T &inst)
 Returns a suitable buffer for the serialization of the specified object.
 
template<typename Backend >
auto eagine::msgbus::serialize_message_header (message_id msg_id, const message_view &msg, Backend &backend) -> std::enable_if_t< std::is_base_of_v< serializer_backend, Backend >, serialization_errors >
 Serializes a bus message header with the specified serializer backend. More...
 
template<typename Backend >
auto eagine::msgbus::serialize_message (message_id msg_id, const message_view &msg, Backend &backend) -> std::enable_if_t< std::is_base_of_v< serializer_backend, Backend >, serialization_errors >
 Serializes a bus message with the specified serializer backend. More...
 
template<typename Backend >
auto eagine::msgbus::deserialize_message_header (identifier &class_id, identifier &method_id, stored_message &msg, Backend &backend) -> std::enable_if_t< std::is_base_of_v< deserializer_backend, Backend >, deserialization_errors >
 Deserializes a bus message header with the specified deserializer backend. More...
 
template<typename Backend >
auto eagine::msgbus::deserialize_message (identifier &class_id, identifier &method_id, stored_message &msg, Backend &backend) -> std::enable_if_t< std::is_base_of_v< deserializer_backend, Backend >, deserialization_errors >
 Deserializes a bus message with the specified deserializer backend. More...
 
template<typename Backend >
auto eagine::msgbus::deserialize_message (message_id &msg_id, stored_message &msg, Backend &backend) -> std::enable_if_t< std::is_base_of_v< deserializer_backend, Backend >, deserialization_errors >
 Deserializes a bus message with the specified deserializer backend. More...
 
auto eagine::msgbus::default_serialize_message_type (message_id msg_id, memory::block blk)
 Default-serializes the specified message id into a memory block. More...
 
auto eagine::msgbus::default_deserialize_message_type (message_id &msg_id, memory::const_block blk)
 Default-deserializes the specified message id from a memory block. More...
 

Variables

constexpr const span_size_t eagine::msgbus::min_connection_data_size
 The minimum guaranteed block size that can be sent through bus connections.
 

Detailed Description

Macro Definition Documentation

◆ EAGINE_MSG_MAP

Typedef Documentation

◆ connection_protocol_tag

template<connection_protocol Proto>
using eagine::msgbus::connection_protocol_tag = typedef std::integral_constant<connection_protocol, Proto>

Tag template alias for specifying connection protocol kind.

See also
stream_protocol_tag
datagram_protocol_tag

◆ datagram_protocol_tag

Tag type for specifying datagram connection protocols.

See also
stream_protocol_tag

◆ default_deserializer_backend

Alias for default deserialization backend for bus messages.

See also
default_serializer_backend

◆ default_serializer_backend

Alias for default serialization backend for bus messages.

See also
default_deserializer_backend

◆ message_age

using eagine::msgbus::message_age = typedef std::chrono::duration<float>

Alias for message age type.

See also
message_timestamp

◆ message_timestamp

using eagine::msgbus::message_timestamp = typedef std::chrono::steady_clock::time_point

Alias for message timestamp type.

See also
message_age

◆ stream_protocol_tag

Tag type for specifying stream connection protocols.

See also
datagram_protocol_tag

Enumeration Type Documentation

◆ connection_addr_kind

Message bus connection address kind enumeration.

See also
connection_addr_kind_tag
Enumerator
none 

No public address.

filepath 

Filesystem path.

ipv4 

PIv4 address.

◆ connection_kind

enum eagine::msgbus::connection_kind : std::uint8_t
strong

Message bus connection kind bits enumeration.

See also
connection_kinds
Enumerator
unknown 

Unknown connection kind.

in_process 

In-process connection (cannot be used for inter-process communication).

local_interprocess 

Inter-process connection for local communication.

remote_interprocess 

Inter-process connection for remote communucation.

◆ connection_protocol

Message bus connection protocol.

See also
connection_protocol_tag
Enumerator
stream 

Reliable stream protocol.

datagram 

Datagram protocol.

message 

Message protocol.

◆ message_crypto_flag

enum eagine::msgbus::message_crypto_flag : std::uint8_t
strong

Message cryptography-related flag bits enumeration.

See also
message_crypto_flags
Enumerator
asymmetric 

Assymetric cipher is used (symmetric otherwise).

signed_header 

The message header is signed.

signed_content 

The message content is signed.

◆ message_priority

enum eagine::msgbus::message_priority : std::uint8_t
strong

Message priority enumeration.

Enumerator
idle 

Idle, sent only when no messages with higher priority are enqueued.

low 

Low message priority.

normal 

Normal, default message priority.

high 

High, sent before messages with lower priority.

critical 

Critical, sent as soon as possible.

◆ node_kind

enum eagine::msgbus::node_kind : std::uint8_t
strong

Message bus node kind enumeration.

Enumerator
unknown 

Unknown node kind.

endpoint 

Message bus client endpoint.

bridge 

Message bus bridge.

router 

Message bus router.

◆ remote_node_change

enum eagine::msgbus::remote_node_change : std::uint16_t
strong

Enumeration of changes tracked about remote message bus nodes.

See also
remote_node_changes
Enumerator
kind 

The node kind has appeared or changed.

See also
node_kind
host_id 

The host identifier has appeared or changed.

host_info 

The host information has appeared or changed.

build_info 

The build information has appeared or changed.

endpoint_info 

The endpoint information has appeared or changed.

methods_added 

New remotly callable methods have been added.

methods_removed 

New remotly callable methods have been removed.

started_responding 

Node started responding to pings.

stopped_responding 

Node stopped responding to pings.

hardware_config 

The hardware configuration information has appeared or changed.

sensor_values 

New sensor values have appeared or changed.

connection_info 

The bus connection information has appeared or changed.

instance_id 

The endpoint instance id has changed.

◆ verification_bit

enum eagine::msgbus::verification_bit : std::uint8_t
strong

Bus message verification bits enumeration,.

See also
verification_bits
Enumerator
source_id 

The source has been verified.

source_certificate 

The source certificate has been verified.

source_private_key 

The source private key has been verified.

message_id 

The message type id has been verified.

message_content 

The message content has been verified.

Function Documentation

◆ default_deserialize_message_type()

auto eagine::msgbus::default_deserialize_message_type ( message_id msg_id,
memory::const_block  blk 
)
inline

Default-deserializes the specified message id from a memory block.

See also
default_deserializer_backend
default_deserialize
message_id

◆ default_serialize_message_type()

auto eagine::msgbus::default_serialize_message_type ( message_id  msg_id,
memory::block  blk 
)
inline

Default-serializes the specified message id into a memory block.

See also
default_serializer_backend
default_serialize
message_id

◆ deserialize_message() [1/2]

template<typename Backend >
auto eagine::msgbus::deserialize_message ( identifier class_id,
identifier method_id,
stored_message msg,
Backend &  backend 
) -> std::enable_if_t< std::is_base_of_v<deserializer_backend, Backend>, deserialization_errors>

Deserializes a bus message with the specified deserializer backend.

See also
deserialize_message_header
serialize_message
default_deserialize

Referenced by eagine::msgbus::deserialize_message().

◆ deserialize_message() [2/2]

template<typename Backend >
auto eagine::msgbus::deserialize_message ( message_id msg_id,
stored_message msg,
Backend &  backend 
) -> std::enable_if_t< std::is_base_of_v<deserializer_backend, Backend>, deserialization_errors>

Deserializes a bus message with the specified deserializer backend.

See also
deserialize_message_header
serialize_message

◆ deserialize_message_header()

template<typename Backend >
auto eagine::msgbus::deserialize_message_header ( identifier class_id,
identifier method_id,
stored_message msg,
Backend &  backend 
) -> std::enable_if_t< std::is_base_of_v<deserializer_backend, Backend>, deserialization_errors>

Deserializes a bus message header with the specified deserializer backend.

See also
deserialize_message
serialize_message_header

Referenced by eagine::msgbus::deserialize_message().

◆ serialize_message()

template<typename Backend >
auto eagine::msgbus::serialize_message ( message_id  msg_id,
const message_view msg,
Backend &  backend 
) -> std::enable_if_t< std::is_base_of_v<serializer_backend, Backend>, serialization_errors>

Serializes a bus message with the specified serializer backend.

See also
serialize_message_header
deserialize_message
default_serialize

Referenced by eagine::msgbus::posix_mqueue_connection::send().

◆ serialize_message_header()

template<typename Backend >
auto eagine::msgbus::serialize_message_header ( message_id  msg_id,
const message_view msg,
Backend &  backend 
) -> std::enable_if_t< std::is_base_of_v<serializer_backend, Backend>, serialization_errors>

Serializes a bus message header with the specified serializer backend.

See also
serialize_message
deserialize_message_header

Referenced by eagine::msgbus::serialize_message().


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