|
|
@@ -2,6 +2,9 @@
|
|
|
using System.Collections.Generic;
|
|
|
using System.IO;
|
|
|
using System.Linq;
|
|
|
+using System.Net;
|
|
|
+using System.Net.NetworkInformation;
|
|
|
+using System.Text;
|
|
|
using System.Threading;
|
|
|
using FluentResults;
|
|
|
using GSG.NET.Concurrent;
|
|
|
@@ -707,12 +710,7 @@ namespace VehicleControlSystem
|
|
|
GUIMessageEventArgs reply;
|
|
|
if (msg.MessageKey.Equals(MessageKey.AutoMode))
|
|
|
{
|
|
|
- //#if TEST
|
|
|
- // if (!QuartzUtils.StopSchedule("SteerTest"))
|
|
|
- // return;
|
|
|
- //#endif
|
|
|
-
|
|
|
- if (!this.ZmqManager.IsReqConnected)
|
|
|
+ if (!this.ZmqManager.IsReqConnected)
|
|
|
{
|
|
|
reply = new GUIMessageEventArgs { Kind = GUIMessageEventArgs.eGUIMessageKind.RspVehicleModeChange, Result = FluentResults.Results.Fail(new Error("Drive P/G not Connected")), MessageKey = MessageKey.ManualMode };
|
|
|
GUIMessageEventPublish(reply);
|
|
|
@@ -725,8 +723,8 @@ namespace VehicleControlSystem
|
|
|
GUIMessageEventPublish(reply);
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
- int result = vehicle.InitializationVehicle();
|
|
|
+
|
|
|
+ int result = vehicle.InitializationVehicle();
|
|
|
if (result != ConstInt.EXECUTE_SUCCESS)
|
|
|
{
|
|
|
var al = this.Alarms.FirstOrDefault(a => a.AlarmId == result);
|
|
|
@@ -817,6 +815,31 @@ namespace VehicleControlSystem
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
+ #region Tablet Ping Chack
|
|
|
+ bool ChackPing()
|
|
|
+ {
|
|
|
+ bool result = false;
|
|
|
+ PingOptions option = new PingOptions();
|
|
|
+ Ping ping = new Ping();
|
|
|
+
|
|
|
+ byte[] buffer = ASCIIEncoding.ASCII.GetBytes("");
|
|
|
+ int timeout = 120;
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var pingReply = ping.Send(IPAddress.Parse("109.19.25.240"), timeout, buffer, option);
|
|
|
+ if (pingReply.Status == IPStatus.Success)
|
|
|
+ result = true;
|
|
|
+ else
|
|
|
+ result = false;
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ logger.E(ex);
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
/// <summary>
|
|
|
/// GUI 로 보내는 Event
|
|
|
/// </summary>
|