Browse Source

localhost by default, reconnexion ok, panel control ok

pehladik 4 years ago
parent
commit
588ba2ecc9

+ 1
- 1
software/monitor/monitor/Client.cs View File

@@ -35,7 +35,7 @@ namespace monitor
35 35
         /// <summary>
36 36
         /// Default server name
37 37
         /// </summary>
38
-        public const string defaultIP = "10.105.1.13";
38
+        public const string defaultIP = "localhost";
39 39
 
40 40
         /// <summary>
41 41
         /// Default server port number

+ 7
- 2
software/monitor/monitor/CommandManager.cs View File

@@ -180,11 +180,16 @@ namespace monitor
180 180
                 isBusy = true;
181 181
 
182 182
                 // Send command to server
183
+                if (timeout > 0) // Command request an acknowledge
184
+                {
185
+                    waitForAcknowledge = true;  // Flag used in OnMessageReception callback to avoid
186
+                                                // sending acknowledge message to upper level
187
+                }
188
+
183 189
                 Client.Write(cmd);
184 190
 
185 191
                 if (timeout > 0) // Command request an acknowledge
186
-                {
187
-                    
192
+                {   
188 193
                     waitForAcknowledge = true;  // Flag used in OnMessageReception callback to avoid
189 194
                                                 // sending acknowledge message to upper level
190 195
                     waitTimer.Interval = timeout;

+ 4
- 1
software/monitor/monitor/DestijlCommandManager.cs View File

@@ -111,7 +111,8 @@ namespace monitor
111 111
             InvalidAnswer,
112 112
             Busy,
113 113
             CommunicationLostWithRobot,
114
-            CommunicationLostWithServer
114
+            CommunicationLostWithServer,
115
+            CommunicationError
115 116
         }
116 117
 
117 118
         public struct Point {
@@ -259,6 +260,8 @@ namespace monitor
259 260
                     if (answer.ToUpper().Contains(DestijlCommandList.ANSWER_NACK)) status = CommandStatus.Rejected;
260 261
                     // if communication is lost with robot, return CommunicationLostWithRobot
261 262
                     else if (answer.ToUpper().Contains(DestijlCommandList.ANSWER_TIMEOUT)) status = CommandStatus.CommunicationLostWithRobot;
263
+
264
+                    else if (answer.ToUpper().Contains(DestijlCommandList.ANSWER_COM_ERROR)) status = CommandStatus.CommunicationError;
262 265
                     // if answer is empty, communication with robot is lost
263 266
                     else if (answer.Length == 0) status = CommandStatus.CommunicationLostWithServer;
264 267
                     //else status = CommandStatus.InvalidAnswer;

BIN
software/monitor/monitor/monitor View File


Loading…
Cancel
Save