Rename CONTIKI_NETWORK_DENSITY and CONTIKI_NETWORK_SIZE to NBR_TABLE_CONF_MAX_NEIGHBORS and NETSTCK_ROUTING_STATE_SIZE

This commit is contained in:
Simon Duquennoy 2017-06-27 09:27:00 +02:00
parent 08ac18b4e9
commit f64ec24c9b
13 changed files with 42 additions and 41 deletions

View File

@ -90,12 +90,12 @@
#define UIP_CONF_ROUTER 1 #define UIP_CONF_ROUTER 1
/* configure network size and density */ /* configure network size and density */
#ifndef CONTIKI_NETWORK_SIZE #ifndef NETSTCK_ROUTING_STATE_SIZE
#define CONTIKI_NETWORK_SIZE 300 #define NETSTCK_ROUTING_STATE_SIZE 300
#endif /* CONTIKI_NETWORK_SIZE */ #endif /* NETSTCK_ROUTING_STATE_SIZE */
#ifndef CONTIKI_NETWORK_DENSITY #ifndef NBR_TABLE_CONF_MAX_NEIGHBORS
#define CONTIKI_NETWORK_DENSITY 300 #define NBR_TABLE_CONF_MAX_NEIGHBORS 300
#endif /* CONTIKI_NETWORK_DENSITY */ #endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */
#define TCPIP_CONF_ANNOTATE_TRANSMISSIONS 1 #define TCPIP_CONF_ANNOTATE_TRANSMISSIONS 1

View File

@ -90,17 +90,18 @@
* project-specific configuration to save memory. * project-specific configuration to save memory.
*/ */
/* CONTIKI_NETWORK_DENSITY specifies the maximum number of neighbors /* NBR_TABLE_CONF_MAX_NEIGHBORS specifies the maximum number of neighbors
* a node will have to handle. Used to set NBR_TABLE_MAX_NEIGHBORS. */ that each node will be able to handle. */
#ifndef CONTIKI_NETWORK_DENSITY #ifndef NBR_TABLE_CONF_MAX_NEIGHBORS
#define CONTIKI_NETWORK_DENSITY 16 #define NBR_TABLE_CONF_MAX_NEIGHBORS 16
#endif /* CONTIKI_NETWORK_DENSITY */ #endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */
/* CONTIKI_NETWORK_SIZE specifies the maximum number of nodes in /* NETSTCK_ROUTING_STATE_SIZE specifies the maximum number of entries
* a network. Used to set UIP_MAX_ROUTES or RPL_NS_LINK_NUM. */ the routing module will handle. Applies to uIP routing tables if they are
#ifndef CONTIKI_NETWORK_SIZE used, or to RPL non-storing mode links instead */
#define CONTIKI_NETWORK_SIZE 16 #ifndef NETSTCK_ROUTING_STATE_SIZE
#endif /* CONTIKI_NETWORK_SIZE */ #define NETSTCK_ROUTING_STATE_SIZE 16
#endif /* NETSTCK_ROUTING_STATE_SIZE */
/* NETSTACK_CONF_WITH_IPV6 specifies whether or not IPv6 should be used. If IPv6 /* NETSTACK_CONF_WITH_IPV6 specifies whether or not IPv6 should be used. If IPv6
is not used, IPv4 is used instead. */ is not used, IPv4 is used instead. */

View File

@ -56,7 +56,7 @@
#define UIP_MAX_ROUTES UIP_CONF_MAX_ROUTES #define UIP_MAX_ROUTES UIP_CONF_MAX_ROUTES
#else /* UIP_CONF_MAX_ROUTES */ #else /* UIP_CONF_MAX_ROUTES */
#if RPL_WITH_STORING #if RPL_WITH_STORING
#define UIP_MAX_ROUTES CONTIKI_NETWORK_SIZE #define UIP_MAX_ROUTES NETSTCK_ROUTING_STATE_SIZE
#else #else
#define UIP_MAX_ROUTES 0 #define UIP_MAX_ROUTES 0
#endif #endif

View File

