163 template <
typename ImplT, SecurityType SecT>
359 void set_property(
const std::string& prop,
const std::string& value);
367 [[nodiscard]] std::string
get_property(
const std::string& prop)
const;
385 [[nodiscard]]
const std::string&
get_url()
const;
578 template <
typename CallbackT,
typename... ArgsT>
581 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:126
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:159
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:189
bool attach(class MessageLoop *message_loop)
Attaches the node to a MessageLoop for callback dispatch.
Definition: node-inl.h:124
SchemaType get_schema_type() const
Returns the current coarse schema family.
Definition: node-inl.h:259
virtual void interrupt()
Aborts any blocking wait on this node.
Definition: node-inl.h:139
bool enable_security(const Security::Config &cfg)
Installs a Security configuration before transport initialisation.
Definition: node-inl.h:327
bool has_inited() const
Reports whether init() has been successfully called.
Definition: node-inl.h:87
bool resume()
Resumes message delivery after a prior suspend().
Definition: node-inl.h:114
const std::string & get_ser_type() const
Returns the current concrete runtime type identifier.
Definition: node-inl.h:254
std::unique_ptr< ImplT > impl_
Definition: node.h:590
void invoke_callback(const CallbackT &callback, ArgsT &&... args)
Definition: node-inl.h:351
void set_safety_quit(bool safety_quit)
Enables or disables safe-quit mode.
Definition: node-inl.h:299
bool is_support_loan() const
Reports whether the transport supports zero-copy loaned buffers.
Definition: node-inl.h:92
bool get_discovery_enabled() const
Reports whether peer-discovery is currently enabled.
Definition: node-inl.h:275
bool suspend()
Suspends message delivery on this node.
Definition: node-inl.h:109
virtual bool init()
Initialises the node and its transport back-end.
Definition: node-inl.h:39
std::optional< std::mutex > quit_mtx_
Definition: node.h:588
void set_record_path(const std::string &path)
Enables recording of inbound or outbound messages to a bag file.
Definition: node-inl.h:179
void register_status_handler(StatusCallback &&callback)
Registers a handler invoked whenever the node's status changes.
Definition: node-inl.h:154
bool is_suspend() const
Reports whether the node is currently suspended.
Definition: node-inl.h:119
bool is_support_loan_
Definition: node.h:585
virtual bool deinit()
Tears the node down and releases all transport resources.
Definition: node-inl.h:64
const std::string & get_url() const
Returns the URL string used to construct this node.
Definition: node-inl.h:174
virtual ~Node()
Definition: node-inl.h:322
void bind_proto_arena(void *proto_arena)
Binds a Protobuf Arena for arena-allocated message objects.
Definition: node-inl.h:280
bool get_safety_quit() const
Reports whether safe-quit mode is currently active.
Definition: node-inl.h:294
TypeT get_default_value()
Definition: node-inl.h:362
std::atomic_bool has_inited_
Definition: node.h:587
class MessageLoop * get_message_loop() const
Returns the MessageLoop this node is currently attached to.
Definition: node-inl.h:134
Bytes loan(int64_t size)
Allocates a loaned buffer from the transport memory pool.
Definition: node-inl.h:97
void * proto_arena_
Definition: node.h:584
const AbstractNode * get_abstract_node() const
Returns the abstract-graph handle for runtime topology inspection.
Definition: node-inl.h:144
double get_cpu_usage() const
Returns the cumulative CPU-usage ratio sampled by the profiler.
Definition: node-inl.h:285
bool detach()
Detaches the node from its current MessageLoop.
Definition: node-inl.h:129
std::string get_property(const std::string &prop) const
Retrieves a previously set transport-specific property value.
Definition: node-inl.h:164
Status::BasePtr get_status(Status::Type type) const
Retrieves the current status object for the requested category.
Definition: node-inl.h:149
TransportType get_transport_type() const
Returns the TransportType this node is bound to.
Definition: node-inl.h:169
void set_discovery_enabled(bool enable)
Toggles peer-discovery on this node.
Definition: node-inl.h:264
bool return_loan(const Bytes &bytes)
Returns a previously loaned buffer to the transport pool.
Definition: node-inl.h:104
Node()
Definition: node-inl.h:317
void set_ssl_options(const SslOptions &options)
Configures transport-layer SSL/TLS encryption for this node.
Definition: node-inl.h:312
#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