|
@@ -337,18 +337,18 @@ ErrorCodeEnum CGPIOFSM::OnInit()
|
|
|
eErrDev = m_hDevHelper->WritePort(0, 0x00);
|
|
|
ULONGLONG ullEnd = SP::Module::Comm::RVCGetTickCount();
|
|
|
if (eErrDev != Error_Succeed)
|
|
|
- SetErrorAndLog(eErrDev, GPIO_UserErrorCode_WritePort_Failed, "DevAdapter::WritePort", __FUNCTION__, false, ullEnd - ullStart, "", CombineJsonContext("WritePort(0) after DevOpen"));
|
|
|
+ SetErrorAndLog(eErrDev, GPIO_UserErrorCode_WritePort_Failed, "DevAdapter::WritePort", __FUNCTION__, false, ullEnd - ullStart, "", CombineJsonContext("ResetPort0 after DevOpen"));
|
|
|
ullStart = SP::Module::Comm::RVCGetTickCount();
|
|
|
eErrDev = m_hDevHelper->WritePort(1, 0x00);
|
|
|
ullEnd = SP::Module::Comm::RVCGetTickCount();
|
|
|
if (eErrDev != Error_Succeed)
|
|
|
- SetErrorAndLog(eErrDev, GPIO_UserErrorCode_WritePort_Failed, "DevAdapter::WritePort", __FUNCTION__, false, ullEnd - ullStart, "", CombineJsonContext("WritePort(1) after DevOpen"));
|
|
|
+ SetErrorAndLog(eErrDev, GPIO_UserErrorCode_WritePort_Failed, "DevAdapter::WritePort", __FUNCTION__, false, ullEnd - ullStart, "", CombineJsonContext("ResetPort1 after DevOpen"));
|
|
|
if (m_bNewVersion) {
|
|
|
ullStart = SP::Module::Comm::RVCGetTickCount();
|
|
|
eErrDev = m_hDevHelper->WritePort(3, 0x00);
|
|
|
ullEnd = SP::Module::Comm::RVCGetTickCount();
|
|
|
if (eErrDev != Error_Succeed)
|
|
|
- SetErrorAndLog(eErrDev, GPIO_UserErrorCode_WritePort_Failed, "DevAdapter::WritePort", __FUNCTION__, false, ullEnd - ullStart, "", CombineJsonContext("WritePort(3) after DevOpen"));
|
|
|
+ SetErrorAndLog(eErrDev, GPIO_UserErrorCode_WritePort_Failed, "DevAdapter::WritePort", __FUNCTION__, false, ullEnd - ullStart, "", CombineJsonContext("ResetPort3 after DevOpen"));
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
@@ -357,7 +357,7 @@ ErrorCodeEnum CGPIOFSM::OnInit()
|
|
|
eErrDev = m_hDevHelper->SetStatus(GPIO_DEV_SN_LIGHT_SENSOR_ALL, GPIO_DEV_LIGHT_MODE_RESET);
|
|
|
ULONGLONG ullEnd = SP::Module::Comm::RVCGetTickCount();
|
|
|
if (eErrDev != Error_Succeed)
|
|
|
- SetErrorAndLog(eErrDev, GPIO_UserErrorCode_SetStatus_Failed, "DevAdapter::SetStatus", __FUNCTION__, false, ullEnd - ullStart, "", CombineJsonContext("SetStatus after DevOpen"));
|
|
|
+ SetErrorAndLog(eErrDev, GPIO_UserErrorCode_SetStatus_Failed, "DevAdapter::SetStatus", __FUNCTION__, false, ullEnd - ullStart, "", CombineJsonContext("ResetStatus after DevOpen"));
|
|
|
#endif //RVC_OS_LINUX
|
|
|
}
|
|
|
SetDevState(DEVICE_STATUS_NORMAL);
|
|
@@ -887,13 +887,13 @@ void CGPIOFSM::OnEventDetect(void* pData)
|
|
|
m_bOpenFlag = true;
|
|
|
m_DoorOpenTimeStamp = SP::Module::Comm::RVCGetTickCount();
|
|
|
LogEvent(Severity_Middle, LOG_EVT_OPENSENSOR_ON, CSimpleStringA::Format("%s [Active]", GetDriverPortString(PIN_DETECT_OPENDOOR + 1)));
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(GpioService_LogCode_Detect_DoorOpen)("[GPIO] The chassis door is open");
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(GpioService_LogCode_Detect_DoorOpen)("[Receiver] The chassis door is open");
|
|
|
}
|
|
|
else if (!DetectBit(btInput, OPENSENSOR) && m_bOpenFlag) {
|
|
|
m_bOpenFlag = false;
|
|
|
m_DoorCloseTimeStamp = SP::Module::Comm::RVCGetTickCount();
|
|
|
LogEvent(Severity_Middle, LOG_EVT_OPENSENSOR_OFF, CSimpleStringA::Format("%s [InActive]", GetDriverPortString(PIN_DETECT_OPENDOOR + 1)));
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(GpioService_LogCode_Detect_DoorClose).setCostTime(m_DoorCloseTimeStamp - m_DoorOpenTimeStamp)("[GPIO] The chassis door is close");
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(GpioService_LogCode_Detect_DoorClose).setCostTime(m_DoorCloseTimeStamp - m_DoorOpenTimeStamp)("[Receiver] The chassis door is close");
|
|
|
}
|
|
|
|
|
|
/**话机检测*/
|
|
@@ -902,12 +902,12 @@ void CGPIOFSM::OnEventDetect(void* pData)
|
|
|
m_ePickUpFlag = Actived;
|
|
|
m_PickUpTimeStamp = SP::Module::Comm::RVCGetTickCount();
|
|
|
LogEvent(Severity_Middle, LOG_EVT_PICKUP, "Life the Phone up");
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(GpioService_LogCode_Detect_PhonePickup)("[GPIO] 话机提起");
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(GpioService_LogCode_Detect_PhonePickup)("[Receiver] 话机提起");
|
|
|
}
|
|
|
else if (m_ePickUpFlag == UnknownStatus) {
|
|
|
m_ePickUpFlag = Actived;
|
|
|
m_PickUpTimeStamp = SP::Module::Comm::RVCGetTickCount();
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(GpioService_LogCode_Detect_PhonePickup)("[GPIO] 话机提起(启动时)");
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(GpioService_LogCode_Detect_PhonePickup)("[Receiver] 话机提起(启动时)");
|
|
|
}
|
|
|
}
|
|
|
else if (!DetectBit(btInput, PICKUPSENSOR)) {
|
|
@@ -915,7 +915,7 @@ void CGPIOFSM::OnEventDetect(void* pData)
|
|
|
m_ePickUpFlag = InActive;
|
|
|
m_PutDownTimeStamp = SP::Module::Comm::RVCGetTickCount();
|
|
|
LogEvent(Severity_Middle, LOG_EVT_ONHOOK, "Put the Phone down");
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(GpioService_LogCode_Detect_PhonePutDown).setCostTime(m_PutDownTimeStamp - m_PickUpTimeStamp)("[GPIO] 话机放下");
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(GpioService_LogCode_Detect_PhonePutDown).setCostTime(m_PutDownTimeStamp - m_PickUpTimeStamp)("[Receiver] 话机放下");
|
|
|
}
|
|
|
else if (m_ePickUpFlag == UnknownStatus) {
|
|
|
m_ePickUpFlag = InActive;
|
|
@@ -927,7 +927,7 @@ void CGPIOFSM::OnEventDetect(void* pData)
|
|
|
if (!m_bMoveFlag) {
|
|
|
m_bMoveFlag = true;
|
|
|
m_moveDisappearTimes = 0;
|
|
|
- //DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("[GPIO] Someone approached now");
|
|
|
+ //DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("[Receiver] Someone approached now");
|
|
|
LogEvent(Severity_Middle, LOG_EVT_MOVESENSOR_ON, CSimpleStringA::Format("%s [Active], times: %lu", GetDriverPortString(PIN_DETECT_BODY + 1), m_moveHoldTimes));
|
|
|
}
|
|
|
/** 只是发一次时间时,发现感知实体没有收到或者不处理第一次发出的时间,所以需要沿用原有的发送频率,再继续发送消失的事件,下同 [Gifur@202496]*/
|
|
@@ -953,7 +953,7 @@ void CGPIOFSM::OnEventDetect(void* pData)
|
|
|
if (m_bMoveFlag) {
|
|
|
m_bMoveFlag = false;
|
|
|
m_moveHoldTimes = 0;
|
|
|
- //DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("[GPIO] Someone stays away already");
|
|
|
+ //DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("[Receiver] Someone stays away already");
|
|
|
LogEvent(Severity_Middle, LOG_EVT_MOVESENSOR_OFF, CSimpleStringA::Format("%s [InActive]", GetDriverPortString(PIN_DETECT_BODY + 1)));
|
|
|
}
|
|
|
else if (m_moveDisappearTimes != 0 && (m_moveDisappearTimes % REPEAT_FIRE_TIMEOUT_TIMES) == 0) {
|