Example how to activate AccessMode::wait_for_new_data.
Example how to activate AccessMode::wait_for_new_data.
#include <ChimeraTK/Device.h>
#include <iostream>
d.
open(
"(doocs:TEST.DOOCS/LOCALHOST_610498009/Bakery)");
auto temperature =
while(true) {
temperature.read();
std ::cout << "The temperature is " << temperature << " degC. " << std ::endl;
}
}
Class allows to read/write registers from 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 activateAsyncRead() noexcept
Activate asyncronous read for all transfer elements where AccessMode::wait_for_new_data is set.
void open(std::string const &aliasName)
Open a device by the given alias name from the DMAP file.
@ wait_for_new_data
Make any read blocking until new data has arrived since the last read.