Receptor functionalities in PER Measurement mode - Performance Analyzer application Copyright (c) 2013-2018 Microchip Technology Inc.
and its subsidiaries.
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <ctype.h>
#include "app_init.h"
#include "tal_constants.h"
#include "tal_internal.h"
#include "tal_helper.h"
#include "ieee_const.h"
#include "app_frame_format.h"
#include "app_per_mode.h"
#include "conf_board.h"
#include "perf_api.h"
#include "led.h"
Macros | |
#define | DELAY_BEFORE_APP_RESET_IN_MICRO_SEC (5000) |
#define | LED_BLINK_COUNT_FOR_BUTTON_PRESS (10) |
#define | LED_BLINK_RATE_IN_MICRO_SEC (50000) |
Functions | |
static void | app_reset_cb (void *parameter) |
Timer Callback function if disconnect command is received on air by a node in reflector configuration.This is used to do a software reset on the reflector side. More... | |
static bool | crc_check_ok (frame_info_t *mac_frame_info) |
Calculates CRC manually and compares with the received and returns true if both are same,false otherwise. More... | |
static uint16_t | crc_test (uint16_t crc, uint8_t data) |
Calculates CRC for a given byte of data. More... | |
static void | get_node_info (peer_info_rsp_t *data) |
Function used to get the board details of peer node. More... | |
void | marker_rsp_timer_handler_cb (void *parameter) |
Timer Callback function if marker command is received on air This is used to blink the LED and thus identify that the marker frame is received. More... | |
void | marker_tx_timer_handler_cb (void *parameter) |
Timer Callback function if marker response command is transmitted on air This is used to blink the LED and thus identify that the transmission is done. More... | |
void | per_mode_receptor_init (void *parameter) |
Initialize the application in PER Measurement mode as Receptor. More... | |
void | per_mode_receptor_rx_cb (frame_info_t *frame) |
Callback that is called if data has been received by trx in the PER_TEST_RECEPTOR state This call back is used when the node is operating as PER Measurement mode Receptor. More... | |
void | per_mode_receptor_task (void) |
The application task when the node is in PER_TEST_RECEPTOR state i.e.PER Measurement mode as Receptor. More... | |
void | per_mode_receptor_tx_done_cb (retval_t status, frame_info_t *frame) |
Callback that is called once tx is done in PER_TEST_RECEPTOR state This call back is used when the node is operating as PER Measurement mode Receptor. More... | |
static void | send_crc_status_rsp (void) |
Function used to send crc settings on remote node to host node. More... | |
static void | send_peer_info_rsp (void) |
Function used to send peer_info_rsp command. More... | |
static bool | send_range_test_marker_cmd (void) |
Function to send the range test marker command to the initiator node. More... | |
static void | send_range_test_rsp (uint8_t seq_num, uint32_t frame_count, int8_t ed, uint8_t lqi) |
Function used to send response to the received range test packet. More... | |
bool | send_remote_reply_cmd (uint8_t *serial_buf, uint8_t len) |
This function is used to send a remote test response command back to the initiator. More... | |
static void | send_result_rsp (void) |
Function used to send PER test result. More... | |
static void | set_paramter_on_recptor_node (app_payload_t *msg) |
Extract the received command frame and set the parameters like channel, tx power etc on Receptor node. More... | |
Variables | |
static uint32_t | aver_lqi |
static uint32_t | aver_rssi |
uint32_t | frames_with_wrong_crc |
bool | manual_crc = false |
static uint8_t | marker_seq_num = 0 |
static uint32_t | number_rx_frames |
static bool | range_test_in_progress = false |
static uint8_t | remote_cmd_len |
static uint8_t * | remote_cmd_ptr |
static bool | remote_cmd_rx = false |
static uint8_t | seq_num_receptor |