Microchip® Advanced Software Framework

2/src/peer_search_initiator.c File Reference
#include <stdlib.h>
#include "tal.h"
#include "tal_pib.h"
#include "tal_helper_2.h"
#include "ieee_const.h"
#include "sio2host.h"
#include "sio2ncp.h"
#include "app_frame_format.h"
#include "app_init.h"
#include "user_interface.h"
#include "app_peer_search.h"
#include "perf_api.h"

Macros

#define CONFIG_MODE_TX_PWR   (0xEF)
 Lowest power -17dBm. More...
 
#define MAX_NUMBER_PEER_REQ_RETRY   (0xFF)
 
#define PEER_REQUEST_SEND_INTERVAL_IN_MICRO_SEC   (50000)
 

Enumerations

enum  peer_search_initiator_state_t {
  PEER_REQ_SEND,
  PEER_RSP_RCVD,
  NUM_PEER_SEARCH_INITIATOR_STATES,
  PEER_REQ_SEND,
  PEER_RSP_RCVD,
  NUM_PEER_SEARCH_INITIATOR_STATES
}
 

Functions

static void app_peer_req_tmr_handler_cb (void *parameter)
 Timer handler for supporting peer search. More...
 
static void peer_req_send_exit (trx_id_t trx)
 function to exit peer req send state More...
 
static void peer_req_send_rx_cb (trx_id_t trx, frame_info_t *mac_frame_info)
 Callback that is called if data has been received by trx in PEER_REQ_SEND State. More...
 
static void peer_req_send_task (trx_id_t trx)
 Application task handling peer request send. More...
 
static void peer_rsp_rcvd_exit (trx_id_t trx)
 Function to exit the peer rsp rcvd state. More...
 
static void peer_rsp_rcvd_init (trx_id_t trx, void *arg)
 Peer rsp received state init function. More...
 
static void peer_rsp_rcvd_tx_cb (trx_id_t trx, retval_t status, frame_info_t *frame)
 Callback that is called once tx is done in peer rsp rcvd state. More...
 
void peer_search_initiator_exit (trx_id_t trx)
 Function to exit peer search initiator exit state. More...
 
void peer_search_initiator_init (trx_id_t trx, void *arg)
 Application task to start peer search. More...
 
void peer_search_initiator_rx_cb (trx_id_t trx, frame_info_t *frame)
 Callback that is called if data has been received by trx. More...
 
void peer_search_initiator_set_sub_state (trx_id_t trx, uint8_t state, void *arg)
 Function to set the sub state of state machine. More...
 
void peer_search_initiator_task (trx_id_t trx)
 Application task handling peer search. More...
 
void peer_search_initiator_tx_done_cb (trx_id_t trx, retval_t status, frame_info_t *frame)
 Callback that is called once tx is done in peer search initiator state. More...
 
static retval_t send_peer_conf (trx_id_t trx)
 Send the peer confirmation confirming the node which has been connected This frame is sent as a unicast to peer node. More...
 
static retval_t send_peer_req (trx_id_t trx)
 Send peer search request. More...
 

Variables

static peer_state_function_t const peer_search_initiator_state_table [NUM_PEER_SEARCH_INITIATOR_STATES]
 
static uint8_t seq_num [NUM_TRX]
 

static void app_peer_req_tmr_handler_cb ( void *  parameter)
static

Timer handler for supporting peer search.

Parameters
parameterpass parameters to timer handler

Referenced by peer_req_send_task().