소스 검색

Z991239-1017 #comment fea 解决准入打开mainpage的问题,由于timer冲突

陈良瑜80374463 4 년 전
부모
커밋
6047b0ae96
4개의 변경된 파일15개의 추가작업 그리고 13개의 파일을 삭제
  1. 1 1
      CMakeSettings.json
  2. 11 9
      Module/mod_chromium/mod_chromium.cpp
  3. 1 1
      Module/mod_chromium/mod_chromium.h
  4. 2 2
      addin/cfg/HealthManager.ini

+ 1 - 1
CMakeSettings.json

@@ -61,7 +61,7 @@
       "buildCommandArgs": "",
       "buildCommandArgs": "",
       "ctestCommandArgs": "--output-on-failure",
       "ctestCommandArgs": "--output-on-failure",
       "inheritEnvironments": [ "linux_x64" ],
       "inheritEnvironments": [ "linux_x64" ],
-      "remoteMachineName": "-1315925427;99.12.22.125 (username=pcacc, port=22, authentication=Password)",
+      "remoteMachineName": "-627321627;192.168.1.171 (username=pcacc, port=2223, authentication=Password)",
       "remoteCMakeListsRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/src",
       "remoteCMakeListsRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/src",
       "remoteBuildRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/build/${name}",
       "remoteBuildRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/build/${name}",
       "remoteInstallRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/install/${name}",
       "remoteInstallRoot": "$HOME/.vs/${projectDirName}/${workspaceHash}/out/install/${name}",

+ 11 - 9
Module/mod_chromium/mod_chromium.cpp

@@ -178,14 +178,13 @@ namespace Chromium {
 			LOG_TRACE("subscribe AccessAuthorization log failed!"); 
 			LOG_TRACE("subscribe AccessAuthorization log failed!"); 
 		else
 		else
 			LOG_TRACE("subscribe AccessAuthorization success!");
 			LOG_TRACE("subscribe AccessAuthorization success!");
-		GetFunction()->SubscribeLog(m_uuidAccessAuth, this, Log_Error, Severity_None, Error_IgnoreAll, -1, "AccessAuthorization");
+		GetFunction()->SubscribeLog(m_uuidAccessAuthErr, this, Log_Error, Severity_None, Error_IgnoreAll, -1, "AccessAuthorization");
 
 
 		GetFunction()->RegistSysVarEvent("UIState", this);
 		GetFunction()->RegistSysVarEvent("UIState", this);
 
 
 		GetFunction()->RegistSysVarEvent("EntryPermit", this);
 		GetFunction()->RegistSysVarEvent("EntryPermit", this);
 
 
-		generateBussinessLimitTimer();
-
+		//generateBussinessLimitTimer();  
 
 
 		// 按照单屏方式
 		// 按照单屏方式
 		pTransactionContext->SendAnswer(Error_Succeed);
 		pTransactionContext->SendAnswer(Error_Succeed);
@@ -193,6 +192,7 @@ namespace Chromium {
 
 
 	void CChromiumEntity::OnSysVarEvent(const char* pszKey, const char* pszValue, const char* pszOldValue, const char* pszEntityName)
 	void CChromiumEntity::OnSysVarEvent(const char* pszKey, const char* pszValue, const char* pszOldValue, const char* pszEntityName)
 	{
 	{
+		Dbg("OnSysVarEvent %s, old->new:%s->%s", pszKey, pszOldValue, pszValue);
 		if ((strnicmp(pszKey, "UIState", strlen("UIState")) == 0))
 		if ((strnicmp(pszKey, "UIState", strlen("UIState")) == 0))
 		{
 		{
 			if (strnicmp(pszValue, "M", strlen("M")) == 0)
 			if (strnicmp(pszValue, "M", strlen("M")) == 0)
@@ -205,20 +205,21 @@ namespace Chromium {
 				}
 				}
 			}
 			}
 		}
 		}
+		/*
 		else if (0 == CSimpleStringA("EntryPermit").Compare(pszKey, true))
 		else if (0 == CSimpleStringA("EntryPermit").Compare(pszKey, true))
 		{
 		{
-			if (0 == CSimpleStringA("A").Compare(pszValue, true) || 0 == CSimpleStringA("F").Compare(pszValue, true))
+			if ((pszValue != NULL && (pszValue[0] == 'a' || pszValue[0] == 'A')) || (pszValue != NULL && (pszValue[0] == 'f' || pszValue[0] == 'F')))
 			{
 			{
 				auto openRet = CModTools::get_mutable_instance().StartChromiumBrowser(ERR_PAGE_REASON::breakdown);
 				auto openRet = CModTools::get_mutable_instance().StartChromiumBrowser(ERR_PAGE_REASON::breakdown);
 				Dbg("access failed, open page breakdown, %d", openRet.first);
 				Dbg("access failed, open page breakdown, %d", openRet.first);
 			}
 			}
-			else if (0 == CSimpleStringA("L").Compare(pszValue, true)) {
+			else if (pszValue != NULL && (pszValue[0] == 'l' || pszValue[0] == 'L')) {
 				CSystemRunInfo sysruninfo;
 				CSystemRunInfo sysruninfo;
 				GetFunction()->GetSystemRunInfo(sysruninfo);
 				GetFunction()->GetSystemRunInfo(sysruninfo);
 				if (!(sysruninfo.dwBootOption & SystemBootOptionEnum::BootOption_Test))
 				if (!(sysruninfo.dwBootOption & SystemBootOptionEnum::BootOption_Test))
 					generateCefclientTimer();//非--test时,才会打开浏览器
 					generateCefclientTimer();//非--test时,才会打开浏览器
 			}
 			}
-		}
+		}*/
 	}
 	}
 
 
 	void CChromiumEntity::OnPreClose(EntityCloseCauseEnum eCloseCause, CSmartPointer<ITransactionContext> pTransactionContext)
 	void CChromiumEntity::OnPreClose(EntityCloseCauseEnum eCloseCause, CSmartPointer<ITransactionContext> pTransactionContext)
