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 revision
Previous revision
eeros_architecture:safety_system:properties [2026/04/12 14:44] – [Safety Levels] ursgrafeeros_architecture:safety_system:properties [2026/04/12 14:47] (current) – [Entry Level] ursgraf
Line 52: Line 52:
   SafetyEvent seStartRunning("start running");   SafetyEvent seStartRunning("start running");
  
-  slOff.addEvent(seStartInitializing, slIinitializing, kPublicEvent);+  slBoot.addEvent(seStartInitializing, slIinitializing, kPublicEvent);
   slIinitializing.addEvent(seStartRunning, slRunning, kPrivateEvent);   slIinitializing.addEvent(seStartRunning, slRunning, kPrivateEvent);
   slRunning.addEvent(seShutDown, slOff, kPublicEvent);   slRunning.addEvent(seShutDown, slOff, kPublicEvent);
Line 79: Line 79:
 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([this](SafetyContext* privateContext) { +  slBoot.setLevelAction([this](SafetyContext* privateContext) { 
-    privateContext->triggerEvent(seDoSwInit);+    privateContext->triggerEvent(seStartInitializing);
   });   });
 </code> </code>
Line 88: Line 88:
 You also have the possibility to define an action which is executed when a safety level is entered. That means when the safety system switches to this level. You also have the possibility to define an action which is executed when a safety level is entered. That means when the safety system switches to this level.
 <code cpp> <code cpp>
-  slOff.setEntryAction([this](SafetyContext* privateContext) {+  slIinitializing.setEntryAction([this](SafetyContext* privateContext) {
     // do anything     // do anything
   });   });
Line 95: Line 95:
 Further, you can define an action which is executed when a safety level is left. That means when the safety system switches from this level to another level. Further, you can define an action which is executed when a safety level is left. That means when the safety system switches from this level to another level.
 <code cpp> <code cpp>
-  slOff.setExitAction([this](SafetyContext* privateContext) {+  slIinitializing.setExitAction([this](SafetyContext* privateContext) {
     // do anything     // do anything
   });   });
Line 112: Line 112:
 As a last point, you have to specify with which level the system has to start. As a last point, you have to specify with which level the system has to start.
 <code c> <code c>
-  setEntryLevel(slOff);+  setEntryLevel(slBoot);
 </code> </code>
  
eeros_architecture/safety_system/properties.1775997868.txt.gz · Last modified: by ursgraf