9#include <boost/pointer_cast.hpp>
16 class NumericAddressedLowLevelTransferElement;
17 class TriggeredPollDistributor;
23 std::unique_ptr<NumericAddressedRegisterCatalogue> registerMapPointer =
24 std::make_unique<NumericAddressedRegisterCatalogue>(),
25 const std::string& dataConsistencyKeyDescriptor =
"");
34 virtual void read(uint64_t bar, uint64_t address, int32_t* data,
size_t sizeInBytes);
41 virtual void write(uint64_t bar, uint64_t address, int32_t
const* data,
size_t sizeInBytes);
50 [[deprecated]]
virtual void read([[maybe_unused]] uint8_t bar, [[maybe_unused]] uint32_t address,
51 [[maybe_unused]] int32_t* data, [[maybe_unused]]
size_t sizeInBytes);
60 [[deprecated]]
virtual void write([[maybe_unused]] uint8_t bar, [[maybe_unused]] uint32_t address,
61 [[maybe_unused]] int32_t
const* data, [[maybe_unused]]
size_t sizeInBytes);
145 template<typename BackendSpecificUserType>
165 template<class UserType, class ConverterType>
169 template<typename UserType>
175 template<typename UserType>
180 std::atomic_bool _asyncIsActive{
false};
185 template<
typename BackendSpecificUserType>
187 [[maybe_unused]]
size_t asyncDomainId) {
188 static_assert(std::is_same<BackendSpecificUserType, std::nullptr_t>::value,
189 "NumericAddressedBackend only supports async::Domain<nullptr_t>.");
Set of AccessMode flags with additional functionality for an easier handling.
DeviceBackendImpl implements some basic functionality which should be available for all backends.
N-dimensional register accessor.
Base class for address-based device backends (e.g.
MetadataCatalogue _metadataCatalogue
metadata catalogue
RegisterCatalogue getRegisterCatalogue() const override
Return the register catalogue with detailed information on all registers.
std::unique_ptr< NumericAddressedRegisterCatalogue > _registerMapPointer
friend TriggeredPollDistributor
virtual bool barIndexValid(uint64_t bar)
Function to be implemented by the backends.
NumericAddressedRegisterCatalogue & _registerMap
NumericAddressedRegisterInfo getRegisterInfo(const RegisterPath ®isterPathName)
getRegisterInfo returns a NumericAddressedRegisterInfo object for the given register.
void setExceptionImpl() noexcept override
Turn off the internal variable which remembers that async is active.
void close() final
Deactivates all asynchronous accessors and calls closeImpl().
virtual bool canMergeRequests() const
Determines whether the backend supports merging of requests (read or write)
MetadataCatalogue getMetadataCatalogue() const override
Return the device metadata catalogue.
void activateAsyncRead() noexcept override
Activate asyncronous read for all transfer elements where AccessMode::wait_for_new_data is set.
virtual size_t minimumTransferAlignment(uint64_t bar) const
Determines the supported minimum alignment for any read/write requests.
virtual void closeImpl()
All backends derrived from NumericAddressedBackend must implement closeImpl() instead of close.
~NumericAddressedBackend() override=default
virtual std::future< void > activateSubscription(uint32_t interruptNumber, boost::shared_ptr< async::DomainImpl< std::nullptr_t > > asyncDomain)
Activate/create the subscription for a given interrupt (for instance by starting the according interr...
std::mutex _unalignedAccess
mutex for protecting unaligned access
std::pair< BackendSpecificUserType, VersionNumber > getAsyncDomainInitialValue(size_t asyncDomainId)
Get the initial value for a certain async::Domain.
Implementation of the NDRegisterAccessor for NumericAddressedBackends for multiplexd 2D registers.
Implementation of the NDRegisterAccessor for NumericAddressedBackends, responsible for the underlying...
Catalogue of register information.
Class to store a register path name.
Class for generating and holding version numbers without exposing a numeric representation.