getting_started:tutorials:sequencer3
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
getting_started:tutorials:sequencer3 [2020/12/03 17:54] – [Example with several Monitors] ursgraf | getting_started:tutorials:sequencer3 [2021/03/31 15:39] (current) – [Subsequence Has Timeout Monitor With Restart] ursgraf | ||
---|---|---|---|
Line 4: | Line 4: | ||
===== Main Sequence Calls Nonblocking Sequence ===== | ===== Main Sequence Calls Nonblocking 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. |
+ | |||
+ | Open a shell in the build directory of your EEROS library and run | ||
< | < | ||
$ ./ | $ ./ | ||
Line 11: | Line 13: | ||
[{{ : | [{{ : | ||
\\ | \\ | ||
+ | Please note the method //action// of the main sequence. | ||
+ | <code cpp> | ||
+ | int action() { | ||
+ | for (int i = 0; i < 3; i++) { | ||
+ | stepA(1); | ||
+ | } | ||
+ | seqS(); | ||
+ | for (int i = 0; i < 3; i++) { | ||
+ | stepA(1); | ||
+ | } | ||
+ | seqS.wait(); | ||
+ | return 0; | ||
+ | } | ||
+ | </ | ||
+ | At the end of the method you have to wait for the subsequence as it runs in its own thread. | ||
+ | ===== Main Sequence Has Timeout Monitor ===== | ||
- | ====== Example with several Monitors ====== | + | The next example is [[https:// |
+ | < | ||
+ | $ examples/ | ||
+ | </ | ||
- | it will run in parallel. '' | + | The main sequence does three steps and starts the second sequence. The timeout monitor |
- | [{{ .:sequencerexample2.png?550 | //Flow of SequencerTest2// }}] | + | [{{ :getting_started: |
+ | \\ | ||
- | The main sequences starts with three '' | + | ===== Main Sequence |
+ | The next example is [[https:// | ||
+ | < | ||
+ | $ examples/ | ||
+ | </ | ||
- | ===== Sequence with two Monitors ===== | + | The main sequence does three steps and starts the second sequence. The timeout monitor of the main sequence fires while the second sequence still runs. The monitor causes an exception sequence to run. After that the main sequence continues where it was interrupted as the timeout behavior is set to '' |
- | In the EEROS library you will find a directory with examples. Open a shell in the build directory of your EEROS library and run '' | + | [{{ : |
+ | \\ | ||
- | [{{ .: | + | ===== Main Sequence Has Timeout Monitor With Restart ===== |
- | This example | + | The next example |
+ | < | ||
+ | $ examples/sequencer/sequencerTest33 | ||
+ | </code> | ||
- | ==== Altering | + | The main sequence does three steps and starts |
- | Change the behavior | + | |
- | If you change the behavior | + | |
- | ===== Monitor Checking two Sequences ===== | + | [{{ : |
+ | \\ | ||
- | A next example demonstrates what happens if the same monitor checks two sequences. It can be found in '' | + | ===== Subsequence Has Timeout Monitor ===== |
- | [{{ .:sequencerexample5.png?550 | //Flow of SequencerTest5// }}] | + | The next example is [[https:// |
+ | < | ||
+ | $ examples/ | ||
+ | </ | ||
+ | |||
+ | The main sequence does three 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 terminates immediately as the timeout behavior is set to '' | ||
+ | |||
+ | [{{ : | ||
+ | \\ | ||
+ | |||
+ | ===== Subsequence Has Timeout Monitor With Resume ===== | ||
+ | |||
+ | The next example is [[https:// | ||
+ | < | ||
+ | $ examples/ | ||
+ | </ | ||
+ | |||
+ | The main sequence does three 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 the timeout behavior is set to '' | ||
+ | |||
+ | [{{ : | ||
+ | \\ | ||
+ | |||
+ | ===== Subsequence Has Timeout Monitor With Restart ===== | ||
+ | |||
+ | The next example is [[https:// | ||
+ | < | ||
+ | $ examples/ | ||
+ | </ | ||
+ | |||
+ | The main sequence does three steps and starts the second sequence. The timeout monitor | ||
+ | |||
+ | [{{ : | ||
+ | \\ | ||
- | The '' | ||
getting_started/tutorials/sequencer3.1607014452.txt.gz · Last modified: 2020/12/03 17:54 by ursgraf