getting_started:tutorials:sequencer1
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
getting_started:tutorials:sequencer1 [2020/12/03 14:42] – [Simple Sequence with Five Steps] ursgraf | getting_started:tutorials:sequencer1 [2021/03/31 14:37] – [Timeout Monitor Resumes Main Sequence] ursgraf | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Simple Sequence with Five Steps ===== | ===== Simple Sequence with Five Steps ===== | ||
- | 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 21: | Line 24: | ||
Recompile the program and run it. Please make sure to check for the sequence to be still running. This is for the case that you want to terminate the program by pressing CTRL-C. | Recompile the program and run it. Please make sure to check for the sequence to be still running. This is for the case that you want to terminate the program by pressing CTRL-C. | ||
===== Timeout Monitor Aborts Main Sequence ===== | ===== Timeout Monitor Aborts Main Sequence ===== | ||
- | Open a shell in the build directory of your EEROS library and run | + | The next example is [[https:// |
< | < | ||
$ ./ | $ ./ | ||
Line 29: | Line 32: | ||
\\ | \\ | ||
===== Timeout Monitor Aborts Main Sequence ===== | ===== Timeout Monitor Aborts Main Sequence ===== | ||
- | Open a shell in the build directory of your EEROS library and run | + | The next example is [[https:// |
< | < | ||
- | $ ./ | + | $ ./ |
</ | </ | ||
The same main sequence will start running. A timeout monitor supervises the main sequence. Its timeout time is set to 2.5s. After the monitor fires an exception sequence runs. This consists of a single step which waits for 3 s. After termination of the exception sequence the main sequence aborts because its timeout behavior is set to '' | The same main sequence will start running. A timeout monitor supervises the main sequence. Its timeout time is set to 2.5s. After the monitor fires an exception sequence runs. This consists of a single step which waits for 3 s. After termination of the exception sequence the main sequence aborts because its timeout behavior is set to '' | ||
[{{ : | [{{ : | ||
\\ | \\ | ||
- | ====== Sequencer with Timeout Monitor | + | ===== Timeout Monitor |
- | In the EEROS library you will find a directory with examples. Open a shell in the build directory of your EEROS library and run '' | + | The next example is [[https:// |
- | The main program starts the main sequence which itself runs five steps. Each step simply waits for a second. | + | < |
- | + | $ ./examples/sequencer/sequencerTest13 | |
- | [{{ .: | + | |
- | + | ||
- | The main sequence itself has its timeout condition set to 2.5s. After this timeout has expired an exception sequence runs which waits for another three seconds. As the monitor behavior for the sequence is set to '' | + | |
- | + | ||
- | + | ||
- | ==== Aborting the Main Sequence ==== | + | |
- | + | ||
- | You can change the behavior of the timeout monitor to '' | + | |
- | + | ||
- | ==== Omit Exception Sequence ==== | + | |
- | In the constructor of the main sequence the exception sequence is added with | + | |
- | <code cpp> | + | |
- | setTimeoutExceptionSequence(eSeq); | + | |
</ | </ | ||
- | Comment this statement out and recompile. This time there is no exception | + | The same main sequence |
- | + | [{{ : | |
- | ==== Resuming the Main Sequence ==== | + | \\ |
- | Change the behavior of the timeout | + | ===== Timeout Monitor Resumes Main Sequence ===== |
- | Insert | + | Open a shell in the build directory |
- | < | + | < |
- | int action() { | + | $ ./ |
- | wait(3); | + | |
- | caller-> | + | |
- | caller-> | + | |
- | caller-> | + | |
- | } | + | |
</ | </ | ||
- | Recompile and run again. At the end of the exception | + | The same main sequence will start running. A timeout monitor supervises |
- | + | [{{ : | |
+ | \\ | ||
getting_started/tutorials/sequencer1.txt · Last modified: 2021/03/31 14:37 by ursgraf