Browse Source

sauvegarde

Sébastien DI MERCURIO 3 years ago
parent
commit
a1cd0af6ef
38 changed files with 3959 additions and 120 deletions
  1. 3
    1
      .gitignore
  2. 156
    0
      software/monitor/monitor/Client.cs
  3. 110
    0
      software/monitor/monitor/CommandManager.cs
  4. 420
    0
      software/monitor/monitor/DestijlCommandManager.cs
  5. 436
    0
      software/monitor/monitor/MonitorUI.cs
  6. 590
    67
      software/monitor/monitor/gtk-gui/MainWindow.cs
  7. 714
    45
      software/monitor/monitor/gtk-gui/gui.stetic
  8. 11
    0
      software/monitor/monitor/monitor.csproj
  9. BIN
      software/monitor/monitor/ressources/missing_picture.png
  10. BIN
      software/monitor/monitor/ressources/pan-down-symbolic.symbolic.png
  11. BIN
      software/monitor/monitor/ressources/pan-end-symbolic.symbolic.png
  12. BIN
      software/monitor/monitor/ressources/pan-start-symbolic.symbolic.png
  13. BIN
      software/monitor/monitor/ressources/pan-up-symbolic.symbolic.png
  14. BIN
      software/monitor/monitor/ressources/robot-icon.png
  15. BIN
      software/monitor/monitor/ressources/robot-icon.resized.png
  16. 1
    1
      software/raspberry/superviseur-robot/lib/definitions.h
  17. 11
    2
      software/raspberry/superviseur-robot/lib/image.h
  18. 0
    1
      software/raspberry/superviseur-robot/lib/robot.h
  19. 32
    1
      software/raspberry/superviseur-robot/lib/src/image.cpp
  20. 1
    1
      software/raspberry/superviseur-robot/superviseur/nbproject/private/private.xml
  21. 1
    1
      software/raspberry/superviseur-robot/superviseur/src/main.cpp
  22. 5
    0
      software/raspberry/testeur/testeur/.dep.inc
  23. 128
    0
      software/raspberry/testeur/testeur/Makefile
  24. 256
    0
      software/raspberry/testeur/testeur/main.cpp
  25. 107
    0
      software/raspberry/testeur/testeur/nbproject/Makefile-Debug.mk
  26. 107
    0
      software/raspberry/testeur/testeur/nbproject/Makefile-Release.mk
  27. 133
    0
      software/raspberry/testeur/testeur/nbproject/Makefile-impl.mk
  28. 35
    0
      software/raspberry/testeur/testeur/nbproject/Makefile-variables.mk
  29. 76
    0
      software/raspberry/testeur/testeur/nbproject/Package-Debug.bash
  30. 76
    0
      software/raspberry/testeur/testeur/nbproject/Package-Release.bash
  31. 180
    0
      software/raspberry/testeur/testeur/nbproject/configurations.xml
  32. 7
    0
      software/raspberry/testeur/testeur/nbproject/private/Makefile-variables.mk
  33. 75
    0
      software/raspberry/testeur/testeur/nbproject/private/c_standard_headers_indexer.c
  34. 74
    0
      software/raspberry/testeur/testeur/nbproject/private/configurations.xml
  35. 135
    0
      software/raspberry/testeur/testeur/nbproject/private/cpp_standard_headers_indexer.cpp
  36. 42
    0
      software/raspberry/testeur/testeur/nbproject/private/launcher.properties
  37. 7
    0
      software/raspberry/testeur/testeur/nbproject/private/private.xml
  38. 30
    0
      software/raspberry/testeur/testeur/nbproject/project.xml

+ 3
- 1
.gitignore View File

@@ -62,4 +62,6 @@ GUI
62 62
 # Android
63 63
 *.apk
64 64
 
65
-/software/raspberry/superviseur-robot/superviseur/dist/
65
+/software/raspberry/superviseur-robot/superviseur/dist/
66
+/software/raspberry/testeur/testeur/build/
67
+/software/raspberry/testeur/testeur/dist/

+ 156
- 0
software/monitor/monitor/Client.cs View File

@@ -0,0 +1,156 @@
1
+using System;
2
+using System.Net.Sockets;
3
+using System.Threading;
4
+using System.Text;
5
+
6
+namespace monitor
7
+{
8
+    public class ClientReadEvent
9
+    {
10
+        private static TcpClient myClient = null;
11
+        private static NetworkStream myStream = null;
12
+        private const int BufferMaxSize = 512;
13
+        private static byte[] buffer = new byte[BufferMaxSize];
14
+        private static StringBuilder sb = new StringBuilder();
15
+        private static int newLength = 1;
16
+
17
+        public delegate void ReadEvent(string str);
18
+        public static ReadEvent readEvent = null;
19
+
20
+        public static void Set(TcpClient client, NetworkStream stream)
21
+        {
22
+            myClient = client;
23
+            myStream = stream;
24
+        }
25
+
26
+        public static void ReadThread()
27
+        {
28
+            while (true)
29
+            {
30
+                if (myClient.Connected)
31
+                {
32
+                    myStream.BeginRead(buffer, 0, newLength, new AsyncCallback(ReadCallback), sb);
33
+                }
34
+                else Thread.Sleep(200);
35
+            }
36
+        }
37
+
38
+        public static void ReadCallback(IAsyncResult ar)
39
+        {
40
+
41
+        }
42
+    }
43
+
44
+    public class Client
45
+    {
46
+        public const string defaultIP = "localhost";
47
+        public const int defaultPort = 4500;
48
+
49
+        private static TcpClient client = null;
50
+        private static NetworkStream stream = null;
51
+
52
+        private const int BufferMaxSize = 512;
53
+        private static byte[] buffer = new byte[BufferMaxSize];
54
+        private static StringBuilder message = new StringBuilder();
55
+        private static int newLength = 1;
56
+
57
+        public delegate void ReadEvent(string msg);
58
+        public static ReadEvent readEvent = null;
59
+
60
+        public Client()
61
+        {
62
+        }
63
+
64
+        public static bool Open(string host)
65
+        {
66
+            return Client.Open(host, defaultPort);
67
+        }
68
+
69
+        public static bool Open(string host, int port)
70
+        {
71
+            bool status = true;
72
+
73
+            try
74
+            {
75
+                client = new TcpClient(host, port);
76
+
77
+                stream = client.GetStream();
78
+
79
+                stream.BeginRead(buffer, 0, newLength, new AsyncCallback(ReadCallback), message);
80
+            }
81
+            catch (ArgumentNullException e)
82
+            {
83
+                Console.WriteLine("ArgumentNullException: " + e);
84
+                status = false;
85
+            }
86
+            catch (SocketException e)
87
+            {
88
+                Console.WriteLine("SocketException: " + e.ToString());
89
+                status = false;
90
+            }
91
+            catch (Exception e) 
92
+            {
93
+                Console.WriteLine("Unknown Exception: " + e.ToString());
94
+                status = false;  
95
+            }
96
+
97
+            return status;
98
+        }
99
+
100
+        public static void Close() 
101
+        {
102
+            if (stream!=null) stream.Close();
103
+            if (client!=null) client.Close();
104
+        }
105
+
106
+        private static void ReadCallback(IAsyncResult ar)
107
+        {
108
+            if (client.Connected)
109
+            {
110
+                int bytesRead;
111
+
112
+                try 
113
+                {
114
+                    bytesRead = stream.EndRead(ar); 
115
+                }
116
+                catch (ObjectDisposedException e)
117
+                {
118
+                    Console.WriteLine("Connection to server dropped: " + e.ToString());
119
+                    return;
120
+                }
121
+
122
+                newLength = 1;
123
+
124
+                if (bytesRead > 0)
125
+                {
126
+                    message.Append(Encoding.ASCII.GetString(buffer, 0, bytesRead));
127
+                }
128
+
129
+                if (client.Available > 0)
130
+                {
131
+                    newLength = client.Available;
132
+                    if (newLength > BufferMaxSize) newLength = BufferMaxSize;
133
+                    else newLength = client.Available;
134
+                }
135
+                else
136
+                {
137
+                    readEvent?.Invoke(message.ToString());
138
+
139
+                    message.Clear();
140
+                }
141
+
142
+                stream.BeginRead(buffer, 0, newLength, new AsyncCallback(ReadCallback), message);
143
+            }
144
+        }
145
+
146
+        public static void Write(string mes)
147
+        {
148
+            if (client.Connected)
149
+            {
150
+                byte[] writeBuffer = Encoding.UTF8.GetBytes(mes);
151
+
152
+                stream.Write(writeBuffer, 0, mes.Length);
153
+            }
154
+        }
155
+    }
156
+}

+ 110
- 0
software/monitor/monitor/CommandManager.cs View File

@@ -0,0 +1,110 @@
1
+using System.Threading;
2
+
3
+namespace monitor
4
+{
5
+    public class CommandManager
6
+    {
7
+        public delegate void CommandReceivedEvent(string msg);
8
+        public CommandReceivedEvent commandReceivedEvent = null;
9
+
10
+        private System.Timers.Timer waitTimer = new System.Timers.Timer();
11
+        private ManualResetEvent waitEvent = new ManualResetEvent(false);
12
+
13
+        private bool waitForAcknowledge = false;
14
+
15
+        private string messageReceived = null;
16
+        private bool isBusy = false;
17
+
18
+        public enum CommandManagerStatus
19
+        {
20
+            AnswerReceived,
21
+            Timeout,
22
+            Busy
23
+        };
24
+
25
+        public CommandManager(CommandReceivedEvent callback)
26
+        {
27
+            Client.readEvent += this.OnMessageReception;
28
+
29
+            this.commandReceivedEvent += callback;
30
+            waitTimer.Elapsed += OnMessageTimeout;
31
+        }
32
+
33
+        ~CommandManager()
34
+        {
35
+            Client.Close();    
36
+        }
37
+
38
+        public bool Open(string hostname)
39
+        {
40
+            return this.Open(hostname, Client.defaultPort);
41
+        }
42
+
43
+        public bool Open(string hostname, int port)
44
+        {
45
+            return Client.Open(hostname, port);
46
+        }
47
+
48
+        public void Close()
49
+        {
50
+            Client.Close();
51
+        }
52
+
53
+        private void OnMessageReception(string message)
54
+        {
55
+            waitTimer.Stop();
56
+            this.messageReceived = message;
57
+            isBusy = false;
58
+
59
+            if (waitForAcknowledge) {
60
+                waitForAcknowledge = false;
61
+                waitEvent.Set(); // Envoi de l'evenement
62
+            }
63
+            else {
64
+                waitForAcknowledge = false;
65
+                this.commandReceivedEvent?.Invoke(message);
66
+            }
67
+        }
68
+
69
+        private void OnMessageTimeout(object sender, System.Timers.ElapsedEventArgs e)
70
+        {
71
+            messageReceived = null;
72
+            OnMessageReception(messageReceived);
73
+        }
74
+
75
+        public CommandManagerStatus SendCommand(string cmd, out string answer, double timeout)
76
+        {
77
+            CommandManagerStatus status = CommandManagerStatus.AnswerReceived;
78
+            answer = null;
79
+
80
+            if (isBusy) status = CommandManagerStatus.Busy;
81
+            else
82
+            {
83
+                isBusy = true;
84
+
85
+                Client.Write(cmd);
86
+
87
+                if (timeout > 0) // la commande attend un acquitement
88
+                {
89
+                    waitForAcknowledge = true;
90
+                    waitTimer.Interval = timeout;
91
+                    waitTimer.Start();
92
+
93
+                    waitEvent.WaitOne();
94
+                    waitEvent.Reset(); // remise à zero pour une prochaine commande
95
+
96
+                    if (this.messageReceived == null) // timeout: connection au serveur defectueuse
97
+                    {
98
+                        status = CommandManagerStatus.Timeout;
99
+                    }
100
+                }
101
+                else isBusy = false;
102
+
103
+                answer = this.messageReceived;
104
+                this.messageReceived = null;
105
+            }
106
+
107
+            return status;
108
+        }
109
+    }
110
+}

+ 420
- 0
software/monitor/monitor/DestijlCommandManager.cs View File

@@ -0,0 +1,420 @@
1
+using System;
2
+
3
+namespace monitor
4
+{
5
+    public class DestijlCommandList
6
+    {
7
+        public const string HeaderMtsComDmb = "COM";
8
+        public const string HeaderMtsDmbOrder = "DMB";
9
+        public const string HeaderMtsCamera = "CAM";
10
+        public const string HeaderMtsMessage = "MSG";
11
+
12
+        public const string DataComOpen = "o";
13
+        public const string DataComClose = "C";
14
+
15
+        public const string DataCamOpen = "A";
16
+        public const string DataCamClose = "I";
17
+        public const string DataCamAskArena = "y";
18
+        public const string DataCamArenaConfirm = "x";
19
+        public const string DataCamInfirm = "z";
20
+        public const string DataCamComputePosition = "p";
21
+        public const string DataCamStopComputePosition = "s";
22
+
23
+        public const string HeaderStmAck = "ACK";
24
+        public const string HeaderStmNoAck = "NAK";
25
+        public const string HeaderStmLostDmb = "LCD";
26
+        public const string HeaderStmImage = "IMG";
27
+        public const string HeaderStmPos = "POS";
28
+        public const string HeaderStmMes = "MSG";
29
+        public const string HeaderStmBat = "BAT";
30
+    }
31
+
32
+    public class RobotCommandList
33
+    {
34
+        public const string RobotPing = "p";
35
+        public const string RobotReset = "r";
36
+        public const string RobotStartWithoutWatchdog = "u";
37
+        public const string RobotStartWithWatchdog = "W";
38
+        public const string RobotGetBattery = "v";
39
+        public const string RobotGetBusyState = "b";
40
+        public const string RobotMove = "M";
41
+        public const string RobotTurn = "T";
42
+        public const string RobotGetVersion = "V";
43
+        public const string RobotPowerOff = "z";
44
+    }
45
+
46
+    public class DestijlCommandManager
47
+    {
48
+        private CommandManager commandManager = null;
49
+
50
+        private string receivedHeader = null;
51
+        private string receivedData = null;
52
+
53
+        public delegate void CommandReceivedEvent(string header, string data);
54
+        public CommandReceivedEvent commandReceivedEvent = null;
55
+
56
+        public double timeout = 100; // timeout pour les commandes avec acquitement
57
+
58
+        public enum CommandStatus
59
+        {
60
+            Success,
61
+            Rejected,
62
+            InvalidAnswer,
63
+            Busy,
64
+            CommunicationLostWithRobot,
65
+            CommunicationLostWithServer
66
+        }
67
+
68
+        public DestijlCommandManager(CommandReceivedEvent callback)
69
+        {
70
+            commandManager = new CommandManager(OnCommandReceived);
71
+            this.commandReceivedEvent += callback;
72
+        }
73
+
74
+        ~DestijlCommandManager()
75
+        {
76
+            if (commandManager != null) commandManager.Close();
77
+        }
78
+
79
+        private void OnCommandReceived(string msg)
80
+        {
81
+            string[] msgs = msg.Split(':');
82
+
83
+            if (msgs.Length >= 1) receivedHeader = msgs[0];
84
+            else receivedHeader = null;
85
+
86
+            if (msgs.Length >= 2) receivedData = msgs[1];
87
+            else receivedData = null;
88
+
89
+            this.commandReceivedEvent?.Invoke(receivedHeader, receivedData);
90
+        }
91
+
92
+        public bool Open(string hostname)
93
+        {
94
+            return this.Open(hostname, Client.defaultPort);
95
+        }
96
+
97
+        public bool Open(string hostname, int port)
98
+        {
99
+            if (commandManager != null) return commandManager.Open(hostname, port);
100
+            else return false;
101
+        }
102
+
103
+        public void Close()
104
+        {
105
+            if (commandManager != null) commandManager.Close();
106
+        }
107
+
108
+        private string CreateCommand(string header, string data)
109
+        {
110
+            return header + ":" + data;
111
+        }
112
+
113
+        private void SplitCommand(string cmd, out string header, out string data)
114
+        {
115
+            string[] cmdParts = cmd.Split(':');
116
+
117
+            if (cmdParts.Length > 0) header = cmdParts[0];
118
+            else header = null;
119
+
120
+            if (cmdParts.Length > 1) data = cmdParts[1];
121
+            else data = null;
122
+        }
123
+
124
+        private CommandStatus DecodeStatus(CommandManager.CommandManagerStatus localStatus, string answer)
125
+        {
126
+            CommandStatus status = CommandStatus.Success;
127
+
128
+            if (localStatus == CommandManager.CommandManagerStatus.Timeout) status = CommandStatus.CommunicationLostWithServer;
129
+            else if (localStatus == CommandManager.CommandManagerStatus.Busy) status = CommandStatus.Busy;
130
+            else
131
+            {
132
+                if (answer != null)
133
+                {
134
+                    if (answer.ToUpper().Contains(DestijlCommandList.HeaderStmNoAck)) status = CommandStatus.Rejected;
135
+                    else if (answer.ToUpper().Contains(DestijlCommandList.HeaderStmLostDmb)) status = CommandStatus.CommunicationLostWithRobot;
136
+                    else if (answer.ToUpper().Contains(DestijlCommandList.HeaderStmAck)) status = CommandStatus.Success;
137
+                    else if (answer.Length == 0) status = CommandStatus.CommunicationLostWithServer;
138
+                    else status = CommandStatus.InvalidAnswer;
139
+                }
140
+            }
141
+
142
+            return status;
143
+        }
144
+
145
+        public CommandStatus RobotOpenCom()
146
+        {
147
+            CommandManager.CommandManagerStatus localStatus;
148
+            string answer;
149
+
150
+            localStatus = commandManager.SendCommand(
151
+                CreateCommand(DestijlCommandList.HeaderMtsComDmb, DestijlCommandList.DataComOpen),
152
+                out answer,
153
+                this.timeout);
154
+
155
+            return DecodeStatus(localStatus, answer);
156
+        }
157
+
158
+        public CommandStatus RobotCloseCom()
159
+        {
160
+            CommandManager.CommandManagerStatus localStatus;
161
+            string answer;
162
+
163
+            localStatus = commandManager.SendCommand(
164
+                CreateCommand(DestijlCommandList.HeaderMtsComDmb, DestijlCommandList.DataComClose),
165
+                out answer,
166
+                this.timeout);
167
+
168
+            return DecodeStatus(localStatus, answer);
169
+        }
170
+
171
+        public CommandStatus RobotPing()
172
+        {
173
+            CommandManager.CommandManagerStatus localStatus;
174
+            string answer;
175
+
176
+            localStatus = commandManager.SendCommand(
177
+                CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotPing),
178
+                out answer,
179
+                this.timeout);
180
+
181
+            return DecodeStatus(localStatus, answer);
182
+        }
183
+
184
+        public CommandStatus RobotReset()
185
+        {
186
+            CommandManager.CommandManagerStatus localStatus;
187
+            string answer;
188
+
189
+            localStatus = commandManager.SendCommand(
190
+                CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotReset),
191
+                out answer,
192
+                0);
193
+
194
+            return DecodeStatus(localStatus, answer);
195
+        }
196
+
197
+        public CommandStatus RobotStartWithWatchdog()
198
+        {
199
+            CommandManager.CommandManagerStatus localStatus;
200
+            string answer;
201
+
202
+            localStatus = commandManager.SendCommand(
203
+                CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotStartWithWatchdog),
204
+                out answer,
205
+                this.timeout);
206
+
207
+            return DecodeStatus(localStatus, answer);
208
+        }
209
+
210
+        public CommandStatus RobotStartWithoutWatchdog()
211
+        {
212
+            CommandManager.CommandManagerStatus localStatus;
213
+            string answer;
214
+
215
+            localStatus = commandManager.SendCommand(
216
+                CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotStartWithoutWatchdog),
217
+                out answer,
218
+                this.timeout);
219
+
220
+            return DecodeStatus(localStatus, answer);
221
+        }
222
+
223
+        public CommandStatus RobotMove(int distance)
224
+        {
225
+            CommandManager.CommandManagerStatus localStatus;
226
+            string answer;
227
+
228
+            localStatus = commandManager.SendCommand(
229
+                CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotMove + "=" + distance),
230
+                out answer,
231
+                0);
232
+
233
+            return DecodeStatus(localStatus, answer);
234
+        }
235
+
236
+        public CommandStatus RobotTurn(int angle)
237
+        {
238
+            CommandManager.CommandManagerStatus localStatus;
239
+            string answer;
240
+
241
+            localStatus = commandManager.SendCommand(
242
+                CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotTurn + "=" + angle),
243
+                out answer,
244
+                0);
245
+
246
+            return DecodeStatus(localStatus, answer);
247
+        }
248
+
249
+        //public CommandStatus RobotGetBattery(out int battery)
250
+        public CommandStatus RobotGetBattery()
251
+        {
252
+            CommandManager.CommandManagerStatus localStatus;
253
+            //CommandStatus status = CommandStatus.Success;
254
+
255
+            //battery = -1;
256
+
257
+            string answer;
258
+
259
+            localStatus = commandManager.SendCommand(
260
+                CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotGetBattery),
261
+                out answer,
262
+                0);
263
+            
264
+            //if (localStatus == CommandManager.CommandManagerStatus.AnswerReceived) {
265
+            //    string[] msg = answer.Split(':');
266
+
267
+            //    if (msg.Length > 1)
268
+            //    {
269
+            //        try
270
+            //        {
271
+            //            battery = Convert.ToInt32(msg[1]);
272
+            //        }
273
+            //        catch (Exception) { }
274
+            //    }
275
+            //}
276
+            //else if (localStatus == CommandManager.CommandManagerStatus.Timeout)
277
+            //{
278
+            //    status = CommandStatus.CommunicationLostWithServer;
279
+            //}
280
+
281
+            //return status;
282
+            return DecodeStatus(localStatus, answer);
283
+        }
284
+
285
+        public CommandStatus RobotGetVersion(out string version)
286
+        {
287
+            CommandManager.CommandManagerStatus localStatus;
288
+            CommandStatus status = CommandStatus.Success;
289
+
290
+            version = "";
291
+
292
+            string answer;
293
+
294
+            localStatus = commandManager.SendCommand(
295
+                CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotGetVersion),
296
+                out answer,
297
+                this.timeout);
298
+
299
+            if (localStatus == CommandManager.CommandManagerStatus.AnswerReceived)
300
+            {
301
+                string[] msg = answer.Split(':');
302
+
303
+                if (msg.Length > 1)
304
+                {
305
+                    version = msg[1];
306
+                }
307
+            }
308
+            else if (localStatus == CommandManager.CommandManagerStatus.Timeout)
309
+            {
310
+                status = CommandStatus.CommunicationLostWithServer;
311
+            }
312
+
313
+            return status;
314
+        }
315
+
316
+        public CommandStatus RobotPowerOff()
317
+        {
318
+            CommandManager.CommandManagerStatus localStatus;
319
+            string answer;
320
+
321
+            localStatus = commandManager.SendCommand(
322
+                CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotPowerOff),
323
+                out answer,
324
+                0);
325
+
326
+            return DecodeStatus(localStatus, answer);
327
+        }
328
+
329
+        public CommandStatus CameraOpen()
330
+        {
331
+            CommandManager.CommandManagerStatus localStatus;
332
+            string answer;
333
+
334
+            localStatus = commandManager.SendCommand(
335
+                CreateCommand(DestijlCommandList.HeaderMtsCamera, DestijlCommandList.DataCamOpen),
336
+                out answer,
337
+                this.timeout);
338
+
339
+            return DecodeStatus(localStatus, answer);
340
+        }
341
+
342
+        public CommandStatus CameraClose()
343
+        {
344
+            CommandManager.CommandManagerStatus localStatus;
345
+            string answer;
346
+
347
+            localStatus = commandManager.SendCommand(
348
+                CreateCommand(DestijlCommandList.HeaderMtsCamera, DestijlCommandList.DataCamClose),
349
+                out answer,
350
+                0);
351
+
352
+            return DecodeStatus(localStatus, answer);
353
+        }
354
+
355
+        public CommandStatus CameraAskArena()
356
+        {
357
+            CommandManager.CommandManagerStatus localStatus;
358
+            string answer;
359
+
360
+            localStatus = commandManager.SendCommand(
361
+                CreateCommand(DestijlCommandList.HeaderMtsCamera, DestijlCommandList.DataCamAskArena),
362
+                out answer,
363
+                0);
364
+
365
+            return DecodeStatus(localStatus, answer);
366
+        }
367
+
368
+        public CommandStatus CameraArenaConfirm()
369
+        {
370
+            CommandManager.CommandManagerStatus localStatus;
371
+            string answer;
372
+
373
+            localStatus = commandManager.SendCommand(
374
+                CreateCommand(DestijlCommandList.HeaderMtsCamera, DestijlCommandList.DataCamArenaConfirm),
375
+                out answer,
376
+                0);
377
+
378
+            return DecodeStatus(localStatus, answer);
379
+        }
380
+
381
+        public CommandStatus CameraArenaInfirm()
382
+        {
383
+            CommandManager.CommandManagerStatus localStatus;
384
+            string answer;
385
+
386
+            localStatus = commandManager.SendCommand(
387
+                CreateCommand(DestijlCommandList.HeaderMtsCamera, DestijlCommandList.DataCamInfirm),
388
+                out answer,
389
+                0);
390
+
391
+            return DecodeStatus(localStatus, answer);
392
+        }
393
+
394
+        public CommandStatus CameraComputePosition()
395
+        {
396
+            CommandManager.CommandManagerStatus localStatus;
397
+            string answer;
398
+
399
+            localStatus = commandManager.SendCommand(
400
+                CreateCommand(DestijlCommandList.HeaderMtsCamera, DestijlCommandList.DataCamComputePosition),
401
+                out answer,
402
+                0);
403
+
404
+            return DecodeStatus(localStatus, answer);
405
+        }
406
+
407
+        public CommandStatus CameraStopComputePosition()
408
+        {
409
+            CommandManager.CommandManagerStatus localStatus;
410
+            string answer;
411
+
412
+            localStatus = commandManager.SendCommand(
413
+                CreateCommand(DestijlCommandList.HeaderMtsCamera, DestijlCommandList.DataCamStopComputePosition),
414
+                out answer,
415
+                0);
416
+
417
+            return DecodeStatus(localStatus, answer);
418
+        }
419
+    }
420
+}

+ 436
- 0
software/monitor/monitor/MonitorUI.cs View File

@@ -1,16 +1,452 @@
1 1
 using System;
2 2
 using Gtk;
3
+using Gdk;
4
+
5
+using monitor;
3 6
 
4 7
 public partial class MainWindow : Gtk.Window