@ -74,7 +74,7 @@
#ifdef TSCH_QUEUE_CONF_MAX_NEIGHBOR_QUEUES #ifdef TSCH_QUEUE_CONF_MAX_NEIGHBOR_QUEUES
#define TSCH_QUEUE_MAX_NEIGHBOR_QUEUES TSCH_QUEUE_CONF_MAX_NEIGHBOR_QUEUES #define TSCH_QUEUE_MAX_NEIGHBOR_QUEUES TSCH_QUEUE_CONF_MAX_NEIGHBOR_QUEUES
#else #else
#define TSCH_QUEUE_MAX_NEIGHBOR_QUEUES ((CONTIKI_NETWORK_DENSITY) + 2) #define TSCH_QUEUE_MAX_NEIGHBOR_QUEUES ((NBR_TABLE_CONF_MAX_NEIGHBORS) + 2)
#endif #endif
/* TSCH CSMA-CA parameters, see IEEE 802.15.4e-2012 */ /* TSCH CSMA-CA parameters, see IEEE 802.15.4e-2012 */

View File

@ -43,7 +43,7 @@
#ifdef NBR_TABLE_CONF_MAX_NEIGHBORS #ifdef NBR_TABLE_CONF_MAX_NEIGHBORS
#define NBR_TABLE_MAX_NEIGHBORS NBR_TABLE_CONF_MAX_NEIGHBORS #define NBR_TABLE_MAX_NEIGHBORS NBR_TABLE_CONF_MAX_NEIGHBORS
#else /* NBR_TABLE_CONF_MAX_NEIGHBORS */ #else /* NBR_TABLE_CONF_MAX_NEIGHBORS */
#define NBR_TABLE_MAX_NEIGHBORS CONTIKI_NETWORK_DENSITY #define NBR_TABLE_MAX_NEIGHBORS NBR_TABLE_CONF_MAX_NEIGHBORS
#endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */ #endif /* NBR_TABLE_CONF_MAX_NEIGHBORS */
/* An item in a neighbor table */ /* An item in a neighbor table */

View File

@ -63,7 +63,7 @@
#define RPL_NS_LINK_NUM RPL_NS_CONF_LINK_NUM #define RPL_NS_LINK_NUM RPL_NS_CONF_LINK_NUM
#else /* RPL_NS_CONF_LINK_NUM */ #else /* RPL_NS_CONF_LINK_NUM */
#if RPL_WITH_NON_STORING #if RPL_WITH_NON_STORING
#define RPL_NS_LINK_NUM CONTIKI_NETWORK_SIZE #define RPL_NS_LINK_NUM NETSTCK_ROUTING_STATE_SIZE
#else #else
#define RPL_NS_LINK_NUM 0 #define RPL_NS_LINK_NUM 0
#endif #endif

View File

@ -47,7 +47,7 @@
#define RPL_NS_LINK_NUM RPL_NS_CONF_LINK_NUM #define RPL_NS_LINK_NUM RPL_NS_CONF_LINK_NUM
#else /* RPL_NS_CONF_LINK_NUM */ #else /* RPL_NS_CONF_LINK_NUM */
#if RPL_WITH_NON_STORING #if RPL_WITH_NON_STORING
#define RPL_NS_LINK_NUM CONTIKI_NETWORK_SIZE #define RPL_NS_LINK_NUM NETSTCK_ROUTING_STATE_SIZE
#else #else
#define RPL_NS_LINK_NUM 0 #define RPL_NS_LINK_NUM 0
#endif #endif

View File

@ -50,10 +50,10 @@
#undef QUEUEBUF_CONF_NUM #undef QUEUEBUF_CONF_NUM
#define QUEUEBUF_CONF_NUM 4 #define QUEUEBUF_CONF_NUM 4
#undef CONTIKI_NETWORK_SIZE #undef NETSTCK_ROUTING_STATE_SIZE
#define CONTIKI_NETWORK_SIZE 7 #define NETSTCK_ROUTING_STATE_SIZE 7
#undef CONTIKI_NETWORK_DENSITY #undef NBR_TABLE_CONF_MAX_NEIGHBORS
#define CONTIKI_NETWORK_DENSITY 7 #define NBR_TABLE_CONF_MAX_NEIGHBORS 7
#undef UIP_CONF_BUFFER_SIZE #undef UIP_CONF_BUFFER_SIZE
#define UIP_CONF_BUFFER_SIZE 140 #define UIP_CONF_BUFFER_SIZE 140

