User Tools

Site Tools


getting_started:tutorials:sequencer2

This is an old revision of the document!


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.

Main Sequence Has 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

$ ./examples/sequencer/sequencerTest20

The main sequences starts with three Step A after which the Sequence B is called. Sequence B is blocking, that means, that the main sequence pauses while it runs. The main sequence will subsequently do three more Step A before finishing.

Calling a blocking sequence


Main Sequence Has Timeout Monitor

A next example demonstrates what happens if the main sequence is interrupted by a monitor while a subsequence is called. Run

$ examples/sequencer/sequencerTest21

The main sequence does its 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 together with the second sequence immediately stop as the timeout behavior is set to abort.

Calling a blocking sequence


Main Sequence Has Timeout Monitor with Resume

A next example demonstrates what happens if the main sequence is interrupted by a monitor while a subsequence is called. Run

$ examples/sequencer/sequencerTest22

The main sequence does its 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 together with the second sequence continue from their previous state as the timeout behavior is set to resume.

Calling a blocking sequence


Resuming Sequence A

For the last experiment change the timeout behavior of the monitor to resume. As soon as the timeout monitor fires, Sequence A resumes. The monitor would immediately fire again, as the timeout is not automatically reset for resume. In order for the example to make sense, you have to enable the exception sequence with

setTimeoutExceptionSequence(eSeq);

This in turn will reset the timeout and increase its value to allow Sequence A and Sequence B to finish.

getting_started/tutorials/sequencer2.1607012736.txt.gz · Last modified: 2020/12/03 17:25 by ursgraf