|
@@ -34,10 +34,8 @@ void CFingerPrintFSM::s0_on_entry()
|
|
|
{
|
|
|
LOG_FUNCTION();
|
|
|
m_devState = DEVICE_STATUS_NORMAL;
|
|
|
+ ToLogWarnInfoAboutTerm();
|
|
|
|
|
|
- if (!(m_csMachineType.Compare("RVC.PAD", true) == 0 && m_fwbSN.IsNullOrEmpty())) {
|
|
|
- ToLogWarnInfoAboutTerm();
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
void CFingerPrintFSM::s0_on_exit()
|
|
@@ -113,13 +111,6 @@ unsigned int CFingerPrintFSM::s0_on_event(FSMEvent* e)
|
|
|
GetEntityBase()->GetFunction()->PostThreadPoolTask(pMatchTask);
|
|
|
}
|
|
|
break;
|
|
|
- case USER_EVT_FWB_OPEN_SUC:
|
|
|
- {
|
|
|
- e->SetHandled();
|
|
|
- ProcFWBReConnTask* task = new ProcFWBReConnTask(this);
|
|
|
- GetEntityBase()->GetFunction()->PostThreadPoolTask(task);
|
|
|
- }
|
|
|
- break;
|
|
|
case USER_EVT_FWB_OPEN_SUC_FINISHED:
|
|
|
{
|
|
|
e->SetHandled();
|
|
@@ -245,13 +236,6 @@ unsigned int CFingerPrintFSM::s2_on_event(FSMEvent* e)
|
|
|
case USER_EVT_QUIT:
|
|
|
e->SetHandled();
|
|
|
break;
|
|
|
- case USER_EVT_FWB_OPEN_SUC:
|
|
|
- {
|
|
|
- e->SetHandled();
|
|
|
- ProcFWBReConnTask* task = new ProcFWBReConnTask(this);
|
|
|
- GetEntityBase()->GetFunction()->PostThreadPoolTask(task);
|
|
|
- }
|
|
|
- break;
|
|
|
case USER_EVT_FWB_OPEN_SUC_FINISHED:
|
|
|
{
|
|
|
e->SetHandled();
|
|
@@ -349,44 +333,13 @@ int CFingerPrintFSM::Initial()
|
|
|
}
|
|
|
|
|
|
spConfig->ReadConfigValue("Device.PinPad", "Version", m_version);
|
|
|
- GetEntityBase()->GetFunction()->GetSysVar("FWBDevSN", m_fwbSN);
|
|
|
- if (m_csMachineType.Compare("RVC.PAD", true) == 0 && m_fwbSN.IsNullOrEmpty())
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("RVC.PAD without FWB");
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER)("指纹仪设备打开成功");
|
|
|
- return 0;
|
|
|
- }
|
|
|
|
|
|
//TODO:device init
|
|
|
int initCount = 0;
|
|
|
ErrorCodeEnum err;
|
|
|
auto pEntity = GET_DEV_ENTITY_BASE_POINTER();
|
|
|
- //判断是否是蓝牙多合一
|
|
|
- CSimpleStringA tmpVendor(""), tmpDLLVersion("");
|
|
|
- bool isFWB = false;
|
|
|
- CSimpleStringA tmpDevSN = m_fwbSN;
|
|
|
- GetEntityBase()->GetFunction()->GetSysVar("FWBVendor", tmpVendor);
|
|
|
- GetEntityBase()->GetFunction()->GetSysVar("FWBVersion", tmpDLLVersion);
|
|
|
-
|
|
|
- if (tmpDLLVersion.GetLength() < 2)
|
|
|
- tmpDLLVersion = "8.1";
|
|
|
- if (tmpDevSN.GetLength() > 12 && tmpDevSN.IndexOf("FWB") > 2)
|
|
|
- {
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)(CSimpleStringA::Format("This is fwb device. DevSN:%s", tmpDevSN.GetData()));
|
|
|
- isFWB = true;
|
|
|
- m_csDevSN = 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;
|
|
|
- }
|
|
|
+
|
|
|
+
|
|
|
BOOL triedFlag = FALSE;
|
|
|
if (pEntity->vendorLibInfo.IsNotConfig()) {
|
|
|
DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Not config the vendor at root.ini");
|
|
@@ -409,18 +362,18 @@ int CFingerPrintFSM::Initial()
|
|
|
strVersion = "7";
|
|
|
//TODO: Support new or old edition machine.
|
|
|
}
|
|
|
- else if (!m_csMachineType.Compare("RVC.PAD", true)) {
|
|
|
- if (isFWB) {//蓝牙多合一
|
|
|
- GetEntityBase()->GetFunction()->GetSysVar("FWBVendor", strVendor);
|
|
|
- strVersion = "8";
|
|
|
- }
|
|
|
- else if ((!strVendor.Compare("Nantian", true) || !strVendor.Compare("grg", true) || !strVendor.Compare("Yihua", true))
|
|
|
- && !strVersion.Compare("4", true)) {
|
|
|
- strVersion = "4";
|
|
|
- }
|
|
|
- else
|
|
|
- strVersion = "1";
|
|
|
- }
|
|
|
+ //else if (!m_csMachineType.Compare("RVC.PAD", true)) {
|
|
|
+ // if (isFWB) {//蓝牙多合一
|
|
|
+ // GetEntityBase()->GetFunction()->GetSysVar("FWBVendor", strVendor);
|
|
|
+ // strVersion = "8";
|
|
|
+ // }
|
|
|
+ // else if ((!strVendor.Compare("Nantian", true) || !strVendor.Compare("grg", true) || !strVendor.Compare("Yihua", true))
|
|
|
+ // && !strVersion.Compare("4", true)) {
|
|
|
+ // strVersion = "4";
|
|
|
+ // }
|
|
|
+ // else
|
|
|
+ // strVersion = "1";
|
|
|
+ //}
|
|
|
else if (!m_csMachineType.Compare("RVC.Desk2S", true)) {
|
|
|
strVersion = "4";
|
|
|
if (m_machineVersion.Compare("1.0", true)) {//低柜一体机(贵宾理财2.0&非贵宾理财2.1)
|
|
@@ -1034,18 +987,6 @@ ErrorCodeEnum CFingerPrintFSM::DeleteFileIfExisted(const char* fileName)
|
|
|
}
|
|
|
|
|
|
|
|
|
-int CFingerPrintFSM::ProcFWBReConn()
|
|
|
-{
|
|
|
- if (m_hDevHelper != nullptr)
|
|
|
- {
|
|
|
- if (GetDevInitFlag()) {
|
|
|
- m_bOpened = false;
|
|
|
- }
|
|
|
- m_hDevHelper.TearDown();
|
|
|
- }
|
|
|
- return 0;
|
|
|
-}
|
|
|
-
|
|
|
#pragma endregion
|
|
|
|
|
|
|