Microchip® Advanced Software Framework

nwkRouteDiscovery.c File Reference

Route discovery implementation.

Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.

#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#include "sysTimer.h"
#include "sysConfig.h"
#include "nwk.h"
#include "nwkTx.h"
#include "nwkFrame.h"
#include "nwkRoute.h"
#include "nwkGroup.h"
#include "nwkCommand.h"
#include "nwkRouteDiscovery.h"

Data Structures

struct  NwkRouteDiscoveryTableEntry_t
 

Macros

#define NWK_ROUTE_DISCOVERY_BEST_LINK_QUALITY   255
 
#define NWK_ROUTE_DISCOVERY_NO_LINK   0
 
#define NWK_ROUTE_DISCOVERY_TIMER_INTERVAL   100 /* ms */
 

Typedefs

typedef struct
NwkRouteDiscoveryTableEntry_t 
NwkRouteDiscoveryTableEntry_t
 

Enumerations

enum  { NWK_RD_STATE_WAIT_FOR_ROUTE = 0x40 }
 

Functions

static void nwkRouteDiscoveryDone (NwkRouteDiscoveryTableEntry_t *entry, bool status)
 
static
NwkRouteDiscoveryTableEntry_t
nwkRouteDiscoveryFindEntry (uint16_t src, uint16_t dst, uint8_t multicast)
 
void nwkRouteDiscoveryInit (void)
 Initializes the Route Discovery module. More...
 
static
NwkRouteDiscoveryTableEntry_t
nwkRouteDiscoveryNewEntry (void)
 
bool nwkRouteDiscoveryReplyReceived (NWK_DataInd_t *ind)
 
void nwkRouteDiscoveryRequest (NwkFrame_t *frame)
 
bool nwkRouteDiscoveryRequestReceived (NWK_DataInd_t *ind)
 
static void nwkRouteDiscoverySendReply (NwkRouteDiscoveryTableEntry_t *entry, uint8_t flq, uint8_t rlq)
 
static bool nwkRouteDiscoverySendRequest (NwkRouteDiscoveryTableEntry_t *entry, uint8_t lq)
 
static void nwkRouteDiscoveryTimerHandler (SYS_Timer_t *timer)
 
static uint8_t nwkRouteDiscoveryUpdateLq (uint8_t lqa, uint8_t lqb)
 

Variables

static
NwkRouteDiscoveryTableEntry_t 
nwkRouteDiscoveryTable [NWK_ROUTE_DISCOVERY_TABLE_SIZE]
 
static SYS_Timer_t nwkRouteDiscoveryTimer
 

#define NWK_ROUTE_DISCOVERY_BEST_LINK_QUALITY   255
#define NWK_ROUTE_DISCOVERY_NO_LINK   0
#define NWK_ROUTE_DISCOVERY_TIMER_INTERVAL   100 /* ms */

anonymous enum
Enumerator
NWK_RD_STATE_WAIT_FOR_ROUTE 

static NwkRouteDiscoveryTableEntry_t * nwkRouteDiscoveryFindEntry ( uint16_t  src,
uint16_t  dst,
uint8_t  multicast 
)
static
static uint8_t nwkRouteDiscoveryUpdateLq ( uint8_t  lqa,
uint8_t  lqb 
)
static

SYS_Timer_t nwkRouteDiscoveryTimer
static