tsch-log: fixed alignement of the log fields
This commit is contained in:
parent
822b408df3
commit
aaa8658e8d
@ -85,10 +85,10 @@ tsch_log_process_pending(void)
|
|||||||
while((log_index = ringbufindex_peek_get(&log_ringbuf)) != -1) {
|
while((log_index = ringbufindex_peek_get(&log_ringbuf)) != -1) {
|
||||||
struct tsch_log_t *log = &log_array[log_index];
|
struct tsch_log_t *log = &log_array[log_index];
|
||||||
if(log->link == NULL) {
|
if(log->link == NULL) {
|
||||||
printf("[INFO: TSCH-LOG ] {asn-%x.%lx link-NULL} ", log->asn.ms1b, log->asn.ls4b);
|
printf("[INFO: TSCH-LOG ] {asn %02x.%08lx link-NULL} ", log->asn.ms1b, log->asn.ls4b);
|
||||||
} else {
|
} else {
|
||||||
struct tsch_slotframe *sf = tsch_schedule_get_slotframe_by_handle(log->link->slotframe_handle);
|
struct tsch_slotframe *sf = tsch_schedule_get_slotframe_by_handle(log->link->slotframe_handle);
|
||||||
printf("[INFO: TSCH-LOG ] {asn-%x.%lx link-%u-%u-%u-%u ch-%u} ",
|
printf("[INFO: TSCH-LOG ] {asn %02x.%08lx link %2u %3u %3u %2u ch %2u} ",
|
||||||
log->asn.ms1b, log->asn.ls4b,
|
log->asn.ms1b, log->asn.ls4b,
|
||||||
log->link->slotframe_handle, sf ? sf->size.val : 0, log->link->timeslot, log->link->channel_offset,
|
log->link->slotframe_handle, sf ? sf->size.val : 0, log->link->timeslot, log->link->channel_offset,
|
||||||
tsch_calculate_channel(&log->asn, log->link->channel_offset));
|
tsch_calculate_channel(&log->asn, log->link->channel_offset));
|
||||||
@ -100,10 +100,10 @@ tsch_log_process_pending(void)
|
|||||||
log_lladdr_compact(&linkaddr_node_addr);
|
log_lladdr_compact(&linkaddr_node_addr);
|
||||||
printf("->");
|
printf("->");
|
||||||
log_lladdr_compact(&log->tx.dest);
|
log_lladdr_compact(&log->tx.dest);
|
||||||
printf(", len %u, seq %u, st %d %d",
|
printf(", len %3u, seq %3u, st %d %2d",
|
||||||
log->tx.datalen, log->tx.seqno, log->tx.mac_tx_status, log->tx.num_tx);
|
log->tx.datalen, log->tx.seqno, log->tx.mac_tx_status, log->tx.num_tx);
|
||||||
if(log->tx.drift_used) {
|
if(log->tx.drift_used) {
|
||||||
printf(", dr %d", log->tx.drift);
|
printf(", dr %3d", log->tx.drift);
|
||||||
}
|
}
|
||||||
printf("\n");
|
printf("\n");
|
||||||
break;
|
break;
|
||||||
@ -113,12 +113,14 @@ tsch_log_process_pending(void)
|
|||||||
log_lladdr_compact(&log->rx.src);
|
log_lladdr_compact(&log->rx.src);
|
||||||
printf("->");
|
printf("->");
|
||||||
log_lladdr_compact(log->rx.is_unicast ? &linkaddr_node_addr : NULL);
|
log_lladdr_compact(log->rx.is_unicast ? &linkaddr_node_addr : NULL);
|
||||||
printf(", len %u, seq %u",
|
printf(", len %3u, seq %3u",
|
||||||
log->rx.datalen, log->rx.seqno);
|
log->rx.datalen, log->rx.seqno);
|
||||||
|
printf(", edr %3d", (int)log->rx.estimated_drift);
|
||||||
if(log->rx.drift_used) {
|
if(log->rx.drift_used) {
|
||||||
printf(", dr %d", log->rx.drift);
|
printf(", dr %3d\n", log->rx.drift);
|
||||||
|
} else {
|
||||||
|
printf("\n");
|
||||||
}
|
}
|
||||||
printf(", edr %d\n", log->rx.estimated_drift);
|
|
||||||
break;
|
break;
|
||||||
case tsch_log_message:
|
case tsch_log_message:
|
||||||
printf("%s\n", log->message);
|
printf("%s\n", log->message);
|
||||||
|
Loading…
Reference in New Issue
Block a user