An example how to use the TwoDRegisterAccessor.
An example how to use the TwoDRegisterAccessor
#include <ChimeraTK/Device.h>
#include <ChimeraTK/Utilities.h>
#include <iostream>
std::cout << "Channel " << i << ":";
std::vector<double>& channel = twoDAccessor[i];
for(double sample : channel) {
std::cout << " " << sample;
}
std::cout << std::endl;
}
twoDAccessor[i][j] = i * 100 + j;
}
}
return 0;
}
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.