Cycle-based statechart execution can not handle events raised on the statechart during execution of a RTC step (the runCycle method). This is a major problem within multi state machine models. Here the concrete order of RTC-execuion of the involved state-machines becomes relevant. The resulting behavior is not intuitive for the user.
To overcome this problem event buffers are required. These fulfill the same purpose as event queues for event driven execution. The difference is that according to the execution model an event buffer (or vector) is used instead of a queue. The following aspects must be considered:
We distinguish between an internal event buffer and an in event buffer.
Events derived from foreign out events must be handled as in events even though they are part of the internal scope
This pattern also helps to overcome the limitations of downstream visibility of internal events.
Cycle-based statechart execution can not handle events raised on the statechart during execution of a RTC step (the runCycle method). This is a major problem within multi state machine models. Here the concrete order of RTC-execuion of the involved state-machines becomes relevant. The resulting behavior is not intuitive for the user.
To overcome this problem event buffers are required. These fulfill the same purpose as event queues for event driven execution. The difference is that according to the execution model an event buffer (or vector) is used instead of a queue. The following aspects must be considered:
This pattern also helps to overcome the limitations of downstream visibility of internal events.