User Tools

Site Tools


eeros_architecture:sequencer:sequence

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
eeros_architecture:sequencer:sequence [2024/12/01 11:46] – [Waiting for Sequences to Finish] ursgrafeeros_architecture:sequencer:sequence [2024/12/01 11:50] (current) – [Waiting for Sequences to Finish] ursgraf
Line 58: Line 58:
  
 ===== Waiting for Sequences to Finish ===== ===== Waiting for Sequences to Finish =====
-Usually at some stage in your program you have to wait for a given sequence to finish until the program should continue. Let's assume that a main sequence There are two methods to accomplish this''wait()'' and ''waitAndTerminate()''. \\ +Usually at some stage in your program you have to wait for a given sequence to finish until the program should continue. Let's assume that a main sequence starts another nonblocking sequence and at some stage wants to wait until this second sequence has finished. For this a sequence can be waited for with ''wait()''. \\ 
-The former waits for a given sequence to finish running. It returns as soon as all the steps defined in the sequence have completed running. However, it does not terminate the associated thread. This allows to restart the same sequence with ''start()'' later on in the program. \\   +This method returns as soon as all the steps defined in the sequence have completed running. In order to get the return value of the sequence you can use ''getResult()''.
-On the other hand, ''waitAndTerminate()'' does also wait for all the steps defined in the sequence to have completed. Further, it will terminate the associated thread and return only after successful elimination of the thread object. After this, the sequence cannot be restarted. \\ \\ +
-IMPORTANT Never use ''wait()'' or ''waitAndTerminate()'' from within the safety system or the control system. The two methods should solely be used by other sequences or by the main program.+
  
eeros_architecture/sequencer/sequence.txt · Last modified: 2024/12/01 11:50 by ursgraf