VLink  2.0.0
A high-performance communication middleware
vlink::SetterImpl Class Referenceabstract

Field-model writer base shared by every transport-specific setter. More...

#include <setter_impl.h>

Inheritance diagram for vlink::SetterImpl:
Collaboration diagram for vlink::SetterImpl:

Public Member Functions

 ~SetterImpl () override
 Releases backend resources. More...
 
virtual void write (const Bytes &msg_data)=0
 Writes a new value to every reachable getter. More...
 
virtual void sync (SyncCallback &&callback)=0
 Installs the transport-specific late-getter sync callback. More...
 

Protected Member Functions

 SetterImpl ()
 Stamps the node as kSetter. More...
 

Additional Inherited Members

Detailed Description

Field-model writer base shared by every transport-specific setter.

Backends override write() to dispatch the serialised value onto the transport and sync() to receive the transport-specific late-join notification so the public Setter can resend its cached value.

Constructor & Destructor Documentation

◆ ~SetterImpl()

vlink::SetterImpl::~SetterImpl ( )
override

Releases backend resources.

◆ SetterImpl()

vlink::SetterImpl::SetterImpl ( )
protected

Stamps the node as kSetter.

Member Function Documentation

◆ sync()

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

Installs the transport-specific late-getter sync callback.

Pure virtual. Backends that detect a freshly attached getter invoke callback so the public Setter can resend the cached latest value; transports without such a signal may simply discard the callback.

Parameters
callbackCallable invoked when a late-getter sync is requested.

◆ write()

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

Writes a new value to every reachable getter.

Pure virtual. msg_data is produced by Serializer::serialize() in the public layer; the call overwrites any previously stored value on the topic.

Parameters
msg_dataSerialised value bytes.

The documentation for this class was generated from the following file: