32 for(
auto& pv :
_pvManager->getAllProcessVariables()) {
33 callForType(pv->getValueType(), [&pv,
this](
auto arg) {
34 using T = decltype(arg);
39 if(!pv->isWriteable()) {
44 if(pv->getVersionNumber() != VersionNumber(
nullptr)) {
45 throw ChimeraTK::logic_error(
"The variable '" + pv->getName() +
46 "' has been written before TestFacility::runApplication() was called. Instead use "
47 "TestFacility::setScalarDefault() resp. setArrayDefault() to set initial values.");
51 auto pv_casted = boost::dynamic_pointer_cast<NDRegisterAccessor<T>>(pv);
54 if constexpr(!std::is_same<T, ChimeraTK::Void>::value) {
55 auto table = boost::fusion::at_key<T>(
_defaults.table);
56 if(table.find(pv->getName()) != table.end()) {
61 if(pv_casted->getNumberOfSamples() == 1) {
62 auto accessor = this->getScalar<T>(pv->getName());
63 accessor = table.at(pv->getName())[0];
66 auto accessor = this->getArray<T>(pv->getName());
67 accessor = table.at(pv->getName());
70 pv_casted->accessChannel(0) = table.at(pv->getName());
84 if(_app.getTestableMode()._enabled) {
86 if(_app.getTestableMode()._counter != 0 || _app.getTestableMode()._deviceInitialisationCounter != 0) {
92 if(_app.getTestableMode()._enabled) {
93 for(
auto& pv : _pvManager->getAllProcessVariables()) {
94 if(!pv->isReadable()) {
97 callForTypeNoVoid(pv->getValueType(), [&](
auto t) {
98 using UserType = decltype(t);
99 this->getArray<UserType>(pv->getName()).readNonBlocking();