Added frame tracing (hex format) via debug switch

This commit is contained in:
Stefan Wahren
2012-05-15 22:57:03 +02:00
parent 4178ffceb1
commit 90aec91bff
10 changed files with 137 additions and 21 deletions

View File

@ -56,6 +56,12 @@ main(int argc, char **argv)
return 0;
}
if (debug)
{
mbus_register_send_event(&mbus_dump_send_event);
mbus_register_recv_event(&mbus_dump_recv_event);
}
if ((handle = mbus_connect_tcp(host, port)) == NULL)
{
fprintf(stderr, "Failed to setup connection to M-bus gateway\n");