97 #include "../base/bytes.h"
98 #include "../base/cpu_profiler.h"
99 #include "../base/functional.h"
100 #include "../extension/security.h"
101 #include "../extension/status.h"
102 #include "../impl/conf.h"
103 #include "../impl/types.h"
398 template <
typename T>
399 [[nodiscard]]
const T* get_target_conf()
const;
592 bool is_security_type{
false};
593 bool is_discovery_enabled{
true};
594 std::atomic_bool has_suspend{
false};
604 std::unique_ptr<struct NodeImplHelper> helper_;
613 template <
typename T>
615 return static_cast<const T*
>(
get_conf());
Tiny mix-in that exposes the backend-native handle behind a node.
Definition: node_impl.h:123
virtual std::any get_native_handle() const
Returns the backend-native handle wrapped in an std::any.
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
Backbone of every transport-specific VLink node implementation.
Definition: node_impl.h:163
virtual bool resume()
Resumes message delivery after suspend().
void set_property(const std::string &prop, const std::string &value)
Sets a named property on this node.
Conf::PropertiesMap get_all_properties() const
Returns a copy of every property currently set on this node.
void init_ext()
Registers the node with the runtime-owned discovery reporter.
void set_ssl_options(const SslOptions &options)
Merges SSL options into the node property map.
virtual Status::BasePtr get_status(Status::Type type) const
Retrieves a transport-specific status object.
class MessageLoop * get_message_loop() const
Returns the currently attached MessageLoop.
void set_discovery_enabled(bool enable)
Toggles whether this node is reported to the discovery layer.
const T * get_target_conf() const
Convenience downcast wrapper around get_conf().
Definition: node_impl.h:614
void try_record(ActionType action_type, const Bytes &data)
Records a message to the global and / or per-node bag writers.
void deinit_ext()
Deregisters the node from the runtime-owned discovery reporter.
virtual void set_manual_unloan(bool manual_unloan)
Toggles automatic versus manual release of received loaned buffers.
void reset_interrupted()
Clears the interrupted flag set by interrupt().
virtual void deinit()=0
Tears the underlying transport channel down.
void set_record_path(const std::string &path)
Configures per-node message recording.
virtual bool detach()
Detaches the node from its MessageLoop.
std::string get_property(const std::string &prop) const
Retrieves the value of a named property.
virtual Bytes loan(int64_t size)
Borrows a write buffer of size bytes from the transport.
virtual void init()=0
Brings the underlying transport channel online.
virtual bool attach(class MessageLoop *message_loop)
Attaches the node to a MessageLoop for callback dispatch.
std::unique_ptr< CpuProfiler > profiler
Optional per-node CPU profiler activated under global profiling.
Definition: node_impl.h:595
bool is_interrupted() const
Reports whether interrupt() has been called and not yet reset.
std::string url
Full URL string of the node, e.g. "dds://my/topic".
Definition: node_impl.h:586
bool has_register_status() const
Reports whether a status handler has been registered.
void call_status(Status::BasePtr ptr)
Delivers a status notification to the registered handler.
static void global_init()
Initialises process-wide VLink singletons.
bool enable_security(Security::Config &&cfg)
Installs application-layer security by consuming cfg.
virtual const AbstractNode * get_abstract_node() const
Returns the companion AbstractNode, when the impl is split.
virtual void interrupt()
Marks the node interrupted and wakes blocking operations.
bool get_discovery_enabled() const
Returns the current discovery-reporting flag.
virtual bool suspend()
Pauses message delivery without releasing the channel.
virtual bool check_version(const Version &version)
Compares version with the runtime VLink library version.
bool enable_security(const Security::Config &cfg)
Installs application-layer security from a const-reference config.
virtual bool is_support_loan() const
Indicates whether zero-copy loaning is available on this backend.
virtual bool return_loan(const Bytes &bytes)
Returns a previously loaned buffer to the transport.
virtual const struct Conf * get_conf() const
Returns the associated transport Conf, or nullptr in the base.
std::string ser_type
Concrete serialisation type tag (e.g. "demo.proto.PointCloud").
Definition: node_impl.h:587
void register_status_handler(StatusCallback &&callback)
Installs a DDS-family status handler.
std::unique_ptr< Security > security
Installed per-node message-security context, or nullptr.
Definition: node_impl.h:596
virtual bool is_suspend() const
Reports whether the node is currently suspended.
Reference-counted in-process payload type used by the intra:// backend.
#define VLINK_EXPORT
Definition: macros.h:81
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174
constexpr bool is_cdr_type() noexcept
Reports whether T is a FastDDS CDR-serialisable type.
Definition: serializer-inl.h:715
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.
ActionType
Labels for messages captured by the recording infrastructure.
Definition: types.h:185
std::shared_ptr< IntraDataType > IntraData
Shared-ownership handle for an IntraDataType payload.
Definition: intra_data.h:112
TransportType
Enumeration of every transport backend recognised by VLink.
Definition: types.h:128
@ kUnknown
Unknown or unsupported transport.
ImplType
Bitmask identifying the role of a VLink node implementation.
Definition: types.h:110
@ kUnknownImplType
Type not yet determined.
Definition: types.h:111
Backend-neutral SSL / TLS settings shared by all VLink transports that support encryption.
Abstract base for every transport-specific configuration aggregate.
Definition: conf.h:115
std::map< std::string, std::string > PropertiesMap
Key/value property map shared between confs and node implementations.
Definition: conf.h:123
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
Semantic version number with comparison and string-conversion helpers.
Definition: types.h:385