EEROS  1.0.0.0
API for the EEROS Real-Time Robotics Framework
TimeDomain.hpp
Go to the documentation of this file.
1 #ifndef ORG_EEROS_CONTROLTIMEDOMAIN_HPP
2 #define ORG_EEROS_CONTROLTIMEDOMAIN_HPP
3 
4 #include <list>
5 #include <string>
11 
12 namespace eeros {
13  namespace control {
14 
15  using namespace safety;
16 
17  class TimeDomain : public virtual Runnable {
18  public:
19  TimeDomain(std::string name, double period, bool realtime);
20  virtual void addBlock(Runnable* block);
21  virtual void addBlock(Runnable& block);
22  virtual void removeBlock(Runnable* block);
23  virtual void removeBlock(Runnable& block);
24 
25  std::string getName();
26  double getPeriod();
27  bool getRealtime();
28  void registerSafetyEvent(SafetySystem& ss, SafetyEvent& e);
29 
30  virtual void run();
31  virtual void start();
32  virtual void stop();
33 
34  friend std::ostream& operator<<(std::ostream& os, TimeDomain& td);
35 
36  private:
37  std::string name;
38  double period;
39  bool realtime;
40  bool running = true;
41  std::list<Runnable*> blocks;
42  SafetySystem* safetySystem;
43  SafetyEvent* safetyEvent;
44  };
45  };
46 };
47 
48 #endif // ORG_EEROS_CONTROLTIMEDOMAIN_HPP
Safety system.
Definition: SafetySystem.hpp:19
Definition: Config.hpp:14
Definition: Runnable.hpp:6
volatile bool running
Definition: Executor.cpp:25
std::ostream & operator<<(std::ostream &os, Constant< T > &c)
Definition: Constant.hpp:56
Definition: TimeDomain.hpp:17
Definition: SafetyLevel.hpp:21