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

check if device needs to be opened in TriggerFanOut as well

parent 50864dab
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,8 @@
#include "Profiler.h"
#include "DeviceModule.h"
constexpr useconds_t DeviceOpenTimeout = 500;
namespace ChimeraTK {
/** InternalModule which waits for a trigger, then reads a number of variables
......@@ -77,6 +79,14 @@ namespace ChimeraTK {
auto lastValidity = DataValidity::ok;
retry:
try {
if(!_deviceModule.device.isOpened()) {
auto version = externalTrigger->getVersionNumber();
//boost::fusion::for_each(fanOutMap.table, SendDataToConsumers(version, DataValidity::faulty));
Application::getInstance().testableModeUnlock("waitForDeviceOpen");
boost::this_thread::sleep(boost::posix_time::millisec(DeviceOpenTimeout));
Application::getInstance().testableModeLock("waitForDeviceOpen");
goto retry;
}
transferGroup.read();
}
catch(ChimeraTK::runtime_error& e) {
......
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