Skip to content
Snippets Groups Projects
Commit e6d5f22c authored by Cédric Roux's avatar Cédric Roux
Browse files

add message 1 to the T

This message sends configuration for all events.
parent d079dadb
No related branches found
No related tags found
No related merge requests found
......@@ -31,6 +31,7 @@ static void get_message(int s)
char t;
int l;
int id;
int is_on;
if (read(s, &t, 1) != 1) abort();
printf("got mess %d\n", t);
......@@ -45,6 +46,18 @@ printf("got mess %d\n", t);
l--;
}
break;
case 1:
/* set IDs as given */
/* optimize? */
if (read(s, &l, sizeof(int)) != sizeof(int)) abort();
id = 0;
while (l) {
if (read(s, &is_on, sizeof(int)) != sizeof(int)) abort();
T_IDs[id] = is_on;
id++;
l--;
}
break;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment