0 votes
285 views
by
Is it always the case that the duration of the last event in a sublayer is determined by the duration of the parent event? Or is it possible to configure the parent event to finish automatically when its last child deactivates?

1 Answer

0 votes
by (8.7k points)
selected by
 
Best answer

If the duration of the last event on a sublayer is exceeded, the sublayer’s flow processing freezes until the parent event is deactivated. The last sublayer event is active until deactivation of the parent event, longer than its predefined duration. However, it’s always possible to command the parent event to deactivate at the selected moment. One of the method is to create a global ‘flag’ variable of Boolean type and define it in the Header, like:

boolean StopFlag=false;

Then, organize event flow on the parent layer in such way, that a consequent event after the ‘parent’ one has a logical activation condition with:

(StopFlag==true)

Thus, the ‘parent’ event is going to be aborted any time, when the global Boolean StopFlag becomes true.

In your example, I would add a “dummy” event into the sublayer and make it activated at the end of a real processing of the sublayer. Then, add the assignment into the 'Control Loop' snippet of the dummy event:

StopFlag=true;

The general idea behind of this is that it’s always possible to control the event flow logic manually, with a help of global Boolean ‘flag’ variables, changed in code snippets, or by other means.

Welcome to EventIDE Q&A forum where you can ask questions about EventIDE software and receive answers from other members of the community

Categories

FAQ questions

Installation and License


Coding


Eye-tracking


EEG Analysis


Visual Stimuli


Runtime and Data Collection


Hardware

...