op_ev_state_clear()
Abstract
Removes the event state associated with an event.
Syntax
op_ev_state_clear (evhandle)
| Argument | Type | Description |
|---|---|---|
evhandle |
Evhandle |
event handle that identifies the event [An event handle can be obtained from several KPs in this package, such as op_ev_current(), op_ev_seek_time(), and op_ev_next().]. |
Return Type
void*
Event state associated with the event.
Example
/* clear the current event state */
My_Model_Data * data_ptr = op_ev_state_clear (evhandle);
Details
Because the Simulation Kernel does not know anything about the content of an event state, you must be sure to get the event state with the appropriate data type.
Purpose
Provides a way to clear the state associated with an event. This function returns the event state that is removed.
Errors
- Recoverable Error: Event handle refers to an event that is either invalid or not currently scheduled.
Reference
- Use the KP op_ev_state_install() to install an event state to be associated with events
- Use the KP op_ev_state() to get the event state associated with an event