localhost by default, reconnexion ok, panel control ok

This commit is contained in:
pehladik 2020-04-17 14:54:27 +02:00
parent 57158cfaa7
commit 588ba2ecc9
4 changed files with 12 additions and 4 deletions

View file

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

View file

@ -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;

View file

@ -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;

Binary file not shown.