RPL: added callback for DIO interval update
This commit is contained in:
parent
2112dff217
commit
b6d599b712
|
@ -50,6 +50,11 @@
|
||||||
#define DEBUG DEBUG_NONE
|
#define DEBUG DEBUG_NONE
|
||||||
#include "net/ip/uip-debug.h"
|
#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;
|
static struct ctimer periodic_timer;
|
||||||
|
|
||||||
|
@ -124,6 +129,10 @@ new_dio_interval(rpl_instance_t *instance)
|
||||||
/* schedule the timer */
|
/* schedule the timer */
|
||||||
PRINTF("RPL: Scheduling DIO timer %lu ticks in future (Interval)\n", ticks);
|
PRINTF("RPL: Scheduling DIO timer %lu ticks in future (Interval)\n", ticks);
|
||||||
ctimer_set(&instance->dio_timer, ticks, &handle_dio_timer, instance);
|
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
|
static void
|
||||||
|
|
Loading…
Reference in a new issue