4#include <ChimeraTK/Device.h>
5#include <ChimeraTK/Utilities.h>
30 for(
size_t i = 0; i < twoDAccessor.
getNChannels(); ++i) {
31 std::cout <<
"Channel " << i <<
":";
32 std::vector<double>& channel = twoDAccessor[i];
33 for(
double sample : channel) {
34 std::cout <<
" " << sample;
36 std::cout << std::endl;
43 for(
size_t i = 0; i < twoDAccessor.
getNChannels(); ++i) {
45 twoDAccessor[i][j] = i * 100 + j;
Class allows to read/write registers from device.
TwoDRegisterAccessor< UserType > getTwoDRegisterAccessor(const RegisterPath ®isterPathName, size_t numberOfElements=0, size_t elementsOffset=0, const AccessModeFlags &flags=AccessModeFlags({})) const
Get a TwoDRegisterAccessor object for the given register.
void close()
Close the device.
void open(std::string const &aliasName)
Open a device by the given alias name from the DMAP file.
bool write(ChimeraTK::VersionNumber versionNumber={})
Write the data to device.
void read()
Read the data from the device.
Accessor class to read and write 2D registers.
size_t getNElementsPerChannel() const
Return number of elements/samples per channel.
size_t getNChannels() const
Return the number of channels (formerly called sequences)
void setDMapFilePath(std::string dmapFilePath)
Set the location of the dmap file.