User Tools

Site Tools


eeros_architecture:sequencer:define_sequence

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
Last revisionBoth sides next revision
eeros_architecture:sequencer:define_sequence [2020/09/30 08:07] – [Define the Action] ursgrafeeros_architecture:sequencer:define_sequence [2021/06/02 15:09] – [Define the Action] ursgraf
Line 63: Line 63:
 public: public:
   int action() {   int action() {
-    while (Sequencer::running) step1();+    while (state == SequenceState::running) step1();
     // while (true) step1();  // WRONG!     // while (true) step1();  // WRONG!
     return 0;     return 0;
   }   }
 </code> </code>
-This guarantees that the sequence could be stopped by the main program due to some external event such as a signal.+This guarantees that the sequence could be aborted, resumed or restarted due to exception sequences.
 ===== Define Preconditions ===== ===== Define Preconditions =====
 You may want to start a sequence or step only if a certain precondition is met. Override the function //checkPreCondition()//, e.g.: You may want to start a sequence or step only if a certain precondition is met. Override the function //checkPreCondition()//, e.g.:
eeros_architecture/sequencer/define_sequence.txt · Last modified: 2023/02/26 00:25 by ursgraf