ChimeraTK-DeviceAccess  03.18.00
AsyncTestDummy Class Reference
+ Inheritance diagram for AsyncTestDummy:
+ Collaboration diagram for AsyncTestDummy:

Classes

class  Accessor
 

Public Member Functions

 AsyncTestDummy ()
 
std::string readDeviceInfo () override
 Return a device information string containing hardware details like the firmware version number or the slot number used by the board. More...
 
RegisterCatalogue getRegisterCatalogue () const override
 Return the register catalogue with detailed information on all registers. More...
 
template<typename UserType >
boost::shared_ptr< NDRegisterAccessor< UserType > > getRegisterAccessor_impl (const RegisterPath &registerPathName, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags)
 
 DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE_FILLER (AsyncTestDummy, getRegisterAccessor_impl, 4)
 
void open () override
 Open the device. More...
 
void close () override
 Close the device. More...
 
void setExceptionImpl () noexcept override
 Function to be (optionally) implemented by backends if additional actions are needed when switching to the exception state. More...
 
- Public Member Functions inherited from ChimeraTK::DeviceBackendImpl
bool isOpen () override
 Return whether a device has been opened or not. More...
 
bool isConnected () final
 Deprecated since 2022-03-03. More...
 
MetadataCatalogue getMetadataCatalogue () const override
 Return the device metadata catalogue. More...
 
void checkActiveException () final
 Function to be called by backends when needing to check for an active exception. More...
 
void setException (const std::string &message) noexcept final
 Set the backend into an exception state. More...
 
bool isFunctional () const noexcept final
 Return whether a device is working as intended, usually this means it is opened and does not have any errors. More...
 
std::string getActiveExceptionMessage () noexcept
 
- Public Member Functions inherited from ChimeraTK::DeviceBackend
virtual ~DeviceBackend ()=default
 Every virtual class needs a virtual desctructor. More...
 
template<typename UserType >
boost::shared_ptr< NDRegisterAccessor< UserType > > getRegisterAccessor (const RegisterPath &registerPathName, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags)
 Get a NDRegisterAccessor object from the register name. More...
 
 DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE (getRegisterAccessor_impl, boost::shared_ptr< NDRegisterAccessor< T >>(const RegisterPath &, size_t, size_t, AccessModeFlags))
 
virtual void activateAsyncRead () noexcept
 Activate asyncronous read for all transfer elements where AccessMode::wait_for_new_data is set. More...
 

Static Public Member Functions

static boost::shared_ptr< DeviceBackendcreateInstance (std::string, std::map< std::string, std::string >)
 

Public Attributes

std::map< std::string, cppext::future_queue< void > > notificationQueue
 
std::map< std::string, size_t > registers
 
bool _hasActiveException {false}
 

Additional Inherited Members

- Protected Member Functions inherited from ChimeraTK::DeviceBackendImpl
void setOpenedAndClearException () noexcept
 Backends should call this function at the end of a (successful) open() call. More...
 
- Protected Attributes inherited from ChimeraTK::DeviceBackendImpl
std::atomic< bool > _opened {false}
 flag if backend is opened More...
 
async::DomainsContainer _asyncDomainsContainer
 Container for async::Domains to support wait_for_new_data. More...
 

Detailed Description

Definition at line 29 of file testAsyncRead.cpp.

Constructor & Destructor Documentation

◆ AsyncTestDummy()

AsyncTestDummy::AsyncTestDummy ( )
inlineexplicit

Definition at line 31 of file testAsyncRead.cpp.

Member Function Documentation

◆ close()

void AsyncTestDummy::close ( )
inlineoverridevirtual

Close the device.

Implements ChimeraTK::DeviceBackend.

Definition at line 108 of file testAsyncRead.cpp.

◆ createInstance()

static boost::shared_ptr<DeviceBackend> AsyncTestDummy::createInstance ( std::string  ,
std::map< std::string, std::string >   
)
inlinestatic

Definition at line 37 of file testAsyncRead.cpp.

+ Here is the caller graph for this function:

◆ DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE_FILLER()

AsyncTestDummy::DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE_FILLER ( AsyncTestDummy  ,
getRegisterAccessor_impl  ,
 
)

◆ getRegisterAccessor_impl()

template<typename UserType >
boost::shared_ptr<NDRegisterAccessor<UserType> > AsyncTestDummy::getRegisterAccessor_impl ( const RegisterPath registerPathName,
size_t  numberOfWords,
size_t  wordOffsetInRegister,
AccessModeFlags  flags 
)
inline

Definition at line 89 of file testAsyncRead.cpp.

◆ getRegisterCatalogue()

RegisterCatalogue AsyncTestDummy::getRegisterCatalogue ( ) const
inlineoverridevirtual

Return the register catalogue with detailed information on all registers.

Implements ChimeraTK::DeviceBackend.

Definition at line 35 of file testAsyncRead.cpp.

◆ open()

void AsyncTestDummy::open ( )
inlineoverridevirtual

Open the device.

Implements ChimeraTK::DeviceBackend.

Definition at line 103 of file testAsyncRead.cpp.

◆ readDeviceInfo()

std::string AsyncTestDummy::readDeviceInfo ( )
inlineoverridevirtual

Return a device information string containing hardware details like the firmware version number or the slot number used by the board.

The format and contained information of this string is completely backend implementation dependent, so the string may only be printed to the user as an informational output. Do not try to parse this string or extract information from it programmatically.

Implements ChimeraTK::DeviceBackend.

Definition at line 33 of file testAsyncRead.cpp.

◆ setExceptionImpl()

void AsyncTestDummy::setExceptionImpl ( )
inlineoverridevirtualnoexcept

Function to be (optionally) implemented by backends if additional actions are needed when switching to the exception state.

Reimplemented from ChimeraTK::DeviceBackendImpl.

Definition at line 113 of file testAsyncRead.cpp.

Member Data Documentation

◆ _hasActiveException

bool AsyncTestDummy::_hasActiveException {false}

Definition at line 117 of file testAsyncRead.cpp.

◆ notificationQueue

std::map<std::string, cppext::future_queue<void> > AsyncTestDummy::notificationQueue

Definition at line 110 of file testAsyncRead.cpp.

◆ registers

std::map<std::string, size_t> AsyncTestDummy::registers

Definition at line 111 of file testAsyncRead.cpp.


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