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

bug fix: when using multiple locations, the application was initialised once per location

parent f4f5c15a
No related branches found
No related tags found
No related merge requests found
......@@ -27,12 +27,16 @@
#include <ControlSystemAdapter-DoocsAdapter/DoocsAdapter.h>
BEGIN_DOOCS_SERVER("Control System Adapter", 10)
// set the DOOCS server name to the application name
object_name = ChimeraTK::Application::getInstance().getName().c_str();
// Create static instances for all applications cores. They must not have overlapping
// process variable names ("location/protery" must be unique).
ChimeraTK::Application::getInstance().setPVManager(doocsAdapter.getDevicePVManager());
ChimeraTK::Application::getInstance().run();
static bool isInitialised = false;
if(!isInitialised) {
// set the DOOCS server name to the application name
object_name = ChimeraTK::Application::getInstance().getName().c_str();
// Create static instances for all applications cores. They must not have overlapping
// process variable names ("location/protery" must be unique).
ChimeraTK::Application::getInstance().setPVManager(doocsAdapter.getDevicePVManager());
ChimeraTK::Application::getInstance().run();
isInitialised = true;
}
END_DOOCS_SERVER()
#else
......
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