op_ev_id()
Abstract
Obtains the ID of an event.
Syntax
op_ev_id (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()—and others such as op_intrpt_schedule_self().]. |
Return Type
OpT_Ev_Id
ID of the specified event.
Example
char ev_id_str[20];
/* Get the currently executing event */
evptr = op_ev_current ();
/* Get the event ID */
ev_id = op_ev_id (evptr);
Details
The format of the event ID varies depending on whether the ID is serialized globally (typical in sequential simulations) or by module (typical in parallel simulations). The serialization scheme is set by the op_runsim preference “fully_serialized_event_ids“.
Purpose
Provides a way to obtain the ID of an event.
Errors
- Recoverable Error: Event handle refers to an event that is either invalid or not currently scheduled.
Reference
- Use the KP op_ev_id_str_get() to obtain a string representation of an event ID