ChimeraTK-DeviceAccess  03.18.00
ChimeraTK::async::AsyncVariable Struct Referenceabstract

Typeless base class. More...

#include <AsyncAccessorManager.h>

+ Inheritance diagram for ChimeraTK::async::AsyncVariable:

Public Member Functions

virtual ~AsyncVariable ()=default
 
virtual void send ()=0
 Send the value from the _sendBuffer of the AsyncVariableImpl. More...
 
virtual void sendException (std::exception_ptr e)=0
 Send an exception to all subscribers. More...
 
virtual unsigned int getNumberOfChannels ()=0
 Helper functions for the creation of an AsyncNDRegisterAccessor. More...
 
virtual unsigned int getNumberOfSamples ()=0
 
virtual const std::string & getUnit ()=0
 
virtual const std::string & getDescription ()=0
 
virtual void fillSendBuffer ()=0
 Fill the send buffer with data and version number. More...
 

Detailed Description

Typeless base class.

The implementations will have a weak pointer of an AsyncNDRegisterAccessor<UserType> and will implement the pure virtual functions which act on the accessor.

Definition at line 14 of file AsyncAccessorManager.h.

Constructor & Destructor Documentation

◆ ~AsyncVariable()

virtual ChimeraTK::async::AsyncVariable::~AsyncVariable ( )
virtualdefault

Member Function Documentation

◆ fillSendBuffer()

virtual void ChimeraTK::async::AsyncVariable::fillSendBuffer ( )
pure virtual

Fill the send buffer with data and version number.

It is implementation specific where this information is coming from.

Implemented in ChimeraTK::async::PolledAsyncVariable< UserType >.

+ Here is the caller graph for this function:

◆ getDescription()

virtual const std::string& ChimeraTK::async::AsyncVariable::getDescription ( )
pure virtual

◆ getNumberOfChannels()

virtual unsigned int ChimeraTK::async::AsyncVariable::getNumberOfChannels ( )
pure virtual

Helper functions for the creation of an AsyncNDRegisterAccessor.

As the creating code cannot use the catalogue, each backend has to implement these functions appropriately.

Implemented in ChimeraTK::async::AsyncVariableImpl< UserType >, and ChimeraTK::async::PolledAsyncVariable< UserType >.

◆ getNumberOfSamples()

virtual unsigned int ChimeraTK::async::AsyncVariable::getNumberOfSamples ( )
pure virtual

◆ getUnit()

◆ send()

virtual void ChimeraTK::async::AsyncVariable::send ( )
pure virtual

Send the value from the _sendBuffer of the AsyncVariableImpl.

The buffer has to be prepared before calling this function (incl. version number and data validity flag). The buffer is swapped out to avoid unnecessary copies. If you need a copy, you have to make one before calling this function.

Implemented in ChimeraTK::async::AsyncVariableImpl< UserType >.

◆ sendException()

virtual void ChimeraTK::async::AsyncVariable::sendException ( std::exception_ptr  e)
pure virtual

Send an exception to all subscribers.

Must only be called from within deactivateAsyncAndExecute().

Implemented in ChimeraTK::async::AsyncVariableImpl< UserType >.


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