mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
rpl: adjust to trickle enhancements
This commit is contained in:
parent
e0fbb14963
commit
04d89d3381
@ -156,14 +156,9 @@ extern "C" {
|
||||
#define GNRC_RPL_MSG_TYPE_LIFETIME_UPDATE (0x0900)
|
||||
|
||||
/**
|
||||
* @brief Message type for trickle intervals
|
||||
* @brief Message type for trickle
|
||||
*/
|
||||
#define GNRC_RPL_MSG_TYPE_TRICKLE_INTERVAL (0x0901)
|
||||
|
||||
/**
|
||||
* @brief Message type for trickle callbacks
|
||||
*/
|
||||
#define GNRC_RPL_MSG_TYPE_TRICKLE_CALLBACK (0x0902)
|
||||
#define GNRC_RPL_MSG_TYPE_TRICKLE_MSG (0x0901)
|
||||
|
||||
/**
|
||||
* @brief Message type for handling DAO sending
|
||||
|
@ -120,9 +120,9 @@ gnrc_rpl_instance_t *gnrc_rpl_root_init(uint8_t instance_id, ipv6_addr_t *dodag_
|
||||
dodag->dio_opts |= GNRC_RPL_REQ_DIO_OPT_PREFIX_INFO;
|
||||
#endif
|
||||
|
||||
trickle_start(gnrc_rpl_pid, &dodag->trickle, GNRC_RPL_MSG_TYPE_TRICKLE_INTERVAL,
|
||||
GNRC_RPL_MSG_TYPE_TRICKLE_CALLBACK, (1 << dodag->dio_min),
|
||||
dodag->dio_interval_doubl, dodag->dio_redun);
|
||||
trickle_start(gnrc_rpl_pid, &dodag->trickle, GNRC_RPL_MSG_TYPE_TRICKLE_MSG,
|
||||
(1 << dodag->dio_min), dodag->dio_interval_doubl,
|
||||
dodag->dio_redun);
|
||||
|
||||
return inst;
|
||||
}
|
||||
@ -216,15 +216,8 @@ static void *_event_loop(void *args)
|
||||
DEBUG("RPL: GNRC_RPL_MSG_TYPE_LIFETIME_UPDATE received\n");
|
||||
_update_lifetime();
|
||||
break;
|
||||
case GNRC_RPL_MSG_TYPE_TRICKLE_INTERVAL:
|
||||
DEBUG("RPL: GNRC_RPL_MSG_TYPE_TRICKLE_INTERVAL received\n");
|
||||
trickle = msg.content.ptr;
|
||||
if (trickle && (trickle->callback.func != NULL)) {
|
||||
trickle_interval(trickle);
|
||||
}
|
||||
break;
|
||||
case GNRC_RPL_MSG_TYPE_TRICKLE_CALLBACK:
|
||||
DEBUG("RPL: GNRC_RPL_MSG_TYPE_TRICKLE_CALLBACK received\n");
|
||||
case GNRC_RPL_MSG_TYPE_TRICKLE_MSG:
|
||||
DEBUG("RPL: GNRC_RPL_MSG_TYPE_TRICKLE_MSG received\n");
|
||||
trickle = msg.content.ptr;
|
||||
if (trickle && (trickle->callback.func != NULL)) {
|
||||
trickle_callback(trickle);
|
||||
|
@ -551,9 +551,9 @@ void gnrc_rpl_recv_DIO(gnrc_rpl_dio_t *dio, kernel_pid_t iface, ipv6_addr_t *src
|
||||
}
|
||||
|
||||
gnrc_rpl_delay_dao(dodag);
|
||||
trickle_start(gnrc_rpl_pid, &dodag->trickle, GNRC_RPL_MSG_TYPE_TRICKLE_INTERVAL,
|
||||
GNRC_RPL_MSG_TYPE_TRICKLE_CALLBACK, (1 << dodag->dio_min),
|
||||
dodag->dio_interval_doubl, dodag->dio_redun);
|
||||
trickle_start(gnrc_rpl_pid, &dodag->trickle, GNRC_RPL_MSG_TYPE_TRICKLE_MSG,
|
||||
(1 << dodag->dio_min), dodag->dio_interval_doubl,
|
||||
dodag->dio_redun);
|
||||
|
||||
gnrc_rpl_parent_update(dodag, parent);
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user