| | |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Collections.ObjectModel; |
| | | using System.Collections.Specialized; |
| | | using System.ComponentModel; |
| | | using System.Drawing.Design; |
| | | using System.Linq; |
| | | using System.Text; |
| | | using System.Threading; |
| | | using System.Threading.Tasks; |
| | | |
| | |
| | | { |
| | | if (bind.UnitState == AGVState.Warning) |
| | | { |
| | | bind.WarningMsg = ""; |
| | | bind.UnitState = AGVState.Idle; |
| | | //bind.WarningMsg.Clear(); |
| | | //bind.UnitState = AGVState.Idle; |
| | | bind.Reset(); |
| | | } |
| | | }); |
| | | |
| | |
| | | |
| | | if (bind != null && bind.UnitState == AGVState.Warning) |
| | | { |
| | | bind.WarningMsg = ""; |
| | | bind.UnitState = AGVState.Idle; |
| | | //bind.WarningMsg.Clear(); |
| | | //bind.UnitState = AGVState.Idle; |
| | | |
| | | bind.Reset(); |
| | | |
| | | LogAsync(DateTime.Now, "Reset", $"执行{bind.AGV.Name}复位操作"); |
| | | } |
| | |
| | | } |
| | | else |
| | | { |
| | | bind = Config.AGVBindCollection.FirstOrDefault(u => u.Id == unitId); |
| | | bind = Config.AGVBindCollection.FirstOrDefault(u => u.Id == unitId && (u.UnitState == AGVState.Idle || u.UnitState == AGVState.IdleCharge)); |
| | | } |
| | | |
| | | if (bind == null) |
| | |
| | | bind.CurrentTaskId = ""; |
| | | if (isWarningRaised) |
| | | { |
| | | bind.WarningMsg = warningMsg; |
| | | bind.WarningMsg.Add(warningMsg); |
| | | bind.UnitState = AGVState.Warning; |
| | | } |
| | | else |
| | |
| | | |
| | | if (!isNotTimeout) |
| | | { |
| | | bind.WarningMsg = $"{bind.AGV.Name}获取电池状态超时"; |
| | | new ProcessException(bind.WarningMsg); |
| | | string msg = $"{bind.AGV.Name}获取电池状态超时"; |
| | | bind.WarningMsg.Add(msg); |
| | | new ProcessException(msg); |
| | | bind.UnitState = AGVState.Warning; |
| | | } |
| | | else |
| | |
| | | |
| | | if (chargePosition == null) |
| | | { |
| | | bind.WarningMsg = $"{bind.AGV.Name}目前无可用充电地址"; |
| | | new ProcessException(bind.WarningMsg); |
| | | string msg = $"{bind.AGV.Name}目前无可用充电地址"; |
| | | bind.WarningMsg.Add(msg); |
| | | new ProcessException(msg); |
| | | bind.UnitState = AGVState.Warning; |
| | | } |
| | | else |