User Tools

Site Tools


getting_started:tutorials:sequencer2

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
getting_started:tutorials:sequencer2 [2020/12/03 17:33] – [Subsequence Has Timeout Monitor] ursgrafgetting_started:tutorials:sequencer2 [2021/03/31 15:33] (current) – [Subsequence Has Timeout Monitor with Restart] ursgraf
Line 1: Line 1:
 ====== Example with Blocking Sequence ====== ====== Example with Blocking Sequence ======
 The following example all have a main sequence which calls a few steps and a another sequence. This second sequence is a blocking sequence. That means that the main sequence pauses while the second sequence runs. A timeout monitor either supervises the main sequence or the second sequence. The following example all have a main sequence which calls a few steps and a another sequence. This second sequence is a blocking sequence. That means that the main sequence pauses while the second sequence runs. A timeout monitor either supervises the main sequence or the second sequence.
-===== Main Sequence Has Timeout Monitor =====+===== Main Sequence Calls Blocking Sequence =====
  
-In the EEROS library you will find a directory with examples. Open a shell in the build directory of your EEROS library and run +In the EEROS library you will find a directory with examples. For this example see [[https://github.com/eeros-project/eeros-framework/blob/master/examples/sequencer/SequencerTest20.cpp|SequencerTest20.cpp]]. 
 +Open a shell in the build directory of your EEROS library and run 
 <code> <code>
 $ ./examples/sequencer/sequencerTest20 $ ./examples/sequencer/sequencerTest20
Line 14: Line 15:
 ===== Main Sequence Has Timeout Monitor ===== ===== Main Sequence Has Timeout Monitor =====
  
-next example demonstrates what happens if the main sequence is interrupted by a monitor while a subsequence is called. Run +The next example can be found under [[https://github.com/eeros-project/eeros-framework/blob/master/examples/sequencer/SequencerTest21.cpp|SequencerTest21.cpp]]. It demonstrates what happens if the main sequence is interrupted by a monitor while a subsequence is called. Run 
 <code> <code>
 $ examples/sequencer/sequencerTest21 $ examples/sequencer/sequencerTest21
Line 26: Line 27:
 ===== Main Sequence Has Timeout Monitor with Resume ===== ===== Main Sequence Has Timeout Monitor with Resume =====
  
-next example demonstrates what happens if the main sequence is interrupted by a monitor while a subsequence is called. Run +The next example can be found under [[https://github.com/eeros-project/eeros-framework/blob/master/examples/sequencer/SequencerTest22.cpp|SequencerTest22.cpp]]. It demonstrates what happens if the main sequence is interrupted by a monitor while a subsequence is called. Run 
 <code> <code>
 $ examples/sequencer/sequencerTest22 $ examples/sequencer/sequencerTest22
Line 38: Line 39:
 ===== Main Sequence Has Timeout Monitor with Restart ===== ===== Main Sequence Has Timeout Monitor with Restart =====
  
-next example demonstrates what happens if the main sequence is interrupted by a monitor while a subsequence is called. Run +The next example can be found under [[https://github.com/eeros-project/eeros-framework/blob/master/examples/sequencer/SequencerTest23.cpp|SequencerTest23.cpp]]. It demonstrates what happens if the main sequence is interrupted by a monitor while a subsequence is called. Run 
 <code> <code>
 $ examples/sequencer/sequencerTest23 $ examples/sequencer/sequencerTest23
Line 49: Line 50:
 ===== Subsequence Has Timeout Monitor ===== ===== Subsequence Has Timeout Monitor =====
  
-next example demonstrates what happens if the subsequence is interrupted by a monitor. Run +The next example can be found under [[https://github.com/eeros-project/eeros-framework/blob/master/examples/sequencer/SequencerTest24.cpp|SequencerTest24.cpp]]. It demonstrates what happens if the subsequence is interrupted by a monitor. Run 
 <code> <code>
 $ examples/sequencer/sequencerTest24 $ examples/sequencer/sequencerTest24
 </code> </code>
  
-The main sequence does its steps and starts the second sequence. The timeout monitor of the subsequence fires. The monitor causes an exception sequence to run. After that the sugsequence stops immediately as the timeout behavior is set to ''abort''. The main sequence will continue to run until its done.+The main sequence does its steps and starts the second sequence. The timeout monitor of the subsequence fires. The monitor causes an exception sequence to run. After that the sugsequence stops immediately as the timeout behavior is set to ''abort''. The main sequence will continue to run until it is done.
  
 [{{ :getting_started:tutorials:sequencetest24.png?500 | //Aborting the subsequence// }}] [{{ :getting_started:tutorials:sequencetest24.png?500 | //Aborting the subsequence// }}]
 \\ \\
  
-===== Subsequence Has Timeout Monitor =====+===== Subsequence Has Timeout Monitor with Resume =====
  
-next example demonstrates what happens if the subsequence is interrupted by a monitor. Run +The next example can be found under [[https://github.com/eeros-project/eeros-framework/blob/master/examples/sequencer/SequencerTest25.cpp|SequencerTest25.cpp]]. It demonstrates what happens if the subsequence is interrupted by a monitor. Run 
 <code> <code>
-$ examples/sequencer/sequencerTest24+$ examples/sequencer/sequencerTest25
 </code> </code>
  
-The main sequence does its steps and starts the second sequence. The timeout monitor of the subsequence fires. The monitor causes an exception sequence to run. After that the sugsequence stops immediately as the timeout behavior is set to ''abort''The main sequence will continue to run until its done.+The main sequence does its steps and starts the second sequence. The timeout monitor of the subsequence fires. The monitor causes an exception sequence to run. After that the subsequence continues from where it was interrupted as its timeout behavior is set to ''resume''After the subsequence has terminated the main sequence will continue until it is done.
  
-[{{ :getting_started:tutorials:sequencetest24.png?500 | //Aborting the subsequence// }}]+[{{ :getting_started:tutorials:sequencetest25.png?500 | //Resuming the subsequence// }}] 
 +\\ 
 + 
 +===== Subsequence Has Timeout Monitor with Restart ===== 
 + 
 +The next example can be found under [[https://github.com/eeros-project/eeros-framework/blob/master/examples/sequencer/SequencerTest26.cpp|SequencerTest26.cpp]]. It demonstrates what happens if the subsequence is interrupted by a monitor. Run  
 +<code> 
 +$ examples/sequencer/sequencerTest26 
 +</code> 
 + 
 +The main sequence does its steps and starts the second sequence. The timeout monitor of the subsequence fires. The monitor causes an exception sequence to run. After that the subsequence restarts from the beginning as its timeout behavior is set to ''restart''. This would go on forever. After three restarts the behavior is set to ''abort'' which causes the subsequence to terminate. After this, the main sequence will continue until it is done. 
 + 
 +[{{ :getting_started:tutorials:sequencetest26.png?500 | //Resuming the subsequence// }}]
 \\ \\
  
getting_started/tutorials/sequencer2.1607013206.txt.gz · Last modified: 2020/12/03 17:33 by ursgraf