wps_stats.h¶
Wireless Protocol Stack statistics.
- Copyright
Copyright (C) 2021 SPARK Microsystems International Inc. All rights reserved.
- License
This source code is proprietary and subject to the SPARK Microsystems Software EULA found in this package in file EULA.txt.
- Author
SPARK FW Team.
Functions
-
uint32_t wps_stats_get_payload_sent_count(wps_connection_t *connection)¶
Number of payloads successfully sent or dropped.
- Parameters
connection – [in] WPS connection object.
- Returns
Payload sent count.
-
uint32_t wps_stats_get_payload_ack_count(wps_connection_t *connection)¶
Number of payloads successfully sent and acknowledged.
- Parameters
connection – [in] WPS connection object.
- Returns
Payload ack count.
-
uint32_t wps_stats_get_payload_dropped_count(wps_connection_t *connection)¶
Number of payloads dropped.
- Parameters
connection – [in] WPS connection object.
- Returns
Payload dropped count.
-
uint32_t wps_stats_get_payload_ack_ratio(wps_connection_t *connection)¶
Number of payload acknowledged on the total number of payload sent.
- Parameters
connection – [in] WPS connection object.
- Returns
Payload ack ratio.
-
uint32_t wps_stats_get_payload_received_count(wps_connection_t *connection)¶
Number of payloads received.
- Parameters
connection – [in] WPS connection object.
- Returns
Payload received count.
-
uint32_t wps_stats_get_payload_overrun_count(wps_connection_t *connection)¶
Number of payloads dropped because of an RX buffer overload.
- Parameters
connection – [in] WPS connection object.
- Returns
Payload overrun count.
-
uint32_t wps_stats_get_empty_count(wps_connection_t *connection)¶
Number of sync frame sent or the number of empty tx timeslots.
- Parameters
connection – [in] WPS connection object.
- Returns
Empty count.
-
uint32_t wps_stats_get_rx_sync_count(wps_connection_t *connection)¶
Number of sync frame received.
- Parameters
connection – [in] WPS connection object.
- Returns
RX sync count.
-
float wps_stats_get_tx_link_usage_ratio(wps_connection_t *connection)¶
Ratio of TX timeslots with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
TX link usage.
-
float wps_stats_get_rx_link_usage_ratio(wps_connection_t *connection)¶
Ratio of RX timeslots with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
RX link usage.
-
float wps_stats_get_tx_datarate(wps_connection_t *connection, uint32_t time_ms)¶
Average TX datarate in kbps since the last stats reset.
Note
The tx datarate is calculated from the acknowledge count, if ack are disabled the datarate will be 0.
- Parameters
connection – [in] WPS connection object.
time_ms – [in] Elapsed time in ms since the last stats reset.
- Returns
RX datarate.
-
float wps_stats_get_rx_datarate(wps_connection_t *connection, uint32_t time_ms)¶
Average RX datarate in kbps since the last stats reset.
- Parameters
connection – [in] WPS connection object.
time_ms – [in] Elapsed time in ms since the last stats reset.
- Returns
TX datarate.
-
uint32_t wps_stats_get_phy_rssi_avg(wps_connection_t *connection)¶
Get average RSSI on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
Average RSSI.
-
uint32_t wps_stats_get_phy_rssi(wps_connection_t *connection)¶
Get last received RSSI measurement on the given connection.
- Parameters
connection – [in] WPS connection object.
- Returns
Instantaneous RSSI.
-
uint32_t wps_stats_get_phy_rnsi_avg(wps_connection_t *connection)¶
Get average RNSI on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
Average RNSI.
-
uint32_t wps_stats_get_phy_rnsi(wps_connection_t *connection)¶
Get last received RNSI measurement on the given connection.
- Parameters
connection – [in] WPS connection object.
- Returns
Instantaneous RNSI.
-
int32_t wps_stats_get_phy_margin_avg(wps_connection_t *connection)¶
Get link margin on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
Link margin.
-
uint32_t wps_stats_get_phy_inst_phase_offset(wps_connection_t *connection, uint8_t index)¶
Get phase offset instantaneous values.
- Parameters
connection – [in] WPS connection object.
index – [in] Index.
- Returns
Phase offset values.
-
uint32_t wps_stats_get_phy_ack_frame_count(wps_connection_t *connection)¶
Get ack frame count on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
Ack frame count.
-
uint32_t wps_stats_get_phy_nack_frame_count(wps_connection_t *connection)¶
Get nack frame count on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
Nack frame count.
-
uint32_t wps_stats_get_phy_received_frame_count(wps_connection_t *connection)¶
Get received frame count on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
Received frame count.
-
uint32_t wps_stats_get_phy_missing_frame_count(wps_connection_t *connection)¶
Get missing frame count on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
Missing frame count.
-
uint32_t wps_stats_get_phy_rejected_frame_count(wps_connection_t *connection)¶
Get rejected frame count on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
Rejected frame count.
-
uint32_t wps_stats_get_phy_duplicated_frame_count(wps_connection_t *connection)¶
Get duplicated frame count on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
Duplicated frame count.
-
uint32_t wps_stats_get_phy_retry_frame_count(wps_connection_t *connection)¶
Get retry frame count on the physical layer.
- Parameters
connection – WPS connection object.
- Returns
Number of retries.
-
float wps_stats_get_phy_ack_frame_ratio(wps_connection_t *connection)¶
Get ack frame ratio on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
Ack frame ratio.
-
float wps_stats_get_phy_nack_frame_ratio(wps_connection_t *connection)¶
Get nack frame ratio on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
Nack frame ratio.
-
float wps_stats_get_phy_received_frame_ratio(wps_connection_t *connection)¶
Get received frame ratio on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
Received frame ratio.
-
float wps_stats_get_phy_missing_frame_ratio(wps_connection_t *connection)¶
Get missing frame ratio on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
Missing frame ratio.
-
float wps_stats_get_phy_rejected_frame_ratio(wps_connection_t *connection)¶
Get rejected frame ratio on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
Rejected frame ratio.
-
float wps_stats_get_phy_mrr(wps_connection_t *connection)¶
Get Missing/Reject Ration (MRR) frame ratio on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
MRR frame ratio.
-
float wps_stats_get_phy_per(wps_connection_t *connection)¶
Get Payload Error Rate (PER) on the physical layer.
- Parameters
connection – [in] WPS connection object.
- Returns
PER.
-
uint32_t wps_stats_get_phy_cca_pass_count(wps_connection_t *connection)¶
Number CCA pass events.
- Parameters
connection – [in] WPS connection object.
- Returns
CCA pass count.
-
uint32_t wps_stats_get_phy_cca_fail_count(wps_connection_t *connection)¶
Number CCA fail events.
- Parameters
connection – [in] WPS connection object.
- Returns
CCA fail count.
-
float wps_stats_get_phy_cca_pass_ratio(wps_connection_t *connection)¶
CCA pass ratio.
- Parameters
connection – [in] WPS connection object.
- Returns
CCA pass ratio.
-
float wps_stats_get_phy_cca_fail_ratio(wps_connection_t *connection)¶
CCA fail ratio.
- Parameters
connection – [in] WPS connection object.
- Returns
CCA fail ratio.
-
uint32_t wps_stats_get_rssi_avg(wps_connection_t *connection)¶
Get average Received Signal Strength Indicator (RSSI) of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
Average RSSI.
-
uint32_t wps_stats_get_rnsi_avg(wps_connection_t *connection)¶
Get average Received Noise Strength Indicator (RNSI) of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
Average RNSI.
-
int32_t wps_stats_get_margin_avg(wps_connection_t *connection)¶
Get link margin of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
Link margin.
-
uint32_t wps_stats_get_ack_frame_count(wps_connection_t *connection)¶
Get ACK frame count of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
ACK frame count.
-
uint32_t wps_stats_get_nack_frame_count(wps_connection_t *connection)¶
Get NACK frame count of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
NACK frame count.
-
uint32_t wps_stats_get_received_frame_count(wps_connection_t *connection)¶
Get received frame count of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
Received frame count.
-
uint32_t wps_stats_get_missing_frame_count(wps_connection_t *connection)¶
Get missing frame count of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
Missing frame count.
-
uint32_t wps_stats_get_rejected_frame_count(wps_connection_t *connection)¶
Get rejected frame count of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
Rejected frame count.
-
uint32_t wps_stats_get_duplicated_frame_count(wps_connection_t *connection)¶
Get duplicated frame count of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
Duplicated frame count.
-
uint32_t wps_stats_get_retry_frame_count(wps_connection_t *connection)¶
Get retry frame count of frames with payload.
- Parameters
connection – WPS connection object.
- Returns
Number of retries.
-
float wps_stats_get_ack_frame_ratio(wps_connection_t *connection)¶
Get ACK frame ratio of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
ACK frame ratio.
-
float wps_stats_get_nack_frame_ratio(wps_connection_t *connection)¶
Get NACK frame ratio of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
NACK frame ratio.
-
float wps_stats_get_received_frame_ratio(wps_connection_t *connection)¶
Get received frame ratio of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
Received frame ratio.
-
float wps_stats_get_missing_frame_ratio(wps_connection_t *connection)¶
Get missing frame ratio of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
Missing frame ratio.
-
float wps_stats_get_rejected_frame_ratio(wps_connection_t *connection)¶
Get rejected frame ratio of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
Rejected frame ratio.
-
float wps_stats_get_mrr(wps_connection_t *connection)¶
Get Missing/Rejected Ratio (MRR) of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
MRR frame ratio.
-
float wps_stats_get_per(wps_connection_t *connection)¶
Get PER of frames with payload.
- Parameters
connection – [in] WPS connection object.
- Returns
PER.
-
void wps_stats_reset(wps_connection_t *connection)¶
Reset stats.
- Parameters
connection – [in] WPS connection object.
-
uint32_t wps_stats_get_chan_rssi_avg(wps_connection_t *connection, uint8_t channel_idx)¶
Get average RSSI of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Average RSSI.
-
uint32_t wps_stats_get_chan_rssi(wps_connection_t *connection, uint8_t channel_idx)¶
Get last received RSSI of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Last RSSI measurement.
-
uint32_t wps_stats_get_chan_rnsi_avg(wps_connection_t *connection, uint8_t channel_idx)¶
Get average RNSI of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Average RNSI.
-
uint32_t wps_stats_get_chan_rnsi(wps_connection_t *connection, uint8_t channel_idx)¶
Get last received RNSI of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Last RNSI measurment.
-
int32_t wps_stats_get_chan_margin_avg(wps_connection_t *connection, uint8_t channel_idx)¶
Get link margin of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Link margin.
-
uint32_t wps_stats_get_chan_ack_frame_count(wps_connection_t *connection, uint8_t channel_idx)¶
Get ack frame count of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Ack frame count.
-
uint32_t wps_stats_get_chan_nack_frame_count(wps_connection_t *connection, uint8_t channel_idx)¶
Get nack frame count of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Nack frame count.
-
uint32_t wps_stats_get_chan_received_frame_count(wps_connection_t *connection, uint8_t channel_idx)¶
Get received frame count of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Received frame count.
-
uint32_t wps_stats_get_chan_missing_frame_count(wps_connection_t *connection, uint8_t channel_idx)¶
Get missing frame count of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Missing frame count.
-
uint32_t wps_stats_get_chan_rejected_frame_count(wps_connection_t *connection, uint8_t channel_idx)¶
Get rejected frame count of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Rejected frame count.
-
uint32_t wps_stats_get_chan_duplicated_frame_count(wps_connection_t *connection, uint8_t channel_idx)¶
Get duplicated frame count of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Duplicated frame count.
-
uint32_t wps_stats_get_chan_retry_frame_count(wps_connection_t *connection, uint8_t channel_idx)¶
Get retry frame count of frames with payload.
- Parameters
connection – WPS connection object.
channel_idx – [in] Channel index.
- Returns
Number of retries.
-
float wps_stats_get_chan_ack_frame_ratio(wps_connection_t *connection, uint8_t channel_idx)¶
Get ack frame ratio of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Ack frame ratio.
-
float wps_stats_get_chan_nack_frame_ratio(wps_connection_t *connection, uint8_t channel_idx)¶
Get nack frame ratio of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Nack frame ratio.
-
float wps_stats_get_chan_received_frame_ratio(wps_connection_t *connection, uint8_t channel_idx)¶
Get received frame ratio of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Received frame ratio.
-
float wps_stats_get_chan_missing_frame_ratio(wps_connection_t *connection, uint8_t channel_idx)¶
Get missing frame ratio of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Missing frame ratio.
-
float wps_stats_get_chan_rejected_frame_ratio(wps_connection_t *connection, uint8_t channel_idx)¶
Get rejected frame ratio of frames with payload.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
Rejected frame ratio.
-
float wps_stats_get_chan_mrr(wps_connection_t *connection, uint8_t channel_idx)¶
Get Missing/Reject Ration (MRR) of a channel.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
MRR frame ratio.
-
float wps_stats_get_chan_per(wps_connection_t *connection, uint8_t channel_idx)¶
Get Payload Error Rate (PER) of a channel.
- Parameters
connection – [in] WPS connection object.
channel_idx – [in] Channel index.
- Returns
PER.