private INX.Model.MoveCmdInfo GetLocalMoveCmdInfoFrom(MovingGuide movingGuide) { return(new INX.Model.MoveCmdInfo() { CommandID = movingGuide.CommandId, AddressIds = movingGuide.GuideAddressIds, SectionIds = movingGuide.GuideSectionIds }); }
public void SetMovingGuide(MovingGuide movingGuide) { var localData = LocalPackage.MainFlowHandler.localData; if (IsReadyForMoveCommand()) { Task.Run(() => { if (localData.MoveControlData.MoveCommand == null) { string errorMessage = ""; var moveCmdInfo = GetLocalMoveCmdInfoFrom(movingGuide); LocalPackage.MainFlowHandler.MoveControl.VehicleMove(moveCmdInfo, ref errorMessage); if (!string.IsNullOrEmpty(errorMessage)) { OnLogDebugEvent?.Invoke(this, new MessageHandlerArgs() { ClassMethodName = GetType().Name + ":" + System.Reflection.MethodBase.GetCurrentMethod().Name, Message = $"LocalPackage.MoveControl can not do move command.[Error={errorMessage}]" }); } } else { OnLogDebugEvent?.Invoke(this, new MessageHandlerArgs() { ClassMethodName = GetType().Name + ":" + System.Reflection.MethodBase.GetCurrentMethod().Name, Message = $"LocalPackage.MoveControl has another move command.[EndAddress={localData.MoveControlData.MoveCommand.EndAddress.Id}]" }); } }); } else { OnLogDebugEvent?.Invoke(this, new MessageHandlerArgs() { ClassMethodName = GetType().Name + ":" + System.Reflection.MethodBase.GetCurrentMethod().Name, Message = $"LocalPackage is not ready for move command.[ReadySignal={localData.MoveControlData.Ready}][ErrorSignal={localData.MoveControlData.ErrorBit}]" }); } }
public void SetMovingGuide(MovingGuide movingGuide) { MovingGuide = movingGuide; }