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

simplification: read all inputs once

parent c832e0b4
No related branches found
No related tags found
No related merge requests found
......@@ -11,16 +11,15 @@
namespace ChimeraTK {
void ApplicationModule::run() {
assert(!moduleThread.joinable());
// read all control system to application variables once, to set the startup value e.g. coming from the config file
// read all input variables once, to set the startup value e.g. coming from the config file
// (without triggering an action inside the application)
for(auto &variable : getAccessorList()) {
if( variable->getNode().getOwner().getFeedingNode().getType() == NodeType::ControlSystem ) {
variable->readNonBlocking();
}
if(variable->getDirection() == VariableDirection::consuming) variable->readNonBlocking();
}
// start the module thread
assert(!moduleThread.joinable());
moduleThread = boost::thread(&ApplicationModule::mainLoopWrapper, this);
}
......
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