|
ChimeraTK-DeviceAccess
03.18.00
|
Go to the documentation of this file.
12 #include <boost/enable_shared_from_this.hpp>
18 class MuxedInterruptDistributor;
19 template<
typename BackendSpecificDataType>
28 class DeviceBackend :
public boost::enable_shared_from_this<DeviceBackend> {
34 virtual void open() = 0;
37 virtual void close() = 0;
67 template<
typename UserType>
87 virtual void setException(
const std::string& message) noexcept = 0;
108 template<
typename UserType>
112 getRegisterAccessor_impl, UserType, registerPathName, numberOfWords, wordOffsetInRegister, flags);
DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE(getRegisterAccessor_impl, boost::shared_ptr< NDRegisterAccessor< T >>(const RegisterPath &, size_t, size_t, AccessModeFlags))
virtual void setException(const std::string &message) noexcept=0
Set the backend into an exception state.
virtual void activateAsyncRead() noexcept
Activate asyncronous read for all transfer elements where AccessMode::wait_for_new_data is set.
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 void checkActiveException()=0
Function to be called by backends when needing to check for an active exception.
virtual bool isOpen()=0
Return whether a device has been opened or not.
virtual ~DeviceBackend()=default
Every virtual class needs a virtual desctructor.
Catalogue of register information.
The base class for backends providing IO functionality for the Device class.
virtual bool isConnected()=0
Deprecated since 2022-03-03.
virtual std::string readDeviceInfo()=0
Return a device information string containing hardware details like the firmware version number or th...
virtual void open()=0
Open the device.
virtual RegisterCatalogue getRegisterCatalogue() const =0
Return the register catalogue with detailed information on all registers.
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.
Class to store a register path name.
virtual MetadataCatalogue getMetadataCatalogue() const =0
Return the device metadata catalogue.
virtual void close()=0
Close the device.
#define CALL_VIRTUAL_FUNCTION_TEMPLATE(functionName, templateArgument,...)
Execute the virtual function template call using the vtable defined with the DEFINE_VIRTUAL_FUNCTION_...
Set of AccessMode flags with additional functionality for an easier handling.