From e6d5f22c8bbc9b2bebba514f47d488e11f95a1b5 Mon Sep 17 00:00:00 2001
From: Cedric Roux <cedric.roux@eurecom.fr>
Date: Sun, 1 May 2016 22:39:23 +0200
Subject: [PATCH] add message 1 to the T

This message sends configuration for all events.
---
 common/utils/T/T.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/common/utils/T/T.c b/common/utils/T/T.c
index 4876fe8652..541cd239b7 100644
--- a/common/utils/T/T.c
+++ b/common/utils/T/T.c
@@ -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;
   }
 }
 
-- 
2.26.2