oms_wp_phy_measure_register_single()

摘要

在指定的 PHY 模块中安装并激活一个测量。

注意: 对于每个 PHY 模块,测量由识别码与测量类型的组合唯一标识。

语法

oms_wp_phy_measure_register_single (phy_handle, measure_identification_code, measure_type, measure_wnd_size, measure_proc_ptr);

参数 类型 说明
phy_handle OmsTWP_Phy_Handle* PHY 模块句柄
measure_identification_code int 与测量类型组合后可唯一标识该测量的码
measure_type OmsT_WP_Measurement_Type 测量类型
详见 OmsT_WP_Measurement_Type。
measure_wnd_size double 用于采集测量样本并据此计算平均测量值的时间窗口
measure_proc_ptr WrlsT_Measurement_Record_Proc_Ptr 函数回调,用于评估当前 Packet 条件,确定其对应的测量样本值以及是否应进行该测量。
详见 WrlsT_Measurement_Record_Proc_Ptr。
如果将进行该测量,可使用 oms_wp_phy_measure_entity_get_from_rx_state() 获取对应的测量实体,然后使用 oms_wp_phy_support_measurement_write() 将测量值写入其中。

返回类型

void

详细说明

无

示例

coverage_area_tracker 进程模型 init4 exit executives 的节选。

/* Obtain a handle to the advanced wireless PHY module.					*/
phy_handle = oms_wp_phy_module_handle_get ("phy");
/* Register a received power measure. Note that the object ID of the cell 			*/
/* transmitter is associated to this measurement so only the packets sent from */
/* that node contribute to this measurement.							*/
oms_wp_phy_measure_register_single(phy_handle,
				(int) Transmitter_Node_Objid,
				OmsC_WP_RCV_Power,
				OMSC_WP_MEASURE_WNDW_SIZE_NONE,
				coverage_tracker_phy_rcvd_power_measurement_collect_only_one_node);
/* Add a notification alert when received power is above the monitored threshold.	*/
oms_wp_phy_measure_notification_subscribe (phy_handle,  /* PHY handle.	*/
		0		/* The module client ID that needs the notification. */,
		"Tracking Module" /* The module client name that needs the notification. */,
		OmsC_WP_RCV_Power	/* Measurement type */,
		OmsC_WP_Alert_Threshold_Direction_Up	 /* Threshold direction		*/,
		oms_wp_phy_convert_dbm_to_watts(Target_Min_Received_Power) /* Threshold
		value */,
		(int)Transmitter_Node_Objid /* Measurement entity key */);

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