47 int main(
int argc,
char *argv[]) {
50 fprintf(stderr,
"Usage: %s <file>\n", argv[0]);
55 FILE *testFile = fopen(argv[1],
"r");
56 if ((testFile == NULL) || errno) {
57 fprintf(stderr,
"Unable to open test file %s\n", argv[1]);
65 uint8_t sources[128] = {0};
66 uint8_t types[128] = {0};
68 while (!(feof(testFile) || exit == 1)) {
98 fprintf(stdout,
"%d messages read\n", count);
99 for (
int i = 0; i < 128; i++) {
100 if (sources[i] > 0) {
101 fprintf(stdout,
"%d messages read from source 0x%02x\n", sources[i], i);
104 for (
int i = 0; i < 128; i++) {
106 fprintf(stdout,
"%d messages read were of type 0x%02x\n", types[i], i);
int main(int argc, char *argv[])
void msg_destroy(msg_t *msg)
Destroy a message.
bool mp_readMessage(int handle, msg_t *out)
Static wrapper around mp_readMessage_buf.
msg_data_t data
Embedded data.
uint8_t type
Message type. Common types to be documented.
uint8_t source
Maps to a specific sensor unit or data source.
float value
Generic numerical data.