Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Performance Analyzer Application

This application Performance Analyzer is a Serial interface based application, which communicates with Wireless Analyzer to demonstrate various features and capabilities of Atmel Transceivers.

Modules

 Range Measurement
 Performs the functionalities of Range measurement mode, Evaluate the Communication coverage of the transceiver.
 
 Serial Parser
 Handles all the serial input and output commands.
 
 Application Initialization Process
 Initializes the Performance Analyzer Application.
 
 Packet error rate measurement
 Handles the functionalities of Packet Error Rate Measurement(PER) Mode, User can set and get various paramters of Transceiver like Channel,Antenna Diversity,CSMA and do the Packet Error Rate Measurement.
 
 User Interface
 Handles all User interface related functions such as Button, Print,LED events.
 
 

Data Structures

struct  state_function_t
 This structure forms the jump table to address various main states in this application. More...
 

Functions

void app_alert ()
 
static void app_task (void)
 Application task. More...
 
retval_t app_transmit_frame (trx_id_t trx, 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 config_node_ib (trx_id_t trx)
 Function to init the information base for device. More...
 
void performance_analyzer_task (void)
 This task needs to be called in a while(1) for performing Performance Analyzer tasks. More...
 
void set_main_state (trx_id_t trx, main_state_t state, void *arg)
 Function to set the main state of state machine. More...
 
void tal_ed_end_cb (trx_id_t trx, uint8_t energy_level)
 
void tal_rx_frame_cb (trx_id_t trx, frame_info_t *frame)
 User call back function for frame reception. More...
 
void tal_tx_frame_done_cb (trx_id_t trx, retval_t status, frame_info_t *frame)
 User call back function for frame transmission. More...
 

Variables

volatile node_ib_t node_info [NUM_TRX]
 
static state_function_t const state_table [NUM_MAIN_STATES]
 
static uint8_t storage_buffer [NUM_TRX][LARGE_BUFFER_SIZE]
 

void app_alert ( void  )

References delay_us.

static void app_task ( void  )
static

Application task.

Referenced by performance_analyzer_task().

retval_t app_transmit_frame ( trx_id_t  trx,
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.

Parameters
dst_addr_modedestination address mode - can be 16 or 64 bit
dst_addrdestination address
src_addr_modesource address mode - can be 16 or 64 bit
msdu_handlemsdu handle for the upper layers to track packets
payloaddata payload pointer
payload_lengthdata length
ack_reqspecifies ack requested for frame if set to 1
Returns
MAC_SUCCESS if the TAL has accepted the data for frame transmission TAL_BUSY if the TAL is busy servicing the previous tx request

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, 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_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_result_req(), send_result_rsp(), send_set_default_config_command(), and send_sun_page_changed().

void config_node_ib ( trx_id_t  trx)
void performance_analyzer_task ( void  )

This task needs to be called in a while(1) for performing Performance Analyzer tasks.

References app_task(), pal_task(), serial_data_handler(), and tal_task().

void set_main_state ( trx_id_t  tranciever,
main_state_t  state,
void *  arg 
)

Function to set the main state of state machine.

Parameters
statemain state to be set
argargument 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.

void tal_ed_end_cb ( trx_id_t  trx,
uint8_t  energy_level 
)
void tal_rx_frame_cb ( trx_id_t  trx_id,
frame_info_t rx_frame 
)

User call back function for frame reception.

Parameters
trx_idTransceiver identifier
rx_framePointer to received frame structure of type frame_info_t or to received frame array

References frame_info_tag::buffer_header, state_function_t::func_rx_frame_cb, and node_ib_t::main_state.

Referenced by process_incoming_frame().

void tal_tx_frame_done_cb ( trx_id_t  trx_id,
retval_t  status,
frame_info_t frame 
)

User call back function for frame transmission.

Parameters
trx_idTransceiver identifier
statusStatus of frame transmission attempt
framePointer to frame structure of type frame_info_t

References state_function_t::func_tx_frame_done_cb, node_ib_t::main_state, status, and node_ib_t::transmitting.

Referenced by tx_done(), and tx_done_handling().

volatile node_ib_t node_info[NUM_TRX]
state_function_t const state_table[NUM_MAIN_STATES]
static
uint8_t storage_buffer[NUM_TRX][LARGE_BUFFER_SIZE]
static

Referenced by config_node_ib().