Skip to content
Snippets Groups Projects
Commit cd8d3b13 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

fixed poll-type inputs using no longer non-blocking read after the switch to...

fixed poll-type inputs using no longer non-blocking read after the switch to the NDRegisterAccessorBridge-based accessors
parent ac6cb0ca
No related branches found
No related tags found
No related merge requests found
...@@ -69,6 +69,8 @@ namespace ChimeraTK { ...@@ -69,6 +69,8 @@ namespace ChimeraTK {
: ArrayAccessor<UserType>(owner, name, VariableDirection::consuming, unit, nElements, UpdateMode::poll, description) : ArrayAccessor<UserType>(owner, name, VariableDirection::consuming, unit, nElements, UpdateMode::poll, description)
{} {}
ArrayPollInput() : ArrayAccessor<UserType>() {} ArrayPollInput() : ArrayAccessor<UserType>() {}
void doReadTransfer() override { this->doReadTransferNonBlocking(); }
void read() { this->readNonBlocking(); }
using ArrayAccessor<UserType>::operator=; using ArrayAccessor<UserType>::operator=;
}; };
......
...@@ -32,7 +32,7 @@ namespace ChimeraTK { ...@@ -32,7 +32,7 @@ namespace ChimeraTK {
owner->registerAccessor(*this); owner->registerAccessor(*this);
} }
/** Default constructor creates a dysfunction accessor (to be assigned with a real accessor later) */ /** Default constructor creates a dysfunctional accessor (to be assigned with a real accessor later) */
ScalarAccessor() {} ScalarAccessor() {}
/** Convert into VariableNetworkNode */ /** Convert into VariableNetworkNode */
...@@ -70,6 +70,8 @@ namespace ChimeraTK { ...@@ -70,6 +70,8 @@ namespace ChimeraTK {
: ScalarAccessor<UserType>(owner, name, VariableDirection::consuming, unit, UpdateMode::poll, description) : ScalarAccessor<UserType>(owner, name, VariableDirection::consuming, unit, UpdateMode::poll, description)
{} {}
ScalarPollInput() : ScalarAccessor<UserType>() {} ScalarPollInput() : ScalarAccessor<UserType>() {}
void doReadTransfer() override { this->doReadTransferNonBlocking(); }
void read() { this->readNonBlocking(); }
using ScalarAccessor<UserType>::operator=; using ScalarAccessor<UserType>::operator=;
}; };
......
...@@ -18,7 +18,6 @@ namespace ChimeraTK { ...@@ -18,7 +18,6 @@ namespace ChimeraTK {
void VariableGroup::readAny() { void VariableGroup::readAny() {
auto accessorList = getAccessorListRecursive(); auto accessorList = getAccessorListRecursive();
// put push-type transfer elements into a list suitable for TransferElement::readAny() // put push-type transfer elements into a list suitable for TransferElement::readAny()
std::list<std::reference_wrapper<mtca4u::TransferElement>> transferElementList; std::list<std::reference_wrapper<mtca4u::TransferElement>> transferElementList;
for(auto &accessor : accessorList) { for(auto &accessor : accessorList) {
...@@ -33,7 +32,7 @@ namespace ChimeraTK { ...@@ -33,7 +32,7 @@ namespace ChimeraTK {
// trigger read on the poll-type accessors // trigger read on the poll-type accessors
for(auto accessor : accessorList) { for(auto accessor : accessorList) {
if(accessor.getMode() == UpdateMode::poll) { if(accessor.getMode() == UpdateMode::poll) {
accessor.getAppAccessorNoType().read(); accessor.getAppAccessorNoType().readNonBlocking();
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment