Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
research:software:lrp [2016/12/21 16:03] – [Advanced Features] jfabry | research:software:lrp [2016/12/21 16:16] – [Advanced Features] jfabry | ||
---|---|---|---|
Line 210: | Line 210: | ||
=== Exit transitions === | === Exit transitions === | ||
- | In a nested machine it is possible to define transitions that go to a state of the parent machine, effectively exiting the nested machine. Such transitions are like normal transactions, | + | In a nested machine it is possible to define transitions that go to a state of the parent machine, effectively exiting the nested machine. Such transitions are like normal transactions, |
- | A simple example is as follows: | + | A simple example is as follows. As soon as the '' |
< | < | ||
(machine root | (machine root | ||
Line 224: | Line 224: | ||
) | ) | ||
(state two) | (state two) | ||
- | (ontime 1000 two-> | ||
) | ) | ||
(spawn root one) | (spawn root one) | ||
Line 230: | Line 229: | ||
=== Eventless transitions === | === Eventless transitions === | ||
+ | |||
+ | It can become tedious for transitions to need an event as a trigger, since it requires the definition of an event as a separate statement. This is especially tedious when the transition is the only that references that event. To ease this tedium, transitions also accept a block instead of an event name. This block should return true for the transition to trigger. | ||
+ | |||
+ | Eventless transitions are in fact syntactic sugar: an event is generated and added to the machine, with as action block the block that was specified in the transition, and the transition instead then refers to that event. | ||
=== User interface: Jump to and Transition to === | === User interface: Jump to and Transition to === |