|
VLink
2.0.0
A high-performance communication middleware
|
Field-model receive base class shared by every transport-specific getter. 更多...
#include <getter_impl.h>
Public 成员函数 | |
| ~GetterImpl () override | |
| Releases backend resources. 更多... | |
| virtual bool | listen (MsgCallback &&callback)=0 |
| Installs the latest-value notification callback. 更多... | |
| virtual void | set_latency_and_lost_enabled (bool enable) |
| Enables or disables per-update latency and loss tracking. 更多... | |
| virtual bool | is_latency_and_lost_enabled () const |
| Reports whether tracking is currently enabled. 更多... | |
| virtual int64_t | get_latency () const |
| Returns the most recent end-to-end latency measurement in nanoseconds. 更多... | |
| virtual SampleLostInfo | get_lost () const |
| Returns cumulative delivered / lost counts for field updates. 更多... | |
Public 成员函数 继承自 vlink::NodeImpl | |
| virtual void | init ()=0 |
| Brings the underlying transport channel online. 更多... | |
| virtual void | deinit ()=0 |
| Tears the underlying transport channel down. 更多... | |
| virtual bool | suspend () |
| Pauses message delivery without releasing the channel. 更多... | |
| virtual bool | resume () |
Resumes message delivery after suspend(). 更多... | |
| virtual bool | is_suspend () const |
| Reports whether the node is currently suspended. 更多... | |
| virtual void | interrupt () |
| Marks the node interrupted and wakes blocking operations. 更多... | |
| virtual bool | is_support_loan () const |
| Indicates whether zero-copy loaning is available on this backend. 更多... | |
| virtual Bytes | loan (int64_t size) |
Borrows a write buffer of size bytes from the transport. 更多... | |
| virtual bool | return_loan (const Bytes &bytes) |
| Returns a previously loaned buffer to the transport. 更多... | |
| virtual void | set_manual_unloan (bool manual_unloan) |
| Toggles automatic versus manual release of received loaned buffers. 更多... | |
| virtual const struct Conf * | get_conf () const |
Returns the associated transport Conf, or nullptr in the base. 更多... | |
| virtual const AbstractNode * | get_abstract_node () const |
Returns the companion AbstractNode, when the impl is split. 更多... | |
| virtual Status::BasePtr | get_status (Status::Type type) const |
| Retrieves a transport-specific status object. 更多... | |
| virtual bool | check_version (const Version &version) |
Compares version with the runtime VLink library version. 更多... | |
| virtual bool | attach (class MessageLoop *message_loop) |
Attaches the node to a MessageLoop for callback dispatch. 更多... | |
| virtual bool | detach () |
Detaches the node from its MessageLoop. 更多... | |
| class MessageLoop * | get_message_loop () const |
Returns the currently attached MessageLoop. 更多... | |
| template<typename T > | |
| const T * | get_target_conf () const |
Convenience downcast wrapper around get_conf(). 更多... | |
| void | register_status_handler (StatusCallback &&callback) |
| Installs a DDS-family status handler. 更多... | |
| 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. 更多... | |
| void | set_property (const std::string &prop, const std::string &value) |
| Sets a named property on this node. 更多... | |
| std::string | get_property (const std::string &prop) const |
| Retrieves the value of a named property. 更多... | |
| Conf::PropertiesMap | get_all_properties () const |
| Returns a copy of every property currently set on this node. 更多... | |
| void | set_discovery_enabled (bool enable) |
| Toggles whether this node is reported to the discovery layer. 更多... | |
| bool | get_discovery_enabled () const |
| Returns the current discovery-reporting flag. 更多... | |
| void | set_record_path (const std::string &path) |
| Configures per-node message recording. 更多... | |
| bool | enable_security (const Security::Config &cfg) |
| Installs application-layer security from a const-reference config. 更多... | |
| bool | enable_security (Security::Config &&cfg) |
Installs application-layer security by consuming cfg. 更多... | |
| void | set_ssl_options (const SslOptions &options) |
| Merges SSL options into the node property map. 更多... | |
| void | try_record (ActionType action_type, const Bytes &data) |
| Records a message to the global and / or per-node bag writers. 更多... | |
| void | reset_interrupted () |
Clears the interrupted flag set by interrupt(). 更多... | |
| bool | is_interrupted () const |
Reports whether interrupt() has been called and not yet reset. 更多... | |
| void | init_ext () |
| Registers the node with the runtime-owned discovery reporter. 更多... | |
| void | deinit_ext () |
| Deregisters the node from the runtime-owned discovery reporter. 更多... | |
Public 属性 | |
| bool | is_listened {false} |
true once listen() has been registered successfully. 更多... | |
Public 属性 继承自 vlink::NodeImpl | |
| std::string | url |
Full URL string of the node, e.g. "dds://my/topic". 更多... | |
| std::string | ser_type |
Concrete serialisation type tag (e.g. "demo.proto.PointCloud"). 更多... | |
| ImplType | impl_type {kUnknownImplType} |
| Role of this implementation node. 更多... | |
| SchemaType | schema_type {SchemaType::kUnknown} |
| Coarse schema family reported to discovery and bag / proxy paths. 更多... | |
| TransportType | transport_type {TransportType::kUnknown} |
| Transport backend identifier for this node. 更多... | |
| bool | is_cdr_type {false} |
true when DDS native CDR serialisation is in use. 更多... | |
| bool | is_security_type {false} |
true when an authenticated transport is enabled. 更多... | |
| bool | is_discovery_enabled {true} |
| Whether the node is reported to the discovery layer. 更多... | |
| std::atomic_bool | has_suspend {false} |
| Atomic suspend flag (currently unused by the default impls). 更多... | |
| std::unique_ptr< CpuProfiler > | profiler |
| Optional per-node CPU profiler activated under global profiling. 更多... | |
| std::unique_ptr< Security > | security |
Installed per-node message-security context, or nullptr. 更多... | |
Protected 成员函数 | |
| GetterImpl () | |
Stamps the node as kGetter. 更多... | |
Protected 成员函数 继承自 vlink::NodeImpl | |
| NodeImpl (ImplType type) | |
| virtual | ~NodeImpl () |
额外继承的成员函数 | |
Public 类型 继承自 vlink::NodeImpl | |
| using | ConnectCallback = Function< void(bool)> |
| Callback fired when peer presence changes. 更多... | |
| using | StatusCallback = Function< void(const Status::BasePtr &ptr)> |
| Callback fired on DDS-family status notifications (e.g. deadline missed). 更多... | |
| using | SyncCallback = Function< void()> |
Callback fired when a SetterImpl completes a late-getter sync. 更多... | |
| using | ReqRespCallback = Function< void(uint64_t, const Bytes &, Bytes *)> |
Request / response handler installed by ServerImpl::listen(). 更多... | |
| using | MsgCallback = Function< void(const Bytes &)> |
| Callback delivering a serialised payload to a subscriber or getter. 更多... | |
| using | IntraMsgCallback = Function< void(const IntraData &)> |
| Callback delivering an in-process payload to an intra:// subscriber. 更多... | |
静态 Public 成员函数 继承自 vlink::NodeImpl | |
| static void | global_init () |
| Initialises process-wide VLink singletons. 更多... | |
Field-model receive base class shared by every transport-specific getter.
Provides safe defaults for the optional latency / loss instrumentation so that backends without those signals can be plugged in without supplying empty overrides. Concrete backends override listen() to wire the transport receive path to the supplied MsgCallback.
|
override |
Releases backend resources.
|
protected |
Stamps the node as kGetter.
|
virtual |
Returns the most recent end-to-end latency measurement in nanoseconds.
Only meaningful when is_latency_and_lost_enabled() returns true.
0 if tracking is disabled or unsupported.
|
virtual |
Returns cumulative delivered / lost counts for field updates.
SampleLostInfo with total and lost counters.
|
virtual |
Reports whether tracking is currently enabled.
true when the backend is collecting latency / loss data.
|
pure virtual |
Installs the latest-value notification callback.
Pure virtual. Backends bind callback to the transport receive path so the public Getter sees every value written by the matching Setter. The owning Getter sets is_listened to true once this method succeeds.
| callback | Callable void(const Bytes&) invoked on each update. |
true on successful registration; false on error.
|
virtual |
Enables or disables per-update latency and loss tracking.
Default no-op. Backends that maintain timestamps and sequence numbers override the method to activate the instrumentation.
| enable | true to start tracking; false to stop. |
| bool vlink::GetterImpl::is_listened {false} |
true once listen() has been registered successfully.