Ver Fonte

Z991239-5729 #comment feat: 测试版本

陈纪林80310970 há 1 ano atrás
pai
commit
b64804ed75
1 ficheiros alterados com 10 adições e 10 exclusões
  1. 10 10
      Module/mod_IDCertificate/IDCertFSM.cpp

+ 10 - 10
Module/mod_IDCertificate/IDCertFSM.cpp

@@ -27,7 +27,7 @@ using namespace SP::Module::Comm;
 
 #define IDCER_INIT_COUNT 3
 
-#define IDCER_READ_TIMEOUT 60000
+#define IDCER_READ_TIMEOUT 10000
 #define IDCER_AUTH_INTERVAL 300
 
 #ifdef DEVOPS_ON_ST /*DevOps流水线编译,ST环境*/
@@ -1033,7 +1033,7 @@ int CIDCertFSM::ReadAndScanUTF8(SpReqAnsContext<IDCert_ReadAndScanUTF8_Req, IDCe
 
 				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Invoke IDCerGetDataEx2(Timeout) failed: %s", SpStrError(errReadEx2));
 
-				ctx->Answer(Error_TimeOut, MEC_DEVAPI_IDCER_IDCerGetDataEx2);
+				ctx->Answer(Error_Unexpect, MEC_DEVAPI_IDCER_IDCerGetDataEx2);
 			}
 		}
 		else if (!bOpenRF)
@@ -1042,7 +1042,7 @@ int CIDCertFSM::ReadAndScanUTF8(SpReqAnsContext<IDCert_ReadAndScanUTF8_Req, IDCe
 				true, m_ullEndTime - m_ullBeginTime, IDCertService_LogCode_ReadAndScanUTF8);
 			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Open IDCerRFControl(Timeout) failed: %s", SpStrError(errRfOpen));
 
-			ctx->Answer(Error_TimeOut, MEC_DEVAPI_IDCER_IDCerRFControl);
+			ctx->Answer(Error_Unexpect, MEC_DEVAPI_IDCER_IDCerRFControl);
 		}
 		else
 		{
@@ -1050,7 +1050,7 @@ int CIDCertFSM::ReadAndScanUTF8(SpReqAnsContext<IDCert_ReadAndScanUTF8_Req, IDCe
 				true, m_ullEndTime - m_ullBeginTime, IDCertService_LogCode_ReadAndScanUTF8); //RTA2107
 			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("ReadAndScanUTF8::IDCerAuthenticate(Timeout) failed with errcode: %d", errAuth);
 
-			ctx->Answer(Error_TimeOut, MEC_DEVAPI_IDCER_IDCerAuthenticate);
+			ctx->Answer(Error_Unexpect, MEC_DEVAPI_IDCER_IDCerAuthenticate);
 		}
 	}
 	else 
@@ -1601,7 +1601,7 @@ int CIDCertFSM::ReadAndScanUTF8JS(SpReqAnsContext<IDCert_ReadAndScanUTF8JS_Req,
 					true, m_ullEndTime - m_ullBeginTime, IDCertService_LogCode_ReadAndScanUTF8JS);
 				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Invoke IDCerGetDataEx2(Timeout) failed: %s", SpStrError(eErr));
 
-				ctx->Answer(Error_Unexpect, MEC_DEVAPI_IDCER_IDCerGetDataEx2); //RTA2109
+				ctx->Answer(Error_Unexpect, GetAlarmDEC()); //RTA2109
 			}
 		}
 		else if (!bOpenRF)
@@ -1610,7 +1610,7 @@ int CIDCertFSM::ReadAndScanUTF8JS(SpReqAnsContext<IDCert_ReadAndScanUTF8JS_Req,
 				true, m_ullEndTime - m_ullBeginTime, IDCertService_LogCode_ReadAndScanUTF8);
 			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Open IDCerRFControl(Timeout) failed: %s", SpStrError(errRfOpen));
 
-			ctx->Answer(Error_Unexpect, MEC_DEVAPI_IDCER_IDCerRFControl);
+			ctx->Answer(Error_Unexpect, GetAlarmDEC());
 		}
 		else
 		{
@@ -1619,14 +1619,14 @@ int CIDCertFSM::ReadAndScanUTF8JS(SpReqAnsContext<IDCert_ReadAndScanUTF8JS_Req,
 			if (errAuth == Error_DevMedia)
 			{
 				SetErrorAndLog(errAuth, MEC_DEVAPI_IDCER_IDCerAuthenticate_NotIDCard, "DevAdapter::IDCerAuthenticate", __FUNCTION__,
-					true, m_ullEndTime - m_ullBeginTime, IDCertService_LogCode_ReadAndScanUTF8JS); //RTA2108
-				ctx->Answer(Error_Unexpect, MEC_DEVAPI_IDCER_IDCerAuthenticate_NotIDCard);
+					false, m_ullEndTime - m_ullBeginTime, IDCertService_LogCode_ReadAndScanUTF8JS); //RTA2108
+				ctx->Answer(Error_Unexpect, GetAlarmDEC());
 			}
 			else
 			{
 				SetErrorAndLog(errAuth, MEC_DEVAPI_IDCER_IDCerAuthenticate, "DevAdapter::IDCerAuthenticate", __FUNCTION__,
-					true, m_ullEndTime - m_ullBeginTime, IDCertService_LogCode_ReadAndScanUTF8JS); //RTA2107
-				ctx->Answer(Error_Unexpect, MEC_DEVAPI_IDCER_IDCerAuthenticate);
+					false, m_ullEndTime - m_ullBeginTime, IDCertService_LogCode_ReadAndScanUTF8JS); //RTA2107
+				ctx->Answer(Error_Unexpect, GetAlarmDEC());
 			}
 		}
 	}