User Tools

Site Tools


eeros_architecture:sequencer:sequencer

This is an old revision of the document!


Sequencer

The sequencer is responsible to run the main sequence. There is a single instance of the sequencer and therefore only one main sequence. Further, the sequencer contains a list with all sequences. Whenever you define a sequence it will automatically be added to this list. The list helps to retrieve a reference to a given sequence. This can be helpful is you wish to pass information into this sequence.
First, get the instance of the sequencer.

  auto& sequencer = Sequencer::instance();            // get instance

The next step is to define a meaningfull main sequence (see Sequence) and add it to the sequencer. After this you can start the sequence with start(). The main program may terminate when the main sequencer has terminated. For this purpose it has to wait for the sequence thread with join().

  MainSequence mainSequence("Main Sequence", sequencer); // define main sequence
  sequencer.addMainSequence(mainSequence);               // set the main sequence
  mainSequence.start();                                  // start it
  ...                                                    // do other things such as starting the executor
  mainSequence.join();                                   // wait for the sequencer to finish
eeros_architecture/sequencer/sequencer.1505199481.txt.gz · Last modified: 2017/09/12 08:58 (external edit)