12 class SubdeviceRegisterAccessor;
63 void close()
override;
70 std::string address, std::map<std::string, std::string> parameters);
124 size_t wordOffsetInRegister,
bool enforceAlignment);
126 template<
typename UserType>
132 template<
typename UserType>
137 template<
typename UserType>
139 const RegisterPath& registerPathName,
size_t numberOfWords,
size_t wordOffsetInRegister,
154 size_t numberOfWords,
size_t wordOffsetInRegister,
AccessModeFlags flags);
Set of AccessMode flags with additional functionality for an easier handling.
DeviceBackendImpl implements some basic functionality which should be available for all backends.
Catalogue of register information.
Class to store a register path name.
Backend for subdevices which are passed through some register or area of another device (subsequently...
std::string targetAddress
for type == threeRegisters or twoRegisters: the name of the target registers
size_t timeout
timeout (in milliseconds), used in threeRegisters to throw a runtime_error if status register stuck a...
std::mutex mutex
Mutex to deal with concurrent access to the device.
NumericAddressedRegisterCatalogue _registerMap
map from register names to addresses
size_t addressToDataDelay
for type == threeRegisters or twoRegisters: sleep time between address and data write
void open() override
Open the device.
static boost::shared_ptr< DeviceBackend > createInstance(std::string address, std::map< std::string, std::string > parameters)
void close() override
Close the device.
MetadataCatalogue getMetadataCatalogue() const override
Return the device metadata catalogue.
std::string targetAlias
the target device name
DEFINE_VIRTUAL_FUNCTION_TEMPLATE_VTABLE_FILLER(SubdeviceBackend, getRegisterAccessor_impl, 4)
void setExceptionImpl() noexcept override
Function to be (optionally) implemented by backends if additional actions are needed when switching t...
MetadataCatalogue _metadataCatalogue
void obtainTargetBackend()
obtain the target backend if not yet done
boost::shared_ptr< NDRegisterAccessor< UserType > > getRegisterAccessor_impl(const RegisterPath ®isterPathName, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags)
std::string targetArea
for type == area: the name of the target register
void verifyRegisterAccessorSize(const NumericAddressedRegisterInfo &info, size_t &numberOfWords, size_t wordOffsetInRegister, bool enforceAlignment)
Check consistency of the passed sizes and offsets against the information in the map file Will adjust...
Type type
type of the subdeivce
boost::shared_ptr< SubdeviceRegisterAccessor > getRegisterAccessor_helper(const NumericAddressedRegisterInfo &info, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags)
size_t sleepTime
for type == threeRegisters or twoRegisters: sleep time of polling loop resp. between operations,...
boost::shared_ptr< ChimeraTK::DeviceBackend > targetDevice
The target device backend itself.
std::string readDeviceInfo() override
Return a device information string containing hardware details like the firmware version number or th...
boost::shared_ptr< NDRegisterAccessor< UserType > > getRegisterAccessor_area(const RegisterPath ®isterPathName, size_t numberOfWords, size_t wordOffsetInRegister, AccessModeFlags flags)
getRegisterAccessor implemenation for area types
RegisterCatalogue getRegisterCatalogue() const override
Return the register catalogue with detailed information on all registers.
void activateAsyncRead() noexcept override
Activate asyncronous read for all transfer elements where AccessMode::wait_for_new_data is set.
std::set< DeviceBackend::BackendID > getInvolvedBackendIDs() override
Get the backend IDs of all involved backends.
boost::shared_ptr< NDRegisterAccessor< UserType > > getRegisterAccessor_synchronized(const RegisterPath ®isterPathName, size_t numberOfWords, size_t wordOffsetInRegister, const AccessModeFlags &flags)
getRegisterAccessor implemenation for threeRegisters types
std::string targetControl