Example how to read and write a single register.
Example how to read and write a single register.
#include <ChimeraTK/Device.h>
#include <ChimeraTK/Utilities.h>
#include <iostream>
temperatureSetPoint.
read();
std::cout << "Current temperature set point is " << temperatureSetPoint << std::endl;
temperatureSetPoint += 1.5;
std::cout << "Temperature set point changed to " << temperatureSetPoint << std::endl;
temperatureSetPoint.
write();
return 0;
}
Class allows to read/write registers from device.
void close()
Close the device.
ScalarRegisterAccessor< UserType > getScalarRegisterAccessor(const RegisterPath ®isterPathName, size_t wordOffsetInRegister=0, const AccessModeFlags &flags=AccessModeFlags({})) const
Get a ScalarRegisterObject object for the given register.
void open(std::string const &aliasName)
Open a device by the given alias name from the DMAP file.
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.
void setDMapFilePath(std::string dmapFilePath)
Set the location of the dmap file.