5 8
 {
9
+    private DestijlCommandManager cmdManager;
10
+    private Pixbuf drawingareaCameraPixbuf;
11
+
12
+    enum SystemState
13
+    {
14
+        NotConnected,
15
+        ServerConnected,
16
+        RobotConnected
17
+    };
18
+
19
+    private SystemState systemState = SystemState.NotConnected;
20
+    private System.Timers.Timer batteryTimer;
21
+
6 22
     public MainWindow() : base(Gtk.WindowType.Toplevel)
7 23
     {
8 24
         Build();
25
+       
26
+        cmdManager = new DestijlCommandManager(OnCommandReceivedEvent);
27
+
28
+        batteryTimer = new System.Timers.Timer(10000.0);
29
+        batteryTimer.Elapsed += OnBatteryTimerElapsed;
30
+
31
+        AdjustControls();
32
+    }
33
+
34
+    public void AdjustControls()
35
+    {
36
+        ChangeState(SystemState.NotConnected);
37
+
38
+        drawingareaCameraPixbuf = new Pixbuf((string)null);
39
+        drawingareaCameraPixbuf = Pixbuf.LoadFromResource("monitor.ressources.missing_picture.png");
40
+
41
+        entryServerName.Text = Client.defaultIP;
42
+        entryServerPort.Text = Client.defaultPort.ToString();
43
+        entryTimeout.Text = "10000";
44
+    }
45
+
46
+    private void ChangeState(SystemState newState)
47
+    {
48
+        switch (newState)
49
+        {
50
+            case SystemState.NotConnected:
51
+                labelRobot.Sensitive = false;
52
+                gtkAlignmentRobot.Sensitive = false;
53
+
54
+                labelRobotControl.Sensitive = false;
55
+                gtkAlignmentRobotControl.Sensitive = false;
56
+                boxCamera.Sensitive = false;
57
+
58
+                buttonServerConnection.Label = "Connect";
59
+                buttonRobotActivation.Label = "Activate";
60
+                labelBatteryLevel.Text = "Unknown";
61
+
62
+                checkButtonCameraOn.Active = false;
63
+                checkButtonRobotPosition.Active = false;
64
+                if (cmdManager != null) cmdManager.Close();
65
+
66
+                batteryTimer.Stop();
67
+                break;
68
+            case SystemState.ServerConnected:
69
+                buttonServerConnection.Label = "Disconnect";
70
+                buttonRobotActivation.Label = "Activate";
71
+                labelBatteryLevel.Text = "Unknown";
72
+
73
+                labelRobot.Sensitive = true;
74
+                gtkAlignmentRobot.Sensitive = true;
75
+                boxCamera.Sensitive = true;
76
+
77
+                labelRobotControl.Sensitive = false;
78
+                gtkAlignmentRobotControl.Sensitive = false;
79
+
80
+                batteryTimer.Stop();
81
+                break;
82
+            case SystemState.RobotConnected:
83
+                buttonRobotActivation.Label = "Reset";
84
+                labelRobotControl.Sensitive = true;
85
+                gtkAlignmentRobotControl.Sensitive = true;
86
+
87
+                batteryTimer.Start();
88
+                break;
89
+            default:
90
+                labelRobot.Sensitive = false;
91
+                gtkAlignmentRobot.Sensitive = false;
92
+
93
+                labelRobotControl.Sensitive = false;
94
+                gtkAlignmentRobotControl.Sensitive = false;
95
+                boxCamera.Sensitive = false;
96
+
97
+                buttonServerConnection.Label = "Connect";
98
+                buttonRobotActivation.Label = "Activate";
99
+                labelBatteryLevel.Text = "Unknown";
100
+
101
+                checkButtonCameraOn.Active = false;
102
+                checkButtonRobotPosition.Active = false;
103
+
104
+                systemState = SystemState.NotConnected;
105
+
106
+                return;
107
+        }
108
+
109
+        systemState = newState;
110
+    }
111
+
112
+    private void MessagePopup(MessageType type, ButtonsType buttons, string title, string message)
113
+    {
114
+        MessageDialog md = new MessageDialog(this, DialogFlags.DestroyWithParent, type, buttons, message)
115
+        {
116
+            Title = title
117
+        };
118
+
119
+        md.Run();
120
+        md.Destroy();
9 121
     }
10 122
 
11 123
     protected void OnDeleteEvent(object sender, DeleteEventArgs a)
12 124
     {
125
+        Console.WriteLine("Bye bye");
126
+
127
+        if (cmdManager != null) cmdManager.Close();
13 128
         Application.Quit();
14 129
         a.RetVal = true;
15 130
     }
131
+
132
+    public void OnCommandReceivedEvent(string header, string data)
133
+    {
134
+        if (header != null) Console.WriteLine("Received header (" + header.Length + "): " + header);
135
+        if (data != null) Console.WriteLine("Received data (" + data.Length + "): " + data);
136
+
137
+        if (header.ToUpper() == DestijlCommandList.HeaderStmBat)
138
+        {
139
+            switch (data[0])
140
+            {
141
+                case '2':
142
+                    labelBatteryLevel.Text = "High";
143
+                    break;
144
+                case '1':
145
+                    labelBatteryLevel.Text = "Low";
146
+                    break;
147
+                case '0':
148
+                    labelBatteryLevel.Text = "Empty";
149
+                    break;
150
+                default:
151
+                    labelBatteryLevel.Text = "Invalid value";
152
+                    break;
153
+            }
154
+        }
155
+    }
156
+
157
+    protected void OnQuitActionActivated(object sender, EventArgs e)
158
+    {
159
+        Console.WriteLine("Bye bye 2");
160
+        if (cmdManager != null) cmdManager.Close();
161
+        this.Destroy();
162
+        Application.Quit();
163
+    }
164
+
165
+    protected void OnShowLogWindowActionActivated(object sender, EventArgs e)
166
+    {
167
+        MessagePopup(MessageType.Info,
168
+                     ButtonsType.Ok, "Info",
169
+                     "Logger not yet implemented");
170
+    }
171
+
172
+    protected void OnButtonServerConnectionClicked(object sender, EventArgs e)
173
+    {
174
+        DestijlCommandManager.CommandStatus statusCmd;
175
+
176
+        if (buttonServerConnection.Label == "Disconnect")
177
+        {
178
+            ChangeState(SystemState.NotConnected);
179
+        }
180
+        else
181
+        {
182
+            if ((entryServerName.Text == "") || (entryServerPort.Text == ""))
183
+            {
184
+                MessagePopup(MessageType.Error,
185
+                             ButtonsType.Ok, "Error",
186
+                             "Server name or port is invalid");
187
+            }
188
+            else
189
+            {
190
+                Console.WriteLine("Connecting to " + entryServerName.Text + ":" + entryServerPort.Text);
191
+                bool status = false;
192
+
193
+                try 
194
+                {
195
+                    cmdManager.timeout = Convert.ToDouble(entryTimeout.Text);    
196
+                }
197
+                catch (Exception)
198
+                {
199
+                    cmdManager.timeout = 100;
200
+                    entryTimeout.Text = cmdManager.timeout.ToString();
201
+                }
202
+
203
+                try
204
+                {
205
+                    status = cmdManager.Open(entryServerName.Text, Convert.ToInt32(entryServerPort.Text));
206
+                }
207
+                catch (Exception)
208
+                {
209
+                    Console.WriteLine("Something went wrong during connection");
210
+                    return;
211
+                }
212
+
213
+                if (status != true)
214
+                {
215
+                    MessagePopup(MessageType.Error,
216
+                                 ButtonsType.Ok, "Error",
217
+                                 "Unable to connect to server " + entryServerName.Text + ":" + Convert.ToInt32(entryServerPort.Text));
218
+                }
219
+                else
220
+                {
221
+                    Console.Write("Send command RobotOpenCom: ");
222
+                    statusCmd = cmdManager.RobotOpenCom();
223
+                    Console.WriteLine(statusCmd.ToString());
224
+
225
+                    if (statusCmd == DestijlCommandManager.CommandStatus.Success)
226
+                    {
227
+                        ChangeState(SystemState.ServerConnected);
228
+                    }
229
+                    else
230
+                    {
231
+                        MessagePopup(MessageType.Error,
232
+                                     ButtonsType.Ok, "Error",
233
+                                     "Unable to open communication with robot.\nCheck that supervisor is accepting OPEN_COM_DMB command");
234
+
235
+                        cmdManager.Close();
236
+                    }
237
+                }
238
+            }
239
+        }
240
+    }
241
+
242
+    protected void OnButtonRobotActivationClicked(object sender, EventArgs e)
243
+    {
244
+        DestijlCommandManager.CommandStatus status;
245
+
246
+        if (buttonRobotActivation.Label == "Activate") // activation du robot
247
+        {
248
+            if (radioButtonWithWatchdog.Active) // Demarrage avec watchdog
249
+            {
250
+                status = cmdManager.RobotStartWithWatchdog();
251
+            }
252
+            else // Demarrage sans watchdog
253
+            {
254
+                status = cmdManager.RobotStartWithoutWatchdog();
255
+            }
256
+
257
+            if (status == DestijlCommandManager.CommandStatus.Success)
258
+            {
259
+                ChangeState(SystemState.RobotConnected);
260
+            }
261
+            else
262
+            {
263
+                if (status == DestijlCommandManager.CommandStatus.CommunicationLostWithServer)
264
+                {
265
+                    MessagePopup(MessageType.Error, ButtonsType.Ok, "Error", "Connection lost with server");
266
+                    ChangeState(SystemState.NotConnected);
267
+                }
268
+                else
269
+                {
270
+                    MessagePopup(MessageType.Error, ButtonsType.Ok, "Error", "Command rejected\nCheck that supervisor accept \nDMB_START_WITH_WD and/or DMB_START_WITHOUT_WD");
271
+                }
272
+            }
273
+        }
274
+        else // Reset du robot
275
+        {
276
+            status = cmdManager.RobotReset();
277
+
278
+            if (status == DestijlCommandManager.CommandStatus.Success)
279
+            {
280
+                ChangeState(SystemState.ServerConnected);
281
+            }
282
+            else
283
+            {
284
+                if (status == DestijlCommandManager.CommandStatus.CommunicationLostWithServer)
285
+                {
286
+                    MessagePopup(MessageType.Error, ButtonsType.Ok, "Error", "Connection lost with server");
287
+                    ChangeState(SystemState.NotConnected);
288
+                }
289
+                else
290
+                {
291
+                    MessagePopup(MessageType.Error, ButtonsType.Ok, "Error", "Unknown error");
292
+                }
293
+            }
294
+        }
295
+    }
296
+
297
+    protected void OnButtonMouvClicked(object sender, EventArgs e)
298
+    {
299
+        if (sender == buttonRight)
300
+        {
301
+            cmdManager.RobotTurn(90);
302
+
303
+        }
304
+        else if (sender == buttonLeft)
305
+        {
306
+            cmdManager.RobotTurn(-90);
307
+        }
308
+        else if (sender == buttonForward)
309
+        {
310
+            cmdManager.RobotMove(100);
311
+        }
312
+        else if (sender == buttonDown)
313
+        {
314
+            cmdManager.RobotMove(-100);
315
+        }
316
+        else
317
+        {
318
+            MessagePopup(MessageType.Warning, ButtonsType.Ok, "Abnormal behavior", "Callback OnButtonMouvClicked called by unknown sender");
319
+        }
320
+    }
321
+
322
+    void OnBatteryTimerElapsed(object sender, System.Timers.ElapsedEventArgs e)
323
+    {
324
+        DestijlCommandManager.CommandStatus status;
325
+        //int batteryLevel;
326
+
327
+        batteryTimer.Stop();
328
+
329
+        if (checkButtonGetBattery.Active)
330
+        {
331
+            //status = cmdManager.RobotGetBattery(out batteryLevel);
332
+            status = cmdManager.RobotGetBattery();
333
+            switch (status)
334
+            {
335
+                case DestijlCommandManager.CommandStatus.Success:
336
+                    /*switch (batteryLevel)
337
+                    {
338
+                        case 2:
339
+                            labelBatteryLevel.Text = "High";
340
+                            break;
341
+                        case 1:
342
+                            labelBatteryLevel.Text = "Low";
343
+                            break;
344
+                        case 0:
345
+                            labelBatteryLevel.Text = "Empty";
346
+                            break;
347
+                        default:
348
+                            labelBatteryLevel.Text = "Unknown";
349
+                            break;
350
+                    }*/
351
+
352
+                    batteryTimer.Start();
353
+                    break;
354
+                case DestijlCommandManager.CommandStatus.CommunicationLostWithServer:
355
+                    //MessagePopup(MessageType.Error, ButtonsType.Ok, "Error", "Connection lost with server");
356
+                    Console.WriteLine("Error: Connection lost with server");
357
+                    batteryTimer.Stop();
358
+                    labelBatteryLevel.Text = "Unknown";
359
+
360
+                    ChangeState(SystemState.NotConnected);
361
+                    break;
362
+                case DestijlCommandManager.CommandStatus.CommunicationLostWithRobot:
363
+                    //MessagePopup(MessageType.Error, ButtonsType.Ok, "Error", "Connection lost with robot");
364
+                    Console.WriteLine("Error: Connection lost with robot");
365
+                    batteryTimer.Stop();
366
+                    labelBatteryLevel.Text = "Unknown";
367
+
368
+                    ChangeState(SystemState.ServerConnected);
369
+                    break;
370
+                default:
371
+                    labelBatteryLevel.Text = "Unknown";
372
+                    batteryTimer.Start();
373
+                    break;
374
+            }
375
+        }
376
+        else batteryTimer.Start();
377
+    }
378
+
379
+    protected void OnCheckButtonCameraOnClicked(object sender, EventArgs e)
380
+    {
381
+        if (!checkButtonCameraOn.Active)
382
+        {
383
+            if (cmdManager.CameraClose() != DestijlCommandManager.CommandStatus.Success)
384
+            {
385
+                MessagePopup(MessageType.Error,
386
+                             ButtonsType.Ok, "Error",
387
+                             "Error when closing camera: bad answer for supervisor or timeout");
388
+            }
389
+        }
390
+        else
391
+        {
392
+            if (cmdManager.CameraOpen() != DestijlCommandManager.CommandStatus.Success)
393
+            {
394
+                MessagePopup(MessageType.Error,
395
+                             ButtonsType.Ok, "Error",
396
+                             "Error when opening camera: bad answer for supervisor or timeout");
397
+                checkButtonCameraOn.Active = false;
398
+            }
399
+        }
400
+    }
401
+
402
+    protected void OnCheckButtonRobotPositionClicked(object sender, EventArgs e)
403
+    {
404
+        if (!checkButtonRobotPosition.Active)
405
+        {
406
+            if (cmdManager.CameraStopComputePosition() != DestijlCommandManager.CommandStatus.Success)
407
+            {
408
+                MessagePopup(MessageType.Error,
409
+                             ButtonsType.Ok, "Error",
410
+                             "Error when stopping position reception: bad answer for supervisor or timeout");
411
+            }
412
+        }
413
+        else
414
+        {
415
+            if (cmdManager.CameraComputePosition() != DestijlCommandManager.CommandStatus.Success)
416
+            {
417
+                MessagePopup(MessageType.Error,
418
+                             ButtonsType.Ok, "Error",
419
+                             "Error when starting getting robot position: bad answer for supervisor or timeout");
420
+
421
+                checkButtonRobotPosition.Active = false;
422
+            }
423
+        }
424
+    }
425
+
426
+    protected void OnDrawingAreaCameraRealized(object sender, EventArgs e)
427
+    {
428
+        Console.WriteLine("Event realized. Args = " + e.ToString());
429
+    }
430
+
431
+    protected void OnDrawingAreaCameraExposeEvent(object o, ExposeEventArgs args)
432
+    {
433
+        //Console.WriteLine("Event expose. Args = " + args.ToString());
434
+
435
+        DrawingArea area = (DrawingArea)o;
436
+        Gdk.GC gc = area.Style.BackgroundGC(Gtk.StateType.Normal);
437
+
438
+        area.GdkWindow.GetSize(out int areaWidth, out int areaHeight);
439
+
440
+        area.GdkWindow.DrawPixbuf(gc, drawingareaCameraPixbuf,
441
+                                  0, 0,
442
+                                  (areaWidth - drawingareaCameraPixbuf.Width) / 2,
443
+                                  (areaHeight - drawingareaCameraPixbuf.Height) / 2,
444
+                                  drawingareaCameraPixbuf.Width, drawingareaCameraPixbuf.Height,
445
+                                  RgbDither.Normal, 0, 0);
446
+    }
447
+
448
+    protected void OnDrawingAreaCameraConfigureEvent(object o, ConfigureEventArgs args)
449
+    {
450
+        //Console.WriteLine("Event configure. Args = " + args.ToString());
451
+    }
16 452
 }

