|
@@ -173,10 +173,7 @@ void CIDCertFSM::s0_on_entry()
|
|
|
ToLogWarnInfoAboutTerm();
|
|
|
}
|
|
|
#else
|
|
|
- //oilyang@20220413 except RVC.PAD without FWB
|
|
|
- CSimpleStringA tmpFWBDevSN("");
|
|
|
- GetEntityBase()->GetFunction()->GetSysVar("FWBDevSN", tmpFWBDevSN);
|
|
|
- if (!m_logBefore && !(m_csMachineType.Compare("RVC.PAD", true) == 0 && tmpFWBDevSN.IsNullOrEmpty())) {
|
|
|
+ if (!m_logBefore) {
|
|
|
ToLogWarnInfoAboutTermCustom();
|
|
|
m_logBefore = true;
|
|
|
}
|
|
@@ -221,8 +218,6 @@ unsigned int CIDCertFSM::s0_on_event(FSMEvent* pEvt)
|
|
|
case USER_EVT_TODO_INIT:
|
|
|
{
|
|
|
pEvt->SetHandled();
|
|
|
- ProcFWBReConnTask* task = new ProcFWBReConnTask(this);
|
|
|
- GetEntityBase()->GetFunction()->PostThreadPoolTask(task);
|
|
|
}
|
|
|
break;
|
|
|
case USER_EVT_TODO_INIT_FINISHED:
|
|
@@ -286,8 +281,6 @@ unsigned int CIDCertFSM::s1_on_event(FSMEvent *pEvt)
|
|
|
case USER_EVT_TODO_INIT:
|
|
|
{
|
|
|
pEvt->SetHandled();
|
|
|
- ProcFWBReConnTask* task = new ProcFWBReConnTask(this);
|
|
|
- GetEntityBase()->GetFunction()->PostThreadPoolTask(task);
|
|
|
}
|
|
|
break;
|
|
|
case USER_EVT_TODO_INIT_FINISHED:
|
|
@@ -396,8 +389,6 @@ unsigned int CIDCertFSM::s5_on_event(FSMEvent* pEvt)
|
|
|
case USER_EVT_TODO_INIT:
|
|
|
{
|
|
|
pEvt->SetHandled();
|
|
|
- ProcFWBReConnTask* task = new ProcFWBReConnTask(this);
|
|
|
- GetEntityBase()->GetFunction()->PostThreadPoolTask(task);
|
|
|
}
|
|
|
break;
|
|
|
case USER_EVT_TODO_INIT_FINISHED:
|
|
@@ -1990,12 +1981,6 @@ int CIDCertFSM::Initial() //windows ver
|
|
|
m_csMachineType = sysInfo.strMachineType;
|
|
|
m_terminalNo = sysInfo.strTerminalID;
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("machineType:%s,terminalNo:%s", (const char*)m_csMachineType, (const char*)m_terminalNo);
|
|
|
- //oilyang@20220413 except RVC.PAD without FWB
|
|
|
- CSimpleStringA tmpFWBDevSN("");
|
|
|
- GetEntityBase()->GetFunction()->GetSysVar("FWBDevSN", tmpFWBDevSN);
|
|
|
- if (m_csMachineType.Compare("RVC.PAD", true) == 0 && tmpFWBDevSN.IsNullOrEmpty()) {
|
|
|
- return 0;
|
|
|
- }
|
|
|
m_devState = DEVICE_STATUS_NOT_READY;
|
|
|
auto pEntity = GET_DEV_ENTITY_BASE_POINTER();
|
|
|
|
|
@@ -2013,36 +1998,13 @@ int CIDCertFSM::Initial() //windows ver
|
|
|
return 2;
|
|
|
}
|
|
|
|
|
|
- GetEntityBase()->GetFunction()->GetSysVar("FWBDevSN", tmpDevSN);
|
|
|
- GetEntityBase()->GetFunction()->GetSysVar("FWBVendor", tmpVendor);
|
|
|
- GetEntityBase()->GetFunction()->GetSysVar("FWBVersion", tmpDLLVersion);
|
|
|
- if (tmpDLLVersion.GetLength() < 2)//如果忘记配置,则直接使用默认值8.1
|
|
|
- tmpDLLVersion = "8.1";
|
|
|
- if (tmpDevSN.GetLength() > 12 && tmpDevSN.IndexOf("FWB") > 2)
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("This is fwb device.");
|
|
|
- m_devSN = tmpDevSN;
|
|
|
- VendorLibInfo tmpVendorLibInfo(GetEntityBase()->GetEntityName());
|
|
|
- tmpVendorLibInfo.strVendor = tmpVendor;
|
|
|
- CAutoArray<CSimpleStringA> dllVersions = tmpDLLVersion.Split('.');
|
|
|
- if (dllVersions.GetCount() >= 2) {
|
|
|
- tmpVendorLibInfo.strVersion = dllVersions[0];
|
|
|
- tmpVendorLibInfo.strBatch = dllVersions[1];
|
|
|
- } else {
|
|
|
- tmpVendorLibInfo.strVersion = tmpDLLVersion;
|
|
|
- }
|
|
|
- pEntity->vendorLibInfo = tmpVendorLibInfo;
|
|
|
+ m_devSN = "";
|
|
|
+ eErrDev = pEntity->LoadVendorLibName();
|
|
|
+ if (eErrDev != Error_Succeed) {
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("get vendor dll(%s)name failed.", pEntity->GetVendorLibName().GetData());
|
|
|
+ return 2;
|
|
|
}
|
|
|
- else
|
|
|
- {
|
|
|
- m_devSN = "";
|
|
|
- eErrDev = pEntity->LoadVendorLibName();
|
|
|
- if (eErrDev != Error_Succeed) {
|
|
|
- DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("get vendor dll(%s)name failed.", pEntity->GetVendorLibName().GetData());
|
|
|
- return 2;
|
|
|
- }
|
|
|
|
|
|
- }
|
|
|
FulfillAdapterInfoFrom(pEntity->vendorLibInfo);
|
|
|
HARDWARE_ENTITY_SET_VENDOR_NAME(m_entCode, m_adapterInfo.strVendor);
|
|
|
|
|
@@ -2178,30 +2140,13 @@ int CIDCertFSM::Initial() //linux ver
|
|
|
|
|
|
CSimpleStringA dllName, tmpVendor(""), tmpDevSN(""), tmpDLLVersion, csDepPath("");
|
|
|
|
|
|
- GetEntityBase()->GetFunction()->GetSysVar("FWBVendor", tmpVendor);
|
|
|
- GetEntityBase()->GetFunction()->GetSysVar("FWBDevSN", tmpDevSN);
|
|
|
- GetEntityBase()->GetFunction()->GetSysVar("FWBVersion", tmpDLLVersion);
|
|
|
- if (tmpDLLVersion.GetLength() < 2)//如果忘记配置,则直接使用默认值8.1
|
|
|
- tmpDLLVersion = "8.1";
|
|
|
- if (tmpDevSN.GetLength() > 12 && tmpDevSN.IndexOf("FWB") > 2)
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("This is fwb device.");
|
|
|
- m_devSN = tmpDevSN;
|
|
|
- GetEntityBase()->GetFunction()->GetPath("Dep", csDepPath);
|
|
|
- dllName = csDepPath + SPLIT_SLASH_STR + "IDCertificate." + tmpVendor + "." + tmpDLLVersion + ".dll";//oiltmp
|
|
|
- DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("%s", (const char*)dllName);
|
|
|
- HARDWARE_ENTITY_SET_VENDOR_NAME(m_entCode, tmpVendor);
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- dllName = pEntity->GetVendorLibName();
|
|
|
- CSmartPointer<IConfigInfo> pConfig;
|
|
|
- ErrorCodeEnum rc = GetEntityBase()->GetFunction()->OpenConfig(Config_Root, pConfig);
|
|
|
- CSimpleStringA strSection = CSimpleStringA("Device.") + GetEntityBase()->GetEntityName();
|
|
|
- CSimpleStringA str;
|
|
|
- pConfig->ReadConfigValue(strSection, "Vendor", str);
|
|
|
- HARDWARE_ENTITY_SET_VENDOR_NAME(m_entCode, str);
|
|
|
- }
|
|
|
+ dllName = pEntity->GetVendorLibName();
|
|
|
+ CSmartPointer<IConfigInfo> pConfig;
|
|
|
+ ErrorCodeEnum rc = GetEntityBase()->GetFunction()->OpenConfig(Config_Root, pConfig);
|
|
|
+ CSimpleStringA strSection = CSimpleStringA("Device.") + GetEntityBase()->GetEntityName();
|
|
|
+ CSimpleStringA str;
|
|
|
+ pConfig->ReadConfigValue(strSection, "Vendor", str);
|
|
|
+ HARDWARE_ENTITY_SET_VENDOR_NAME(m_entCode, str);
|
|
|
|
|
|
bool bOpenFlag = false;
|
|
|
do {
|
|
@@ -2345,13 +2290,6 @@ void CIDCertFSM::ToLogWarnInfoAboutTermCustom()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-int CIDCertFSM::ProcFWBReConn()
|
|
|
-{
|
|
|
- if (m_hDevHelper != nullptr) {
|
|
|
- m_hDevHelper.TearDown();
|
|
|
- }
|
|
|
- return 0;
|
|
|
-}
|
|
|
#endif
|
|
|
|
|
|
BOOL CIDCertFSM::UCS2_to_UTF8(UINT16* ucs2_code, UINT8* utf8_code)
|