|
ChimeraTK-DeviceAccess
03.18.00
|
Go to the documentation of this file.
8 #include <boost/function.hpp>
62 void read(uint64_t bar, uint64_t address, int32_t* data,
size_t sizeInBytes)
override;
63 void write(uint64_t bar, uint64_t address, int32_t
const* data,
size_t sizeInBytes)
override;
68 std::string address, std::map<std::string, std::string> parameters);
113 void setReadOnly(uint64_t bar, uint64_t address,
size_t sizeInWords);
115 bool isReadOnly(uint64_t bar, uint64_t address)
const;
void read([[maybe_unused]] uint8_t bar, [[maybe_unused]] uint32_t address, [[maybe_unused]] int32_t *data, [[maybe_unused]] size_t sizeInBytes) final
You cannot override the read version with 32 bit address any more.
Register accessor for accessing single word or 1D array registers internally of a DummyBackend implem...
Base class for DummyBackends, provides common functionality.
void write(uint64_t bar, uint64_t address, int32_t const *data, size_t sizeInBytes) override
Write function to be implemented by backends.
DummyBackend(const std::string &mapFileName)
The shared dummy device opens a mapping file defining the registers and implements them in shared mem...
std::list< boost::function< void(void)> > findCallbackFunctionsForAddressRange(AddressRange addressRange)
Register accessor for accessing multiplexed 2D array registers internally of a DummyBackend implement...
bool operator<(AddressRange const &right) const
void writeRegisterWithoutCallback(uint64_t bar, uint64_t address, int32_t data)
Not write-protected function for internal use only.
bool isReadOnly(uint64_t bar, uint64_t address) const
std::set< std::pair< uint64_t, uint64_t > > _readOnlyAddresses
void setWriteCallbackFunction(AddressRange addressRange, boost::function< void(void)> const &writeCallbackFunction)
void open() override
Open the device.
DummyRegisterRawAccessor getRawAccessor(const std::string &module, const std::string ®ister_name)
Get a raw accessor to the underlying memory with the convenience of using register names.
std::multimap< AddressRange, boost::function< void(void)> > _writeCallbackFunctions
void runWriteCallbackFunctionsForAddressRange(AddressRange addressRange)
void write([[maybe_unused]] uint8_t bar, [[maybe_unused]] uint32_t address, [[maybe_unused]] int32_t const *data, [[maybe_unused]] size_t sizeInBytes) final
You cannot override the write version with 32 bit address any more.
void setReadOnly(uint64_t bar, uint64_t address, size_t sizeInWords)
const uint32_t sizeInBytes
std::map< uint64_t, std::vector< int32_t > > _barContents
void read(uint64_t bar, uint64_t address, int32_t *data, size_t sizeInBytes) override
Read function to be implemented by backends.
Accessor for raw 32 bit integer access to the underlying memory space.
uint32_t elementPitchBits
Distance in bits (!) between two elements (of the same channel)
AddressRange(uint64_t bar_, uint64_t address, size_t sizeInBytes_)
~DummyBackend() override=default
Class for generating and holding version numbers without exposing a numeric representation.
The dummy device opens a mapping file instead of a device, and implements all registers defined in th...
VersionNumber triggerInterrupt(uint32_t interruptNumber) override
Simulate the arrival of an interrupt.
static std::string convertPathRelativeToDmapToAbs(std::string const &mapfileName)
std::string _mapFile
name of the map file
bool isWriteRangeOverlap(AddressRange firstRange, AddressRange secondRange)
returns true if the ranges overlap and at least one of the overlapping registers can be written
std::string readDeviceInfo() override
Return a device information string containing hardware details like the firmware version number or th...
AddressRange(const NumericAddressedRegisterInfo &info)
static boost::shared_ptr< DeviceBackend > createInstance(std::string address, std::map< std::string, std::string > parameters)
void closeImpl() override
This closes the device, clears all internal registers, read-only settings and callback functions.