+ 590
- 67
software/monitor/monitor/gtk-gui/MainWindow.cs View File

@@ -5,27 +5,119 @@ public partial class MainWindow
5 5
 {
6 6
 	private global::Gtk.UIManager UIManager;
7 7
 
8
+	private global::Gtk.Action FileAction;
9
+
10
+	private global::Gtk.Action QuitAction;
11
+
12
+	private global::Gtk.Action LogAction;
13
+
14
+	private global::Gtk.Action ShowLogWindowAction;
15
+
8 16
 	private global::Gtk.VBox vbox1;
9 17
 
10
-	private global::Gtk.MenuBar menubar1;
18
+	private global::Gtk.MenuBar menuBar;
11 19
 
12 20
 	private global::Gtk.HBox hbox1;
13 21
 
14
-	private global::Gtk.DrawingArea drawingarea1;
22
+	private global::Gtk.VBox boxCamera;
23
+
24
+	private global::Gtk.DrawingArea drawingAreaCamera;
15 25
 
16 26
 	private global::Gtk.Alignment alignment1;
17 27
 
18
-	private global::Gtk.ScrolledWindow GtkScrolledWindow;
28
+	private global::Gtk.HBox hbox2;
29
+
30
+	private global::Gtk.CheckButton checkButtonCameraOn;
31
+
32
+	private global::Gtk.CheckButton checkButtonRobotPosition;
33
+
34
+	private global::Gtk.HBox hbox3;
35
+
36
+	private global::Gtk.VSeparator vseparator1;
37
+
38
+	private global::Gtk.Alignment alignment3;
39
+
40
+	private global::Gtk.VBox vbox5;
41
+
42
+	private global::Gtk.VBox vbox10;
43
+
44
+	private global::Gtk.Label labelServer;
45
+
46
+	private global::Gtk.Alignment gtkAlignmentServer;
47
+
48
+	private global::Gtk.VBox vbox6;
49
+
50
+	private global::Gtk.Table table1;
51
+
52
+	private global::Gtk.Entry entryServerName;
53
+
54
+	private global::Gtk.Entry entryServerPort;
55
+
56
+	private global::Gtk.Entry entryTimeout;
57
+
58
+	private global::Gtk.Label label1;
59
+
60
+	private global::Gtk.Label label2;
61
+
62
+	private global::Gtk.Label label5;
63
+
64
+	private global::Gtk.Button buttonServerConnection;
65
+
66
+	private global::Gtk.HSeparator hseparator1;
67
+
68
+	private global::Gtk.VBox vbox11;
19 69
 
20
-	private global::Gtk.Frame frame1;
70
+	private global::Gtk.Label labelRobot;
21 71
 
22
-	private global::Gtk.Fixed fixed4;
72
+	private global::Gtk.Alignment alignment9;
23 73
 
24
-	private global::Gtk.Button button7;
74
+	private global::Gtk.Alignment gtkAlignmentRobot;
25 75
 
26
-	private global::Gtk.Label GtkLabel2;
76
+	private global::Gtk.VBox vbox8;
27 77
 
28
-	private global::Gtk.Statusbar statusbar1;
78
+	private global::Gtk.Alignment alignment6;
79
+
80
+	private global::Gtk.HBox hbox4;
81
+
82
+	private global::Gtk.RadioButton radioButtonWithWatchdog;
83
+
84
+	private global::Gtk.RadioButton radioButtonWithoutWatchdog;
85
+
86
+	private global::Gtk.Alignment alignment5;
87
+
88
+	private global::Gtk.Alignment alignment7;
89
+
90
+	private global::Gtk.Button buttonRobotActivation;
91
+
92
+	private global::Gtk.HSeparator hseparator2;
93
+
94
+	private global::Gtk.VBox vbox12;
95
+
96
+	private global::Gtk.Label labelRobotControl;
97
+
98
+	private global::Gtk.Alignment gtkAlignmentRobotControl;
99
+
100
+	private global::Gtk.VBox vbox9;
101
+
102
+	private global::Gtk.Alignment alignment8;
103
+
104
+	private global::Gtk.Table table4;
105
+
106
+	private global::Gtk.Button buttonDown;
107
+
108
+	private global::Gtk.Button buttonForward;
109
+
110
+	private global::Gtk.Button buttonLeft;
111
+
112
+	private global::Gtk.Button buttonRight;
113
+
114
+	private global::Gtk.Table table3;
115
+
116
+	private global::Gtk.Label label3;
117
+
118
+	private global::Gtk.Label labelBatteryLevel;
119
+
120
+	private global::Gtk.CheckButton checkButtonGetBattery;
29 121
 
30 122
 	protected virtual void Build()
31 123
 	{
@@ -33,21 +125,37 @@ public partial class MainWindow
33 125
 		// Widget MainWindow
34 126
 		this.UIManager = new global::Gtk.UIManager();
35 127
 		global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup("Default");
128
+		this.FileAction = new global::Gtk.Action("FileAction", global::Mono.Unix.Catalog.GetString("File"), null, null);
129
+		this.FileAction.IsImportant = true;
130
+		this.FileAction.ShortLabel = global::Mono.Unix.Catalog.GetString("File");
131
+		w1.Add(this.FileAction, null);
132
+		this.QuitAction = new global::Gtk.Action("QuitAction", global::Mono.Unix.Catalog.GetString("Quit..."), null, null);
133
+		this.QuitAction.IsImportant = true;
134
+		this.QuitAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Quit");
135
+		w1.Add(this.QuitAction, "<Primary><Mod2>q");
136
+		this.LogAction = new global::Gtk.Action("LogAction", global::Mono.Unix.Catalog.GetString("Log"), null, null);
137
+		this.LogAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Log");
138
+		w1.Add(this.LogAction, null);
139
+		this.ShowLogWindowAction = new global::Gtk.Action("ShowLogWindowAction", global::Mono.Unix.Catalog.GetString("Show log window"), null, null);
140
+		this.ShowLogWindowAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Show log window");
141
+		w1.Add(this.ShowLogWindowAction, "<Primary><Mod2>s");
36 142
 		this.UIManager.InsertActionGroup(w1, 0);
37 143
 		this.AddAccelGroup(this.UIManager.AccelGroup);
38 144
 		this.Name = "MainWindow";
39 145
 		this.Title = global::Mono.Unix.Catalog.GetString("Monitor UI");
146
+		this.Icon = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.robot-icon.resized.png");
40 147
 		this.WindowPosition = ((global::Gtk.WindowPosition)(4));
148
+		this.BorderWidth = ((uint)(5));
41 149
 		// Container child MainWindow.Gtk.Container+ContainerChild
42 150
 		this.vbox1 = new global::Gtk.VBox();
43 151
 		this.vbox1.Name = "vbox1";
44 152
 		this.vbox1.Spacing = 6;
45 153
 		// Container child vbox1.Gtk.Box+BoxChild
46
-		this.UIManager.AddUiFromString("<ui><menubar name=\'menubar1\'/></ui>");
47
-		this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1")));
48
-		this.menubar1.Name = "menubar1";
49
-		this.vbox1.Add(this.menubar1);
50
-		global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
154
+		this.UIManager.AddUiFromString(@"<ui><menubar name='menuBar'><menu name='FileAction' action='FileAction'><menuitem name='QuitAction' action='QuitAction'/></menu><menu name='LogAction' action='LogAction'><menuitem name='ShowLogWindowAction' action='ShowLogWindowAction'/></menu></menubar></ui>");
155
+		this.menuBar = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menuBar")));
156
+		this.menuBar.Name = "menuBar";
157
+		this.vbox1.Add(this.menuBar);
158
+		global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.menuBar]));
51 159
 		w2.Position = 0;
52 160
 		w2.Expand = false;
53 161
 		w2.Fill = false;
@@ -56,71 +164,486 @@ public partial class MainWindow
56 164
 		this.hbox1.Name = "hbox1";
57 165
 		this.hbox1.Spacing = 6;
58 166
 		// Container child hbox1.Gtk.Box+BoxChild
59
-		this.drawingarea1 = new global::Gtk.DrawingArea();
60
-		this.drawingarea1.Name = "drawingarea1";
61
-		this.hbox1.Add(this.drawingarea1);
62
-		global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.drawingarea1]));
167
+		this.boxCamera = new global::Gtk.VBox();
168
+		this.boxCamera.Name = "boxCamera";
169
+		this.boxCamera.Spacing = 6;
170
+		// Container child boxCamera.Gtk.Box+BoxChild
171
+		this.drawingAreaCamera = new global::Gtk.DrawingArea();
172
+		this.drawingAreaCamera.Name = "drawingAreaCamera";
173
+		this.boxCamera.Add(this.drawingAreaCamera);
174
+		global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.boxCamera[this.drawingAreaCamera]));
63 175
 		w3.Position = 0;
64
-		// Container child hbox1.Gtk.Box+BoxChild
65
-		this.alignment1 = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
176
+		// Container child boxCamera.Gtk.Box+BoxChild
177
+		this.alignment1 = new global::Gtk.Alignment(0F, 0.5F, 0F, 1F);
66 178
 		this.alignment1.Name = "alignment1";
179
+		this.alignment1.BorderWidth = ((uint)(6));
67 180
 		// Container child alignment1.Gtk.Container+ContainerChild
