1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2025-04-21 12:27:27 +03:00

perdump: print relative receive timestamp

- perdump.h (struct result_ops), perdump.c (analyze, pcap_record): pass
  receive timestamp to reporter
- per-text.c (t_line, flush, text_undecided, text_packet): print relative
  receive timestamp before each packet
This commit is contained in:
Werner Almesberger
2011-01-19 19:34:16 -03:00
parent 6002759464
commit 6282c334bc
3 changed files with 18 additions and 10 deletions

View File

@@ -17,30 +17,34 @@
static char line[65] = "";
static double t_line;
static int packets = 0, garbled = 0, bad = 0, skipped = 0;
static int is_bad = 0;
static void flush(void)
{
if (*line)
if (*line) {
printf("%9.3f ", t_line);
printf("%s\n", line);
}
*line = 0;
}
static void text_undecided(int symbols)
static void text_undecided(int symbols, double t)
{
int i;
flush();
printf("%9.3f ", t);
for (i = 0; i != symbols/4; i++)
putchar('?');
putchar('\n');
}
static void text_packet(int symbols, int skip)
static void text_packet(int symbols, int skip, double t)
{
int i;
@@ -50,10 +54,11 @@ static void text_packet(int symbols, int skip)
for (i = 0; i != skip; i++)
putchar('\n');
else
printf("\n(%d)\n\n", skip);
printf("\n (%d)\n\n", skip);
for (i = 0; i != symbols/4; i++)
line[i] = '-';
line[i] = 0;
t_line = t;
packets++;
is_bad = 0;
}