Initializes the Performance Analyzer Application.
Data Structures | |
struct | node_ib_t |
Structure to holds the information base for the node. More... | |
Macros | |
#define | BOARD_NAME "USER_BOARD" |
#define | CRC_SETTING_ON_REMOTE_NODE |
#define | DEFAULT_ADDR (0xFFFF) |
#define | DEFAULT_CHANNEL (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 0X01 |
#define | LED_COUNT 0 |
#define | MCU_SOC_NAME "USER_MCU" |
#define | OFFSET_FOR_SRC_IEEE_ADDR (7) |
#define | SRC_PAN_ID (DEFAULT_PAN_ID) |
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 BOARD_NAME "USER_BOARD" |
Referenced by get_board_details(), and get_node_info().
#define CRC_SETTING_ON_REMOTE_NODE |
#define DEFAULT_ADDR (0xFFFF) |
Referenced by configure_pibs().
#define DEFAULT_CHANNEL (DEFAULT_CHANNEL_OFFSET) |
Referenced by config_per_test_parameters(), configure_pibs(), and parse_user_input().
#define DEFAULT_PAN_ID (0xCAFE) |
Referenced by bc_data_cb(), gts_data_cb(), indirect_data_cb(), and main().
#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 0X01 |
Referenced by get_board_details(), and get_node_info().
#define LED_COUNT 0 |
Referenced by appDataInd().
#define MCU_SOC_NAME "USER_MCU" |
Referenced by get_board_details(), and get_node_info().
#define OFFSET_FOR_SRC_IEEE_ADDR (7) |
Referenced by wait_for_event_rx_cb().
#define SRC_PAN_ID (DEFAULT_PAN_ID) |
enum main_state_t |
void app_alert | ( | void | ) |
References delay_us.
Referenced by app_timers_init(), init_state_init(), and main().
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, macIeeeAddress, macPANId, macShortAddress, phyCurrentChannel, phyCurrentPage, 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(), and tal_init().
void performance_analyzer_init | ( | void | ) |
Init function of the Performance Analyzer application.
References INIT, NULL, 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.
Referenced by set_transceiver_state().
void save_all_settings | ( | void | ) |
Save all user settings before Start of CW transmission.
Referenced by set_transceiver_state().
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, 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, for(), FRAME_OVERHEAD, i, 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 handle_gts_data_req(), mac_tx_gts_data(), mcps_data_request(), mlme_gts_request(), process_deallocate_data_q(), range_test_frame_tx(), 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(), NULL, 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(), 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(), rx_on_test(), send_peer_req(), serial_data_handler(), set_main_state(), 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(), range_test_frame_tx(), range_test_timer_handler_cb(), rx_on_test(), 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(), 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_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 |