mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
ba3088c4bd
into separate patch files
109 lines
3.8 KiB
Diff
109 lines
3.8 KiB
Diff
*** stock_iot-lab_M3/openwsn/02b-MAChigh/neighbors.h Thu Apr 24 11:01:36 2014
|
|
--- riot-openwsn-wip/openwsn/02b-MAChigh/neighbors.h Thu Apr 24 16:55:54 2014
|
|
***************
|
|
*** 21,26 ****
|
|
--- 21,27 ----
|
|
|
|
#define MAXDAGRANK 0xffff
|
|
#define DEFAULTDAGRANK MAXDAGRANK
|
|
+ #define MINHOPRANKINCREASE 256 //default value in RPL and Minimal 6TiSCH draft
|
|
|
|
//=========================== typedef =========================================
|
|
|
|
***************
|
|
*** 38,43 ****
|
|
--- 39,45 ----
|
|
uint8_t numTxACK;
|
|
uint8_t numWraps;//number of times the tx counter wraps. can be removed if memory is a restriction. also check openvisualizer then.
|
|
asn_t asn;
|
|
+ uint8_t joinPrio;
|
|
} neighborRow_t;
|
|
PRAGMA(pack());
|
|
|
|
***************
|
|
*** 58,73 ****
|
|
} netDebugNeigborEntry_t;
|
|
PRAGMA(pack());
|
|
|
|
! //=========================== variables =======================================
|
|
|
|
//=========================== prototypes ======================================
|
|
|
|
! void neighbors_init();
|
|
// getters
|
|
! dagrank_t neighbors_getMyDAGrank();
|
|
! uint8_t neighbors_getNumNeighbors();
|
|
bool neighbors_getPreferredParentEui64(open_addr_t* addressToWrite);
|
|
! open_addr_t* neighbors_getKANeighbor();
|
|
// interrogators
|
|
bool neighbors_isStableNeighbor(open_addr_t* address);
|
|
bool neighbors_isPreferredParent(open_addr_t* address);
|
|
--- 60,83 ----
|
|
} netDebugNeigborEntry_t;
|
|
PRAGMA(pack());
|
|
|
|
! //=========================== module variables ================================
|
|
!
|
|
! typedef struct {
|
|
! neighborRow_t neighbors[MAXNUMNEIGHBORS];
|
|
! dagrank_t myDAGrank;
|
|
! uint8_t debugRow;
|
|
! icmpv6rpl_dio_ht* dio; //keep it global to be able to debug correctly.
|
|
! } neighbors_vars_t;
|
|
|
|
//=========================== prototypes ======================================
|
|
|
|
! void neighbors_init(void);
|
|
// getters
|
|
! dagrank_t neighbors_getMyDAGrank(void);
|
|
! uint8_t neighbors_getNumNeighbors(void);
|
|
bool neighbors_getPreferredParentEui64(open_addr_t* addressToWrite);
|
|
! open_addr_t* neighbors_getKANeighbor(void);
|
|
!
|
|
// interrogators
|
|
bool neighbors_isStableNeighbor(open_addr_t* address);
|
|
bool neighbors_isPreferredParent(open_addr_t* address);
|
|
***************
|
|
*** 78,85 ****
|
|
void neighbors_indicateRx(
|
|
open_addr_t* l2_src,
|
|
int8_t rssi,
|
|
! asn_t* asnTimestamp
|
|
);
|
|
void neighbors_indicateTx(
|
|
open_addr_t* dest,
|
|
uint8_t numTxAttempts,
|
|
--- 88,98 ----
|
|
void neighbors_indicateRx(
|
|
open_addr_t* l2_src,
|
|
int8_t rssi,
|
|
! asn_t* asnTimestamp,
|
|
! bool joinPrioPresent,
|
|
! uint8_t joinPrio
|
|
);
|
|
+
|
|
void neighbors_indicateTx(
|
|
open_addr_t* dest,
|
|
uint8_t numTxAttempts,
|
|
***************
|
|
*** 90,98 ****
|
|
// get addresses
|
|
void neighbors_getNeighbor(open_addr_t* address,uint8_t addr_type,uint8_t index);
|
|
// managing routing info
|
|
! void neighbors_updateMyDAGrankAndNeighborPreference();
|
|
// debug
|
|
! bool debugPrint_neighbors();
|
|
void debugNetPrint_neighbors(netDebugNeigborEntry_t* schlist);
|
|
|
|
/**
|
|
--- 103,111 ----
|
|
// get addresses
|
|
void neighbors_getNeighbor(open_addr_t* address,uint8_t addr_type,uint8_t index);
|
|
// managing routing info
|
|
! void neighbors_updateMyDAGrankAndNeighborPreference(void);
|
|
// debug
|
|
! bool debugPrint_neighbors(void);
|
|
void debugNetPrint_neighbors(netDebugNeigborEntry_t* schlist);
|
|
|
|
/**
|