diff --git a/software/monitor/monitor/Client.cs b/software/monitor/monitor/Client.cs index a2b7ecc..61976b8 100644 --- a/software/monitor/monitor/Client.cs +++ b/software/monitor/monitor/Client.cs @@ -35,7 +35,7 @@ namespace monitor /// /// Default server name /// - public const string defaultIP = "10.105.1.13"; + public const string defaultIP = "localhost"; /// /// Default server port number diff --git a/software/monitor/monitor/CommandManager.cs b/software/monitor/monitor/CommandManager.cs index 03efac1..a77e736 100644 --- a/software/monitor/monitor/CommandManager.cs +++ b/software/monitor/monitor/CommandManager.cs @@ -180,11 +180,16 @@ namespace monitor isBusy = true; // Send command to server + if (timeout > 0) // Command request an acknowledge + { + waitForAcknowledge = true; // Flag used in OnMessageReception callback to avoid + // sending acknowledge message to upper level + } + Client.Write(cmd); if (timeout > 0) // Command request an acknowledge - { - + { waitForAcknowledge = true; // Flag used in OnMessageReception callback to avoid // sending acknowledge message to upper level waitTimer.Interval = timeout; diff --git a/software/monitor/monitor/DestijlCommandManager.cs b/software/monitor/monitor/DestijlCommandManager.cs index 84b1bb9..d3803e7 100644 --- a/software/monitor/monitor/DestijlCommandManager.cs +++ b/software/monitor/monitor/DestijlCommandManager.cs @@ -111,7 +111,8 @@ namespace monitor InvalidAnswer, Busy, CommunicationLostWithRobot, - CommunicationLostWithServer + CommunicationLostWithServer, + CommunicationError } public struct Point { @@ -259,6 +260,8 @@ namespace monitor if (answer.ToUpper().Contains(DestijlCommandList.ANSWER_NACK)) status = CommandStatus.Rejected; // if communication is lost with robot, return CommunicationLostWithRobot else if (answer.ToUpper().Contains(DestijlCommandList.ANSWER_TIMEOUT)) status = CommandStatus.CommunicationLostWithRobot; + + else if (answer.ToUpper().Contains(DestijlCommandList.ANSWER_COM_ERROR)) status = CommandStatus.CommunicationError; // if answer is empty, communication with robot is lost else if (answer.Length == 0) status = CommandStatus.CommunicationLostWithServer; //else status = CommandStatus.InvalidAnswer; diff --git a/software/monitor/monitor/monitor b/software/monitor/monitor/monitor index 91a9f4d..8c205e0 100755 Binary files a/software/monitor/monitor/monitor and b/software/monitor/monitor/monitor differ