During firmware development one might need to access registers without having a map file.
This is only supported by backends based on the NumericAddressedBackend: the PcieBackend, the RebotBackend and the DummyBackend. The access can be realised through specifying the register address and length in a special register name. Inside the C++ code, the NumericAddress::BAR constant can be used. This notation can be used in any context where a RegisterPath name is expected. Outside C++, e.g. when using the command line tools, a "#" character has to be used instead of the BAR constant, e.g.: #/0/32*4
#include <ChimeraTK/Device.h>
#include <ChimeraTK/NumericAddress.h>
#include <iostream>
myDevice.open();
temperatureSetPoint.
read();
std::cout << "Current temperature set point is " << temperatureSetPoint << std::endl;
temperatureSetPoint += 15;
std::cout << "Temperature set point changed to " << temperatureSetPoint << std::endl;
temperatureSetPoint.
write();
myDevice.close();
return 0;
}
Class allows to read/write registers from device.
Accessor class to read and write scalar registers transparently by using the accessor object like a v...
bool write(ChimeraTK::VersionNumber versionNumber={})
Write the data to device.
void read()
Read the data from the device.
RegisterPath BAR()
The numeric_address::BAR() function can be used to directly access registers by numeric addresses,...