eeros_architecture:sequencer:define_sequence
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
eeros_architecture:sequencer:define_sequence [2019/03/14 10:30] – [Returning Values] graf | eeros_architecture:sequencer:define_sequence [2019/03/20 11:49] – [Waiting in Sequences or Steps] graf | ||
---|---|---|---|
Line 109: | Line 109: | ||
===== Waiting in Sequences or Steps ===== | ===== Waiting in Sequences or Steps ===== | ||
- | As mentioned before you should never wait by using //sleep// in a action method. However, quite often it is desirable to wait for some time to pass when running sequences. How to do properly? Study the following example: | + | As mentioned before you should never wait by using //sleep// in a action method. However, quite often it is desirable to wait for some time to pass when running sequences. How to do properly? |
- | <code cpp> | + | |
- | class StepA : public Step { | + | Contrary |
- | public: | + | |
- | | + | |
- | int action() {time = std:: | + | |
- | bool checkExitCondition() { | + | |
- | return ((std:: | + | |
- | } | + | |
- | private: | + | |
- | std:: | + | |
- | }; | + | |
- | </ | + | |
- | This step simply takes a time stamp when running its action method. Its exit condition becomes '' | + | |
===== Returning Values ===== | ===== Returning Values ===== | ||
A step or blocking sequence can return a value of type '' | A step or blocking sequence can return a value of type '' |
eeros_architecture/sequencer/define_sequence.txt · Last modified: 2023/02/26 00:25 by ursgraf