|
|
@@ -146,16 +146,14 @@ void CGpioEntity::ToLogRootINIInfo()
|
|
|
spConfigRoot->ReadConfigValue(sectionName.GetData(), "Baudrate", csBaudrate);
|
|
|
|
|
|
std::map<std::string, std::string> rootInfo;
|
|
|
- CSimpleStringA csPortNum(true), csCheckData(true), csKeySN(true), csInOutDir(true);
|
|
|
+ CSimpleStringA csPortNum(true), csCheckData(true), csKeySN(true);
|
|
|
rootInfo["Vendor"] = csVendor;
|
|
|
rootInfo["Version"] = csVersion;
|
|
|
rootInfo["Batch"] = csBatch;
|
|
|
rootInfo["Port"] = csPort;
|
|
|
rootInfo["Baudrate"] = csBaudrate;
|
|
|
spConfigRoot->ReadConfigValue(sectionName.GetData(), "PortNum", csPortNum);
|
|
|
- spConfigRoot->ReadConfigValue(sectionName.GetData(), "InOutDir", csInOutDir);
|
|
|
rootInfo["PortNum"] = csPortNum;
|
|
|
- rootInfo["InOutDir"] = csInOutDir;
|
|
|
|
|
|
std::pair<bool, std::string> strResult;
|
|
|
strResult = generateJsonStr(rootInfo);
|
|
|
@@ -169,6 +167,54 @@ void CGpioEntity::ToLogRootINIInfo()
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+struct GpioInitTask : public ITaskSp {
|
|
|
+ CGpioEntity* m_entity;
|
|
|
+ CSmartPointer<ITransactionContext> m_pTransactionContext;
|
|
|
+ GpioInitTask(CGpioEntity* entity, CSmartPointer<ITransactionContext> pTransactionContext) :m_entity(entity), m_pTransactionContext(pTransactionContext) {}
|
|
|
+
|
|
|
+ void Process()
|
|
|
+ {
|
|
|
+ m_entity->InitializeVendorLogSwitch();
|
|
|
+ ErrorCodeEnum err = m_entity->Initial();
|
|
|
+ if (err == Error_Succeed)
|
|
|
+ {
|
|
|
+ LOG_TRACE("Gpio open succeeded.");
|
|
|
+
|
|
|
+ //oiltest 20130118 for audiodg handle
|
|
|
+ m_entity->GetStatus(PHONEPICKUP, NULL);
|
|
|
+
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("subscribelog...");
|
|
|
+ m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidHealth, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "HealthManager");
|
|
|
+ m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidIDC, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "IDCertificate");
|
|
|
+ m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidFP, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "FingerPrint");
|
|
|
+ m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidKB, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "PinPad");
|
|
|
+ m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidCR, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "CardIssuer");
|
|
|
+ m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidCA, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "CustomerAware");
|
|
|
+ m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidCC, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "ContactlessCard");
|
|
|
+ m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidDD, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "DeviceControl");
|
|
|
+ m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidCS, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "CardSwiper");
|
|
|
+ m_entity->GetFunction()->SubscribeLog(m_entity->m_uuidHSPscanner, m_entity, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "HSPScanner");
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("sub ok...");
|
|
|
+
|
|
|
+ m_pTransactionContext->SendAnswer(Error_Succeed);
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("send Error_Succeed ok...");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("gpio open failed(%d).", err);
|
|
|
+ m_pTransactionContext->SendAnswer(Error_Unexpect);
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+
|
|
|
+void CGpioEntity::OnPreStart(CAutoArray<CSimpleStringA> strArgs, CSmartPointer<ITransactionContext> pTransactionContext)
|
|
|
+{
|
|
|
+ LOG_FUNCTION();
|
|
|
+ GpioInitTask* initTask = new GpioInitTask(this, pTransactionContext);
|
|
|
+ GetFunction()->PostThreadPoolTask(initTask);
|
|
|
+}
|
|
|
+
|
|
|
void CGpioEntity::ToLogWarnInfoAboutTerm(const AdapterInfo& m_adapterInfo)
|
|
|
{
|
|
|
LOG_FUNCTION();
|
|
|
@@ -185,10 +231,20 @@ void CGpioEntity::ToLogWarnInfoAboutTerm(const AdapterInfo& m_adapterInfo)
|
|
|
SP::Module::Util::HexBuf2StrBuf(fileHash, &strFileHash, 32);
|
|
|
|
|
|
//calculate file size
|
|
|
- struct stat statbuf;
|
|
|
- ZeroMemory(&statbuf, sizeof(statbuf));
|
|
|
- stat(m_adapterInfo.adapterFileName.GetData(), &statbuf);
|
|
|
- int fileSize = statbuf.st_size;
|
|
|
+#if defined(RVC_OS_LINUX)
|
|
|
+ struct stat statbuf;
|
|
|
+ ZeroMemory(&statbuf, sizeof(statbuf));
|
|
|
+ stat(m_adapterInfo.adapterFilePath.GetData(), &statbuf);
|
|
|
+ int fileSize = statbuf.st_size;
|
|
|
+#else
|
|
|
+ int fileSize = 0;
|
|
|
+ HANDLE hFile;
|
|
|
+ hFile = CreateFile(m_adapterInfo.adapterFilePath.GetData(), 0, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
|
|
|
+ if (hFile != INVALID_HANDLE_VALUE) {
|
|
|
+ fileSize = GetFileSize(hFile, NULL);
|
|
|
+ CloseHandle(hFile);
|
|
|
+ }
|
|
|
+#endif //RVC_OS_LINUX
|
|
|
|
|
|
termInfo["VendorDllName"] = m_adapterInfo.adapterFileName;
|
|
|
termInfo["VendorDllFileHash"] = strFileHash;
|
|
|
@@ -199,8 +255,6 @@ void CGpioEntity::ToLogWarnInfoAboutTerm(const AdapterInfo& m_adapterInfo)
|
|
|
termInfo["Port"] = m_port;
|
|
|
termInfo["PortNum"] = m_portNum;
|
|
|
termInfo["Baudrate"] = m_Baudrate;
|
|
|
- termInfo["InOutDir"] = m_InOutDir;
|
|
|
-
|
|
|
if (strFileHash != nullptr) {
|
|
|
delete[] strFileHash;
|
|
|
strFileHash = nullptr;
|
|
|
@@ -274,21 +328,16 @@ ErrorCodeEnum CGpioEntity::Initial()
|
|
|
DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("load up %s failed: %s", dllName.GetData(), SpStrError(eErrDev));
|
|
|
return Error_DevLoadFileFailed;
|
|
|
}
|
|
|
- m_adapterInfo.adapterFileName = dllName;
|
|
|
+ m_adapterInfo.adapterFilePath = dllName;
|
|
|
int initTries = 0;
|
|
|
do {
|
|
|
DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("to open device.");
|
|
|
- int portNum, inOutDir, port, baudRate;
|
|
|
+ int portNum, port, baudRate;
|
|
|
err = spConfig->ReadConfigValueInt("Device.Gpio", "PortNum", portNum);
|
|
|
if (err == Error_Succeed)
|
|
|
m_dwPortNum = portNum;
|
|
|
else
|
|
|
return Error_IO;
|
|
|
- err = spConfig->ReadConfigValueInt("Device.Gpio", "InOutDir", inOutDir);
|
|
|
- if (err == Error_Succeed)
|
|
|
- m_dwInOutDir = inOutDir;
|
|
|
- else
|
|
|
- return Error_IO;
|
|
|
spConfig->ReadConfigValueInt("Device.Gpio", "Port", port);
|
|
|
spConfig->ReadConfigValueInt("Device.Gpio", "BaudRate", baudRate);
|
|
|
|
|
|
@@ -296,7 +345,6 @@ ErrorCodeEnum CGpioEntity::Initial()
|
|
|
m_port = CSimpleStringA::Format("%d", port);
|
|
|
m_Baudrate = CSimpleStringA::Format("%d", baudRate);
|
|
|
m_portNum = CSimpleStringA::Format("%d", portNum);
|
|
|
- m_InOutDir = CSimpleStringA::Format("%d", inOutDir);
|
|
|
GpioInitParam initParam;
|
|
|
if (!m_bNewVersion) {
|
|
|
initParam.dwPortNum = 3;
|
|
|
@@ -911,7 +959,7 @@ void CGpioEntity::OnPositiveLevelTimerOut(void* pData)
|
|
|
if (initCtt == 1) {
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("test initCtt == 1");
|
|
|
if (DetectBit(btInput, VIBRATIONSENSOR)) {
|
|
|
- if (!m_bVibrationFlag && (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)) {
|
|
|
+ if (!m_bVibrationFlag && IfHaveMoveDetect()) {
|
|
|
LogEvent(Severity_Middle, LOG_EVT_VIBRATIONSENSOR, CSimpleStringA::Format("%s [Active] line: %d", GetDriverPortString(17), __LINE__));
|
|
|
}
|
|
|
m_bVibrationFlag = true;
|
|
|
@@ -923,7 +971,7 @@ void CGpioEntity::OnPositiveLevelTimerOut(void* pData)
|
|
|
|
|
|
if (m_bVibrationRound) {
|
|
|
if (DetectBit(btInput, VIBRATIONSENSOR) && !m_bVibrationFlag) {
|
|
|
- if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)
|
|
|
+ if (IfHaveMoveDetect())
|
|
|
LogEvent(Severity_Middle, LOG_EVT_VIBRATIONSENSOR, CSimpleStringA::Format("%s [Active] line: %d", GetDriverPortString(17), __LINE__));
|
|
|
m_bVibrationFlag = true;
|
|
|
m_bVibrationRound = false;
|
|
|
@@ -948,12 +996,12 @@ void CGpioEntity::OnPositiveLevelTimerOut(void* pData)
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("test initCtt == 1");
|
|
|
if (DetectBit(btInput, OPENSENSOR)) {
|
|
|
if (!m_bOpenFlag) {
|
|
|
- if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)
|
|
|
+ if (IfHaveMoveDetect())
|
|
|
LogEvent(Severity_Middle, LOG_EVT_OPENSENSOR_ON, CSimpleStringA::Format("%s [Active] line: %d", GetDriverPortString(18), __LINE__));
|
|
|
m_bOpenFlag = true;
|
|
|
}
|
|
|
} else if (m_bOpenFlag) {
|
|
|
- if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)
|
|
|
+ if (IfHaveMoveDetect())
|
|
|
LogEvent(Severity_Middle, LOG_EVT_OPENSENSOR_OFF, CSimpleStringA::Format("%s [InActive] line: %d", GetDriverPortString(18), __LINE__));
|
|
|
m_bOpenFlag = false;
|
|
|
}
|
|
|
@@ -962,13 +1010,13 @@ void CGpioEntity::OnPositiveLevelTimerOut(void* pData)
|
|
|
|
|
|
if (m_bOpenRound) {
|
|
|
if (DetectBit(btInput, OPENSENSOR) && !m_bOpenFlag) {
|
|
|
- if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)
|
|
|
+ if (IfHaveMoveDetect())
|
|
|
LogEvent(Severity_Middle, LOG_EVT_OPENSENSOR_ON, CSimpleStringA::Format("%s [Active] line: %d", GetDriverPortString(18), __LINE__));
|
|
|
m_bOpenFlag = true;
|
|
|
m_bOpenRound = false;
|
|
|
}
|
|
|
} else if (!DetectBit(btInput, OPENSENSOR) && m_bOpenFlag) {
|
|
|
- if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)
|
|
|
+ if (IfHaveMoveDetect())
|
|
|
LogEvent(Severity_Middle, LOG_EVT_OPENSENSOR_OFF, CSimpleStringA::Format("%s [InActive] line: %d", GetDriverPortString(18), __LINE__));
|
|
|
m_bOpenFlag = false;
|
|
|
m_bOpenRound = true;
|
|
|
@@ -986,8 +1034,8 @@ void CGpioEntity::OnPositiveLevelTimerOut(void* pData)
|
|
|
do {
|
|
|
|
|
|
if (initCtt == 1) {
|
|
|
- DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("test initCtt == 1");
|
|
|
- if (m_ePickUpFlag == Unknown) {
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("test initCtt == 1");
|
|
|
+ if (m_ePickUpFlag == UnknownStatus) {
|
|
|
if (DetectBit(btInput, PICKUPSENSOR)) m_ePickUpFlag = Actived;
|
|
|
else if (!DetectBit(btInput, PICKUPSENSOR)) m_ePickUpFlag = InActive;
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Set initial value: %d", (int)m_ePickUpFlag);
|
|
|
@@ -997,7 +1045,7 @@ void CGpioEntity::OnPositiveLevelTimerOut(void* pData)
|
|
|
if (DetectBit(btInput, PICKUPSENSOR)) {
|
|
|
if (m_ePickUpFlag == InActive) {
|
|
|
|
|
|
- if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)
|
|
|
+ if (IfHaveMoveDetect())
|
|
|
LogEvent(Severity_Middle, LOG_EVT_PICKUP, "话机提起");
|
|
|
|
|
|
m_ePickUpFlag = Actived;
|
|
|
@@ -1005,7 +1053,7 @@ void CGpioEntity::OnPositiveLevelTimerOut(void* pData)
|
|
|
|
|
|
} else if (m_ePickUpFlag == Actived) {
|
|
|
|
|
|
- if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)
|
|
|
+ if (IfHaveMoveDetect())
|
|
|
LogEvent(Severity_Middle, LOG_EVT_ONHOOK, "话机放下");
|
|
|
|
|
|
m_ePickUpFlag = InActive;
|
|
|
@@ -1020,13 +1068,13 @@ void CGpioEntity::OnPositiveLevelTimerOut(void* pData)
|
|
|
|
|
|
if (m_ePickUpFlag == InActive) {
|
|
|
|
|
|
- if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)
|
|
|
+ if (IfHaveMoveDetect())
|
|
|
LogEvent(Severity_Middle, LOG_EVT_PICKUP, "话机提起");
|
|
|
|
|
|
m_ePickUpFlag = Actived;
|
|
|
m_bPickUpRound = false;
|
|
|
|
|
|
- } else if (m_ePickUpFlag == Unknown) {
|
|
|
+ } else if (m_ePickUpFlag == UnknownStatus) {
|
|
|
m_ePickUpFlag = Actived;
|
|
|
}
|
|
|
}
|
|
|
@@ -1034,13 +1082,13 @@ void CGpioEntity::OnPositiveLevelTimerOut(void* pData)
|
|
|
|
|
|
if (m_ePickUpFlag == Actived) {
|
|
|
|
|
|
- if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)
|
|
|
+ if (IfHaveMoveDetect())
|
|
|
LogEvent(Severity_Middle, LOG_EVT_ONHOOK, "话机放下");
|
|
|
|
|
|
m_ePickUpFlag = InActive;
|
|
|
m_bPickUpRound = true;
|
|
|
|
|
|
- } else if (m_ePickUpFlag == Unknown) {
|
|
|
+ } else if (m_ePickUpFlag == UnknownStatus) {
|
|
|
m_ePickUpFlag = InActive;
|
|
|
}
|
|
|
}
|
|
|
@@ -1058,7 +1106,7 @@ void CGpioEntity::OnPositiveLevelTimerOut(void* pData)
|
|
|
if (initCtt == 1) {
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("test initCtt == 1");
|
|
|
if (DetectBit(btInput, MOVESENSOR)) {
|
|
|
- if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)
|
|
|
+ if (IfHaveMoveDetect())
|
|
|
LogEvent(Severity_Middle, LOG_EVT_MOVESENSOR_ON, CSimpleStringA::Format("%s [Active] line: %d", GetDriverPortString(20), __LINE__));
|
|
|
}
|
|
|
break;
|
|
|
@@ -1069,12 +1117,20 @@ void CGpioEntity::OnPositiveLevelTimerOut(void* pData)
|
|
|
m_moveDisappearTimes = 0;
|
|
|
if (m_moveHoldTimes < MAX_MOVE_HOLD_TIMES) { // 100ms * 5000
|
|
|
if ((m_moveHoldTimes % LOG_TIME_VALUE) == 0) { //100ms * 25 = 2.5s 但因为厂家接口调用,不进来计数,需要800ms+
|
|
|
- if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)
|
|
|
+ if (IfHaveMoveDetect())
|
|
|
LogEvent(Severity_Middle, LOG_EVT_MOVESENSOR_ON, CSimpleStringA::Format("%s [Active] line: %d", GetDriverPortString(20), __LINE__));
|
|
|
}
|
|
|
} else if ((m_moveHoldTimes % MAX_MOVE_HOLD_TIMES) == 0) { //难道8分钟一直有人就异常?还有一个 Round 标识
|
|
|
- if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)
|
|
|
- LogWarn(Severity_Middle, Error_Unexpect, LOG_EVT_MOVEDETECT_ABNORMAL, "移动次数异常");
|
|
|
+ if (IfHaveMoveDetect()) {
|
|
|
+ SYSTEMTIME localTime;
|
|
|
+ GetLocalTime(&localTime);
|
|
|
+ if (localTime.wHour > 8 && localTime.wHour < 18)
|
|
|
+ LogWarn(Severity_High, Error_Unexpect, LOG_EVT_MOVEDETECT_ABNORMAL_WORKTIME, "Move detect is abnormal(Work time).");
|
|
|
+ else
|
|
|
+ LogWarn(Severity_High, Error_Unexpect, LOG_EVT_MOVEDETECT_ABNORMAL_OFFWORK, "Move detect is abnormal(off work).");
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
m_moveHoldTimes++;
|
|
|
m_bMoveRound = false;
|
|
|
@@ -1082,7 +1138,7 @@ void CGpioEntity::OnPositiveLevelTimerOut(void* pData)
|
|
|
} else if (!DetectBit(btInput, MOVESENSOR)) {
|
|
|
m_moveHoldTimes = 0;
|
|
|
if ((m_moveDisappearTimes % LOG_TIME_VALUE) == 0) {
|
|
|
- if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)
|
|
|
+ if (IfHaveMoveDetect())
|
|
|
LogEvent(Severity_Middle, LOG_EVT_MOVESENSOR_OFF, CSimpleStringA::Format("%s [InActive] line: %d", GetDriverPortString(20), __LINE__));
|
|
|
}
|
|
|
m_moveDisappearTimes++;
|
|
|
@@ -1104,7 +1160,7 @@ void CGpioEntity::OnPositiveLevelTimerOut(void* pData)
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("test initCtt == 1");
|
|
|
if (DetectBit(btInput, CARDGATESENSOR)) {
|
|
|
if (!m_bCardGateFlag) {
|
|
|
- if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)
|
|
|
+ if (IfHaveMoveDetect())
|
|
|
LogEvent(Severity_Middle, LOG_EVT_CARDGATESENSOR, CSimpleStringA::Format("%s [Active] line: %d", GetDriverPortString(21), __LINE__));
|
|
|
m_bCardGateFlag = true;
|
|
|
}
|
|
|
@@ -1115,7 +1171,7 @@ void CGpioEntity::OnPositiveLevelTimerOut(void* pData)
|
|
|
|
|
|
if (m_bCardGateRound) {
|
|
|
if (DetectBit(btInput, CARDGATESENSOR) && !m_bCardGateFlag) {
|
|
|
- if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus)
|
|
|
+ if (IfHaveMoveDetect())
|
|
|
LogEvent(Severity_Middle, LOG_EVT_CARDGATESENSOR, CSimpleStringA::Format("%s [Active] line: %d", GetDriverPortString(21), __LINE__));
|
|
|
m_bCardGateFlag = true;
|
|
|
m_bCardGateRound = false;
|
|
|
@@ -1175,7 +1231,7 @@ void CGpioEntity::OnPositiveLevelTimerOut(void* pData)
|
|
|
if (pGci->CttPhone > 1 && !bPhoneOne) {
|
|
|
do {
|
|
|
|
|
|
- if (m_ePickUpFlag == Unknown) {
|
|
|
+ if (m_ePickUpFlag == UnknownStatus) {
|
|
|
if (DetectBit(btInput, PICKUPSENSOR)) m_ePickUpFlag = Actived;
|
|
|
else if (!DetectBit(btInput, PICKUPSENSOR)) m_ePickUpFlag = InActive;
|
|
|
DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Set initial value: %d", (int)m_ePickUpFlag);
|
|
|
@@ -1359,6 +1415,14 @@ BYTE CGpioEntity::GetOutputStatus(int sn)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+bool CGpioEntity::IfHaveMoveDetect()
|
|
|
+{
|
|
|
+ if (m_eMachineType == RVC_Stand2S || m_eMachineType == RVC_Stand1SPlus ||m_eMachineType == RVC_CardPrinter)
|
|
|
+ return true;
|
|
|
+ else
|
|
|
+ return false;
|
|
|
+}
|
|
|
+
|
|
|
SP_BEGIN_ENTITY_MAP()
|
|
|
-SP_ENTITY(CGpioEntity)
|
|
|
-SP_END_ENTITY_MAP()
|
|
|
+ SP_ENTITY(CGpioEntity)
|
|
|
+SP_END_ENTITY_MAP()
|