mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-22 10:30:13 +00:00
RPL: added callback for DIO interval update
This commit is contained in:
parent
2112dff217
commit
b6d599b712
@ -50,6 +50,11 @@
|
||||
#define DEBUG DEBUG_NONE
|
||||
#include "net/ip/uip-debug.h"
|
||||
|
||||
/* A configurable function called after update of the RPL DIO interval */
|
||||
#ifdef RPL_CALLBACK_NEW_DIO_INTERVAL
|
||||
void RPL_CALLBACK_NEW_DIO_INTERVAL(uint8_t dio_interval);
|
||||
#endif /* RPL_CALLBACK_NEW_DIO_INTERVAL */
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static struct ctimer periodic_timer;
|
||||
|
||||
@ -124,6 +129,10 @@ new_dio_interval(rpl_instance_t *instance)
|
||||
/* schedule the timer */
|
||||
PRINTF("RPL: Scheduling DIO timer %lu ticks in future (Interval)\n", ticks);
|
||||
ctimer_set(&instance->dio_timer, ticks, &handle_dio_timer, instance);
|
||||
|
||||
#ifdef RPL_CALLBACK_NEW_DIO_INTERVAL
|
||||
RPL_CALLBACK_NEW_DIO_INTERVAL(instance->dio_intcurrent);
|
||||
#endif /* RPL_CALLBACK_NEW_DIO_INTERVAL */
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
|
Loading…
Reference in New Issue
Block a user