@@ -237,6 +238,7 @@ namespace Chromium {
 		const DWORD dwSysError, const DWORD dwUserCode, const DWORD dwEntityInstanceID, const WORD wEntityDevelID,
 		const DWORD dwSysError, const DWORD dwUserCode, const DWORD dwEntityInstanceID, const WORD wEntityDevelID,
 		const CAutoArray<DWORD>& Param, const char* pszEntityName, const char* pszModuleName, const char* pszMessage)
 		const CAutoArray<DWORD>& Param, const char* pszEntityName, const char* pszModuleName, const char* pszMessage)
 	{
 	{
+		Dbg("OnLog %x", dwUserCode);
 		switch (dwUserCode)
 		switch (dwUserCode)
 		{
 		{
 		case LOG_EVT_BEGIN_CAMERA_CONFIG:
 		case LOG_EVT_BEGIN_CAMERA_CONFIG:
@@ -249,7 +251,7 @@ namespace Chromium {
 			Dbg("end show Screen Camera config, close page cameraconfig");
 			Dbg("end show Screen Camera config, close page cameraconfig");
 			CModTools::get_mutable_instance().killChromiumByName((+PAGE_TYPE::CameraConfig)._to_string());
 			CModTools::get_mutable_instance().killChromiumByName((+PAGE_TYPE::CameraConfig)._to_string());
 			break;
 			break;
-			/*
+			
 		case EVENT_ACCESSAUTH_SUCCEED:
 		case EVENT_ACCESSAUTH_SUCCEED:
 			Dbg("access auth success, open page mainurl");
 			Dbg("access auth success, open page mainurl");
 			{
 			{
@@ -266,7 +268,7 @@ namespace Chromium {
 			Dbg("access failed, open page breakdown, %d", openRet.first);
 			Dbg("access failed, open page breakdown, %d", openRet.first);
 		}
 		}
 			break;
 			break;
-			*/
+			
 		default:
 		default:
 			break;
 			break;
 		}
 		}
@@ -469,7 +471,7 @@ namespace Chromium {
 	void CChromiumEntity::generateCefclientTimer()
 	void CChromiumEntity::generateCefclientTimer()
 	{
 	{
 		m_pTimerListener = new TimerOutHelper<CChromiumEntity>(this, &CChromiumEntity::OnTaskTimerListener, NULL, false);
 		m_pTimerListener = new TimerOutHelper<CChromiumEntity>(this, &CChromiumEntity::OnTaskTimerListener, NULL, false);
-		GetFunction()->SetTimer(CHROMIUM_TIMER_ID, m_pTimerListener, 3000);	//间隔执行时间
+		GetFunction()->SetTimer(CHROMIUM_TIMER_ID, m_pTimerListener, 2000);	//间隔执行时间
 	}
 	}
 
 
 	void CChromiumEntity::generateBussinessLimitTimer() {
 	void CChromiumEntity::generateBussinessLimitTimer() {

+ 1 - 1
Module/mod_chromium/mod_chromium.h

@@ -73,7 +73,7 @@ namespace Chromium {
 		CSimpleStringA m_strCustomMainUrl;
 		CSimpleStringA m_strCustomMainUrl;
 	private:
 	private:
 		//subscribe
 		//subscribe
-		CUUID m_uidCameraListener, m_uuidAccessAuth, m_uidBrowserListenser;
+		CUUID m_uidCameraListener, m_uuidAccessAuth, m_uidBrowserListenser, m_uuidAccessAuthErr;
 		virtual void OnLog(const CAutoArray<CUUID>& SubIDs, const CUUID nLogID, const LogTypeEnum eLogType, const SeverityLevelEnum eLevel,
 		virtual void OnLog(const CAutoArray<CUUID>& SubIDs, const CUUID nLogID, const LogTypeEnum eLogType, const SeverityLevelEnum eLevel,
 			const DWORD dwSysError, const DWORD dwUserCode, const DWORD dwEntityInstanceID, const WORD wEntityDevelID,
 			const DWORD dwSysError, const DWORD dwUserCode, const DWORD dwEntityInstanceID, const WORD wEntityDevelID,
 			const CAutoArray<DWORD>& Param, const char* pszEntityName, const char* pszModuleName, const char* pszMessage);
 			const CAutoArray<DWORD>& Param, const char* pszEntityName, const char* pszModuleName, const char* pszMessage);

+ 2 - 2
addin/cfg/HealthManager.ini

@@ -18,7 +18,7 @@ CenterSetting=2
 AccessAuthorization=2
 AccessAuthorization=2
 ;SystemCustomization=2
 ;SystemCustomization=2
 SelfChecker=2
 SelfChecker=2
-;HeartBeat=2
+HeartBeat=2
 ;Alarm=1
 ;Alarm=1
 ;DeviceSwitch=2
 ;DeviceSwitch=2
 EventConverter=2
 EventConverter=2
@@ -27,7 +27,7 @@ AssistantChannel=2
 LocalMediaPlay=0
 LocalMediaPlay=0
 SIPPhone=2
 SIPPhone=2
 ;InteractionContext=2
 ;InteractionContext=2
-CounterConnector=2
+CounterConnector=0
 ;HandWritingInput=2
 ;HandWritingInput=2
 InitiativeTransfer=2
 InitiativeTransfer=2
 InteractiveControl=2
 InteractiveControl=2