op_stat_tag_add_str()

Abstract

Adds a tag with a string value to a statistic.

Syntax

op_stat_tag_add_str (stat_handle, tag_name, value)
Argument Type Description
stat_handle Stathandle Statistic handle identifying the global or local statistic to be tagged [A statistic handle can be obtained via the KP op_stat_reg().]
tag_name const char * Name of the tag to add to this statistic.
value const char * Value for the tag.

Return Type

void

No return value.

Example

/* Obtain a local statistic handle for the ete delay statistic. */
if (conn_id < FRMSC_PVC_CONN_STAT_COUNT)
	{
	frms_ete_del_lhandle = op_stat_reg ("Frame Relay PVC. Delay (sec)", conn_id,
		OPC_STAT_LOCAL);
	sprintf (stat_annot_str, "%s --> %s", source_FRAD_name, dest_FRAD_name);
	op_stat_tag_add_str (frms_ete_del_lhandle, “Source/Dest”, stat_annot_str);

Details

None.

Purpose

Provides a way to assign a tag to a statistic. Statistic tags consist of a name and value pair that is written to the output file along with the statistic. You can assign multiple tags to a statistic. Statistic tags can be used to provide additional details about a statistic and for arranging statistics in the treeview hierarchy of the Results Browser.

Errors

  • Recoverable Error: Attempting use of unregistered statistic handle.

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