385 template <
typename T>
572 std::unique_ptr<struct NodeImplHelper> helper_;
583 return static_cast<const T*
>(
get_conf());
Versatile byte buffer with small-buffer optimisation, ownership semantics and compression.
Minimal interface for accessing the underlying native transport handle.
Definition node_impl.h:96
virtual std::any get_native_handle() const
Returns the underlying native transport handle wrapped in std::any.
Versatile 128-byte byte buffer with SBO, five ownership modes and compression helpers.
Definition bytes.h:113
Single-threaded serial task dispatcher with integrated timer support.
Definition message_loop.h:106
virtual bool resume()
Resumes message delivery after a suspend() call.
void set_property(const std::string &prop, const std::string &value)
Sets a named transport property on this node.
Conf::PropertiesMap get_all_properties() const
Returns a snapshot of all properties set on this node.
void init_ext()
Registers the node with the global DiscoveryReporter.
void set_ssl_options(const SslOptions &options)
Merges SSL/TLS options into the node property map.
virtual Status::BasePtr get_status(Status::Type type) const
Retrieves a transport-specific status object.
ImplType impl_type
Role of this implementation node.
Definition node_impl.h:558
void set_discovery_enabled(bool enable)
Enables or disables discovery reporting for this node.
std::function< void(uint64_t, const Bytes &, Bytes *)> ReqRespCallback
Callback for ServerImpl request/response processing.
Definition node_impl.h:170
const T * get_target_conf() const
Returns a typed pointer to the conf by downcasting to T.
Definition node_impl.h:582
std::unique_ptr< class CpuProfiler > profiler
Optional per-node CPU profiler (only when global profiling is on).
Definition node_impl.h:564
void try_record(ActionType action_type, const Bytes &data)
Records a message to the global and/or per-node bag writers.
std::atomic_bool has_suspend
Atomic suspend state flag (currently unused by default impls).
Definition node_impl.h:554
void deinit_ext()
Deregisters the node from the global DiscoveryReporter.
virtual void set_manual_unloan(bool manual_unloan)
Configures manual unloan mode for zero-copy transports.
void reset_interrupted()
Clears the interrupted flag set by interrupt().
virtual void deinit()=0
Tears down the underlying transport channel.
void set_record_path(const std::string &path)
Sets the file path for per-node message recording.
virtual bool detach()
Detaches the node from its MessageLoop.
std::string get_property(const std::string &prop) const
Retrieves a named transport property.
virtual Bytes loan(int64_t size)
Borrows a write buffer of size bytes from the transport.
std::function< void(const Status::BasePtr &ptr)> StatusCallback
Callback invoked on DDS status events (e.g. deadline missed).
Definition node_impl.h:155
virtual void init()=0
Initialises the underlying transport channel.
virtual bool attach(class MessageLoop *message_loop)
Attaches the node to a MessageLoop for callback dispatch.
std::function< void(const IntraData &)> IntraMsgCallback
Callback delivering an in-process IntraData message.
Definition node_impl.h:186
bool is_interrupted() const
Returns true if interrupt() has been called and not yet reset.
std::string url
Full URL string of this node (e.g. "dds://my/topic").
Definition node_impl.h:556
std::function< void(bool)> ConnectCallback
Callback invoked when the peer connection state changes.
Definition node_impl.h:148
bool has_register_status() const
Returns true if a status handler has been registered.
void call_status(Status::BasePtr ptr)
Dispatches a status event to the registered status handler.
static void global_init()
Initialises process-wide VLink singletons.
bool is_cdr_type
true when using DDS native CDR serialisation.
Definition node_impl.h:561
bool is_security_type
true when security-authenticated transport is enabled.
Definition node_impl.h:562
virtual void interrupt()
Signals any blocking operations to unblock and return immediately.
class MessageLoop * get_message_loop() const
Returns the MessageLoop this node is attached to.
bool get_discovery_enabled() const
Returns true if discovery reporting is enabled for this node.
virtual bool suspend()
Temporarily suspends message delivery without tearing down the channel.
SchemaType schema_type
Coarse schema family reported to discovery and bag/proxy paths.
Definition node_impl.h:559
std::function< void()> SyncCallback
Callback invoked when a SetterImpl sync completes.
Definition node_impl.h:160
virtual bool check_version(const Version &version)
Checks whether version matches the runtime VLink library version.
virtual bool is_support_loan() const
Returns true if the transport supports zero-copy loaning.
virtual bool return_loan(const Bytes &bytes)
Returns a previously loaned buffer to the transport.
virtual const struct Conf * get_conf() const
Returns a pointer to the associated Conf configuration object.
TransportType transport_type
Transport backend of this implementation node.
Definition node_impl.h:560
std::string ser_type
Serialisation type string (e.g. "demo.proto.PointCloud").
Definition node_impl.h:557
bool is_discovery_enabled
Whether this node is reported to the discovery layer.
Definition node_impl.h:563
void register_status_handler(StatusCallback &&callback)
Registers a callback for DDS status events.
std::function< void(const Bytes &)> MsgCallback
Callback delivering a raw serialised message to a SubscriberImpl or GetterImpl.
Definition node_impl.h:177
virtual const AbstractNode * get_abstract_node() const
Returns a pointer to the AbstractNode peer (if any).
virtual bool is_suspend() const
Returns true when the node is currently suspended.
Abstract transport configuration base class and associated helper macros.
Zero-serialisation in-process message container for intra:// transport.
#define VLINK_EXPORT
Definition macros.h:85
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition macros.h:184
Type
Discriminator for concrete status event types.
Definition status.h:97
std::shared_ptr< Status::Base > BasePtr
Type alias for a shared pointer to a base status event.
Definition status.h:241
SchemaType
Coarse runtime schema family used by discovery, bag metadata, and proxy routing.
Definition types.h:184
@ kUnknown
Decode category is not known.
Definition types.h:185
ActionType
Identifies the type of message action for recording purposes.
Definition types.h:162
TransportType
Enumeration of all supported transport backends.
Definition types.h:107
@ kUnknown
Unknown or unsupported transport.
Definition types.h:108
ImplType
Bitmask identifying the role of a VLink node implementation.
Definition types.h:89
@ kUnknownImplType
Type not yet determined.
Definition types.h:90
std::shared_ptr< IntraDataType > IntraData
Shared-ownership handle for an IntraDataType payload.
Definition intra_data.h:96
Transport-layer SSL/TLS configuration for VLink communication backends.
DDS-compatible status type hierarchy for VLink publisher and subscriber callbacks.
Abstract base class for VLink transport configuration objects.
Definition conf.h:83
std::map< std::string, std::string > PropertiesMap
Key/value property map type.
Definition conf.h:92
Aggregate of SSL/TLS settings for transport-layer encryption.
Definition ssl_options.h:119
Semantic version number with comparison and string conversion utilities.
Definition types.h:329
Core type definitions shared across all VLink node implementations.