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

eagine::msgbus Namespace Reference

Message bus code is placed in this namespace. More...

Classes

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

Typedefs

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

Enumerations

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

Functions

static constexpr auto is_special_message (message_id msg_id) noexcept
 Indicates if the specified message id denotes a special message bus message.
 
static constexpr auto broadcast_endpoint_id () noexcept -> identifier_t
 Returns the special broadcase message bus endpoint id.
 
static auto parse_ipv4_addr (string_view addr_str) -> std::tuple< std::string, ipv4_port >
 Parses a IPv4 hostname:port pair,.
 
template<typename T >
auto default_serialize_buffer_for (const T &inst)
 Returns a suitable buffer for the serialization of the specified object.
 
template<typename Backend >
auto 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 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 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 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 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...
 
template<typename T >
auto default_serialize (T &value, memory::block blk) -> serialization_result< memory::const_block >
 Uses the default backend to serialize a value into a memory block. More...
 
template<typename T >
auto default_serialize_packed (T &value, memory::block blk, data_compressor compressor) -> serialization_result< memory::const_block >
 Uses backend and compressor to serialize and pack a value into a memory block. More...
 
auto default_serialize_message_type (message_id msg_id, memory::block blk)
 Default-serializes the specified message id into a memory block. More...
 
template<typename T >
auto default_deserialize (T &value, memory::const_block blk) -> deserialization_result< memory::const_block >
 Uses the default backend to deserialize a value from a memory block. More...
 
template<typename T >
auto default_deserialize_packed (T &value, memory::const_block blk, data_compressor compressor) -> deserialization_result< memory::const_block >
 Uses backend and compressor to deserialize and unpack a value from a block. More...
 
auto 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 min_connection_data_size
 The minimum guaranteed block size that can be sent through bus connections.
 

Detailed Description

Message bus code is placed in this namespace.

Function Documentation

◆ default_deserialize()

template<typename T >
auto eagine::msgbus::default_deserialize ( T &  value,
memory::const_block  blk 
) -> deserialization_result<memory::const_block>
inline

Uses the default backend to deserialize a value from a memory block.

See also
default_deserializer_backend
default_deserialize_packed
default_serialize
deserialize

Referenced by default_deserialize_message_type().

◆ default_deserialize_packed()

template<typename T >
auto eagine::msgbus::default_deserialize_packed ( T &  value,
memory::const_block  blk,
data_compressor  compressor 
) -> deserialization_result<memory::const_block>
inline

Uses backend and compressor to deserialize and unpack a value from a block.

See also
default_deserializer_backend
default_deserialize
default_serialize_packed
data_compressor
deserialize

◆ default_serialize()

template<typename T >
auto eagine::msgbus::default_serialize ( T &  value,
memory::block  blk 
) -> serialization_result<memory::const_block>
inline

Uses the default backend to serialize a value into a memory block.

See also
default_serializer_backend
default_serialize_packed
default_deserialize
serialize

Referenced by default_serialize_message_type().

◆ default_serialize_packed()

template<typename T >
auto eagine::msgbus::default_serialize_packed ( T &  value,
memory::block  blk,
data_compressor  compressor 
) -> serialization_result<memory::const_block>
inline

Uses backend and compressor to serialize and pack a value into a memory block.

See also
default_serializer_backend
default_serialize
default_deserialize_packed
data_compressor
serialize

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