Commit 8c704242 LN

1

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