68
-		this.GtkScrolledWindow = new global::Gtk.ScrolledWindow();
69
-		this.GtkScrolledWindow.Name = "GtkScrolledWindow";
70
-		this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
71
-		// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
72
-		global::Gtk.Viewport w4 = new global::Gtk.Viewport();
73
-		w4.ShadowType = ((global::Gtk.ShadowType)(0));
74
-		// Container child GtkViewport.Gtk.Container+ContainerChild
75
-		this.frame1 = new global::Gtk.Frame();
76
-		this.frame1.Name = "frame1";
77
-		this.frame1.ShadowType = ((global::Gtk.ShadowType)(0));
78
-		// Container child frame1.Gtk.Container+ContainerChild
79
-		this.fixed4 = new global::Gtk.Fixed();
80
-		this.fixed4.Name = "fixed4";
81
-		this.fixed4.HasWindow = false;
82
-		// Container child fixed4.Gtk.Fixed+FixedChild
83
-		this.button7 = new global::Gtk.Button();
84
-		this.button7.CanFocus = true;
85
-		this.button7.Name = "button7";
86
-		this.button7.UseUnderline = true;
87
-		this.button7.Label = global::Mono.Unix.Catalog.GetString("GtkButton");
88
-		this.fixed4.Add(this.button7);
89
-		global::Gtk.Fixed.FixedChild w5 = ((global::Gtk.Fixed.FixedChild)(this.fixed4[this.button7]));
90
-		w5.X = 30;
91
-		w5.Y = 25;
92
-		this.frame1.Add(this.fixed4);
93
-		this.GtkLabel2 = new global::Gtk.Label();
94
-		this.GtkLabel2.Name = "GtkLabel2";
95
-		this.GtkLabel2.LabelProp = global::Mono.Unix.Catalog.GetString("<b>Controls</b>");
96
-		this.GtkLabel2.UseMarkup = true;
97
-		this.frame1.LabelWidget = this.GtkLabel2;
98
-		w4.Add(this.frame1);
99
-		this.GtkScrolledWindow.Add(w4);
100
-		this.alignment1.Add(this.GtkScrolledWindow);
101
-		this.hbox1.Add(this.alignment1);
102
-		global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.alignment1]));
103
-		w10.Position = 1;
181
+		this.hbox2 = new global::Gtk.HBox();
182
+		this.hbox2.Name = "hbox2";
183
+		this.hbox2.Spacing = 6;
184
+		// Container child hbox2.Gtk.Box+BoxChild
185
+		this.checkButtonCameraOn = new global::Gtk.CheckButton();
186
+		this.checkButtonCameraOn.CanFocus = true;
187
+		this.checkButtonCameraOn.Name = "checkButtonCameraOn";
188
+		this.checkButtonCameraOn.Label = global::Mono.Unix.Catalog.GetString("Camera On");
189
+		this.checkButtonCameraOn.DrawIndicator = true;
190
+		this.checkButtonCameraOn.UseUnderline = true;
191
+		this.hbox2.Add(this.checkButtonCameraOn);
192
+		global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.checkButtonCameraOn]));
193
+		w4.Position = 0;
194
+		// Container child hbox2.Gtk.Box+BoxChild
195
+		this.checkButtonRobotPosition = new global::Gtk.CheckButton();
196
+		this.checkButtonRobotPosition.CanFocus = true;
197
+		this.checkButtonRobotPosition.Name = "checkButtonRobotPosition";
198
+		this.checkButtonRobotPosition.Label = global::Mono.Unix.Catalog.GetString("Robot Position");
199
+		this.checkButtonRobotPosition.DrawIndicator = true;
200
+		this.checkButtonRobotPosition.UseUnderline = true;
201
+		this.hbox2.Add(this.checkButtonRobotPosition);
202
+		global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.checkButtonRobotPosition]));
203
+		w5.Position = 1;
204
+		this.alignment1.Add(this.hbox2);
205
+		this.boxCamera.Add(this.alignment1);
206
+		global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.boxCamera[this.alignment1]));
207
+		w7.Position = 1;
208
+		w7.Expand = false;
209
+		w7.Fill = false;
210
+		this.hbox1.Add(this.boxCamera);
211
+		global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.boxCamera]));
212
+		w8.Position = 0;
213
+		// Container child hbox1.Gtk.Box+BoxChild
214
+		this.hbox3 = new global::Gtk.HBox();
215
+		this.hbox3.Name = "hbox3";
216
+		this.hbox3.Spacing = 6;
217
+		// Container child hbox3.Gtk.Box+BoxChild
218
+		this.vseparator1 = new global::Gtk.VSeparator();
219
+		this.vseparator1.Name = "vseparator1";
220
+		this.hbox3.Add(this.vseparator1);
221
+		global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.vseparator1]));
222
+		w9.Position = 0;
223
+		w9.Expand = false;
224
+		w9.Fill = false;
225
+		// Container child hbox3.Gtk.Box+BoxChild
226
+		this.alignment3 = new global::Gtk.Alignment(1F, 0F, 0F, 0F);
227
+		this.alignment3.Name = "alignment3";
228
+		this.alignment3.BorderWidth = ((uint)(4));
229
+		// Container child alignment3.Gtk.Container+ContainerChild
230
+		this.vbox5 = new global::Gtk.VBox();
231
+		this.vbox5.Name = "vbox5";
232
+		this.vbox5.Spacing = 6;
233
+		// Container child vbox5.Gtk.Box+BoxChild
234
+		this.vbox10 = new global::Gtk.VBox();
235
+		this.vbox10.Name = "vbox10";
236
+		this.vbox10.Spacing = 6;
237
+		// Container child vbox10.Gtk.Box+BoxChild
238
+		this.labelServer = new global::Gtk.Label();
239
+		this.labelServer.HeightRequest = 36;
240
+		this.labelServer.Name = "labelServer";
241
+		this.labelServer.LabelProp = global::Mono.Unix.Catalog.GetString("<b><u>Server connection</u></b>");
242
+		this.labelServer.UseMarkup = true;
243
+		this.vbox10.Add(this.labelServer);
244
+		global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox10[this.labelServer]));
245
+		w10.Position = 0;
246
+		w10.Expand = false;
247
+		w10.Fill = false;
248
+		// Container child vbox10.Gtk.Box+BoxChild
249
+		this.gtkAlignmentServer = new global::Gtk.Alignment(0F, 0F, 1F, 1F);
250
+		this.gtkAlignmentServer.Name = "gtkAlignmentServer";
251
+		this.gtkAlignmentServer.LeftPadding = ((uint)(12));
252
+		// Container child gtkAlignmentServer.Gtk.Container+ContainerChild
253
+		this.vbox6 = new global::Gtk.VBox();
254
+		this.vbox6.Name = "vbox6";
255
+		this.vbox6.Spacing = 6;
256
+		// Container child vbox6.Gtk.Box+BoxChild
257
+		this.table1 = new global::Gtk.Table(((uint)(3)), ((uint)(2)), false);
258
+		this.table1.Name = "table1";
259
+		this.table1.RowSpacing = ((uint)(6));
260
+		this.table1.ColumnSpacing = ((uint)(6));
261
+		// Container child table1.Gtk.Table+TableChild
262
+		this.entryServerName = new global::Gtk.Entry();
263
+		this.entryServerName.CanFocus = true;
264
+		this.entryServerName.Name = "entryServerName";
265
+		this.entryServerName.IsEditable = true;
266
+		this.entryServerName.InvisibleChar = '●';
267
+		this.table1.Add(this.entryServerName);
268
+		global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1[this.entryServerName]));
269
+		w11.LeftAttach = ((uint)(1));
270
+		w11.RightAttach = ((uint)(2));
271
+		w11.YOptions = ((global::Gtk.AttachOptions)(4));
272
+		// Container child table1.Gtk.Table+TableChild
273
+		this.entryServerPort = new global::Gtk.Entry();
274
+		this.entryServerPort.CanFocus = true;
275
+		this.entryServerPort.Name = "entryServerPort";
276
+		this.entryServerPort.IsEditable = true;
277
+		this.entryServerPort.InvisibleChar = '●';
278
+		this.table1.Add(this.entryServerPort);
279
+		global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1[this.entryServerPort]));
280
+		w12.TopAttach = ((uint)(1));
281
+		w12.BottomAttach = ((uint)(2));
282
+		w12.LeftAttach = ((uint)(1));
283
+		w12.RightAttach = ((uint)(2));
284
+		w12.YOptions = ((global::Gtk.AttachOptions)(4));
285
+		// Container child table1.Gtk.Table+TableChild
286
+		this.entryTimeout = new global::Gtk.Entry();
287
+		this.entryTimeout.CanFocus = true;
288
+		this.entryTimeout.Name = "entryTimeout";
289
+		this.entryTimeout.IsEditable = true;
290
+		this.entryTimeout.InvisibleChar = '●';
291
+		this.table1.Add(this.entryTimeout);
292
+		global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1[this.entryTimeout]));
293
+		w13.TopAttach = ((uint)(2));
294
+		w13.BottomAttach = ((uint)(3));
295
+		w13.LeftAttach = ((uint)(1));
296
+		w13.RightAttach = ((uint)(2));
297
+		w13.YOptions = ((global::Gtk.AttachOptions)(4));
298
+		// Container child table1.Gtk.Table+TableChild
299
+		this.label1 = new global::Gtk.Label();
300
+		this.label1.Name = "label1";
301
+		this.label1.Xalign = 1F;
302
+		this.label1.LabelProp = global::Mono.Unix.Catalog.GetString("Server name:");
303
+		this.label1.Justify = ((global::Gtk.Justification)(1));
304
+		this.table1.Add(this.label1);
305
+		global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1[this.label1]));
306
+		w14.XOptions = ((global::Gtk.AttachOptions)(4));
307
+		w14.YOptions = ((global::Gtk.AttachOptions)(4));
308
+		// Container child table1.Gtk.Table+TableChild
309
+		this.label2 = new global::Gtk.Label();
310
+		this.label2.Name = "label2";
311
+		this.label2.Xalign = 1F;
312
+		this.label2.LabelProp = global::Mono.Unix.Catalog.GetString("Server port:");
313
+		this.label2.Justify = ((global::Gtk.Justification)(1));
314
+		this.table1.Add(this.label2);
315
+		global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1[this.label2]));
316
+		w15.TopAttach = ((uint)(1));
317
+		w15.BottomAttach = ((uint)(2));
318
+		w15.XOptions = ((global::Gtk.AttachOptions)(4));
319
+		w15.YOptions = ((global::Gtk.AttachOptions)(4));
320
+		// Container child table1.Gtk.Table+TableChild
321
+		this.label5 = new global::Gtk.Label();
322
+		this.label5.Name = "label5";
323
+		this.label5.LabelProp = global::Mono.Unix.Catalog.GetString("Timeout (ms):");
324
+		this.table1.Add(this.label5);
325
+		global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1[this.label5]));
326
+		w16.TopAttach = ((uint)(2));
327
+		w16.BottomAttach = ((uint)(3));
328
+		w16.XOptions = ((global::Gtk.AttachOptions)(4));
329
+		w16.YOptions = ((global::Gtk.AttachOptions)(4));
330
+		this.vbox6.Add(this.table1);
331
+		global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.table1]));
332
+		w17.Position = 0;
333
+		w17.Expand = false;
334
+		w17.Fill = false;
335
+		// Container child vbox6.Gtk.Box+BoxChild
336
+		this.buttonServerConnection = new global::Gtk.Button();
337
+		this.buttonServerConnection.CanFocus = true;
338
+		this.buttonServerConnection.Name = "buttonServerConnection";
339
+		this.buttonServerConnection.UseUnderline = true;
340
+		this.buttonServerConnection.Label = global::Mono.Unix.Catalog.GetString("Connect");
341
+		this.vbox6.Add(this.buttonServerConnection);
342
+		global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.buttonServerConnection]));
343
+		w18.PackType = ((global::Gtk.PackType)(1));
344
+		w18.Position = 1;
345
+		w18.Expand = false;
346
+		w18.Fill = false;
347
+		this.gtkAlignmentServer.Add(this.vbox6);
348
+		this.vbox10.Add(this.gtkAlignmentServer);
349
+		global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox10[this.gtkAlignmentServer]));
350
+		w20.Position = 1;
351
+		w20.Expand = false;
352
+		w20.Fill = false;
353
+		this.vbox5.Add(this.vbox10);
354
+		global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox10]));
355
+		w21.Position = 0;
356
+		w21.Expand = false;
357
+		w21.Fill = false;
358
+		// Container child vbox5.Gtk.Box+BoxChild
359
+		this.hseparator1 = new global::Gtk.HSeparator();
360
+		this.hseparator1.Name = "hseparator1";
361
+		this.vbox5.Add(this.hseparator1);
362
+		global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hseparator1]));
363
+		w22.Position = 1;
364
+		w22.Expand = false;
365
+		w22.Fill = false;
366
+		// Container child vbox5.Gtk.Box+BoxChild
367
+		this.vbox11 = new global::Gtk.VBox();
368
+		this.vbox11.Name = "vbox11";
369
+		this.vbox11.Spacing = 6;
370
+		// Container child vbox11.Gtk.Box+BoxChild
371
+		this.labelRobot = new global::Gtk.Label();
372
+		this.labelRobot.HeightRequest = 36;
373
+		this.labelRobot.Name = "labelRobot";
374
+		this.labelRobot.LabelProp = global::Mono.Unix.Catalog.GetString("<b><u>Robot Activation</u></b>");
375
+		this.labelRobot.UseMarkup = true;
376
+		this.vbox11.Add(this.labelRobot);
377
+		global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.labelRobot]));
378
+		w23.Position = 0;
379
+		w23.Expand = false;
380
+		w23.Fill = false;
381
+		// Container child vbox11.Gtk.Box+BoxChild
382
+		this.alignment9 = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
383
+		this.alignment9.Name = "alignment9";
384
+		// Container child alignment9.Gtk.Container+ContainerChild
385
+		this.gtkAlignmentRobot = new global::Gtk.Alignment(0F, 0F, 1F, 1F);
386
+		this.gtkAlignmentRobot.Name = "gtkAlignmentRobot";
387
+		this.gtkAlignmentRobot.LeftPadding = ((uint)(12));
388
+		// Container child gtkAlignmentRobot.Gtk.Container+ContainerChild
389
+		this.vbox8 = new global::Gtk.VBox();
390
+		this.vbox8.Name = "vbox8";
391
+		this.vbox8.Spacing = 6;
392
+		// Container child vbox8.Gtk.Box+BoxChild
393
+		this.alignment6 = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
394
+		this.alignment6.Name = "alignment6";
395
+		// Container child alignment6.Gtk.Container+ContainerChild
396
+		this.hbox4 = new global::Gtk.HBox();
397
+		this.hbox4.Name = "hbox4";
398
+		this.hbox4.Spacing = 6;
399
+		// Container child hbox4.Gtk.Box+BoxChild
400
+		this.radioButtonWithWatchdog = new global::Gtk.RadioButton(global::Mono.Unix.Catalog.GetString("with watchdog"));
401
+		this.radioButtonWithWatchdog.CanFocus = true;
402
+		this.radioButtonWithWatchdog.Name = "radioButtonWithWatchdog";
403
+		this.radioButtonWithWatchdog.DrawIndicator = true;
404
+		this.radioButtonWithWatchdog.UseUnderline = true;
405
+		this.radioButtonWithWatchdog.Group = new global::GLib.SList(global::System.IntPtr.Zero);
406
+		this.hbox4.Add(this.radioButtonWithWatchdog);
407
+		global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.radioButtonWithWatchdog]));
408
+		w24.Position = 0;
409
+		// Container child hbox4.Gtk.Box+BoxChild
410
+		this.radioButtonWithoutWatchdog = new global::Gtk.RadioButton(global::Mono.Unix.Catalog.GetString("without watchdog"));
411
+		this.radioButtonWithoutWatchdog.CanFocus = true;
412
+		this.radioButtonWithoutWatchdog.Name = "radioButtonWithoutWatchdog";
413
+		this.radioButtonWithoutWatchdog.DrawIndicator = true;
414
+		this.radioButtonWithoutWatchdog.UseUnderline = true;
415
+		this.radioButtonWithoutWatchdog.Group = this.radioButtonWithWatchdog.Group;
416
+		this.hbox4.Add(this.radioButtonWithoutWatchdog);
417
+		global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.radioButtonWithoutWatchdog]));
418
+		w25.Position = 1;
419
+		this.alignment6.Add(this.hbox4);
420
+		this.vbox8.Add(this.alignment6);
421
+		global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(this.vbox8[this.alignment6]));
422
+		w27.Position = 0;
423
+		w27.Expand = false;
424
+		w27.Fill = false;
425
+		// Container child vbox8.Gtk.Box+BoxChild
426
+		this.alignment5 = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
427
+		this.alignment5.Name = "alignment5";
428
+		// Container child alignment5.Gtk.Container+ContainerChild
429
+		this.alignment7 = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
430
+		this.alignment7.Name = "alignment7";
431
+		// Container child alignment7.Gtk.Container+ContainerChild
432
+		this.buttonRobotActivation = new global::Gtk.Button();
433
+		this.buttonRobotActivation.CanFocus = true;
434
+		this.buttonRobotActivation.Name = "buttonRobotActivation";
435
+		this.buttonRobotActivation.UseUnderline = true;
436
+		this.buttonRobotActivation.Label = global::Mono.Unix.Catalog.GetString("Activation");
437
+		this.alignment7.Add(this.buttonRobotActivation);
438
+		this.alignment5.Add(this.alignment7);
439
+		this.vbox8.Add(this.alignment5);
440
+		global::Gtk.Box.BoxChild w30 = ((global::Gtk.Box.BoxChild)(this.vbox8[this.alignment5]));
441
+		w30.Position = 1;
442
+		w30.Expand = false;
443
+		w30.Fill = false;
444
+		this.gtkAlignmentRobot.Add(this.vbox8);
445
+		this.alignment9.Add(this.gtkAlignmentRobot);
446
+		this.vbox11.Add(this.alignment9);
447
+		global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.alignment9]));
448
+		w33.Position = 1;
449
+		w33.Expand = false;
450
+		w33.Fill = false;
451
+		this.vbox5.Add(this.vbox11);
452
+		global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox11]));
453
+		w34.Position = 2;
454
+		w34.Expand = false;
455
+		w34.Fill = false;
456
+		// Container child vbox5.Gtk.Box+BoxChild
457
+		this.hseparator2 = new global::Gtk.HSeparator();
458
+		this.hseparator2.Name = "hseparator2";
459
+		this.vbox5.Add(this.hseparator2);
460
+		global::Gtk.Box.BoxChild w35 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hseparator2]));
461
+		w35.Position = 3;
462
+		w35.Expand = false;
463
+		w35.Fill = false;
464
+		// Container child vbox5.Gtk.Box+BoxChild
465
+		this.vbox12 = new global::Gtk.VBox();
466
+		this.vbox12.Name = "vbox12";
467
+		this.vbox12.Spacing = 6;
468
+		// Container child vbox12.Gtk.Box+BoxChild
469
+		this.labelRobotControl = new global::Gtk.Label();
470
+		this.labelRobotControl.HeightRequest = 36;
471
+		this.labelRobotControl.Name = "labelRobotControl";
472
+		this.labelRobotControl.LabelProp = global::Mono.Unix.Catalog.GetString("<b><u>Robot Controls and Status</u></b>");
473
+		this.labelRobotControl.UseMarkup = true;
474
+		this.vbox12.Add(this.labelRobotControl);
475
+		global::Gtk.Box.BoxChild w36 = ((global::Gtk.Box.BoxChild)(this.vbox12[this.labelRobotControl]));
476
+		w36.Position = 0;
477
+		w36.Expand = false;
478
+		w36.Fill = false;
479
+		// Container child vbox12.Gtk.Box+BoxChild
480
+		this.gtkAlignmentRobotControl = new global::Gtk.Alignment(0F, 0F, 1F, 1F);
481
+		this.gtkAlignmentRobotControl.Name = "gtkAlignmentRobotControl";
482
+		this.gtkAlignmentRobotControl.LeftPadding = ((uint)(12));
483
+		// Container child gtkAlignmentRobotControl.Gtk.Container+ContainerChild
484
+		this.vbox9 = new global::Gtk.VBox();
485
+		this.vbox9.Name = "vbox9";
486
+		this.vbox9.Spacing = 6;
487
+		// Container child vbox9.Gtk.Box+BoxChild
488
+		this.alignment8 = new global::Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
489
+		this.alignment8.Name = "alignment8";
490
+		// Container child alignment8.Gtk.Container+ContainerChild
491
+		this.table4 = new global::Gtk.Table(((uint)(3)), ((uint)(3)), false);
492
+		this.table4.Name = "table4";
493
+		this.table4.RowSpacing = ((uint)(6));
494
+		this.table4.ColumnSpacing = ((uint)(6));
495
+		// Container child table4.Gtk.Table+TableChild
496
+		this.buttonDown = new global::Gtk.Button();
497
+		this.buttonDown.CanFocus = true;
498
+		this.buttonDown.Name = "buttonDown";
499
+		this.buttonDown.UseUnderline = true;
500
+		global::Gtk.Image w37 = new global::Gtk.Image();
501
+		w37.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-down-symbolic.symbolic.png");
502
+		this.buttonDown.Image = w37;
503
+		this.table4.Add(this.buttonDown);
504
+		global::Gtk.Table.TableChild w38 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonDown]));
505
+		w38.TopAttach = ((uint)(2));
506
+		w38.BottomAttach = ((uint)(3));
507
+		w38.LeftAttach = ((uint)(1));
508
+		w38.RightAttach = ((uint)(2));
509
+		w38.XOptions = ((global::Gtk.AttachOptions)(4));
510
+		w38.YOptions = ((global::Gtk.AttachOptions)(4));
511
+		// Container child table4.Gtk.Table+TableChild
512
+		this.buttonForward = new global::Gtk.Button();
513
+		this.buttonForward.CanFocus = true;
514
+		this.buttonForward.Name = "buttonForward";
515
+		this.buttonForward.UseUnderline = true;
516
+		global::Gtk.Image w39 = new global::Gtk.Image();
517
+		w39.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-up-symbolic.symbolic.png");
518
+		this.buttonForward.Image = w39;
519
+		this.table4.Add(this.buttonForward);
520
+		global::Gtk.Table.TableChild w40 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonForward]));
521
+		w40.LeftAttach = ((uint)(1));
522
+		w40.RightAttach = ((uint)(2));
523
+		w40.XOptions = ((global::Gtk.AttachOptions)(4));
524
+		w40.YOptions = ((global::Gtk.AttachOptions)(4));
525
+		// Container child table4.Gtk.Table+TableChild
526
+		this.buttonLeft = new global::Gtk.Button();
527
+		this.buttonLeft.CanFocus = true;
528
+		this.buttonLeft.Name = "buttonLeft";
529
+		this.buttonLeft.UseUnderline = true;
530
+		global::Gtk.Image w41 = new global::Gtk.Image();
531
+		w41.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-start-symbolic.symbolic.png");
532
+		this.buttonLeft.Image = w41;
533
+		this.table4.Add(this.buttonLeft);
534
+		global::Gtk.Table.TableChild w42 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonLeft]));
535
+		w42.TopAttach = ((uint)(1));
536
+		w42.BottomAttach = ((uint)(2));
537
+		w42.XOptions = ((global::Gtk.AttachOptions)(4));
538
+		w42.YOptions = ((global::Gtk.AttachOptions)(4));
539
+		// Container child table4.Gtk.Table+TableChild
540
+		this.buttonRight = new global::Gtk.Button();
541
+		this.buttonRight.CanFocus = true;
542
+		this.buttonRight.Name = "buttonRight";
543
+		this.buttonRight.UseUnderline = true;
544
+		global::Gtk.Image w43 = new global::Gtk.Image();
545
+		w43.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-end-symbolic.symbolic.png");
546
+		this.buttonRight.Image = w43;
547
+		this.table4.Add(this.buttonRight);
548
+		global::Gtk.Table.TableChild w44 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonRight]));
549
+		w44.TopAttach = ((uint)(1));
550
+		w44.BottomAttach = ((uint)(2));
551
+		w44.LeftAttach = ((uint)(2));
552
+		w44.RightAttach = ((uint)(3));
553
+		w44.XOptions = ((global::Gtk.AttachOptions)(4));
554
+		w44.YOptions = ((global::Gtk.AttachOptions)(4));
555
+		this.alignment8.Add(this.table4);
556
+		this.vbox9.Add(this.alignment8);
557
+		global::Gtk.Box.BoxChild w46 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.alignment8]));
558
+		w46.Position = 0;
559
+		w46.Expand = false;
560
+		w46.Fill = false;
561
+		// Container child vbox9.Gtk.Box+BoxChild
562
+		this.table3 = new global::Gtk.Table(((uint)(1)), ((uint)(2)), false);
563
+		this.table3.Name = "table3";
564
+		this.table3.RowSpacing = ((uint)(6));
565
+		this.table3.ColumnSpacing = ((uint)(6));
566
+		// Container child table3.Gtk.Table+TableChild
567
+		this.label3 = new global::Gtk.Label();
568
+		this.label3.Name = "label3";
569
+		this.label3.Xalign = 1F;
570
+		this.label3.LabelProp = global::Mono.Unix.Catalog.GetString("Battery level:");
571
+		this.label3.Justify = ((global::Gtk.Justification)(1));
572
+		this.table3.Add(this.label3);
573
+		global::Gtk.Table.TableChild w47 = ((global::Gtk.Table.TableChild)(this.table3[this.label3]));
574
+		w47.YPadding = ((uint)(10));
575
+		w47.XOptions = ((global::Gtk.AttachOptions)(4));
576
+		w47.YOptions = ((global::Gtk.AttachOptions)(4));
577
+		// Container child table3.Gtk.Table+TableChild
578
+		this.labelBatteryLevel = new global::Gtk.Label();
579
+		this.labelBatteryLevel.Name = "labelBatteryLevel";
580
+		this.labelBatteryLevel.Xpad = 1;
581
+		this.labelBatteryLevel.Xalign = 0F;
582
+		this.labelBatteryLevel.LabelProp = global::Mono.Unix.Catalog.GetString("Unknown");
583
+		this.table3.Add(this.labelBatteryLevel);
584
+		global::Gtk.Table.TableChild w48 = ((global::Gtk.Table.TableChild)(this.table3[this.labelBatteryLevel]));
585
+		w48.LeftAttach = ((uint)(1));
586
+		w48.RightAttach = ((uint)(2));
587
+		w48.YOptions = ((global::Gtk.AttachOptions)(4));
588
+		this.vbox9.Add(this.table3);
589
+		global::Gtk.Box.BoxChild w49 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.table3]));
590
+		w49.Position = 2;
591
+		w49.Expand = false;
592
+		w49.Fill = false;
593
+		// Container child vbox9.Gtk.Box+BoxChild
594
+		this.checkButtonGetBattery = new global::Gtk.CheckButton();
595
+		this.checkButtonGetBattery.CanFocus = true;
596
+		this.checkButtonGetBattery.Name = "checkButtonGetBattery";
597
+		this.checkButtonGetBattery.Label = global::Mono.Unix.Catalog.GetString("Get battery level");
598
+		this.checkButtonGetBattery.DrawIndicator = true;
599
+		this.checkButtonGetBattery.UseUnderline = true;
600
+		this.vbox9.Add(this.checkButtonGetBattery);
601
+		global::Gtk.Box.BoxChild w50 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.checkButtonGetBattery]));
602
+		w50.Position = 3;
603
+		w50.Expand = false;
604
+		w50.Fill = false;
605
+		this.gtkAlignmentRobotControl.Add(this.vbox9);
606
+		this.vbox12.Add(this.gtkAlignmentRobotControl);
607
+		global::Gtk.Box.BoxChild w52 = ((global::Gtk.Box.BoxChild)(this.vbox12[this.gtkAlignmentRobotControl]));
608
+		w52.Position = 1;
609
+		this.vbox5.Add(this.vbox12);
610
+		global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox12]));
611
+		w53.Position = 4;
612
+		this.alignment3.Add(this.vbox5);
613
+		this.hbox3.Add(this.alignment3);
614
+		global::Gtk.Box.BoxChild w55 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.alignment3]));
615
+		w55.Position = 1;
616
+		w55.Expand = false;
617
+		w55.Fill = false;
618
+		this.hbox1.Add(this.hbox3);
619
+		global::Gtk.Box.BoxChild w56 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.hbox3]));
620
+		w56.Position = 1;
621
+		w56.Expand = false;
622
+		w56.Fill = false;
104 623
 		this.vbox1.Add(this.hbox1);
