shell: sc_gnrc_rpl: adjust to trickle enhancements
This commit is contained in:
parent
04d89d3381
commit
9a62bb8307
@ -162,9 +162,9 @@ int _gnrc_rpl_trickle_start(char *arg1)
|
||||
return 1;
|
||||
}
|
||||
|
||||
trickle_start(gnrc_rpl_pid, &(inst->dodag.trickle), GNRC_RPL_MSG_TYPE_TRICKLE_INTERVAL,
|
||||
GNRC_RPL_MSG_TYPE_TRICKLE_CALLBACK, (1 << inst->dodag.dio_min),
|
||||
inst->dodag.dio_interval_doubl, inst->dodag.dio_redun);
|
||||
trickle_start(gnrc_rpl_pid, &(inst->dodag.trickle), GNRC_RPL_MSG_TYPE_TRICKLE_MSG,
|
||||
(1 << inst->dodag.dio_min), inst->dodag.dio_interval_doubl,
|
||||
inst->dodag.dio_redun);
|
||||
|
||||
printf("success: started trickle timer of DODAG (%s) from instance (%d)\n",
|
||||
ipv6_addr_to_str(addr_str, &(inst->dodag.dodag_id), sizeof(addr_str)),
|
||||
@ -258,7 +258,7 @@ int _gnrc_rpl_dodag_show(void)
|
||||
gnrc_rpl_dodag_t *dodag = NULL;
|
||||
char addr_str[IPV6_ADDR_MAX_STR_LEN];
|
||||
int8_t cleanup;
|
||||
uint64_t tc, ti, xnow = xtimer_now_usec64();
|
||||
uint64_t tc, xnow = xtimer_now_usec64();
|
||||
|
||||
for (uint8_t i = 0; i < GNRC_RPL_INSTANCES_NUMOF; ++i) {
|
||||
if (gnrc_rpl_instances[i].state == 0) {
|
||||
@ -272,23 +272,19 @@ int _gnrc_rpl_dodag_show(void)
|
||||
gnrc_rpl_instances[i].mop, gnrc_rpl_instances[i].of->ocp,
|
||||
gnrc_rpl_instances[i].min_hop_rank_inc, gnrc_rpl_instances[i].max_rank_inc);
|
||||
|
||||
tc = (((uint64_t) dodag->trickle.msg_callback_timer.long_target << 32)
|
||||
| dodag->trickle.msg_callback_timer.target) - xnow;
|
||||
tc = (((uint64_t) dodag->trickle.msg_timer.long_target << 32)
|
||||
| dodag->trickle.msg_timer.target) - xnow;
|
||||
tc = (int64_t) tc < 0 ? 0 : tc / US_PER_SEC;
|
||||
|
||||
ti = (((uint64_t) dodag->trickle.msg_interval_timer.long_target << 32)
|
||||
| dodag->trickle.msg_interval_timer.target) - xnow;
|
||||
ti = (int64_t) ti < 0 ? 0 : ti / US_PER_SEC;
|
||||
|
||||
cleanup = dodag->instance->cleanup < 0 ? 0 : dodag->instance->cleanup;
|
||||
|
||||
printf("\tdodag [%s | R: %d | OP: %s | PIO: %s | CL: %ds | "
|
||||
"TR(I=[%d,%d], k=%d, c=%d, TC=%" PRIu32 "s, TI=%" PRIu32 "s)]\n",
|
||||
"TR(I=[%d,%d], k=%d, c=%d, TC=%" PRIu32 "s)]\n",
|
||||
ipv6_addr_to_str(addr_str, &dodag->dodag_id, sizeof(addr_str)),
|
||||
dodag->my_rank, (dodag->node_status == GNRC_RPL_LEAF_NODE ? "Leaf" : "Router"),
|
||||
((dodag->dio_opts & GNRC_RPL_REQ_DIO_OPT_PREFIX_INFO) ? "on" : "off"),
|
||||
(int) cleanup, (1 << dodag->dio_min), dodag->dio_interval_doubl, dodag->trickle.k,
|
||||
dodag->trickle.c, (uint32_t) (tc & 0xFFFFFFFF), (uint32_t) (ti & 0xFFFFFFFF));
|
||||
dodag->trickle.c, (uint32_t) (tc & 0xFFFFFFFF));
|
||||
|
||||
#ifdef MODULE_GNRC_RPL_P2P
|
||||
if (dodag->instance->mop == GNRC_RPL_P2P_MOP) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user