Initializes the Performance Analyzer Application.
Data Structures | |
struct | node_ib_t |
Structure to holds the information base for the node. More... | |
Macros | |
#define | CRC_SETTING_ON_REMOTE_NODE |
#define | DEFAULT_ADDR (0xFFFF) |
#define | DEFAULT_CHANNEL (11 + DEFAULT_CHANNEL_OFFSET) |
#define | DEFAULT_PAN_ID (0xCAFE) |
#define | DST_PAN_ID (DEFAULT_PAN_ID) |
#define | DST_SHORT_ADDR (0xFFFF) |
#define | DUMMY_PAYLOAD (0xAA) |
#define | FIRMWARE_VERSION 3.2 |
#define | FRAME_OVERHEAD (11) |
#define | FRAME_OVERHEAD_DST_IEEE_ADDR (FRAME_OVERHEAD + 6) |
#define | FRAME_OVERHEAD_SRC_IEEE_ADDR (FRAME_OVERHEAD + 6) |
#define | IC_TYPE 0X00 |
#define | OFFSET_FOR_SRC_IEEE_ADDR (7) |
#define | RX_LED LED0_GPIO |
#define | SRC_PAN_ID (DEFAULT_PAN_ID) |
#define | STATUS_LED LED0_GPIO |
#define | TX_LED LED0_GPIO |
Functions | |
void | app_alert (void) |
void | config_node_ib (void) |
Function to init the information base for device. More... | |
static void | configure_pibs (void) |
Configure the TAL PIB's relevant to the Performance analyzer application. More... | |
void | init_state_init (void *arg) |
Initialization task for INIT STATE. More... | |
void | performance_analyzer_init (void) |
Init function of the Performance Analyzer application. More... | |
void | recover_all_settings (void) |
Recover all user settings before Start of CW transmission. More... | |
void | save_all_settings (void) |
Save all user settings before Start of CW transmission. More... | |
void | set_main_state (main_state_t state, void *arg) |
Function to set the main state of state machine. More... | |
retval_t | transmit_frame (uint8_t dst_addr_mode, uint8_t *dst_addr, uint8_t src_addr_mode, uint8_t msdu_handle, uint8_t *payload, uint16_t payload_length, uint8_t ack_req) |
Function to transmit frames as per 802.15.4 std. More... | |
void | wait_for_event_init (void *arg) |
Application task when the node is in the WAIT_FOR_EVENT state. More... | |
void | wait_for_event_rx_cb (frame_info_t *frame) |
Callback that is called if data has been received by trx in WAIT_FOR_EVENT state. More... | |
void | wait_for_event_task (void) |
Application task handling user events like key press or character on UART. More... | |
Variables | |
uint8_t | APP_TIMER_TO_RX_LED_OFF |
uint8_t | APP_TIMER_TO_TX |
uint8_t | APP_TIMER_TO_TX_LED_OFF |
bool | node_ib_t::configure_mode |
uint8_t | CW_TX_TIMER |
main_state_t | node_ib_t::main_state |
uint8_t | node_ib_t::msg_seq_num |
volatile node_ib_t | node_info |
bool | node_ib_t::peer_found |
uint16_t | node_ib_t::peer_short_addr |
uint8_t | node_ib_t::sub_state |
uint8_t | T_APP_TIMER |
uint8_t | T_APP_TIMER_RANGE |
uint8_t | node_ib_t::transmitting |
frame_info_t * | node_ib_t::tx_frame_info |
#define CRC_SETTING_ON_REMOTE_NODE |
#define DEFAULT_ADDR (0xFFFF) |
Referenced by configure_pibs().
#define DEFAULT_CHANNEL (11 + DEFAULT_CHANNEL_OFFSET) |
Referenced by config_per_test_parameters(), and configure_pibs().
#define DEFAULT_PAN_ID (0xCAFE) |
#define DST_PAN_ID (DEFAULT_PAN_ID) |
#define DST_SHORT_ADDR (0xFFFF) |
#define DUMMY_PAYLOAD (0xAA) |
#define FIRMWARE_VERSION 3.2 |
Referenced by get_board_details(), and get_node_info().
#define FRAME_OVERHEAD (11) |
#define FRAME_OVERHEAD_DST_IEEE_ADDR (FRAME_OVERHEAD + 6) |
Referenced by peer_req_send_rx_cb().
#define FRAME_OVERHEAD_SRC_IEEE_ADDR (FRAME_OVERHEAD + 6) |
Referenced by wait_for_event_rx_cb().
#define IC_TYPE 0X00 |
Referenced by get_board_details(), and get_node_info().
#define OFFSET_FOR_SRC_IEEE_ADDR (7) |
Referenced by wait_for_event_rx_cb().
#define RX_LED LED0_GPIO |
Referenced by app_led_event(), app_switch_off_rx_led_cb(), and marker_rsp_timer_handler_cb().
#define SRC_PAN_ID (DEFAULT_PAN_ID) |
#define STATUS_LED LED0_GPIO |
Referenced by app_led_event().
#define TX_LED LED0_GPIO |
Referenced by app_led_event(), app_switch_off_tx_led_cb(), and marker_tx_timer_handler_cb().
enum main_state_t |
void app_alert | ( | void | ) |
References delay_us, LED0, LED0_GPIO, and LED_Toggle.
Referenced by app_timers_init(), and init_state_init().
void config_node_ib | ( | void | ) |
Function to init the information base for device.
References node_ib_t::configure_mode, node_ib_t::msg_seq_num, node_ib_t::peer_found, node_ib_t::peer_short_addr, storage_buffer, node_ib_t::transmitting, and node_ib_t::tx_frame_info.
Referenced by init_state_init().
|
static |
Configure the TAL PIB's relevant to the Performance analyzer application.
References CCPU_ENDIAN_TO_LE16, DEFAULT_ADDR, DEFAULT_CHANNEL, DEFAULT_PAGE, macIeeeAddress, macPANId, macShortAddress, phyCurrentChannel, phyCurrentPage, pib_value_t::pib_value_16bit, pib_value_t::pib_value_8bit, SRC_PAN_ID, tal_pib, and tal_pib_set().
Referenced by wait_for_event_init().
void init_state_init | ( | void * | arg | ) |
Initialization task for INIT STATE.
All hardware, PAL, TAL and stack level initialization must be done in this function
arg | arguments for INIT state |
References ANT_CTRL_1, ANT_DIVERSITY_DISABLE, app_alert(), app_timers_init(), config_node_ib(), configuration_mode_selection(), init_sio(), MAC_SUCCESS, sw_timer_init(), tal_ant_div_config(), and tal_init().
void performance_analyzer_init | ( | void | ) |
Init function of the Performance Analyzer application.
References INIT, set_main_state(), sio2host_init(), and WAIT_FOR_EVENT.
Referenced by main().
void recover_all_settings | ( | void | ) |
Recover all user settings before Start of CW transmission.
References ANT_DIV_DISABLE, ANT_DIVERSITY_DISABLE, CC_BAND_0, cc_band_ct, cc_number_ct, CONV_DBM_TO_phyTransmitPower, DISABLE_ALL_RPC_MODES, ENABLE_ALL_RPC_MODES, last_tx_power_format_set, phyTransmitPower, pib_value_t::pib_value_8bit, REGISTER_VALUE, trx_config_params_t::rpc_enable, RX_DESENSITIZE_LEVEL, tal_ant_div_config(), tal_pib_set(), tal_rpc_mode_config(), tal_set_frequency_regs(), tal_set_rx_sensitivity_level(), tal_set_tx_pwr(), and trx_config_params_t::tx_power_dbm.
Referenced by set_transceiver_state(), stop_cw_transmission(), and stop_pulse_cb().
void save_all_settings | ( | void | ) |
Save all user settings before Start of CW transmission.
References ANT_DIV_DISABLE, cc_band_ct, cc_number_ct, SR_CC_BAND, SR_CC_NUMBER, tal_get_curr_trx_config(), and trx_bit_read().
Referenced by pulse_cw_transmission(), set_transceiver_state(), and start_cw_transmission().
void set_main_state | ( | main_state_t | state, |
void * | arg | ||
) |
Function to set the main state of state machine.
state | main state to be set |
arg | argument passed in the state |
References state_function_t::func_main_state_exit, state_function_t::func_main_state_init, state_function_t::func_sub_state_set, node_ib_t::main_state, and node_ib_t::transmitting.
Referenced by app_peer_conf_tmr_handler_cb(), app_reset(), handle_incoming_msg(), peer_req_send_task(), peer_rsp_rcvd_init(), peer_rsp_rcvd_tx_cb(), peer_rsp_send_init(), peer_rsp_send_tx_done_cb(), performance_analyzer_init(), range_test_tx_off_task(), range_test_tx_on_task(), wait_for_conf_rx_cb(), wait_for_event_rx_cb(), and wait_for_event_task().
retval_t transmit_frame | ( | uint8_t | dst_addr_mode, |
uint8_t * | dst_addr, | ||
uint8_t | src_addr_mode, | ||
uint8_t | msdu_handle, | ||
uint8_t * | payload, | ||
uint16_t | payload_length, | ||
uint8_t | ack_req | ||
) |
Function to transmit frames as per 802.15.4 std.
dst_addr_mode | destination address mode - can be 16 or 64 bit |
dst_addr | destination address |
src_addr_mode | source address mode - can be 16 or 64 bit |
msdu_handle | msdu handle for the upper layers to track packets |
payload | data payload pointer |
payload_length | data length |
ack_req | specifies ack requested for frame if set to 1 |
References CCPU_ENDIAN_TO_LE16, convert_16_bit_to_byte_array(), convert_64_bit_to_byte_array(), CSMA_UNSLOTTED, DST_PAN_ID, EXT_ADDR_LEN, FAILURE, FCF_2_SOURCE_ADDR_OFFSET, FCF_ACK_REQUEST, FCF_FRAMETYPE_DATA, FCF_LEN, FCF_LONG_ADDR, FCF_PAN_ID_COMPRESSION, FCF_SET_DEST_ADDR_MODE, FCF_SET_SOURCE_ADDR_MODE, FCF_SHORT_ADDR, FCS_LEN, FRAME_OVERHEAD, LARGE_BUFFER_SIZE, frame_info_tag::mpdu, frame_info_tag::msduHandle, node_ib_t::msg_seq_num, PAN_ID_LEN, PL_POS_DST_ADDR_START, SHORT_ADDR_LEN, SRC_PAN_ID, tal_pib, tal_tx_frame(), node_ib_t::transmitting, and node_ib_t::tx_frame_info.
Referenced by range_test_frame_tx(), send_crc_set_req(), send_crc_status_req(), send_crc_status_rsp(), send_disconnect_command(), send_identify_command(), send_parameters_changed(), send_peer_conf(), send_peer_info_req(), send_peer_info_rsp(), send_peer_req(), send_peer_rsp(), send_per_test_start_cmd(), send_range_test_marker_cmd(), send_range_test_marker_rsp(), send_range_test_rsp(), send_range_test_start_cmd(), send_range_test_stop_cmd(), send_remote_cmd(), send_remote_reply_cmd(), send_result_req(), send_result_rsp(), and send_set_default_config_command().
void wait_for_event_init | ( | void * | arg | ) |
Application task when the node is in the WAIT_FOR_EVENT state.
arg | arguments for WAIT_FOR_EVENT state |
References app_led_event(), configure_pibs(), LED_EVENT_POWER_ON, PHY_RX_ON, and tal_rx_enable().
void wait_for_event_rx_cb | ( | frame_info_t * | frame | ) |
Callback that is called if data has been received by trx in WAIT_FOR_EVENT state.
This allow the node to participate in Peer Search process as receptor
frame | Pointer to received frame |
References app_payload_t::cmd_id, CONFIG_ED_THRESHOLD, peer_req_t::config_mode, ED_VAL_LEN, FCS_LEN, FRAME_OVERHEAD_SRC_IEEE_ADDR, LENGTH_FIELD_LEN, LQI_LEN, frame_info_tag::mpdu, peer_search_receptor_arg_t::my_short_addr, OFFSET_FOR_SRC_IEEE_ADDR, peer_req_t::op_mode, app_payload_t::payload, peer_search_receptor_arg_t::peer_ieee_addr, general_pkt_t::peer_req_data, PEER_REQUEST, PEER_SEARCH_PER_RX, PEER_SEARCH_RANGE_RX, PER_TEST_MODE, print_event(), PRINT_KEY_PRESS_PEER_SEARCH_RECEPTOR, PRINT_PEER_SEARCH_RECEPTOR_BAD_FRAME, PRINT_UART_CHAR_PEER_SEARCH_RECEPTOR, RANGE_MEASURE_MODE, and set_main_state().
void wait_for_event_task | ( | void | ) |
Application task handling user events like key press or character on UART.
This function
References app_debounce_button(), PEER_SEARCH_RANGE_TX, print_event(), PRINT_KEY_PRESS_PEER_SEARCH_INITIATOR, and set_main_state().
uint8_t APP_TIMER_TO_RX_LED_OFF |
Referenced by app_led_event(), and app_timers_init().
uint8_t APP_TIMER_TO_TX |
Referenced by app_timers_init(), get_crc_settings_peer_node(), led_blinker_timer_handler_cb(), marker_tx_timer_handler_cb(), peer_req_send_exit(), peer_req_send_task(), per_mode_initiator_init(), per_mode_initiator_rx_cb(), per_mode_initiator_task(), per_mode_initiator_tx_done_cb(), per_mode_receptor_rx_cb(), per_mode_receptor_task(), range_test_tx_on_exit(), range_test_tx_on_init(), range_test_tx_timer_handler_cb(), send_range_test_marker_rsp(), wait_for_conf_exit(), and wait_for_conf_init().
uint8_t APP_TIMER_TO_TX_LED_OFF |
Referenced by app_led_event(), app_timers_init(), and per_mode_initiator_tx_done_cb().
bool node_ib_t::configure_mode |
uint8_t CW_TX_TIMER |
main_state_t node_ib_t::main_state |
Referenced by app_task(), handle_incoming_msg(), peer_req_send_task(), peer_rsp_rcvd_init(), peer_rsp_rcvd_tx_cb(), peer_search_initiator_init(), per_mode_initiator_init(), per_mode_initiator_task(), pktstream_test(), pulse_cw_transmission(), rx_on_test(), send_peer_req(), serial_data_handler(), set_main_state(), start_cw_transmission(), stop_cw_transmission(), stop_pkt_streaming(), tal_ed_end_cb(), tal_rx_frame_cb(), tal_tx_frame_done_cb(), and wait_for_conf_rx_cb().
uint8_t node_ib_t::msg_seq_num |
Referenced by config_node_ib(), and transmit_frame().
volatile node_ib_t node_info |
Referenced by configuration_mode_selection(), configure_frame_sending(), configure_range_test_frame_sending(), disconnect_peer_node(), handle_incoming_msg(), peer_req_send_task(), peer_rsp_rcvd_exit(), peer_rsp_rcvd_init(), peer_rsp_rcvd_tx_cb(), peer_search_initiator_exit(), peer_search_initiator_init(), peer_search_initiator_rx_cb(), peer_search_initiator_set_sub_state(), peer_search_initiator_task(), peer_search_initiator_tx_done_cb(), peer_search_receptor_exit(), peer_search_receptor_init(), peer_search_receptor_rx_cb(), peer_search_receptor_set_sub_state(), peer_search_receptor_task(), peer_search_receptor_tx_done_cb(), per_mode_initiator_init(), per_mode_initiator_task(), per_mode_initiator_tx_done_cb(), per_mode_receptor_task(), per_mode_receptor_tx_done_cb(), pktstream_test(), pulse_cw_transmission(), range_test_frame_tx(), range_test_timer_handler_cb(), rx_on_test(), send_crc_set_req(), send_crc_status_req(), send_crc_status_rsp(), send_disconnect_command(), send_identify_command(), send_parameters_changed(), send_peer_conf(), send_peer_info_req(), send_peer_info_rsp(), send_peer_req(), send_peer_rsp(), send_per_test_start_cmd(), send_range_test_marker_cmd(), send_range_test_marker_rsp(), send_range_test_rsp(), send_range_test_start_cmd(), send_range_test_stop_cmd(), send_remote_cmd(), send_remote_reply_cmd(), send_result_req(), send_result_rsp(), send_set_default_config_command(), serial_data_handler(), start_cw_transmission(), stop_cw_transmission(), stop_pkt_streaming(), and wait_for_conf_rx_cb().
bool node_ib_t::peer_found |
Referenced by config_node_ib(), disconnect_peer_node(), peer_rsp_rcvd_tx_cb(), and per_mode_initiator_init().
uint16_t node_ib_t::peer_short_addr |
Referenced by config_node_ib(), configure_frame_sending(), configure_range_test_frame_sending(), peer_search_initiator_init(), peer_search_receptor_init(), range_test_frame_tx(), send_crc_set_req(), send_crc_status_req(), send_crc_status_rsp(), send_disconnect_command(), send_identify_command(), send_parameters_changed(), send_peer_conf(), send_peer_info_req(), send_peer_info_rsp(), send_peer_req(), send_peer_rsp(), send_per_test_start_cmd(), send_range_test_marker_cmd(), send_range_test_marker_rsp(), send_range_test_rsp(), send_range_test_start_cmd(), send_range_test_stop_cmd(), send_remote_cmd(), send_remote_reply_cmd(), send_result_req(), send_result_rsp(), send_set_default_config_command(), and wait_for_conf_rx_cb().
uint8_t node_ib_t::sub_state |
Referenced by peer_search_initiator_exit(), peer_search_initiator_rx_cb(), peer_search_initiator_set_sub_state(), peer_search_initiator_task(), peer_search_initiator_tx_done_cb(), peer_search_receptor_exit(), peer_search_receptor_rx_cb(), peer_search_receptor_set_sub_state(), peer_search_receptor_task(), and peer_search_receptor_tx_done_cb().
uint8_t T_APP_TIMER |
uint8_t T_APP_TIMER_RANGE |
Referenced by app_timers_init(), per_mode_initiator_tx_done_cb(), range_test_timer_handler_cb(), and start_range_test().
uint8_t node_ib_t::transmitting |
frame_info_t* node_ib_t::tx_frame_info |