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.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com