API for the EEROS Real-Time Robotics Framework
eeros::safety::SafetySystem Class Reference

Safety system. More...

#include <SafetySystem.hpp>

Inheritance diagram for eeros::safety::SafetySystem:
Collaboration diagram for eeros::safety::SafetySystem:

Public Member Functions

 SafetySystem (SafetyProperties &properties, double period)
virtual ~SafetySystem ()
SafetyLevelgetCurrentLevel (void)
void triggerEvent (SafetyEvent event, SafetyContext *context=nullptr)
const SafetyPropertiesgetProperties () 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

Detailed Description

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

Constructor & Destructor Documentation

eeros::safety::SafetySystem::SafetySystem ( SafetyProperties properties,
double  period 

Creates a safety system

propertiesSafety properties belonging to this safety system.
periodThe period determines the speed, which the executor will run the safety system.
eeros::safety::SafetySystem::~SafetySystem ( )

Destructor, do not call manually.

Member Function Documentation

void eeros::safety::SafetySystem::exitHandler ( )

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.

The current safety level.
double eeros::safety::SafetySystem::getPeriod ( ) const

Getter function for the period value.

The period of the safety system.
const SafetyProperties * eeros::safety::SafetySystem::getProperties ( ) const

Getter function for the current safety properties.

The current safety properties.
void eeros::safety::SafetySystem::run ( )

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.

eventThe safety event to be fired.
contextThe context, in which the event is fired, this could be public or private.

Member Data Documentation

logger::Logger eeros::safety::SafetySystem::log

This logger is used to put out information about the safety system

The documentation for this class was generated from the following files: