op_trace_event()
Abstract
Enables tracing of an event handle in ODB.
Syntax
op_trace_event (label, value)
| Argument | Type | Description |
|---|---|---|
label |
const char * |
Name of the argument to trace. This string will be displayed in the trace output. |
value |
Evhandle |
The argument to be traced. |
Return Type
void
No return value.
Example
OMSC_EXPORT void
oms_timer_remove (OmsT_Timer_Bank* timer_bank_ptr, int code)
{
int evhandle_list_size;
int i;
Evhandle current_event;
FIN (oms_timer_remove (timer_bank_ptr, code));
#if defined (OPD_DEBUG)
op_trace_event ("Timer removal event", current_event);
#endif
prg_mt_spinlock_acquire (&timer_bank_ptr->spinlock);
evhandle_list_size = op_prg_list_size
(timer_bank_ptr->timer_code_entry_ptr [code].evh_list_ptr);
current_event = op_ev_current ();
for (i = 0; i < evhandle_list_size; i++)
{
Evhandle * evh_ptr = (Evhandle *)
op_prg_list_access
(timer_bank_ptr->timer_code_entry_ptr [code].evh_list_ptr, i);
if (op_ev_id (current_event) == op_ev_id (*evh_ptr))
{
op_prg_list_remove
(timer_bank_ptr->timer_code_entry_ptr [code].evh_list_ptr, i);
op_prg_mem_free (evh_ptr);
break;
}
}
prg_mt_spinlock_release (&timer_bank_ptr->spinlock);
FOUT;
}
Details
None.
Purpose
Provides an automatic way of tracing an event handle by programmatically issuing a trace command to ODB.
Errors
- Recoverable Error: Invalid label argument.
Reference
- None.