105
-		global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
106
-		w11.Position = 1;
107
-		// Container child vbox1.Gtk.Box+BoxChild
108
-		this.statusbar1 = new global::Gtk.Statusbar();
109
-		this.statusbar1.Name = "statusbar1";
110
-		this.statusbar1.Spacing = 6;
111
-		this.vbox1.Add(this.statusbar1);
112
-		global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.statusbar1]));
113
-		w12.Position = 2;
114
-		w12.Expand = false;
115
-		w12.Fill = false;
624
+		global::Gtk.Box.BoxChild w57 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
625
+		w57.Position = 1;
116 626
 		this.Add(this.vbox1);
117 627
 		if ((this.Child != null))
118 628
 		{
119 629
 			this.Child.ShowAll();
120 630
 		}
121 631
 		this.DefaultWidth = 1039;
122
-		this.DefaultHeight = 705;
632
+		this.DefaultHeight = 735;
123 633
 		this.Show();
124 634
 		this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.OnDeleteEvent);
635
+		this.QuitAction.Activated += new global::System.EventHandler(this.OnQuitActionActivated);
636
+		this.ShowLogWindowAction.Activated += new global::System.EventHandler(this.OnShowLogWindowActionActivated);
637
+		this.drawingAreaCamera.Realized += new global::System.EventHandler(this.OnDrawingAreaCameraRealized);
638
+		this.drawingAreaCamera.ExposeEvent += new global::Gtk.ExposeEventHandler(this.OnDrawingAreaCameraExposeEvent);
639
+		this.drawingAreaCamera.ConfigureEvent += new global::Gtk.ConfigureEventHandler(this.OnDrawingAreaCameraConfigureEvent);
640
+		this.checkButtonCameraOn.Clicked += new global::System.EventHandler(this.OnCheckButtonCameraOnClicked);
641
+		this.checkButtonRobotPosition.Clicked += new global::System.EventHandler(this.OnCheckButtonRobotPositionClicked);
642
+		this.buttonServerConnection.Clicked += new global::System.EventHandler(this.OnButtonServerConnectionClicked);
643
+		this.buttonRobotActivation.Clicked += new global::System.EventHandler(this.OnButtonRobotActivationClicked);
644
+		this.buttonRight.Clicked += new global::System.EventHandler(this.OnButtonMouvClicked);
645
+		this.buttonLeft.Clicked += new global::System.EventHandler(this.OnButtonMouvClicked);
646
+		this.buttonForward.Clicked += new global::System.EventHandler(this.OnButtonMouvClicked);
647
+		this.buttonDown.Clicked += new global::System.EventHandler(this.OnButtonMouvClicked);
125 648
 	}
126 649
 }

+ 714
- 45
software/monitor/monitor/gtk-gui/gui.stetic View File

@@ -7,20 +7,56 @@
7 7
     <widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
8 8
     <widget-library name="../bin/Debug/monitor.exe" internal="true" />
9 9
   </import>
