Table 2.18. Events
| command | description | note |
|---|---|---|
| emit myEvent; | send an event that can be catched by at | |
| emit(10s) myEvent; | send an event that can be catched by whenever. This event has a 10 seconds duration | |
| emit(5h3m25s) myEvent; | same with event during 5 hours 3min 25s | |
| at(event){ ... } onleave{ ... }; | at event is true, execute code | run once the code, when event is true, event can be a condition or an emitted event from emit |
| whenever(event){ ... } else{ ... }; | whenever event | do instruction whenever event is true |
| emit myEvent(1,3); | send an event that can be catched by at or whenever with parameters | parameter can be catched by variables in at/whenever structure to read them |
| at(myEvent(x,y)){ ... } onleave{ ... }; | at special event | entry once in the event with 2 parameters catched in 'x' and 'y' UVars |
| waituntil(condition); | lasts until condition is true | any following command will be delayed undefinitely |
| every(Time){ ... }; | execute block of instuction every time | every(10s){ emit test;echo("send!"); }; |
| timeout(Time){ ... }; | abort instruction if not executed within given time | |
| sleep(100ms); | sleep | wait for 100 milliseconds |
Table 2.19. Events Managment
| command | description |
|---|---|
| stop mytag; | stop code associated to tag "mytag" |
| stopif (condition){...}; | run command and stop if condition is reached |
| block mytag; | block code associated to tag "mytag". Any "mytag" code is stoped, and future "mytag" code will be discarded |
| unblock mytag; | unblock code associated to tag "mytag, previously blocked by block comand |
| blockif(test) mytag; | if test is true, block tag ""mytag" |
| freeze tag; | freeze tag ""mytag", can be unfreeze by unfreeze |
| unfreeze tag; | unfreeze tag ""mytag" previously freezed by freeze command |
| freezeif(test){ ... }; | run command and if test is true, freeze code |
| stopall; | stop all comannds |
| inherits; | add an inheritance link to another class |
| disinherits; | remove inheritance from given class |