This method marks all events
targeted for the specified OMReactive instance as
canceled (that is, it changes the IDs of the events to Constants).
You might want to use the cancelEvents method
if, for example, there are several events in the event queue targeted
for a specific OMReactive instance, but the instance
has already been destroyed because it reached a termination connector
in the statechart.
The cancelEvents method
works in the following way:
- It calls unschedTm and asks OMThreadTimer::instance() to
cancel all timeouts (events) targeted to the specified destination.
- It gets a list of events in the event queue and
iterates through the event queue. If the method finds an event targeted
for destination, it sets its ID to constants. The
event remains in the event queue; after it is eventually removed from
the event queue, it is discarded.
Signaturevirtual void cancelEvents(OMReactive* destination);
Parametersdestination
Specifies an OMReactive instance
Note: In the framework, cancelEvents is
virtual to support enhanced framework customization. It can also support
several event queues per task.