163 template <
typename ImplT, SecurityType SecT>
378 void set_property(
const std::string& prop,
const std::string& value);
386 [[nodiscard]] std::string
get_property(
const std::string& prop)
const;
404 [[nodiscard]]
const std::string&
get_url()
const;
588 template <
typename CallbackT,
typename... ArgsT>
591 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:131
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:170
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:201
bool attach(class MessageLoop *message_loop)
Attaches the node to a MessageLoop for callback dispatch.
Definition: node-inl.h:135
SchemaType get_schema_type() const
Returns the current coarse schema family.
Definition: node-inl.h:253
virtual void interrupt()
Aborts any blocking wait on this node.
Definition: node-inl.h:150
bool enable_security(const Security::Config &cfg)
Installs a Security configuration before transport initialisation.
Definition: node-inl.h:321
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:125
const std::string & get_ser_type() const
Returns the current concrete runtime type identifier.
Definition: node-inl.h:248
std::unique_ptr< ImplT > impl_
Definition: node.h:601
void invoke_callback(const CallbackT &callback, ArgsT &&... args)
Definition: node-inl.h:345
void set_safety_quit(bool safety_quit)
Enables or disables safe-quit mode.
Definition: node-inl.h:293
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:269
bool suspend()
Suspends message delivery on this node.
Definition: node-inl.h:120
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:599
void set_record_path(const std::string &path)
Enables recording of inbound or outbound messages to a bag file.
Definition: node-inl.h:190
void register_status_handler(StatusCallback &&callback)
Registers a handler invoked whenever the node's status changes.
Definition: node-inl.h:165
bool is_suspend() const
Reports whether the node is currently suspended.
Definition: node-inl.h:130
bool is_support_loan_
Definition: node.h:595
virtual void set_manual_unloan(bool manual_unloan)
Toggles manual-unloan mode for zero-copy receives.
Definition: node-inl.h:109
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:185
virtual ~Node()
Definition: node-inl.h:316
void bind_proto_arena(void *proto_arena)
Binds a Protobuf Arena for arena-allocated message objects.
Definition: node-inl.h:274
bool get_safety_quit() const
Reports whether safe-quit mode is currently active.
Definition: node-inl.h:288
TypeT get_default_value()
Definition: node-inl.h:356
bool is_manual_unloan_
Definition: node.h:596
std::atomic_bool has_inited_
Definition: node.h:598
virtual bool is_manual_unloan() const
Reports whether manual-unloan mode is currently active.
Definition: node-inl.h:115
class MessageLoop * get_message_loop() const
Returns the MessageLoop this node is currently attached to.
Definition: node-inl.h:145
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:594
const AbstractNode * get_abstract_node() const
Returns the abstract-graph handle for runtime topology inspection.
Definition: node-inl.h:155
double get_cpu_usage() const
Returns the cumulative CPU-usage ratio sampled by the profiler.
Definition: node-inl.h:279
bool detach()
Detaches the node from its current MessageLoop.
Definition: node-inl.h:140
std::string get_property(const std::string &prop) const
Retrieves a previously set transport-specific property value.
Definition: node-inl.h:175
Status::BasePtr get_status(Status::Type type) const
Retrieves the current status object for the requested category.
Definition: node-inl.h:160
TransportType get_transport_type() const
Returns the TransportType this node is bound to.
Definition: node-inl.h:180
void set_discovery_enabled(bool enable)
Toggles peer-discovery on this node.
Definition: node-inl.h:258
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:311
void set_ssl_options(const SslOptions &options)
Configures transport-layer SSL/TLS encryption for this node.
Definition: node-inl.h:306
#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:207
@ kUnknown
Decoding family unknown.
TransportType
Enumeration of every transport backend recognised by VLink.
Definition: types.h:128
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