op_prg_log_entry_write()

Abstract

Writes a log entry to the specified log handle.

Syntax

op_prg_log_entry_write (handle, entry_text, …)
Argument Type Description
handle Log_Handle Log handle identifying the simulation log to receive the entry.
entry_text const char* String containing the text of the log entry. The string can contain conversion specifiers like those used by the C printf command (%d, %s, and so on).
… various Zero or more arguments representing values to be substituted into entry_text.

Return Type

void

No return value.

Example

Excerpt from: ams_atm_notif_log_support_v2.ex.c in the models/std/atm directory.

/* Write the message to the notification log	*/
op_prg_log_entry_write (atm_buff_overflow_cell_loss_log_handle,
	"SYMPTOM(S):\n"
	" A Cell is being dropped as there is  \n"
	" no available space at output  buffer \n"
	" of port [%d] for the QoS %s          \n"	
	"\n"
	"CAUSE(S):\n"
	" Cells can be dropped at the end nodes\n"
	" or switches due to non-availability  \n"
	" of buffer space at the output ports. \n"
	" The buffers need to be sufficient    \n"
	" to hold cells generated due to a     \n"
	" burst.                               \n"
	"\n"
	"SUGGESTION(S):\n"
	" 1. Set the buffer sizes for QoS      \n"
	" %s to be greater than                \n"
	" the present value of %d.             \n"
	"\n",
	port_value,
	qos_string,
	qos_string,
	cur_buf_size
	);

Details

This KP appends a new log entry to a simulation log. The log entry will have a time stamp based on the simulation time of the event that generated the entry.

Simulation logs can only be referenced by variables of type Log_Handle that have been initialized with op_prg_log_handle_create().

Purpose

Provides a mechanism to write an entry to a specified simulation log.

Errors

  • Recoverable Error: Invalid log handle.
  • Recoverable Error: Nil handle format.
  • Program Abort: Segmentation violation/Bus error. (due to an invalid argument following a string with conversion specifiers)

Reference

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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