33 #include "dev/button-sensor.h"
38 #define COOJA_PORT 1234
40 PROCESS(test_uip_process,
"uIP test process");
41 AUTOSTART_PROCESSES(&test_uip_process);
49 printf(
"uIP test process started\n");
56 printf(
"An event occured: ");
58 if(ev == PROCESS_EVENT_EXIT) {
59 printf(
"shutting down\n");
63 if(ev == sensors_event && data == &button_sensor) {
64 printf(
"button clicked, sending packet\n");
69 }
else if(ev == sensors_event) {
70 printf(
"unknown sensor event: %s\n", ((
struct sensors_sensor *)data)->type);
72 printf(
"a packet was received, toggling leds\n");
74 leds_toggle(LEDS_ALL);
76 printf(
"unknown event: %d\n", ev);