sauvegarde
This commit is contained in:
parent
8536d288ce
commit
a1cd0af6ef
38 changed files with 3967 additions and 128 deletions
.gitignore
software
monitor/monitor
raspberry
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -62,4 +62,6 @@ GUI
|
|||
# Android
|
||||
*.apk
|
||||
|
||||
/software/raspberry/superviseur-robot/superviseur/dist/
|
||||
/software/raspberry/superviseur-robot/superviseur/dist/
|
||||
/software/raspberry/testeur/testeur/build/
|
||||
/software/raspberry/testeur/testeur/dist/
|
156
software/monitor/monitor/Client.cs
Normal file
156
software/monitor/monitor/Client.cs
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
110
software/monitor/monitor/CommandManager.cs
Normal file
110
software/monitor/monitor/CommandManager.cs
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
420
software/monitor/monitor/DestijlCommandManager.cs
Normal file
420
software/monitor/monitor/DestijlCommandManager.cs
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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, "<Primary><Mod2>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, "<Primary><Mod2>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("<ui><menubar name=\'menubar1\'/></ui>");
|
||||
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(@"<ui><menubar name='menuBar'><menu name='FileAction' action='FileAction'><menuitem name='QuitAction' action='QuitAction'/></menu><menu name='LogAction' action='LogAction'><menuitem name='ShowLogWindowAction' action='ShowLogWindowAction'/></menu></menubar></ui>");
|
||||
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("<b>Controls</b>");
|
||||
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("<b><u>Server connection</u></b>");
|
||||
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("<b><u>Robot Activation</u></b>");
|
||||
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("<b><u>Robot Controls and Status</u></b>");
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,20 +7,56 @@
|
|||
<widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
|
||||
<widget-library name="../bin/Debug/monitor.exe" internal="true" />
|
||||
</import>
|
||||
<widget class="Gtk.Window" id="MainWindow" design-size="1039 705">
|
||||
<action-group name="Default" />
|
||||
<widget class="Gtk.Window" id="MainWindow" design-size="1039 735">
|
||||
<action-group name="Default">
|
||||
<action id="FileAction">
|
||||
<property name="Type">Action</property>
|
||||
<property name="IsImportant">True</property>
|
||||
<property name="Label" translatable="yes">File</property>
|
||||
<property name="ShortLabel" translatable="yes">File</property>
|
||||
</action>
|
||||
<action id="QuitAction">
|
||||
<property name="Type">Action</property>
|
||||
<property name="Accelerator"><Primary><Mod2>q</property>
|
||||
<property name="IsImportant">True</property>
|
||||
<property name="Label" translatable="yes">Quit...</property>
|
||||
<property name="ShortLabel" translatable="yes">Quit</property>
|
||||
<signal name="Activated" handler="OnQuitActionActivated" />
|
||||
</action>
|
||||
<action id="LogAction">
|
||||
<property name="Type">Action</property>
|
||||
<property name="Label" translatable="yes">Log</property>
|
||||
<property name="ShortLabel" translatable="yes">Log</property>
|
||||
</action>
|
||||
<action id="ShowLogWindowAction">
|
||||
<property name="Type">Action</property>
|
||||
<property name="Accelerator"><Primary><Mod2>s</property>
|
||||
<property name="Label" translatable="yes">Show log window</property>
|
||||
<property name="ShortLabel" translatable="yes">Show log window</property>
|
||||
<signal name="Activated" handler="OnShowLogWindowActionActivated" />
|
||||
</action>
|
||||
</action-group>
|
||||
<property name="MemberName" />
|
||||
<property name="Title" translatable="yes">Monitor UI</property>
|
||||
<property name="Icon">resource:monitor.ressources.robot-icon.resized.png</property>
|
||||
<property name="WindowPosition">CenterOnParent</property>
|
||||
<property name="BorderWidth">5</property>
|
||||
<signal name="DeleteEvent" handler="OnDeleteEvent" />
|
||||
<child>
|
||||
<widget class="Gtk.VBox" id="vbox1">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.MenuBar" id="menubar1">
|
||||
<widget class="Gtk.MenuBar" id="menuBar">
|
||||
<property name="MemberName" />
|
||||
<node name="__gtksharp_132_Stetic_Editor_ActionMenuBar" type="Menubar" />
|
||||
<node name="menuBar" type="Menubar">
|
||||
<node type="Menu" action="FileAction">
|
||||
<node type="Menuitem" action="QuitAction" />
|
||||
</node>
|
||||
<node type="Menu" action="LogAction">
|
||||
<node type="Menuitem" action="ShowLogWindowAction" />
|
||||
</node>
|
||||
</node>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
|
@ -34,8 +70,71 @@
|
|||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.DrawingArea" id="drawingarea1">
|
||||
<widget class="Gtk.VBox" id="boxCamera">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.DrawingArea" id="drawingAreaCamera">
|
||||
<property name="MemberName" />
|
||||
<signal name="Realized" handler="OnDrawingAreaCameraRealized" />
|
||||
<signal name="ExposeEvent" handler="OnDrawingAreaCameraExposeEvent" />
|
||||
<signal name="ConfigureEvent" handler="OnDrawingAreaCameraConfigureEvent" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Alignment" id="alignment1">
|
||||
<property name="MemberName" />
|
||||
<property name="Xscale">0</property>
|
||||
<property name="Xalign">0</property>
|
||||
<property name="BorderWidth">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox2">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.CheckButton" id="checkButtonCameraOn">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Label" translatable="yes">Camera On</property>
|
||||
<property name="DrawIndicator">True</property>
|
||||
<property name="HasLabel">True</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnCheckButtonCameraOnClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.CheckButton" id="checkButtonRobotPosition">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Label" translatable="yes">Robot Position</property>
|
||||
<property name="DrawIndicator">True</property>
|
||||
<property name="HasLabel">True</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnCheckButtonRobotPositionClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">False</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
|
@ -43,60 +142,648 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Alignment" id="alignment1">
|
||||
<widget class="Gtk.HBox" id="hbox3">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
|
||||
<widget class="Gtk.VSeparator" id="vseparator1">
|
||||
<property name="MemberName" />
|
||||
<property name="ShadowType">In</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Alignment" id="alignment3">
|
||||
<property name="MemberName" />
|
||||
<property name="Xscale">0</property>
|
||||
<property name="Yscale">0</property>
|
||||
<property name="Xalign">1</property>
|
||||
<property name="Yalign">0</property>
|
||||
<property name="BorderWidth">4</property>
|
||||
<child>
|
||||
<widget class="Gtk.Viewport" id="GtkViewport">
|
||||
<widget class="Gtk.VBox" id="vbox5">
|
||||
<property name="MemberName" />
|
||||
<property name="ShadowType">None</property>
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Frame" id="frame1">
|
||||
<widget class="Gtk.VBox" id="vbox10">
|
||||
<property name="MemberName" />
|
||||
<property name="ShowScrollbars">True</property>
|
||||
<property name="ShadowType">None</property>
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Fixed" id="fixed4">
|
||||
<widget class="Gtk.Label" id="labelServer">
|
||||
<property name="MemberName" />
|
||||
<property name="HasWindow">False</property>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="button7">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextOnly</property>
|
||||
<property name="Label" translatable="yes">GtkButton</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="X">30</property>
|
||||
<property name="Y">25</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="GtkLabel2">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes"><b>Controls</b></property>
|
||||
<property name="HeightRequest">36</property>
|
||||
<property name="LabelProp" translatable="yes"><b><u>Server connection</u></b></property>
|
||||
<property name="UseMarkup">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">label_item</property>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Alignment" id="gtkAlignmentServer">
|
||||
<property name="MemberName" />
|
||||
<property name="Xalign">0</property>
|
||||
<property name="Yalign">0</property>
|
||||
<property name="LeftPadding">12</property>
|
||||
<child>
|
||||
<widget class="Gtk.VBox" id="vbox6">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Table" id="table1">
|
||||
<property name="MemberName" />
|
||||
<property name="NRows">3</property>
|
||||
<property name="NColumns">2</property>
|
||||
<property name="RowSpacing">6</property>
|
||||
<property name="ColumnSpacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Entry" id="entryServerName">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="IsEditable">True</property>
|
||||
<property name="InvisibleChar">●</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="LeftAttach">1</property>
|
||||
<property name="RightAttach">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="YOptions">Fill</property>
|
||||
<property name="XExpand">True</property>
|
||||
<property name="XFill">True</property>
|
||||
<property name="XShrink">False</property>
|
||||
<property name="YExpand">False</property>
|
||||
<property name="YFill">True</property>
|
||||
<property name="YShrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Entry" id="entryServerPort">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="IsEditable">True</property>
|
||||
<property name="InvisibleChar">●</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="TopAttach">1</property>
|
||||
<property name="BottomAttach">2</property>
|
||||
<property name="LeftAttach">1</property>
|
||||
<property name="RightAttach">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="YOptions">Fill</property>
|
||||
<property name="XExpand">True</property>
|
||||
<property name="XFill">True</property>
|
||||
<property name="XShrink">False</property>
|
||||
<property name="YExpand">False</property>
|
||||
<property name="YFill">True</property>
|
||||
<property name="YShrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Entry" id="entryTimeout">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="IsEditable">True</property>
|
||||
<property name="InvisibleChar">●</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="TopAttach">2</property>
|
||||
<property name="BottomAttach">3</property>
|
||||
<property name="LeftAttach">1</property>
|
||||
<property name="RightAttach">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="YOptions">Fill</property>
|
||||
<property name="XExpand">True</property>
|
||||
<property name="XFill">True</property>
|
||||
<property name="XShrink">False</property>
|
||||
<property name="YExpand">False</property>
|
||||
<property name="YFill">True</property>
|
||||
<property name="YShrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="label1">
|
||||
<property name="MemberName" />
|
||||
<property name="Xalign">1</property>
|
||||
<property name="LabelProp" translatable="yes">Server name:</property>
|
||||
<property name="Justify">Right</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="XOptions">Fill</property>
|
||||
<property name="YOptions">Fill</property>
|
||||
<property name="XExpand">False</property>
|
||||
<property name="XFill">True</property>
|
||||
<property name="XShrink">False</property>
|
||||
<property name="YExpand">False</property>
|
||||
<property name="YFill">True</property>
|
||||
<property name="YShrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="label2">
|
||||
<property name="MemberName" />
|
||||
<property name="Xalign">1</property>
|
||||
<property name="LabelProp" translatable="yes">Server port:</property>
|
||||
<property name="Justify">Right</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="TopAttach">1</property>
|
||||
<property name="BottomAttach">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="XOptions">Fill</property>
|
||||
<property name="YOptions">Fill</property>
|
||||
<property name="XExpand">False</property>
|
||||
<property name="XFill">True</property>
|
||||
<property name="XShrink">False</property>
|
||||
<property name="YExpand">False</property>
|
||||
<property name="YFill">True</property>
|
||||
<property name="YShrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="label5">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">Timeout (ms):</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="TopAttach">2</property>
|
||||
<property name="BottomAttach">3</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="XOptions">Fill</property>
|
||||
<property name="YOptions">Fill</property>
|
||||
<property name="XExpand">False</property>
|
||||
<property name="XFill">True</property>
|
||||
<property name="XShrink">False</property>
|
||||
<property name="YExpand">False</property>
|
||||
<property name="YFill">True</property>
|
||||
<property name="YShrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="buttonServerConnection">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextOnly</property>
|
||||
<property name="Label" translatable="yes">Connect</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnButtonServerConnectionClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="PackType">End</property>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.HSeparator" id="hseparator1">
|
||||
<property name="MemberName" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.VBox" id="vbox11">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="labelRobot">
|
||||
<property name="MemberName" />
|
||||
<property name="HeightRequest">36</property>
|
||||
<property name="LabelProp" translatable="yes"><b><u>Robot Activation</u></b></property>
|
||||
<property name="UseMarkup">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Alignment" id="alignment9">
|
||||
<property name="MemberName" />
|
||||
<child>
|
||||
<widget class="Gtk.Alignment" id="gtkAlignmentRobot">
|
||||
<property name="MemberName" />
|
||||
<property name="Xalign">0</property>
|
||||
<property name="Yalign">0</property>
|
||||
<property name="LeftPadding">12</property>
|
||||
<child>
|
||||
<widget class="Gtk.VBox" id="vbox8">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Alignment" id="alignment6">
|
||||
<property name="MemberName" />
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox4">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.RadioButton" id="radioButtonWithWatchdog">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Label" translatable="yes">with watchdog</property>
|
||||
<property name="Active">True</property>
|
||||
<property name="DrawIndicator">True</property>
|
||||
<property name="HasLabel">True</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<property name="Group">radioGroupRobotActivation</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.RadioButton" id="radioButtonWithoutWatchdog">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Label" translatable="yes">without watchdog</property>
|
||||
<property name="DrawIndicator">True</property>
|
||||
<property name="HasLabel">True</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<property name="Group">radioGroupRobotActivation</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Alignment" id="alignment5">
|
||||
<property name="MemberName" />
|
||||
<child>
|
||||
<widget class="Gtk.Alignment" id="alignment7">
|
||||
<property name="MemberName" />
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="buttonRobotActivation">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextOnly</property>
|
||||
<property name="Label" translatable="yes">Activation</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnButtonRobotActivationClicked" />
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.HSeparator" id="hseparator2">
|
||||
<property name="MemberName" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">3</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.VBox" id="vbox12">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="labelRobotControl">
|
||||
<property name="MemberName" />
|
||||
<property name="HeightRequest">36</property>
|
||||
<property name="LabelProp" translatable="yes"><b><u>Robot Controls and Status</u></b></property>
|
||||
<property name="UseMarkup">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Alignment" id="gtkAlignmentRobotControl">
|
||||
<property name="MemberName" />
|
||||
<property name="Xalign">0</property>
|
||||
<property name="Yalign">0</property>
|
||||
<property name="LeftPadding">12</property>
|
||||
<child>
|
||||
<widget class="Gtk.VBox" id="vbox9">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Alignment" id="alignment8">
|
||||
<property name="MemberName" />
|
||||
<property name="Xscale">0</property>
|
||||
<property name="Yscale">0</property>
|
||||
<child>
|
||||
<widget class="Gtk.Table" id="table4">
|
||||
<property name="MemberName" />
|
||||
<property name="NRows">3</property>
|
||||
<property name="NColumns">3</property>
|
||||
<property name="RowSpacing">6</property>
|
||||
<property name="ColumnSpacing">6</property>
|
||||
<child>
|
||||
<placeholder />
|
||||
</child>
|
||||
<child>
|
||||
<placeholder />
|
||||
</child>
|
||||
<child>
|
||||
<placeholder />
|
||||
</child>
|
||||
<child>
|
||||
<placeholder />
|
||||
</child>
|
||||
<child>
|
||||
<placeholder />
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="buttonDown">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextAndIcon</property>
|
||||
<property name="Icon">resource:monitor.ressources.pan-down-symbolic.symbolic.png</property>
|
||||
<property name="Label" translatable="yes" />
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnButtonMouvClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="TopAttach">2</property>
|
||||
<property name="BottomAttach">3</property>
|
||||
<property name="LeftAttach">1</property>
|
||||
<property name="RightAttach">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="XOptions">Fill</property>
|
||||
<property name="YOptions">Fill</property>
|
||||
<property name="XExpand">False</property>
|
||||
<property name="XFill">True</property>
|
||||
<property name="XShrink">False</property>
|
||||
<property name="YExpand">False</property>
|
||||
<property name="YFill">True</property>
|
||||
<property name="YShrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="buttonForward">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextAndIcon</property>
|
||||
<property name="Icon">resource:monitor.ressources.pan-up-symbolic.symbolic.png</property>
|
||||
<property name="Label" translatable="yes" />
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnButtonMouvClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="LeftAttach">1</property>
|
||||
<property name="RightAttach">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="XOptions">Fill</property>
|
||||
<property name="YOptions">Fill</property>
|
||||
<property name="XExpand">False</property>
|
||||
<property name="XFill">True</property>
|
||||
<property name="XShrink">False</property>
|
||||
<property name="YExpand">False</property>
|
||||
<property name="YFill">True</property>
|
||||
<property name="YShrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="buttonLeft">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextAndIcon</property>
|
||||
<property name="Icon">resource:monitor.ressources.pan-start-symbolic.symbolic.png</property>
|
||||
<property name="Label" translatable="yes" />
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnButtonMouvClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="TopAttach">1</property>
|
||||
<property name="BottomAttach">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="XOptions">Fill</property>
|
||||
<property name="YOptions">Fill</property>
|
||||
<property name="XExpand">False</property>
|
||||
<property name="XFill">True</property>
|
||||
<property name="XShrink">False</property>
|
||||
<property name="YExpand">False</property>
|
||||
<property name="YFill">True</property>
|
||||
<property name="YShrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="buttonRight">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextAndIcon</property>
|
||||
<property name="Icon">resource:monitor.ressources.pan-end-symbolic.symbolic.png</property>
|
||||
<property name="Label" translatable="yes" />
|
||||
<property name="UseUnderline">True</property>
|
||||
<signal name="Clicked" handler="OnButtonMouvClicked" />
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="TopAttach">1</property>
|
||||
<property name="BottomAttach">2</property>
|
||||
<property name="LeftAttach">2</property>
|
||||
<property name="RightAttach">3</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="XOptions">Fill</property>
|
||||
<property name="YOptions">Fill</property>
|
||||
<property name="XExpand">False</property>
|
||||
<property name="XFill">True</property>
|
||||
<property name="XShrink">False</property>
|
||||
<property name="YExpand">False</property>
|
||||
<property name="YFill">True</property>
|
||||
<property name="YShrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">0</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder />
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Table" id="table3">
|
||||
<property name="MemberName" />
|
||||
<property name="NColumns">2</property>
|
||||
<property name="RowSpacing">6</property>
|
||||
<property name="ColumnSpacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="label3">
|
||||
<property name="MemberName" />
|
||||
<property name="Xalign">1</property>
|
||||
<property name="LabelProp" translatable="yes">Battery level:</property>
|
||||
<property name="Justify">Right</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="YPadding">10</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="XOptions">Fill</property>
|
||||
<property name="YOptions">Fill</property>
|
||||
<property name="XExpand">False</property>
|
||||
<property name="XFill">True</property>
|
||||
<property name="XShrink">False</property>
|
||||
<property name="YExpand">False</property>
|
||||
<property name="YFill">True</property>
|
||||
<property name="YShrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="labelBatteryLevel">
|
||||
<property name="MemberName" />
|
||||
<property name="Xpad">1</property>
|
||||
<property name="Xalign">0</property>
|
||||
<property name="LabelProp" translatable="yes">Unknown</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="LeftAttach">1</property>
|
||||
<property name="RightAttach">2</property>
|
||||
<property name="AutoSize">False</property>
|
||||
<property name="YOptions">Fill</property>
|
||||
<property name="XExpand">True</property>
|
||||
<property name="XFill">True</property>
|
||||
<property name="XShrink">False</property>
|
||||
<property name="YExpand">False</property>
|
||||
<property name="YFill">True</property>
|
||||
<property name="YShrink">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.CheckButton" id="checkButtonGetBattery">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Label" translatable="yes">Get battery level</property>
|
||||
<property name="DrawIndicator">True</property>
|
||||
<property name="HasLabel">True</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">3</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">4</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
|
@ -105,24 +792,6 @@
|
|||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Statusbar" id="statusbar1">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<placeholder />
|
||||
</child>
|
||||
<child>
|
||||
<placeholder />
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
|
|
@ -47,11 +47,19 @@
|
|||
<SpecificVersion>False</SpecificVersion>
|
||||
</Reference>
|
||||
<Reference Include="Mono.Posix" />
|
||||
<Reference Include="Mono.Cairo" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="gtk-gui\gui.stetic">
|
||||
<LogicalName>gui.stetic</LogicalName>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="ressources\pan-up-symbolic.symbolic.png" />
|
||||
<EmbeddedResource Include="ressources\pan-down-symbolic.symbolic.png" />
|
||||
<EmbeddedResource Include="ressources\pan-start-symbolic.symbolic.png" />
|
||||
<EmbeddedResource Include="ressources\pan-end-symbolic.symbolic.png" />
|
||||
<EmbeddedResource Include="ressources\robot-icon.png" />
|
||||
<EmbeddedResource Include="ressources\robot-icon.resized.png" />
|
||||
<EmbeddedResource Include="ressources\missing_picture.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="gtk-gui\generated.cs" />
|
||||
|
@ -59,6 +67,9 @@
|
|||
<Compile Include="gtk-gui\MainWindow.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Client.cs" />
|
||||
<Compile Include="CommandManager.cs" />
|
||||
<Compile Include="DestijlCommandManager.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
BIN
software/monitor/monitor/ressources/missing_picture.png
Normal file
BIN
software/monitor/monitor/ressources/missing_picture.png
Normal file
Binary file not shown.
After (image error) Size: 1.6 KiB |
Binary file not shown.
After (image error) Size: 124 B |
Binary file not shown.
After (image error) Size: 158 B |
Binary file not shown.
After (image error) Size: 155 B |
BIN
software/monitor/monitor/ressources/pan-up-symbolic.symbolic.png
Normal file
BIN
software/monitor/monitor/ressources/pan-up-symbolic.symbolic.png
Normal file
Binary file not shown.
After (image error) Size: 125 B |
BIN
software/monitor/monitor/ressources/robot-icon.png
Normal file
BIN
software/monitor/monitor/ressources/robot-icon.png
Normal file
Binary file not shown.
After (image error) Size: 12 KiB |
BIN
software/monitor/monitor/ressources/robot-icon.resized.png
Normal file
BIN
software/monitor/monitor/ressources/robot-icon.resized.png
Normal file
Binary file not shown.
After (image error) Size: 913 B |
|
@ -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
|
||||
|
|
|
@ -14,12 +14,14 @@
|
|||
#ifndef IMAGERIE_H
|
||||
#define IMAGERIE_H
|
||||
|
||||
#define __STUB__
|
||||
|
||||
#ifndef __STUB__
|
||||
#ifndef __FOR_PC__
|
||||
#include <raspicam/raspicam_cv.h>
|
||||
#else
|
||||
#include <opencv2/highgui/highgui.hpp>
|
||||
#endif /* __FOR_PC__ */
|
||||
#else
|
||||
#include <opencv2/highgui/highgui.hpp>
|
||||
#endif
|
||||
#include "opencv2/imgproc/imgproc.hpp"
|
||||
#include <unistd.h>
|
||||
|
@ -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<unsigned char> Jpg;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||
<group>
|
||||
<file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/superviseur/src/functions.cpp</file>
|
||||
<file>file:/home/dimercur/Documents/Travail/git/dumber/software/raspberry/superviseur-robot/lib/image.h</file>
|
||||
</group>
|
||||
</open-files>
|
||||
</project-private>
|
||||
|
|
|
@ -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);
|
||||
|
|
5
software/raspberry/testeur/testeur/.dep.inc
Normal file
5
software/raspberry/testeur/testeur/.dep.inc
Normal file
|
@ -0,0 +1,5 @@
|
|||
# This code depends on make tool being used
|
||||
DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES} ${TESTOBJECTFILES}))
|
||||
ifneq (${DEPFILES},)
|
||||
include ${DEPFILES}
|
||||
endif
|
128
software/raspberry/testeur/testeur/Makefile
Normal file
128
software/raspberry/testeur/testeur/Makefile
Normal file
|
@ -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
|
256
software/raspberry/testeur/testeur/main.cpp
Normal file
256
software/raspberry/testeur/testeur/main.cpp
Normal file
|
@ -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 <cstdlib>
|
||||
|
||||
#include "image.h"
|
||||
#include "server.h"
|
||||
#include "robot.h"
|
||||
#include "message.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
||||
#include <thread>
|
||||
|
||||
#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<char*> (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;
|
||||
}
|
||||
|
107
software/raspberry/testeur/testeur/nbproject/Makefile-Debug.mk
Normal file
107
software/raspberry/testeur/testeur/nbproject/Makefile-Debug.mk
Normal file
|
@ -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
|
107
software/raspberry/testeur/testeur/nbproject/Makefile-Release.mk
Normal file
107
software/raspberry/testeur/testeur/nbproject/Makefile-Release.mk
Normal file
|
@ -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
|
133
software/raspberry/testeur/testeur/nbproject/Makefile-impl.mk
Normal file
133
software/raspberry/testeur/testeur/nbproject/Makefile-impl.mk
Normal file
|
@ -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=<CONFIGURATION>] [SUB=no] build"
|
||||
@echo " make [CONF=<CONFIGURATION>] [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 ""
|
||||
|
|
@ -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
|
|
@ -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}
|
|
@ -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}
|
180
software/raspberry/testeur/testeur/nbproject/configurations.xml
Normal file
180
software/raspberry/testeur/testeur/nbproject/configurations.xml
Normal file
|
@ -0,0 +1,180 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configurationDescriptor version="100">
|
||||
<logicalFolder name="root" displayName="root" projectFiles="true" kind="ROOT">
|
||||
<logicalFolder name="HeaderFiles"
|
||||
displayName="Header Files"
|
||||
projectFiles="true">
|
||||
<itemPath>../../superviseur-robot/lib/image.h</itemPath>
|
||||
<itemPath>../../superviseur-robot/lib/message.h</itemPath>
|
||||
<itemPath>../../superviseur-robot/lib/robot.h</itemPath>
|
||||
<itemPath>../../superviseur-robot/lib/server.h</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="ResourceFiles"
|
||||
displayName="Resource Files"
|
||||
projectFiles="true">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="SourceFiles"
|
||||
displayName="Source Files"
|
||||
projectFiles="true">
|
||||
<itemPath>../../superviseur-robot/lib/src/image.cpp</itemPath>
|
||||
<itemPath>main.cpp</itemPath>
|
||||
<itemPath>../../superviseur-robot/lib/src/message.cpp</itemPath>
|
||||
<itemPath>../../superviseur-robot/lib/src/robot.cpp</itemPath>
|
||||
<itemPath>../../superviseur-robot/lib/src/server.cpp</itemPath>
|
||||
</logicalFolder>
|
||||
<logicalFolder name="TestFiles"
|
||||
displayName="Test Files"
|
||||
projectFiles="false"
|
||||
kind="TEST_LOGICAL_FOLDER">
|
||||
</logicalFolder>
|
||||
<logicalFolder name="ExternalFiles"
|
||||
displayName="Important Files"
|
||||
projectFiles="false"
|
||||
kind="IMPORTANT_FILES_FOLDER">
|
||||
<itemPath>Makefile</itemPath>
|
||||
</logicalFolder>
|
||||
</logicalFolder>
|
||||
<sourceRootList>
|
||||
<Elem>../../superviseur-robot/lib/src</Elem>
|
||||
</sourceRootList>
|
||||
<projectmakefile>Makefile</projectmakefile>
|
||||
<confs>
|
||||
<conf name="Debug" type="1">
|
||||
<toolsSet>
|
||||
<compilerSet>default</compilerSet>
|
||||
<dependencyChecking>true</dependencyChecking>
|
||||
<rebuildPropChanged>false</rebuildPropChanged>
|
||||
</toolsSet>
|
||||
<compileType>
|
||||
<cTool>
|
||||
<incDir>
|
||||
<pElem>../../superviseur-robot/lib</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>__FOR_PC__</Elem>
|
||||
</preprocessorList>
|
||||
</cTool>
|
||||
<ccTool>
|
||||
<incDir>
|
||||
<pElem>../../superviseur-robot/lib</pElem>
|
||||
</incDir>
|
||||
<preprocessorList>
|
||||
<Elem>D_REENTRANT</Elem>
|
||||
<Elem>__FOR_PC__</Elem>
|
||||
</preprocessorList>
|
||||
</ccTool>
|
||||
<linkerTool>
|
||||
<linkerLibItems>
|
||||
<linkerOptionItem>`pkg-config --libs opencv`</linkerOptionItem>
|
||||
<linkerLibStdlibItem>PosixThreads</linkerLibStdlibItem>
|
||||
</linkerLibItems>
|
||||
</linkerTool>
|
||||
</compileType>
|
||||
<item path="../../superviseur-robot/lib/image.h"
|
||||
ex="false"
|
||||
tool="3"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="../../superviseur-robot/lib/message.h"
|
||||
ex="false"
|
||||
tool="3"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="../../superviseur-robot/lib/robot.h"
|
||||
ex="false"
|
||||
tool="3"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="../../superviseur-robot/lib/server.h"
|
||||
ex="false"
|
||||
tool="3"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="../../superviseur-robot/lib/src/image.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="../../superviseur-robot/lib/src/message.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="../../superviseur-robot/lib/src/robot.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="../../superviseur-robot/lib/src/server.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="main.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
</conf>
|
||||
<conf name="Release" type="1">
|
||||
<toolsSet>
|
||||
<compilerSet>default</compilerSet>
|
||||
<dependencyChecking>true</dependencyChecking>
|
||||
<rebuildPropChanged>false</rebuildPropChanged>
|
||||
</toolsSet>
|
||||
<compileType>
|
||||
<cTool>
|
||||
<developmentMode>5</developmentMode>
|
||||
</cTool>
|
||||
<ccTool>
|
||||
<developmentMode>5</developmentMode>
|
||||
</ccTool>
|
||||
<fortranCompilerTool>
|
||||
<developmentMode>5</developmentMode>
|
||||
</fortranCompilerTool>
|
||||
<asmTool>
|
||||
<developmentMode>5</developmentMode>
|
||||
</asmTool>
|
||||
</compileType>
|
||||
<item path="../../superviseur-robot/lib/image.h"
|
||||
ex="false"
|
||||
tool="3"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="../../superviseur-robot/lib/message.h"
|
||||
ex="false"
|
||||
tool="3"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="../../superviseur-robot/lib/robot.h"
|
||||
ex="false"
|
||||
tool="3"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="../../superviseur-robot/lib/server.h"
|
||||
ex="false"
|
||||
tool="3"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="../../superviseur-robot/lib/src/image.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="../../superviseur-robot/lib/src/message.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="../../superviseur-robot/lib/src/robot.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="../../superviseur-robot/lib/src/server.cpp"
|
||||
ex="false"
|
||||
tool="1"
|
||||
flavor2="0">
|
||||
</item>
|
||||
<item path="main.cpp" ex="false" tool="1" flavor2="0">
|
||||
</item>
|
||||
</conf>
|
||||
</confs>
|
||||
</configurationDescriptor>
|
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
# Generated - do not edit!
|
||||
#
|
||||
# NOCDDL
|
||||
#
|
||||
# Debug configuration
|
||||
# Release configuration
|
|
@ -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 <assert.h> // Conditionally compiled macro that compares its argument to zero
|
||||
#include <ctype.h> // Functions to determine the type contained in character data
|
||||
#include <errno.h> // Macros reporting error conditions
|
||||
#include <float.h> // Limits of float types
|
||||
#include <limits.h> // Sizes of basic types
|
||||
#include <locale.h> // Localization utilities
|
||||
#include <math.h> // Common mathematics functions
|
||||
#include <setjmp.h> // Nonlocal jumps
|
||||
#include <signal.h> // Signal handling
|
||||
#include <stdarg.h> // Variable arguments
|
||||
#include <stddef.h> // Common macro definitions
|
||||
#include <stdio.h> // Input/output
|
||||
#include <string.h> // String handling
|
||||
#include <stdlib.h> // General utilities: memory management, program utilities, string conversions, random numbers
|
||||
#include <time.h> // Time/date utilities
|
||||
#include <iso646.h> // (since C95) Alternative operator spellings
|
||||
#include <wchar.h> // (since C95) Extended multibyte and wide character utilities
|
||||
#include <wctype.h> // (since C95) Wide character classification and mapping utilities
|
||||
#ifdef _STDC_C99
|
||||
#include <complex.h> // (since C99) Complex number arithmetic
|
||||
#include <fenv.h> // (since C99) Floating-point environment
|
||||
#include <inttypes.h> // (since C99) Format conversion of integer types
|
||||
#include <stdbool.h> // (since C99) Boolean type
|
||||
#include <stdint.h> // (since C99) Fixed-width integer types
|
||||
#include <tgmath.h> // (since C99) Type-generic math (macros wrapping math.h and complex.h)
|
||||
#endif
|
||||
#ifdef _STDC_C11
|
||||
#include <stdalign.h> // (since C11) alignas and alignof convenience macros
|
||||
#include <stdatomic.h> // (since C11) Atomic types
|
||||
#include <stdnoreturn.h> // (since C11) noreturn convenience macros
|
||||
#include <threads.h> // (since C11) Thread library
|
||||
#include <uchar.h> // (since C11) UTF-16 and UTF-32 character utilities
|
||||
#endif
|
|
@ -0,0 +1,74 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configurationDescriptor version="100">
|
||||
<projectmakefile>Makefile</projectmakefile>
|
||||
<confs>
|
||||
<conf name="Debug" type="1">
|
||||
<toolsSet>
|
||||
<developmentServer>localhost</developmentServer>
|
||||
<platform>2</platform>
|
||||
</toolsSet>
|
||||
<dbx_gdbdebugger version="1">
|
||||
<gdb_pathmaps>
|
||||
</gdb_pathmaps>
|
||||
<gdb_interceptlist>
|
||||
<gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
|
||||
</gdb_interceptlist>
|
||||
<gdb_signals>
|
||||
</gdb_signals>
|
||||
<gdb_options>
|
||||
<DebugOptions>
|
||||
</DebugOptions>
|
||||
</gdb_options>
|
||||
<gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
|
||||
</dbx_gdbdebugger>
|
||||
<nativedebugger version="1">
|
||||
<engine>gdb</engine>
|
||||
</nativedebugger>
|
||||
<runprofile version="9">
|
||||
<runcommandpicklist>
|
||||
<runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
|
||||
</runcommandpicklist>
|
||||
<runcommand>"${OUTPUT_PATH}"</runcommand>
|
||||
<rundir></rundir>
|
||||
<buildfirst>true</buildfirst>
|
||||
<terminal-type>0</terminal-type>
|
||||
<remove-instrumentation>0</remove-instrumentation>
|
||||
<environment>
|
||||
</environment>
|
||||
</runprofile>
|
||||
</conf>
|
||||
<conf name="Release" type="1">
|
||||
<toolsSet>
|
||||
<developmentServer>localhost</developmentServer>
|
||||
<platform>2</platform>
|
||||
</toolsSet>
|
||||
<dbx_gdbdebugger version="1">
|
||||
<gdb_pathmaps>
|
||||
</gdb_pathmaps>
|
||||
<gdb_interceptlist>
|
||||
<gdbinterceptoptions gdb_all="false" gdb_unhandled="true" gdb_unexpected="true"/>
|
||||
</gdb_interceptlist>
|
||||
<gdb_options>
|
||||
<DebugOptions>
|
||||
</DebugOptions>
|
||||
</gdb_options>
|
||||
<gdb_buildfirst gdb_buildfirst_overriden="false" gdb_buildfirst_old="false"/>
|
||||
</dbx_gdbdebugger>
|
||||
<nativedebugger version="1">
|
||||
<engine>gdb</engine>
|
||||
</nativedebugger>
|
||||
<runprofile version="9">
|
||||
<runcommandpicklist>
|
||||
<runcommandpicklistitem>"${OUTPUT_PATH}"</runcommandpicklistitem>
|
||||
</runcommandpicklist>
|
||||
<runcommand>"${OUTPUT_PATH}"</runcommand>
|
||||
<rundir></rundir>
|
||||
<buildfirst>true</buildfirst>
|
||||
<terminal-type>0</terminal-type>
|
||||
<remove-instrumentation>0</remove-instrumentation>
|
||||
<environment>
|
||||
</environment>
|
||||
</runprofile>
|
||||
</conf>
|
||||
</confs>
|
||||
</configurationDescriptor>
|
|
@ -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 <cstdlib> // General purpose utilities: program control, dynamic memory allocation, random numbers, sort and search
|
||||
#include <csignal> // Functions and macro constants for signal management
|
||||
#include <csetjmp> // Macro (and function) that saves (and jumps) to an execution context
|
||||
#include <cstdarg> // Handling of variable length argument lists
|
||||
#include <typeinfo> // Runtime type information utilities
|
||||
#include <bitset> // std::bitset class template
|
||||
#include <functional> // Function objects, designed for use with the standard algorithms
|
||||
#include <utility> // Various utility components
|
||||
#include <ctime> // C-style time/date utilites
|
||||
#include <cstddef> // typedefs for types such as size_t, NULL and others
|
||||
#include <new> // Low-level memory management utilities
|
||||
#include <memory> // Higher level memory management utilities
|
||||
#include <climits> // limits of integral types
|
||||
#include <cfloat> // limits of float types
|
||||
#include <limits> // standardized way to query properties of arithmetic types
|
||||
#include <exception> // Exception handling utilities
|
||||
#include <stdexcept> // Standard exception objects
|
||||
#include <cassert> // Conditionally compiled macro that compares its argument to zero
|
||||
#include <cerrno> // Macro containing the last error number
|
||||
#include <cctype> // functions to determine the type contained in character data
|
||||
#include <cwctype> // functions for determining the type of wide character data
|
||||
#include <cstring> // various narrow character string handling functions
|
||||
#include <cwchar> // various wide and multibyte string handling functions
|
||||
#include <string> // std::basic_string class template
|
||||
#include <vector> // std::vector container
|
||||
#include <deque> // std::deque container
|
||||
#include <list> // std::list container
|
||||
#include <set> // std::set and std::multiset associative containers
|
||||
#include <map> // std::map and std::multimap associative containers
|
||||
#include <stack> // std::stack container adaptor
|
||||
#include <queue> // std::queue and std::priority_queue container adaptors
|
||||
#include <algorithm> // Algorithms that operate on containers
|
||||
#include <iterator> // Container iterators
|
||||
#include <cmath> // Common mathematics functions
|
||||
#include <complex> // Complex number type
|
||||
#include <valarray> // Class for representing and manipulating arrays of values
|
||||
#include <numeric> // Numeric operations on values in containers
|
||||
#include <iosfwd> // forward declarations of all classes in the input/output library
|
||||
#include <ios> // std::ios_base class, std::basic_ios class template and several typedefs
|
||||
#include <istream> // std::basic_istream class template and several typedefs
|
||||
#include <ostream> // std::basic_ostream, std::basic_iostream class templates and several typedefs
|
||||
#include <iostream> // several standard stream objects
|
||||
#include <fstream> // std::basic_fstream, std::basic_ifstream, std::basic_ofstream class templates and several typedefs
|
||||
#include <sstream> // std::basic_stringstream, std::basic_istringstream, std::basic_ostringstream class templates and several typedefs
|
||||
#include <strstream> // std::strstream, std::istrstream, std::ostrstream(deprecated)
|
||||
#include <iomanip> // Helper functions to control the format or input and output
|
||||
#include <streambuf> // std::basic_streambuf class template
|
||||
#include <cstdio> // C-style input-output functions
|
||||
#include <locale> // Localization utilities
|
||||
#include <clocale> // C localization utilities
|
||||
#include <ciso646> // empty header. The macros that appear in iso646.h in C are keywords in C++
|
||||
#if __cplusplus >= 201103L
|
||||
#include <typeindex> // (since C++11) std::type_index
|
||||
#include <type_traits> // (since C++11) Compile-time type information
|
||||
#include <chrono> // (since C++11) C++ time utilites
|
||||
#include <initializer_list> // (since C++11) std::initializer_list class template
|
||||
#include <tuple> // (since C++11) std::tuple class template
|
||||
#include <scoped_allocator> // (since C++11) Nested allocator class
|
||||
#include <cstdint> // (since C++11) fixed-size types and limits of other types
|
||||
#include <cinttypes> // (since C++11) formatting macros , intmax_t and uintmax_t math and conversions
|
||||
#include <system_error> // (since C++11) defines std::error_code, a platform-dependent error code
|
||||
#include <cuchar> // (since C++11) C-style Unicode character conversion functions
|
||||
#include <array> // (since C++11) std::array container
|
||||
#include <forward_list> // (since C++11) std::forward_list container
|
||||
#include <unordered_set> // (since C++11) std::unordered_set and std::unordered_multiset unordered associative containers
|
||||
#include <unordered_map> // (since C++11) std::unordered_map and std::unordered_multimap unordered associative containers
|
||||
#include <random> // (since C++11) Random number generators and distributions
|
||||
#include <ratio> // (since C++11) Compile-time rational arithmetic
|
||||
#include <cfenv> // (since C++11) Floating-point environment access functions
|
||||
#include <codecvt> // (since C++11) Unicode conversion facilities
|
||||
#include <regex> // (since C++11) Classes, algorithms and iterators to support regular expression processing
|
||||
#include <atomic> // (since C++11) Atomic operations library
|
||||
#include <ccomplex> // (since C++11)(deprecated in C++17) simply includes the header <complex>
|
||||
#include <ctgmath> // (since C++11)(deprecated in C++17) simply includes the headers <ccomplex> (until C++17)<complex> (since C++17) and <cmath>: the overloads equivalent to the contents of the C header tgmath.h are already provided by those headers
|
||||
#include <cstdalign> // (since C++11)(deprecated in C++17) defines one compatibility macro constant
|
||||
#include <cstdbool> // (since C++11)(deprecated in C++17) defines one compatibility macro constant
|
||||
#include <thread> // (since C++11) std::thread class and supporting functions
|
||||
#include <mutex> // (since C++11) mutual exclusion primitives
|
||||
#include <future> // (since C++11) primitives for asynchronous computations
|
||||
#include <condition_variable> // (since C++11) thread waiting conditions
|
||||
#endif
|
||||
#if __cplusplus >= 201300L
|
||||
#include <shared_mutex> // (since C++14) shared mutual exclusion primitives
|
||||
#endif
|
||||
#if __cplusplus >= 201500L
|
||||
#include <any> // (since C++17) std::any class template
|
||||
#include <optional> // (since C++17) std::optional class template
|
||||
#include <variant> // (since C++17) std::variant class template
|
||||
#include <memory_resource> // (since C++17) Polymorphic allocators and memory resources
|
||||
#include <string_view> // (since C++17) std::basic_string_view class template
|
||||
#include <execution> // (since C++17) Predefined execution policies for parallel versions of the algorithms
|
||||
#include <filesystem> // (since C++17) std::path class and supporting functions
|
||||
#endif
|
|
@ -0,0 +1,42 @@
|
|||
# Launchers File syntax:
|
||||
#
|
||||
# [Must-have property line]
|
||||
# launcher1.runCommand=<Run Command>
|
||||
# [Optional extra properties]
|
||||
# launcher1.displayName=<Display Name, runCommand by default>
|
||||
# launcher1.hide=<true if lancher is not visible in menu, false by default>
|
||||
# launcher1.buildCommand=<Build Command, Build Command specified in project properties by default>
|
||||
# launcher1.runDir=<Run Directory, ${PROJECT_DIR} by default>
|
||||
# launcher1.runInOwnTab=<false if launcher reuse common "Run" output tab, true by default>
|
||||
# launcher1.symbolFiles=<Symbol Files loaded by debugger, ${OUTPUT_PATH} by default>
|
||||
# launcher1.env.<Environment variable KEY>=<Environment variable VALUE>
|
||||
# (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=<Run Directory>
|
||||
# (This value is overwritten by a launcher specific runDir value if the latter exists)
|
||||
# common.env.<Environment variable KEY>=<Environment variable VALUE>
|
||||
# (Environment variables from common launcher are merged with launcher specific variables)
|
||||
# common.symbolFiles=<Symbol Files loaded by debugger>
|
||||
# (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=<type your run command here>
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||
<data xmlns="http://www.netbeans.org/ns/make-project-private/1">
|
||||
<activeConfTypeElem>1</activeConfTypeElem>
|
||||
<activeConfIndexElem>0</activeConfIndexElem>
|
||||
</data>
|
||||
</project-private>
|
30
software/raspberry/testeur/testeur/nbproject/project.xml
Normal file
30
software/raspberry/testeur/testeur/nbproject/project.xml
Normal file
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||
<type>org.netbeans.modules.cnd.makeproject</type>
|
||||
<configuration>
|
||||
<data xmlns="http://www.netbeans.org/ns/make-project/1">
|
||||
<name>testeur</name>
|
||||
<c-extensions/>
|
||||
<cpp-extensions>cpp</cpp-extensions>
|
||||
<header-extensions>h</header-extensions>
|
||||
<sourceEncoding>UTF-8</sourceEncoding>
|
||||
<make-dep-projects/>
|
||||
<sourceRootList>
|
||||
<sourceRootElem>../../superviseur-robot/lib/src</sourceRootElem>
|
||||
</sourceRootList>
|
||||
<confList>
|
||||
<confElem>
|
||||
<name>Debug</name>
|
||||
<type>1</type>
|
||||
</confElem>
|
||||
<confElem>
|
||||
<name>Release</name>
|
||||
<type>1</type>
|
||||
</confElem>
|
||||
</confList>
|
||||
<formatting>
|
||||
<project-formatting-style>false</project-formatting-style>
|
||||
</formatting>
|
||||
</data>
|
||||
</configuration>
|
||||
</project>
|
Loading…
Reference in a new issue