This
method cancels a timeout
request.
This method is used when:
- Exiting a state - The timeout is no longer
relevant.
- An object has been destroyed -
In this case,
all timers associated with the object are destroyed.
Signaturevirtual void unschedTm (short id, OMReactive *c);
Parametersid
Specifies the ID tag of the timeout
request. If this is Constants, unschedTm cancels
all events whose
destination is this specific instance of OMReactive.
If this is set to a specific event ID, unschedTm cancels
only that event.
c
Specifies a pointer to the OMReactive instance
requestor. After a timeout has been canceled, this parameter points
to the instance that is notified.
Notes- In the framework, unschedTm is
virtual to support enhanced framework customization. It can also support
several timer managers in the system (for example, one per active
class).
- The code generator generates a call
to unschedTm when
the state upon which the timeout was scheduled has been exited.
- unschedTm calls the unschedTm
method defined in timer.h.
- Canceling
a timeout requires one of two actions:
- Deleting
the timeout from the heap
- Canceling it inside
the event queue (if it was
already dispatched) by iterating the event queue
- You can use unschedTm in cases
where the statechart implementation is overridden.