OpenDaVINCI  4.15.3
RuntimeEnvironment.h
Go to the documentation of this file.
1 
20 #ifndef CONTEXT_BASE_RUNTIMEENVIRONMENT_H_
21 #define CONTEXT_BASE_RUNTIMEENVIRONMENT_H_
22 
23 #include <vector>
24 
27 
28 namespace odcore { namespace base { namespace module { class TimeTriggeredConferenceClientModule; } } }
29 
30 namespace odcontext {
31  namespace base {
32 
33 class SystemFeedbackComponent;
34 class SystemReportingComponent;
35 
36  using namespace std;
37 
43  private:
44  enum FALLBACK_TIMESTEP {
45  DEFAULT_TIMESTEP = 1000,
46  };
47 
48  private:
55 
61  RuntimeEnvironment& operator=(const RuntimeEnvironment&);
62 
63  public:
65 
66  virtual ~RuntimeEnvironment();
67 
75 
82  void add(SystemFeedbackComponent &sfc);
83 
90  void add(SystemReportingComponent &src);
91 
99  uint32_t getGreatestTimeStep() const;
100 
106  vector<odcore::base::module::TimeTriggeredConferenceClientModule*> getListOfTimeTriggeredConferenceClientModules();
107 
113  vector<SystemFeedbackComponent*> getListOfSystemFeedbackComponents();
114 
120  vector<SystemReportingComponent*> getListOfSystemReportingComponents();
121 
126  void beginExecution();
127 
134  bool isValid() const;
135 
142  bool isExecuting() const;
143 
144  private:
152  uint32_t getGreatestCommonDivisor(const uint32_t &a, const uint32_t &b) const;
153 
154  private:
155  mutable odcore::base::Mutex m_listsMutex;
156 
157  vector<odcore::base::module::TimeTriggeredConferenceClientModule*> m_listOfTimeTriggeredConferenceClientModules;
158  vector<SystemFeedbackComponent*> m_listOfSystemFeedbackComponents;
159  vector<SystemReportingComponent*> m_listOfSystemReportingComponents;
160 
161  mutable odcore::base::Mutex m_executingMutex;
162  bool m_executing;
163  };
164 
165  }
166 } // odcontext::base
167 
168 #endif /*CONTEXT_BASE_RUNTIMEENVIRONMENT_H_*/
Definition: base/Mutex.h:49
Definition: SystemReportingComponent.h:36
Definition: TimeTriggeredConferenceClientModule.h:96
#define OPENDAVINCI_API
Definition: opendavinci.h:67
Definition: SystemFeedbackComponent.h:38
Definition: RuntimeEnvironment.h:42