|
@@ -20,10 +20,7 @@ using namespace SP::Module::Comm;
|
|
|
#else
|
|
|
#include "RVCComm.h"
|
|
|
#include "publicFunExport.h"
|
|
|
-#include "json.h"
|
|
|
#include <Windows.h>
|
|
|
-#include <unordered_map>
|
|
|
-#pragma comment(lib,"user32.lib")
|
|
|
#endif // RVC_OS_LINUX
|
|
|
|
|
|
#define IDCER_INIT_COUNT 3
|
|
@@ -186,7 +183,6 @@ void CIDCertFSM::s0_on_entry()
|
|
|
|
|
|
if (m_FirstStart) {
|
|
|
m_FirstStart = FALSE;
|
|
|
- ToLogRootINIInfoOnce();
|
|
|
ToLogWarnInfoAboutTerm();
|
|
|
}
|
|
|
#else
|
|
@@ -578,6 +574,7 @@ ErrorCodeEnum CIDCertFSM::OnInit()
|
|
|
#endif
|
|
|
|
|
|
supportUCS2 = FALSE;
|
|
|
+ igestionVer = FALSE;
|
|
|
|
|
|
return Error_Succeed;
|
|
|
}
|
|
@@ -975,13 +972,16 @@ int CIDCertFSM::ReadAndScan(SpReqAnsContext<IDCert_ReadAndScan_Req, IDCert_ReadA
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- CSimpleStringA warnMsg = "ScanIDAndSaveImage() suc. But GetPngBlobEx() failed.";
|
|
|
- if (transImgMsg.GetLength() != 0)
|
|
|
+ if (igestionVer == TRUE)
|
|
|
{
|
|
|
- warnMsg = warnMsg + transImgMsg;
|
|
|
+ CSimpleStringA warnMsg = "ScanIDAndSaveImage() suc. But GetPngBlobEx() failed.";
|
|
|
+ if (transImgMsg.GetLength() != 0)
|
|
|
+ {
|
|
|
+ warnMsg = warnMsg + transImgMsg;
|
|
|
+ }
|
|
|
+ LogWarn(Severity_Middle, Error_Succeed,
|
|
|
+ IDCertificate_UserErrorCode_ReadAndScan_TransImgFaild, warnMsg.GetData());
|
|
|
}
|
|
|
- LogWarn(Severity_Middle, Error_Succeed,
|
|
|
- IDCertificate_UserErrorCode_ReadAndScan_TransImgFaild, warnMsg.GetData());
|
|
|
}
|
|
|
}
|
|
|
GetPngBlobEx(ctx->Ans.headphoto, "zp", true);
|
|
@@ -1020,7 +1020,7 @@ int CIDCertFSM::ReadAndScan(SpReqAnsContext<IDCert_ReadAndScan_Req, IDCert_ReadA
|
|
|
SetErrPackage("ReadAndScan::IDCerRFControl", m_devSN, errRF, MEC_DEVAPI_IDCER_IDCerRFControl);
|
|
|
AlarmDEC();
|
|
|
DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI("IDCerRFControl").
|
|
|
- setResultCode(std::to_string((_Longlong)errRF).c_str())
|
|
|
+ setResultCode(std::to_string((unsigned long)errRF).c_str())
|
|
|
("ReadAndScan::IDCerRFControl with errcode: %d", errRF);
|
|
|
}
|
|
|
|
|
@@ -1029,7 +1029,7 @@ int CIDCertFSM::ReadAndScan(SpReqAnsContext<IDCert_ReadAndScan_Req, IDCert_ReadA
|
|
|
SetErrPackage("ReadAndScan::IDCerAuthenticate", m_devSN, errAuth, MEC_DEVAPI_IDCER_IDCerAuthenticate);
|
|
|
AlarmDEC();
|
|
|
DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI("IDCerAuthenticate").
|
|
|
- setResultCode(std::to_string((_Longlong)errAuth).c_str())
|
|
|
+ setResultCode(std::to_string((unsigned long)errAuth).c_str())
|
|
|
("ReadAndScan::IDCerAuthenticate with errcode: %d", errAuth);
|
|
|
}
|
|
|
#endif
|
|
@@ -1524,13 +1524,16 @@ int CIDCertFSM::ReadAndScanUTF8(SpReqAnsContext<IDCert_ReadAndScanUTF8_Req, IDCe
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- CSimpleStringA warnMsg = "ScanIDAndSaveImage() suc. But GetPngBlobEx() failed.";
|
|
|
- if (transImgMsg.GetLength() != 0)
|
|
|
+ if (igestionVer == TRUE)
|
|
|
{
|
|
|
- warnMsg = warnMsg + transImgMsg;
|
|
|
+ CSimpleStringA warnMsg = "ScanIDAndSaveImage() suc. But GetPngBlobEx() failed.";
|
|
|
+ if (transImgMsg.GetLength() != 0)
|
|
|
+ {
|
|
|
+ warnMsg = warnMsg + transImgMsg;
|
|
|
+ }
|
|
|
+ LogWarn(Severity_Middle, Error_Succeed,
|
|
|
+ IDCertificate_UserErrorCode_ReadAndScan_TransImgFaild, warnMsg.GetData());
|
|
|
}
|
|
|
- LogWarn(Severity_Middle, Error_Succeed,
|
|
|
- IDCertificate_UserErrorCode_ReadAndScan_TransImgFaild, warnMsg.GetData());
|
|
|
}
|
|
|
}
|
|
|
GetPngBlobEx(ctx->Ans.headphoto, "zp", true);
|
|
@@ -1580,7 +1583,7 @@ int CIDCertFSM::ReadAndScanUTF8(SpReqAnsContext<IDCert_ReadAndScanUTF8_Req, IDCe
|
|
|
SetErrPackage("ReadAndScanUTF8::IDCerRFControl", m_devSN, errRF, MEC_DEVAPI_IDCER_IDCerRFControl);
|
|
|
AlarmDEC();
|
|
|
DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI("IDCerRFControl").
|
|
|
- setResultCode(std::to_string((_Longlong)errRF).c_str())
|
|
|
+ setResultCode(std::to_string((unsigned long)errRF).c_str())
|
|
|
("ReadAndScanUTF8::IDCerRFControl with errcode: %d", errRF);
|
|
|
}
|
|
|
|
|
@@ -1589,7 +1592,7 @@ int CIDCertFSM::ReadAndScanUTF8(SpReqAnsContext<IDCert_ReadAndScanUTF8_Req, IDCe
|
|
|
SetErrPackage("ReadAndScanUTF8::IDCerAuthenticate", m_devSN, errAuth, MEC_DEVAPI_IDCER_IDCerAuthenticate);
|
|
|
AlarmDEC();
|
|
|
DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI("IDCerAuthenticate").
|
|
|
- setResultCode(std::to_string((_Longlong)errAuth).c_str())
|
|
|
+ setResultCode(std::to_string((unsigned long)errAuth).c_str())
|
|
|
("ReadAndScanUTF8::IDCerAuthenticate with errcode: %d", errAuth);
|
|
|
}
|
|
|
#endif
|
|
@@ -1845,6 +1848,7 @@ ErrorCodeEnum CIDCertFSM::GetPngBlobEx(CBlob &data, CSimpleStringA fileNamePrefi
|
|
|
{
|
|
|
transImgMsg = errMsg;
|
|
|
}
|
|
|
+
|
|
|
if (bClear)
|
|
|
DeleteZP(Bmp_SCAN);
|
|
|
return Error_Unexpect;
|
|
@@ -2074,9 +2078,8 @@ int CIDCertFSM::Initial() //windows ver
|
|
|
|
|
|
}
|
|
|
FulfillAdapterInfoFrom(pEntity->vendorLibInfo);
|
|
|
- LogWarn(Severity_Low, Error_Unexpect, IDCertificate_UserErrorCode_RootInfo, m_adapterInfo.adapterFilePath.GetData());
|
|
|
HARDWARE_ENTITY_SET_VENDOR_NAME(m_entCode, m_adapterInfo.strVendor);
|
|
|
- ToLogRootINIInfo();
|
|
|
+
|
|
|
//CSimpleStringA adaptorInfo = GenerateJson(m_adapterInfo, m_pEntity->GetEntityName());
|
|
|
//LogWarn(Severity_Low, Error_Unexpect, IDCertificate_UserErrorCode_Real_Root_Config, adaptorInfo.GetData());
|
|
|
pEntity->InitializeVendorLogSwitch();
|
|
@@ -2103,12 +2106,12 @@ int CIDCertFSM::Initial() //windows ver
|
|
|
SetErrPackage("Initial::DevOpen", m_devSN, err, MEC_DEVAPI_IDCER_DevOpen);
|
|
|
AlarmDEC();
|
|
|
DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI("DevOpen").
|
|
|
- setBeginTime(m_ullBeginTime).setEndTime(m_ullEndTime).setResultCode(std::to_string((_Longlong)err).c_str())
|
|
|
+ setBeginTime(m_ullBeginTime).setEndTime(m_ullEndTime).setResultCode(std::to_string((unsigned long)err).c_str())
|
|
|
("Initial::DevOpen with errcode:%d", err);
|
|
|
m_hDevHelper.TearDown();
|
|
|
return 2;
|
|
|
}
|
|
|
-
|
|
|
+ ToLogRootINIInfo();
|
|
|
ZeroMemory(m_devCatInfo.szModel, MAX_DEV_MODEL_LEN);
|
|
|
ZeroMemory(m_devCatInfo.szType, MAX_DEV_TYPE_LEN);
|
|
|
ZeroMemory(m_devCatInfo.szVendor, MAX_DEV_VENDOR_LEN);
|
|
@@ -2125,9 +2128,16 @@ int CIDCertFSM::Initial() //windows ver
|
|
|
CSimpleStringA szMod(m_devCatInfo.szModel);
|
|
|
if (strstr(m_devCatInfo.szModel, "CODE=UCS2") != NULL)
|
|
|
{
|
|
|
- DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("测试为UCS2新库。");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("UCS2新库。");
|
|
|
supportUCS2 = TRUE;
|
|
|
}
|
|
|
+
|
|
|
+ if (strstr(m_devCatInfo.szModel, "STYLE=IG") != NULL)
|
|
|
+ {
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("吸入式设备");
|
|
|
+ igestionVer = TRUE;
|
|
|
+ }
|
|
|
+
|
|
|
m_adapterInfo.FulfillCategoryInfo(m_devCatInfo);
|
|
|
}else{
|
|
|
SetErrPackage("Initial::GetDevCategory", m_devSN, eErrDev, MEC_DEVAPI_IDCER_GetDevCategory);
|
|
@@ -2260,9 +2270,16 @@ int CIDCertFSM::Initial() //linux ver
|
|
|
CSimpleStringA szMod(m_devCatInfo.szModel);
|
|
|
if (strstr(m_devCatInfo.szModel, "CODE=UCS2") != NULL)
|
|
|
{
|
|
|
- DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("测试为UCS2新库。");
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("UCS2新库。");
|
|
|
supportUCS2 = TRUE;
|
|
|
}
|
|
|
+
|
|
|
+ if (strstr(m_devCatInfo.szModel, "STYLE=IG") != NULL)
|
|
|
+ {
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("吸入式设备");
|
|
|
+ igestionVer = TRUE;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
else {
|
|
|
SetErrPackage("Initial::GetDevCategory", m_devSN, err, MEC_DEVAPI_IDCER_GetDevCategory);
|