VLink 2.0.0
A high-performance communication middleware
载入中...
搜索中...
未找到
vlink::SetterImpl类 参考abstract

Transport-agnostic base for setter (field writer) node implementations. 更多...

#include <setter_impl.h>

类 vlink::SetterImpl 继承关系图:
vlink::SetterImpl 的协作图:

Public 成员函数

 ~SetterImpl () override
 Destructor.
virtual void write (const Bytes &msg_data)=0
 Writes a new field value to all connected getter nodes.
virtual void sync (SyncCallback &&callback)=0
 Waits for the most recently written value to be propagated, then fires the completion callback.

Protected 成员函数

 SetterImpl ()
 Protected constructor; initialises the setter with kSetter role.

额外继承的成员函数

详细描述

Transport-agnostic base for setter (field writer) node implementations.

Concrete backends override write() to push the serialised value onto the transport and sync() to provide a completion notification after the value has been accepted by the underlying transport.

构造及析构函数说明

◆ ~SetterImpl()

vlink::SetterImpl::~SetterImpl ( )
override

Destructor.

◆ SetterImpl()

vlink::SetterImpl::SetterImpl ( )
protected

Protected constructor; initialises the setter with kSetter role.

函数调用图:
这是这个函数的调用关系图:

成员函数说明

◆ sync()

virtual void vlink::SetterImpl::sync ( SyncCallback && callback)
pure virtual

Waits for the most recently written value to be propagated, then fires the completion callback.

Must be implemented by each concrete transport backend. The exact semantics depend on the transport: some backends fire the callback immediately after the write is queued; others wait until the value has been acknowledged by all connected getters.

参数
callbackCallable invoked once the synchronisation is complete.

◆ write()

virtual void vlink::SetterImpl::write ( const Bytes & msg_data)
pure virtual

Writes a new field value to all connected getter nodes.

Must be implemented by each concrete transport backend. msg_data contains the fully serialised latest value produced by Serializer::serialize(). The write overwrites any previously stored value on the topic.

参数
msg_dataSerialised field value bytes to transmit.

该类的文档由以下文件生成: