Newer
Older
Martin Christoph Hierholzer
committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* ApplicationCore.h
*
* Created on: Jun 14, 2016
* Author: Martin Hierholzer
*
* This is the main header file for the ApplicationCore library. It brings all includes and functionality needed
* for writing an application.
*/
#include "Application.h"
#include "ScalarAccessor.h"
#include "ApplicationModule.h"
#ifndef CHIMERATK_APPLICATION_CORE_H
#define CHIMERATK_APPLICATION_CORE_H
/** Compile-time switch: two executables will be created. One will generate an XML file containing the
* application's variable list. The other will be the actual control system server running the
* application. */
#ifndef GENERATE_XML
/** @todo TODO This works for DOOCS only. We need a common interface for all control system adapter
* implementations to generate server executables! */
#include <ControlSystemAdapter-DoocsAdapter/DoocsAdapter.h>
BEGIN_DOOCS_SERVER("Control System Adapter", 10)
// 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();
END_DOOCS_SERVER()
#else
int main(int argc, char **argv) {
ChimeraTK::Application::getInstance().generateXML();
return 0;
}
#endif /* GENERATE_XML */
#endif /* CHIMERATK_APPLICATION_CORE_H */