|
|
@ -206,7 +206,7 @@ public class StationReadyState : IState
|
|
|
|
|
|
|
|
|
|
|
|
StationSoftMgr.PutDeviceLog((int)StationConstant.DeviceCode.Radar,SwapConstant.RadarProtocol.CarStatus,
|
|
|
|
StationSoftMgr.PutDeviceLog((int)StationConstant.DeviceCode.Radar,SwapConstant.RadarProtocol.CarStatus,
|
|
|
|
|
|
|
|
|
|
|
|
null,(int)SwapConstant.CommunicationType.Receive);
|
|
|
|
PadarMgr._PadarClient?.CarState.ToString(),(int)SwapConstant.CommunicationType.Receive);
|
|
|
|
|
|
|
|
|
|
|
|
if (PadarMgr._PadarClient?.CarState == 6)
|
|
|
|
if (PadarMgr._PadarClient?.CarState == 6)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -257,10 +257,9 @@ public class StationReadyState : IState
|
|
|
|
return Invoker.Invoke(" BeginRead read rfid", 1000, 20, machine.IsCanceled,
|
|
|
|
return Invoker.Invoke(" BeginRead read rfid", 1000, 20, machine.IsCanceled,
|
|
|
|
() => machine.BeginRfidReadFlag, () =>
|
|
|
|
() => machine.BeginRfidReadFlag, () =>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Task<bool> open = RfidApi.Connect();
|
|
|
|
// Task<bool> open = RfidApi.Connect();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (open.Result)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
machine.RfidConnectFlag = true;
|
|
|
|
machine.RfidConnectFlag = true;
|
|
|
|
Task<bool> beginRead = RfidApi.BeginRead();
|
|
|
|
Task<bool> beginRead = RfidApi.BeginRead();
|
|
|
|
beginRead.Wait();
|
|
|
|
beginRead.Wait();
|
|
|
@ -274,7 +273,7 @@ public class StationReadyState : IState
|
|
|
|
_log.Info("begin read done");
|
|
|
|
_log.Info("begin read done");
|
|
|
|
machine.BeginRfidReadFlag = true;
|
|
|
|
machine.BeginRfidReadFlag = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, () =>
|
|
|
|
}, () =>
|
|
|
@ -343,9 +342,9 @@ public class StationReadyState : IState
|
|
|
|
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.RfidReadFlag,
|
|
|
|
_CommonMgr.InsertStep(InfoEnum.BusinessSwappingStep.RfidReadFlag,
|
|
|
|
machine,param:JsonConvert.SerializeObject(machine.RfidReadModel));
|
|
|
|
machine,param:JsonConvert.SerializeObject(machine.RfidReadModel));
|
|
|
|
|
|
|
|
|
|
|
|
RfidApi.StopRead();
|
|
|
|
//RfidApi.StopRead();
|
|
|
|
_log.Info("stop read rfid");
|
|
|
|
// _log.Info("stop read rfid");
|
|
|
|
RfidApi.DisConnect();
|
|
|
|
// RfidApi.DisConnect();
|
|
|
|
machine.RfidConnectFlag = false;
|
|
|
|
machine.RfidConnectFlag = false;
|
|
|
|
machine.RfidReadFlag = true;
|
|
|
|
machine.RfidReadFlag = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|