oms_wp_phy_measure_notification_subscribe()
Abstract
Installs a notification alert within a previously installed measurement.
Syntax
oms_wp_phy_measure_notification_subscribe (phy_handle, subclient_id, subclient_name, measure_type, threshold_dir, threshold_value, measure_identification_code);
| Argument | Type | Description |
|---|---|---|
phy_handle |
OmsT_WP_Phy_Handle* |
Handle to the PHY module |
subclient_id |
int |
Number that identifies the sub-client of the alert within the current client module |
subclient_name |
const char* |
Name of the client of the alert |
measure_type |
OmsT_WP_Measurement_Type |
Measurement type See OmsT_WP_Measurement_Type for more information. |
threshold_dir |
OmsT_WP_Measurement_Threshold_Direction |
Indicates if the current measurement value will be reported when above or below the indicated threshold value. See OmsT_WP_Measurement_Threshold_Direction for more information. |
threshold_value |
double |
Threshold value |
measure_identification_code |
int |
Code that, combined with the measurement type, uniquely identifies the measurement |
Return Type
void
Details
The notification alert will be delivered as a remote interrupt to the module that invoked this function. The alert will be generated by the measurement if the threshold value and direction condition are met.
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 */