From c75f62bad64e5b03c9cda9ba97c68aba7f09dd3d Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期五, 30 一月 2026 10:54:00 +0800
Subject: [PATCH] 添加化成分容堆垛机调度,优化路由查找
---
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Common/CommonStackerCrane.cs | 36 ++++++++++++++++++++++++------------
1 files changed, 24 insertions(+), 12 deletions(-)
diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Common/CommonStackerCrane.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Common/CommonStackerCrane.cs
index 66e63ff..5e746e7 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Common/CommonStackerCrane.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_QuartzJob/StackerCrane/Common/CommonStackerCrane.cs
@@ -1,4 +1,5 @@
锘�#region << 鐗� 鏈� 娉� 閲� >>
+
/*----------------------------------------------------------------
* 鍛藉悕绌洪棿锛歐IDESEAWCS_QuartzJob
* 鍒涘缓鑰咃細鑳$搴�
@@ -11,21 +12,15 @@
* 淇敼鏃堕棿锛�
* 鐗堟湰锛歏1.0.1
* 淇敼璇存槑锛�
- *
+ *
*----------------------------------------------------------------*/
+
#endregion << 鐗� 鏈� 娉� 閲� >>
using HslCommunication;
-using Microsoft.AspNetCore.Http;
-using System;
-using System.Collections.Generic;
using System.ComponentModel;
-using System.Linq;
using System.Reflection;
-using System.Text;
-using System.Threading.Tasks;
using WIDESEAWCS_Communicator;
-using WIDESEAWCS_Core.Enums;
using WIDESEAWCS_QuartzJob.DeviceBase;
using WIDESEAWCS_QuartzJob.DTO;
using WIDESEAWCS_QuartzJob.StackerCrane;
@@ -40,26 +35,32 @@
public class CommonStackerCrane : IStackerCrane
{
#region Private Member
+
/// <summary>
/// 鍫嗗灈鏈洪�氳瀵硅薄
/// </summary>
private BaseCommunicator _communicator;
+
/// <summary>
/// 鍫嗗灈鏈哄崗璁俊鎭�
/// </summary>
private readonly List<DeviceProDTO> _deviceProDTOs;
+
/// <summary>
/// 鍫嗗灈鏈哄崗璁槑缁嗕俊鎭�
/// </summary>
private readonly List<DeviceProtocolDetailDTO> _deviceProtocolDetailDTOs;
+
/// <summary>
/// 璁惧缂栧彿
/// </summary>
public readonly string _deviceCode;
+
/// <summary>
/// 璁惧鍚嶇О
/// </summary>
public readonly string _deviceName;
+
/// <summary>
/// 涓婁竴娆′换鍔″彿
/// </summary>
@@ -70,9 +71,11 @@
private bool _heartStatr = true;
private bool _isConnected = true;
+
#endregion Private Member
#region Public Member
+
/// <summary>
/// 鍫嗗灈鏈洪�氳瀵硅薄
/// </summary>
@@ -176,6 +179,7 @@
#endregion
#region Constructor Function
+
/// <summary>
/// 鏋勯�犲嚱鏁�
/// </summary>
@@ -193,9 +197,11 @@
_deviceName = deviceName;
CheckConnect();
}
+
#endregion
#region Private Method
+
/// <summary>
/// 鏍规嵁鍗忚璇诲彇鍫嗗灈鏈虹姸鎬�
/// </summary>
@@ -306,7 +312,6 @@
return StackerCraneStatus.Unkonw.ToString();
}
}
- //todo 閫氳鏈繛鎺ユ椂鎶涘嚭寮傚父
return StackerCraneStatus.Unkonw.ToString();
}
@@ -333,9 +338,11 @@
}
});
}
+
#endregion
#region Public Method
+
/// <summary>
/// 鍙戦�佷换鍔″懡浠�
/// </summary>
@@ -391,21 +398,27 @@
case TypeCode.Boolean:
operateResult = Communicator.Wait(devicePro.DeviceProAddress, 500, 10 * 6000, Convert.ToBoolean(deviceProtocolDetail.ProtocalDetailValue));
break;
+
case TypeCode.Byte:
operateResult = Communicator.Wait(devicePro.DeviceProAddress, 500, 10 * 6000, Convert.ToByte(deviceProtocolDetail.ProtocalDetailValue));
break;
+
case TypeCode.Int16:
operateResult = Communicator.Wait(devicePro.DeviceProAddress, 500, 10 * 6000, Convert.ToInt16(deviceProtocolDetail.ProtocalDetailValue));
break;
+
case TypeCode.Int32:
operateResult = Communicator.Wait(devicePro.DeviceProAddress, 500, 10 * 6000, Convert.ToInt32(deviceProtocolDetail.ProtocalDetailValue));
break;
+
case TypeCode.UInt16:
operateResult = Communicator.Wait(devicePro.DeviceProAddress, 500, 10 * 6000, Convert.ToUInt16(deviceProtocolDetail.ProtocalDetailValue));
break;
+
case TypeCode.UInt32:
operateResult = Communicator.Wait(devicePro.DeviceProAddress, 500, 10 * 6000, Convert.ToUInt32(deviceProtocolDetail.ProtocalDetailValue));
break;
+
default:
break;
}
@@ -421,7 +434,6 @@
}
catch (Exception ex)
{
-
}
finally
{
@@ -450,7 +462,6 @@
/// </summary>
public void Heartbeat()
{
-
}
/// <summary>
@@ -483,6 +494,7 @@
// 鍛婅瘔鍨冨溇鍥炴敹鍣ㄤ笉鍐嶈皟鐢ㄦ瀵硅薄鐨勭粓缁撳櫒
GC.SuppressFinalize(this);
}
+
#endregion
}
-}
+}
\ No newline at end of file
--
Gitblit v1.9.3