Microchip® Advanced Software Framework

src/peer_search_receptor.c File Reference
#include <stdlib.h>
#include "tal.h"
#include "tal_helper.h"
#include "ieee_const.h"
#include "app_init.h"
#include "app_frame_format.h"
#include "app_peer_search.h"

Macros

#define PEER_RESPONSE_TIMEOUT_IN_MICRO_SEC   (200000)
 

Enumerations

enum  peer_search_receptor_state_t {
  PEER_RSP_SEND,
  WAIT_FOR_PEER_CONF,
  PEER_SEARCH_RECEPTOR_SUCCESS,
  NUM_PEER_SEARCH_RECEPTOR_STATES,
  PEER_RSP_SEND,
  WAIT_FOR_PEER_CONF,
  PEER_SEARCH_RECEPTOR_SUCCESS,
  NUM_PEER_SEARCH_RECEPTOR_STATES
}
 

Functions

static void app_peer_conf_tmr_handler_cb (void *parameter)
 Timer handler for supporting peer search. More...
 
static void peer_rsp_send_init (void *arg)
 Application task handling peer search. More...
 
static void peer_rsp_send_tx_done_cb (retval_t status, frame_info_t *frame)
 Callback that is called once tx is done in PEER_RSP_SEND state. More...
 
void peer_search_receptor_exit (void)
 Function to exit peer search receptor state. More...
 
void peer_search_receptor_init (void *arg)
 Application task to start peer search. More...
 
void peer_search_receptor_rx_cb (frame_info_t *frame)
 Callback that is called if data has been received by trx in peer search receptor state. More...
 
void peer_search_receptor_set_sub_state (uint8_t state, void *arg)
 Function to set the sub state of state machine. More...
 
void peer_search_receptor_task (void)
 Application task handling peer search. More...
 
void peer_search_receptor_tx_done_cb (retval_t status, frame_info_t *frame)
 Callback that is called once tx is done in peer search receptor state. More...
 
static int send_peer_rsp (uint64_t *dst_addr)
 Send peer response. More...
 
static void wait_for_conf_exit (void)
 Function to exit wait for peer search conf state. More...
 
static void wait_for_conf_init (void *arg)
 Function to initialize wait for peer search conf state. More...
 
static void wait_for_conf_rx_cb (frame_info_t *mac_frame_info)
 Callback that is called once tx is done in wait for peer search conf state. More...
 

Variables

static peer_state_function_t const peer_search_receptor_state_table [NUM_PEER_SEARCH_RECEPTOR_STATES]
 
static uint8_t seq_num