A special case: The 2D register might have multiplexed data on the backend side (backend specific implementation of the TwoDRegisterAccessor).
A special case: The 2D register might have multiplexed data on the backend side (backend specific implementation of the TwoDRegisterAccessor).
#include <ChimeraTK/Device.h>
#include <ChimeraTK/Utilities.h>
#include <iostream>
int counter = 0;
for(auto& dataWord : dataRegion) {
dataWord = counter++;
}
dataRegion.write();
std::cout << "Channel " << i << ":";
std::vector<double>& channel = twoDAccessor[i];
for(double sample : channel) {
std::cout << " " << sample;
}
std::cout << std::endl;
}
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.
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.
void read()
Read the data from the device.
Accessor class to read and write 2D registers.
size_t getNChannels() const
Return the number of channels (formerly called sequences)
void setDMapFilePath(std::string dmapFilePath)
Set the location of the dmap file.