This module handles the functionalities of the Initiator in PER mode.
Modules | |
PER mode Receptor | |
This module handles the functionalities of the receptor in PER mode. | |
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 (float per_test_duration_sec) |
Function to calculate net data rate for the current PER test. More... | |
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 (void) |
Function to Calculate the time taken for 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... | |
uint8_t | check_error_conditions (void) |
Function to check the error conditions before. More... | |
static void | config_ack_request (bool config_value) |
To set or reset ACK request value. 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 (bool config_value) |
To configure CSMA Setting in the transceiver. 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 (bool config_value) |
To configure frame retry Setting. More... | |
static void | config_frame_retry (trx_id_t trx, bool config_value) |
To configure frame retry Setting. More... | |
static void | config_frequency (float frequency) |
Function to configure the ISM frequency based on the request. More... | |
static void | config_per_test_parameters (trx_id_t trx) |
Function to set trx configure parameters. More... | |
static void | config_rpc_mode (bool config_value) |
toggle RPC mode request 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 (void) |
To Configure the frame sending. More... | |
static void | configure_frame_sending (trx_id_t trx) |
To Configure the frame sending. More... | |
static void | configure_range_test_frame_sending (void) |
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 (void) |
Function to request the peer to get disconnected from source node. 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... | |
void | get_board_details (void) |
prints the hardware details More... | |
void | get_board_details (trx_id_t trx) |
prints the hardware details More... | |
void | get_current_configuration (void) |
To Get the updated/latest values of all configurable parameters on source and peer node. 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 (void) |
To get the Sensor data like Battery voltage. More... | |
void | get_sensor_data (trx_id_t trx) |
To get the Sensor data like Battery voltage. More... | |
void | identify_peer_node (void) |
Identifying peer node. More... | |
void | identify_peer_node (trx_id_t trx) |
Identifying peer node. More... | |
void | initiate_per_test (void) |
Initiates the test procedure. More... | |
void | initiate_per_test (trx_id_t trx) |
Initiates the test procedure. More... | |
void | initiate_range_test (void) |
Initiates the Range test procedure. More... | |
void | initiate_range_test (trx_id_t trx) |
Initiates the Range test procedure. More... | |
void | per_mode_initiator_ed_end_cb (uint8_t energy_level) |
User call back function after ED Scan completion. 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 (void *parameter) |
Initialize the application in PER Measurement mode as Initiator. 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 (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_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 (void) |
Application task for PER Measurement mode as initiator. 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 | per_mode_initiator_tx_done_cb (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 (uint8_t param_type_data) |
Function to get the various configuaration paramters for PER Test. 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 (uint8_t set_param_type, param_value_t *param_value) |
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_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_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... | |
uint8_t | scale_ed_to_reg_val (int8_t ed_val) |
int8_t | scale_reg_value_to_ed (uint8_t reg_val) |
static bool | send_disconnect_command (void) |
Function used to send disconnect peer node command. More... | |
static bool | send_disconnect_command (trx_id_t trx) |
Function used to send disconnect peer node command. More... | |
static bool | send_identify_command (void) |
Function used to send identify 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 (uint8_t param, uint8_t val) |
Function to send the parameters which has been updated to the receptor node. 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 (void) |
Function to configure and send the peer node info request. 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 (void) |
static bool | send_per_test_start_cmd (trx_id_t trx) |
static bool | send_range_test_marker_rsp (void) |
Function to send the response packet for the marker sent from the receptor. More... | |
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 (void) |
Function to send the range test start command to the receptor to start the mode in 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 (void) |
Function to send the range test stop command to the receptor to stop 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... | |
void | send_remote_cmd (uint8_t *serial_buf, uint8_t len, bool ack_req) |
Function to send the command to Remote node to perform remote test. More... | |
bool | send_remote_reply_cmd (uint8_t *serial_buf, uint8_t len) |
This function is used to send a remote test repsonse command back to the initiator. More... | |
static bool | send_result_req (void) |
Function used to request PER test result. 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 (void) |
Function used to send set default config peer command. 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 (uint16_t channel) |
To set the Channel. More... | |
static void | set_channel_app (trx_id_t trx, uint16_t channel) |
To set the Channel. More... | |
static void | set_channel_page (uint8_t channel_page) |
To set the Channel Page. More... | |
static void | set_channel_page (trx_id_t trx, uint8_t channel_page) |
To set the Channel Page. More... | |
void | set_default_configuration (void) |
To set the default values of all configurable parameters on source and peer node. 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 (retval_t status) |
Set the parameters like channel,tx power etc on transmitter 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 (uint16_t frame_len) |
To set PER Test frame length. 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 (uint8_t trx_state) |
Set Transceiver state as per the state given. 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 (uint8_t tx_power_format, int8_t power_value) |
To set the Tx power of the Transceiver. 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 (uint8_t ed_scan_duration, uint32_t channel_sel_mask) |
To start the ED scan. 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 (void) |
static void | start_range_test (trx_id_t trx) |
static void | start_test (void) |
static void | start_test (trx_id_t trx) |
static void | stop_pulse_cb (void *callback_parameter) |
void | stop_range_test (void) |
Function to Stop the range Test in PER Mode. More... | |
void | stop_range_test (trx_id_t trx) |
Function to Stop the range Test in PER Mode. More... | |
static void | toggle_trx_sleep (uint8_t sleep_mode) |
To toggle between sleep /deep state. More... | |
static void | toggle_trx_sleep (trx_id_t trx) |
To toggle between sleep /deep state. More... | |
static bool | validate_tx_power (int8_t dbm_value) |
validating the tx power input based on the current channel and page configuration 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) |
#define BIT_COUNT (32) |
Referenced by set_channel_app().
#define CONTINUOUS_TX_MODE (0x07) |
Referenced by check_error_conditions(), per_mode_initiator_task(), and per_mode_initiator_tx_done_cb().
#define DEFAULT_FRAME_LENGTH (20) |
Referenced by config_per_test_parameters().
#define DEFAULT_NO_OF_TEST_FRAMES (100) |
Referenced by config_per_test_parameters().
#define DISCONNECT_PEER (0x0C) |
Referenced by disconnect_peer_node(), per_mode_initiator_task(), and per_mode_initiator_tx_done_cb().
#define IDENTIFY_PEER (0x08) |
Referenced by identify_peer_node(), per_mode_initiator_task(), and per_mode_initiator_tx_done_cb().
#define INVALID_VALUE (0xff) |
Referenced by per_mode_initiator_ed_end_cb(), per_mode_initiator_tx_done_cb(), perf_set_sun_page(), and read_trx_registers().
#define MAX_REG_ADDRESS (0x3ffe) |
Referenced by read_trx_registers(), and write_trx_registers().
#define MAX_SCAN_DURATION (14) |
Referenced by start_ed_scan().
#define MICRO_SEC_MULTIPLIER (1.0 / 1000000) |
Referenced by calculate_time_duration(), per_mode_initiator_tx_done_cb(), and start_test().
#define MILLI_VOLT_MULTIPLIER (1.0 / 1000) |
Referenced by get_sensor_data().
#define MIN_REG_ADDRESS (0x0000) |
#define NO_OF_REGISTERS (256) |
Referenced by dump_trx_register_values().
#define NO_RX_DESENSITIZE_LEVEL (0x00) |
Referenced by config_rx_desensitization().
#define PEER_INFO_RSP_WAIT (0x0B) |
Referenced by per_mode_initiator_init(), per_mode_initiator_rx_cb(), and wait_for_reply_timer_handler_cb().
#define PER_TEST_START (0x0E) |
Referenced by initiate_per_test(), and per_mode_initiator_tx_done_cb().
#define PULSE_CW_TX_TIME_IN_MICRO_SEC (50000) |
#define RANGE_TEST_START (0x0F) |
Referenced by initiate_range_test(), and per_mode_initiator_tx_done_cb().
#define RANGE_TEST_STOP (0x11) |
Referenced by per_mode_initiator_tx_done_cb(), and stop_range_test().
#define RANGE_TEST_TX (0x10) |
Referenced by per_mode_initiator_rx_cb(), per_mode_initiator_tx_done_cb(), start_range_test(), and stop_range_test().
#define RANGE_TST_PKT_SEQ_POS (11) |
#define RANGE_TX_BEACON_INTERVAL (3000000) |
Referenced by range_test_timer_handler_rf09_cb(), and range_test_timer_handler_rf24_cb().
#define RANGE_TX_BEACON_START_INTERVAL (100000) |
Referenced by start_range_test().
#define RX_DESENSITIZE_LEVEL (0x08) |
Referenced by config_rx_desensitization(), and recover_all_settings().
#define SET_DEFAULT_CONFIG_PEER (0x0D) |
Referenced by per_mode_initiator_tx_done_cb(), and set_default_configuration().
#define SET_PARAMETER (0x04) |
#define TEST_FRAMES_SENT (0x02) |
Referenced by per_mode_initiator_task(), and per_mode_initiator_tx_done_cb().
#define TIMEOUT_FOR_RES_IN_MICRO_SEC_FOR_LDR (500000) |
Referenced by per_mode_initiator_task().
#define TIMEOUT_FOR_RESPONSE_IN_MICRO_SEC (2000000) |
Referenced by per_mode_initiator_init().
#define TIMEOUT_FOR_RESULT_RES_IN_MICRO_SEC (300000) |
Referenced by per_mode_initiator_task().
#define TRX_RESET (0) |
Referenced by set_transceiver_state().
#define TX_OP_MODE (0x01) |
#define WAIT_FOR_TEST_RES (0x03) |
|
static |
Function to calculate net data rate for the current PER test.
per_test_duration_sec | Time duration for PER test |
References curr_trx_config_params, trx_config_params_t::number_test_frames, and trx_config_params_t::phy_frame_length.
Referenced by per_mode_initiator_rx_cb().
|
static |
Function to calculate net data rate for the current PER test.
per_test_duration_sec | Time duration for PER test |
References trx_config_params_t::number_test_frames, and trx_config_params_t::phy_frame_length.
Referenced by per_mode_initiator_rx_cb().
|
static |
Function to Calculate the time taken for PER Test.
References end_time, MICRO_SEC_MULTIPLIER, no_of_roll_overs, start_time, and SUB_TIME.
Referenced by per_mode_initiator_rx_cb().
|
static |
Function to Calculate the time taken for PER Test.
References end_time, MICRO_SEC_MULTIPLIER, no_of_roll_overs, start_time, and SUB_TIME.
Referenced by per_mode_initiator_rx_cb().
uint8_t check_error_conditions | ( | trx_id_t | trx | ) |
Function to check the error conditions before.
Function used to check the error conditions before.
processing the received command
References CONTINUOUS_TX_MODE, CW_TRANSMISSION_UNDER_PROGRESS, ED_SCAN_UNDER_PROGRESS, frames_to_transmit, MAC_SUCCESS, op_mode, RANGE_TEST_IN_PROGRESS, range_test_in_progress, scanning, TRANSCEIVER_IN_SLEEP, TRANSMISSION_UNDER_PROGRESS, and trx_sleep_status.
uint8_t check_error_conditions | ( | void | ) |
Function to check the error conditions before.
Function used to check the error conditions before.
processing the received command
References CONTINUOUS_TX_MODE, CW_TRANSMISSION_UNDER_PROGRESS, ED_SCAN_UNDER_PROGRESS, frames_to_transmit, MAC_SUCCESS, op_mode, PKT_STREAM_IN_PROGRESS, pkt_stream_stop, RANGE_TEST_IN_PROGRESS, range_test_in_progress, remote_serial_tx_failure, rx_on_mode, RX_ON_MODE_IN_PROGRESS, scanning, TRANSCEIVER_IN_SLEEP, TRANSMISSION_UNDER_PROGRESS, trx_sleep_status, and UNABLE_TO_CONTACT_PEER.
Referenced by handle_incoming_msg().
|
static |
To set or reset ACK request value.
config_value | value to be configured |
References trx_config_params_t::ack_request, curr_trx_config_params, MAC_SUCCESS, PARAM_ACK_REQUEST, param_value_t::param_value_bool, and usr_perf_set_confirm().
Referenced by perf_set_req().
To set or reset ACK request value.
config_value | value to be configured |
References trx_config_params_t::ack_request, MAC_SUCCESS, PARAM_ACK_REQUEST, and usr_perf_set_confirm().
Referenced by perf_set_req().
|
static |
To configure CSMA Setting in the transceiver.
config_value | value to be configured |
References trx_config_params_t::csma_enabled, curr_trx_config_params, MAC_SUCCESS, PARAM_CSMA, param_value_t::param_value_bool, and usr_perf_set_confirm().
Referenced by perf_set_req().
To configure CSMA Setting in the transceiver.
config_value | value to be configured |
References trx_config_params_t::csma_enabled, MAC_SUCCESS, PARAM_CSMA, and usr_perf_set_confirm().
Referenced by perf_set_req().
|
static |
To configure frame retry Setting.
config_value | value to be configured |
References curr_trx_config_params, MAC_SUCCESS, PARAM_FRAME_RETRY, param_value_t::param_value_bool, trx_config_params_t::retry_enabled, and usr_perf_set_confirm().
Referenced by perf_set_req().
To configure frame retry Setting.
config_value | value to be configured |
References MAC_SUCCESS, PARAM_FRAME_RETRY, trx_config_params_t::retry_enabled, and usr_perf_set_confirm().
Referenced by perf_set_req().
|
static |
Function to configure the ISM frequency based on the request.
frequency | Frequency value to be configured |
References BASE_ISM_FREQUENCY_MHZ, CC_BAND_8, CC_BAND_9, trx_config_params_t::channel, curr_trx_config_params, FREQ_BAND_08, FREQ_BAND_09, INVALID_VALUE, trx_config_params_t::ism_frequency, MAC_SUCCESS, MAX_ISM_FREQUENCY_MHZ, MID_ISM_FREQUENCY_MHZ, MIN_ISM_FREQUENCY_MHZ, PARAM_ISM_FREQUENCY, param_value_t::param_value_float, peer_found, send_parameters_changed(), SR_CC_BAND, SR_CC_NUMBER, tal_calculate_frequency(), trx_bit_write(), usr_perf_set_confirm(), and VALUE_OUT_OF_RANGE.
Referenced by perf_set_req().
|
static |
Function to set trx configure parameters.
References trx_config_params_t::ack_request, trx_config_params_t::channel, trx_config_params_t::channel_page, trx_config_params_t::csma_enabled, DEFAULT_CHANNEL_RF09, DEFAULT_CHANNEL_RF24, DEFAULT_FRAME_LENGTH, DEFAULT_NO_OF_TEST_FRAMES, trx_config_params_t::number_test_frames, peer_found, trx_config_params_t::phy_frame_length, phyCurrentChannel, phyCurrentPage, phyTransmitPower, trx_config_params_t::retry_enabled, RF24, RX_ON, TAL_CURRENT_PAGE_DEFAULT_RF09, TAL_CURRENT_PAGE_DEFAULT_RF24, tal_get_curr_trx_config(), tal_pib_set(), TAL_TRANSMIT_POWER_DEFAULT, temp, TRX_OFF, trx_config_params_t::trx_state, trx_config_params_t::tx_power_dbm, and TX_PWR.
|
static |
toggle RPC mode request
config_value | Value to be configured for RPC |
References ANT_CTRL_0, ANT_CTRL_1, ANT_DIVERSITY_DISABLE, ANT_DIVERSITY_ENABLE, ANTENNA_DEFAULT, CMD_RX_AACK_ON, CMD_RX_ON, CMD_TRX_OFF, curr_trx_config_params, DISABLE_ALL_RPC_MODES, DISABLE_RX_SAFE_MODE, ENABLE_ALL_RPC_MODES, ENABLE_RX_SAFE_MODE, MAC_SUCCESS, PARAM_RPC, param_value_t::param_value_bool, RG_TRX_CTRL_2, trx_config_params_t::rpc_enable, RX_AACK_ON, RX_ON, set_trx_state(), tal_ant_div_config(), tal_get_trx_status(), tal_rpc_mode_config(), tal_trx_reg_write(), and usr_perf_set_confirm().
Referenced by perf_set_req().
To configure rx desensitization level in the transceiver.
config_value | Value used to configure Rx desensitization |
References MAC_SUCCESS, NO_RX_DESENSITIZE_LEVEL, PARAM_DESENSITIZATION, RX_DESENSITIZE_LEVEL, tal_set_rx_sensitivity_level(), and usr_perf_set_confirm().
Referenced by perf_set_req().
|
static |
To Configure the frame sending.
References trx_config_params_t::ack_request, CCPU_ENDIAN_TO_LE16, app_payload_t::cmd_id, convert_16_bit_to_byte_array(), curr_trx_config_params, DST_PAN_ID, FCF_ACK_REQUEST, FCF_FRAMETYPE_DATA, FCF_LEN, FCF_PAN_ID_COMPRESSION, FCF_SET_DEST_ADDR_MODE, FCF_SET_SOURCE_ADDR_MODE, FCF_SHORT_ADDR, FCS_LEN, FRAME_OVERHEAD, frame_info_tag::mpdu, node_info, PAN_ID_LEN, node_ib_t::peer_short_addr, PER_TEST_PKT, trx_config_params_t::phy_frame_length, SHORT_ADDR_LEN, SRC_PAN_ID, tal_pib, and node_ib_t::tx_frame_info.
Referenced by set_phy_frame_length(), and start_test().
|
static |
To Configure the frame sending.
References CCPU_ENDIAN_TO_LE16, app_payload_t::cmd_id, convert_16_bit_to_byte_array(), DST_PAN_ID, FCF_ACK_REQUEST, FCF_FRAMETYPE_DATA, FCF_LEN, FCF_PAN_ID_COMPRESSION, FCF_SET_DEST_ADDR_MODE, FCF_SET_SOURCE_ADDR_MODE, FCF_SHORT_ADDR, FRAME_OVERHEAD, frame_info_tag::mpdu, node_info, PAN_ID_LEN, node_ib_t::peer_short_addr, PER_TEST_PKT, trx_config_params_t::phy_frame_length, SHORT_ADDR_LEN, SRC_PAN_ID, tal_pib, and node_ib_t::tx_frame_info.
Referenced by set_channel_page(), set_parameter_on_transmitter_node(), set_phy_frame_length(), and start_test().
|
static |
To Configure the frame sending.
References trx_config_params_t::ack_request, CCPU_ENDIAN_TO_LE16, CCPU_ENDIAN_TO_LE32, app_payload_t::cmd_id, convert_16_bit_to_byte_array(), curr_trx_config_params, data, DST_PAN_ID, range_tx_t::ed, FCF_ACK_REQUEST, FCF_FRAMETYPE_DATA, FCF_LEN, FCF_PAN_ID_COMPRESSION, FCF_SET_DEST_ADDR_MODE, FCF_SET_SOURCE_ADDR_MODE, FCF_SHORT_ADDR, FCS_LEN, range_tx_t::frame_count, FRAME_OVERHEAD, range_tx_t::lqi, frame_info_tag::mpdu, node_info, PAN_ID_LEN, app_payload_t::payload, node_ib_t::peer_short_addr, range_test_frame_cnt, RANGE_TEST_PKT, RANGE_TEST_PKT_LENGTH, app_payload_t::seq_num, seq_num_initiator, SHORT_ADDR_LEN, SRC_PAN_ID, tal_pib, and node_ib_t::tx_frame_info.
Referenced by range_test_timer_handler_cb().
|
static |
To Configure the frame sending.
References CCPU_ENDIAN_TO_LE16, CCPU_ENDIAN_TO_LE32, app_payload_t::cmd_id, convert_16_bit_to_byte_array(), data, DST_PAN_ID, range_tx_t::ed, FCF_ACK_REQUEST, FCF_FRAMETYPE_DATA, FCF_LEN, FCF_PAN_ID_COMPRESSION, FCF_SET_DEST_ADDR_MODE, FCF_SET_SOURCE_ADDR_MODE, FCF_SHORT_ADDR, range_tx_t::frame_count, FRAME_OVERHEAD, range_tx_t::lqi, frame_info_tag::mpdu, node_info, PAN_ID_LEN, app_payload_t::payload, node_ib_t::peer_short_addr, range_test_frame_cnt, RANGE_TEST_PAYLOAD_LENGTH, RANGE_TEST_PKT, app_payload_t::seq_num, seq_num_initiator, SHORT_ADDR_LEN, SRC_PAN_ID, tal_pib, and node_ib_t::tx_frame_info.
Referenced by range_test_timer_handler_rf09_cb(), and range_test_timer_handler_rf24_cb().
void disconnect_peer_node | ( | void | ) |
Function to request the peer to get disconnected from source node.
References app_reset(), DISCONNECT_PEER, MAC_SUCCESS, node_info, op_mode, node_ib_t::peer_found, send_disconnect_command(), TRANSMISSION_FAILURE, TX_OP_MODE, and usr_peer_disconnect_confirm().
Referenced by handle_incoming_msg().
void disconnect_peer_node | ( | trx_id_t | trx | ) |
Function to request the peer to get disconnected from source node.
References app_reset(), DISCONNECT_PEER, MAC_SUCCESS, node_info, op_mode, peer_found, send_disconnect_command(), TRANSMISSION_FAILURE, TX_OP_MODE, and usr_peer_disconnect_confirm().
void dump_trx_register_values | ( | trx_id_t | trx, |
uint16_t | start_reg_addr, | ||
uint16_t | end_reg_addr | ||
) |
Read a set of registers.
start_reg_addr | The start address of the group of registers to be read |
end_reg_addr | The end register of the group of registers to be read |
References INVALID_REGISTER_ORDER, MAC_SUCCESS, NO_OF_REGISTERS, NUL_VAL, status, tal_dump_registers(), usr_register_dump_confirm(), and VALUE_OUT_OF_RANGE.
void get_board_details | ( | void | ) |
prints the hardware details
References BOARD_NAME, CONTINUOUS_RX_ON_MODE, FIRMWARE_VERSION, fw_feature_mask, IC_TYPE, MAC_SUCCESS, MCU_SOC_NAME, MULTI_CHANNEL_SELECT, PER_RANGE_TEST_MODE, PER_REMOTE_CONFIG_MODE, PKT_STREAMING_MODE, reverse_float(), tal_pib, TRANSCEIVER_NAME, and usr_identify_board_confirm().
Referenced by handle_incoming_msg().
void get_board_details | ( | trx_id_t | trx | ) |
prints the hardware details
References BOARD_NAME, FIRMWARE_VERSION, fw_feature_mask, IC_TYPE, MAC_SUCCESS, MCU_SOC_NAME, MULTI_CHANNEL_SELECT, PER_RANGE_TEST_MODE, reverse_float(), RF24, tal_pib, and usr_identify_board_confirm().
void get_current_configuration | ( | void | ) |
To Get the updated/latest values of all configurable parameters on source and peer node.
Function to get the current values of the all configurable parameters.
References curr_trx_config_params, MAC_SUCCESS, and usr_get_current_config_confirm().
Referenced by handle_incoming_msg().
void get_current_configuration | ( | trx_id_t | trx | ) |
To Get the updated/latest values of all configurable parameters on source and peer node.
Function to get the current values of the all configurabel patameters.
References MAC_SUCCESS, and usr_get_current_config_confirm().
uint8_t get_param_length | ( | uint8_t | parameter_type | ) |
References PGM_READ_BYTE.
Referenced by handle_incoming_msg(), usr_perf_get_confirm(), and usr_perf_set_confirm().
void get_sensor_data | ( | void | ) |
To get the Sensor data like Battery voltage.
Function to get the Sensor data like Battery volatge.
References MAC_SUCCESS, MILLI_VOLT_MULTIPLIER, reverse_float(), tfa_get_batmon_voltage(), tfa_get_temperature(), and usr_sensor_data_get_confirm().
Referenced by handle_incoming_msg().
void get_sensor_data | ( | trx_id_t | trx | ) |
To get the Sensor data like Battery voltage.
Function to get the Sensor data like Battery volatge.
References MAC_SUCCESS, MILLI_VOLT_MULTIPLIER, reverse_float(), tfa_get_batmon_voltage(), tfa_get_temperature(), and usr_sensor_data_get_confirm().
void identify_peer_node | ( | void | ) |
Identifying peer node.
References IDENTIFY_PEER, op_mode, send_identify_command(), TRANSMISSION_FAILURE, TX_OP_MODE, and usr_identify_peer_node_confirm().
Referenced by handle_incoming_msg().
void identify_peer_node | ( | trx_id_t | trx | ) |
Identifying peer node.
References IDENTIFY_PEER, op_mode, send_identify_command(), TRANSMISSION_FAILURE, TX_OP_MODE, and usr_identify_peer_node_confirm().
void initiate_per_test | ( | void | ) |
Initiates the test procedure.
References op_mode, PER_TEST_START, send_per_test_start_cmd(), and TX_OP_MODE.
Referenced by handle_incoming_msg().
void initiate_per_test | ( | trx_id_t | trx | ) |
Initiates the test procedure.
References INVALID_CMD, op_mode, PER_TEST_START, send_per_test_start_cmd(), TX_OP_MODE, UNABLE_TO_CONTACT_PEER, and usr_per_test_start_confirm().
void initiate_range_test | ( | void | ) |
Initiates the Range test procedure.
References INVALID_CMD, op_mode, RANGE_TEST_START, send_range_test_start_cmd(), TX_OP_MODE, and usr_range_test_start_confirm().
Referenced by handle_incoming_msg().
void initiate_range_test | ( | trx_id_t | trx | ) |
Initiates the Range test procedure.
References INVALID_CMD, op_mode, RANGE_TEST_START, send_range_test_start_cmd(), TX_OP_MODE, and usr_range_test_start_confirm().
void per_mode_initiator_ed_end_cb | ( | uint8_t | energy_level | ) |
User call back function after ED Scan completion.
energy | level as input |
Send the ED_END_INDICATION with the no. of channels and the list with channel no and pin values
References channel_before_scan, ed_scan_result_t::channel_no, INVALID_VALUE, MAX_CHANNEL, MIN_CHANNEL, num_channels, ed_scan_result_t::p_in, phy_tx_power, phyCurrentChannel, phyCurrentPage, phyTransmitPower, pib_value_t::pib_value_8bit, RSSI_BASE_VAL_DBM, scan_channel_mask, scan_duration, scanning, tal_pib_get(), tal_pib_set(), and usr_ed_scan_end_indication().
void per_mode_initiator_ed_end_cb | ( | trx_id_t | trx, |
uint8_t | energy_level | ||
) |
User call back function after ED Scan completion.
energy | level as input |
Send the ED_END_INDICATION with the no. of channels and the list with channel no and pin values
References channel_before_scan, ed_scan_result_t::channel_no, INVALID_VALUE, num_channels, NUM_TRX, ed_scan_result_t::p_in, phyCurrentChannel, phyCurrentPage, RF09, scan_channel_mask, scan_duration, scanning, tal_pib_get(), tal_pib_set(), and usr_ed_scan_end_indication().
void per_mode_initiator_init | ( | void * | parameter | ) |
Initialize the application in PER Measurement mode as Initiator.
parameter | Pointer to the parameter to be carried, if any. |
References app_led_event(), APP_TIMER_TO_TX, CMD_TRX_OFF, config_per_test_parameters(), default_trx_config_params, FUNC_PTR, LED_EVENT_POWER_ON, MAC_SUCCESS, node_ib_t::main_state, node_info, NUL_VAL, NULL, op_mode, PA_EXT_ENABLE, peer_found, node_ib_t::peer_found, PEER_INFO_RSP_WAIT, PER_TEST_INITIATOR, phyTransmitPower, pib_value_t::pib_value_8bit, send_peer_info_req(), seq_num_initiator, set_trx_state(), START_MODE_SINGLE_NODE, SW_TIMEOUT_RELATIVE, sw_timer_start(), tal_ext_pa_ctrl(), tal_pib_set(), TAL_TRANSMIT_POWER_DEFAULT, TIMEOUT_FOR_RESPONSE_IN_MICRO_SEC, usr_perf_start_confirm(), and wait_for_reply_timer_handler_cb().
void per_mode_initiator_init | ( | trx_id_t | trx, |
void * | parameter | ||
) |
Initialize the application in PER Measurement mode as Initiator.
parameter | Pointer to the paramter to be carried, if any. |
References app_led_event(), APP_TIMER_TO_TX, config_per_test_parameters(), FUNC_PTR, LED_EVENT_POWER_ON, MAC_SUCCESS, node_info, NUL_VAL, NULL, op_mode, peer_found, node_ib_t::peer_found, PEER_INFO_RSP_WAIT, PER_TEST_INITIATOR, send_peer_info_req(), seq_num_initiator, START_MODE_SINGLE_NODE, SW_TIMEOUT_RELATIVE, sw_timer_start(), TIMEOUT_FOR_RESPONSE_IN_MICRO_SEC, usr_perf_start_confirm(), and wait_for_reply_timer_handler_cb().
void per_mode_initiator_rx_cb | ( | frame_info_t * | frame | ) |
Callback that is called if data has been received by trx in the PER_FOUND_PER_INITIATOR state.
frame | Pointer to received frame |
References ANT_CTRL_0, ANT_CTRL_1, ANT_CTRL_2, app_led_event(), APP_TIMER_TO_TX, aver_lqi, aver_rssi, peer_info_rsp_t::board_name, calculate_net_data_rate(), calculate_time_duration(), CCPU_ENDIAN_TO_LE32, app_payload_t::cmd_id, CMD_ID_LEN, convert_ota_serial_frame_tx(), general_pkt_t::crc_stat_rsp_data, curr_trx_config_params, CW_TX_TIMER, default_trx_config_params, general_pkt_t::div_stat_rsp_data, range_tx_t::ed, ED_VAL_LEN, FCS_LEN, peer_info_rsp_t::feature_mask, frame_access_failure, frame_failure, frame_no_ack, FRAME_OVERHEAD, result_rsp_t::frames_with_wrong_crc, FUNC_PTR, peer_info_rsp_t::fw_version, peer_info_rsp_t::ic_type, INVALID_VALUE, LED_BLINK_RATE_IN_MICRO_SEC, LED_EVENT_RX_FRAME, LENGTH_FIELD_LEN, range_tx_t::lqi, result_rsp_t::lqi_avrg_rx, LQI_LEN, peer_info_rsp_t::mac_address, MAC_SUCCESS, marker_rsp_timer_handler_cb(), frame_info_tag::mpdu, NULL, result_rsp_t::num_of_frames_rx, number_rx_frames, op_mode, PARAM_ANT_DIVERSITY_ON_PEER, PARAM_CRC_ON_PEER, param_value_t::param_value_bool, app_payload_t::payload, PEER_INFO_RSP, general_pkt_t::peer_info_rsp_data, PEER_INFO_RSP_WAIT, RANGE_TEST_MARKER_CMD, RANGE_TEST_RSP, RANGE_TEST_TX, general_pkt_t::range_tx_data, remote_test_req_t::remote_serial_data, REMOTE_TEST_REPLY_CMD, general_pkt_t::remote_test_req_data, RESULT_RSP, reverse_float(), result_rsp_t::rssi_avrg_rx, rx_on_mode, send_range_test_marker_rsp(), app_payload_t::seq_num, SEQ_NUM_LEN, peer_info_rsp_t::soc_mcu_name, START_MODE_PER, div_stat_rsp_t::status, crc_stat_rsp_t::status, SW_TIMEOUT_RELATIVE, sw_timer_is_running(), sw_timer_start(), sw_timer_stop(), T_APP_TIMER, tal_get_rssi_base_val(), general_pkt_t::test_result_rsp_data, peer_info_rsp_t::trx_name, TX_OP_MODE, usr_per_test_end_indication(), usr_perf_get_confirm(), usr_perf_start_confirm(), usr_range_test_beacon_rsp(), usr_range_test_marker_ind(), and WAIT_FOR_TEST_RES.
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.
frame | Pointer to received frame |
References app_led_event(), APP_TIMER_TO_TX, aver_lqi, peer_info_rsp_t::board_name, calculate_net_data_rate(), calculate_time_duration(), CCPU_ENDIAN_TO_LE32, app_payload_t::cmd_id, general_pkt_t::crc_stat_rsp_data, range_tx_t::ed, peer_info_rsp_t::feature_mask, frame_access_failure, frame_failure, frame_no_ack, FRAME_OVERHEAD, result_rsp_t::frames_with_wrong_crc, FUNC_PTR, peer_info_rsp_t::fw_version, peer_info_rsp_t::ic_type, LED_BLINK_RATE_IN_MICRO_SEC, LED_EVENT_RX_FRAME, range_tx_t::lqi, result_rsp_t::lqi_avrg_rx, peer_info_rsp_t::mac_address, MAC_SUCCESS, marker_rsp_timer_handler_cb(), frame_info_tag::mpdu, result_rsp_t::num_of_frames_rx, NUM_TRX, number_rx_frames, op_mode, PARAM_CRC_ON_PEER, app_payload_t::payload, PEER_INFO_RSP, general_pkt_t::peer_info_rsp_data, PEER_INFO_RSP_WAIT, RANGE_TEST_MARKER_CMD, RANGE_TEST_RSP, RANGE_TEST_TX, general_pkt_t::range_tx_data, RESULT_RSP, reverse_float(), result_rsp_t::rssi_avrg_rx, send_range_test_marker_rsp(), app_payload_t::seq_num, peer_info_rsp_t::soc_mcu_name, START_MODE_PER, crc_stat_rsp_t::status, SW_TIMEOUT_RELATIVE, sw_timer_start(), sw_timer_stop(), T_APP_TIMER, tal_pib, general_pkt_t::test_result_rsp_data, peer_info_rsp_t::trx_name, TX_OP_MODE, usr_per_test_end_indication(), usr_perf_get_confirm(), usr_perf_start_confirm(), usr_range_test_beacon_rsp(), usr_range_test_marker_ind(), and WAIT_FOR_TEST_RES.
void per_mode_initiator_task | ( | void | ) |
Application task for PER Measurement mode as initiator.
This function
References APP_TIMER_TO_TX, CONTINUOUS_TX_MODE, trx_config_params_t::csma_enabled, CSMA_UNSLOTTED, curr_trx_config_params, DISCONNECT_PEER, frames_to_transmit, FUNC_PTR, IDENTIFY_PEER, node_ib_t::main_state, frame_info_tag::mpdu, NO_CSMA_NO_IFS, node_info, NULL, op_mode, PER_TEST_INITIATOR, pkt_stream_gap_time, pkt_stream_gap_timer(), PKT_STREAM_MODE, PL_POS_SEQ_NUM, rdy_to_tx, trx_config_params_t::retry_enabled, send_result_req(), SET_PARAMETER, stream_pkt, SW_TIMEOUT_RELATIVE, sw_timer_start(), T_APP_TIMER, tal_tx_frame(), TEST_FRAMES_SENT, TIMEOUT_FOR_RESPONSE_IN_MICRO_SEC, node_ib_t::transmitting, node_ib_t::tx_frame_info, TX_OP_MODE, wait_for_reply_timer_handler_cb(), and WAIT_FOR_TEST_RES.
void per_mode_initiator_task | ( | trx_id_t | trx | ) |
Application task for PER Measurement mode as initiator.
This function
References APP_TIMER_TO_TX, CHIP_RATE_100, CONTINUOUS_TX_MODE, CSMA_UNSLOTTED, delay_ms, DISCONNECT_PEER, frames_to_transmit, FUNC_PTR, IDENTIFY_PEER, frame_info_tag::mpdu, NO_CSMA_WITH_IFS, node_info, OFDM, op_mode, PL_POS_SEQ_NUM, send_result_req(), SET_PARAMETER, SW_TIMEOUT_RELATIVE, sw_timer_start(), tal_pib, tal_tx_frame(), TEST_FRAMES_SENT, TIMEOUT_FOR_RES_IN_MICRO_SEC_FOR_LDR, TIMEOUT_FOR_RESULT_RES_IN_MICRO_SEC, node_ib_t::transmitting, node_ib_t::tx_frame_info, TX_OP_MODE, wait_for_reply_timer_handler_cb(), and WAIT_FOR_TEST_RES.
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 .
status | Status of the transmission procedure |
frame | Pointer to the transmitted frame structure |
References app_led_event(), app_reset(), APP_TIMER_TO_TX, APP_TIMER_TO_TX_LED_OFF, CH_PG_SUN, trx_config_params_t::channel, trx_config_params_t::channel_page, app_payload_t::cmd_id, config_per_test_parameters(), CONTINUOUS_TX_MODE, general_pkt_t::crc_set_req_data, DISCONNECT_PEER, end_time, frame_access_failure, frame_failure, frame_no_ack, FRAME_OVERHEAD, frames_to_transmit, FSK, IDENTIFY_PEER, INVALID_VALUE, LED_EVENT_PEER_SEARCH_DONE, LED_EVENT_TX_FRAME, LED_TOGGLE_COUNT_FOR_PER, LEG_OQPSK, MAC_CHANNEL_ACCESS_FAILURE, MAC_NO_ACK, MAC_SUCCESS, MICRO_SEC_MULTIPLIER, frame_info_tag::mpdu, no_of_roll_overs, node_info, NUL_VAL, OFDM, op_mode, OQPSK, OQPSK_DATA_RATE_250, PARAM_CHANNEL_PAGE, PARAM_CRC_ON_PEER, app_payload_t::payload, PER_TEST_START, phy_tag::phy_mode, phyCurrentChannel, phyFSKFECEnabled, phyHighRateEnabled, phyOFDMMCS, phyOQPSKRateMode, phySetting, range_test_frame_cnt, range_test_in_progress, RANGE_TEST_PKT, RANGE_TEST_START, RANGE_TEST_STOP, RANGE_TEST_TX, restart_time, RF24, SET_DEFAULT_CONFIG_PEER, SET_PARAMETER, set_parameter_on_transmitter_node(), SET_SUN_PAGE, start_range_test(), start_test(), crc_set_req_t::status, sun_page_param_val, sw_timer_get_time(), sw_timer_stop(), T_APP_TIMER_RANGE_RF09, T_APP_TIMER_RANGE_RF24, tal_pib, tal_pib_get(), tal_pib_set(), TEST_FRAMES_SENT, node_ib_t::transmitting, TX_OP_MODE, UNABLE_TO_CONTACT_PEER, usr_identify_peer_node_confirm(), usr_peer_disconnect_confirm(), usr_per_test_end_indication(), usr_perf_set_confirm(), usr_range_test_beacon_tx(), usr_range_test_start_confirm(), usr_range_test_stop_confirm(), usr_set_default_config_confirm(), and WAIT_FOR_TEST_RES.
void per_mode_initiator_tx_done_cb | ( | retval_t | status, |
frame_info_t * | frame | ||
) |
Callback that is called once tx is done in the PER_FOUND_PER_INITIATOR state .
status | Status of the transmission procedure |
frame | Pointer to the transmitted frame structure |
References div_set_req_t::ant_sel, app_led_event(), app_reset(), APP_TIMER_TO_TX, APP_TIMER_TO_TX_LED_OFF, app_payload_t::cmd_id, CMD_ID_LEN, config_per_test_parameters(), CONTINUOUS_TX_MODE, convert_ota_serial_frame_rx(), general_pkt_t::crc_set_req_data, curr_trx_config_params, CW_TX_TIMER, default_trx_config_params, DISCONNECT_PEER, end_time, FCS_LEN, frame_access_failure, frame_failure, frame_no_ack, FRAME_OVERHEAD, frames_to_transmit, IDENTIFY_PEER, LED_EVENT_PEER_SEARCH_DONE, LED_EVENT_TX_FRAME, LED_TOGGLE_COUNT_FOR_PER, LENGTH_FIELD_LEN, MAC_CHANNEL_ACCESS_FAILURE, MAC_NO_ACK, MAC_SUCCESS, MICRO_SEC_MULTIPLIER, frame_info_tag::mpdu, no_of_roll_overs, node_info, NUL_VAL, op_mode, PARAM_ANT_DIVERSITY_ON_PEER, PARAM_CRC_ON_PEER, param_value_t::param_value_bool, app_payload_t::payload, PER_TEST_START, PKT_STREAM_MODE, pkt_stream_stop, range_test_frame_cnt, range_test_in_progress, RANGE_TEST_PKT, RANGE_TEST_START, RANGE_TEST_STOP, RANGE_TEST_TX, remote_test_req_t::remote_serial_data, remote_serial_tx_failure, REMOTE_TEST_MODE, general_pkt_t::remote_test_req_data, restart_time, SEQ_NUM_LEN, SET_DEFAULT_CONFIG_PEER, SET_PARAMETER, set_parameter_on_transmitter_node(), start_range_test(), start_test(), div_set_req_t::status, crc_set_req_t::status, sw_timer_get_time(), sw_timer_stop(), T_APP_TIMER_RANGE, TEST_FRAMES_SENT, node_ib_t::transmitting, node_ib_t::tx_frame_info, TX_OP_MODE, UNABLE_TO_CONTACT_PEER, usr_identify_peer_node_confirm(), usr_peer_disconnect_confirm(), usr_per_test_end_indication(), usr_perf_set_confirm(), usr_range_test_beacon_tx(), usr_range_test_start_confirm(), usr_range_test_stop_confirm(), usr_set_default_config_confirm(), and WAIT_FOR_TEST_RES.
void perf_get_req | ( | uint8_t | param_type_data | ) |
Function to get the various configuaration paramters for PER Test.
param_type | Parameter type to be read |
References trx_config_params_t::ack_request, CONV_phyTransmitPower_TO_DBM, trx_config_params_t::csma_enabled, curr_trx_config_params, current_channel, INVALID_ARGUMENT, trx_config_params_t::ism_frequency, MAC_SUCCESS, trx_config_params_t::number_test_frames, PARAM_ACK_REQUEST, PARAM_ANT_DIVERSITY, PARAM_ANT_DIVERSITY_ON_PEER, PARAM_CHANNEL, PARAM_CHANNEL_PAGE, PARAM_CRC_ON_PEER, PARAM_CSMA, PARAM_DESENSITIZATION, PARAM_FRAME_RETRY, PARAM_ISM_FREQUENCY, PARAM_NO_OF_TEST_FRAMES, PARAM_PHY_FRAME_LENGTH, PARAM_RPC, PARAM_TRX_STATE, PARAM_TX_POWER_DBM, param_value_t::param_value_16bit, param_value_t::param_value_32bit, param_value_t::param_value_8bit, param_value_t::param_value_bool, param_value_t::param_value_float, trx_config_params_t::phy_frame_length, phyCurrentChannel, phyCurrentPage, phyTransmitPower, trx_config_params_t::retry_enabled, trx_config_params_t::rpc_enable, tal_get_curr_trx_config(), tal_get_trx_status(), tal_pib_get(), trx_state, TX_PWR, and usr_perf_get_confirm().
Referenced by handle_incoming_msg().
void perf_get_req | ( | trx_id_t | trx, |
uint8_t | param_type | ||
) |
Function to get the various configuration parameters for PER Test.
param_type | Parameter type to be read |
References fsk_tag::bt, CH_PG_SUN, oqpsk_tag::chip_rate, leg_oqpsk_tag::chip_rate, current_channel, leg_oqpsk_tag::data_rate, fsk_tag::fec_enabled, phy_tag::freq_band, FSK, phy_mode_tag::fsk, ofdm_tag::interl, INVALID_ARGUMENT, LEG_OQPSK, phy_mode_tag::leg_oqpsk, MAC_SUCCESS, ofdm_tag::mcs_val, fsk_tag::mod_idx, fsk_tag::mod_type, phy_tag::modulation, OFDM, phy_mode_tag::ofdm, fsk_tag::op_mode, ofdm_tag::option, OQPSK, phy_mode_tag::oqpsk, PARAM_ACK_REQUEST, PARAM_CHANNEL, PARAM_CHANNEL_PAGE, PARAM_CRC_ON_PEER, PARAM_CSMA, PARAM_DESENSITIZATION, PARAM_FRAME_RETRY, PARAM_ISM_FREQUENCY, PARAM_NO_OF_TEST_FRAMES, PARAM_PHY_FRAME_LENGTH, PARAM_RPC, PARAM_TRX_STATE, PARAM_TX_POWER_DBM, phy_tag::phy_mode, phyCurrentChannel, phyCurrentPage, phySetting, phyTransmitPower, oqpsk_tag::rate_mode, fsk_tag::sym_rate, tal_get_curr_trx_config(), tal_get_trx_status(), tal_pib_get(), TX_PWR, and usr_perf_get_confirm().
void perf_set_req | ( | uint8_t | set_param_type, |
param_value_t * | param_value | ||
) |
Function to set the various configuaration paramters for PER Test
param_type | Parameter type to be set |
param_value | Pointer to the parameter value to be set |
References config_ack_request(), config_csma(), config_frame_retry(), config_frequency(), config_rpc_mode(), config_rx_desensitization(), curr_trx_config_params, INVALID_ARGUMENT, last_tx_power_format_set, MAC_SUCCESS, NUL_VAL, trx_config_params_t::number_test_frames, PARAM_ACK_REQUEST, PARAM_ANT_DIVERSITY, PARAM_ANT_DIVERSITY_ON_PEER, PARAM_CHANNEL, PARAM_CHANNEL_PAGE, PARAM_CRC_ON_PEER, PARAM_CSMA, PARAM_DESENSITIZATION, PARAM_FRAME_RETRY, PARAM_ISM_FREQUENCY, PARAM_NO_OF_TEST_FRAMES, PARAM_PHY_FRAME_LENGTH, PARAM_RPC, PARAM_TRX_STATE, PARAM_TX_POWER_DBM, param_value_t::param_value_16bit, param_value_t::param_value_32bit, param_value_t::param_value_8bit, param_value_t::param_value_bool, param_value_t::param_value_float, set_channel(), set_channel_page(), set_phy_frame_length(), set_transceiver_state(), set_tx_power(), usr_perf_set_confirm(), and VALUE_OUT_OF_RANGE.
Referenced by handle_incoming_msg().
void perf_set_req | ( | trx_id_t | trx, |
uint8_t | set_param_type, | ||
param_value_t * | param_value | ||
) |
Function to set the various configuration parameters for PER Test
param_type | Parameter type to be set |
param_value | Pointer to the parameter value to be set |
References config_ack_request(), config_csma(), config_frame_retry(), config_rx_desensitization(), INVALID_ARGUMENT, last_tx_power_format_set, MAC_SUCCESS, MEMCPY_ENDIAN, NUL_VAL, trx_config_params_t::number_test_frames, PARAM_ACK_REQUEST, PARAM_CHANNEL, PARAM_CHANNEL_PAGE, PARAM_CRC_ON_PEER, PARAM_CSMA, PARAM_DESENSITIZATION, PARAM_FRAME_RETRY, PARAM_ISM_FREQUENCY, PARAM_NO_OF_TEST_FRAMES, PARAM_PHY_FRAME_LENGTH, PARAM_RPC, PARAM_TRX_STATE, PARAM_TX_POWER_DBM, param_value_t::param_value_16bit, param_value_t::param_value_32bit, param_value_t::param_value_8bit, param_value_t::param_value_bool, set_channel_app(), set_channel_page(), set_phy_frame_length(), set_transceiver_state(), set_tx_power(), usr_perf_set_confirm(), and VALUE_OUT_OF_RANGE.
void perf_set_sun_page | ( | trx_id_t | trx, |
uint8_t * | param_val | ||
) |
Function to set the various configuration parameters in SUN PAGE for PER Test
sun_page | Pointer to the configurable parameter value structure |
References fsk_tag::bt, CH_PG_SUN, phy_tag::ch_spacing, trx_config_params_t::channel, trx_config_params_t::channel_page, CHINA_470, oqpsk_tag::chip_rate, leg_oqpsk_tag::chip_rate, CHIP_RATE_2000, leg_oqpsk_tag::data_rate, fsk_tag::fec_enabled, phy_tag::freq_band, sun_phy_tag::freq_band, phy_tag::freq_f0, FSK, phy_mode_tag::fsk, FSK_OP_MOD_3, get_fsk_freq_f0(), get_leg_oqpsk_freq_f0(), get_ofdm_freq_f0(), get_oqpsk_freq_f0(), ofdm_tag::interl, INVALID_VALUE, JAPAN_920, LEG_OQPSK, phy_mode_tag::leg_oqpsk, sun_phy_mode_tag::leg_oqpsk, MAC_SUCCESS, MCS1, MCS2, MCS6, ofdm_tag::mcs_val, fsk_tag::mod_idx, fsk_tag::mod_type, phy_tag::modulation, sun_phy_tag::modulation, sun_phy_mode_tag::mr_fsk, sun_phy_mode_tag::mr_ofdm, sun_phy_mode_tag::mr_oqpsk, OFDM, phy_mode_tag::ofdm, OFDM_OPT_3, OFDM_OPT_4, fsk_tag::op_mode, ofdm_tag::option, OQPSK, phy_mode_tag::oqpsk, OQPSK_DATA_RATE_1000, OQPSK_DATA_RATE_250, OQPSK_RATE_MOD_3, OQPSK_RATE_MOD_4, sun_phy_tag::page_no, PARAM_CHANNEL_PAGE, peer_found, phy_tag::phy_mode, phyCurrentChannel, phyFSKFECEnabled, phyHighRateEnabled, phyOFDMMCS, phyOQPSKRateMode, phySetting, oqpsk_tag::rate_mode, send_sun_page_changed(), sun_page_param_val, sun_phy_tag::sun_phy_mode, fsk_tag::sym_rate, tal_pib, tal_pib_get(), tal_pib_set(), and usr_perf_set_confirm().
Referenced by handle_incoming_msg().
|
static |
This function is called periodically by the range test timer to initiate the transmission of range test packets to the receptor.
parameter | pass parameters to timer handler |
References configure_range_test_frame_sending(), trx_config_params_t::csma_enabled, CSMA_UNSLOTTED, curr_trx_config_params, FUNC_PTR, NO_CSMA_NO_IFS, node_info, NULL, RANGE_TX_BEACON_INTERVAL, trx_config_params_t::retry_enabled, SW_TIMEOUT_RELATIVE, sw_timer_start(), T_APP_TIMER_RANGE, tal_tx_frame(), node_ib_t::transmitting, and node_ib_t::tx_frame_info.
Referenced by start_range_test().
|
static |
This function is called periodically by the range test timer to initiate the transmission of range test packets to the receptor.
parameter | pass parameters to timer handler |
References configure_range_test_frame_sending(), CSMA_UNSLOTTED, FUNC_PTR, node_info, RANGE_TX_BEACON_INTERVAL, RF09, SW_TIMEOUT_RELATIVE, sw_timer_start(), T_APP_TIMER_RANGE_RF09, tal_tx_frame(), and node_ib_t::transmitting.
Referenced by start_range_test().
|
static |
This function is called periodically by the range test timer to initiate the transmission of range test packets to the receptor.
parameter | pass parameters to timer handler |
References configure_range_test_frame_sending(), CSMA_UNSLOTTED, FUNC_PTR, node_info, RANGE_TX_BEACON_INTERVAL, RF24, SW_TIMEOUT_RELATIVE, sw_timer_start(), T_APP_TIMER_RANGE_RF24, tal_tx_frame(), and node_ib_t::transmitting.
Referenced by start_range_test().
void read_trx_registers | ( | trx_id_t | trx, |
uint16_t | reg_addr | ||
) |
Stop sending a CW signal on current channel page.
Read transceiver register.
callback_parameter | Pointer to callback, not used here |
References INVALID_VALUE, MAC_SUCCESS, MAX_REG_ADDRESS, tal_trx_reg_read(), usr_register_read_confirm(), and VALUE_OUT_OF_RANGE.
|
static |
Recover all user settings before Start of CW transmission.
References phyTransmitPower, RX_DESENSITIZE_LEVEL, tal_pib_set(), and tal_set_rx_sensitivity_level().
|
static |
Save all user settings before Start of CW transmission.
uint8_t scale_ed_to_reg_val | ( | int8_t | ed_val | ) |
References MAX_ED_REG_VAL, MAX_ED_VAL, MIN_ED_REG_VAL, and MIN_ED_VAL.
int8_t scale_reg_value_to_ed | ( | uint8_t | reg_val | ) |
References MAX_ED_REG_VAL, MAX_ED_VAL, MIN_ED_REG_VAL, and MIN_ED_VAL.
|
static |
Function used to send disconnect peer node command.
References app_payload_t::cmd_id, DISCONNECT_NODE, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, node_ib_t::peer_short_addr, app_payload_t::seq_num, seq_num_initiator, and transmit_frame().
Referenced by disconnect_peer_node().
Function used to send disconnect peer node command.
References app_transmit_frame(), app_payload_t::cmd_id, DISCONNECT_NODE, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, node_ib_t::peer_short_addr, app_payload_t::seq_num, and seq_num_initiator.
Referenced by disconnect_peer_node().
|
static |
Function used to send identify peer node command.
References app_payload_t::cmd_id, FCF_SHORT_ADDR, IDENTIFY_NODE, MAC_SUCCESS, node_info, node_ib_t::peer_short_addr, app_payload_t::seq_num, seq_num_initiator, and transmit_frame().
Referenced by identify_peer_node().
Function used to send identify peer node command.
References app_transmit_frame(), app_payload_t::cmd_id, FCF_SHORT_ADDR, IDENTIFY_NODE, MAC_SUCCESS, node_info, node_ib_t::peer_short_addr, app_payload_t::seq_num, and seq_num_initiator.
Referenced by identify_peer_node().
|
static |
Function to send the parameters which has been updated to the receptor node.
param | Parameters being modified i.e. Channel,channel page,etc |
val | Value of the parameter being modified |
References app_payload_t::cmd_id, data, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, op_mode, set_param_cb_t::param_type, set_parm_req_t::param_type, set_param_cb_t::param_value, set_parm_req_t::param_value, app_payload_t::payload, node_ib_t::peer_short_addr, app_payload_t::seq_num, seq_num_initiator, SET_PARAM, SET_PARAMETER, and transmit_frame().
Referenced by config_frequency(), set_channel(), and set_channel_page().
|
static |
Function to send the parameters which has been updated to the receptor node.
param | Parameters being modified i.e. Channel,channel page,etc |
val | Value of the parameter being modified |
References app_transmit_frame(), app_payload_t::cmd_id, data, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, op_mode, set_param_cb_t::param_type, set_parm_req_t::param_type, set_param_cb_t::param_value, set_parm_req_t::param_value, app_payload_t::payload, node_ib_t::peer_short_addr, app_payload_t::seq_num, seq_num_initiator, SET_PARAM, and SET_PARAMETER.
Referenced by set_channel_app(), set_channel_page(), and set_tx_power().
|
static |
Function to configure and send the peer node info request.
References app_payload_t::cmd_id, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, PEER_INFO_REQ, node_ib_t::peer_short_addr, app_payload_t::seq_num, seq_num_initiator, and transmit_frame().
Referenced by per_mode_initiator_init().
Function to configure and send the peer node info request.
References app_transmit_frame(), app_payload_t::cmd_id, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, PEER_INFO_REQ, node_ib_t::peer_short_addr, app_payload_t::seq_num, and seq_num_initiator.
Referenced by per_mode_initiator_init().
|
static |
|
static |
Function to send the response packet for the marker sent from the receptor.
References APP_TIMER_TO_TX, result_req_t::cmd, app_payload_t::cmd_id, data, DUMMY_PAYLOAD, FCF_SHORT_ADDR, FUNC_PTR, LED_BLINK_RATE_IN_MICRO_SEC, MAC_SUCCESS, marker_seq_num, marker_tx_timer_handler_cb(), node_info, NULL, app_payload_t::payload, node_ib_t::peer_short_addr, RANGE_TEST_MARKER_RSP, app_payload_t::seq_num, seq_num_initiator, SW_TIMEOUT_RELATIVE, sw_timer_start(), and transmit_frame().
Referenced by per_mode_initiator_rx_cb().
Function to send the response packet for the marker sent from the receptor.
References APP_TIMER_TO_TX, app_transmit_frame(), result_req_t::cmd, app_payload_t::cmd_id, data, DUMMY_PAYLOAD, FCF_SHORT_ADDR, FUNC_PTR, LED_BLINK_RATE_IN_MICRO_SEC, MAC_SUCCESS, marker_seq_num, marker_tx_timer_handler_cb(), node_info, NULL, NUM_TRX, app_payload_t::payload, node_ib_t::peer_short_addr, RANGE_TEST_MARKER_RSP, app_payload_t::seq_num, seq_num_initiator, SW_TIMEOUT_RELATIVE, and sw_timer_start().
Referenced by per_mode_initiator_rx_cb().
|
static |
Function to send the range test start command to the receptor to start the mode in the receptor.
References result_req_t::cmd, app_payload_t::cmd_id, data, DUMMY_PAYLOAD, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, app_payload_t::payload, node_ib_t::peer_short_addr, RANGE_TEST_START_PKT, app_payload_t::seq_num, seq_num_initiator, and transmit_frame().
Referenced by initiate_range_test().
Function to send the range test start command to the receptor to start the mode in the receptor.
References app_transmit_frame(), result_req_t::cmd, app_payload_t::cmd_id, data, DUMMY_PAYLOAD, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, app_payload_t::payload, node_ib_t::peer_short_addr, RANGE_TEST_START_PKT, app_payload_t::seq_num, and seq_num_initiator.
Referenced by initiate_range_test().
|
static |
Function to send the range test stop command to the receptor to stop the mode in the receptor.
References result_req_t::cmd, app_payload_t::cmd_id, data, DUMMY_PAYLOAD, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, app_payload_t::payload, node_ib_t::peer_short_addr, RANGE_TEST_STOP_PKT, app_payload_t::seq_num, seq_num_initiator, and transmit_frame().
Referenced by stop_range_test().
Function to send the range test stop command to the receptor to stop the mode in the receptor.
References app_transmit_frame(), result_req_t::cmd, app_payload_t::cmd_id, data, DUMMY_PAYLOAD, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, app_payload_t::payload, node_ib_t::peer_short_addr, RANGE_TEST_STOP_PKT, app_payload_t::seq_num, and seq_num_initiator.
Referenced by stop_range_test().
void send_remote_cmd | ( | uint8_t * | serial_buf, |
uint8_t | len, | ||
bool | ack_req | ||
) |
Function to send the command to Remote node to perform remote test.
serial_buf | Pointer to the serial buffer |
len | Length of the message |
ack_req | specifies ack requested for frame if set to 1 |
References app_payload_t::cmd_id, CW_TX_TIMER, FCF_SHORT_ADDR, FUNC_PTR, MAC_SUCCESS, node_info, op_mode, app_payload_t::payload, node_ib_t::peer_short_addr, REMOTE_MSG_BUF_SIZE, remote_test_req_t::remote_serial_data, REMOTE_TEST_CMD, REMOTE_TEST_MODE, general_pkt_t::remote_test_req_data, app_payload_t::seq_num, seq_num_initiator, SW_TIMEOUT_RELATIVE, sw_timer_start(), TIMEOUT_FOR_RESPONSE_IN_MICRO_SEC, transmit_frame(), TX_OP_MODE, and wait_for_reply_timer_handler_cb().
Referenced by handle_incoming_msg().
bool send_remote_reply_cmd | ( | uint8_t * | serial_buf, |
uint8_t | len | ||
) |
This function is used to send a remote test repsonse command back to the initiator.
This function is used to send a remote test repsonse command back to the initiator.
References app_payload_t::cmd_id, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, app_payload_t::payload, node_ib_t::peer_short_addr, REMOTE_MSG_BUF_SIZE, remote_test_req_t::remote_serial_data, REMOTE_TEST_REPLY_CMD, general_pkt_t::remote_test_req_data, app_payload_t::seq_num, seq_num_receptor, and transmit_frame().
Referenced by serial_data_handler().
|
static |
Function used to request PER test result.
References result_req_t::cmd, app_payload_t::cmd_id, data, DUMMY_PAYLOAD, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, app_payload_t::payload, node_ib_t::peer_short_addr, RESULT_REQ, app_payload_t::seq_num, seq_num_initiator, and transmit_frame().
Referenced by per_mode_initiator_task().
Function used to request PER test result.
References app_transmit_frame(), result_req_t::cmd, app_payload_t::cmd_id, data, DUMMY_PAYLOAD, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, app_payload_t::payload, node_ib_t::peer_short_addr, RESULT_REQ, app_payload_t::seq_num, and seq_num_initiator.
Referenced by per_mode_initiator_task().
|
static |
Function used to send set default config peer command.
References app_payload_t::cmd_id, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, node_ib_t::peer_short_addr, app_payload_t::seq_num, seq_num_initiator, SET_DEFAULT_REQ, and transmit_frame().
Referenced by set_default_configuration().
Function used to send set default config peer command.
References app_transmit_frame(), app_payload_t::cmd_id, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, node_ib_t::peer_short_addr, app_payload_t::seq_num, seq_num_initiator, and SET_DEFAULT_REQ.
Referenced by set_default_configuration().
|
static |
References app_transmit_frame(), app_payload_t::cmd_id, data, FCF_SHORT_ADDR, MAC_SUCCESS, node_info, op_mode, app_payload_t::payload, node_ib_t::peer_short_addr, app_payload_t::seq_num, seq_num_initiator, SET_PARAMETER, and SET_SUN_PAGE.
Referenced by perf_set_sun_page().
|
static |
To set the Channel.
channel | channel number to be set |
References BIT_COUNT, CC_BAND_0, CC_NUMBER_0, CHANNEL, trx_config_params_t::channel, CONV_phyTransmitPower_TO_DBM, curr_trx_config_params, MAC_SUCCESS, PARAM_CHANNEL, param_value_t::param_value_16bit, peer_found, phyChannelsSupported, phyCurrentChannel, phyTransmitPower, pib_value_t::pib_value_8bit, send_parameters_changed(), tal_pib_get(), tal_pib_set(), tal_set_frequency_regs(), trx_config_params_t::tx_power_dbm, usr_perf_set_confirm(), and VALUE_OUT_OF_RANGE.
Referenced by perf_set_req().
|
static |
To set the Channel.
channel | channel number to be set |
References BIT_COUNT, CHANNEL, trx_config_params_t::channel, get_sun_max_ch_no(), LEG_OQPSK, MAC_SUCCESS, PARAM_CHANNEL, peer_found, phyChannelsSupported, phyCurrentChannel, phyTransmitPower, send_parameters_changed(), tal_pib, tal_pib_get(), tal_pib_set(), trx_config_params_t::tx_power_dbm, usr_perf_set_confirm(), and VALUE_OUT_OF_RANGE.
Referenced by perf_set_req().
|
static |
To set the Channel Page.
channel_page | Channel page to be set |
References trx_config_params_t::channel, CHANNEL_PAGE, trx_config_params_t::channel_page, CONV_phyTransmitPower_TO_DBM, curr_trx_config_params, MAC_SUCCESS, PARAM_CHANNEL_PAGE, param_value_t::param_value_8bit, peer_found, phyCurrentChannel, phyCurrentPage, phyTransmitPower, pib_value_t::pib_value_8bit, send_parameters_changed(), tal_pib_get(), tal_pib_set(), trx_config_params_t::tx_power_dbm, usr_perf_set_confirm(), and VALUE_OUT_OF_RANGE.
Referenced by perf_set_req().
|
static |
To set the Channel Page.
channel_page | Channel page to be set |
References aMaxPHYPacketSize, CH_PG_SUN, CHANNEL_PAGE, trx_config_params_t::channel_page, configure_frame_sending(), MAC_SUCCESS, PARAM_CHANNEL_PAGE, peer_found, trx_config_params_t::phy_frame_length, phyCurrentPage, send_parameters_changed(), tal_pib_set(), usr_perf_set_confirm(), and VALUE_OUT_OF_RANGE.
Referenced by perf_set_req().
void set_default_configuration | ( | void | ) |
To set the default values of all configurable parameters on source and peer node.
Function to set the default values of.
References config_per_test_parameters(), default_trx_config_params, MAC_SUCCESS, op_mode, peer_found, send_set_default_config_command(), SET_DEFAULT_CONFIG_PEER, TRANSMISSION_FAILURE, TX_OP_MODE, and usr_set_default_config_confirm().
Referenced by handle_incoming_msg().
void set_default_configuration | ( | trx_id_t | trx | ) |
To set the default values of all configurable parameters on source and peer node.
Function to set the default values of.
References config_per_test_parameters(), MAC_SUCCESS, op_mode, peer_found, send_set_default_config_command(), SET_DEFAULT_CONFIG_PEER, TRANSMISSION_FAILURE, TX_OP_MODE, and usr_set_default_config_confirm().
|
static |
Set the parameters like channel,tx power etc on transmitter node.
status | Transmission Status of the node. |
References CC_BAND_0, CC_BAND_8, CC_BAND_9, CC_NUMBER_0, CHANNEL, trx_config_params_t::channel, CHANNEL_PAGE, trx_config_params_t::channel_page, CONV_phyTransmitPower_TO_DBM, curr_trx_config_params, FREQ_BAND_08, FREQ_BAND_09, INVALID_VALUE, trx_config_params_t::ism_frequency, MAC_SUCCESS, PARAM_CHANNEL, PARAM_CHANNEL_PAGE, PARAM_ISM_FREQUENCY, set_param_cb_t::param_type, set_param_cb_t::param_value, param_value_t::param_value_16bit, param_value_t::param_value_8bit, param_value_t::param_value_float, phyCurrentChannel, phyCurrentPage, phyTransmitPower, pib_value_t::pib_value_8bit, tal_calculate_frequency(), tal_pib_get(), tal_pib_set(), tal_set_frequency_regs(), trx_config_params_t::tx_power_dbm, UNABLE_TO_CONTACT_PEER, and usr_perf_set_confirm().
Referenced by per_mode_initiator_tx_done_cb().
Set the parameters like channel,tx power etc on transmitter node.
status | Transmission Status of the node. |
References aMaxPHYPacketSize, CH_PG_SUN, CHANNEL, trx_config_params_t::channel, CHANNEL_PAGE, trx_config_params_t::channel_page, configure_frame_sending(), MAC_SUCCESS, PARAM_CHANNEL, PARAM_CHANNEL_PAGE, PARAM_TX_POWER_DBM, set_param_cb_t::param_value, trx_config_params_t::phy_frame_length, phyCurrentChannel, phyCurrentPage, phyTransmitPower, tal_convert_reg_value_to_dBm(), tal_get_curr_trx_config(), tal_pib_get(), tal_pib_set(), TX_POWER_DBM, trx_config_params_t::tx_power_dbm, TX_PWR, UNABLE_TO_CONTACT_PEER, and usr_perf_set_confirm().
Referenced by per_mode_initiator_tx_done_cb().
|
static |
To set PER Test frame length.
frame_len | Length of the frame to be set |
References aMaxPHYPacketSize, configure_frame_sending(), curr_trx_config_params, FRAME_OVERHEAD, MAC_SUCCESS, PARAM_PHY_FRAME_LENGTH, param_value_t::param_value_16bit, trx_config_params_t::phy_frame_length, and usr_perf_set_confirm().
Referenced by perf_set_req().
|
static |
To set PER Test frame length.
frame_len | Length of the frame to be set |
References aMaxPHYPacketSize, aMaxPHYPacketSize_4g, configure_frame_sending(), FRAME_OVERHEAD, LEG_OQPSK, MAC_SUCCESS, PARAM_PHY_FRAME_LENGTH, trx_config_params_t::phy_frame_length, tal_pib, and usr_perf_set_confirm().
Referenced by perf_set_req().
|
static |
Set Transceiver state as per the state given.
trx_state | Transceiver state to be set |
References ANT_AUTO_SEL, ANT_DIVERSITY_DISABLE, ANT_DIVERSITY_ENABLE, ANTENNA_DEFAULT, CMD_PLL_ON, CMD_RX_AACK_ON, CMD_TRX_OFF, curr_trx_config_params, DEEP_SLEEP_MODE, MAC_SUCCESS, PARAM_TRX_STATE, param_value_t::param_value_8bit, PLL_ON, recover_all_settings(), RX_AACK_ON, save_all_settings(), set_trx_state(), SLEEP_MODE_1, tal_ant_div_config(), tal_get_trx_status(), tal_reset(), toggle_trx_sleep(), TRANSCEIVER_IN_SLEEP, TRX_DEEP_SLEEP, TRX_OFF, TRX_RESET, TRX_SLEEP, trx_sleep_status, trx_state, trx_config_params_t::trx_state, and usr_perf_set_confirm().
Referenced by perf_set_req().
|
static |
Set Transceiver state as per the state given.
trx_state | Transceiver state to be set |
References MAC_SUCCESS, PARAM_TRX_STATE, PHY_RX_ON, PHY_TRX_OFF, PLL_ON, recover_all_settings(), RX_ON, save_all_settings(), switch_to_txprep(), tal_get_trx_status(), tal_reset(), tal_rx_enable(), toggle_trx_sleep(), TRANSCEIVER_IN_SLEEP, TRX_OFF, TRX_RESET, TRX_SLEEP, trx_sleep_status, trx_state, trx_config_params_t::trx_state, and usr_perf_set_confirm().
Referenced by perf_set_req().
|
static |
To set the Tx power of the Transceiver.
tx_power_format | Format in which input is given whether in dBm or reg |
power_value | Tx power value in the given format |
References trx_config_params_t::channel, CONV_DBM_TO_phyTransmitPower, curr_trx_config_params, MAC_SUCCESS, MIN_TX_PWR_REG_VAL, PARAM_TX_POWER_DBM, param_value_t::param_value_8bit, phyTransmitPower, pib_value_t::pib_value_8bit, REGISTER_VALUE, tal_convert_reg_value_to_dBm(), tal_get_curr_trx_config(), tal_pib_set(), tal_set_tx_pwr(), trx_config_params_t::tx_power_dbm, TX_POWER_FORMAT_DBM, TX_POWER_FORMAT_REG, TX_PWR, usr_perf_set_confirm(), validate_tx_power(), and VALUE_OUT_OF_RANGE.
Referenced by perf_set_req().
|
static |
To set the Tx power of the Transceiver.
tx_power_format | Format in which input is given whether in dBm or reg |
power_value | Tx power value in the given format |
References MAC_SUCCESS, MAX_TX_PWR_REG_VAL, PARAM_TX_POWER_DBM, peer_found, phyTransmitPower, send_parameters_changed(), tal_convert_reg_value_to_dBm(), tal_get_curr_trx_config(), tal_pib_set(), TX_POWER_DBM, trx_config_params_t::tx_power_dbm, TX_POWER_FORMAT_DBM, TX_POWER_FORMAT_REG, TX_PWR, usr_perf_set_confirm(), and VALUE_OUT_OF_RANGE.
Referenced by perf_set_req().
void start_ed_scan | ( | uint8_t | ed_scan_duration, |
uint32_t | channel_sel_mask | ||
) |
To start the ED scan.
Function to start the ED scan.
ed_scan_duration | Scan duration parameter which is used to calculate the scan time on each channel |
channel_sel_mask | Selected channel mask for which the Energy should be detected |
References aBaseSuperframeDuration, channel_before_scan, MAC_SUCCESS, MAX_CHANNEL, MAX_SCAN_DURATION, MIN_CHANNEL, NUL_VAL, num_channels, phy_tx_power, phyCurrentChannel, phyTransmitPower, pib_value_t::pib_value_8bit, reverse_float(), scan_channel_mask, scan_duration, scanning, TAL_CONVERT_SYMBOLS_TO_US, tal_pib, tal_pib_get(), tal_pib_set(), usr_ed_scan_start_confirm(), and VALUE_OUT_OF_RANGE.
Referenced by handle_incoming_msg().
void start_ed_scan | ( | trx_id_t | trx, |
uint8_t | ed_scan_duration, | ||
uint32_t | channel_sel_mask | ||
) |
To start the ED scan.
Function to start the ED scan.
ed_scan_duration | Scan duration parameter which is used to calculate the scan time on each channel |
References aBaseSuperframeDuration, channel_before_scan, MAC_SUCCESS, MAX_SCAN_DURATION, NUL_VAL, num_channels, phyChannelsSupported, phyCurrentChannel, reverse_float(), scan_channel_mask, scan_duration, scanning, TAL_CONVERT_SYMBOLS_TO_US, tal_pib_get(), tal_pib_set(), usr_ed_scan_start_confirm(), and VALUE_OUT_OF_RANGE.
|
static |
|
static |
References FUNC_PTR, MAC_SUCCESS, op_mode, range_test_in_progress, range_test_timer_handler_rf09_cb(), range_test_timer_handler_rf24_cb(), RANGE_TEST_TX, RANGE_TX_BEACON_START_INTERVAL, RF24, SW_TIMEOUT_RELATIVE, sw_timer_start(), T_APP_TIMER_RANGE_RF09, T_APP_TIMER_RANGE_RF24, and usr_range_test_start_confirm().
Referenced by per_mode_initiator_tx_done_cb().
|
static |
References trx_config_params_t::ack_request, CCPU_ENDIAN_TO_LE32, configure_frame_sending(), trx_config_params_t::csma_enabled, curr_trx_config_params, frame_access_failure, frame_failure, frame_no_ack, frames_to_transmit, INVALID_CMD, MAC_SUCCESS, MICRO_SEC_MULTIPLIER, no_of_roll_overs, trx_config_params_t::number_test_frames, op_mode, restart_time, start_time, sw_timer_get_time(), TX_OP_MODE, and usr_per_test_start_confirm().
Referenced by per_mode_initiator_tx_done_cb().
|
static |
References CCPU_ENDIAN_TO_LE32, configure_frame_sending(), frame_access_failure, frame_failure, frame_no_ack, frames_to_transmit, INVALID_CMD, MAC_SUCCESS, MICRO_SEC_MULTIPLIER, no_of_roll_overs, trx_config_params_t::number_test_frames, op_mode, restart_time, start_time, sw_timer_get_time(), TX_OP_MODE, and usr_per_test_start_confirm().
Referenced by per_mode_initiator_tx_done_cb().
|
static |
void stop_range_test | ( | void | ) |
Function to Stop the range Test in PER Mode.
References INVALID_CMD, op_mode, range_test_in_progress, RANGE_TEST_STOP, RANGE_TEST_TX, send_range_test_stop_cmd(), and usr_range_test_start_confirm().
Referenced by handle_incoming_msg().
void stop_range_test | ( | trx_id_t | trx | ) |
Function to Stop the range Test in PER Mode.
References INVALID_CMD, op_mode, range_test_in_progress, RANGE_TEST_STOP, RANGE_TEST_TX, send_range_test_stop_cmd(), and usr_range_test_start_confirm().
|
static |
To toggle between sleep /deep state.
sleep_mode | Type of sleep mode as input in case of RF233 |
References DEEP_SLEEP_MODE, MAC_SUCCESS, SLEEP_MODE_1, tal_trx_sleep(), tal_trx_wakeup(), and trx_sleep_status.
Referenced by set_transceiver_state().
|
static |
To toggle between sleep /deep state.
sleep_mode | Type of sleep mode as input in case of RF233 |
References MAC_SUCCESS, RF09, RF24, tal_trx_sleep(), tal_trx_wakeup(), and trx_sleep_status.
Referenced by set_transceiver_state().
|
static |
validating the tx power input based on the current channel and page configuration
dbm_value | Tx power in dBm as input to be validated |
References MAX_TX_PWR, MAX_TX_PWR_BPSK_20, MAX_TX_PWR_CHINA, MAX_TX_PWR_CHINA_1000, MAX_TX_PWR_OQPSK_100, phyCurrentPage, tal_pib, and tal_pib_get().
Referenced by set_tx_power().
|
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(), convert_ota_serial_frame_rx(), default_trx_config_params, NO_PEER_FOUND, NUL_VAL, NULL, op_mode, PARAM_ANT_DIVERSITY_ON_PEER, PARAM_CRC_ON_PEER, param_value_t::param_value_bool, PEER_INFO_RSP_WAIT, remote_serial_tx_failure, REMOTE_TEST_MODE, 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(), per_mode_initiator_task(), and send_remote_cmd().
void write_trx_registers | ( | trx_id_t | trx, |
uint16_t | reg_addr, | ||
uint8_t | reg_val | ||
) |
write Transceiver registers
reg_addr | The address of the register to be read |
reg_val | The value of the register to be written |
References MAC_SUCCESS, MAX_REG_ADDRESS, tal_trx_reg_write(), usr_register_write_confirm(), and VALUE_OUT_OF_RANGE.
|
static |
Referenced by per_mode_initiator_ed_end_cb(), and start_ed_scan().
|
static |
Referenced by per_mode_initiator_ed_end_cb(), and start_ed_scan().
trx_config_params_t curr_trx_config_params[NUM_TRX] |
trx_config_params_t default_trx_config_params[NUM_TRX] |
|
static |
Referenced by calculate_time_duration(), and per_mode_initiator_tx_done_cb().
|
static |
Referenced by calculate_time_duration(), and per_mode_initiator_tx_done_cb().
|
static |
Referenced by per_mode_initiator_rx_cb(), per_mode_initiator_tx_done_cb(), and start_test().
|
static |
Referenced by per_mode_initiator_rx_cb(), per_mode_initiator_tx_done_cb(), and start_test().
|
static |
Referenced by per_mode_initiator_rx_cb(), per_mode_initiator_tx_done_cb(), and start_test().
|
static |
Referenced by per_mode_initiator_rx_cb(), per_mode_initiator_tx_done_cb(), and start_test().
|
static |
Referenced by per_mode_initiator_rx_cb(), per_mode_initiator_tx_done_cb(), and start_test().
|
static |
Referenced by per_mode_initiator_rx_cb(), per_mode_initiator_tx_done_cb(), and start_test().
|
static |
Referenced by check_error_conditions(), per_mode_initiator_task(), per_mode_initiator_tx_done_cb(), and start_test().
|
static |
Referenced by check_error_conditions(), per_mode_initiator_task(), per_mode_initiator_tx_done_cb(), and start_test().
|
static |
This is variable is to keep track of the specific features supported.
Referenced by get_board_details(), and usr_identify_board_confirm().
|
static |
This is variable is to keep track of the specific features supported.
Referenced by get_board_details().
|
static |
|
static |
Referenced by calculate_time_duration(), per_mode_initiator_tx_done_cb(), and start_test().
|
static |
Referenced by calculate_time_duration(), per_mode_initiator_tx_done_cb(), and start_test().
|
static |
Referenced by per_mode_initiator_ed_end_cb(), and start_ed_scan().
|
static |
Referenced by per_mode_initiator_ed_end_cb(), and start_ed_scan().
uint8_t op_mode = TX_OP_MODE |
Referenced by check_error_conditions(), disconnect_peer_node(), identify_peer_node(), initiate_per_test(), initiate_range_test(), per_mode_initiator_init(), per_mode_initiator_rx_cb(), per_mode_initiator_task(), per_mode_initiator_tx_done_cb(), pktstream_test(), send_parameters_changed(), send_remote_cmd(), send_sun_page_changed(), set_default_configuration(), start_range_test(), start_test(), stop_range_test(), and wait_for_reply_timer_handler_cb().
|
static |
uint8_t set_param_cb_t::param_type |
Referenced by send_parameters_changed(), and set_parameter_on_transmitter_node().
uint16_t set_param_cb_t::param_value |
uint8_t set_param_cb_t::param_value |
Referenced by send_parameters_changed(), and set_parameter_on_transmitter_node().
|
static |
Referenced by per_mode_initiator_ed_end_cb(), and start_ed_scan().
|
static |
Referenced by configure_range_test_frame_sending(), and per_mode_initiator_tx_done_cb().
|
static |
Referenced by configure_range_test_frame_sending(), and per_mode_initiator_tx_done_cb().
Referenced by check_error_conditions(), per_mode_initiator_tx_done_cb(), start_range_test(), and stop_range_test().
Referenced by check_error_conditions(), per_mode_initiator_tx_done_cb(), start_range_test(), and stop_range_test().
|
static |
Referenced by per_mode_initiator_tx_done_cb(), and start_test().
|
static |
Referenced by per_mode_initiator_tx_done_cb(), and start_test().
|
static |
Referenced by per_mode_initiator_ed_end_cb(), and start_ed_scan().
|
static |
Referenced by per_mode_initiator_ed_end_cb(), and start_ed_scan().
|
static |
Referenced by per_mode_initiator_ed_end_cb(), and start_ed_scan().
|
static |
Referenced by per_mode_initiator_ed_end_cb(), and start_ed_scan().
Referenced by check_error_conditions(), per_mode_initiator_ed_end_cb(), and start_ed_scan().
Referenced by check_error_conditions(), per_mode_initiator_ed_end_cb(), and start_ed_scan().
|
static |
Referenced by configure_range_test_frame_sending(), per_mode_initiator_init(), send_disconnect_command(), send_identify_command(), send_parameters_changed(), send_peer_info_req(), send_per_test_start_cmd(), send_range_test_marker_rsp(), send_range_test_start_cmd(), send_range_test_stop_cmd(), send_remote_cmd(), send_result_req(), and send_set_default_config_command().
|
static |
Referenced by configure_range_test_frame_sending(), per_mode_initiator_init(), send_disconnect_command(), send_identify_command(), send_parameters_changed(), send_peer_info_req(), send_per_test_start_cmd(), send_range_test_marker_rsp(), send_range_test_start_cmd(), send_range_test_stop_cmd(), send_result_req(), send_set_default_config_command(), and send_sun_page_changed().
|
static |
|
static |
|
static |
Referenced by calculate_time_duration(), start_test(), switch_pll_on(), tal_trx_wakeup(), trx_reset(), wait_for_freq_settling(), and wait_for_txprep().
|
static |
Referenced by calculate_time_duration(), and start_test().
|
static |
Referenced by per_mode_initiator_tx_done_cb(), and perf_set_sun_page().
Referenced by check_error_conditions(), set_transceiver_state(), and toggle_trx_sleep().
Referenced by check_error_conditions(), set_transceiver_state(), and toggle_trx_sleep().