10
-  <widget class="Gtk.Window" id="MainWindow" design-size="1039 705">
11
-    <action-group name="Default" />
10
+  <widget class="Gtk.Window" id="MainWindow" design-size="1039 735">
11
+    <action-group name="Default">
12
+      <action id="FileAction">
13
+        <property name="Type">Action</property>
14
+        <property name="IsImportant">True</property>
15
+        <property name="Label" translatable="yes">File</property>
16
+        <property name="ShortLabel" translatable="yes">File</property>
17
+      </action>
18
+      <action id="QuitAction">
19
+        <property name="Type">Action</property>
20
+        <property name="Accelerator">&lt;Primary&gt;&lt;Mod2&gt;q</property>
21
+        <property name="IsImportant">True</property>
22
+        <property name="Label" translatable="yes">Quit...</property>
23
+        <property name="ShortLabel" translatable="yes">Quit</property>
24
+        <signal name="Activated" handler="OnQuitActionActivated" />
25
+      </action>
26
+      <action id="LogAction">
27
+        <property name="Type">Action</property>
28
+        <property name="Label" translatable="yes">Log</property>
29
+        <property name="ShortLabel" translatable="yes">Log</property>
30
+      </action>
31
+      <action id="ShowLogWindowAction">
32
+        <property name="Type">Action</property>
33
+        <property name="Accelerator">&lt;Primary&gt;&lt;Mod2&gt;s</property>
34
+        <property name="Label" translatable="yes">Show log window</property>
35
+        <property name="ShortLabel" translatable="yes">Show log window</property>
36
+        <signal name="Activated" handler="OnShowLogWindowActionActivated" />
37
+      </action>
38
+    </action-group>
12 39
     <property name="MemberName" />
13 40
     <property name="Title" translatable="yes">Monitor UI</property>
41
+    <property name="Icon">resource:monitor.ressources.robot-icon.resized.png</property>
14 42
     <property name="WindowPosition">CenterOnParent</property>
43
+    <property name="BorderWidth">5</property>
15 44
     <signal name="DeleteEvent" handler="OnDeleteEvent" />
16 45
     <child>
17 46
       <widget class="Gtk.VBox" id="vbox1">
18 47
         <property name="MemberName" />
19 48
         <property name="Spacing">6</property>
20 49
         <child>
21
-          <widget class="Gtk.MenuBar" id="menubar1">
50
+          <widget class="Gtk.MenuBar" id="menuBar">
22 51
             <property name="MemberName" />
23
-            <node name="__gtksharp_132_Stetic_Editor_ActionMenuBar" type="Menubar" />
52
+            <node name="menuBar" type="Menubar">
53
+              <node type="Menu" action="FileAction">
54
+                <node type="Menuitem" action="QuitAction" />
55
+              </node>
56
+              <node type="Menu" action="LogAction">
57
+                <node type="Menuitem" action="ShowLogWindowAction" />
58
+              </node>
59
+            </node>
24 60
           </widget>
25 61
           <packing>
26 62
             <property name="Position">0</property>
@@ -34,8 +70,71 @@
34 70
             <property name="MemberName" />
35 71
             <property name="Spacing">6</property>
36 72
             <child>
37
-              <widget class="Gtk.DrawingArea" id="drawingarea1">
73
+              <widget class="Gtk.VBox" id="boxCamera">
38 74
                 <property name="MemberName" />
75
+                <property name="Spacing">6</property>
76
+                <child>
77
+                  <widget class="Gtk.DrawingArea" id="drawingAreaCamera">
78
+                    <property name="MemberName" />
79
+                    <signal name="Realized" handler="OnDrawingAreaCameraRealized" />
80
+                    <signal name="ExposeEvent" handler="OnDrawingAreaCameraExposeEvent" />
81
+                    <signal name="ConfigureEvent" handler="OnDrawingAreaCameraConfigureEvent" />
82
+                  </widget>
83
+                  <packing>
84
+                    <property name="Position">0</property>
85
+                    <property name="AutoSize">True</property>
86
+                  </packing>
87
+                </child>
88
+                <child>
89
+                  <widget class="Gtk.Alignment" id="alignment1">
90
+                    <property name="MemberName" />
91
+                    <property name="Xscale">0</property>
92
+                    <property name="Xalign">0</property>
93
+                    <property name="BorderWidth">6</property>
94
+                    <child>
95
+                      <widget class="Gtk.HBox" id="hbox2">
96
+                        <property name="MemberName" />
97
+                        <property name="Spacing">6</property>
98
+                        <child>
99
+                          <widget class="Gtk.CheckButton" id="checkButtonCameraOn">
100
+                            <property name="MemberName" />
101
+                            <property name="CanFocus">True</property>
102
+                            <property name="Label" translatable="yes">Camera On</property>
103
+                            <property name="DrawIndicator">True</property>
104
+                            <property name="HasLabel">True</property>
105
+                            <property name="UseUnderline">True</property>
106
+                            <signal name="Clicked" handler="OnCheckButtonCameraOnClicked" />
107
+                          </widget>
108
+                          <packing>
109
+                            <property name="Position">0</property>
110
+                            <property name="AutoSize">True</property>
111
+                          </packing>
112
+                        </child>
113
+                        <child>
114
+                          <widget class="Gtk.CheckButton" id="checkButtonRobotPosition">
115
+                            <property name="MemberName" />
116
+                            <property name="CanFocus">True</property>
117
+                            <property name="Label" translatable="yes">Robot Position</property>
118
+                            <property name="DrawIndicator">True</property>
119
+                            <property name="HasLabel">True</property>
120
+                            <property name="UseUnderline">True</property>
121
+                            <signal name="Clicked" handler="OnCheckButtonRobotPositionClicked" />
122
+                          </widget>
123
+                          <packing>
124
+                            <property name="Position">1</property>
125
+                            <property name="AutoSize">True</property>
126
+                          </packing>
127
+                        </child>
128
+                      </widget>
129
+                    </child>
130
+                  </widget>
131
+                  <packing>
132
+                    <property name="Position">1</property>
133
+                    <property name="AutoSize">False</property>
134
+                    <property name="Expand">False</property>
135
+                    <property name="Fill">False</property>
136
+                  </packing>
137
+                </child>
39 138
               </widget>
40 139
               <packing>
41 140
                 <property name="Position">0</property>
@@ -43,60 +142,648 @@
43 142
               </packing>
44 143
             </child>
45 144
             <child>
46
-              <widget class="Gtk.Alignment" id="alignment1">
145
+              <widget class="Gtk.HBox" id="hbox3">
47 146
                 <property name="MemberName" />
147
+                <property name="Spacing">6</property>
48 148
                 <child>
49
-                  <widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
149
+                  <widget class="Gtk.VSeparator" id="vseparator1">
50 150
                     <property name="MemberName" />
51
-                    <property name="ShadowType">In</property>
151
+                  </widget>
152
+                  <packing>
153
+                    <property name="Position">0</property>
154
+                    <property name="AutoSize">True</property>
155
+                    <property name="Expand">False</property>
156
+                    <property name="Fill">False</property>
157
+                  </packing>
158
+                </child>
159
+                <child>
160
+                  <widget class="Gtk.Alignment" id="alignment3">
161
+                    <property name="MemberName" />
162
+                    <property name="Xscale">0</property>
163
+                    <property name="Yscale">0</property>
164
+                    <property name="Xalign">1</property>
165
+                    <property name="Yalign">0</property>
166
+                    <property name="BorderWidth">4</property>
52 167
                     <child>
53
-                      <widget class="Gtk.Viewport" id="GtkViewport">
168
+                      <widget class="Gtk.VBox" id="vbox5">
54 169
                         <property name="MemberName" />
55
-                        <property name="ShadowType">None</property>
170
+                        <property name="Spacing">6</property>
171
+                        <child>
172
+                          <widget class="Gtk.VBox" id="vbox10">
173
+                            <property name="MemberName" />
174
+                            <property name="Spacing">6</property>
175
+                            <child>
176
+                              <widget class="Gtk.Label" id="labelServer">
177
+                                <property name="MemberName" />
178
+                                <property name="HeightRequest">36</property>
179
+                                <property name="LabelProp" translatable="yes">&lt;b&gt;&lt;u&gt;Server connection&lt;/u&gt;&lt;/b&gt;</property>
180
+                                <property name="UseMarkup">True</property>
181
+                              </widget>
182
+                              <packing>
183
+                                <property name="Position">0</property>
184
+                                <property name="AutoSize">True</property>
185
+                                <property name="Expand">False</property>
186
+                                <property name="Fill">False</property>
187
+                              </packing>
188
+                            </child>
189
+                            <child>
190
+                              <widget class="Gtk.Alignment" id="gtkAlignmentServer">
191
+                                <property name="MemberName" />
192
+                                <property name="Xalign">0</property>
193
+                                <property name="Yalign">0</property>
194
+                                <property name="LeftPadding">12</property>
195
+                                <child>
196
+                                  <widget class="Gtk.VBox" id="vbox6">
197
+                                    <property name="MemberName" />
198
+                                    <property name="Spacing">6</property>
199
+                                    <child>
200
+                                      <widget class="Gtk.Table" id="table1">
201
+                                        <property name="MemberName" />
202
+                                        <property name="NRows">3</property>
203
+                                        <property name="NColumns">2</property>
204
+                                        <property name="RowSpacing">6</property>
205
+                                        <property name="ColumnSpacing">6</property>
206
+                                        <child>
207
+                                          <widget class="Gtk.Entry" id="entryServerName">
208
+                                            <property name="MemberName" />
209
+                                            <property name="CanFocus">True</property>
210
+                                            <property name="IsEditable">True</property>
211
+                                            <property name="InvisibleChar">●</property>
212
+                                          </widget>
213
+                                          <packing>
214
+                                            <property name="LeftAttach">1</property>
215
+                                            <property name="RightAttach">2</property>
216
+                                            <property name="AutoSize">True</property>
217
+                                            <property name="YOptions">Fill</property>
218
+                                            <property name="XExpand">True</property>
219
+                                            <property name="XFill">True</property>
220
+                                            <property name="XShrink">False</property>
221
+                                            <property name="YExpand">False</property>
222
+                                            <property name="YFill">True</property>
223
+                                            <property name="YShrink">False</property>
224
+                                          </packing>
225
+                                        </child>
226
+                                        <child>
227
+                                          <widget class="Gtk.Entry" id="entryServerPort">
228
+                                            <property name="MemberName" />
229
+                                            <property name="CanFocus">True</property>
230
+                                            <property name="IsEditable">True</property>
231
+                                            <property name="InvisibleChar">●</property>
232
+                                          </widget>
233
+                                          <packing>
234
+                                            <property name="TopAttach">1</property>
235
+                                            <property name="BottomAttach">2</property>
236
+                                            <property name="LeftAttach">1</property>
237
+                                            <property name="RightAttach">2</property>
238
+                                            <property name="AutoSize">True</property>
239
+                                            <property name="YOptions">Fill</property>
240
+                                            <property name="XExpand">True</property>
241
+                                            <property name="XFill">True</property>
242
+                                            <property name="XShrink">False</property>
243
+                                            <property name="YExpand">False</property>
244
+                                            <property name="YFill">True</property>
245
+                                            <property name="YShrink">False</property>
246
+                                          </packing>
247
+                                        </child>
248
+                                        <child>
249
+                                          <widget class="Gtk.Entry" id="entryTimeout">
250
+                                            <property name="MemberName" />
251
+                                            <property name="CanFocus">True</property>
252
+                                            <property name="IsEditable">True</property>
253
+                                            <property name="InvisibleChar">●</property>
254
+                                          </widget>
255
+                                          <packing>
256
+                                            <property name="TopAttach">2</property>
257
+                                            <property name="BottomAttach">3</property>
258
+                                            <property name="LeftAttach">1</property>
259
+                                            <property name="RightAttach">2</property>
260
+                                            <property name="AutoSize">True</property>
261
+                                            <property name="YOptions">Fill</property>
262
+                                            <property name="XExpand">True</property>
263
+                                            <property name="XFill">True</property>
264
+                                            <property name="XShrink">False</property>
265
+                                            <property name="YExpand">False</property>
266
+                                            <property name="YFill">True</property>
267
+                                            <property name="YShrink">False</property>
268
+                                          </packing>
269
+                                        </child>
270
+                                        <child>
271
+                                          <widget class="Gtk.Label" id="label1">
272
+                                            <property name="MemberName" />
273
+                                            <property name="Xalign">1</property>
274
+                                            <property name="LabelProp" translatable="yes">Server name:</property>
275
+                                            <property name="Justify">Right</property>
276
+                                          </widget>
277
+                                          <packing>
278
+                                            <property name="AutoSize">True</property>
279
+                                            <property name="XOptions">Fill</property>
280
+                                            <property name="YOptions">Fill</property>
281
+                                            <property name="XExpand">False</property>
282
+                                            <property name="XFill">True</property>
283
+                                            <property name="XShrink">False</property>
284
+                                            <property name="YExpand">False</property>
285
+                                            <property name="YFill">True</property>
286
+                                            <property name="YShrink">False</property>
287
+                                          </packing>
288
+                                        </child>
289
+                                        <child>
290
+                                          <widget class="Gtk.Label" id="label2">
291
+                                            <property name="MemberName" />
292
+                                            <property name="Xalign">1</property>
293
+                                            <property name="LabelProp" translatable="yes">Server port:</property>
294
+                                            <property name="Justify">Right</property>
295
+                                          </widget>
296
+                                          <packing>
297
+                                            <property name="TopAttach">1</property>
298
+                                            <property name="BottomAttach">2</property>
299
+                                            <property name="AutoSize">True</property>
300
+                                            <property name="XOptions">Fill</property>
301
+                                            <property name="YOptions">Fill</property>
302
+                                            <property name="XExpand">False</property>
303
+                                            <property name="XFill">True</property>
304
+                                            <property name="XShrink">False</property>
305
+                                            <property name="YExpand">False</property>
306
+                                            <property name="YFill">True</property>
307
+                                            <property name="YShrink">False</property>
308
+                                          </packing>
309
+                                        </child>
310
+                                        <child>
311
+                                          <widget class="Gtk.Label" id="label5">
312
+                                            <property name="MemberName" />
313
+                                            <property name="LabelProp" translatable="yes">Timeout (ms):</property>
314
+                                          </widget>
315
+                                          <packing>
316
+                                            <property name="TopAttach">2</property>
317
+                                            <property name="BottomAttach">3</property>
318
+                                            <property name="AutoSize">True</property>
319
+                                            <property name="XOptions">Fill</property>
320
+                                            <property name="YOptions">Fill</property>
321
+                                            <property name="XExpand">False</property>
322
+                                            <property name="XFill">True</property>
323
+                                            <property name="XShrink">False</property>
324
+                                            <property name="YExpand">False</property>
325
+                                            <property name="YFill">True</property>
326
+                                            <property name="YShrink">False</property>
327
+                                          </packing>
328
+                                        </child>
329
+                                      </widget>
330
+                                      <packing>
331
+                                        <property name="Position">0</property>
332
+                                        <property name="AutoSize">True</property>
333
+                                        <property name="Expand">False</property>
334
+                                        <property name="Fill">False</property>
335
+                                      </packing>
336
+                                    </child>
337
+                                    <child>
338
+                                      <widget class="Gtk.Button" id="buttonServerConnection">
339
+                                        <property name="MemberName" />
340
+                                        <property name="CanFocus">True</property>
341
+                                        <property name="Type">TextOnly</property>
342
+                                        <property name="Label" translatable="yes">Connect</property>
343
+                                        <property name="UseUnderline">True</property>
344
+                                        <signal name="Clicked" handler="OnButtonServerConnectionClicked" />
345
+                                      </widget>
346
+                                      <packing>
347
+                                        <property name="PackType">End</property>
348
+                                        <property name="Position">1</property>
349
+                                        <property name="AutoSize">True</property>
350
+                                        <property name="Expand">False</property>
351
+                                        <property name="Fill">False</property>
352
+                                      </packing>
353
+                                    </child>
354
+                                  </widget>
355
+                                </child>
356
+                              </widget>
357
+                              <packing>
358
+                                <property name="Position">1</property>
359
+                                <property name="AutoSize">True</property>
360
+                                <property name="Expand">False</property>
361
+                                <property name="Fill">False</property>
362
+                              </packing>
363
+                            </child>
364
+                          </widget>
365
+                          <packing>
366
+                            <property name="Position">0</property>
367
+                            <property name="AutoSize">True</property>
368
+                            <property name="Expand">False</property>
369
+                            <property name="Fill">False</property>
370
+                          </packing>
371
+                        </child>
56 372
                         <child>
