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
Next revisionBoth sides next revision
eeros_architecture:safety_system:properties [2017/02/27 15:25] – [Level Actions] grafeeros_architecture:safety_system:properties [2017/07/25 08:48] – [Safety Events] graf
Line 9: Line 9:
 Define critical output signals, get references to them from the HAL and assign them.  Define critical output signals, get references to them from the HAL and assign them. 
 <code c> <code c>
-  eeros::hal::SystemOutput<bool>* watchdog; +  eeros::hal::Output<bool>* watchdog; 
-  eeros::hal::SystemOutput<bool>* enable0;+  eeros::hal::Output<bool>* enable0;
  
   HAL& hal = HAL::instance();   HAL& hal = HAL::instance();
  
-  watchdog = hal.getLogicSystemOutput("watchdog"); +  watchdog = hal.getLogicOutput("watchdog"); 
-  enable0 = hal.getLogicSystemOutput("enable0");+  enable0 = hal.getLogicOutput("enable0");
   ...   ...
   criticalOutputs = {watchdog, enable0, ...};   criticalOutputs = {watchdog, enable0, ...};
Line 22: Line 22:
 Define critical input signals, get references to them from the HAL and assign them. Define critical input signals, get references to them from the HAL and assign them.
 <code c> <code c>
-  eeros::hal::SystemInput<double>* q0; +  eeros::hal::Input<double>* q0; 
-  eeros::hal::SystemInput<bool>* runButton;+  eeros::hal::Input<bool>* runButton;
      
-  q0 = hal.getRealSystemInput("q0"); +  q0 = hal.getScalableInput("q0"); 
-  limitSwitchQ0p = hal.getLogicSystemInput("runButton");+  limitSwitchQ0p = hal.getLogicInput("runButton");
   ...   ...
   criticalInputs = {q0, runButton, ...};   criticalInputs = {q0, runButton, ...};
Line 59: Line 59:
 It is also possible to add an event to many levels. In the following example we add from the level //slPowerOn// until the level //slMoving// the event //seDoEmergency//, which causes a transition to the level //emergency// and is a public event. It is also possible to add an event to many levels. In the following example we add from the level //slPowerOn// until the level //slMoving// the event //seDoEmergency//, which causes a transition to the level //emergency// and is a public event.
 <code c> <code c>
- // Add events to multiple levels+  // Add events to multiple levels
   addEventToLevelAndAbove(slPowerOn, slMoving, seDoEmergency, kPublicEvent);   addEventToLevelAndAbove(slPowerOn, slMoving, seDoEmergency, kPublicEvent);
 </code> </code>
 +Two more functions serve a similar purpose.
 +<code c>
 +  // Add events to all levels equal or smaller than srcLevel
 +  addEventToLevelAndBelow(srcLevel, destLevel, event, kPublicEvent);
 +  // Add events to all levels in between lowerLevel and upperLevel (including lowerLevel and upperLevel)
 +  addEventToAllLevelsBetween(lowerLevel, upperLevel, destLevel, event, kPublicEvent);
 +</code>
 +
  
 ===== Input and Output Actions ===== ===== Input and Output Actions =====
eeros_architecture/safety_system/properties.txt · Last modified: 2024/06/10 09:45 by ursgraf