EEROS  0.4.1.0
API for the EEROS Real-Time Robotics Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SafetySystem.hpp
Go to the documentation of this file.
1 #ifndef ORG_EEROS_SAFETY_SAFETYSYSTEM_HPP_
2 #define ORG_EEROS_SAFETY_SAFETYSYSTEM_HPP_
3 
4 #include <vector>
11 
12 namespace eeros {
13  namespace safety {
14 
15  // Forward declarations
16  class SystemInputInterface;
17  class SystemOutputInterface;
18 
19  class SafetySystem : private PeriodicThread {
20  public:
21  SafetySystem(SafetyProperties properties, double period);
22  virtual ~SafetySystem();
24  SafetyLevel& getLevelById(int32_t levelId);
25  SafetyLevel& operator[](unsigned levelId);
26 
27  void triggerEvent(uint32_t event, SafetyContext* context = nullptr);
28  void shutdown();
29  const SafetyProperties* getProperties() const;
30 
32 
33  protected:
34  void run();
35  private:
36  bool setProperties(SafetyProperties safetyProperties);
37 
38  SafetyProperties properties;
39  SafetyLevel* currentLevel;
40  SafetyContext privateContext;
41  static uint8_t instCount;
42  };
43 
44  };
45 };
46 
47 #endif // ORG_EEROS_SAFETY_SAFETYSYSTEM_HPP_
SafetyLevel & operator[](unsigned levelId)
Definition: SafetySystem.cpp:61
SafetyLevel & getLevelById(int32_t levelId)
Definition: SafetySystem.cpp:54
Definition: SafetySystem.hpp:19
void shutdown()
Definition: SafetySystem.cpp:31
Definition: PeriodicThread.hpp:10
Definition: SafetyLevel.hpp:21
SafetySystem(SafetyProperties properties, double period)
Definition: SafetySystem.cpp:9
Definition: SafetyContext.hpp:11
logger::Logger< logger::LogWriter > log
Definition: SafetySystem.hpp:31
void triggerEvent(uint32_t event, SafetyContext *context=nullptr)
Definition: SafetySystem.cpp:65
void run()
Definition: SafetySystem.cpp:98
virtual ~SafetySystem()
Definition: SafetySystem.cpp:23
const SafetyProperties * getProperties() const
Definition: SafetySystem.cpp:94
SafetyLevel & getCurrentLevel(void)
Definition: SafetySystem.cpp:36
Definition: SafetyProperties.hpp:15