57
-                          <widget class="Gtk.Frame" id="frame1">
373
+                          <widget class="Gtk.HSeparator" id="hseparator1">
58 374
                             <property name="MemberName" />
59
-                            <property name="ShowScrollbars">True</property>
60
-                            <property name="ShadowType">None</property>
375
+                          </widget>
376
+                          <packing>
377
+                            <property name="Position">1</property>
378
+                            <property name="AutoSize">True</property>
379
+                            <property name="Expand">False</property>
380
+                            <property name="Fill">False</property>
381
+                          </packing>
382
+                        </child>
383
+                        <child>
384
+                          <widget class="Gtk.VBox" id="vbox11">
385
+                            <property name="MemberName" />
386
+                            <property name="Spacing">6</property>
387
+                            <child>
388
+                              <widget class="Gtk.Label" id="labelRobot">
389
+                                <property name="MemberName" />
390
+                                <property name="HeightRequest">36</property>
391
+                                <property name="LabelProp" translatable="yes">&lt;b&gt;&lt;u&gt;Robot Activation&lt;/u&gt;&lt;/b&gt;</property>
392
+                                <property name="UseMarkup">True</property>
393
+                              </widget>
394
+                              <packing>
395
+                                <property name="Position">0</property>
396
+                                <property name="AutoSize">True</property>
397
+                                <property name="Expand">False</property>
398
+                                <property name="Fill">False</property>
399
+                              </packing>
400
+                            </child>
61 401
                             <child>
62
-                              <widget class="Gtk.Fixed" id="fixed4">
402
+                              <widget class="Gtk.Alignment" id="alignment9">
63 403
                                 <property name="MemberName" />
64
-                                <property name="HasWindow">False</property>
65 404
                                 <child>
66
-                                  <widget class="Gtk.Button" id="button7">
405
+                                  <widget class="Gtk.Alignment" id="gtkAlignmentRobot">
67 406
                                     <property name="MemberName" />
68
-                                    <property name="CanFocus">True</property>
69
-                                    <property name="Type">TextOnly</property>
70
-                                    <property name="Label" translatable="yes">GtkButton</property>
71
-                                    <property name="UseUnderline">True</property>
407
+                                    <property name="Xalign">0</property>
408
+                                    <property name="Yalign">0</property>
409
+                                    <property name="LeftPadding">12</property>
410
+                                    <child>
411
+                                      <widget class="Gtk.VBox" id="vbox8">
412
+                                        <property name="MemberName" />
413
+                                        <property name="Spacing">6</property>
414
+                                        <child>
415
+                                          <widget class="Gtk.Alignment" id="alignment6">
416
+                                            <property name="MemberName" />
417
+                                            <child>
418
+                                              <widget class="Gtk.HBox" id="hbox4">
419
+                                                <property name="MemberName" />
420
+                                                <property name="Spacing">6</property>
421
+                                                <child>
422
+                                                  <widget class="Gtk.RadioButton" id="radioButtonWithWatchdog">
423
+                                                    <property name="MemberName" />
424
+                                                    <property name="CanFocus">True</property>
425
+                                                    <property name="Label" translatable="yes">with watchdog</property>
426
+                                                    <property name="Active">True</property>
427
+                                                    <property name="DrawIndicator">True</property>
428
+                                                    <property name="HasLabel">True</property>
429
+                                                    <property name="UseUnderline">True</property>
430
+                                                    <property name="Group">radioGroupRobotActivation</property>
431
+                                                  </widget>
432
+                                                  <packing>
433
+                                                    <property name="Position">0</property>
434
+                                                    <property name="AutoSize">True</property>
435
+                                                  </packing>
436
+                                                </child>
437
+                                                <child>
438
+                                                  <widget class="Gtk.RadioButton" id="radioButtonWithoutWatchdog">
439
+                                                    <property name="MemberName" />
440
+                                                    <property name="CanFocus">True</property>
441
+                                                    <property name="Label" translatable="yes">without watchdog</property>
442
+                                                    <property name="DrawIndicator">True</property>
443
+                                                    <property name="HasLabel">True</property>
444
+                                                    <property name="UseUnderline">True</property>
445
+                                                    <property name="Group">radioGroupRobotActivation</property>
446
+                                                  </widget>
447
+                                                  <packing>
448
+                                                    <property name="Position">1</property>
449
+                                                    <property name="AutoSize">True</property>
450
+                                                  </packing>
451
+                                                </child>
452
+                                              </widget>
453
+                                            </child>
454
+                                          </widget>
455
+                                          <packing>
456
+                                            <property name="Position">0</property>
457
+                                            <property name="AutoSize">True</property>
458
+                                            <property name="Expand">False</property>
459
+                                            <property name="Fill">False</property>
460
+                                          </packing>
461
+                                        </child>
462
+                                        <child>
463
+                                          <widget class="Gtk.Alignment" id="alignment5">
464
+                                            <property name="MemberName" />
465
+                                            <child>
466
+                                              <widget class="Gtk.Alignment" id="alignment7">
467
+                                                <property name="MemberName" />
468
+                                                <child>
469
+                                                  <widget class="Gtk.Button" id="buttonRobotActivation">
470
+                                                    <property name="MemberName" />
471
+                                                    <property name="CanFocus">True</property>
472
+                                                    <property name="Type">TextOnly</property>
473
+                                                    <property name="Label" translatable="yes">Activation</property>
474
+                                                    <property name="UseUnderline">True</property>
475
+                                                    <signal name="Clicked" handler="OnButtonRobotActivationClicked" />
476
+                                                  </widget>
477
+                                                </child>
478
+                                              </widget>
479
+                                            </child>
480
+                                          </widget>
481
+                                          <packing>
482
+                                            <property name="Position">1</property>
483
+                                            <property name="AutoSize">True</property>
484
+                                            <property name="Expand">False</property>
485
+                                            <property name="Fill">False</property>
486
+                                          </packing>
487
+                                        </child>
488
+                                      </widget>
489
+                                    </child>
72 490
                                   </widget>
73
-                                  <packing>
74
-                                    <property name="X">30</property>
75
-                                    <property name="Y">25</property>
76
-                                  </packing>
77 491
                                 </child>
78 492
                               </widget>
493
+                              <packing>
494
+                                <property name="Position">1</property>
495
+                                <property name="AutoSize">True</property>
496
+                                <property name="Expand">False</property>
497
+                                <property name="Fill">False</property>
498
+                              </packing>
79 499
                             </child>
500
+                          </widget>
501
+                          <packing>
502
+                            <property name="Position">2</property>
503
+                            <property name="AutoSize">True</property>
504
+                            <property name="Expand">False</property>
505
+                            <property name="Fill">False</property>
506
+                          </packing>
507
+                        </child>
508
+                        <child>
509
+                          <widget class="Gtk.HSeparator" id="hseparator2">
510
+                            <property name="MemberName" />
511
+                          </widget>
512
+                          <packing>
513
+                            <property name="Position">3</property>
514
+                            <property name="AutoSize">True</property>
515
+                            <property name="Expand">False</property>
516
+                            <property name="Fill">False</property>
517
+                          </packing>
518
+                        </child>
519
+                        <child>
520
+                          <widget class="Gtk.VBox" id="vbox12">
521
+                            <property name="MemberName" />
522
+                            <property name="Spacing">6</property>
80 523
                             <child>
81
-                              <widget class="Gtk.Label" id="GtkLabel2">
524
+                              <widget class="Gtk.Label" id="labelRobotControl">
82 525
                                 <property name="MemberName" />
83
-                                <property name="LabelProp" translatable="yes">&lt;b&gt;Controls&lt;/b&gt;</property>
526
+                                <property name="HeightRequest">36</property>
527
+                                <property name="LabelProp" translatable="yes">&lt;b&gt;&lt;u&gt;Robot Controls and Status&lt;/u&gt;&lt;/b&gt;</property>
84 528
                                 <property name="UseMarkup">True</property>
85 529
                               </widget>
86 530
                               <packing>
87
-                                <property name="type">label_item</property>
531
+                                <property name="Position">0</property>
532
+                                <property name="AutoSize">True</property>
533
+                                <property name="Expand">False</property>
534
+                                <property name="Fill">False</property>
535
+                              </packing>
536
+                            </child>
537
+                            <child>
538
+                              <widget class="Gtk.Alignment" id="gtkAlignmentRobotControl">
539
+                                <property name="MemberName" />
540
+                                <property name="Xalign">0</property>
541
+                                <property name="Yalign">0</property>
542
+                                <property name="LeftPadding">12</property>
543
+                                <child>
544
+                                  <widget class="Gtk.VBox" id="vbox9">
545
+                                    <property name="MemberName" />
546
+                                    <property name="Spacing">6</property>
547
+                                    <child>
548
+                                      <widget class="Gtk.Alignment" id="alignment8">
549
+                                        <property name="MemberName" />
550
+                                        <property name="Xscale">0</property>
551
+                                        <property name="Yscale">0</property>
552
+                                        <child>
553
+                                          <widget class="Gtk.Table" id="table4">
554
+                                            <property name="MemberName" />
555
+                                            <property name="NRows">3</property>
556
+                                            <property name="NColumns">3</property>
557
+                                            <property name="RowSpacing">6</property>
558
+                                            <property name="ColumnSpacing">6</property>
559
+                                            <child>
560
+                                              <placeholder />
561
+                                            </child>
562
+                                            <child>
563
+                                              <placeholder />
564
+                                            </child>
565
+                                            <child>
566
+                                              <placeholder />
567
+                                            </child>
568
+                                            <child>
569
+                                              <placeholder />
570
+                                            </child>
571
+                                            <child>
572
+                                              <placeholder />
573
+                                            </child>
574
+                                            <child>
575
+                                              <widget class="Gtk.Button" id="buttonDown">
576
+                                                <property name="MemberName" />
577
+                                                <property name="CanFocus">True</property>
578
+                                                <property name="Type">TextAndIcon</property>
579
+                                                <property name="Icon">resource:monitor.ressources.pan-down-symbolic.symbolic.png</property>
580
+                                                <property name="Label" translatable="yes" />
581
+                                                <property name="UseUnderline">True</property>
582
+                                                <signal name="Clicked" handler="OnButtonMouvClicked" />
583
+                                              </widget>
584
+                                              <packing>
585
+                                                <property name="TopAttach">2</property>
586
+                                                <property name="BottomAttach">3</property>
587
+                                                <property name="LeftAttach">1</property>
588
+                                                <property name="RightAttach">2</property>
589
+                                                <property name="AutoSize">True</property>
590
+                                                <property name="XOptions">Fill</property>
591
+                                                <property name="YOptions">Fill</property>
592
+                                                <property name="XExpand">False</property>
593
+                                                <property name="XFill">True</property>
594
+                                                <property name="XShrink">False</property>
595
+                                                <property name="YExpand">False</property>
596
+                                                <property name="YFill">True</property>
597
+                                                <property name="YShrink">False</property>
598
+                                              </packing>
599
+                                            </child>
600
+                                            <child>
601
+                                              <widget class="Gtk.Button" id="buttonForward">
602
+                                                <property name="MemberName" />
603
+                                                <property name="CanFocus">True</property>
604
+                                                <property name="Type">TextAndIcon</property>
605
+                                                <property name="Icon">resource:monitor.ressources.pan-up-symbolic.symbolic.png</property>
606
+                                                <property name="Label" translatable="yes" />
607
+                                                <property name="UseUnderline">True</property>
608
+                                                <signal name="Clicked" handler="OnButtonMouvClicked" />
609
+                                              </widget>
610
+                                              <packing>
611
+                                                <property name="LeftAttach">1</property>
612
+                                                <property name="RightAttach">2</property>
613
+                                                <property name="AutoSize">True</property>
614
+                                                <property name="XOptions">Fill</property>
615
+                                                <property name="YOptions">Fill</property>
616
+                                                <property name="XExpand">False</property>
617
+                                                <property name="XFill">True</property>
618
+                                                <property name="XShrink">False</property>
619
+                                                <property name="YExpand">False</property>