|
ChimeraTK-DeviceAccess
03.18.00
|
Go to the documentation of this file.
9 #include <boost/pointer_cast.hpp>
16 class NumericAddressedLowLevelTransferElement;
17 class TriggeredPollDistributor;
23 std::unique_ptr<NumericAddressedRegisterCatalogue> registerMapPointer =
24 std::make_unique<NumericAddressedRegisterCatalogue>());
33 virtual void read(uint64_t bar, uint64_t address, int32_t* data,
size_t sizeInBytes);
40 virtual void write(uint64_t bar, uint64_t address, int32_t
const* data,
size_t sizeInBytes);
49 [[deprecated]]
virtual void read([[maybe_unused]] uint8_t bar, [[maybe_unused]] uint32_t address,
50 [[maybe_unused]] int32_t* data, [[maybe_unused]]
size_t sizeInBytes);
59 [[deprecated]]
virtual void write([[maybe_unused]] uint8_t bar, [[maybe_unused]] uint32_t address,
60 [[maybe_unused]] int32_t
const* data, [[maybe_unused]]
size_t sizeInBytes);
144 template<typename BackendSpecificUserType>
164 template<class UserType, class ConverterType>
168 template<typename UserType>
174 template<typename UserType>
179 std::atomic_bool _asyncIsActive{
false};
184 template<
typename BackendSpecificUserType>
186 [[maybe_unused]]
size_t asyncDomainId) {
187 static_assert(std::is_same<BackendSpecificUserType, std::nullptr_t>::value,
188 "NumericAddressedBackend only supports async::Domain<nullptr_t>.");
MetadataCatalogue _metadataCatalogue
metadata catalogue
virtual void closeImpl()
All backends derrived from NumericAddressedBackend must implement closeImpl() instead of close.
void close() final
Deactivates all asynchronous accessors and calls closeImpl().
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.
Catalogue of register information.
virtual void write(uint64_t bar, uint64_t address, int32_t const *data, size_t sizeInBytes)
Write function to be implemented by backends.
virtual void read(uint64_t bar, uint64_t address, int32_t *data, size_t sizeInBytes)
Read function to be implemented by backends.
void activateAsyncRead() noexcept override
Activate asyncronous read for all transfer elements where AccessMode::wait_for_new_data is set.
NumericAddressedRegisterCatalogue & _registerMap
Base class for address-based device backends (e.g.
~NumericAddressedBackend() override=default
virtual bool canMergeRequests() const
Determines whether the backend supports merging of requests (read or write)
virtual size_t minimumTransferAlignment([[maybe_unused]] uint64_t bar) const
Determines the supported minimum alignment for any read/write requests.
RegisterCatalogue getRegisterCatalogue() const override
Return the register catalogue with detailed information on all registers.
virtual bool barIndexValid(uint64_t bar)
Function to be implemented by the backends.
NumericAddressedRegisterInfo getRegisterInfo(const RegisterPath ®isterPathName)
getRegisterInfo returns a NumericAddressedRegisterInfo object for the given register.
std::unique_ptr< NumericAddressedRegisterCatalogue > _registerMapPointer
friend TriggeredPollDistributor
Implementation of the NDRegisterAccessor for NumericAddressedBackends, responsible for the underlying...
DeviceBackendImpl implements some basic functionality which should be available for all backends.
NumericAddressedBackend(const std::string &mapFileName="", std::unique_ptr< NumericAddressedRegisterCatalogue > registerMapPointer=std::make_unique< NumericAddressedRegisterCatalogue >())
Class to store a register path name.
MetadataCatalogue getMetadataCatalogue() const override
Return the device metadata catalogue.
Class for generating and holding version numbers without exposing a numeric representation.
void setExceptionImpl() noexcept override
Turn off the internal variable which remembers that async is active.
Set of AccessMode flags with additional functionality for an easier handling.
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...
N-dimensional register accessor.
Implementation of the NDRegisterAccessor for NumericAddressedBackends for multiplexd 2D registers.