From a1cd0af6ef1af18aed739977e1a7d166ac25714e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20DI=20MERCURIO?= Date: Wed, 7 Nov 2018 11:32:19 +0100 Subject: [PATCH] sauvegarde --- .gitignore | 4 +- software/monitor/monitor/Client.cs | 156 ++++ software/monitor/monitor/CommandManager.cs | 110 +++ .../monitor/monitor/DestijlCommandManager.cs | 420 ++++++++++ software/monitor/monitor/MonitorUI.cs | 436 ++++++++++ .../monitor/monitor/gtk-gui/MainWindow.cs | 657 +++++++++++++-- software/monitor/monitor/gtk-gui/gui.stetic | 775 ++++++++++++++++-- software/monitor/monitor/monitor.csproj | 11 + .../monitor/ressources/missing_picture.png | Bin 0 -> 1622 bytes .../ressources/pan-down-symbolic.symbolic.png | Bin 0 -> 124 bytes .../ressources/pan-end-symbolic.symbolic.png | Bin 0 -> 158 bytes .../pan-start-symbolic.symbolic.png | Bin 0 -> 155 bytes .../ressources/pan-up-symbolic.symbolic.png | Bin 0 -> 125 bytes .../monitor/monitor/ressources/robot-icon.png | Bin 0 -> 12144 bytes .../monitor/ressources/robot-icon.resized.png | Bin 0 -> 913 bytes .../superviseur-robot/lib/definitions.h | 2 +- .../raspberry/superviseur-robot/lib/image.h | 13 +- .../raspberry/superviseur-robot/lib/robot.h | 1 - .../superviseur-robot/lib/src/image.cpp | 33 +- .../superviseur/nbproject/private/private.xml | 2 +- .../superviseur/src/main.cpp | 2 +- software/raspberry/testeur/testeur/.dep.inc | 5 + software/raspberry/testeur/testeur/Makefile | 128 +++ software/raspberry/testeur/testeur/main.cpp | 256 ++++++ .../testeur/nbproject/Makefile-Debug.mk | 107 +++ .../testeur/nbproject/Makefile-Release.mk | 107 +++ .../testeur/nbproject/Makefile-impl.mk | 133 +++ .../testeur/nbproject/Makefile-variables.mk | 35 + .../testeur/nbproject/Package-Debug.bash | 76 ++ .../testeur/nbproject/Package-Release.bash | 76 ++ .../testeur/nbproject/configurations.xml | 180 ++++ .../nbproject/private/Makefile-variables.mk | 7 + .../private/c_standard_headers_indexer.c | 75 ++ .../nbproject/private/configurations.xml | 74 ++ .../private/cpp_standard_headers_indexer.cpp | 135 +++ .../nbproject/private/launcher.properties | 42 + .../testeur/nbproject/private/private.xml | 7 + .../testeur/testeur/nbproject/project.xml | 30 + 38 files changed, 3967 insertions(+), 128 deletions(-) create mode 100644 software/monitor/monitor/Client.cs create mode 100644 software/monitor/monitor/CommandManager.cs create mode 100644 software/monitor/monitor/DestijlCommandManager.cs create mode 100644 software/monitor/monitor/ressources/missing_picture.png create mode 100644 software/monitor/monitor/ressources/pan-down-symbolic.symbolic.png create mode 100644 software/monitor/monitor/ressources/pan-end-symbolic.symbolic.png create mode 100644 software/monitor/monitor/ressources/pan-start-symbolic.symbolic.png create mode 100644 software/monitor/monitor/ressources/pan-up-symbolic.symbolic.png create mode 100644 software/monitor/monitor/ressources/robot-icon.png create mode 100644 software/monitor/monitor/ressources/robot-icon.resized.png create mode 100644 software/raspberry/testeur/testeur/.dep.inc create mode 100644 software/raspberry/testeur/testeur/Makefile create mode 100644 software/raspberry/testeur/testeur/main.cpp create mode 100644 software/raspberry/testeur/testeur/nbproject/Makefile-Debug.mk create mode 100644 software/raspberry/testeur/testeur/nbproject/Makefile-Release.mk create mode 100644 software/raspberry/testeur/testeur/nbproject/Makefile-impl.mk create mode 100644 software/raspberry/testeur/testeur/nbproject/Makefile-variables.mk create mode 100644 software/raspberry/testeur/testeur/nbproject/Package-Debug.bash create mode 100644 software/raspberry/testeur/testeur/nbproject/Package-Release.bash create mode 100644 software/raspberry/testeur/testeur/nbproject/configurations.xml create mode 100644 software/raspberry/testeur/testeur/nbproject/private/Makefile-variables.mk create mode 100644 software/raspberry/testeur/testeur/nbproject/private/c_standard_headers_indexer.c create mode 100644 software/raspberry/testeur/testeur/nbproject/private/configurations.xml create mode 100644 software/raspberry/testeur/testeur/nbproject/private/cpp_standard_headers_indexer.cpp create mode 100644 software/raspberry/testeur/testeur/nbproject/private/launcher.properties create mode 100644 software/raspberry/testeur/testeur/nbproject/private/private.xml create mode 100644 software/raspberry/testeur/testeur/nbproject/project.xml diff --git a/.gitignore b/.gitignore index e76c98c..2a5926b 100644 --- a/.gitignore +++ b/.gitignore @@ -62,4 +62,6 @@ GUI # Android *.apk -/software/raspberry/superviseur-robot/superviseur/dist/ \ No newline at end of file +/software/raspberry/superviseur-robot/superviseur/dist/ +/software/raspberry/testeur/testeur/build/ +/software/raspberry/testeur/testeur/dist/ \ No newline at end of file diff --git a/software/monitor/monitor/Client.cs b/software/monitor/monitor/Client.cs new file mode 100644 index 0000000..0f6fe01 --- /dev/null +++ b/software/monitor/monitor/Client.cs @@ -0,0 +1,156 @@ +using System; +using System.Net.Sockets; +using System.Threading; +using System.Text; + +namespace monitor +{ + public class ClientReadEvent + { + private static TcpClient myClient = null; + private static NetworkStream myStream = null; + private const int BufferMaxSize = 512; + private static byte[] buffer = new byte[BufferMaxSize]; + private static StringBuilder sb = new StringBuilder(); + private static int newLength = 1; + + public delegate void ReadEvent(string str); + public static ReadEvent readEvent = null; + + public static void Set(TcpClient client, NetworkStream stream) + { + myClient = client; + myStream = stream; + } + + public static void ReadThread() + { + while (true) + { + if (myClient.Connected) + { + myStream.BeginRead(buffer, 0, newLength, new AsyncCallback(ReadCallback), sb); + } + else Thread.Sleep(200); + } + } + + public static void ReadCallback(IAsyncResult ar) + { + + } + } + + public class Client + { + public const string defaultIP = "localhost"; + public const int defaultPort = 4500; + + private static TcpClient client = null; + private static NetworkStream stream = null; + + private const int BufferMaxSize = 512; + private static byte[] buffer = new byte[BufferMaxSize]; + private static StringBuilder message = new StringBuilder(); + private static int newLength = 1; + + public delegate void ReadEvent(string msg); + public static ReadEvent readEvent = null; + + public Client() + { + } + + public static bool Open(string host) + { + return Client.Open(host, defaultPort); + } + + public static bool Open(string host, int port) + { + bool status = true; + + try + { + client = new TcpClient(host, port); + + stream = client.GetStream(); + + stream.BeginRead(buffer, 0, newLength, new AsyncCallback(ReadCallback), message); + } + catch (ArgumentNullException e) + { + Console.WriteLine("ArgumentNullException: " + e); + status = false; + } + catch (SocketException e) + { + Console.WriteLine("SocketException: " + e.ToString()); + status = false; + } + catch (Exception e) + { + Console.WriteLine("Unknown Exception: " + e.ToString()); + status = false; + } + + return status; + } + + public static void Close() + { + if (stream!=null) stream.Close(); + if (client!=null) client.Close(); + } + + private static void ReadCallback(IAsyncResult ar) + { + if (client.Connected) + { + int bytesRead; + + try + { + bytesRead = stream.EndRead(ar); + } + catch (ObjectDisposedException e) + { + Console.WriteLine("Connection to server dropped: " + e.ToString()); + return; + } + + newLength = 1; + + if (bytesRead > 0) + { + message.Append(Encoding.ASCII.GetString(buffer, 0, bytesRead)); + } + + if (client.Available > 0) + { + newLength = client.Available; + if (newLength > BufferMaxSize) newLength = BufferMaxSize; + else newLength = client.Available; + } + else + { + readEvent?.Invoke(message.ToString()); + + message.Clear(); + } + + stream.BeginRead(buffer, 0, newLength, new AsyncCallback(ReadCallback), message); + } + } + + public static void Write(string mes) + { + if (client.Connected) + { + byte[] writeBuffer = Encoding.UTF8.GetBytes(mes); + + stream.Write(writeBuffer, 0, mes.Length); + } + } + } +} diff --git a/software/monitor/monitor/CommandManager.cs b/software/monitor/monitor/CommandManager.cs new file mode 100644 index 0000000..3a02bd8 --- /dev/null +++ b/software/monitor/monitor/CommandManager.cs @@ -0,0 +1,110 @@ +using System.Threading; + +namespace monitor +{ + public class CommandManager + { + public delegate void CommandReceivedEvent(string msg); + public CommandReceivedEvent commandReceivedEvent = null; + + private System.Timers.Timer waitTimer = new System.Timers.Timer(); + private ManualResetEvent waitEvent = new ManualResetEvent(false); + + private bool waitForAcknowledge = false; + + private string messageReceived = null; + private bool isBusy = false; + + public enum CommandManagerStatus + { + AnswerReceived, + Timeout, + Busy + }; + + public CommandManager(CommandReceivedEvent callback) + { + Client.readEvent += this.OnMessageReception; + + this.commandReceivedEvent += callback; + waitTimer.Elapsed += OnMessageTimeout; + } + + ~CommandManager() + { + Client.Close(); + } + + public bool Open(string hostname) + { + return this.Open(hostname, Client.defaultPort); + } + + public bool Open(string hostname, int port) + { + return Client.Open(hostname, port); + } + + public void Close() + { + Client.Close(); + } + + private void OnMessageReception(string message) + { + waitTimer.Stop(); + this.messageReceived = message; + isBusy = false; + + if (waitForAcknowledge) { + waitForAcknowledge = false; + waitEvent.Set(); // Envoi de l'evenement + } + else { + waitForAcknowledge = false; + this.commandReceivedEvent?.Invoke(message); + } + } + + private void OnMessageTimeout(object sender, System.Timers.ElapsedEventArgs e) + { + messageReceived = null; + OnMessageReception(messageReceived); + } + + public CommandManagerStatus SendCommand(string cmd, out string answer, double timeout) + { + CommandManagerStatus status = CommandManagerStatus.AnswerReceived; + answer = null; + + if (isBusy) status = CommandManagerStatus.Busy; + else + { + isBusy = true; + + Client.Write(cmd); + + if (timeout > 0) // la commande attend un acquitement + { + waitForAcknowledge = true; + waitTimer.Interval = timeout; + waitTimer.Start(); + + waitEvent.WaitOne(); + waitEvent.Reset(); // remise à zero pour une prochaine commande + + if (this.messageReceived == null) // timeout: connection au serveur defectueuse + { + status = CommandManagerStatus.Timeout; + } + } + else isBusy = false; + + answer = this.messageReceived; + this.messageReceived = null; + } + + return status; + } + } +} diff --git a/software/monitor/monitor/DestijlCommandManager.cs b/software/monitor/monitor/DestijlCommandManager.cs new file mode 100644 index 0000000..cfdb8c8 --- /dev/null +++ b/software/monitor/monitor/DestijlCommandManager.cs @@ -0,0 +1,420 @@ +using System; + +namespace monitor +{ + public class DestijlCommandList + { + public const string HeaderMtsComDmb = "COM"; + public const string HeaderMtsDmbOrder = "DMB"; + public const string HeaderMtsCamera = "CAM"; + public const string HeaderMtsMessage = "MSG"; + + public const string DataComOpen = "o"; + public const string DataComClose = "C"; + + public const string DataCamOpen = "A"; + public const string DataCamClose = "I"; + public const string DataCamAskArena = "y"; + public const string DataCamArenaConfirm = "x"; + public const string DataCamInfirm = "z"; + public const string DataCamComputePosition = "p"; + public const string DataCamStopComputePosition = "s"; + + public const string HeaderStmAck = "ACK"; + public const string HeaderStmNoAck = "NAK"; + public const string HeaderStmLostDmb = "LCD"; + public const string HeaderStmImage = "IMG"; + public const string HeaderStmPos = "POS"; + public const string HeaderStmMes = "MSG"; + public const string HeaderStmBat = "BAT"; + } + + public class RobotCommandList + { + public const string RobotPing = "p"; + public const string RobotReset = "r"; + public const string RobotStartWithoutWatchdog = "u"; + public const string RobotStartWithWatchdog = "W"; + public const string RobotGetBattery = "v"; + public const string RobotGetBusyState = "b"; + public const string RobotMove = "M"; + public const string RobotTurn = "T"; + public const string RobotGetVersion = "V"; + public const string RobotPowerOff = "z"; + } + + public class DestijlCommandManager + { + private CommandManager commandManager = null; + + private string receivedHeader = null; + private string receivedData = null; + + public delegate void CommandReceivedEvent(string header, string data); + public CommandReceivedEvent commandReceivedEvent = null; + + public double timeout = 100; // timeout pour les commandes avec acquitement + + public enum CommandStatus + { + Success, + Rejected, + InvalidAnswer, + Busy, + CommunicationLostWithRobot, + CommunicationLostWithServer + } + + public DestijlCommandManager(CommandReceivedEvent callback) + { + commandManager = new CommandManager(OnCommandReceived); + this.commandReceivedEvent += callback; + } + + ~DestijlCommandManager() + { + if (commandManager != null) commandManager.Close(); + } + + private void OnCommandReceived(string msg) + { + string[] msgs = msg.Split(':'); + + if (msgs.Length >= 1) receivedHeader = msgs[0]; + else receivedHeader = null; + + if (msgs.Length >= 2) receivedData = msgs[1]; + else receivedData = null; + + this.commandReceivedEvent?.Invoke(receivedHeader, receivedData); + } + + public bool Open(string hostname) + { + return this.Open(hostname, Client.defaultPort); + } + + public bool Open(string hostname, int port) + { + if (commandManager != null) return commandManager.Open(hostname, port); + else return false; + } + + public void Close() + { + if (commandManager != null) commandManager.Close(); + } + + private string CreateCommand(string header, string data) + { + return header + ":" + data; + } + + private void SplitCommand(string cmd, out string header, out string data) + { + string[] cmdParts = cmd.Split(':'); + + if (cmdParts.Length > 0) header = cmdParts[0]; + else header = null; + + if (cmdParts.Length > 1) data = cmdParts[1]; + else data = null; + } + + private CommandStatus DecodeStatus(CommandManager.CommandManagerStatus localStatus, string answer) + { + CommandStatus status = CommandStatus.Success; + + if (localStatus == CommandManager.CommandManagerStatus.Timeout) status = CommandStatus.CommunicationLostWithServer; + else if (localStatus == CommandManager.CommandManagerStatus.Busy) status = CommandStatus.Busy; + else + { + if (answer != null) + { + if (answer.ToUpper().Contains(DestijlCommandList.HeaderStmNoAck)) status = CommandStatus.Rejected; + else if (answer.ToUpper().Contains(DestijlCommandList.HeaderStmLostDmb)) status = CommandStatus.CommunicationLostWithRobot; + else if (answer.ToUpper().Contains(DestijlCommandList.HeaderStmAck)) status = CommandStatus.Success; + else if (answer.Length == 0) status = CommandStatus.CommunicationLostWithServer; + else status = CommandStatus.InvalidAnswer; + } + } + + return status; + } + + public CommandStatus RobotOpenCom() + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsComDmb, DestijlCommandList.DataComOpen), + out answer, + this.timeout); + + return DecodeStatus(localStatus, answer); + } + + public CommandStatus RobotCloseCom() + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsComDmb, DestijlCommandList.DataComClose), + out answer, + this.timeout); + + return DecodeStatus(localStatus, answer); + } + + public CommandStatus RobotPing() + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotPing), + out answer, + this.timeout); + + return DecodeStatus(localStatus, answer); + } + + public CommandStatus RobotReset() + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotReset), + out answer, + 0); + + return DecodeStatus(localStatus, answer); + } + + public CommandStatus RobotStartWithWatchdog() + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotStartWithWatchdog), + out answer, + this.timeout); + + return DecodeStatus(localStatus, answer); + } + + public CommandStatus RobotStartWithoutWatchdog() + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotStartWithoutWatchdog), + out answer, + this.timeout); + + return DecodeStatus(localStatus, answer); + } + + public CommandStatus RobotMove(int distance) + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotMove + "=" + distance), + out answer, + 0); + + return DecodeStatus(localStatus, answer); + } + + public CommandStatus RobotTurn(int angle) + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotTurn + "=" + angle), + out answer, + 0); + + return DecodeStatus(localStatus, answer); + } + + //public CommandStatus RobotGetBattery(out int battery) + public CommandStatus RobotGetBattery() + { + CommandManager.CommandManagerStatus localStatus; + //CommandStatus status = CommandStatus.Success; + + //battery = -1; + + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotGetBattery), + out answer, + 0); + + //if (localStatus == CommandManager.CommandManagerStatus.AnswerReceived) { + // string[] msg = answer.Split(':'); + + // if (msg.Length > 1) + // { + // try + // { + // battery = Convert.ToInt32(msg[1]); + // } + // catch (Exception) { } + // } + //} + //else if (localStatus == CommandManager.CommandManagerStatus.Timeout) + //{ + // status = CommandStatus.CommunicationLostWithServer; + //} + + //return status; + return DecodeStatus(localStatus, answer); + } + + public CommandStatus RobotGetVersion(out string version) + { + CommandManager.CommandManagerStatus localStatus; + CommandStatus status = CommandStatus.Success; + + version = ""; + + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotGetVersion), + out answer, + this.timeout); + + if (localStatus == CommandManager.CommandManagerStatus.AnswerReceived) + { + string[] msg = answer.Split(':'); + + if (msg.Length > 1) + { + version = msg[1]; + } + } + else if (localStatus == CommandManager.CommandManagerStatus.Timeout) + { + status = CommandStatus.CommunicationLostWithServer; + } + + return status; + } + + public CommandStatus RobotPowerOff() + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsDmbOrder, RobotCommandList.RobotPowerOff), + out answer, + 0); + + return DecodeStatus(localStatus, answer); + } + + public CommandStatus CameraOpen() + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsCamera, DestijlCommandList.DataCamOpen), + out answer, + this.timeout); + + return DecodeStatus(localStatus, answer); + } + + public CommandStatus CameraClose() + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsCamera, DestijlCommandList.DataCamClose), + out answer, + 0); + + return DecodeStatus(localStatus, answer); + } + + public CommandStatus CameraAskArena() + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsCamera, DestijlCommandList.DataCamAskArena), + out answer, + 0); + + return DecodeStatus(localStatus, answer); + } + + public CommandStatus CameraArenaConfirm() + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsCamera, DestijlCommandList.DataCamArenaConfirm), + out answer, + 0); + + return DecodeStatus(localStatus, answer); + } + + public CommandStatus CameraArenaInfirm() + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsCamera, DestijlCommandList.DataCamInfirm), + out answer, + 0); + + return DecodeStatus(localStatus, answer); + } + + public CommandStatus CameraComputePosition() + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsCamera, DestijlCommandList.DataCamComputePosition), + out answer, + 0); + + return DecodeStatus(localStatus, answer); + } + + public CommandStatus CameraStopComputePosition() + { + CommandManager.CommandManagerStatus localStatus; + string answer; + + localStatus = commandManager.SendCommand( + CreateCommand(DestijlCommandList.HeaderMtsCamera, DestijlCommandList.DataCamStopComputePosition), + out answer, + 0); + + return DecodeStatus(localStatus, answer); + } + } +} diff --git a/software/monitor/monitor/MonitorUI.cs b/software/monitor/monitor/MonitorUI.cs index 8aad94d..09e7a3a 100644 --- a/software/monitor/monitor/MonitorUI.cs +++ b/software/monitor/monitor/MonitorUI.cs @@ -1,16 +1,452 @@ using System; using Gtk; +using Gdk; + +using monitor; public partial class MainWindow : Gtk.Window { + private DestijlCommandManager cmdManager; + private Pixbuf drawingareaCameraPixbuf; + + enum SystemState + { + NotConnected, + ServerConnected, + RobotConnected + }; + + private SystemState systemState = SystemState.NotConnected; + private System.Timers.Timer batteryTimer; + public MainWindow() : base(Gtk.WindowType.Toplevel) { Build(); + + cmdManager = new DestijlCommandManager(OnCommandReceivedEvent); + + batteryTimer = new System.Timers.Timer(10000.0); + batteryTimer.Elapsed += OnBatteryTimerElapsed; + + AdjustControls(); + } + + public void AdjustControls() + { + ChangeState(SystemState.NotConnected); + + drawingareaCameraPixbuf = new Pixbuf((string)null); + drawingareaCameraPixbuf = Pixbuf.LoadFromResource("monitor.ressources.missing_picture.png"); + + entryServerName.Text = Client.defaultIP; + entryServerPort.Text = Client.defaultPort.ToString(); + entryTimeout.Text = "10000"; + } + + private void ChangeState(SystemState newState) + { + switch (newState) + { + case SystemState.NotConnected: + labelRobot.Sensitive = false; + gtkAlignmentRobot.Sensitive = false; + + labelRobotControl.Sensitive = false; + gtkAlignmentRobotControl.Sensitive = false; + boxCamera.Sensitive = false; + + buttonServerConnection.Label = "Connect"; + buttonRobotActivation.Label = "Activate"; + labelBatteryLevel.Text = "Unknown"; + + checkButtonCameraOn.Active = false; + checkButtonRobotPosition.Active = false; + if (cmdManager != null) cmdManager.Close(); + + batteryTimer.Stop(); + break; + case SystemState.ServerConnected: + buttonServerConnection.Label = "Disconnect"; + buttonRobotActivation.Label = "Activate"; + labelBatteryLevel.Text = "Unknown"; + + labelRobot.Sensitive = true; + gtkAlignmentRobot.Sensitive = true; + boxCamera.Sensitive = true; + + labelRobotControl.Sensitive = false; + gtkAlignmentRobotControl.Sensitive = false; + + batteryTimer.Stop(); + break; + case SystemState.RobotConnected: + buttonRobotActivation.Label = "Reset"; + labelRobotControl.Sensitive = true; + gtkAlignmentRobotControl.Sensitive = true; + + batteryTimer.Start(); + break; + default: + labelRobot.Sensitive = false; + gtkAlignmentRobot.Sensitive = false; + + labelRobotControl.Sensitive = false; + gtkAlignmentRobotControl.Sensitive = false; + boxCamera.Sensitive = false; + + buttonServerConnection.Label = "Connect"; + buttonRobotActivation.Label = "Activate"; + labelBatteryLevel.Text = "Unknown"; + + checkButtonCameraOn.Active = false; + checkButtonRobotPosition.Active = false; + + systemState = SystemState.NotConnected; + + return; + } + + systemState = newState; + } + + private void MessagePopup(MessageType type, ButtonsType buttons, string title, string message) + { + MessageDialog md = new MessageDialog(this, DialogFlags.DestroyWithParent, type, buttons, message) + { + Title = title + }; + + md.Run(); + md.Destroy(); } protected void OnDeleteEvent(object sender, DeleteEventArgs a) { + Console.WriteLine("Bye bye"); + + if (cmdManager != null) cmdManager.Close(); Application.Quit(); a.RetVal = true; } + + public void OnCommandReceivedEvent(string header, string data) + { + if (header != null) Console.WriteLine("Received header (" + header.Length + "): " + header); + if (data != null) Console.WriteLine("Received data (" + data.Length + "): " + data); + + if (header.ToUpper() == DestijlCommandList.HeaderStmBat) + { + switch (data[0]) + { + case '2': + labelBatteryLevel.Text = "High"; + break; + case '1': + labelBatteryLevel.Text = "Low"; + break; + case '0': + labelBatteryLevel.Text = "Empty"; + break; + default: + labelBatteryLevel.Text = "Invalid value"; + break; + } + } + } + + protected void OnQuitActionActivated(object sender, EventArgs e) + { + Console.WriteLine("Bye bye 2"); + if (cmdManager != null) cmdManager.Close(); + this.Destroy(); + Application.Quit(); + } + + protected void OnShowLogWindowActionActivated(object sender, EventArgs e) + { + MessagePopup(MessageType.Info, + ButtonsType.Ok, "Info", + "Logger not yet implemented"); + } + + protected void OnButtonServerConnectionClicked(object sender, EventArgs e) + { + DestijlCommandManager.CommandStatus statusCmd; + + if (buttonServerConnection.Label == "Disconnect") + { + ChangeState(SystemState.NotConnected); + } + else + { + if ((entryServerName.Text == "") || (entryServerPort.Text == "")) + { + MessagePopup(MessageType.Error, + ButtonsType.Ok, "Error", + "Server name or port is invalid"); + } + else + { + Console.WriteLine("Connecting to " + entryServerName.Text + ":" + entryServerPort.Text); + bool status = false; + + try + { + cmdManager.timeout = Convert.ToDouble(entryTimeout.Text); + } + catch (Exception) + { + cmdManager.timeout = 100; + entryTimeout.Text = cmdManager.timeout.ToString(); + } + + try + { + status = cmdManager.Open(entryServerName.Text, Convert.ToInt32(entryServerPort.Text)); + } + catch (Exception) + { + Console.WriteLine("Something went wrong during connection"); + return; + } + + if (status != true) + { + MessagePopup(MessageType.Error, + ButtonsType.Ok, "Error", + "Unable to connect to server " + entryServerName.Text + ":" + Convert.ToInt32(entryServerPort.Text)); + } + else + { + Console.Write("Send command RobotOpenCom: "); + statusCmd = cmdManager.RobotOpenCom(); + Console.WriteLine(statusCmd.ToString()); + + if (statusCmd == DestijlCommandManager.CommandStatus.Success) + { + ChangeState(SystemState.ServerConnected); + } + else + { + MessagePopup(MessageType.Error, + ButtonsType.Ok, "Error", + "Unable to open communication with robot.\nCheck that supervisor is accepting OPEN_COM_DMB command"); + + cmdManager.Close(); + } + } + } + } + } + + protected void OnButtonRobotActivationClicked(object sender, EventArgs e) + { + DestijlCommandManager.CommandStatus status; + + if (buttonRobotActivation.Label == "Activate") // activation du robot + { + if (radioButtonWithWatchdog.Active) // Demarrage avec watchdog + { + status = cmdManager.RobotStartWithWatchdog(); + } + else // Demarrage sans watchdog + { + status = cmdManager.RobotStartWithoutWatchdog(); + } + + if (status == DestijlCommandManager.CommandStatus.Success) + { + ChangeState(SystemState.RobotConnected); + } + else + { + if (status == DestijlCommandManager.CommandStatus.CommunicationLostWithServer) + { + MessagePopup(MessageType.Error, ButtonsType.Ok, "Error", "Connection lost with server"); + ChangeState(SystemState.NotConnected); + } + else + { + MessagePopup(MessageType.Error, ButtonsType.Ok, "Error", "Command rejected\nCheck that supervisor accept \nDMB_START_WITH_WD and/or DMB_START_WITHOUT_WD"); + } + } + } + else // Reset du robot + { + status = cmdManager.RobotReset(); + + if (status == DestijlCommandManager.CommandStatus.Success) + { + ChangeState(SystemState.ServerConnected); + } + else + { + if (status == DestijlCommandManager.CommandStatus.CommunicationLostWithServer) + { + MessagePopup(MessageType.Error, ButtonsType.Ok, "Error", "Connection lost with server"); + ChangeState(SystemState.NotConnected); + } + else + { + MessagePopup(MessageType.Error, ButtonsType.Ok, "Error", "Unknown error"); + } + } + } + } + + protected void OnButtonMouvClicked(object sender, EventArgs e) + { + if (sender == buttonRight) + { + cmdManager.RobotTurn(90); + + } + else if (sender == buttonLeft) + { + cmdManager.RobotTurn(-90); + } + else if (sender == buttonForward) + { + cmdManager.RobotMove(100); + } + else if (sender == buttonDown) + { + cmdManager.RobotMove(-100); + } + else + { + MessagePopup(MessageType.Warning, ButtonsType.Ok, "Abnormal behavior", "Callback OnButtonMouvClicked called by unknown sender"); + } + } + + void OnBatteryTimerElapsed(object sender, System.Timers.ElapsedEventArgs e) + { + DestijlCommandManager.CommandStatus status; + //int batteryLevel; + + batteryTimer.Stop(); + + if (checkButtonGetBattery.Active) + { + //status = cmdManager.RobotGetBattery(out batteryLevel); + status = cmdManager.RobotGetBattery(); + switch (status) + { + case DestijlCommandManager.CommandStatus.Success: + /*switch (batteryLevel) + { + case 2: + labelBatteryLevel.Text = "High"; + break; + case 1: + labelBatteryLevel.Text = "Low"; + break; + case 0: + labelBatteryLevel.Text = "Empty"; + break; + default: + labelBatteryLevel.Text = "Unknown"; + break; + }*/ + + batteryTimer.Start(); + break; + case DestijlCommandManager.CommandStatus.CommunicationLostWithServer: + //MessagePopup(MessageType.Error, ButtonsType.Ok, "Error", "Connection lost with server"); + Console.WriteLine("Error: Connection lost with server"); + batteryTimer.Stop(); + labelBatteryLevel.Text = "Unknown"; + + ChangeState(SystemState.NotConnected); + break; + case DestijlCommandManager.CommandStatus.CommunicationLostWithRobot: + //MessagePopup(MessageType.Error, ButtonsType.Ok, "Error", "Connection lost with robot"); + Console.WriteLine("Error: Connection lost with robot"); + batteryTimer.Stop(); + labelBatteryLevel.Text = "Unknown"; + + ChangeState(SystemState.ServerConnected); + break; + default: + labelBatteryLevel.Text = "Unknown"; + batteryTimer.Start(); + break; + } + } + else batteryTimer.Start(); + } + + protected void OnCheckButtonCameraOnClicked(object sender, EventArgs e) + { + if (!checkButtonCameraOn.Active) + { + if (cmdManager.CameraClose() != DestijlCommandManager.CommandStatus.Success) + { + MessagePopup(MessageType.Error, + ButtonsType.Ok, "Error", + "Error when closing camera: bad answer for supervisor or timeout"); + } + } + else + { + if (cmdManager.CameraOpen() != DestijlCommandManager.CommandStatus.Success) + { + MessagePopup(MessageType.Error, + ButtonsType.Ok, "Error", + "Error when opening camera: bad answer for supervisor or timeout"); + checkButtonCameraOn.Active = false; + } + } + } + + protected void OnCheckButtonRobotPositionClicked(object sender, EventArgs e) + { + if (!checkButtonRobotPosition.Active) + { + if (cmdManager.CameraStopComputePosition() != DestijlCommandManager.CommandStatus.Success) + { + MessagePopup(MessageType.Error, + ButtonsType.Ok, "Error", + "Error when stopping position reception: bad answer for supervisor or timeout"); + } + } + else + { + if (cmdManager.CameraComputePosition() != DestijlCommandManager.CommandStatus.Success) + { + MessagePopup(MessageType.Error, + ButtonsType.Ok, "Error", + "Error when starting getting robot position: bad answer for supervisor or timeout"); + + checkButtonRobotPosition.Active = false; + } + } + } + + protected void OnDrawingAreaCameraRealized(object sender, EventArgs e) + { + Console.WriteLine("Event realized. Args = " + e.ToString()); + } + + protected void OnDrawingAreaCameraExposeEvent(object o, ExposeEventArgs args) + { + //Console.WriteLine("Event expose. Args = " + args.ToString()); + + DrawingArea area = (DrawingArea)o; + Gdk.GC gc = area.Style.BackgroundGC(Gtk.StateType.Normal); + + area.GdkWindow.GetSize(out int areaWidth, out int areaHeight); + + area.GdkWindow.DrawPixbuf(gc, drawingareaCameraPixbuf, + 0, 0, + (areaWidth - drawingareaCameraPixbuf.Width) / 2, + (areaHeight - drawingareaCameraPixbuf.Height) / 2, + drawingareaCameraPixbuf.Width, drawingareaCameraPixbuf.Height, + RgbDither.Normal, 0, 0); + } + + protected void OnDrawingAreaCameraConfigureEvent(object o, ConfigureEventArgs args) + { + //Console.WriteLine("Event configure. Args = " + args.ToString()); + } } diff --git a/software/monitor/monitor/gtk-gui/MainWindow.cs b/software/monitor/monitor/gtk-gui/MainWindow.cs index 2397dbf..8200e46 100644 --- a/software/monitor/monitor/gtk-gui/MainWindow.cs +++ b/software/monitor/monitor/gtk-gui/MainWindow.cs @@ -5,27 +5,119 @@ public partial class MainWindow { private global::Gtk.UIManager UIManager; + private global::Gtk.Action FileAction; + + private global::Gtk.Action QuitAction; + + private global::Gtk.Action LogAction; + + private global::Gtk.Action ShowLogWindowAction; + private global::Gtk.VBox vbox1; - private global::Gtk.MenuBar menubar1; + private global::Gtk.MenuBar menuBar; private global::Gtk.HBox hbox1; - private global::Gtk.DrawingArea drawingarea1; + private global::Gtk.VBox boxCamera; + + private global::Gtk.DrawingArea drawingAreaCamera; private global::Gtk.Alignment alignment1; - private global::Gtk.ScrolledWindow GtkScrolledWindow; + private global::Gtk.HBox hbox2; - private global::Gtk.Frame frame1; + private global::Gtk.CheckButton checkButtonCameraOn; - private global::Gtk.Fixed fixed4; + private global::Gtk.CheckButton checkButtonRobotPosition; - private global::Gtk.Button button7; + private global::Gtk.HBox hbox3; - private global::Gtk.Label GtkLabel2; + private global::Gtk.VSeparator vseparator1; - private global::Gtk.Statusbar statusbar1; + private global::Gtk.Alignment alignment3; + + private global::Gtk.VBox vbox5; + + private global::Gtk.VBox vbox10; + + private global::Gtk.Label labelServer; + + private global::Gtk.Alignment gtkAlignmentServer; + + private global::Gtk.VBox vbox6; + + private global::Gtk.Table table1; + + private global::Gtk.Entry entryServerName; + + private global::Gtk.Entry entryServerPort; + + private global::Gtk.Entry entryTimeout; + + private global::Gtk.Label label1; + + private global::Gtk.Label label2; + + private global::Gtk.Label label5; + + private global::Gtk.Button buttonServerConnection; + + private global::Gtk.HSeparator hseparator1; + + private global::Gtk.VBox vbox11; + + private global::Gtk.Label labelRobot; + + private global::Gtk.Alignment alignment9; + + private global::Gtk.Alignment gtkAlignmentRobot; + + private global::Gtk.VBox vbox8; + + private global::Gtk.Alignment alignment6; + + private global::Gtk.HBox hbox4; + + private global::Gtk.RadioButton radioButtonWithWatchdog; + + private global::Gtk.RadioButton radioButtonWithoutWatchdog; + + private global::Gtk.Alignment alignment5; + + private global::Gtk.Alignment alignment7; + + private global::Gtk.Button buttonRobotActivation; + + private global::Gtk.HSeparator hseparator2; + + private global::Gtk.VBox vbox12; + + private global::Gtk.Label labelRobotControl; + + private global::Gtk.Alignment gtkAlignmentRobotControl; + + private global::Gtk.VBox vbox9; + + private global::Gtk.Alignment alignment8; + + private global::Gtk.Table table4; + + private global::Gtk.Button buttonDown; + + private global::Gtk.Button buttonForward; + + private global::Gtk.Button buttonLeft; + + private global::Gtk.Button buttonRight; + + private global::Gtk.Table table3; + + private global::Gtk.Label label3; + + private global::Gtk.Label labelBatteryLevel; + + private global::Gtk.CheckButton checkButtonGetBattery; protected virtual void Build() { @@ -33,21 +125,37 @@ public partial class MainWindow // Widget MainWindow this.UIManager = new global::Gtk.UIManager(); global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup("Default"); + this.FileAction = new global::Gtk.Action("FileAction", global::Mono.Unix.Catalog.GetString("File"), null, null); + this.FileAction.IsImportant = true; + this.FileAction.ShortLabel = global::Mono.Unix.Catalog.GetString("File"); + w1.Add(this.FileAction, null); + this.QuitAction = new global::Gtk.Action("QuitAction", global::Mono.Unix.Catalog.GetString("Quit..."), null, null); + this.QuitAction.IsImportant = true; + this.QuitAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Quit"); + w1.Add(this.QuitAction, "q"); + this.LogAction = new global::Gtk.Action("LogAction", global::Mono.Unix.Catalog.GetString("Log"), null, null); + this.LogAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Log"); + w1.Add(this.LogAction, null); + this.ShowLogWindowAction = new global::Gtk.Action("ShowLogWindowAction", global::Mono.Unix.Catalog.GetString("Show log window"), null, null); + this.ShowLogWindowAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Show log window"); + w1.Add(this.ShowLogWindowAction, "s"); this.UIManager.InsertActionGroup(w1, 0); this.AddAccelGroup(this.UIManager.AccelGroup); this.Name = "MainWindow"; this.Title = global::Mono.Unix.Catalog.GetString("Monitor UI"); + this.Icon = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.robot-icon.resized.png"); this.WindowPosition = ((global::Gtk.WindowPosition)(4)); + this.BorderWidth = ((uint)(5)); // Container child MainWindow.Gtk.Container+ContainerChild this.vbox1 = new global::Gtk.VBox(); this.vbox1.Name = "vbox1"; this.vbox1.Spacing = 6; // Container child vbox1.Gtk.Box+BoxChild - this.UIManager.AddUiFromString(""); - this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1"))); - this.menubar1.Name = "menubar1"; - this.vbox1.Add(this.menubar1); - global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.menubar1])); + this.UIManager.AddUiFromString(@""); + this.menuBar = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menuBar"))); + this.menuBar.Name = "menuBar"; + this.vbox1.Add(this.menuBar); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.menuBar])); w2.Position = 0; w2.Expand = false; w2.Fill = false; @@ -56,71 +164,486 @@ public partial class MainWindow this.hbox1.Name = "hbox1"; this.hbox1.Spacing = 6; // Container child hbox1.Gtk.Box+BoxChild - this.drawingarea1 = new global::Gtk.DrawingArea(); - this.drawingarea1.Name = "drawingarea1"; - this.hbox1.Add(this.drawingarea1); - global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.drawingarea1])); + this.boxCamera = new global::Gtk.VBox(); + this.boxCamera.Name = "boxCamera"; + this.boxCamera.Spacing = 6; + // Container child boxCamera.Gtk.Box+BoxChild + this.drawingAreaCamera = new global::Gtk.DrawingArea(); + this.drawingAreaCamera.Name = "drawingAreaCamera"; + this.boxCamera.Add(this.drawingAreaCamera); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.boxCamera[this.drawingAreaCamera])); w3.Position = 0; - // Container child hbox1.Gtk.Box+BoxChild - this.alignment1 = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F); + // Container child boxCamera.Gtk.Box+BoxChild + this.alignment1 = new global::Gtk.Alignment(0F, 0.5F, 0F, 1F); this.alignment1.Name = "alignment1"; + this.alignment1.BorderWidth = ((uint)(6)); // Container child alignment1.Gtk.Container+ContainerChild - this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); - this.GtkScrolledWindow.Name = "GtkScrolledWindow"; - this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1)); - // Container child GtkScrolledWindow.Gtk.Container+ContainerChild - global::Gtk.Viewport w4 = new global::Gtk.Viewport(); - w4.ShadowType = ((global::Gtk.ShadowType)(0)); - // Container child GtkViewport.Gtk.Container+ContainerChild - this.frame1 = new global::Gtk.Frame(); - this.frame1.Name = "frame1"; - this.frame1.ShadowType = ((global::Gtk.ShadowType)(0)); - // Container child frame1.Gtk.Container+ContainerChild - this.fixed4 = new global::Gtk.Fixed(); - this.fixed4.Name = "fixed4"; - this.fixed4.HasWindow = false; - // Container child fixed4.Gtk.Fixed+FixedChild - this.button7 = new global::Gtk.Button(); - this.button7.CanFocus = true; - this.button7.Name = "button7"; - this.button7.UseUnderline = true; - this.button7.Label = global::Mono.Unix.Catalog.GetString("GtkButton"); - this.fixed4.Add(this.button7); - global::Gtk.Fixed.FixedChild w5 = ((global::Gtk.Fixed.FixedChild)(this.fixed4[this.button7])); - w5.X = 30; - w5.Y = 25; - this.frame1.Add(this.fixed4); - this.GtkLabel2 = new global::Gtk.Label(); - this.GtkLabel2.Name = "GtkLabel2"; - this.GtkLabel2.LabelProp = global::Mono.Unix.Catalog.GetString("Controls"); - this.GtkLabel2.UseMarkup = true; - this.frame1.LabelWidget = this.GtkLabel2; - w4.Add(this.frame1); - this.GtkScrolledWindow.Add(w4); - this.alignment1.Add(this.GtkScrolledWindow); - this.hbox1.Add(this.alignment1); - global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.alignment1])); - w10.Position = 1; + this.hbox2 = new global::Gtk.HBox(); + this.hbox2.Name = "hbox2"; + this.hbox2.Spacing = 6; + // Container child hbox2.Gtk.Box+BoxChild + this.checkButtonCameraOn = new global::Gtk.CheckButton(); + this.checkButtonCameraOn.CanFocus = true; + this.checkButtonCameraOn.Name = "checkButtonCameraOn"; + this.checkButtonCameraOn.Label = global::Mono.Unix.Catalog.GetString("Camera On"); + this.checkButtonCameraOn.DrawIndicator = true; + this.checkButtonCameraOn.UseUnderline = true; + this.hbox2.Add(this.checkButtonCameraOn); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.checkButtonCameraOn])); + w4.Position = 0; + // Container child hbox2.Gtk.Box+BoxChild + this.checkButtonRobotPosition = new global::Gtk.CheckButton(); + this.checkButtonRobotPosition.CanFocus = true; + this.checkButtonRobotPosition.Name = "checkButtonRobotPosition"; + this.checkButtonRobotPosition.Label = global::Mono.Unix.Catalog.GetString("Robot Position"); + this.checkButtonRobotPosition.DrawIndicator = true; + this.checkButtonRobotPosition.UseUnderline = true; + this.hbox2.Add(this.checkButtonRobotPosition); + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hbox2[this.checkButtonRobotPosition])); + w5.Position = 1; + this.alignment1.Add(this.hbox2); + this.boxCamera.Add(this.alignment1); + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.boxCamera[this.alignment1])); + w7.Position = 1; + w7.Expand = false; + w7.Fill = false; + this.hbox1.Add(this.boxCamera); + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.boxCamera])); + w8.Position = 0; + // Container child hbox1.Gtk.Box+BoxChild + this.hbox3 = new global::Gtk.HBox(); + this.hbox3.Name = "hbox3"; + this.hbox3.Spacing = 6; + // Container child hbox3.Gtk.Box+BoxChild + this.vseparator1 = new global::Gtk.VSeparator(); + this.vseparator1.Name = "vseparator1"; + this.hbox3.Add(this.vseparator1); + global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.vseparator1])); + w9.Position = 0; + w9.Expand = false; + w9.Fill = false; + // Container child hbox3.Gtk.Box+BoxChild + this.alignment3 = new global::Gtk.Alignment(1F, 0F, 0F, 0F); + this.alignment3.Name = "alignment3"; + this.alignment3.BorderWidth = ((uint)(4)); + // Container child alignment3.Gtk.Container+ContainerChild + this.vbox5 = new global::Gtk.VBox(); + this.vbox5.Name = "vbox5"; + this.vbox5.Spacing = 6; + // Container child vbox5.Gtk.Box+BoxChild + this.vbox10 = new global::Gtk.VBox(); + this.vbox10.Name = "vbox10"; + this.vbox10.Spacing = 6; + // Container child vbox10.Gtk.Box+BoxChild + this.labelServer = new global::Gtk.Label(); + this.labelServer.HeightRequest = 36; + this.labelServer.Name = "labelServer"; + this.labelServer.LabelProp = global::Mono.Unix.Catalog.GetString("Server connection"); + this.labelServer.UseMarkup = true; + this.vbox10.Add(this.labelServer); + global::Gtk.Box.BoxChild w10 = ((global::Gtk.Box.BoxChild)(this.vbox10[this.labelServer])); + w10.Position = 0; + w10.Expand = false; + w10.Fill = false; + // Container child vbox10.Gtk.Box+BoxChild + this.gtkAlignmentServer = new global::Gtk.Alignment(0F, 0F, 1F, 1F); + this.gtkAlignmentServer.Name = "gtkAlignmentServer"; + this.gtkAlignmentServer.LeftPadding = ((uint)(12)); + // Container child gtkAlignmentServer.Gtk.Container+ContainerChild + this.vbox6 = new global::Gtk.VBox(); + this.vbox6.Name = "vbox6"; + this.vbox6.Spacing = 6; + // Container child vbox6.Gtk.Box+BoxChild + this.table1 = new global::Gtk.Table(((uint)(3)), ((uint)(2)), false); + this.table1.Name = "table1"; + this.table1.RowSpacing = ((uint)(6)); + this.table1.ColumnSpacing = ((uint)(6)); + // Container child table1.Gtk.Table+TableChild + this.entryServerName = new global::Gtk.Entry(); + this.entryServerName.CanFocus = true; + this.entryServerName.Name = "entryServerName"; + this.entryServerName.IsEditable = true; + this.entryServerName.InvisibleChar = '●'; + this.table1.Add(this.entryServerName); + global::Gtk.Table.TableChild w11 = ((global::Gtk.Table.TableChild)(this.table1[this.entryServerName])); + w11.LeftAttach = ((uint)(1)); + w11.RightAttach = ((uint)(2)); + w11.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.entryServerPort = new global::Gtk.Entry(); + this.entryServerPort.CanFocus = true; + this.entryServerPort.Name = "entryServerPort"; + this.entryServerPort.IsEditable = true; + this.entryServerPort.InvisibleChar = '●'; + this.table1.Add(this.entryServerPort); + global::Gtk.Table.TableChild w12 = ((global::Gtk.Table.TableChild)(this.table1[this.entryServerPort])); + w12.TopAttach = ((uint)(1)); + w12.BottomAttach = ((uint)(2)); + w12.LeftAttach = ((uint)(1)); + w12.RightAttach = ((uint)(2)); + w12.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.entryTimeout = new global::Gtk.Entry(); + this.entryTimeout.CanFocus = true; + this.entryTimeout.Name = "entryTimeout"; + this.entryTimeout.IsEditable = true; + this.entryTimeout.InvisibleChar = '●'; + this.table1.Add(this.entryTimeout); + global::Gtk.Table.TableChild w13 = ((global::Gtk.Table.TableChild)(this.table1[this.entryTimeout])); + w13.TopAttach = ((uint)(2)); + w13.BottomAttach = ((uint)(3)); + w13.LeftAttach = ((uint)(1)); + w13.RightAttach = ((uint)(2)); + w13.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.label1 = new global::Gtk.Label(); + this.label1.Name = "label1"; + this.label1.Xalign = 1F; + this.label1.LabelProp = global::Mono.Unix.Catalog.GetString("Server name:"); + this.label1.Justify = ((global::Gtk.Justification)(1)); + this.table1.Add(this.label1); + global::Gtk.Table.TableChild w14 = ((global::Gtk.Table.TableChild)(this.table1[this.label1])); + w14.XOptions = ((global::Gtk.AttachOptions)(4)); + w14.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.label2 = new global::Gtk.Label(); + this.label2.Name = "label2"; + this.label2.Xalign = 1F; + this.label2.LabelProp = global::Mono.Unix.Catalog.GetString("Server port:"); + this.label2.Justify = ((global::Gtk.Justification)(1)); + this.table1.Add(this.label2); + global::Gtk.Table.TableChild w15 = ((global::Gtk.Table.TableChild)(this.table1[this.label2])); + w15.TopAttach = ((uint)(1)); + w15.BottomAttach = ((uint)(2)); + w15.XOptions = ((global::Gtk.AttachOptions)(4)); + w15.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table1.Gtk.Table+TableChild + this.label5 = new global::Gtk.Label(); + this.label5.Name = "label5"; + this.label5.LabelProp = global::Mono.Unix.Catalog.GetString("Timeout (ms):"); + this.table1.Add(this.label5); + global::Gtk.Table.TableChild w16 = ((global::Gtk.Table.TableChild)(this.table1[this.label5])); + w16.TopAttach = ((uint)(2)); + w16.BottomAttach = ((uint)(3)); + w16.XOptions = ((global::Gtk.AttachOptions)(4)); + w16.YOptions = ((global::Gtk.AttachOptions)(4)); + this.vbox6.Add(this.table1); + global::Gtk.Box.BoxChild w17 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.table1])); + w17.Position = 0; + w17.Expand = false; + w17.Fill = false; + // Container child vbox6.Gtk.Box+BoxChild + this.buttonServerConnection = new global::Gtk.Button(); + this.buttonServerConnection.CanFocus = true; + this.buttonServerConnection.Name = "buttonServerConnection"; + this.buttonServerConnection.UseUnderline = true; + this.buttonServerConnection.Label = global::Mono.Unix.Catalog.GetString("Connect"); + this.vbox6.Add(this.buttonServerConnection); + global::Gtk.Box.BoxChild w18 = ((global::Gtk.Box.BoxChild)(this.vbox6[this.buttonServerConnection])); + w18.PackType = ((global::Gtk.PackType)(1)); + w18.Position = 1; + w18.Expand = false; + w18.Fill = false; + this.gtkAlignmentServer.Add(this.vbox6); + this.vbox10.Add(this.gtkAlignmentServer); + global::Gtk.Box.BoxChild w20 = ((global::Gtk.Box.BoxChild)(this.vbox10[this.gtkAlignmentServer])); + w20.Position = 1; + w20.Expand = false; + w20.Fill = false; + this.vbox5.Add(this.vbox10); + global::Gtk.Box.BoxChild w21 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox10])); + w21.Position = 0; + w21.Expand = false; + w21.Fill = false; + // Container child vbox5.Gtk.Box+BoxChild + this.hseparator1 = new global::Gtk.HSeparator(); + this.hseparator1.Name = "hseparator1"; + this.vbox5.Add(this.hseparator1); + global::Gtk.Box.BoxChild w22 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hseparator1])); + w22.Position = 1; + w22.Expand = false; + w22.Fill = false; + // Container child vbox5.Gtk.Box+BoxChild + this.vbox11 = new global::Gtk.VBox(); + this.vbox11.Name = "vbox11"; + this.vbox11.Spacing = 6; + // Container child vbox11.Gtk.Box+BoxChild + this.labelRobot = new global::Gtk.Label(); + this.labelRobot.HeightRequest = 36; + this.labelRobot.Name = "labelRobot"; + this.labelRobot.LabelProp = global::Mono.Unix.Catalog.GetString("Robot Activation"); + this.labelRobot.UseMarkup = true; + this.vbox11.Add(this.labelRobot); + global::Gtk.Box.BoxChild w23 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.labelRobot])); + w23.Position = 0; + w23.Expand = false; + w23.Fill = false; + // Container child vbox11.Gtk.Box+BoxChild + this.alignment9 = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F); + this.alignment9.Name = "alignment9"; + // Container child alignment9.Gtk.Container+ContainerChild + this.gtkAlignmentRobot = new global::Gtk.Alignment(0F, 0F, 1F, 1F); + this.gtkAlignmentRobot.Name = "gtkAlignmentRobot"; + this.gtkAlignmentRobot.LeftPadding = ((uint)(12)); + // Container child gtkAlignmentRobot.Gtk.Container+ContainerChild + this.vbox8 = new global::Gtk.VBox(); + this.vbox8.Name = "vbox8"; + this.vbox8.Spacing = 6; + // Container child vbox8.Gtk.Box+BoxChild + this.alignment6 = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F); + this.alignment6.Name = "alignment6"; + // Container child alignment6.Gtk.Container+ContainerChild + this.hbox4 = new global::Gtk.HBox(); + this.hbox4.Name = "hbox4"; + this.hbox4.Spacing = 6; + // Container child hbox4.Gtk.Box+BoxChild + this.radioButtonWithWatchdog = new global::Gtk.RadioButton(global::Mono.Unix.Catalog.GetString("with watchdog")); + this.radioButtonWithWatchdog.CanFocus = true; + this.radioButtonWithWatchdog.Name = "radioButtonWithWatchdog"; + this.radioButtonWithWatchdog.DrawIndicator = true; + this.radioButtonWithWatchdog.UseUnderline = true; + this.radioButtonWithWatchdog.Group = new global::GLib.SList(global::System.IntPtr.Zero); + this.hbox4.Add(this.radioButtonWithWatchdog); + global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.radioButtonWithWatchdog])); + w24.Position = 0; + // Container child hbox4.Gtk.Box+BoxChild + this.radioButtonWithoutWatchdog = new global::Gtk.RadioButton(global::Mono.Unix.Catalog.GetString("without watchdog")); + this.radioButtonWithoutWatchdog.CanFocus = true; + this.radioButtonWithoutWatchdog.Name = "radioButtonWithoutWatchdog"; + this.radioButtonWithoutWatchdog.DrawIndicator = true; + this.radioButtonWithoutWatchdog.UseUnderline = true; + this.radioButtonWithoutWatchdog.Group = this.radioButtonWithWatchdog.Group; + this.hbox4.Add(this.radioButtonWithoutWatchdog); + global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(this.hbox4[this.radioButtonWithoutWatchdog])); + w25.Position = 1; + this.alignment6.Add(this.hbox4); + this.vbox8.Add(this.alignment6); + global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(this.vbox8[this.alignment6])); + w27.Position = 0; + w27.Expand = false; + w27.Fill = false; + // Container child vbox8.Gtk.Box+BoxChild + this.alignment5 = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F); + this.alignment5.Name = "alignment5"; + // Container child alignment5.Gtk.Container+ContainerChild + this.alignment7 = new global::Gtk.Alignment(0.5F, 0.5F, 1F, 1F); + this.alignment7.Name = "alignment7"; + // Container child alignment7.Gtk.Container+ContainerChild + this.buttonRobotActivation = new global::Gtk.Button(); + this.buttonRobotActivation.CanFocus = true; + this.buttonRobotActivation.Name = "buttonRobotActivation"; + this.buttonRobotActivation.UseUnderline = true; + this.buttonRobotActivation.Label = global::Mono.Unix.Catalog.GetString("Activation"); + this.alignment7.Add(this.buttonRobotActivation); + this.alignment5.Add(this.alignment7); + this.vbox8.Add(this.alignment5); + global::Gtk.Box.BoxChild w30 = ((global::Gtk.Box.BoxChild)(this.vbox8[this.alignment5])); + w30.Position = 1; + w30.Expand = false; + w30.Fill = false; + this.gtkAlignmentRobot.Add(this.vbox8); + this.alignment9.Add(this.gtkAlignmentRobot); + this.vbox11.Add(this.alignment9); + global::Gtk.Box.BoxChild w33 = ((global::Gtk.Box.BoxChild)(this.vbox11[this.alignment9])); + w33.Position = 1; + w33.Expand = false; + w33.Fill = false; + this.vbox5.Add(this.vbox11); + global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox11])); + w34.Position = 2; + w34.Expand = false; + w34.Fill = false; + // Container child vbox5.Gtk.Box+BoxChild + this.hseparator2 = new global::Gtk.HSeparator(); + this.hseparator2.Name = "hseparator2"; + this.vbox5.Add(this.hseparator2); + global::Gtk.Box.BoxChild w35 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.hseparator2])); + w35.Position = 3; + w35.Expand = false; + w35.Fill = false; + // Container child vbox5.Gtk.Box+BoxChild + this.vbox12 = new global::Gtk.VBox(); + this.vbox12.Name = "vbox12"; + this.vbox12.Spacing = 6; + // Container child vbox12.Gtk.Box+BoxChild + this.labelRobotControl = new global::Gtk.Label(); + this.labelRobotControl.HeightRequest = 36; + this.labelRobotControl.Name = "labelRobotControl"; + this.labelRobotControl.LabelProp = global::Mono.Unix.Catalog.GetString("Robot Controls and Status"); + this.labelRobotControl.UseMarkup = true; + this.vbox12.Add(this.labelRobotControl); + global::Gtk.Box.BoxChild w36 = ((global::Gtk.Box.BoxChild)(this.vbox12[this.labelRobotControl])); + w36.Position = 0; + w36.Expand = false; + w36.Fill = false; + // Container child vbox12.Gtk.Box+BoxChild + this.gtkAlignmentRobotControl = new global::Gtk.Alignment(0F, 0F, 1F, 1F); + this.gtkAlignmentRobotControl.Name = "gtkAlignmentRobotControl"; + this.gtkAlignmentRobotControl.LeftPadding = ((uint)(12)); + // Container child gtkAlignmentRobotControl.Gtk.Container+ContainerChild + this.vbox9 = new global::Gtk.VBox(); + this.vbox9.Name = "vbox9"; + this.vbox9.Spacing = 6; + // Container child vbox9.Gtk.Box+BoxChild + this.alignment8 = new global::Gtk.Alignment(0.5F, 0.5F, 0F, 0F); + this.alignment8.Name = "alignment8"; + // Container child alignment8.Gtk.Container+ContainerChild + this.table4 = new global::Gtk.Table(((uint)(3)), ((uint)(3)), false); + this.table4.Name = "table4"; + this.table4.RowSpacing = ((uint)(6)); + this.table4.ColumnSpacing = ((uint)(6)); + // Container child table4.Gtk.Table+TableChild + this.buttonDown = new global::Gtk.Button(); + this.buttonDown.CanFocus = true; + this.buttonDown.Name = "buttonDown"; + this.buttonDown.UseUnderline = true; + global::Gtk.Image w37 = new global::Gtk.Image(); + w37.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-down-symbolic.symbolic.png"); + this.buttonDown.Image = w37; + this.table4.Add(this.buttonDown); + global::Gtk.Table.TableChild w38 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonDown])); + w38.TopAttach = ((uint)(2)); + w38.BottomAttach = ((uint)(3)); + w38.LeftAttach = ((uint)(1)); + w38.RightAttach = ((uint)(2)); + w38.XOptions = ((global::Gtk.AttachOptions)(4)); + w38.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table4.Gtk.Table+TableChild + this.buttonForward = new global::Gtk.Button(); + this.buttonForward.CanFocus = true; + this.buttonForward.Name = "buttonForward"; + this.buttonForward.UseUnderline = true; + global::Gtk.Image w39 = new global::Gtk.Image(); + w39.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-up-symbolic.symbolic.png"); + this.buttonForward.Image = w39; + this.table4.Add(this.buttonForward); + global::Gtk.Table.TableChild w40 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonForward])); + w40.LeftAttach = ((uint)(1)); + w40.RightAttach = ((uint)(2)); + w40.XOptions = ((global::Gtk.AttachOptions)(4)); + w40.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table4.Gtk.Table+TableChild + this.buttonLeft = new global::Gtk.Button(); + this.buttonLeft.CanFocus = true; + this.buttonLeft.Name = "buttonLeft"; + this.buttonLeft.UseUnderline = true; + global::Gtk.Image w41 = new global::Gtk.Image(); + w41.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-start-symbolic.symbolic.png"); + this.buttonLeft.Image = w41; + this.table4.Add(this.buttonLeft); + global::Gtk.Table.TableChild w42 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonLeft])); + w42.TopAttach = ((uint)(1)); + w42.BottomAttach = ((uint)(2)); + w42.XOptions = ((global::Gtk.AttachOptions)(4)); + w42.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table4.Gtk.Table+TableChild + this.buttonRight = new global::Gtk.Button(); + this.buttonRight.CanFocus = true; + this.buttonRight.Name = "buttonRight"; + this.buttonRight.UseUnderline = true; + global::Gtk.Image w43 = new global::Gtk.Image(); + w43.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("monitor.ressources.pan-end-symbolic.symbolic.png"); + this.buttonRight.Image = w43; + this.table4.Add(this.buttonRight); + global::Gtk.Table.TableChild w44 = ((global::Gtk.Table.TableChild)(this.table4[this.buttonRight])); + w44.TopAttach = ((uint)(1)); + w44.BottomAttach = ((uint)(2)); + w44.LeftAttach = ((uint)(2)); + w44.RightAttach = ((uint)(3)); + w44.XOptions = ((global::Gtk.AttachOptions)(4)); + w44.YOptions = ((global::Gtk.AttachOptions)(4)); + this.alignment8.Add(this.table4); + this.vbox9.Add(this.alignment8); + global::Gtk.Box.BoxChild w46 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.alignment8])); + w46.Position = 0; + w46.Expand = false; + w46.Fill = false; + // Container child vbox9.Gtk.Box+BoxChild + this.table3 = new global::Gtk.Table(((uint)(1)), ((uint)(2)), false); + this.table3.Name = "table3"; + this.table3.RowSpacing = ((uint)(6)); + this.table3.ColumnSpacing = ((uint)(6)); + // Container child table3.Gtk.Table+TableChild + this.label3 = new global::Gtk.Label(); + this.label3.Name = "label3"; + this.label3.Xalign = 1F; + this.label3.LabelProp = global::Mono.Unix.Catalog.GetString("Battery level:"); + this.label3.Justify = ((global::Gtk.Justification)(1)); + this.table3.Add(this.label3); + global::Gtk.Table.TableChild w47 = ((global::Gtk.Table.TableChild)(this.table3[this.label3])); + w47.YPadding = ((uint)(10)); + w47.XOptions = ((global::Gtk.AttachOptions)(4)); + w47.YOptions = ((global::Gtk.AttachOptions)(4)); + // Container child table3.Gtk.Table+TableChild + this.labelBatteryLevel = new global::Gtk.Label(); + this.labelBatteryLevel.Name = "labelBatteryLevel"; + this.labelBatteryLevel.Xpad = 1; + this.labelBatteryLevel.Xalign = 0F; + this.labelBatteryLevel.LabelProp = global::Mono.Unix.Catalog.GetString("Unknown"); + this.table3.Add(this.labelBatteryLevel); + global::Gtk.Table.TableChild w48 = ((global::Gtk.Table.TableChild)(this.table3[this.labelBatteryLevel])); + w48.LeftAttach = ((uint)(1)); + w48.RightAttach = ((uint)(2)); + w48.YOptions = ((global::Gtk.AttachOptions)(4)); + this.vbox9.Add(this.table3); + global::Gtk.Box.BoxChild w49 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.table3])); + w49.Position = 2; + w49.Expand = false; + w49.Fill = false; + // Container child vbox9.Gtk.Box+BoxChild + this.checkButtonGetBattery = new global::Gtk.CheckButton(); + this.checkButtonGetBattery.CanFocus = true; + this.checkButtonGetBattery.Name = "checkButtonGetBattery"; + this.checkButtonGetBattery.Label = global::Mono.Unix.Catalog.GetString("Get battery level"); + this.checkButtonGetBattery.DrawIndicator = true; + this.checkButtonGetBattery.UseUnderline = true; + this.vbox9.Add(this.checkButtonGetBattery); + global::Gtk.Box.BoxChild w50 = ((global::Gtk.Box.BoxChild)(this.vbox9[this.checkButtonGetBattery])); + w50.Position = 3; + w50.Expand = false; + w50.Fill = false; + this.gtkAlignmentRobotControl.Add(this.vbox9); + this.vbox12.Add(this.gtkAlignmentRobotControl); + global::Gtk.Box.BoxChild w52 = ((global::Gtk.Box.BoxChild)(this.vbox12[this.gtkAlignmentRobotControl])); + w52.Position = 1; + this.vbox5.Add(this.vbox12); + global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(this.vbox5[this.vbox12])); + w53.Position = 4; + this.alignment3.Add(this.vbox5); + this.hbox3.Add(this.alignment3); + global::Gtk.Box.BoxChild w55 = ((global::Gtk.Box.BoxChild)(this.hbox3[this.alignment3])); + w55.Position = 1; + w55.Expand = false; + w55.Fill = false; + this.hbox1.Add(this.hbox3); + global::Gtk.Box.BoxChild w56 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.hbox3])); + w56.Position = 1; + w56.Expand = false; + w56.Fill = false; this.vbox1.Add(this.hbox1); - global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1])); - w11.Position = 1; - // Container child vbox1.Gtk.Box+BoxChild - this.statusbar1 = new global::Gtk.Statusbar(); - this.statusbar1.Name = "statusbar1"; - this.statusbar1.Spacing = 6; - this.vbox1.Add(this.statusbar1); - global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.statusbar1])); - w12.Position = 2; - w12.Expand = false; - w12.Fill = false; + global::Gtk.Box.BoxChild w57 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1])); + w57.Position = 1; this.Add(this.vbox1); if ((this.Child != null)) { this.Child.ShowAll(); } this.DefaultWidth = 1039; - this.DefaultHeight = 705; + this.DefaultHeight = 735; this.Show(); this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.OnDeleteEvent); + this.QuitAction.Activated += new global::System.EventHandler(this.OnQuitActionActivated); + this.ShowLogWindowAction.Activated += new global::System.EventHandler(this.OnShowLogWindowActionActivated); + this.drawingAreaCamera.Realized += new global::System.EventHandler(this.OnDrawingAreaCameraRealized); + this.drawingAreaCamera.ExposeEvent += new global::Gtk.ExposeEventHandler(this.OnDrawingAreaCameraExposeEvent); + this.drawingAreaCamera.ConfigureEvent += new global::Gtk.ConfigureEventHandler(this.OnDrawingAreaCameraConfigureEvent); + this.checkButtonCameraOn.Clicked += new global::System.EventHandler(this.OnCheckButtonCameraOnClicked); + this.checkButtonRobotPosition.Clicked += new global::System.EventHandler(this.OnCheckButtonRobotPositionClicked); + this.buttonServerConnection.Clicked += new global::System.EventHandler(this.OnButtonServerConnectionClicked); + this.buttonRobotActivation.Clicked += new global::System.EventHandler(this.OnButtonRobotActivationClicked); + this.buttonRight.Clicked += new global::System.EventHandler(this.OnButtonMouvClicked); + this.buttonLeft.Clicked += new global::System.EventHandler(this.OnButtonMouvClicked); + this.buttonForward.Clicked += new global::System.EventHandler(this.OnButtonMouvClicked); + this.buttonDown.Clicked += new global::System.EventHandler(this.OnButtonMouvClicked); } } diff --git a/software/monitor/monitor/gtk-gui/gui.stetic b/software/monitor/monitor/gtk-gui/gui.stetic index c490966..adb6238 100644 --- a/software/monitor/monitor/gtk-gui/gui.stetic +++ b/software/monitor/monitor/gtk-gui/gui.stetic @@ -7,20 +7,56 @@ - - + + + + Action + True + File + File + + + Action + <Primary><Mod2>q + True + Quit... + Quit + + + + Action + Log + Log + + + Action + <Primary><Mod2>s + Show log window + Show log window + + + Monitor UI + resource:monitor.ressources.robot-icon.resized.png CenterOnParent + 5 6 - + - + + + + + + + + 0 @@ -34,8 +70,71 @@ 6 - + + 6 + + + + + + + + + 0 + True + + + + + + 0 + 0 + 6 + + + + 6 + + + + True + Camera On + True + True + True + + + + 0 + True + + + + + + True + Robot Position + True + True + True + + + + 1 + True + + + + + + + 1 + False + False + False + + 0 @@ -43,60 +142,648 @@ - + + 6 - + - In + + + 0 + True + False + False + + + + + + 0 + 0 + 1 + 0 + 4 - + - None + 6 - + - True - None + 6 - + - False - - - - True - TextOnly - GtkButton - True - - - 30 - 25 - - - - - - - - <b>Controls</b> + 36 + <b><u>Server connection</u></b> True - label_item + 0 + True + False + False + + + + + + 0 + 0 + 12 + + + + 6 + + + + 3 + 2 + 6 + 6 + + + + True + True + + + + 1 + 2 + True + Fill + True + True + False + False + True + False + + + + + + True + True + + + + 1 + 2 + 1 + 2 + True + Fill + True + True + False + False + True + False + + + + + + True + True + + + + 2 + 3 + 1 + 2 + True + Fill + True + True + False + False + True + False + + + + + + 1 + Server name: + Right + + + True + Fill + Fill + False + True + False + False + True + False + + + + + + 1 + Server port: + Right + + + 1 + 2 + True + Fill + Fill + False + True + False + False + True + False + + + + + + Timeout (ms): + + + 2 + 3 + True + Fill + Fill + False + True + False + False + True + False + + + + + 0 + True + False + False + + + + + + True + TextOnly + Connect + True + + + + End + 1 + True + False + False + + + + + + + 1 + True + False + False + + 0 + True + False + False + + + + + + + + 1 + True + False + False + + + + + + 6 + + + + 36 + <b><u>Robot Activation</u></b> + True + + + 0 + True + False + False + + + + + + + + + 0 + 0 + 12 + + + + 6 + + + + + + + 6 + + + + True + with watchdog + True + True + True + True + radioGroupRobotActivation + + + 0 + True + + + + + + True + without watchdog + True + True + True + radioGroupRobotActivation + + + 1 + True + + + + + + + 0 + True + False + False + + + + + + + + + + + + True + TextOnly + Activation + True + + + + + + + + 1 + True + False + False + + + + + + + + + 1 + True + False + False + + + + + 2 + True + False + False + + + + + + + + 3 + True + False + False + + + + + + 6 + + + + 36 + <b><u>Robot Controls and Status</u></b> + True + + + 0 + True + False + False + + + + + + 0 + 0 + 12 + + + + 6 + + + + 0 + 0 + + + + 3 + 3 + 6 + 6 + + + + + + + + + + + + + + + + + + + True + TextAndIcon + resource:monitor.ressources.pan-down-symbolic.symbolic.png + + True + + + + 2 + 3 + 1 + 2 + True + Fill + Fill + False + True + False + False + True + False + + + + + + True + TextAndIcon + resource:monitor.ressources.pan-up-symbolic.symbolic.png + + True + + + + 1 + 2 + True + Fill + Fill + False + True + False + False + True + False + + + + + + True + TextAndIcon + resource:monitor.ressources.pan-start-symbolic.symbolic.png + + True + + + + 1 + 2 + True + Fill + Fill + False + True + False + False + True + False + + + + + + True + TextAndIcon + resource:monitor.ressources.pan-end-symbolic.symbolic.png + + True + + + + 1 + 2 + 2 + 3 + True + Fill + Fill + False + True + False + False + True + False + + + + + + + 0 + True + False + False + + + + + + + + + 2 + 6 + 6 + + + + 1 + Battery level: + Right + + + 10 + True + Fill + Fill + False + True + False + False + True + False + + + + + + 1 + 0 + Unknown + + + 1 + 2 + False + Fill + True + True + False + False + True + False + + + + + 2 + True + False + False + + + + + + True + Get battery level + True + True + True + + + 3 + True + False + False + + + + + + + 1 + True + + + + + 4 + True + + + 1 + True + False + False + 1 True + False + False @@ -105,24 +792,6 @@ True - - - - 6 - - - - - - - - - 2 - True - False - False - - diff --git a/software/monitor/monitor/monitor.csproj b/software/monitor/monitor/monitor.csproj index bb09369..934b3be 100644 --- a/software/monitor/monitor/monitor.csproj +++ b/software/monitor/monitor/monitor.csproj @@ -47,11 +47,19 @@ False + gui.stetic + + + + + + + @@ -59,6 +67,9 @@ + + + \ No newline at end of file diff --git a/software/monitor/monitor/ressources/missing_picture.png b/software/monitor/monitor/ressources/missing_picture.png new file mode 100644 index 0000000000000000000000000000000000000000..1ca7988d27af9fecf0230ba7e3b02ad6f969c722 GIT binary patch literal 1622 zcmV-c2C4apP)`69{8C7DMsydDoDIM*FoA#kCV)M_`V@K2F~ko>21v$cV2tEz_+!9e!dx;y z$#{(96F*zq66BKsO2lTuC%+-1$`Bb4afjl z(Ca@WHLE>8*Cn9l&bpGXsscy3^0psU{OK22g%L=1IC;(0PZ@t9XP_7 zYv+F80W$btWJ0zPKKYL($QQi<)&W1!ytZN5-}pL6y1kS}vH#^aILi<>n6esRIc{ex zUwyl1|CwMNZav@H6uKMRHGekI8lV&S$WU8DFBelL>wzbLy}<9lDd4~9fA0kzCtWvi zgJ=z~!%)|3Jy}Sl`O-~<2Dsl)Q!{NTpx!)*&H&dCwnOOz#{KguLR1D=3;bcI$ETCP z4Q;GDPnHph0lI+$hFYu|1FmjU?RgS~0Xl&94Rs{dU$`w+s!S9Hc-BxuTK$IY0~lpx zDK$61CPV&E9md~#XQh{Xdjw}wYXe+`+vzfI15Dx84tfG=y%zXpM!fHU>jL6gsjUIl z;GUMXWAYpN99WW~)~&$ldE%WS|9zHgX@I4`*M_`#=mTJZvCb~wO;5ZNll0 z0}L5*=Bb_d7mro|pBm$h09U3R3=g$4z|)3&?a(VNYTO9?kTBjc;L_Bi(wtfu;C9OO zwKThMt8Fv66E~S@;vFH~l5Z;(8}bIz4g*|4wmo%O>2F-a=UcdU_M!0(k?n0_Eevoj z@T(zDUGyzsx12Mnya5&iUm0@LO<&;dc0yTX$Q4YU3Enltud6;LykD`>2FRj=w(5G1 zuztnL8sKK~`8ZV-^?J%N1XyT@A57K>`fv|NiXQk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{##RDLHGS&S7rgOU!h_#k4UEa{HEjtmSN`?>!lvVtU&J%W50 z7^>757#dm_7=8hT8eT9klo~KFyh>nTu$sZZAYL$MSD+10f+@+{-G$+Qd;gjJKptm- zM`SSrgFqDsGrs#W?I2K)y~NYkmHiQyJgXZg z`klg^$z}%y0tLg4=4{l{Wa?TbAk@?!w@rv!np@i1`#s*gj9+`Q+rN;mJ-sd%z&+oi{D%2iqCvjPJ`XvGF3+scY zFP<&FBmbUse~whH+aJOCmn5pCp4fcLkMRm=&M!J3c(<%`kMX04|7&hmyl#&%R@E0# z%0FdlpTDK%fVSfVDNBrP33oI2okYIiTE5!>90OP$;G(s@pCe6?Xbo5y8mnV-$N z|7zuY7IV|%++Svi#;n|Q=Y;6NHTS%#_D=N6GJdRI+c$l#srB0pj>fm<^vEZ8d~jIb zfA7b}6Y|FSR~+lP+qBxVR|#ZnW%srFeSA^L#QO9bEvmgYl6OCiV(Jz8anw+JZO5C> z%$F{m>zq@@(dqR)jBAbJOY`-*nOF5Xdm=ME*;OCsD_lz6^I~6=;kxC&m@^6v-ZuJu zt!vMAy(xJsmVBK&Wp8N9|MJs*k9Y0)vf9re^T3TN`8U@BOE>7tRXv+0s9DUq?(n3T;k=DJ0gF9%`)79F!$tOdDUnQOj^J?rWFxmRDdCLH>=^-#Wkwqx9(_iepWVmFg+&M7f`=DX|hrrlzxTX*TDmcISu zb=xCCkZY55Owpbn!X{E*mRtTj)M|cu?bPE7@2711`ds?Iuvf>N4;MD|+^))6UduY` z1M6SmDXo`)sZX`UHKHUXu_V9nO2Fe!N|(Q45Hx#TR0<7gCxj?;QX|b^2DN4hVt@qz0ADq;^f4FRK5J7 V^x5xhq=1STJYD@<);T3K0RU%2e#-y= literal 0 HcmV?d00001 diff --git a/software/raspberry/superviseur-robot/lib/definitions.h b/software/raspberry/superviseur-robot/lib/definitions.h index b016653..3fd9d3b 100644 --- a/software/raspberry/superviseur-robot/lib/definitions.h +++ b/software/raspberry/superviseur-robot/lib/definitions.h @@ -48,7 +48,7 @@ #define DMB_BAT_LOW 0 #define DMB_BAT_MEDIUM 1 -#define DMB_BAT_HIGHT 2 +#define DMB_BAT_HIGH 2 #define DMB_BUSY 1 #define DMB_DO_NOTHING 0 diff --git a/software/raspberry/superviseur-robot/lib/image.h b/software/raspberry/superviseur-robot/lib/image.h index 0cc8466..cc98313 100644 --- a/software/raspberry/superviseur-robot/lib/image.h +++ b/software/raspberry/superviseur-robot/lib/image.h @@ -14,12 +14,14 @@ #ifndef IMAGERIE_H #define IMAGERIE_H -#define __STUB__ - #ifndef __STUB__ +#ifndef __FOR_PC__ #include #else #include +#endif /* __FOR_PC__ */ +#else +#include #endif #include "opencv2/imgproc/imgproc.hpp" #include @@ -31,15 +33,22 @@ using namespace std; using namespace cv; #ifndef __STUB__ +#ifndef __FOR_PC__ using namespace raspicam; +#endif /* __FOR_PC__ */ #endif typedef Mat Image; #ifndef __STUB__ +#ifndef __FOR_PC__ typedef RaspiCam_Cv Camera; #else typedef int Camera; +#endif /* __FOR_PC__ */ +#else +typedef int Camera; #endif + typedef Rect Arene; typedef vector Jpg; diff --git a/software/raspberry/superviseur-robot/lib/robot.h b/software/raspberry/superviseur-robot/lib/robot.h index e095f27..df35c9f 100644 --- a/software/raspberry/superviseur-robot/lib/robot.h +++ b/software/raspberry/superviseur-robot/lib/robot.h @@ -60,5 +60,4 @@ int close_communication_robot(void); */ int send_command_to_robot(char cmd, const char * arg=NULL); - #endif //DUMBERC_SERIAL_H_H diff --git a/software/raspberry/superviseur-robot/lib/src/image.cpp b/software/raspberry/superviseur-robot/lib/src/image.cpp index 0cf8540..04357d8 100644 --- a/software/raspberry/superviseur-robot/lib/src/image.cpp +++ b/software/raspberry/superviseur-robot/lib/src/image.cpp @@ -15,9 +15,14 @@ using namespace cv; #ifndef __STUB__ +#ifdef __FOR_PC__ +VideoCapture cap; +#else using namespace raspicam; +#endif /* __FOR_PC__ */ #else Image stubImg; + #endif using namespace std; @@ -35,6 +40,16 @@ void draw_arena(Image *imgInput, Image *imgOutput, Arene *monArene) int open_camera(Camera *camera) { #ifndef __STUB__ +#ifdef __FOR_PC__ + // open the default camera, use something different from 0 otherwise; + // Check VideoCapture documentation. + printf("Opening Camera...\n"); + if(!cap.open(0)) + return -1; + + sleep(1); + return 0; +#else // for raspberry camera->set(CV_CAP_PROP_FORMAT, CV_8UC3); camera->set(CV_CAP_PROP_FRAME_WIDTH,WIDTH); camera->set(CV_CAP_PROP_FRAME_HEIGHT,HEIGHT); @@ -50,16 +65,26 @@ int open_camera(Camera *camera) sleep(2); printf("Start capture\n"); return 0; - } + } +#endif /* __FOR_PC__ */ +#else + return 0; #endif } void get_image(Camera *camera, Image * monImage, const char * fichier) // getImg(Camera, Image img); { #ifndef __STUB__ +#ifdef __FOR_PC__ + if (monImage != NULL) + { + cap>>*monImage; + } +#else // for raspberry camera->grab(); camera->retrieve(*monImage); cvtColor(*monImage,*monImage,CV_BGR2RGB); +#endif /* __FOR_PC__ */ #else stubImg = imread(fichier, CV_LOAD_IMAGE_COLOR); stubImg.copyTo(*monImage); @@ -69,7 +94,13 @@ void get_image(Camera *camera, Image * monImage, const char * fichier) // getIm void close_camera(Camera *camera) // closeCam(Camera) : camera Entrer { #ifndef __STUB__ +#ifdef __FOR_PC__ + cap.release(); +#else // for raspberry camera->release(); +#endif /* __FOR_PC__ */ +#else + #endif } diff --git a/software/raspberry/superviseur-robot/superviseur/nbproject/private/private.xml b/software/raspberry/superviseur-robot/superviseur/nbproject/private/private.xml index 68261fb..099aead 100644 --- a/software/raspberry/superviseur-robot/superviseur/nbproject/private/private.xml +++ b/software/raspberry/superviseur-robot/superviseur/nbproject/private/private.xml @@ -7,7 +7,7 @@ - file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/functions.cpp + file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/image.h diff --git a/software/raspberry/superviseur-robot/superviseur/src/main.cpp b/software/raspberry/superviseur-robot/superviseur/src/main.cpp index a12c146..ed03fbd 100644 --- a/software/raspberry/superviseur-robot/superviseur/src/main.cpp +++ b/software/raspberry/superviseur-robot/superviseur/src/main.cpp @@ -157,7 +157,7 @@ void initStruct(void) { void startTasks() { int err; - + if (err = rt_task_start(&th_startRobot, &f_startRobot, NULL)) { printf("Error task start: %s\n", strerror(-err)); exit(EXIT_FAILURE); diff --git a/software/raspberry/testeur/testeur/.dep.inc b/software/raspberry/testeur/testeur/.dep.inc new file mode 100644 index 0000000..38ba445 --- /dev/null +++ b/software/raspberry/testeur/testeur/.dep.inc @@ -0,0 +1,5 @@ +# This code depends on make tool being used +DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES} ${TESTOBJECTFILES})) +ifneq (${DEPFILES},) +include ${DEPFILES} +endif diff --git a/software/raspberry/testeur/testeur/Makefile b/software/raspberry/testeur/testeur/Makefile new file mode 100644 index 0000000..05de621 --- /dev/null +++ b/software/raspberry/testeur/testeur/Makefile @@ -0,0 +1,128 @@ +# +# There exist several targets which are by default empty and which can be +# used for execution of your targets. These targets are usually executed +# before and after some main targets. They are: +# +# .build-pre: called before 'build' target +# .build-post: called after 'build' target +# .clean-pre: called before 'clean' target +# .clean-post: called after 'clean' target +# .clobber-pre: called before 'clobber' target +# .clobber-post: called after 'clobber' target +# .all-pre: called before 'all' target +# .all-post: called after 'all' target +# .help-pre: called before 'help' target +# .help-post: called after 'help' target +# +# Targets beginning with '.' are not intended to be called on their own. +# +# Main targets can be executed directly, and they are: +# +# build build a specific configuration +# clean remove built files from a configuration +# clobber remove all built files +# all build all configurations +# help print help mesage +# +# Targets .build-impl, .clean-impl, .clobber-impl, .all-impl, and +# .help-impl are implemented in nbproject/makefile-impl.mk. +# +# Available make variables: +# +# CND_BASEDIR base directory for relative paths +# CND_DISTDIR default top distribution directory (build artifacts) +# CND_BUILDDIR default top build directory (object files, ...) +# CONF name of current configuration +# CND_PLATFORM_${CONF} platform name (current configuration) +# CND_ARTIFACT_DIR_${CONF} directory of build artifact (current configuration) +# CND_ARTIFACT_NAME_${CONF} name of build artifact (current configuration) +# CND_ARTIFACT_PATH_${CONF} path to build artifact (current configuration) +# CND_PACKAGE_DIR_${CONF} directory of package (current configuration) +# CND_PACKAGE_NAME_${CONF} name of package (current configuration) +# CND_PACKAGE_PATH_${CONF} path to package (current configuration) +# +# NOCDDL + + +# Environment +MKDIR=mkdir +CP=cp +CCADMIN=CCadmin + + +# build +build: .build-post + +.build-pre: +# Add your pre 'build' code here... + +.build-post: .build-impl +# Add your post 'build' code here... + + +# clean +clean: .clean-post + +.clean-pre: +# Add your pre 'clean' code here... + +.clean-post: .clean-impl +# Add your post 'clean' code here... + + +# clobber +clobber: .clobber-post + +.clobber-pre: +# Add your pre 'clobber' code here... + +.clobber-post: .clobber-impl +# Add your post 'clobber' code here... + + +# all +all: .all-post + +.all-pre: +# Add your pre 'all' code here... + +.all-post: .all-impl +# Add your post 'all' code here... + + +# build tests +build-tests: .build-tests-post + +.build-tests-pre: +# Add your pre 'build-tests' code here... + +.build-tests-post: .build-tests-impl +# Add your post 'build-tests' code here... + + +# run tests +test: .test-post + +.test-pre: build-tests +# Add your pre 'test' code here... + +.test-post: .test-impl +# Add your post 'test' code here... + + +# help +help: .help-post + +.help-pre: +# Add your pre 'help' code here... + +.help-post: .help-impl +# Add your post 'help' code here... + + + +# include project implementation makefile +include nbproject/Makefile-impl.mk + +# include project make variables +include nbproject/Makefile-variables.mk diff --git a/software/raspberry/testeur/testeur/main.cpp b/software/raspberry/testeur/testeur/main.cpp new file mode 100644 index 0000000..4d2e1c0 --- /dev/null +++ b/software/raspberry/testeur/testeur/main.cpp @@ -0,0 +1,256 @@ +/* + * To change this license header, choose License Headers in Project Properties. + * To change this template file, choose Tools | Templates + * and open the template in the editor. + */ + +/* + * File: main.cpp + * Author: dimercur + * + * Created on 6 novembre 2018, 10:54 + */ + +#include + +#include "image.h" +#include "server.h" +#include "robot.h" +#include "message.h" + +#include +#include + +#include + +#include "definitions.h" + +#define HEADER_STM_IMAGE "IMG" // Envoi d'une image +#define HEADER_STM_BAT "BAT" // Envoi de l'état de la batterie +#define HEADER_STM_POS "POS" // Envoi de la position +#define HEADER_STM_NO_ACK "NAK" // Acquittement d'un échec +#define HEADER_STM_ACK "ACK" // Acquittement d'un succès +#define HEADER_STM_MES "MSG" // Message textuel +#define HEADER_STM_LOST_DMB "LCD" // Perte de la communication avec le robot + +#define HEADER_MTS_MSG "MSG" // Message directe pour Console Dumber +#define HEADER_MTS_DMB_ORDER "DMB" // Message d'ordre pour le robot +#define HEADER_MTS_COM_DMB "COM" // Message de gestion de la communication avec le robot +#define HEADER_MTS_CAMERA "CAM" // Message de gestion de la camera +#define HEADER_MTS_STOP "STO" // Message d'arrêt du system + +int socketID; +char data[1000]; +int receivedLength; +bool disconnected = true; +bool dataReady = false; +bool sysTick = false; +bool sendImage = false; +bool sendPos = false; + +Image monImage; +Jpg imageCompressed; + +pthread_t thread; + +typedef struct { + char header[4]; + char data[500]; +} MessageFromMon; + +MessageFromMon *message; +MessageToMon messageAnswered; + +std::thread *threadTimer; +std::thread *threadServer; + +using namespace std; + +/* + * + */ +void ThreadServer(void) { + // Recuperation d'une evenutelle commande sur le serveur + while (1) { + receivedLength = receiveDataFromServer(data, 1000); + if (receivedLength > 0) dataReady = true; + } +} + +void ThreadTimer(void) { + + while (1) { + //std::this_thread::sleep_for(std::chrono::seconds ) + sleep(1); + sysTick = true; + } +} + +void printReceivedMessage(MessageFromMon *mes) { + cout << "Received " + to_string(receivedLength) + " data\n"; + cout << "Header: "; + + for (int i = 0; i < 4; i++) { + cout << mes->header[i]; + } + + cout << "\nData: "; + for (int i = 0; i < receivedLength - 4; i++) { + cout << mes->data[i]; + } + + cout << "\n"; +} + +int sendAnswer(string cmd, string data) { + int status = 0; + string msg; + + msg = cmd + ':' + data; + cout << "Answer: " + msg; + cout << "\n"; + sendDataToServer((char*) msg.c_str(), msg.length()); + + return status; +} + +int decodeMessage(MessageFromMon *mes, int dataLength) { + int status = 0; + string header(mes->header, 4); + string data(mes->data, dataLength); + + if (header.find(HEADER_MTS_COM_DMB) != std::string::npos) // Message pour la gestion du port de communication + { + if (data.find(OPEN_COM_DMB) != std::string::npos) sendAnswer(HEADER_STM_ACK, ""); + else if (data.find(CLOSE_COM_DMB) != std::string::npos) sendAnswer(HEADER_STM_ACK, ""); + } else if (header.find(HEADER_MTS_CAMERA) != std::string::npos) // Message pour la camera + { + if (data.find(CAM_OPEN) != std::string::npos) { + sendAnswer(HEADER_STM_ACK, ""); + sendImage = true; + } else if (data.find(CAM_CLOSE) != std::string::npos) { + sendImage = false; + } else if (data.find(CAM_COMPUTE_POSITION) != std::string::npos) { + sendPos = true; + } else if (data.find(CAM_STOP_COMPUTE_POSITION) != std::string::npos) { + sendPos = false; + } else { + + } + } else if (header.find(HEADER_MTS_DMB_ORDER) != std::string::npos) // Message de com pour le robot + { + if (data.find(DMB_START_WITHOUT_WD) != std::string::npos) { + sendAnswer(HEADER_STM_ACK, ""); + + } else if (data.find(DMB_START_WITH_WD) != std::string::npos) { + sendAnswer(HEADER_STM_ACK, ""); + + } else if (data.find(DMB_GET_VBAT) != std::string::npos) { + sendAnswer(HEADER_STM_BAT, to_string(DMB_BAT_HIGH)); + } else if (data.find(DMB_MOVE) != std::string::npos) { + + } else if (data.find(DMB_TURN) != std::string::npos) { + + } else { + + } + } else if (header.find(HEADER_MTS_STOP) != std::string::npos) // Message d'arret + { + sendAnswer(HEADER_STM_ACK, ""); + } else { + sendAnswer(HEADER_STM_NO_ACK, ""); + } + + return status; +} + +int main(int argc, char** argv) { + + namedWindow("Sortie Camera"); + + // Ouverture de la com robot + if (open_communication_robot("/dev/ttyUSB0") != 0) { + cerr << "Unable to open /dev/ttyUSB0: abort\n"; + return -1; + } + cout << "/dev/ttyUSB0 opened\n"; + + // Ouverture de la camera + if (open_camera(0) == -1) { + cerr << "Unable to open camera: abort\n"; + return -1; + } + cout << "Camera opened\n"; + + // Ouverture du serveur + socketID = openServer(5544); + cout << "Server opened on port 5544\n"; + + threadTimer = new std::thread(ThreadTimer); + + for (;;) { + cout << "Waiting for client to connect ...\n"; + acceptClient(); + disconnected = false; + dataReady = false; + cout << "Client connected\n"; + threadServer = new std::thread(ThreadServer); + + while (disconnected == false) { + + // Recuperation de l'image + get_image(0, &monImage, ""); + + if (dataReady == true) // des données ont été recu par le serveur + { + message = (MessageFromMon*) malloc(sizeof (MessageFromMon)); + memcpy((void*) message, (const void*) data, sizeof (MessageFromMon)); + dataReady = false; + + //if (message->header[4] == ':') message->header[4]; + printReceivedMessage(message); + decodeMessage(message, receivedLength - 4); + + free(message); + + + } + + if (sysTick) { + sysTick = false; + + if (sendImage) { + compress_image(&monImage, &imageCompressed); + sendAnswer(HEADER_STM_IMAGE, reinterpret_cast (imageCompressed.data())); + } + + if (sendPos) { + //sendAnswer(HEADER_STM_POS,) + } + } + } + } + + threadTimer->join(); + threadServer->join(); + + // test de la camera + if (open_camera(0) != -1) { + for (;;) { + get_image(0, &monImage, ""); + + if (monImage.empty()) printf("image vide"); + else { + imshow("Sortie Camera", monImage); + + waitKey(10); + } + } + } else { + printf("Echec ouverture de camera"); + return -1; + } + + return 0; +} + diff --git a/software/raspberry/testeur/testeur/nbproject/Makefile-Debug.mk b/software/raspberry/testeur/testeur/nbproject/Makefile-Debug.mk new file mode 100644 index 0000000..65daf72 --- /dev/null +++ b/software/raspberry/testeur/testeur/nbproject/Makefile-Debug.mk @@ -0,0 +1,107 @@ +# +# Generated Makefile - do not edit! +# +# Edit the Makefile in the project folder instead (../Makefile). Each target +# has a -pre and a -post target defined where you can add customized code. +# +# This makefile implements configuration specific macros and targets. + + +# Environment +MKDIR=mkdir +CP=cp +GREP=grep +NM=nm +CCADMIN=CCadmin +RANLIB=ranlib +CC=gcc +CCC=g++ +CXX=g++ +FC=gfortran +AS=as + +# Macros +CND_PLATFORM=GNU-Linux +CND_DLIB_EXT=so +CND_CONF=Debug +CND_DISTDIR=dist +CND_BUILDDIR=build + +# Include project Makefile +include Makefile + +# Object Directory +OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM} + +# Object Files +OBJECTFILES= \ + ${OBJECTDIR}/_ext/e4d40e25/image.o \ + ${OBJECTDIR}/_ext/e4d40e25/message.o \ + ${OBJECTDIR}/_ext/e4d40e25/robot.o \ + ${OBJECTDIR}/_ext/e4d40e25/server.o \ + ${OBJECTDIR}/main.o + + +# C Compiler Flags +CFLAGS= + +# CC Compiler Flags +CCFLAGS= +CXXFLAGS= + +# Fortran Compiler Flags +FFLAGS= + +# Assembler Flags +ASFLAGS= + +# Link Libraries and Options +LDLIBSOPTIONS=`pkg-config --libs opencv` -lpthread + +# Build Targets +.build-conf: ${BUILD_SUBPROJECTS} + "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur + +${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur: ${OBJECTFILES} + ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} + ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur ${OBJECTFILES} ${LDLIBSOPTIONS} + +${OBJECTDIR}/_ext/e4d40e25/image.o: ../../superviseur-robot/lib/src/image.cpp + ${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25 + ${RM} "$@.d" + $(COMPILE.cc) -g -D__FOR_PC__ -DD_REENTRANT -I../../superviseur-robot/lib `pkg-config --cflags opencv` -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/image.o ../../superviseur-robot/lib/src/image.cpp + +${OBJECTDIR}/_ext/e4d40e25/message.o: ../../superviseur-robot/lib/src/message.cpp + ${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25 + ${RM} "$@.d" + $(COMPILE.cc) -g -D__FOR_PC__ -DD_REENTRANT -I../../superviseur-robot/lib `pkg-config --cflags opencv` -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/message.o ../../superviseur-robot/lib/src/message.cpp + +${OBJECTDIR}/_ext/e4d40e25/robot.o: ../../superviseur-robot/lib/src/robot.cpp + ${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25 + ${RM} "$@.d" + $(COMPILE.cc) -g -D__FOR_PC__ -DD_REENTRANT -I../../superviseur-robot/lib `pkg-config --cflags opencv` -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/robot.o ../../superviseur-robot/lib/src/robot.cpp + +${OBJECTDIR}/_ext/e4d40e25/server.o: ../../superviseur-robot/lib/src/server.cpp + ${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25 + ${RM} "$@.d" + $(COMPILE.cc) -g -D__FOR_PC__ -DD_REENTRANT -I../../superviseur-robot/lib `pkg-config --cflags opencv` -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/server.o ../../superviseur-robot/lib/src/server.cpp + +${OBJECTDIR}/main.o: main.cpp + ${MKDIR} -p ${OBJECTDIR} + ${RM} "$@.d" + $(COMPILE.cc) -g -D__FOR_PC__ -DD_REENTRANT -I../../superviseur-robot/lib `pkg-config --cflags opencv` -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp + +# Subprojects +.build-subprojects: + +# Clean Targets +.clean-conf: ${CLEAN_SUBPROJECTS} + ${RM} -r ${CND_BUILDDIR}/${CND_CONF} + +# Subprojects +.clean-subprojects: + +# Enable dependency checking +.dep.inc: .depcheck-impl + +include .dep.inc diff --git a/software/raspberry/testeur/testeur/nbproject/Makefile-Release.mk b/software/raspberry/testeur/testeur/nbproject/Makefile-Release.mk new file mode 100644 index 0000000..28c0602 --- /dev/null +++ b/software/raspberry/testeur/testeur/nbproject/Makefile-Release.mk @@ -0,0 +1,107 @@ +# +# Generated Makefile - do not edit! +# +# Edit the Makefile in the project folder instead (../Makefile). Each target +# has a -pre and a -post target defined where you can add customized code. +# +# This makefile implements configuration specific macros and targets. + + +# Environment +MKDIR=mkdir +CP=cp +GREP=grep +NM=nm +CCADMIN=CCadmin +RANLIB=ranlib +CC=gcc +CCC=g++ +CXX=g++ +FC=gfortran +AS=as + +# Macros +CND_PLATFORM=GNU-Linux +CND_DLIB_EXT=so +CND_CONF=Release +CND_DISTDIR=dist +CND_BUILDDIR=build + +# Include project Makefile +include Makefile + +# Object Directory +OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM} + +# Object Files +OBJECTFILES= \ + ${OBJECTDIR}/_ext/e4d40e25/image.o \ + ${OBJECTDIR}/_ext/e4d40e25/message.o \ + ${OBJECTDIR}/_ext/e4d40e25/robot.o \ + ${OBJECTDIR}/_ext/e4d40e25/server.o \ + ${OBJECTDIR}/main.o + + +# C Compiler Flags +CFLAGS= + +# CC Compiler Flags +CCFLAGS= +CXXFLAGS= + +# Fortran Compiler Flags +FFLAGS= + +# Assembler Flags +ASFLAGS= + +# Link Libraries and Options +LDLIBSOPTIONS= + +# Build Targets +.build-conf: ${BUILD_SUBPROJECTS} + "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur + +${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur: ${OBJECTFILES} + ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} + ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur ${OBJECTFILES} ${LDLIBSOPTIONS} + +${OBJECTDIR}/_ext/e4d40e25/image.o: ../../superviseur-robot/lib/src/image.cpp + ${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25 + ${RM} "$@.d" + $(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/image.o ../../superviseur-robot/lib/src/image.cpp + +${OBJECTDIR}/_ext/e4d40e25/message.o: ../../superviseur-robot/lib/src/message.cpp + ${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25 + ${RM} "$@.d" + $(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/message.o ../../superviseur-robot/lib/src/message.cpp + +${OBJECTDIR}/_ext/e4d40e25/robot.o: ../../superviseur-robot/lib/src/robot.cpp + ${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25 + ${RM} "$@.d" + $(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/robot.o ../../superviseur-robot/lib/src/robot.cpp + +${OBJECTDIR}/_ext/e4d40e25/server.o: ../../superviseur-robot/lib/src/server.cpp + ${MKDIR} -p ${OBJECTDIR}/_ext/e4d40e25 + ${RM} "$@.d" + $(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/_ext/e4d40e25/server.o ../../superviseur-robot/lib/src/server.cpp + +${OBJECTDIR}/main.o: main.cpp + ${MKDIR} -p ${OBJECTDIR} + ${RM} "$@.d" + $(COMPILE.cc) -O2 -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp + +# Subprojects +.build-subprojects: + +# Clean Targets +.clean-conf: ${CLEAN_SUBPROJECTS} + ${RM} -r ${CND_BUILDDIR}/${CND_CONF} + +# Subprojects +.clean-subprojects: + +# Enable dependency checking +.dep.inc: .depcheck-impl + +include .dep.inc diff --git a/software/raspberry/testeur/testeur/nbproject/Makefile-impl.mk b/software/raspberry/testeur/testeur/nbproject/Makefile-impl.mk new file mode 100644 index 0000000..ae093b2 --- /dev/null +++ b/software/raspberry/testeur/testeur/nbproject/Makefile-impl.mk @@ -0,0 +1,133 @@ +# +# Generated Makefile - do not edit! +# +# Edit the Makefile in the project folder instead (../Makefile). Each target +# has a pre- and a post- target defined where you can add customization code. +# +# This makefile implements macros and targets common to all configurations. +# +# NOCDDL + + +# Building and Cleaning subprojects are done by default, but can be controlled with the SUB +# macro. If SUB=no, subprojects will not be built or cleaned. The following macro +# statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf +# and .clean-reqprojects-conf unless SUB has the value 'no' +SUB_no=NO +SUBPROJECTS=${SUB_${SUB}} +BUILD_SUBPROJECTS_=.build-subprojects +BUILD_SUBPROJECTS_NO= +BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}} +CLEAN_SUBPROJECTS_=.clean-subprojects +CLEAN_SUBPROJECTS_NO= +CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}} + + +# Project Name +PROJECTNAME=testeur + +# Active Configuration +DEFAULTCONF=Debug +CONF=${DEFAULTCONF} + +# All Configurations +ALLCONFS=Debug Release + + +# build +.build-impl: .build-pre .validate-impl .depcheck-impl + @#echo "=> Running $@... Configuration=$(CONF)" + "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf + + +# clean +.clean-impl: .clean-pre .validate-impl .depcheck-impl + @#echo "=> Running $@... Configuration=$(CONF)" + "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf + + +# clobber +.clobber-impl: .clobber-pre .depcheck-impl + @#echo "=> Running $@..." + for CONF in ${ALLCONFS}; \ + do \ + "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf; \ + done + +# all +.all-impl: .all-pre .depcheck-impl + @#echo "=> Running $@..." + for CONF in ${ALLCONFS}; \ + do \ + "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf; \ + done + +# build tests +.build-tests-impl: .build-impl .build-tests-pre + @#echo "=> Running $@... Configuration=$(CONF)" + "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-tests-conf + +# run tests +.test-impl: .build-tests-impl .test-pre + @#echo "=> Running $@... Configuration=$(CONF)" + "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .test-conf + +# dependency checking support +.depcheck-impl: + @echo "# This code depends on make tool being used" >.dep.inc + @if [ -n "${MAKE_VERSION}" ]; then \ + echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES} \$${TESTOBJECTFILES}))" >>.dep.inc; \ + echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \ + echo "include \$${DEPFILES}" >>.dep.inc; \ + echo "endif" >>.dep.inc; \ + else \ + echo ".KEEP_STATE:" >>.dep.inc; \ + echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \ + fi + +# configuration validation +.validate-impl: + @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ + then \ + echo ""; \ + echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \ + echo "See 'make help' for details."; \ + echo "Current directory: " `pwd`; \ + echo ""; \ + fi + @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ + then \ + exit 1; \ + fi + + +# help +.help-impl: .help-pre + @echo "This makefile supports the following configurations:" + @echo " ${ALLCONFS}" + @echo "" + @echo "and the following targets:" + @echo " build (default target)" + @echo " clean" + @echo " clobber" + @echo " all" + @echo " help" + @echo "" + @echo "Makefile Usage:" + @echo " make [CONF=] [SUB=no] build" + @echo " make [CONF=] [SUB=no] clean" + @echo " make [SUB=no] clobber" + @echo " make [SUB=no] all" + @echo " make help" + @echo "" + @echo "Target 'build' will build a specific configuration and, unless 'SUB=no'," + @echo " also build subprojects." + @echo "Target 'clean' will clean a specific configuration and, unless 'SUB=no'," + @echo " also clean subprojects." + @echo "Target 'clobber' will remove all built files from all configurations and," + @echo " unless 'SUB=no', also from subprojects." + @echo "Target 'all' will will build all configurations and, unless 'SUB=no'," + @echo " also build subprojects." + @echo "Target 'help' prints this message." + @echo "" + diff --git a/software/raspberry/testeur/testeur/nbproject/Makefile-variables.mk b/software/raspberry/testeur/testeur/nbproject/Makefile-variables.mk new file mode 100644 index 0000000..b5f92a2 --- /dev/null +++ b/software/raspberry/testeur/testeur/nbproject/Makefile-variables.mk @@ -0,0 +1,35 @@ +# +# Generated - do not edit! +# +# NOCDDL +# +CND_BASEDIR=`pwd` +CND_BUILDDIR=build +CND_DISTDIR=dist +# Debug configuration +CND_PLATFORM_Debug=GNU-Linux +CND_ARTIFACT_DIR_Debug=dist/Debug/GNU-Linux +CND_ARTIFACT_NAME_Debug=testeur +CND_ARTIFACT_PATH_Debug=dist/Debug/GNU-Linux/testeur +CND_PACKAGE_DIR_Debug=dist/Debug/GNU-Linux/package +CND_PACKAGE_NAME_Debug=testeur.tar +CND_PACKAGE_PATH_Debug=dist/Debug/GNU-Linux/package/testeur.tar +# Release configuration +CND_PLATFORM_Release=GNU-Linux +CND_ARTIFACT_DIR_Release=dist/Release/GNU-Linux +CND_ARTIFACT_NAME_Release=testeur +CND_ARTIFACT_PATH_Release=dist/Release/GNU-Linux/testeur +CND_PACKAGE_DIR_Release=dist/Release/GNU-Linux/package +CND_PACKAGE_NAME_Release=testeur.tar +CND_PACKAGE_PATH_Release=dist/Release/GNU-Linux/package/testeur.tar +# +# include compiler specific variables +# +# dmake command +ROOT:sh = test -f nbproject/private/Makefile-variables.mk || \ + (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk) +# +# gmake command +.PHONY: $(shell test -f nbproject/private/Makefile-variables.mk || (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk)) +# +include nbproject/private/Makefile-variables.mk diff --git a/software/raspberry/testeur/testeur/nbproject/Package-Debug.bash b/software/raspberry/testeur/testeur/nbproject/Package-Debug.bash new file mode 100644 index 0000000..460a865 --- /dev/null +++ b/software/raspberry/testeur/testeur/nbproject/Package-Debug.bash @@ -0,0 +1,76 @@ +#!/bin/bash -x + +# +# Generated - do not edit! +# + +# Macros +TOP=`pwd` +CND_PLATFORM=GNU-Linux +CND_CONF=Debug +CND_DISTDIR=dist +CND_BUILDDIR=build +CND_DLIB_EXT=so +NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging +TMPDIRNAME=tmp-packaging +OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur +OUTPUT_BASENAME=testeur +PACKAGE_TOP_DIR=testeur/ + +# Functions +function checkReturnCode +{ + rc=$? + if [ $rc != 0 ] + then + exit $rc + fi +} +function makeDirectory +# $1 directory path +# $2 permission (optional) +{ + mkdir -p "$1" + checkReturnCode + if [ "$2" != "" ] + then + chmod $2 "$1" + checkReturnCode + fi +} +function copyFileToTmpDir +# $1 from-file path +# $2 to-file path +# $3 permission +{ + cp "$1" "$2" + checkReturnCode + if [ "$3" != "" ] + then + chmod $3 "$2" + checkReturnCode + fi +} + +# Setup +cd "${TOP}" +mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package +rm -rf ${NBTMPDIR} +mkdir -p ${NBTMPDIR} + +# Copy files and create directories and links +cd "${TOP}" +makeDirectory "${NBTMPDIR}/testeur/bin" +copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 + + +# Generate tar file +cd "${TOP}" +rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/testeur.tar +cd ${NBTMPDIR} +tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/testeur.tar * +checkReturnCode + +# Cleanup +cd "${TOP}" +rm -rf ${NBTMPDIR} diff --git a/software/raspberry/testeur/testeur/nbproject/Package-Release.bash b/software/raspberry/testeur/testeur/nbproject/Package-Release.bash new file mode 100644 index 0000000..acbac81 --- /dev/null +++ b/software/raspberry/testeur/testeur/nbproject/Package-Release.bash @@ -0,0 +1,76 @@ +#!/bin/bash -x + +# +# Generated - do not edit! +# + +# Macros +TOP=`pwd` +CND_PLATFORM=GNU-Linux +CND_CONF=Release +CND_DISTDIR=dist +CND_BUILDDIR=build +CND_DLIB_EXT=so +NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging +TMPDIRNAME=tmp-packaging +OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/testeur +OUTPUT_BASENAME=testeur +PACKAGE_TOP_DIR=testeur/ + +# Functions +function checkReturnCode +{ + rc=$? + if [ $rc != 0 ] + then + exit $rc + fi +} +function makeDirectory +# $1 directory path +# $2 permission (optional) +{ + mkdir -p "$1" + checkReturnCode + if [ "$2" != "" ] + then + chmod $2 "$1" + checkReturnCode + fi +} +function copyFileToTmpDir +# $1 from-file path +# $2 to-file path +# $3 permission +{ + cp "$1" "$2" + checkReturnCode + if [ "$3" != "" ] + then + chmod $3 "$2" + checkReturnCode + fi +} + +# Setup +cd "${TOP}" +mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package +rm -rf ${NBTMPDIR} +mkdir -p ${NBTMPDIR} + +# Copy files and create directories and links +cd "${TOP}" +makeDirectory "${NBTMPDIR}/testeur/bin" +copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 + + +# Generate tar file +cd "${TOP}" +rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/testeur.tar +cd ${NBTMPDIR} +tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/testeur.tar * +checkReturnCode + +# Cleanup +cd "${TOP}" +rm -rf ${NBTMPDIR} diff --git a/software/raspberry/testeur/testeur/nbproject/configurations.xml b/software/raspberry/testeur/testeur/nbproject/configurations.xml new file mode 100644 index 0000000..2ead220 --- /dev/null +++ b/software/raspberry/testeur/testeur/nbproject/configurations.xml @@ -0,0 +1,180 @@ + + + + + ../../superviseur-robot/lib/image.h + ../../superviseur-robot/lib/message.h + ../../superviseur-robot/lib/robot.h + ../../superviseur-robot/lib/server.h + + + + + ../../superviseur-robot/lib/src/image.cpp + main.cpp + ../../superviseur-robot/lib/src/message.cpp + ../../superviseur-robot/lib/src/robot.cpp + ../../superviseur-robot/lib/src/server.cpp + + + + + Makefile + + + + ../../superviseur-robot/lib/src + + Makefile + + + + default + true + false + + + + + ../../superviseur-robot/lib + + + __FOR_PC__ + + + + + ../../superviseur-robot/lib + + + D_REENTRANT + __FOR_PC__ + + + + + `pkg-config --libs opencv` + PosixThreads + + + + + + + + + + + + + + + + + + + + + + + + + default + true + false + + + + 5 + + + 5 + + + 5 + + + 5 + + + + + + + + + + + + + + + + + + + + + + + diff --git a/software/raspberry/testeur/testeur/nbproject/private/Makefile-variables.mk b/software/raspberry/testeur/testeur/nbproject/private/Makefile-variables.mk new file mode 100644 index 0000000..a64183e --- /dev/null +++ b/software/raspberry/testeur/testeur/nbproject/private/Makefile-variables.mk @@ -0,0 +1,7 @@ +# +# Generated - do not edit! +# +# NOCDDL +# +# Debug configuration +# Release configuration diff --git a/software/raspberry/testeur/testeur/nbproject/private/c_standard_headers_indexer.c b/software/raspberry/testeur/testeur/nbproject/private/c_standard_headers_indexer.c new file mode 100644 index 0000000..c2548d2 --- /dev/null +++ b/software/raspberry/testeur/testeur/nbproject/private/c_standard_headers_indexer.c @@ -0,0 +1,75 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. + * + * Oracle and Java are registered trademarks of Oracle and/or its affiliates. + * Other names may be trademarks of their respective owners. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common + * Development and Distribution License("CDDL") (collectively, the + * "License"). You may not use this file except in compliance with the + * License. You can obtain a copy of the License at + * http://www.netbeans.org/cddl-gplv2.html + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the + * specific language governing permissions and limitations under the + * License. When distributing the software, include this License Header + * Notice in each file and include the License file at + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the GPL Version 2 section of the License file that + * accompanied this code. If applicable, add the following below the + * License Header, with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * If you wish your version of this file to be governed by only the CDDL + * or only the GPL Version 2, indicate your decision by adding + * "[Contributor] elects to include this software in this distribution + * under the [CDDL or GPL Version 2] license." If you do not indicate a + * single choice of license, a recipient has the option to distribute + * your version of this file under either the CDDL, the GPL Version 2 or + * to extend the choice of license to its licensees as provided above. + * However, if you add GPL Version 2 code and therefore, elected the GPL + * Version 2 license, then the option applies only if the new code is + * made subject to such option by the copyright holder. + * + * Contributor(s): + */ + +// List of standard headers was taken in http://en.cppreference.com/w/c/header + +#include // Conditionally compiled macro that compares its argument to zero +#include // Functions to determine the type contained in character data +#include // Macros reporting error conditions +#include // Limits of float types +#include // Sizes of basic types +#include // Localization utilities +#include // Common mathematics functions +#include // Nonlocal jumps +#include // Signal handling +#include // Variable arguments +#include // Common macro definitions +#include // Input/output +#include // String handling +#include // General utilities: memory management, program utilities, string conversions, random numbers +#include // Time/date utilities +#include // (since C95) Alternative operator spellings +#include // (since C95) Extended multibyte and wide character utilities +#include // (since C95) Wide character classification and mapping utilities +#ifdef _STDC_C99 +#include // (since C99) Complex number arithmetic +#include // (since C99) Floating-point environment +#include // (since C99) Format conversion of integer types +#include // (since C99) Boolean type +#include // (since C99) Fixed-width integer types +#include // (since C99) Type-generic math (macros wrapping math.h and complex.h) +#endif +#ifdef _STDC_C11 +#include // (since C11) alignas and alignof convenience macros +#include // (since C11) Atomic types +#include // (since C11) noreturn convenience macros +#include // (since C11) Thread library +#include // (since C11) UTF-16 and UTF-32 character utilities +#endif diff --git a/software/raspberry/testeur/testeur/nbproject/private/configurations.xml b/software/raspberry/testeur/testeur/nbproject/private/configurations.xml new file mode 100644 index 0000000..7560ded --- /dev/null +++ b/software/raspberry/testeur/testeur/nbproject/private/configurations.xml @@ -0,0 +1,74 @@ + + + Makefile + + + + localhost + 2 + + + + + + + + + + + + + + + + + gdb + + + + "${OUTPUT_PATH}" + + "${OUTPUT_PATH}" + + true + 0 + 0 + + + + + + + localhost + 2 + + + + + + + + + + + + + + + gdb + + + + "${OUTPUT_PATH}" + + "${OUTPUT_PATH}" + + true + 0 + 0 + + + + + + diff --git a/software/raspberry/testeur/testeur/nbproject/private/cpp_standard_headers_indexer.cpp b/software/raspberry/testeur/testeur/nbproject/private/cpp_standard_headers_indexer.cpp new file mode 100644 index 0000000..04f6fa6 --- /dev/null +++ b/software/raspberry/testeur/testeur/nbproject/private/cpp_standard_headers_indexer.cpp @@ -0,0 +1,135 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright (c) 2016 Oracle and/or its affiliates. All rights reserved. + * + * Oracle and Java are registered trademarks of Oracle and/or its affiliates. + * Other names may be trademarks of their respective owners. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common + * Development and Distribution License("CDDL") (collectively, the + * "License"). You may not use this file except in compliance with the + * License. You can obtain a copy of the License at + * http://www.netbeans.org/cddl-gplv2.html + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the + * specific language governing permissions and limitations under the + * License. When distributing the software, include this License Header + * Notice in each file and include the License file at + * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the GPL Version 2 section of the License file that + * accompanied this code. If applicable, add the following below the + * License Header, with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * If you wish your version of this file to be governed by only the CDDL + * or only the GPL Version 2, indicate your decision by adding + * "[Contributor] elects to include this software in this distribution + * under the [CDDL or GPL Version 2] license." If you do not indicate a + * single choice of license, a recipient has the option to distribute + * your version of this file under either the CDDL, the GPL Version 2 or + * to extend the choice of license to its licensees as provided above. + * However, if you add GPL Version 2 code and therefore, elected the GPL + * Version 2 license, then the option applies only if the new code is + * made subject to such option by the copyright holder. + * + * Contributor(s): + */ + +// List of standard headers was taken in http://en.cppreference.com/w/cpp/header + +#include // General purpose utilities: program control, dynamic memory allocation, random numbers, sort and search +#include // Functions and macro constants for signal management +#include // Macro (and function) that saves (and jumps) to an execution context +#include // Handling of variable length argument lists +#include // Runtime type information utilities +#include // std::bitset class template +#include // Function objects, designed for use with the standard algorithms +#include // Various utility components +#include // C-style time/date utilites +#include // typedefs for types such as size_t, NULL and others +#include // Low-level memory management utilities +#include // Higher level memory management utilities +#include // limits of integral types +#include // limits of float types +#include // standardized way to query properties of arithmetic types +#include // Exception handling utilities +#include // Standard exception objects +#include // Conditionally compiled macro that compares its argument to zero +#include // Macro containing the last error number +#include // functions to determine the type contained in character data +#include // functions for determining the type of wide character data +#include // various narrow character string handling functions +#include // various wide and multibyte string handling functions +#include // std::basic_string class template +#include // std::vector container +#include // std::deque container +#include // std::list container +#include // std::set and std::multiset associative containers +#include // std::map and std::multimap associative containers +#include // std::stack container adaptor +#include // std::queue and std::priority_queue container adaptors +#include // Algorithms that operate on containers +#include // Container iterators +#include // Common mathematics functions +#include // Complex number type +#include // Class for representing and manipulating arrays of values +#include // Numeric operations on values in containers +#include // forward declarations of all classes in the input/output library +#include // std::ios_base class, std::basic_ios class template and several typedefs +#include // std::basic_istream class template and several typedefs +#include // std::basic_ostream, std::basic_iostream class templates and several typedefs +#include // several standard stream objects +#include // std::basic_fstream, std::basic_ifstream, std::basic_ofstream class templates and several typedefs +#include // std::basic_stringstream, std::basic_istringstream, std::basic_ostringstream class templates and several typedefs +#include // std::strstream, std::istrstream, std::ostrstream(deprecated) +#include // Helper functions to control the format or input and output +#include // std::basic_streambuf class template +#include // C-style input-output functions +#include // Localization utilities +#include // C localization utilities +#include // empty header. The macros that appear in iso646.h in C are keywords in C++ +#if __cplusplus >= 201103L +#include // (since C++11) std::type_index +#include // (since C++11) Compile-time type information +#include // (since C++11) C++ time utilites +#include // (since C++11) std::initializer_list class template +#include // (since C++11) std::tuple class template +#include // (since C++11) Nested allocator class +#include // (since C++11) fixed-size types and limits of other types +#include // (since C++11) formatting macros , intmax_t and uintmax_t math and conversions +#include // (since C++11) defines std::error_code, a platform-dependent error code +#include // (since C++11) C-style Unicode character conversion functions +#include // (since C++11) std::array container +#include // (since C++11) std::forward_list container +#include // (since C++11) std::unordered_set and std::unordered_multiset unordered associative containers +#include // (since C++11) std::unordered_map and std::unordered_multimap unordered associative containers +#include // (since C++11) Random number generators and distributions +#include // (since C++11) Compile-time rational arithmetic +#include // (since C++11) Floating-point environment access functions +#include // (since C++11) Unicode conversion facilities +#include // (since C++11) Classes, algorithms and iterators to support regular expression processing +#include // (since C++11) Atomic operations library +#include // (since C++11)(deprecated in C++17) simply includes the header +#include // (since C++11)(deprecated in C++17) simply includes the headers (until C++17) (since C++17) and : the overloads equivalent to the contents of the C header tgmath.h are already provided by those headers +#include // (since C++11)(deprecated in C++17) defines one compatibility macro constant +#include // (since C++11)(deprecated in C++17) defines one compatibility macro constant +#include // (since C++11) std::thread class and supporting functions +#include // (since C++11) mutual exclusion primitives +#include // (since C++11) primitives for asynchronous computations +#include // (since C++11) thread waiting conditions +#endif +#if __cplusplus >= 201300L +#include // (since C++14) shared mutual exclusion primitives +#endif +#if __cplusplus >= 201500L +#include // (since C++17) std::any class template +#include // (since C++17) std::optional class template +#include // (since C++17) std::variant class template +#include // (since C++17) Polymorphic allocators and memory resources +#include // (since C++17) std::basic_string_view class template +#include // (since C++17) Predefined execution policies for parallel versions of the algorithms +#include // (since C++17) std::path class and supporting functions +#endif diff --git a/software/raspberry/testeur/testeur/nbproject/private/launcher.properties b/software/raspberry/testeur/testeur/nbproject/private/launcher.properties new file mode 100644 index 0000000..3edc2d8 --- /dev/null +++ b/software/raspberry/testeur/testeur/nbproject/private/launcher.properties @@ -0,0 +1,42 @@ +# Launchers File syntax: +# +# [Must-have property line] +# launcher1.runCommand= +# [Optional extra properties] +# launcher1.displayName= +# launcher1.hide= +# launcher1.buildCommand= +# launcher1.runDir= +# launcher1.runInOwnTab= +# launcher1.symbolFiles= +# launcher1.env.= +# (If this value is quoted with ` it is handled as a native command which execution result will become the value) +# [Common launcher properties] +# common.runDir= +# (This value is overwritten by a launcher specific runDir value if the latter exists) +# common.env.= +# (Environment variables from common launcher are merged with launcher specific variables) +# common.symbolFiles= +# (This value is overwritten by a launcher specific symbolFiles value if the latter exists) +# +# In runDir, symbolFiles and env fields you can use these macroses: +# ${PROJECT_DIR} - project directory absolute path +# ${OUTPUT_PATH} - linker output path (relative to project directory path) +# ${OUTPUT_BASENAME}- linker output filename +# ${TESTDIR} - test files directory (relative to project directory path) +# ${OBJECTDIR} - object files directory (relative to project directory path) +# ${CND_DISTDIR} - distribution directory (relative to project directory path) +# ${CND_BUILDDIR} - build directory (relative to project directory path) +# ${CND_PLATFORM} - platform name +# ${CND_CONF} - configuration name +# ${CND_DLIB_EXT} - dynamic library extension +# +# All the project launchers must be listed in the file! +# +# launcher1.runCommand=... +# launcher2.runCommand=... +# ... +# common.runDir=... +# common.env.KEY=VALUE + +# launcher1.runCommand= \ No newline at end of file diff --git a/software/raspberry/testeur/testeur/nbproject/private/private.xml b/software/raspberry/testeur/testeur/nbproject/private/private.xml new file mode 100644 index 0000000..63a27a8 --- /dev/null +++ b/software/raspberry/testeur/testeur/nbproject/private/private.xml @@ -0,0 +1,7 @@ + + + + 1 + 0 + + diff --git a/software/raspberry/testeur/testeur/nbproject/project.xml b/software/raspberry/testeur/testeur/nbproject/project.xml new file mode 100644 index 0000000..16a12bd --- /dev/null +++ b/software/raspberry/testeur/testeur/nbproject/project.xml @@ -0,0 +1,30 @@ + + + org.netbeans.modules.cnd.makeproject + + + testeur + + cpp + h + UTF-8 + + + ../../superviseur-robot/lib/src + + + + Debug + 1 + + + Release + 1 + + + + false + + + +