View File

@ -60,9 +60,9 @@
#define UIP_CONF_TCP 0 #define UIP_CONF_TCP 0
/* Code/RAM footprint savings so that things will fit on our device */ /* Code/RAM footprint savings so that things will fit on our device */
#undef CONTIKI_NETWORK_SIZE #undef NETSTCK_ROUTING_STATE_SIZE
#define CONTIKI_NETWORK_SIZE 10 #define NETSTCK_ROUTING_STATE_SIZE 10
#undef CONTIKI_NETWORK_DENSITY #undef NBR_TABLE_CONF_MAX_NEIGHBORS
#define CONTIKI_NETWORK_DENSITY 10 #define NBR_TABLE_CONF_MAX_NEIGHBORS 10
#endif /* PROJECT_CONF_H_ */ #endif /* PROJECT_CONF_H_ */

View File

@ -32,11 +32,11 @@
/* Network size and PAN-ID */ /* Network size and PAN-ID */
#undef CONTIKI_NETWORK_DENSITY #undef NBR_TABLE_CONF_MAX_NEIGHBORS
#define CONTIKI_NETWORK_DENSITY 25 #define NBR_TABLE_CONF_MAX_NEIGHBORS 25
#undef CONTIKI_NETWORK_SIZE #undef NETSTCK_ROUTING_STATE_SIZE
#define CONTIKI_NETWORK_SIZE 25 #define NETSTCK_ROUTING_STATE_SIZE 25
#undef IEEE802154_CONF_PANID #undef IEEE802154_CONF_PANID
#define IEEE802154_CONF_PANID 0xf123 #define IEEE802154_CONF_PANID 0xf123

View File

@ -36,12 +36,12 @@
#ifdef TEST_MORE_ROUTES #ifdef TEST_MORE_ROUTES
/* configure number of neighbors and routes */ /* configure number of neighbors and routes */
#define CONTIKI_NETWORK_DENSITY 10 #define NBR_TABLE_CONF_MAX_NEIGHBORS 10
#define CONTIKI_NETWORK_SIZE 30 #define NETSTCK_ROUTING_STATE_SIZE 30
#else #else
/* configure number of neighbors and routes */ /* configure number of neighbors and routes */
#define CONTIKI_NETWORK_DENSITY 10 #define NBR_TABLE_CONF_MAX_NEIGHBORS 10
#define CONTIKI_NETWORK_SIZE 10 #define NETSTCK_ROUTING_STATE_SIZE 10
#endif /* TEST_MORE_ROUTES */ #endif /* TEST_MORE_ROUTES */
#undef CSMA_CONF_802154_AUTOACK #undef CSMA_CONF_802154_AUTOACK

View File

@ -57,8 +57,8 @@
* Set the TCP MSS * Set the TCP MSS
*/ */
#define UIP_CONF_BUFFER_SIZE 900 #define UIP_CONF_BUFFER_SIZE 900
#define CONTIKI_NETWORK_SIZE 5 #define NETSTCK_ROUTING_STATE_SIZE 5
#define CONTIKI_NETWORK_DENSITY 5 #define NBR_TABLE_CONF_MAX_NEIGHBORS 5
#define UIP_CONF_TCP_MSS 128 #define UIP_CONF_TCP_MSS 128
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#endif /* PROJECT_CONF_H_ */ #endif /* PROJECT_CONF_H_ */

View File

@ -42,8 +42,8 @@
#define ANTENNA_SW_SELECT_DEF_CONF ANTENNA_SW_SELECT_2_4GHZ #define ANTENNA_SW_SELECT_DEF_CONF ANTENNA_SW_SELECT_2_4GHZ
#define RESOLV_CONF_SUPPORTS_MDNS 0 #define RESOLV_CONF_SUPPORTS_MDNS 0
#define CONTIKI_NETWORK_SIZE 3 #define NETSTCK_ROUTING_STATE_SIZE 3
#define CONTIKI_NETWORK_DENSITY 3 #define NBR_TABLE_CONF_MAX_NEIGHBORS 3
#define HTTP_CLIENT_BUFFER_LEN 256 #define HTTP_CLIENT_BUFFER_LEN 256