tsch-rpl: add tsch_rpl_check_dodag_joined function in tsch-rpl.
This commit is contained in:
parent
12f3686232
commit
666e4263cd
@ -136,5 +136,13 @@ tsch_rpl_callback_parent_switch(rpl_parent_t *old, rpl_parent_t *new)
|
|||||||
rpl_parent_get_ipaddr(new)));
|
rpl_parent_get_ipaddr(new)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/*---------------------------------------------------------------------------*/
|
||||||
|
/* Check RPL has joined DODAG.
|
||||||
|
* To use, set #define TSCH_RPL_CHECK_DODAG_JOINED tsch_rpl_check_dodag_joined */
|
||||||
|
int
|
||||||
|
tsch_rpl_check_dodag_joined(void)
|
||||||
|
{
|
||||||
|
return NETSTACK_ROUTING.node_has_joined();
|
||||||
|
}
|
||||||
#endif /* UIP_CONF_IPV6_RPL */
|
#endif /* UIP_CONF_IPV6_RPL */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
@ -79,6 +79,12 @@ void tsch_rpl_callback_new_dio_interval(clock_time_t dio_interval);
|
|||||||
* \param new The new RPL parent
|
* \param new The new RPL parent
|
||||||
*/
|
*/
|
||||||
void tsch_rpl_callback_parent_switch(rpl_parent_t *old, rpl_parent_t *new);
|
void tsch_rpl_callback_parent_switch(rpl_parent_t *old, rpl_parent_t *new);
|
||||||
|
/**
|
||||||
|
* \brief Check RPL has joined DODAG.
|
||||||
|
* To use, set TSCH_RPL_CHECK_DODAG_JOINED tsch_rpl_check_dodag_joined
|
||||||
|
* \return 1 if joined, 0 otherwise
|
||||||
|
*/
|
||||||
|
int tsch_rpl_check_dodag_joined(void);
|
||||||
|
|
||||||
#endif /* __TSCH_RPL_H__ */
|
#endif /* __TSCH_RPL_H__ */
|
||||||
/** @} */
|
/** @} */
|
||||||
|
Loading…
Reference in New Issue
Block a user