EEROS
1.0.0.0
API for the EEROS Real-Time Robotics Framework
|
Safety system. More...
#include <SafetySystem.hpp>
Public Member Functions | |
SafetySystem (SafetyProperties &properties, double period) | |
virtual | ~SafetySystem () |
SafetyLevel & | getCurrentLevel (void) |
void | triggerEvent (SafetyEvent event, SafetyContext *context=nullptr) |
const SafetyProperties * | getProperties () const |
double | getPeriod () const |
void | run () |
Public Member Functions inherited from eeros::Runnable | |
virtual | ~Runnable () |
Static Public Member Functions | |
static void | exitHandler () |
Public Attributes | |
logger::Logger | log |
Safety system.
Every robot control system needs exactly one safety system. The safety system comprises several safety levels and safety events to switch between these levels
eeros::safety::SafetySystem::SafetySystem | ( | SafetyProperties & | properties, |
double | period | ||
) |
Creates a safety system
properties | Safety properties belonging to this safety system. |
period | The period determines the speed, which the executor will run the safety system. |
|
virtual |
Destructor, do not call manually.
|
static |
This method can be used to shut the system down gracefully when stopping a program with signals, e.g. SIGINT. Register a signal handler and call this function from there.
SafetyLevel & eeros::safety::SafetySystem::getCurrentLevel | ( | void | ) |
Getter function for the current safety level.
double eeros::safety::SafetySystem::getPeriod | ( | ) | const |
Getter function for the period value.
const SafetyProperties * eeros::safety::SafetySystem::getProperties | ( | ) | const |
Getter function for the current safety properties.
|
virtual |
The executor will call this method when the safety system has to run. Do not call manually.
Implements eeros::Runnable.
void eeros::safety::SafetySystem::triggerEvent | ( | SafetyEvent | event, |
SafetyContext * | context = nullptr |
||
) |
Causes a fire a safety event. Make sure that this event is registered for the actual safety level and that it is a public event in case of being fired from outside of the safety system.
event | The safety event to be fired. |
context | The context, in which the event is fired, this could be public or private. |
logger::Logger eeros::safety::SafetySystem::log |
This logger is used to put out information about the safety system