User Tools

Site Tools


eeros_architecture:safety_system:properties

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
eeros_architecture:safety_system:properties [2017/07/25 08:48] – [Safety Events] grafeeros_architecture:safety_system:properties [2017/09/26 11:44] – [Level Actions] graf
Line 77: Line 77:
 Define actions for the safety levels. Each level can cause no or one action. Define actions for the safety levels. Each level can cause no or one action.
 <code cpp> <code cpp>
-  slOff.setLevelAction([&](SafetyContext* privateContext) {+  slOff.setLevelAction([this](SafetyContext* privateContext) {
     privateContext->triggerEvent(seDoSwInit);     privateContext->triggerEvent(seDoSwInit);
   });   });
Line 87: Line 87:
 Each time that the safety system runs in a certain level a counter named ''nofActivations'' is incremented. Whenever the safety level due to an event this counter will be reset to 0. This allows for measuring the time the system will run in a given safety level. The following example demonstrates this.  Each time that the safety system runs in a certain level a counter named ''nofActivations'' is incremented. Whenever the safety level due to an event this counter will be reset to 0. This allows for measuring the time the system will run in a given safety level. The following example demonstrates this. 
 <code cpp> <code cpp>
-  slRunning.setLevelAction([&](SafetyContext* privateContext) {+  slRunning.setLevelAction([this,period](SafetyContext* privateContext) {
     if (slRunning.getNofActivations() * period >= 60.0)     if (slRunning.getNofActivations() * period >= 60.0)
       privateContext->triggerEvent(seStop);       privateContext->triggerEvent(seStop);
eeros_architecture/safety_system/properties.txt · Last modified: 2024/06/10 09:45 by ursgraf