Commit 8c704242 LN

1

1 个父辈 1e5c7724
此文件类型无法预览
...@@ -261,6 +261,16 @@ ...@@ -261,6 +261,16 @@
是否连接服务器 是否连接服务器
</summary> </summary>
</member> </member>
<member name="P:Asa.Client2.CancelState">
<summary>
取消状态,true发送none,false发送实际状态
</summary>
</member>
<member name="P:Asa.Client2.SendLog">
<summary>
仅发送命令的代码日志
</summary>
</member>
<member name="M:Asa.Client2.Connect"> <member name="M:Asa.Client2.Connect">
<summary> <summary>
连接 连接
......
...@@ -124,7 +124,7 @@ namespace OnlineStore.Common ...@@ -124,7 +124,7 @@ namespace OnlineStore.Common
logBox.AppendText(now.ToLongTimeString() + " " + msg + Environment.NewLine); //增加文本 logBox.AppendText(now.ToLongTimeString() + " " + msg + Environment.NewLine); //增加文本
TimeSpan span = DateTime.Now - lastTime; TimeSpan span = DateTime.Now - lastTime;
if (span.TotalSeconds > 10) if (span.TotalSeconds > 3000000)
{ {
lastTime = DateTime.Now; lastTime = DateTime.Now;
logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾 logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾
...@@ -140,14 +140,26 @@ namespace OnlineStore.Common ...@@ -140,14 +140,26 @@ namespace OnlineStore.Common
private static DateTime lastTime = DateTime.Now; private static DateTime lastTime = DateTime.Now;
public static void UpdateLogbox() public static void UpdateLogbox()
{ {
try
{
if (logBox != null && logBox.Visible) if (logBox != null && logBox.Visible)
{ {
logBox.Text = LastText; logBox.Text = LastText;
TimeSpan span = DateTime.Now - lastTime;
if (span.TotalSeconds > 3000000)
{
lastTime = DateTime.Now;
logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾 logBox.Select(logBox.Text.Length, 0); //设置光标的位置到文本尾
logBox.ScrollToCaret(); //滚动到控件光标处 logBox.ScrollToCaret(); //滚动到控件光标处
} }
} }
}
catch (Exception ex)
{
LOGGER.Error("出错:" + ex.ToString());
}
}
public static void ClearLog() public static void ClearLog()
{ {
if (logBox != null) if (logBox != null)
......
...@@ -199,11 +199,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -199,11 +199,11 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_02_LocatinDown)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_02_LocatinDown))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BS_03_WaitArrive); MoveInfo.NextMoveStep(StoreMoveStep.BS_03_WaitArrive);
MoveInfo.TimeOutSeconds = 180; MoveInfo.TimeOutSeconds = 600;
MoveInfo.OneWaitCanEndStep = true; // MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(180000)); // MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(600000));
InOutStoreLog(moveName + MoveInfo.SLog + ":再次调用 NeedLeave["+CurrShelfID+ "],等待Agv " + Config.AgvNodeName + " Arrive ,最多等待180000"); InOutStoreLog(moveName + MoveInfo.SLog + ":再次调用 NeedLeave[" + CurrShelfID + "],等待Agv " + Config.AgvNodeName + " Arrive ,最多等待1200秒");
AgvClient.SetStatus(Config.AgvNodeName, "", CurrShelfID, ClientAction.NeedLeave, ClientLevel.Low,true); AgvClient.SetStatus(Config.AgvNodeName, "", CurrShelfID, ClientAction.NeedLeave, ClientLevel.Low, true);
//等待agv到达 //等待agv到达
MoveInfo.WaitList.Add(WaitResultInfo.WaitAgvAction((int)ClientAction.Arrive)); MoveInfo.WaitList.Add(WaitResultInfo.WaitAgvAction((int)ClientAction.Arrive));
} }
...@@ -230,7 +230,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -230,7 +230,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BS_05_WaitReady); MoveInfo.NextMoveStep(StoreMoveStep.BS_05_WaitReady);
MoveInfo.TimeOutSeconds = 120; MoveInfo.TimeOutSeconds = 120;
InOutStoreLog(moveName + MoveInfo.SLog + ":移门已打开,调用MayLeave[" + CurrShelfID + "],等待agv " + Config.AgvNodeName+" Ready"); InOutStoreLog(moveName + MoveInfo.SLog + ":移门已打开,调用MayLeave[" + CurrShelfID + "],等待agv " + Config.AgvNodeName + " Ready");
AgvClient.SetStatus(Config.AgvNodeName, "", CurrShelfID, ClientAction.MayLeave, ClientLevel.High, true); AgvClient.SetStatus(Config.AgvNodeName, "", CurrShelfID, ClientAction.MayLeave, ClientLevel.High, true);
//等待agv到达 //等待agv到达
......
using Asa; using Asa;
using log4net;
using OnlineStore.Common; using OnlineStore.Common;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Reflection;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
...@@ -10,6 +12,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -10,6 +12,7 @@ namespace OnlineStore.DeviceLibrary
{ {
public class AgvClient public class AgvClient
{ {
public static readonly ILog LOGGER = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static string ServerIp = ConfigAppSettings.GetValue(Setting_Init.AgvServerIp); private static string ServerIp = ConfigAppSettings.GetValue(Setting_Init.AgvServerIp);
private static Asa.Client2 agvClient; private static Asa.Client2 agvClient;
public static Dictionary<string, Asa.ClientAction> actionMap = new Dictionary<string, Asa.ClientAction>(); public static Dictionary<string, Asa.ClientAction> actionMap = new Dictionary<string, Asa.ClientAction>();
...@@ -138,7 +141,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -138,7 +141,7 @@ namespace OnlineStore.DeviceLibrary
bool isLog = ConfigAppSettings.GetIntValue(Setting_Init.Agv_Log_Open).Equals(1); bool isLog = ConfigAppSettings.GetIntValue(Setting_Init.Agv_Log_Open).Equals(1);
if (isLog) if (isLog)
{ {
LogUtil.info(" AGV " + ServerIp + " Log : " + s); LOGGER.Info(" AGV " + ServerIp + " Log : " + s);
} }
} }
catch (Exception ex) catch (Exception ex)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!