Example how to read a one-dimensional array.
Example how to read a one-dimensional array.
#include <ChimeraTK/Device.h>
#include <ChimeraTK/Utilities.h>
#include <iostream>
std::cout <<
"The clocks register has " << clocks.
getNElements() <<
" elements." << std::endl;
clocks[i] = 42 + i;
}
std::cout << "Clocks are";
for(auto clockValue : clocks) {
std::cout << " " << clockValue;
}
std::cout << std::endl;
return 0;
}
Class allows to read/write registers from device.
void close()
Close the device.
OneDRegisterAccessor< UserType > getOneDRegisterAccessor(const RegisterPath ®isterPathName, size_t numberOfWords=0, size_t wordOffsetInRegister=0, const AccessModeFlags &flags=AccessModeFlags({})) const
Get a OneDRegisterAccessor 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 registers transparently by using the accessor object like a vector o...
unsigned int getNElements()
Return number of elements/samples in the register.
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.