#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <ctype.h>
#include "tal.h"
#include "tal_helper_2.h"
#include "app_init.h"
#include "ieee_const.h"
#include "app_frame_format.h"
#include "sio2host.h"
#include "app_range_mode.h"
#include "user_interface.h"
Macros | |
#define | APP_SEND_TEST_PKT_INTERVAL_IN_MICRO_SEC (250000) |
#define | DATA_PKT (0x00) |
Functions | |
void | app_print_statistics (int trx) |
Print the statistics for Range Measurement on the UART Terminal. More... | |
static int | range_test_frame_tx (void) |
Send Range Measurement mode test frames to the peer device. More... | |
void | range_test_rx_cb (trx_id_t trx, frame_info_t *frame) |
Callback that is called if data has been received by trx when the node is in Range Measurement mode i.e RANGE_TEST_TX_ON or RANGE_TEST_TX_OFF. More... | |
void | range_test_tx_off_task (trx_id_t trx) |
Application task handling Range Measurement when the node is in RANGE_TEST_TX_OFF state, where no TX is enabled and only RX is ON. More... | |
void | range_test_tx_on_exit (trx_id_t trx) |
To exit the Application task from RANGE_TEST_TX_ON state, where both TX and RX is enabled. More... | |
void | range_test_tx_on_init (trx_id_t trx, void *arg) |
Initialization of Range Measurement mode in RANGE_TX_ON State. More... | |
void | range_test_tx_on_task (trx_id_t trx) |
Application task handling Range Measurement when the node is in RANGE_TEST_TX_ON state, where both TX and RX is enabled. More... | |
static void | range_test_tx_timer_handler_cb (void *parameter) |
Callback function that handles timer in Range Measurement Mode. More... | |
Variables | |
static uint32_t | num_of_frames_rec |
static uint32_t | num_of_frames_send |
static uint8_t | seq_num |
|
static |
Send Range Measurement mode test frames to the peer device.
This is a unicast with source address and destination addreses which were set during peer search process
References app_transmit_frame(), app_payload_t::cmd_id, data, DATA_PKT, FCF_SHORT_ADDR, node_info, num_of_frames_send, app_payload_t::payload, node_ib_t::peer_short_addr, data_pkt_range_test_t::pkt_count, RF24, seq_num, and app_payload_t::seq_num.
Referenced by range_test_tx_timer_handler_cb().
|
static |
Callback function that handles timer in Range Measurement Mode.
parameter | pass parameters to timer handler |
References app_led_event(), APP_SEND_TEST_PKT_INTERVAL_IN_MICRO_SEC, APP_TIMER_TO_TX, FUNC_PTR, LED_EVENT_TX_FRAME, NULL, num_of_frames_send, range_test_frame_tx(), SW_TIMEOUT_RELATIVE, and sw_timer_start().
Referenced by range_test_tx_on_init().