#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include "app_init.h"
#include "tfa.h"
#include "tal_internal.h"
#include "tal_helper_2.h"
#include "tal_pib.h"
#include "app_frame_format.h"
#include "sio2host.h"
#include "sio2ncp.h"
#include "perf_api.h"
#include "conf_board.h"
#include "user_interface.h"
Data Structures | |
struct | set_param_cb_t |
Structure used for updating the parameters after sending them to peer. More... | |
Functions | |
static float | calculate_net_data_rate (trx_id_t trx, float per_test_duration_sec) |
Function to calculate net data rate for the current PER test. More... | |
static float | calculate_time_duration (trx_id_t trx) |
Function to Calculate the time taken for PER Test. More... | |
uint8_t | check_error_conditions (trx_id_t trx) |
Function to check the error conditions before. More... | |
static void | config_ack_request (trx_id_t trx, bool config_value) |
To set or reset ACK request value. More... | |
static void | config_csma (trx_id_t trx, bool config_value) |
To configure CSMA Setting in the transceiver. More... | |
static void | config_frame_retry (trx_id_t trx, bool config_value) |
To configure frame retry Setting. More... | |
static void | config_per_test_parameters (trx_id_t trx) |
Function to set trx configure parameters. More... | |
static void | config_rx_desensitization (trx_id_t trx, bool config_value) |
To configure rx desensitization level in the transceiver. More... | |
static void | configure_frame_sending (trx_id_t trx) |
To Configure the frame sending. More... | |
static void | configure_range_test_frame_sending (trx_id_t trx) |
To Configure the frame sending. More... | |
void | disconnect_peer_node (trx_id_t trx) |
Function to request the peer to get disconnected from source node. More... | |
void | dump_trx_register_values (trx_id_t trx, uint16_t start_reg_addr, uint16_t end_reg_addr) |
Read a set of registers. More... | |
FLASH_DECLARE (uint8_t perf_config_param_size[]) | |
void | get_board_details (trx_id_t trx) |
prints the hardware details More... | |
void | get_current_configuration (trx_id_t trx) |
To Get the updated/latest values of all configurable parameters on source and peer node. More... | |
void | get_sensor_data (trx_id_t trx) |
To get the Sensor data like Battery voltage. More... | |
void | identify_peer_node (trx_id_t trx) |
Identifying peer node. More... | |
void | initiate_per_test (trx_id_t trx) |
Initiates the test procedure. More... | |
void | initiate_range_test (trx_id_t trx) |
Initiates the Range test procedure. More... | |
void | per_mode_initiator_ed_end_cb (trx_id_t trx, uint8_t energy_level) |
User call back function after ED Scan completion. More... | |
void | per_mode_initiator_init (trx_id_t trx, void *parameter) |
Initialize the application in PER Measurement mode as Initiator. More... | |
void | per_mode_initiator_rx_cb (trx_id_t trx, frame_info_t *frame) |
Callback that is called if data has been received by trx in the PER_FOUND_PER_INITIATOR state. More... | |
void | per_mode_initiator_task (trx_id_t trx) |
Application task for PER Measurement mode as initiator. More... | |
void | per_mode_initiator_tx_done_cb (trx_id_t trx, retval_t status, frame_info_t *frame) |
Callback that is called once tx is done in the PER_FOUND_PER_INITIATOR state . More... | |
void | perf_get_req (trx_id_t trx, uint8_t param_type_data) |
Function to get the various configuration parameters for PER Test. More... | |
void | perf_set_req (trx_id_t trx, uint8_t set_param_type, param_value_t *param_value) |
void | perf_set_sun_page (trx_id_t trx, uint8_t *param_val) |
static void | range_test_timer_handler_rf09_cb (void *parameter) |
This function is called periodically by the range test timer to initiate the transmission of range test packets to the receptor. More... | |
static void | range_test_timer_handler_rf24_cb (void *parameter) |
This function is called periodically by the range test timer to initiate the transmission of range test packets to the receptor. More... | |
void | read_trx_registers (trx_id_t trx, uint16_t reg_addr) |
Stop sending a CW signal on current channel page. More... | |
static void | recover_all_settings (trx_id_t trx) |
Recover all user settings before Start of CW transmission. More... | |
static void | save_all_settings (trx_id_t trx) |
Save all user settings before Start of CW transmission. More... | |
static bool | send_disconnect_command (trx_id_t trx) |
Function used to send disconnect peer node command. More... | |
static bool | send_identify_command (trx_id_t trx) |
Function used to send identify peer node command. More... | |
static void | send_parameters_changed (trx_id_t trx, uint8_t param, uint16_t val) |
Function to send the parameters which has been updated to the receptor node. More... | |
static bool | send_peer_info_req (trx_id_t trx) |
Function to configure and send the peer node info request. More... | |
static bool | send_per_test_start_cmd (trx_id_t trx) |
static bool | send_range_test_marker_rsp (trx_id_t trx) |
Function to send the response packet for the marker sent from the receptor. More... | |
static bool | send_range_test_start_cmd (trx_id_t trx) |
Function to send the range test start command to the receptor to start the mode in the receptor. More... | |
static bool | send_range_test_stop_cmd (trx_id_t trx) |
Function to send the range test stop command to the receptor to stop the mode in the receptor. More... | |
static bool | send_result_req (trx_id_t trx) |
Function used to request PER test result. More... | |
static bool | send_set_default_config_command (trx_id_t trx) |
Function used to send set default config peer command. More... | |
static void | send_sun_page_changed (trx_id_t trx) |
static void | set_channel_app (trx_id_t trx, uint16_t channel) |
To set the Channel. More... | |
static void | set_channel_page (trx_id_t trx, uint8_t channel_page) |
To set the Channel Page. More... | |
void | set_default_configuration (trx_id_t trx) |
To set the default values of all configurable parameters on source and peer node. More... | |
static void | set_parameter_on_transmitter_node (trx_id_t trx, retval_t status) |
Set the parameters like channel,tx power etc on transmitter node. More... | |
static void | set_phy_frame_length (trx_id_t trx, uint16_t frame_len) |
To set PER Test frame length. More... | |
static void | set_transceiver_state (trx_id_t trx, uint8_t transceiver_state) |
Set Transceiver state as per the state given. More... | |
static void | set_tx_power (trx_id_t trx, uint8_t tx_power_format, int8_t power_value) |
To set the Tx power of the Transceiver. More... | |
void | start_ed_scan (trx_id_t trx, uint8_t ed_scan_duration, uint32_t channel_sel_mask) |
To start the ED scan. More... | |
static void | start_range_test (trx_id_t trx) |
static void | start_test (trx_id_t trx) |
static void | stop_pulse_cb (void *callback_parameter) |
void | stop_range_test (trx_id_t trx) |
Function to Stop the range Test in PER Mode. More... | |
static void | toggle_trx_sleep (trx_id_t trx) |
To toggle between sleep /deep state. More... | |
static void | wait_for_reply_timer_handler_cb (void *parameter) |
Wait for reply timer handler is called if any command sent on air times out before any response message is received. More... | |
void | write_trx_registers (trx_id_t trx, uint16_t reg_addr, uint8_t reg_val) |
write Transceiver registers More... | |
Functions for User Request Primitives | |
uint8_t | get_param_length (uint8_t parameter_type) |
|
static |
Wait for reply timer handler is called if any command sent on air times out before any response message is received.
This function handles all the scenarios if the remote node is not accessible
parameter | pass parameters to timer handler |
References app_reset(), NO_PEER_FOUND, NUL_VAL, NULL, op_mode, PARAM_CRC_ON_PEER, PEER_INFO_RSP_WAIT, START_MODE_PER, TX_OP_MODE, UNABLE_TO_CONTACT_PEER, usr_per_test_end_indication(), usr_perf_get_confirm(), usr_perf_start_confirm(), and WAIT_FOR_TEST_RES.
Referenced by per_mode_initiator_init(), and per_mode_initiator_task().