现场测试提交

master
lxw 6 months ago
parent 53e43d4f6f
commit cd2d247738

@ -7,10 +7,11 @@ public class InfoEnum
public enum SwapInfo : ushort
{
[Info("欢迎光临长治换电站!(正在营业)","欢迎光临长治换电站!,本站正在营业中")]WelcomeInfo=1,
[Info("Rfid读写失败", "Rfid读写失败")] ErrorReadRfid ,
[Info("Tbox连接失败", "Tbox连接失败请联系站务人员")] ErrorTBoxConn ,
[Info("欢迎光临换电站!(正在营业)","欢迎光临换电站!,本站正在营业中")]WelcomeInfo=1,
[Info("标签读写失败", "标签读写失败")] ErrorReadRfid ,
[Info("车辆连接失败", "车辆连接失败,请联系站务人员")] ErrorTBoxConn ,
[Info("云端校验失败", "云端校验失败,请联系站务人员")] ErrorCloudCheck ,
[Info("车辆已到位", "车辆已到位")] InfoCarInPosition ,
[Info("车辆到位超时", "车辆到位超时")] ErrorCarInPositionTimeout,
@ -19,11 +20,9 @@ public class InfoEnum
[Info("解锁车辆失败", "解锁车辆失败")] ErrUnLockCar ,
[Info("选包失败,请驶离", "选包失败,请驶离")] ErrorSelectPack ,
[Info("通道拍照定位失败,请重新调整车辆位置", "通道拍照定位失败,请重新调整车辆位置")]ErrChannelStatus,
[Info("通道拍照定位失败,请重新调整车辆位置", "通道拍照定位失败,请重新调整车辆位置")]
ErrChannelStatus ,
[Info("电池拆卸中,请稍后", "电池拆卸中,请稍后")] InfoUnPack ,
[Info("电池安装中,请稍后", "电池安装中,请稍后")] InfoPack ,
@ -32,13 +31,16 @@ public class InfoEnum
[Info("换电已完成,请驶离", "换电已完成,请驶离")] InfoCarLeave ,
[Info("换电失败,请驶离", "换电失败,请驶离")] ErrInfoCarLeave ,
[Info("旧电池搬运中,请稍后", "旧电池搬运中,请稍后")] InfoOldBatteryCarryIn ,
[Info("旧电池搬运中,请稍后", "旧电池搬运中,请稍后")] InfoNewBatteryCarryOut ,
[Info("新电池搬运中,请稍后", "新电池搬运中,请稍后")] InfoNewBatteryCarryOut ,
[Info("车辆上锁失败", "车辆上锁失败")] ErrLockCar ,
[Info("通道的电池仓无可用换电电池","通道的电池仓无可用换电电池")] NoBatteryErr,
[Info("结束充电电池数量不足","通道的电池仓无可用换电电池")] LessOfFinishChargingErr,
[Info("空仓数量不足","通道的电池仓无可用换电电池")] LessOfEmptyBinErr,
[Info("符合soc限制数量不足","通道的电池仓无可用换电电池")] LessOfSocErr,
[Info("结束充电大于3分钟的数量不足","通道的电池仓无可用换电电池")] LessOf3MinuteErr,
[Info("换电站处于手动模式,不能自动换电","换电站处于手动模式,不能自动换电")]InfoStationModel,
[Info("换电站处于本地模式,不能远程换电","换电站处于本地模式,不能远程换电")]InfoStationModelRemoteErr,
}
public enum SelectBinStatusInfo : byte

@ -360,6 +360,7 @@ public class CloudClient : IMqttClientConnectedHandler, IMqttApplicationMessageR
public VehicleCertificationResp? SendVehicleCertification(VehicleCertification vehicleCertification,
TimeSpan timeSpan)
{
Log.Info(vehicleCertification);
this.CarAuth.Req = vehicleCertification;
this.Publish(vehicleCertification);
return CarAuth.GetResp(timeSpan);

@ -13,7 +13,6 @@ public class CloudClientMgr
public static void Init()
{
SysConfigService sysConfigService = AppInfo.Container.Resolve<SysConfigService>();
CloudClient = AppInfo.Container.Resolve<CloudClient>();
CloudClient.ServerIp = StaticStationInfo.CloudServerIp;
@ -29,6 +28,6 @@ public class CloudClientMgr
CloudClient.InitHandler();
// BusinessTask.Run(() => CloudClient.Connect());
Task.Run(() => CloudClient.Connect());
}
}

@ -36,6 +36,10 @@ public class PlcApi
return PlcMgr.IsRemote();
}
public static bool IsAuto()
{
return PlcMgr.IsAuto();
}
/// <summary>
/// 入口雷达检测
/// </summary>

@ -98,7 +98,11 @@ public class StationReadyState : IState
}
}
},
() => { }, true);
() =>
{
SoundTool.PlayOneSound((int)InfoEnum.SwapInfo.InfoStationModelRemoteErr)
;
}, true);
}
public InvokeStatus EntranceRadar(SwappingStateMachine machine)
@ -181,9 +185,8 @@ public class StationReadyState : IState
//TODO::开始读rfid RfidService.BeginRead();
Task<RfidReadModel?> rfidReadModel = RfidApi.ReadRifd();
rfidReadModel.Wait();
if (/*rfidReadModel.IsCompletedSuccessfully &&*/ rfidReadModel.Result != null)
if ( /*rfidReadModel.IsCompletedSuccessfully &&*/ rfidReadModel.Result != null)
{
machine.RfidReadModel = rfidReadModel.Result;
_log.Info($"read rfid={JsonConvert.SerializeObject(machine.RfidReadModel)}");
@ -227,6 +230,4 @@ public class StationReadyState : IState
return swapOrder;
}
}

@ -61,9 +61,20 @@ public class PlcMgr
{
if ((DateTime.Now - DataValidityTime).Seconds <= DataTimeSeconds)
{
return (PlcToHostData.ModeControl.Value == 1010 && PlcToHostData.RemoteLocalControlState.Value == 1010)
? true
: false;
return PlcToHostData.RemoteLocalControlState.Value == 1010;
}
else
{
return false;
}
}
public static bool IsAuto()
{
if ((DateTime.Now - DataValidityTime).Seconds <= DataTimeSeconds)
{
return PlcToHostData.ModeControl.Value == 1010;
}
else
{

Loading…
Cancel
Save