User Tools

Site Tools


getting_started:tutorials:sequencer4

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:sequencer4 [2020/12/03 19:31] – created ursgrafgetting_started:tutorials:sequencer4 [2021/03/31 15:40] (current) – [Monitor Checking two Sequences] ursgraf
Line 1: Line 1:
-====== Example with several Monitors ====== 
  
-it will run in parallel. ''Step A'' and ''Step B'' will be called in parallel, though their waiting time is different. ''Sequence B'' has its timeout condition set to 2.5s. This causes its associated timeout monitor to interrupt the sequence and jump to an exception sequence. In the meantime the main sequence continues unhindered. After the exception sequence ''Sequence B'' is aborted, because its monitor behavior is set to ''abort''. The program stops after the main sequences has finished running its steps. 
  
-[{{ .:sequencerexample2.png?550 | //Flow of SequencerTest2// }}]+====== Sequence with two Monitors ======
  
-The main sequences starts with three ''Step A'' after which the ''Sequence B'' is called. ''Sequence B'' is nonblocking, that means, it will run in parallel''Step A'' and ''Step B'' will be called in parallel, though their waiting time is different''Sequence B'' has its timeout condition set to 2.5sThis causes its associated timeout monitor to interrupt the sequence and jump to an exception sequence. In the meantime the main sequence continues unhindered. After the exception sequence ''Sequence B'' is aborted, because its monitor behavior is set to ''abort''. The program stops after the main sequences has finished running its steps.+In the EEROS library you will find a directory with examplesFor this example see [[https://github.com/eeros-project/eeros-framework/blob/master/examples/sequencer/SequencerTest40.cpp|SequencerTest40.cpp]].
  
- +Open a shell in the build directory of your EEROS library and run 
-====== Sequence with two Monitors ====== +
- +
-In the EEROS library you will find a directory with examples. Open a shell in the build directory of your EEROS library and run +
 <code> <code>
 $ ./examples/sequencer/sequencerTest40 $ ./examples/sequencer/sequencerTest40
 </code>  </code> 
  
-This example shows a sequence with two associated monitors. The ''Main Sequence'' tries to run several steps called ''Step A''. After each step counter is incremented. A monitor checks for this count to reach a given level (''MyMonitor''). As soon as this happens an exception sequence is started. After termination of the exception sequence the original sequence resumes because the monitor property is set to ''resume''. The ''Main Sequence'' continues and is soon interrupted by its timeout monitor because its timeout limit has expired. The timeout monitor has no exception sequence assigned to it and immediately aborts the ''Main Sequence'' and with it the application because its monitor property is set to //abort//+This example shows a sequence with two associated monitors. The ''Main Sequence'' tries to run several steps called ''Step A''. After each step counter is incremented. A monitor checks for this count to reach a given level (''MyMonitor''). As soon as this happens an exception sequence is started. After termination of the exception sequence the original sequence resumes because the monitor property is set to ''resume''. The ''Main Sequence'' continues and is soon interrupted by its timeout monitor because its timeout limit has expired. The timeout monitor has no exception sequence assigned to it and immediately aborts the ''Main Sequence'' and with it the application because its monitor property is set to //abort//
-[{{ .:sequencerexample4.png?450 | //Flow of SequencerTest4// }}]+[{{ .:sequencerexample4.png?450 | //Two monitors checking the same sequence// }}] 
 +\\
  
  
Line 25: Line 21:
  
 ===== Monitor Checking two Sequences ===== ===== Monitor Checking two Sequences =====
 +The next example is [[https://github.com/eeros-project/eeros-framework/blob/master/examples/sequencer/SequencerTest41.cpp|SequencerTest41.cpp]].
 +Open a shell in the build directory of your EEROS library and run 
 +<code>
 +$ ./examples/sequencer/sequencerTest41
 +</code> 
  
-A next example demonstrates what happens if the same monitor checks two sequencesIt can be found in ''examples/sequencer/SequencerTest5'' +This example shows a sequence with two associated monitors. The ''Main Sequence'' tries to run several steps called ''Step A''. After each step a counter is incremented. A monitor checks for this count to reach a given level (''MyMonitor''). As soon as this happens an exception sequence is started. After termination of the exception sequence the original sequence resumes because the monitor property is set to ''resume''The ''Main Sequence'' continues and is soon interrupted by its timeout monitor because its timeout limit has expiredThe timeout monitor also has an exception sequence assigned to it. After this the sequence continues because its monitor behavior is set to //resume// as well. Both monitors will fire again as their conditions are met again before the sequence finally terminates 
- +[{{ .:sequencerexample5.png?450 | //Two monitors with two exception sequences// }}] 
-[{{ .:sequencerexample5.png?550 | //Flow of SequencerTest5// }}]+\\
  
-The ''Main Sequence'' and ''Sequence B'' have the same monitor. The ''Main Sequence'' tries to run several steps called ''Step A''. After each step a counter is incremented. A monitor checks for this count to reach a given level (''MyMonitor''). The same monitor also checks ''Sequence B'', which runs in parallel. As soon as the monitor condition is met, both sequences will abort because the monitor property is set to //abort// 
  
getting_started/tutorials/sequencer4.1607020293.txt.gz · Last modified: 2020/12/03 19:31 by ursgraf