11#include <boost/shared_ptr.hpp>
24 template<
class UserType>
28 size_t elementsOffset,
const boost::shared_ptr<DeviceBackend>& _backend);
50 [[nodiscard]]
bool mayReplaceOther(
const boost::shared_ptr<TransferElement const>& other)
const override {
51 auto rhsCasted = boost::dynamic_pointer_cast<const NumericAddressedBackendMuxedRegisterAccessor<UserType>>(other);
52 if(rhsCasted.get() ==
this) {
55 if(!rhsCasted)
return false;
56 if(
_ioDevice != rhsCasted->_ioDevice)
return false;
96 boost::shared_ptr<NumericAddressedBackend>
_ioDevice;
103 return {boost::enable_shared_from_this<TransferElement>::shared_from_this()};
#define DECLARE_TEMPLATE_FOR_CHIMERATK_USER_TYPES(TemplateClass)
N-dimensional register accessor.
std::vector< std::vector< UserType > > buffer_2D
Buffer of converted data elements.
Implementation of the NDRegisterAccessor for NumericAddressedBackends for multiplexd 2D registers.
void doPostReadImpl(RawConverter::Converter< UserType2, RawType, sc, fc, isSigned > converter, size_t channelGroupId)
bool mayReplaceOther(const boost::shared_ptr< TransferElement const > &other) const override
Check whether the TransferElement can be used in places where the TransferElement "other" is currentl...
bool isWriteable() const override
Check if transfer element is writeable.
void doReadTransferSynchronously() override
Implementation version of readTransfer() for synchronous reads.
std::vector< ChannelGroup > _channelGroups
bool isReadOnly() const override
Check if transfer element is read only, i.e.
void doPostRead(TransferType type, bool hasNewData) override
Backend specific implementation of postRead().
bool doWriteTransfer(ChimeraTK::VersionNumber versionNumber) override
Implementation version of writeTransfer().
void doPreWriteImpl(RawConverter::Converter< UserType2, RawType, sc, fc, isSigned > converter, size_t channelGroupId)
void doPreWrite(TransferType type, VersionNumber versionNumber) override
Backend specific implementation of preWrite().
void doPreRead(TransferType) override
Backend specific implementation of preRead().
std::vector< boost::shared_ptr< TransferElement > > getHardwareAccessingElements() override
Obtain the underlying TransferElements with actual hardware access.
std::list< boost::shared_ptr< TransferElement > > getInternalElements() override
Obtain the full list of TransferElements internally used by this TransferElement.
std::vector< int32_t > _ioBuffer
bool isReadable() const override
Check if transfer element is readable.
NumericAddressedRegisterInfo _registerInfo
boost::shared_ptr< NumericAddressedBackend > _ioDevice
The device from (/to) which to perform the DMA transfer.
void replaceTransferElement(boost::shared_ptr< TransferElement >) override
Search for all underlying TransferElements which are considered identical (see sameRegister()) with t...
bool isReadable() const override
Return whether the register is readable.
bool isWriteable() const override
Return whether the register is writeable.
Converter class for conversions from raw to cooked values.
Class to store a register path name.
boost::shared_ptr< DeviceBackend > _exceptionBackend
The backend to which the runtime_errors are reported via DeviceBackend::setException().
Class for generating and holding version numbers without exposing a numeric representation.
Exception thrown when a logic error has occured.
constexpr auto MULTIPLEXED_SEQUENCE_PREFIX
constexpr auto SEQUENCE_PREFIX
constexpr auto MEM_MULTIPLEXED_PREFIX
TransferType
Used to indicate the applicable operation on a Transferelement.
std::vector< UserType >::iterator cookedIterator
std::vector< Channel > channels
std::unique_ptr< RawConverter::ConverterLoopHelper > converterLoopHelper