op_stat_tag_add_str()

摘要

为统计量添加一个带字符串值的标签。

语法

op_stat_tag_add_str (stat_handle, tag_name, value)
参数 类型 说明
stat_handle Stathandle 统计量句柄,标识要打标签的全局或局部统计量 [统计量句柄可通过内核过程 op_stat_reg() 获得。]
tag_name const char * 要添加到该统计量的标签名称。
value const char * 标签的值。

返回类型

void

无返回值。

示例

/* 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);

详情

无。

用途

为给统计量指定标签提供了一种方式。统计量标签由名称和值组成,与统计量一起写入输出文件。可以为一个统计量指定多个标签。统计量标签可用于提供有关统计量的额外细节,以及用于在结果浏览器(Results Browser)的树视图层次结构中组织统计量。

错误

  • 可恢复错误(Recoverable Error):试图使用未注册的统计量句柄。

参考

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