|
@@ -132,7 +132,7 @@ namespace MesAdaptor
|
|
|
if (string.IsNullOrEmpty(msg))
|
|
|
return false;
|
|
|
|
|
|
- msg += "NG," + errorCode + ",";
|
|
|
+ msg += "NG," + GetMesCodeString(errorCode) + ",";
|
|
|
|
|
|
#if DEBUG
|
|
|
return true;
|
|
@@ -249,5 +249,45 @@ namespace MesAdaptor
|
|
|
msg += WorkOrder + ",";
|
|
|
return msg;
|
|
|
}
|
|
|
+
|
|
|
+ private string GetMesCodeString(MesErrorCode mesError)
|
|
|
+ {
|
|
|
+ switch (mesError)
|
|
|
+ {
|
|
|
+ case MesErrorCode.ChargerConnectFail:
|
|
|
+ return "EC001";
|
|
|
+ case MesErrorCode.ModelNameUpadateFail:
|
|
|
+ return "EC002";
|
|
|
+ case MesErrorCode.SerilaNumberUpadateFail:
|
|
|
+ return "EC003";
|
|
|
+ case MesErrorCode.UtcDatetimeUpdateFail:
|
|
|
+ return "EC004";
|
|
|
+ case MesErrorCode.FourthGenModelVersionMismatch:
|
|
|
+ return "EC005";
|
|
|
+ case MesErrorCode.FourthGenSimInstartionMismatch:
|
|
|
+ return "EC006";
|
|
|
+ case MesErrorCode.FourthGenSimInfoMismatch:
|
|
|
+ return "EC007";
|
|
|
+ case MesErrorCode.WifiModeNotClient:
|
|
|
+ return "EC008";
|
|
|
+ case MesErrorCode.WifiRssiLow:
|
|
|
+ return "EC009";
|
|
|
+ case MesErrorCode.FirmwareUploadFail:
|
|
|
+ return "EC0010";
|
|
|
+ case MesErrorCode.FirmwareUpdateTimeout:
|
|
|
+ return "EC0011";
|
|
|
+ case MesErrorCode.FirmwareVersionCheckFail:
|
|
|
+ return "EC0012";
|
|
|
+ case MesErrorCode.EmergencyButtonTestFail:
|
|
|
+ return "EC0013";
|
|
|
+ case MesErrorCode.GreenButtonTestFail:
|
|
|
+ return "EC0014";
|
|
|
+ case MesErrorCode.BlueButtonTestFail:
|
|
|
+ return "EC0015";
|
|
|
+ case MesErrorCode.FactoryResetFail:
|
|
|
+ return "EC0016";
|
|
|
+ }
|
|
|
+ return "EC001";
|
|
|
+ }
|
|
|
}
|
|
|
}
|