oms_wp_phy_measure_register_single()
Abstract
Installs and activates a measurement within the specified PHY module.
Note: For each PHY module, measurements are uniquely identified by the combination of the identification code and the measurement type.
Syntax
oms_wp_phy_measure_register_single (phy_handle, measure_identification_code, measure_type, measure_wnd_size, measure_proc_ptr);
| Argument | Type | Description |
|---|---|---|
phy_handle |
OmsTWP_Phy_Handle* |
Handle for the PHY module |
measure_identification_code |
int |
Code that, combined with the measurement type, uniquely identifies the measurement |
measure_type |
OmsT_WP_Measurement_Type |
Measurement type See OmsT_WP_Measurement_Type for more information. |
measure_wnd_size |
double |
Time window to take measured samples from which the average measurement value will be computed |
measure_proc_ptr |
WrlsT_Measurement_Record_Proc_Ptr |
Function callback that allows you to evaluate the current packet conditions and determine its corresponding measurement sample value and whether the measurement should be taken. See WrlsT_Measurement_Record_Proc_Ptr for more information. If the measurement will be taken, the corresponding measurement entity can be obtained using oms_wp_phy_measure_entity_get_from_rx_state(), and then the measured value can be written into it using oms_wp_phy_support_measurement_write(). |
Return Type
void
Details
None
Example
Excerpt from coverage_area_tracker process model, 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 */);