ChimeraTK-DeviceAccess  03.18.00
ChimeraTK::VoidRegisterAccessor Class Reference

Accessor class to read and write void-typed registers. More...

#include <VoidRegisterAccessor.h>

+ Inheritance diagram for ChimeraTK::VoidRegisterAccessor:
+ Collaboration diagram for ChimeraTK::VoidRegisterAccessor:

Public Member Functions

 VoidRegisterAccessor (const boost::shared_ptr< NDRegisterAccessor< Void >> &impl)
 Construct from pointer to implementation. More...
 
 VoidRegisterAccessor ()=default
 Placeholder constructer, to allow late initialisation of the accessor, e.g. More...
 
bool isReadOnly () const
 
bool isReadable () const
 
void read ()
 
bool readNonBlocking ()
 
bool readLatest ()
 
- Public Member Functions inherited from ChimeraTK::NDRegisterAccessorAbstractor< ChimeraTK::Void >
 NDRegisterAccessorAbstractor ()=default
 Create an uninitialised abstractor - just for late initialisation. More...
 
 NDRegisterAccessorAbstractor (const NDRegisterAccessorAbstractor &)=default
 Declare that we want the default copy constructor although we delete the assigmnent operator. More...
 
void replace (const NDRegisterAccessorAbstractor< ChimeraTK::Void > &newAccessor)
 Assign a new accessor to this NDRegisterAccessorAbstractor. More...
 
void replace (boost::shared_ptr< NDRegisterAccessor< ChimeraTK::Void >> newImpl)
 Alternative signature of replace() with the same functionality, used when a pointer to the implementation has been obtained directly (instead of a NDRegisterAccessorAbstractor). More...
 
const NDRegisterAccessorAbstractoroperator= (const NDRegisterAccessorAbstractor &rightHandSide) const=delete
 Prevent copying by operator=, since it will be confusing (operator= may also be overloaded to access the content of the buffer!) More...
 
boost::shared_ptr< NDRegisterAccessor< ChimeraTK::Void > > getImpl ()
 
- Public Member Functions inherited from ChimeraTK::TransferElementAbstractor
 TransferElementAbstractor (boost::shared_ptr< TransferElement > impl)
 Construct from TransferElement implementation. More...
 
 TransferElementAbstractor ()=default
 Create an uninitialised abstractor - just for late initialisation. More...
 
const std::string & getName () const
 Returns the name that identifies the process variable. More...
 
const std::string & getUnit () const
 Returns the engineering unit. More...
 
const std::string & getDescription () const
 Returns the description of this variable/register. More...
 
const std::type_info & getValueType () const
 Returns the std::type_info for the value type of this transfer element. More...
 
AccessModeFlags getAccessModeFlags () const
 Return the AccessModeFlags for this TransferElement. More...
 
void read ()
 Read the data from the device. More...
 
bool readNonBlocking ()
 Read the next value, if available in the input buffer. More...
 
bool readLatest ()
 Read the latest value, discarding any other update since the last read if present. More...
 
