23 #include <netcomm/fawkes/client.h>
24 #include <netcomm/fawkes/client_handler.h>
25 #include <utils/system/argparser.h>
26 #include <utils/system/signal.h>
50 deregistered(
unsigned int id)
throw()
52 printf(
"Got deregistered\n");
63 if (m->payload_size() ==
sizeof(
unsigned int)) {
64 unsigned int *u = (
unsigned int *)m->payload();
65 printf(
"Received message of type %hu with payload u=%u\n", m->msgid(), *u);
67 printf(
"Received message of invalid size, ignoring\n");
73 connection_died(
unsigned int id)
throw()
75 printf(
"Connection died.\n");
80 connection_established(
unsigned int id)
throw()
82 printf(
"Connection established\n");
96 main(
int argc,
char **argv)
107 unsigned int *u = (
unsigned int *)malloc(
sizeof(
unsigned int));
110 if ((tmp = argp.
arg(
"n")) != NULL) {
117 if ((tmp = argp.
arg(
"i")) != NULL) {
129 c->
wait(FAWKES_CID_EXAMPLE_PLUGIN);