mirror of
https://github.com/yoboujon/dumber.git
synced 2025-06-08 13:50:49 +02:00
localhost by default, reconnexion ok, panel control ok
This commit is contained in:
parent
57158cfaa7
commit
588ba2ecc9
4 changed files with 12 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
Loading…
Add table
Reference in a new issue