[cansequence] add sequence wrap around counter
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>pull/254/head^2
parent
fb5903f226
commit
9841820ea0
|
|
@ -73,6 +73,7 @@ int main(int argc, char **argv)
|
||||||
};
|
};
|
||||||
char *interface = "can0";
|
char *interface = "can0";
|
||||||
unsigned char sequence = 0;
|
unsigned char sequence = 0;
|
||||||
|
int seq_wrap = 0;
|
||||||
int family = PF_CAN, type = SOCK_RAW, proto = CAN_RAW;
|
int family = PF_CAN, type = SOCK_RAW, proto = CAN_RAW;
|
||||||
int loopcount = 1, infinite = 1;
|
int loopcount = 1, infinite = 1;
|
||||||
int use_poll = 0;
|
int use_poll = 0;
|
||||||
|
|
@ -226,7 +227,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
sequence++;
|
sequence++;
|
||||||
if (verbose && !sequence)
|
if (verbose && !sequence)
|
||||||
printf("sequence wrap around\n");
|
printf("sequence wrap around (%d)\n", seq_wrap++);
|
||||||
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -272,7 +273,7 @@ int main(int argc, char **argv)
|
||||||
sequence++;
|
sequence++;
|
||||||
|
|
||||||
if (verbose && !sequence)
|
if (verbose && !sequence)
|
||||||
printf("sequence wrap around\n");
|
printf("sequence wrap around (%d)\n", seq_wrap++);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue