12#include <boost/enable_shared_from_this.hpp>
19 class MuxedInterruptDistributor;
20 template<
typename BackendSpecificDataType>
29 class DeviceBackend :
public boost::enable_shared_from_this<DeviceBackend> {
68 template<typename UserType>
125 template<
typename UserType>
129 getRegisterAccessor_impl, UserType, registerPathName, numberOfWords, wordOffsetInRegister, flags);
#define CALL_VIRTUAL_FUNCTION_TEMPLATE(functionName, templateArgument,...)
Execute the virtual function template call using the vtable defined with the DEFINE_VIRTUAL_FUNCTION_...
#define DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE(functionName,...)
Define a virtual function template with the given function name and signature in the base class.
Set of AccessMode flags with additional functionality for an easier handling.
The base class for backends providing IO functionality for the Device class.
virtual bool isConnected()=0
Deprecated since 2022-03-03.
virtual void activateAsyncRead() noexcept
Activate asyncronous read for all transfer elements where AccessMode::wait_for_new_data is set.
virtual RegisterCatalogue getRegisterCatalogue() const =0
Return the register catalogue with detailed information on all registers.
virtual bool isFunctional() const noexcept=0
Return whether a device is working as intended, usually this means it is opened and does not have any...
virtual ~DeviceBackend()=default
Every virtual class needs a virtual desctructor.
virtual void close()=0
Close the device.
boost::shared_ptr< NDRegisterAccessor< UserType > > getRegisterAccessor(const RegisterPath ®isterPathName, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags)
Get a NDRegisterAccessor object from the register name.
BackendID getBackendID()
Get a unique ID for this backend instance.
virtual bool isOpen()=0
Return whether a device has been opened or not.
virtual MetadataCatalogue getMetadataCatalogue() const =0
Return the device metadata catalogue.
virtual void open()=0
Open the device.
virtual void setException(const std::string &message) noexcept=0
Set the backend into an exception state.
virtual void checkActiveException()=0
Function to be called by backends when needing to check for an active exception.
virtual std::string readDeviceInfo()=0
Return a device information string containing hardware details like the firmware version number or th...
virtual std::set< BackendID > getInvolvedBackendIDs()=0
Get the backend IDs of all involved backends.
N-dimensional register accessor.
Catalogue of register information.
Class to store a register path name.