[src] first trivial version for Trickle parameters
This commit is contained in:
parent
fcd32e3195
commit
a2672b83db
@ -22,7 +22,7 @@ void res_get_handler(void* request, void* response, uint8_t* buffer, uint16_t pr
|
|||||||
void res_periodic_handler();
|
void res_periodic_handler();
|
||||||
|
|
||||||
/* declare resource and set handlers */
|
/* declare resource and set handlers */
|
||||||
PERIODIC_RESOURCE(myresource, "title=\"An observable resource\";rt=\"some descriptive text\";obs", res_get_handler, NULL, NULL, NULL, 10 * CLOCK_SECOND, res_periodic_handler);
|
PERIODIC_RESOURCE(myresource, "title=\"An observable resource\";rt=\"some descriptive text\";obs", res_get_handler, NULL, NULL, NULL, 60 * CLOCK_SECOND, res_periodic_handler);
|
||||||
|
|
||||||
void res_periodic_handler() {
|
void res_periodic_handler() {
|
||||||
/* sample some sensor */
|
/* sample some sensor */
|
||||||
|
@ -1,16 +1,35 @@
|
|||||||
/* reduce RAM consumption */
|
|
||||||
|
|
||||||
#ifndef PROJECT_CONF_H_
|
#ifndef PROJECT_CONF_H_
|
||||||
#define PROJECT_CONF_H_
|
#define PROJECT_CONF_H_
|
||||||
#undef REST_MAX_CHUNK_SIZE // Set the max response payload before fragmentation
|
|
||||||
|
/* Set the max response payload before fragmentation */
|
||||||
|
#undef REST_MAX_CHUNK_SIZE
|
||||||
#define REST_MAX_CHUNK_SIZE 64
|
#define REST_MAX_CHUNK_SIZE 64
|
||||||
#undef COAP_MAX_OPEN_TRANSACTIONS // Set the max number of concurrent transactions
|
|
||||||
#define COAP_MAX_OPEN_TRANSACTIONS 4
|
/* Set the max number of concurrent transactions */
|
||||||
#undef NBR_TABLE_CONF_MAX_NEIGHBORS // Set the max number of entries in neighbors table
|
#undef COAP_MAX_OPEN_TRANSACTIONS
|
||||||
|
#define COAP_MAX_OPEN_TRANSACTIONS 2
|
||||||
|
|
||||||
|
/* Set the max number of entries in neighbors table */
|
||||||
|
#undef NBR_TABLE_CONF_MAX_NEIGHBORS
|
||||||
#define NBR_TABLE_CONF_MAX_NEIGHBORS 10
|
#define NBR_TABLE_CONF_MAX_NEIGHBORS 10
|
||||||
#undef UIP_CONF_MAX_ROUTES // Set the max number of routes handled by the node
|
|
||||||
#define UIP_CONF_MAX_ROUTES 10
|
/*Set the max number of routes handled by the node */
|
||||||
#undef UIP_CONF_BUFFER_SIZE // Set the amount of memory reserved to the uIP packet buffer
|
#undef UIP_CONF_MAX_ROUTES
|
||||||
#define UIP_CONF_BUFFER_SIZE 280
|
#define UIP_CONF_MAX_ROUTES 32
|
||||||
|
|
||||||
|
/* Set the amount of memory reserved to the uIP packet buffer */
|
||||||
|
#undef UIP_CONF_BUFFER_SIZE
|
||||||
|
#define UIP_CONF_BUFFER_SIZE 192
|
||||||
|
|
||||||
|
/* RPL specific tuning parameters */
|
||||||
|
#undef RPL_CONF_DIO_REDUNDANCY
|
||||||
|
#define RPL_CONF_DIO_REDUNDANCY 10
|
||||||
|
|
||||||
|
#undef RPL_CONF_INTERVAL_MIN
|
||||||
|
#define RPL_CONF_INTERVAL_MIN 3
|
||||||
|
|
||||||
|
#undef RPL_CONF_DIO_INTERVAL_DOUBLINGS
|
||||||
|
#define RPL_CONF_DIO_INTERVAL_DOUBLINGS 8
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user