163 template <
typename ImplT, SecurityType SecT>
361 void set_property(
const std::string& prop,
const std::string& value);
369 [[nodiscard]] std::string
get_property(
const std::string& prop)
const;
387 [[nodiscard]]
const std::string&
get_url()
const;
581 template <
typename CallbackT,
typename... ArgsT>
584 template <
typename TypeT>
Tiny mix-in that exposes the backend-native handle behind a node.
Definition: node_impl.h:123
Fixed-size 128-byte buffer holder with SBO, five ownership modes and integrated codecs.
Definition: bytes.h:120
Copyable type-erased callable analogue of std::function with a tunable SBO and pool spill.
Definition: functional.h:132
Serial task dispatcher with selectable queue backend and bounded timer registry.
Definition: message_loop.h:131
Function< void(const Status::BasePtr &ptr)> StatusCallback
Callback fired on DDS-family status notifications (e.g. deadline missed).
Definition: node_impl.h:178
Transport-agnostic CRTP base for all VLink communication primitives.
Definition: node.h:164
void set_property(const std::string &prop, const std::string &value)
Sets a transport-specific string-keyed property.
Definition: node-inl.h:163
void set_ser_type(const std::string &ser_type, SchemaType schema_type=SchemaType::kUnknown)
Overrides the runtime wire-metadata identifiers for this node.
Definition: node-inl.h:193
bool attach(class MessageLoop *message_loop)
Attaches the node to a MessageLoop for callback dispatch.
Definition: node-inl.h:133
SchemaType get_schema_type() const
Returns the current coarse schema family.
Definition: node-inl.h:263
virtual void interrupt()
Aborts any blocking wait on this node.
Definition: node-inl.h:91
bool enable_security(const Security::Config &cfg)
Installs a Security configuration before transport initialisation.
Definition: node-inl.h:331
bool has_inited() const
Reports whether init() has been successfully called.
Definition: node-inl.h:96
bool resume()
Resumes message delivery after a prior suspend().
Definition: node-inl.h:123
const std::string & get_ser_type() const
Returns the current concrete runtime type identifier.
Definition: node-inl.h:258
std::unique_ptr< ImplT > impl_
Definition: node.h:593
void invoke_callback(const CallbackT &callback, ArgsT &&... args)
Definition: node-inl.h:355
void set_safety_quit(bool safety_quit)
Enables or disables safe-quit mode.
Definition: node-inl.h:303
bool is_support_loan() const
Reports whether the transport supports zero-copy loaned buffers.
Definition: node-inl.h:101
bool get_discovery_enabled() const
Reports whether peer-discovery is currently enabled.
Definition: node-inl.h:279
bool suspend()
Suspends message delivery on this node.
Definition: node-inl.h:118
virtual bool init()
Initialises the node and its transport back-end.
Definition: node-inl.h:40
std::optional< std::mutex > quit_mtx_
Definition: node.h:591
void set_record_path(const std::string &path)
Enables recording of inbound or outbound messages to a bag file.
Definition: node-inl.h:183
void register_status_handler(StatusCallback &&callback)
Registers a handler invoked whenever the node's status changes.
Definition: node-inl.h:158
bool is_suspend() const
Reports whether the node is currently suspended.
Definition: node-inl.h:128
bool is_support_loan_
Definition: node.h:588
virtual bool deinit()
Tears the node down and releases all transport resources.
Definition: node-inl.h:66
const std::string & get_url() const
Returns the URL string used to construct this node.
Definition: node-inl.h:178
virtual ~Node()
Definition: node-inl.h:326
void bind_proto_arena(void *proto_arena)
Binds a Protobuf Arena for arena-allocated message objects.
Definition: node-inl.h:284
bool get_safety_quit() const
Reports whether safe-quit mode is currently active.
Definition: node-inl.h:298
TypeT get_default_value()
Definition: node-inl.h:371
std::atomic_bool has_inited_
Definition: node.h:590
class MessageLoop * get_message_loop() const
Returns the MessageLoop this node is currently attached to.
Definition: node-inl.h:143
Bytes loan(int64_t size)
Allocates a loaned buffer from the transport memory pool.
Definition: node-inl.h:106
void * proto_arena_
Definition: node.h:587
const AbstractNode * get_abstract_node() const
Returns the abstract-graph handle for runtime topology inspection.
Definition: node-inl.h:148
double get_cpu_usage() const
Returns the cumulative CPU-usage ratio sampled by the profiler.
Definition: node-inl.h:289
bool detach()
Detaches the node from its current MessageLoop.
Definition: node-inl.h:138
std::string get_property(const std::string &prop) const
Retrieves a previously set transport-specific property value.
Definition: node-inl.h:168
Status::BasePtr get_status(Status::Type type) const
Retrieves the current status object for the requested category.
Definition: node-inl.h:153
TransportType get_transport_type() const
Returns the TransportType this node is bound to.
Definition: node-inl.h:173
void set_discovery_enabled(bool enable)
Toggles peer-discovery on this node.
Definition: node-inl.h:268
bool return_loan(const Bytes &bytes)
Returns a previously loaned buffer to the transport pool.
Definition: node-inl.h:113
Node()
Definition: node-inl.h:321
void set_ssl_options(const SslOptions &options)
Configures transport-layer SSL/TLS encryption for this node.
Definition: node-inl.h:316
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174
Type
Discriminator that identifies the concrete Base subclass carried by an event.
Definition: status.h:118
std::shared_ptr< Status::Base > BasePtr
Shared-pointer alias used as the parameter type of every status callback.
Definition: status.h:251
SchemaType
Coarse runtime schema family used by discovery, bag metadata and proxy routing.
Definition: types.h:203
@ kUnknown
Decoding family unknown.
TransportType
Enumeration of every transport backend recognised by VLink.
Definition: types.h:126
Foundational base classes shared by every transport-backed VLink node.
Application-layer authenticated encryption with symmetric, hybrid asymmetric, and pluggable backends.
Aggregate of every parameter accepted by the Security constructor.
Definition: security.h:164
Aggregate of SSL / TLS settings for transport-layer encryption.
Definition: ssl_options.h:119