ChimeraTK::VersionNumber getVersionNumber () const
 Returns the version number that is associated with the last transfer (i.e. More...
 
bool write (ChimeraTK::VersionNumber versionNumber={})
 Write the data to device. More...
 
bool writeDestructively (ChimeraTK::VersionNumber versionNumber={})
 Just like write(), but allows the implementation to destroy the content of the user buffer in the process. More...
 
bool isReadOnly () const
 Check if transfer element is read only, i.e. More...
 
bool isReadable () const
 Check if transfer element is readable. More...
 
bool isWriteable () const
 Check if transfer element is writeable. More...
 
std::vector< boost::shared_ptr< TransferElement > > getHardwareAccessingElements ()
 Obtain the underlying TransferElements with actual hardware access. More...
 
std::list< boost::shared_ptr< TransferElement > > getInternalElements ()
 Obtain the full list of TransferElements internally used by this TransferElement. More...
 
const boost::shared_ptr< TransferElement > & getHighLevelImplElement ()
 Obtain the highest level implementation TransferElement. More...
 
bool isInitialised () const
 Return if the accessor is properly initialised. More...
 
void replace (const TransferElementAbstractor &newAccessor)
 Assign a new accessor to this TransferElementAbstractor. More...
 
void replace (boost::shared_ptr< TransferElement > newImpl)
 Alternative signature of relace() with the same functionality, used when a pointer to the implementation has been obtained directly (instead of a TransferElementAbstractor). More...
 
void replaceTransferElement (const boost::shared_ptr< TransferElement > &newElement)
 Search for all underlying TransferElements which are considered identical (see mayReplaceOther()) with the given TransferElement. More...
 
void setPersistentDataStorage (boost::shared_ptr< ChimeraTK::PersistentDataStorage > storage)
 Associate a persistent data storage object to be updated on each write operation of this ProcessArray. More...
 
TransferElementID getId () const
 Obtain unique ID for the actual implementation of this TransferElement. More...
 
void setDataValidity (DataValidity valid=DataValidity::ok)
 Set the current DataValidity for this TransferElement. More...
 
DataValidity dataValidity () const
 Return current validity of the data. More...
 
void interrupt ()
 Return from a blocking read immediately and throw boost::thread_interrupted. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ChimeraTK::NDRegisterAccessorAbstractor< ChimeraTK::Void >
 NDRegisterAccessorAbstractor (boost::shared_ptr< NDRegisterAccessor< ChimeraTK::Void >> impl)
 
NDRegisterAccessor< ChimeraTK::Void > * get ()
 
const NDRegisterAccessor< ChimeraTK::Void > * get () const
 
- Protected Attributes inherited from ChimeraTK::TransferElementAbstractor
boost::shared_ptr< TransferElement_impl
 Untyped pointer to implementation. More...
 

Detailed Description

Accessor class to read and write void-typed registers.

Definition at line 14 of file VoidRegisterAccessor.h.

Constructor & Destructor Documentation

◆ VoidRegisterAccessor() [1/2]

ChimeraTK::VoidRegisterAccessor::VoidRegisterAccessor ( const boost::shared_ptr< NDRegisterAccessor< Void >> &  impl)

Construct from pointer to implementation.

Normally not called by the user, use Device::getVoidRegisterAccessor() instead.

Definition at line 10 of file VoidRegisterAccessor.cc.

◆ VoidRegisterAccessor() [2/2]

ChimeraTK::VoidRegisterAccessor::VoidRegisterAccessor ( )
default

Placeholder constructer, to allow late initialisation of the accessor, e.g.

in the open function.

Attention
Accessors created with this constructors will be dysfunctional, calling any member function will throw an exception (by the boost::shared_ptr)!

Member Function Documentation

◆ isReadable()

bool ChimeraTK::VoidRegisterAccessor::isReadable ( ) const

Definition at line 31 of file VoidRegisterAccessor.cc.

+ Here is the caller graph for this function:

◆ isReadOnly()

bool ChimeraTK::VoidRegisterAccessor::isReadOnly ( ) const

Definition at line 21 of file VoidRegisterAccessor.cc.

+ Here is the caller graph for this function:

◆ read()

void ChimeraTK::VoidRegisterAccessor::read ( )
inline

Definition at line 44 of file VoidRegisterAccessor.h.

+ Here is the caller graph for this function:

◆ readLatest()

bool ChimeraTK::VoidRegisterAccessor::readLatest ( )
inline

Definition at line 62 of file VoidRegisterAccessor.h.

+ Here is the caller graph for this function:

◆ readNonBlocking()

bool ChimeraTK::VoidRegisterAccessor::readNonBlocking ( )
inline

Definition at line 53 of file VoidRegisterAccessor.h.

+ Here is the caller graph for this function:

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