Просмотр исходного кода

#IQBX #comment vtmloader 编译通过

80374374 1 год назад
Родитель
Сommit
b247b13098

+ 2 - 3
Module/mod_vtmloader/CMakeLists.txt

@@ -27,9 +27,8 @@ target_link_directories(${MODULE_NAME} PRIVATE
 )
 
 # 添加实体需要依赖的其他共享库(包括系统库)
-set(${MODULE_PREFIX}_LIBS ${MODULE_BASE_ALL_LIBS} RestfulFunc)#${CONAN_PKG_LIBS_BOOST} RVCCrypt NewRVCCrypt
-target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS} libpublicFun)
-
+set(${MODULE_PREFIX}_LIBS ${MODULE_BASE_ALL_LIBS} RestfulFunc libpublicFun)
+target_link_libraries(${MODULE_NAME} ${${MODULE_PREFIX}_LIBS})
 
 
 deploy_module(${MODULE_PREFIX} ${MODULE_NAME})

+ 75 - 76
Module/mod_vtmloader/VtmLoaderFSM.cpp

@@ -156,7 +156,7 @@ void CVtmLoaderFSM::OnStateTrans(int iSrcState, int iDstState)
 
 void CVtmLoaderFSM::s0_on_entry()
 {
-	LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "开始网卡、网络连通性检查");
+	LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "寮€濮嬬綉鍗°€佺綉缁滆繛閫氭€ф�鏌�");
 	NetWorkCheckAndGetSettingTask* task = new NetWorkCheckAndGetSettingTask(this);
 	GetEntityBase()->GetFunction()->PostThreadPoolTask(task);
 }
@@ -190,12 +190,12 @@ void CVtmLoaderFSM::ShowEntityBootFailedAtFront(LPCTSTR lpcszEntityName, ErrorCo
 		strErrMsg = CSimpleStringA::Format("%s:%s", lpcszEntityName, (LPCTSTR)errInfo.strErrMsg);
 	}
 	else {
-		strErrMsg = CSimpleStringA::Format("%s模块初始化失败: %s", lpcszEntityName, (LPCTSTR)SpStrError(bootFailedResult));
+		strErrMsg = CSimpleStringA::Format("%s妯″潡鍒濆�鍖栧け璐�: %s", lpcszEntityName, (LPCTSTR)SpStrError(bootFailedResult));
 	}
 
 	if (CSimpleStringA(lpcszEntityName).Compare("SIPPhone", true) == 0)
 	{
-		GetEntityBase()->GetFunction()->SetSysVar("AuthErrMsg", strErrMsg.GetData());//实体启动失败保存到错误页字段
+		GetEntityBase()->GetFunction()->SetSysVar("AuthErrMsg", strErrMsg.GetData());//瀹炰綋鍚�姩澶辫触淇濆瓨鍒伴敊璇�〉瀛楁�
 	}
 
 	if (isBlock) {
@@ -252,7 +252,7 @@ void CVtmLoaderFSM::s1_on_entry()
 				continue;
 		}
 		ZeroMemory(startMsg, 128);
-		//sprintf(startMsg, "正在启动实体%s...", it->first.GetData());
+		//sprintf(startMsg, "姝e湪鍚�姩瀹炰綋%s...", it->first.GetData());
 		//GetEntityBase()->GetFunction()->ShowStartupInfo(startMsg);
 		switch (it->second.loadOpt)
 		{
@@ -350,9 +350,9 @@ unsigned int CVtmLoaderFSM::s1_on_event(FSMEvent* pEvt)
 void CVtmLoaderFSM::s2_on_entry()
 {
 	LOG_FUNCTION();
-	LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "CoreBoot 阶段实体加载完成");
+	LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "CoreBoot 闃舵�瀹炰綋鍔犺浇瀹屾垚");
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR040210F14")("Stage Coreboot have done.");
-	ULONGLONG dwElapse = SP::Module::Comm::RVCGetTickCount();//使用机器启动时间秒数
+	ULONGLONG dwElapse = SP::Module::Comm::RVCGetTickCount();//浣跨敤鏈哄櫒鍚�姩鏃堕棿绉掓暟
 	DWORD elapseTimeTemp = dwElapse / 1000;
 	CSimpleStringA xMsg = CSimpleStringA::Format("{\"Decripstion\":\"Enter safeload state.\",\"version\":\"%s\",\"elapseTime\":\"%d\"}", m_sysInfo.InstallVersion.ToString().GetData(), elapseTimeTemp);
 	//LogWarn(Severity_Low, Error_Unexpect, HealthManager_UserErrorCode_Enter_SafeLoad_State, xMsg.GetData());
@@ -411,7 +411,7 @@ void CVtmLoaderFSM::s2_on_entry()
 		case LOADOPT_SYNC_VERIFY:
 		{
 			ZeroMemory(startMsg, 128);
-			sprintf(startMsg, "正在启动实体%s...", it->first.GetData());
+			sprintf(startMsg, "姝e湪鍚�姩瀹炰綋%s...", it->first.GetData());
 			GetEntityBase()->GetFunction()->ShowStartupInfo(startMsg);
 			pFuncPrivilege->StartEntity(it->first, NULL, spWait);
 			if (spWait != NULL)
@@ -429,22 +429,22 @@ void CVtmLoaderFSM::s2_on_entry()
 				char tmp[128] = { 0 };
 				if (it->first.Compare("SIPPhone", true) == 0) {
 					if (LOADING_TIMEOUT == it->second.eResult) {
-						sprintf(tmp, "实体 %s 启动超时(%d),请尝试重启应用解决", it->first.GetData(), it->second.eResult);
+						sprintf(tmp, "瀹炰綋 %s 鍚�姩瓒呮椂锛�%d锛夛紝璇峰皾璇曢噸鍚�簲鐢ㄨВ鍐�", it->first.GetData(), it->second.eResult);
 					}
 					else {
-						sprintf(tmp, "实体 %s 启动失败(%d),识别不到声卡,请尝试重启计算机解决,多次无效后请联系厂商处理", it->first.GetData(), it->second.eResult);
+						sprintf(tmp, "瀹炰綋 %s 鍚�姩澶辫触锛�%d锛夛紝璇嗗埆涓嶅埌澹板崱锛岃�灏濊瘯閲嶅惎璁$畻鏈鸿В鍐筹紝澶氭�鏃犳晥鍚庤�鑱旂郴鍘傚晢澶勭悊", it->first.GetData(), it->second.eResult);
 					}
 				}
 				else {
-					sprintf(tmp, "实体 %s 启动失败 %d", it->first.GetData(), it->second.eResult);
+					sprintf(tmp, "瀹炰綋 %s 鍚�姩澶辫触 %d", it->first.GetData(), it->second.eResult);
 				}
 #if defined(RVC_OS_WIN)
 				GetEntityBase()->GetFunction()->ShowFatalError(tmp);
-				GetEntityBase()->GetFunction()->SetSysVar("AuthErrMsg", tmp);//实体启动失败保存到错误页字段
+				GetEntityBase()->GetFunction()->SetSysVar("AuthErrMsg", tmp);//瀹炰綋鍚�姩澶辫触淇濆瓨鍒伴敊璇�〉瀛楁�
 #else
 				ShowEntityBootFailedAtFront(it->first, errCode);
 #endif
-				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("启动失败:%s", tmp);
+				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("鍚�姩澶辫触:%s", tmp);
 				m_csErrEntity = m_csErrEntity + "|" + it->first;
 				FSMEvent* e = new FSMEvent(USER_EVT_SAFELOAD_FINISHED);
 				e->param1 = 2;//"SYNC START" enity started failed.
@@ -545,7 +545,7 @@ unsigned int CVtmLoaderFSM::s2_on_event(FSMEvent* pEvt)
 //Operating
 void CVtmLoaderFSM::s3_on_entry()
 {
-	LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "SafeLoad 阶段实体加载完成");
+	LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "SafeLoad 闃舵�瀹炰綋鍔犺浇瀹屾垚");
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR040210F15")("Stage Safeload have done.");
 	Sleep(m_sleepEnterOpMS);
 	bool bAsync = false;
@@ -603,7 +603,7 @@ void CVtmLoaderFSM::s3_on_entry()
 		case LOADOPT_SYNC_VERIFY:
 		{
 			ZeroMemory(startMsg, 128);
-			sprintf(startMsg, "正在启动实体%s...", it->first.GetData());
+			sprintf(startMsg, "姝e湪鍚�姩瀹炰綋%s...", it->first.GetData());
 			GetEntityBase()->GetFunction()->ShowStartupInfo(startMsg);
 			errCode = pFuncPrivilege->StartEntity(it->first, NULL, spWait);
 			if (errCode == Error_Succeed)
@@ -627,21 +627,21 @@ void CVtmLoaderFSM::s3_on_entry()
 				char tmp[128] = { 0 };
 				if (it->first.Compare("SIPPhone", true) == 0) {
 					if (LOADING_TIMEOUT == it->second.eResult) {
-						sprintf(tmp, "实体 %s 启动超时(%d),请尝试重启应用解决", it->first.GetData(), it->second.eResult);
+						sprintf(tmp, "瀹炰綋 %s 鍚�姩瓒呮椂锛�%d锛夛紝璇峰皾璇曢噸鍚�簲鐢ㄨВ鍐�", it->first.GetData(), it->second.eResult);
 					}
 					else {
-						sprintf(tmp, "实体 %s 启动失败(%d),识别不到声卡,请尝试重启计算机解决,多次无效后请联系厂商处理", it->first.GetData(), it->second.eResult);
+						sprintf(tmp, "瀹炰綋 %s 鍚�姩澶辫触锛�%d锛夛紝璇嗗埆涓嶅埌澹板崱锛岃�灏濊瘯閲嶅惎璁$畻鏈鸿В鍐筹紝澶氭�鏃犳晥鍚庤�鑱旂郴鍘傚晢澶勭悊", it->first.GetData(), it->second.eResult);
 					}
 				}
 				else {
-					sprintf(tmp, "实体 %s 启动失败 %d", it->first.GetData(), it->second.eResult);
+					sprintf(tmp, "瀹炰綋 %s 鍚�姩澶辫触 %d", it->first.GetData(), it->second.eResult);
 				}
 #if defined(RVC_OS_WIN)
 				GetEntityBase()->GetFunction()->ShowFatalError(tmp);
 #else
 				ShowEntityBootFailedAtFront(it->first, errCode);
 #endif 
-				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("启动失败:%s", tmp);
+				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("鍚�姩澶辫触:%s", tmp);
 				m_csErrEntity = m_csErrEntity + "|" + it->first;
 				FSMEvent* e = new FSMEvent(USER_EVT_OPERATING_FINISHED);
 				e->param1 = 2;//"SYNC START" enity started failed.
@@ -709,7 +709,7 @@ unsigned int CVtmLoaderFSM::s3_on_event(FSMEvent* pEvt)
 void CVtmLoaderFSM::s4_on_entry()
 {
 	LOG_FUNCTION();
-	LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "Operating 阶段实体加载完成");
+	LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "Operating 闃舵�瀹炰綋鍔犺浇瀹屾垚");
 	//oiltmp wait for analyse progress, then change to app log format
 	LogWarn(Severity_Low, Error_Succeed, VtmLoader_NetCard_Cost, CSimpleStringA::Format("%d", m_ullNetCardCost).GetData());
 	LogWarn(Severity_Low, Error_Succeed, VtmLoader_NetworkDetect_Cost, CSimpleStringA::Format("%d", m_ullNetDetectCost).GetData());
@@ -737,7 +737,7 @@ unsigned int CVtmLoaderFSM::s4_on_event(FSMEvent* pEvt)
 void CVtmLoaderFSM::s5_on_entry()
 {
 	LOG_FUNCTION();
-	LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, "实体加载失败,启动终止。请排查启动失败实体或重启应用");
+	LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, "瀹炰綋鍔犺浇澶辫触锛屽惎鍔ㄧ粓姝€€傝�鎺掓煡鍚�姩澶辫触瀹炰綋鎴栭噸鍚�簲鐢�");
 	NoticeEntityLoadTask* pTask = new NoticeEntityLoadTask(this, Event_VtmLoader_EntityLoad_Failed);
 	GetEntityBase()->GetFunction()->PostThreadPoolTask(pTask);
 	CSmartPointer<IConfigInfo> spConfigCen, spConfigRun;
@@ -758,7 +758,7 @@ void CVtmLoaderFSM::s5_on_entry()
 	//GetEntityBase()->GetFunction()->SetSysVar("TerminalStage", "C");
 	//if (failTimes > maxFailTimes)
 	//{
-	//	//LogEvent(Severity_Middle, LOG_EVT_HEADLIGHT_RED_ON, "设备故障");
+	//	//LogEvent(Severity_Middle, LOG_EVT_HEADLIGHT_RED_ON, "璁惧�鏁呴殰");
 	//	eErr = GetEntityBase()->GetFunction()->SetSysVar("TerminalStage", "D");
 	//	if (eErr != Error_Succeed) {
 	//		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("set termstage D failed (%d).", eErr);
@@ -836,14 +836,14 @@ BOOL CVtmLoaderFSM::DetectNetworkLegality(CSimpleStringA& strInfo)
 	} while (curTimes < maxTimes && !fLocalLANConnected);
 
 	if (!fLocalLANConnected) {
-		strInfo = "未检查到有网卡连接,请检查网络连接";
+		strInfo = "鏈��鏌ュ埌鏈夌綉鍗¤繛鎺ワ紝璇锋�鏌ョ綉缁滆繛鎺�";
 		result = FALSE;
 	}
 	return result;
 }
 int CVtmLoaderFSM::NetWorkCheckAndGetSetting()
 {
-	//检查网卡状态
+	//妫€鏌ョ綉鍗$姸鎬�
 	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("to check network status");
 	CSimpleStringA strMsg(true), tmpTS("X");
 	//GetEntityBase()->GetFunction()->GetSysVar("TerminalStage", tmpTS);
@@ -858,7 +858,7 @@ int CVtmLoaderFSM::NetWorkCheckAndGetSetting()
 		{
 			if (!DetectNetworkLegality(strMsg)) {
 				DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode("QLR040210F10").setResultCode("RTA1F00")("can't find valid network interface");
-				LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("%s。%d 秒后自动重试(第%d次重试)。请检查网线是否插好、网络是否正常"
+				LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("%s銆�%d 绉掑悗鑷�姩閲嶈瘯(绗�%d娆¢噸璇�)銆傝�妫€鏌ョ綉绾挎槸鍚︽彃濂姐€佺綉缁滄槸鍚︽�甯�"
 					, strMsg.GetData(), m_iDetectInterval / 1000, netcheckCount).GetData());
 				//if (tmpTS.Compare("E") != 0)
 				//{
@@ -871,24 +871,24 @@ int CVtmLoaderFSM::NetWorkCheckAndGetSetting()
 			else
 			{
 				m_ullNetCardCost = (SP::Module::Comm::RVCGetTickCount() - ullTmpStart) / 1000;//second
-				LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "网卡状态正常");
+				LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "缃戝崱鐘舵€佹�甯�");
 				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR040210F10")("network interface ok.");
 				break;
 			}
 		}
 		ullTmpStart = SP::Module::Comm::RVCGetTickCount();
-		//检查网络连通性(网络连通性是否作为关键路径走配置,默认不是关键路径)
+		//妫€鏌ョ綉缁滆繛閫氭€э紙缃戠粶杩為€氭€ф槸鍚︿綔涓哄叧閿�矾寰勮蛋閰嶇疆锛岄粯璁や笉鏄�叧閿�矾寰勶級
 		if (!DetectHttpActive())
 		{
-			//网络连通性检查未通过,提示确认网络后重启应用?界面加一个重启按钮?
-			LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, "网络连通性检查失败,请检查网络");
+			//缃戠粶杩為€氭€ф�鏌ユ湭閫氳繃锛屾彁绀虹‘璁ょ綉缁滃悗閲嶅惎搴旂敤锛熺晫闈㈠姞涓€涓�噸鍚�寜閽�紵
+			LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, "缃戠粶杩為€氭€ф�鏌ュけ璐ワ紝璇锋�鏌ョ綉缁�");
 			return -1;
 		}
 	}
 	m_ullNetDetectCost = (SP::Module::Comm::RVCGetTickCount() - ullTmpStart) / 1000;//second
 	ullTmpStart = SP::Module::Comm::RVCGetTickCount();
-	//拉取配置并通知提前启动的实体(Chromium)
-	//重试5次,失败则放弃
+	//鎷夊彇閰嶇疆骞堕€氱煡鎻愬墠鍚�姩鐨勫疄浣擄紙Chromium锛�
+	//閲嶈瘯5娆★紝澶辫触鍒欐斁寮�
 	int getRetry = 0;
 	while(true)
 	{
@@ -904,16 +904,16 @@ int CVtmLoaderFSM::NetWorkCheckAndGetSetting()
 	}
 
 	m_ullGetConfigCost = (SP::Module::Comm::RVCGetTickCount() - ullTmpStart) / 1000;//second
-	//加载实体列表
+	//鍔犺浇瀹炰綋鍒楄〃
 	EntityLoad();
 
 	return 0;
 }
 int CVtmLoaderFSM::EntityLoad()
 {
-	//前提:收到了配置拉取完成的指令,才会进入到这里
-	//为了测试,假装已经拿到了集中配置
-	LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "开始加载实体");
+	//鍓嶆彁锛氭敹鍒颁簡閰嶇疆鎷夊彇瀹屾垚鐨勬寚浠わ紝鎵嶄細杩涘叆鍒拌繖閲�
+	//涓轰簡娴嬭瘯锛屽亣瑁呭凡缁忔嬁鍒颁簡闆嗕腑閰嶇疆
+	LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "寮€濮嬪姞杞藉疄浣�");
 	CSmartPointer<IConfigInfo> spConfigCen,spRunCfg;
 	GetEntityBase()->GetFunction()->OpenConfig(Config_CenterSetting, spConfigCen);
 	GetEntityBase()->GetFunction()->OpenConfig(Config_Run, spRunCfg);
@@ -925,7 +925,7 @@ int CVtmLoaderFSM::EntityLoad()
 	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("SafeLoad.EntityList.%s:%s", m_sysInfo.strMachineType.GetData(), csSafeLoadList.GetData());
 	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Operating.EntityList.%s:%s", m_sysInfo.strMachineType.GetData(), csOperatingList.GetData());
 
-	//oiltmp 如果没有配置,则走默认配置
+	//oiltmp 濡傛灉娌℃湁閰嶇疆锛屽垯璧伴粯璁ら厤缃�
 	if (csCoreBootList.IsNullOrEmpty() || csCoreBootList.IndexOf("HealthManager") < 0 || csCoreBootList.IndexOf("AccessAuthorization") < 0
 		|| csCoreBootList.IndexOf("UpgradeManager") < 0 || csCoreBootList.IndexOf("HeartBeat") < 0
 		|| csCoreBootList.IndexOf("TokenKeeper") < 0 || csCoreBootList.IndexOf("ResourceWatcher") < 0
@@ -934,13 +934,13 @@ int CVtmLoaderFSM::EntityLoad()
 	{
 		if (csCoreBootList.IsNullOrEmpty())
 		{
-			LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, "CoreBoot配置为空,请联系总行开发人员检查");
-			DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM).setLogCode("QLR040210F14").setResultCode("RTA1F05")("CoreBoot配置为空,请联系总行开发人员检查");
+			LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, "CoreBoot閰嶇疆涓虹┖锛岃�鑱旂郴鎬昏�寮€鍙戜汉鍛樻�鏌�");
+			DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM).setLogCode("QLR040210F14").setResultCode("RTA1F05")("CoreBoot閰嶇疆涓虹┖锛岃�鑱旂郴鎬昏�寮€鍙戜汉鍛樻�鏌�");
 		}
 		else
 		{
-			LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("CoreBoot配置异常,请联系总行开发人员检查(%s)", csCoreBootList.GetData()).GetData());
-			DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM).setLogCode("QLR040210F14").setResultCode("RTA1F05")(CSimpleStringA::Format("CoreBoot配置异常,请联系总行开发人员检查(%s)", csCoreBootList.GetData()));
+			LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("CoreBoot閰嶇疆寮傚父锛岃�鑱旂郴鎬昏�寮€鍙戜汉鍛樻�鏌�(%s)", csCoreBootList.GetData()).GetData());
+			DbgWithLink(LOG_LEVEL_ERROR, LOG_TYPE_SYSTEM).setLogCode("QLR040210F14").setResultCode("RTA1F05")(CSimpleStringA::Format("CoreBoot閰嶇疆寮傚父锛岃�鑱旂郴鎬昏�寮€鍙戜汉鍛樻�鏌�(%s)", csCoreBootList.GetData()));
 		}
 		//if have PinPad module
 		//if (m_sysInfo.strMachineType.Compare("RVC.CardStore", true) == 0)
@@ -1010,7 +1010,7 @@ int CVtmLoaderFSM::EntityLoad()
 		if (arrEntity[0].Compare("VtmLoader", true) == 0 || arrEntity[0].Compare("Chromium", true) == 0
 			|| arrEntity[0].Compare("GuiConsole", true) == 0)
 			continue;
-		//去重,防止前面已经加载了
+		//鍘婚噸锛岄槻姝㈠墠闈㈠凡缁忓姞杞戒簡
 		if (find(m_vCoreBoot.begin(), m_vCoreBoot.end(), arrEntity[0].GetData()) != m_vCoreBoot.end())
 			continue;
 		m_vSafeLoad.push_back(arrEntity[0].GetData());
@@ -1037,7 +1037,7 @@ int CVtmLoaderFSM::EntityLoad()
 		if (arrEntity[0].Compare("VtmLoader", true) == 0 || arrEntity[0].Compare("Chromium", true) == 0
 			|| arrEntity[0].Compare("GuiConsole", true) == 0)
 			continue;
-		//去重,防止前面已经加载了
+		//鍘婚噸锛岄槻姝㈠墠闈㈠凡缁忓姞杞戒簡
 		if (find(m_vCoreBoot.begin(), m_vCoreBoot.end(), arrEntity[0].GetData()) != m_vCoreBoot.end()
 			|| find(m_vSafeLoad.begin(), m_vSafeLoad.end(), arrEntity[0].GetData()) != m_vSafeLoad.end())
 			continue;
@@ -1158,8 +1158,8 @@ void CVtmLoaderFSM::OnAnswer(CSmartPointer<IAsynWaitSp> pAsynWaitSp)
 			if (it->second.eResult != Error_Succeed)
 			{
 				char tmp[64] = { 0 };
-				sprintf(tmp, "实体 %s 启动失败-----", it->first.GetData());
-				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("OnAnswer")("启动失败:%s -----", tmp);
+				sprintf(tmp, "瀹炰綋 %s 鍚�姩澶辫触-----", it->first.GetData());
+				DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("OnAnswer")("鍚�姩澶辫触:%s -----", tmp);
 			}
 			ret = CheckLoadResult(LOADSTAGE_COREBOOT);
 			if (ret == 0 || ret == 2)
@@ -1272,21 +1272,21 @@ bool CVtmLoaderFSM::DetectHttpActive()
 
 	DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("eErr:%d, iDetectInterval:%d", eErr, m_iDetectInterval);
 
-	//oiltmp 由于行外pad即将下线,暂时不考虑行外地址探测
+	//oiltmp 鐢变簬琛屽�pad鍗冲皢涓嬬嚎锛屾殏鏃朵笉鑰冭檻琛屽�鍦板潃鎺㈡祴
 	CSimpleStringA csTmpAddr(true);
-	//集中配置探测地址
+	//闆嗕腑閰嶇疆鎺㈡祴鍦板潃
 	pConfigRun->ReadConfigValue("Common", "SettingDetectAddr", csTmpAddr);
 	if (csTmpAddr.IsNullOrEmpty())
 	{
-#ifdef DEVOPS_ON_ST /*DevOps流水线编译,ST环境*/
+#ifdef DEVOPS_ON_ST /*DevOps娴佹按绾跨紪璇戯紝ST鐜��*/
 		strSettingAddr = "https://accessproxy-service.paasst.cmbchina.cn/centerconfig/rvc/detect";
-#elif defined(DEVOPS_ON_PRD)/*DevOps流水线编译,PRD环境*/
+#elif defined(DEVOPS_ON_PRD)/*DevOps娴佹按绾跨紪璇戯紝PRD鐜��*/
 		strSettingAddr = "https://accessproxy-service.paas.cmbchina.cn/centerconfig/rvc/detect";
-#elif defined(DEVOPS_ON_UAT)/*DevOps流水线编译,UAT环境*/
+#elif defined(DEVOPS_ON_UAT)/*DevOps娴佹按绾跨紪璇戯紝UAT鐜��*/
 		strSettingAddr = "https://accessproxy-service.paasuat.cmbchina.cn/centerconfig/rvc/detect";
-#elif defined(DEVOPS_ON_DEV)/*DevOps流水线编译,Dev环境*/
+#elif defined(DEVOPS_ON_DEV)/*DevOps娴佹按绾跨紪璇戯紝Dev鐜��*/
 		strSettingAddr = "https://accessproxy-service.paas.cmbchina.cn/centerconfig/rvc/detect";
-#else/*本地编译等非DevOps环境编译的版本*/
+#else/*鏈�湴缂栬瘧绛夐潪DevOps鐜��缂栬瘧鐨勭増鏈�*/
 		strSettingAddr = "https://accessproxy-service.paasst.cmbchina.cn/centerconfig/rvc/detect";
 #endif
 	}
@@ -1294,18 +1294,18 @@ bool CVtmLoaderFSM::DetectHttpActive()
 		strSettingAddr = csTmpAddr;
 	csTmpAddr = "";
 	pConfigRun->ReadConfigValue("Common", "AccessAuthDetectAddr", strAccessAuthAddr);
-	//准入探测地址
+	//鍑嗗叆鎺㈡祴鍦板潃
 	if (strAccessAuthAddr.IsNullOrEmpty())
 	{
-#ifdef DEVOPS_ON_ST /*DevOps流水线编译,ST环境*/
+#ifdef DEVOPS_ON_ST /*DevOps娴佹按绾跨紪璇戯紝ST鐜��*/
 		strAccessAuthAddr = "https://terminalaccess.paasst.cmbchina.cn/tsas/detect";
-#elif defined(DEVOPS_ON_PRD)/*DevOps流水线编译,PRD环境*/
+#elif defined(DEVOPS_ON_PRD)/*DevOps娴佹按绾跨紪璇戯紝PRD鐜��*/
 		strAccessAuthAddr = "https://accessproxy-service.paas.cmbchina.cn/tsaccess/tsas/detect";
-#elif defined(DEVOPS_ON_UAT)/*DevOps流水线编译,UAT环境*/
+#elif defined(DEVOPS_ON_UAT)/*DevOps娴佹按绾跨紪璇戯紝UAT鐜��*/
 		strAccessAuthAddr = "https://terminalaccess.paasuat.cmbchina.cn/tsas/detect";
-#elif defined(DEVOPS_ON_DEV)/*DevOps流水线编译,Dev环境*/
+#elif defined(DEVOPS_ON_DEV)/*DevOps娴佹按绾跨紪璇戯紝Dev鐜��*/
 		strAccessAuthAddr = "https://terminalaccess.paas.cmbchina.cn/tsas/detect";
-#else/*本地编译等非DevOps环境编译的版本*/
+#else/*鏈�湴缂栬瘧绛夐潪DevOps鐜��缂栬瘧鐨勭増鏈�*/
 		strAccessAuthAddr = "https://terminalaccess.paasst.cmbchina.cn/tsas/detect";
 #endif
 }
@@ -1361,42 +1361,42 @@ bool CVtmLoaderFSM::IsRootINIExist(CSimpleStringA& path)
 }
 bool CVtmLoaderFSM::GetConfig()
 {
-	//拉取配置前先检查root.ini文件
+	//鎷夊彇閰嶇疆鍓嶅厛妫€鏌�oot.ini鏂囦欢
 	CSimpleStringA csTmpRootIni("");
 	if (!IsRootINIExist(csTmpRootIni))
 	{
-		LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("root.ini不存在,请检查(%s)", csTmpRootIni.GetData()).GetData());
+		LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("root.ini涓嶅瓨鍦�紝璇锋�鏌�(%s)", csTmpRootIni.GetData()).GetData());
 		return false;
 	}
 	ErrorCodeEnum eErr = Error_Succeed;
-#ifdef DEVOPS_ON_ST /*DevOps流水线编译,ST环境*/
+#ifdef DEVOPS_ON_ST /*DevOps娴佹按绾跨紪璇戯紝ST鐜��*/
 	CSimpleString channelId = "5fdd82e3b90a4de69f9da4738e5f1216";
 	CSimpleString tokenSecret = "eca829c78067c686561bd844129321c8a78af3";
 	CSimpleString CommonLaunchUrl = "https://rvc-gateway.paasst.cmbchina.cn|https://rvc-gateway-out.paasst.cmbchina.cn";
 	CSimpleString CenterConfigTotal = "https://accessproxy-service.paasst.cmbchina.cn/centerconfig";
 
-#elif defined(DEVOPS_ON_UAT)/*DevOps流水线编译,UAT环境*/
+#elif defined(DEVOPS_ON_UAT)/*DevOps娴佹按绾跨紪璇戯紝UAT鐜��*/
 	CSimpleString channelId = "7eb748cb71744c87b5c126e05af8cce7";
 	CSimpleString tokenSecret = "eca529c78967c640561bd844229391c8a78af3";
 	CSimpleString CommonLaunchUrl = "https://rvc-gateway.paasuat.cmbchina.cn|https://rvc-gateway-out.paasuat.cmbchina.cn";
 	CSimpleString CenterConfigTotal = "https://accessproxy-service.paasuat.cmbchina.cn/centerconfig|https://accessproxy-service.paasuat.cmbchina.cn/centerconfigdmz";
-#elif defined(DEVOPS_ON_PRD)/*DevOps流水线编译,PRD环境*/
+#elif defined(DEVOPS_ON_PRD)/*DevOps娴佹按绾跨紪璇戯紝PRD鐜��*/
 	CSimpleString channelId = "572f7577fa9f425c8475a8d77db4ae31";
 	CSimpleString tokenSecret = "eca129c78767c670561bd844629361c8a78af3";
 	CSimpleString CommonLaunchUrl = "https://rvc-gateway.paas.cmbchina.cn|https://vtmunify.paas.cmbchina.com/gateway";
 	CSimpleString CenterConfigTotal = "https://accessproxy-service.paas.cmbchina.cn/centerconfig|https://vtmunify.paas.cmbchina.com/centerconfig";
-#else/*本地编译等非DevOps环境编译的版本*/
+#else/*鏈�湴缂栬瘧绛夐潪DevOps鐜��缂栬瘧鐨勭増鏈�*/
 	CSimpleString channelId = "5fdd82e3b90a4de69f9da4738e5f1216";
 	CSimpleString tokenSecret = "eca829c78067c686561bd844129321c8a78af3";
 	CSimpleString CommonLaunchUrl = "https://rvc-gateway.paasst.cmbchina.cn";
 	CSimpleString CenterConfigTotal = "https://accessproxy-service.paasst.cmbchina.cn/centerconfig";
 #endif
-	LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "开始拉取配置");
+	LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, "寮€濮嬫媺鍙栭厤缃�");
 	if (Error_Succeed != (eErr = GetEntityBase()->GetFunction()->GetPrivilegeFunction()->InitCfgUrl(channelId, tokenSecret, CommonLaunchUrl, CenterConfigTotal)))
 	{
-		LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("拉取配置,初始化配置地址失败:0x%x(%s)", eErr, SpStrError(eErr)).GetData());
+		LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("鎷夊彇閰嶇疆,鍒濆�鍖栭厤缃�湴鍧€澶辫触:0x%x(%s)", eErr, SpStrError(eErr)).GetData());
 		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode("QLR040210F13").setResultCode("RTA1F01")("Get config,InitCfgUrl failed.");
-		LogEvent(Severity_High, Event_VtmLoader_GetConfig_Fail, "拉取配置,初始化配置地址失败");
+		LogEvent(Severity_High, Event_VtmLoader_GetConfig_Fail, "鎷夊彇閰嶇疆,鍒濆�鍖栭厤缃�湴鍧€澶辫触");
 		return false;
 	}
 	else
@@ -1407,9 +1407,9 @@ bool CVtmLoaderFSM::GetConfig()
 		//if token update failed,we can also update cfg suc
 		if (Error_Succeed != (eErr = GetEntityBase()->GetFunction()->GetPrivilegeFunction()->TryUpdateCfg()))
 		{
-			LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("拉取配置失败:0x%x(%s)", eErr, SpStrError(eErr)).GetData());
+			LogWarn(Severity_High, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("鎷夊彇閰嶇疆澶辫触:0x%x(%s)", eErr, SpStrError(eErr)).GetData());
 			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER).setLogCode("QLR040210F13").setResultCode("RTA1F03")("Get config, TryUpdateCfg failed:0x%x", eErr);
-			LogEvent(Severity_High, Event_VtmLoader_GetConfig_Fail, "拉取配置失败");
+			LogEvent(Severity_High, Event_VtmLoader_GetConfig_Fail, "鎷夊彇閰嶇疆澶辫触");
 			return false;
 		}
 	}
@@ -1418,7 +1418,7 @@ bool CVtmLoaderFSM::GetConfig()
 
 
 
-	//all cfg is ready then init the entity
+	//all cfg is ready锛� then init the entity
 
 	eErr = SubscribeEntitysEvents();
 	if (eErr != Error_Succeed)
@@ -1428,7 +1428,6 @@ bool CVtmLoaderFSM::GetConfig()
 
 	CSmartPointer<IConfigInfo> pConfig;
 	CSimpleString t_endpoint, t_topicSys, t_topicUser, t_topicBeidou, t_bussSys, t_bussUser;
-	bool readSender = false;
 
 	eErr = GetEntityBase()->GetFunction()->OpenConfig(Config_CenterSetting, pConfig);
 	if (eErr == Error_Succeed && Error_Succeed == pConfig->ReadConfigValue("Common", "SendEndpoint", t_endpoint)
@@ -1467,7 +1466,7 @@ bool CVtmLoaderFSM::GetConfig()
 	GetEntityBase()->GetFunction()->GetSystemStaticInfo(m_sysInfo);
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("terminalNo:%s, MachineType:%s, MachineVersion:%s, Site:%s, Screen:%d, EnrolGPS:%f.%f, EnrolAddr:%s"
 		, m_sysInfo.strTerminalID.GetData(), m_sysInfo.strMachineType.GetData(), m_sysInfo.MachineVersion.ToString().GetData()
-		, m_sysInfo.strSite.GetData(), m_sysInfo.eScreen, m_sysInfo.EnrolGPS.GetLatitude(), m_sysInfo.EnrolGPS.GetLongitude(), m_sysInfo.strEnrolAddr);
+		, m_sysInfo.strSite.GetData(), m_sysInfo.eScreen, m_sysInfo.EnrolGPS.GetLatitude(), m_sysInfo.EnrolGPS.GetLongitude(), m_sysInfo.strEnrolAddr.GetData());
 
 	int tmpSec = 0;
 	if (Error_Succeed == pConfig->ReadConfigValueInt(GetEntityBase()->GetEntityName(), "refreshTokenWaitSec", tmpSec) && tmpSec > 0)
@@ -1482,7 +1481,7 @@ bool CVtmLoaderFSM::GetConfig()
 	CloseHandle(CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)& tokenUpdate, this, 0, NULL));
 
 
-	//通知Chromium实体
+	//閫氱煡Chromium瀹炰綋
 	LogEvent(Severity_High, Event_VtmLoader_GetConfig_Suc, "Get config succeed.");
 	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode("QLR040210F13")("Get config succeed.");
 	return true;
@@ -1495,10 +1494,10 @@ ErrorCodeEnum CVtmLoaderFSM::SubscribeEntitysEvents()
 	//auto pFunc = GetEntityBase()->GetFunction();
 	//auto rc = pFunc->SubscribeLog(m_SubLogID2, this, Log_Event, Severity_None, Error_IgnoreAll, -1, "Gpio");
 
-	//// 准入成功事件
+	//// 鍑嗗叆鎴愬姛浜嬩欢
 	//rc = pFunc->SubscribeLog(m_SubLogID3, this, Log_Event, Severity_None, Error_IgnoreAll, 0x50200001, "AccessAuthorization");
 
-	// 业务首页加载事件
+	// 涓氬姟棣栭〉鍔犺浇浜嬩欢
 	//rc = pFunc->SubscribeLog(m_SubLogID3, this, Log_Event, Severity_None, Error_IgnoreAll, LOG_EVT_HEALTH_FIRST_ENTER_MAINPADE, "HealthManager");
 
 	return rc;
@@ -1520,7 +1519,7 @@ int CVtmLoaderFSM::HttpConnCheck(CSimpleStringA csHttAddr, HttpAddrType eType)
 #endif
 		if (!bCheckOK)
 		{
-			LogWarn(Severity_Middle, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("尝试连接总行服务失败(%s),%d 秒后自动重试(第%d次重试)。请确认终端到总行服务网络是否正常", csHttAddr.GetData(), m_iDetectInterval/1000, httpcheckCount).GetData());
+			LogWarn(Severity_Middle, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("灏濊瘯杩炴帴鎬昏�鏈嶅姟澶辫触(%s)锛�%d 绉掑悗鑷�姩閲嶈瘯(绗�%d娆¢噸璇�)銆傝�纭��缁堢�鍒版€昏�鏈嶅姟缃戠粶鏄�惁姝e父", csHttAddr.GetData(), m_iDetectInterval/1000, httpcheckCount).GetData());
 			m_httpCheckResult[eType] = HttpConnResult_Failed;
 			Sleep(m_iDetectInterval);
 			httpcheckCount++;
@@ -1540,10 +1539,10 @@ int CVtmLoaderFSM::HttpConnCheck(CSimpleStringA csHttAddr, HttpAddrType eType)
 			m_httpCheckResult[eType] = HttpConnResult_OK;
 			if ((SP::Module::Comm::RVCGetTickCount() - beginTick) > 3000)
 			{
-				LogWarn(Severity_Low, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("第(%d)次尝试连接总行服务成功(%s),但是网络偏慢,连接花了(%d)秒,请检查网络!"
+				LogWarn(Severity_Low, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("绗�(%d)娆″皾璇曡繛鎺ユ€昏�鏈嶅姟鎴愬姛(%s),浣嗘槸缃戠粶鍋忔參锛岃繛鎺ヨ姳浜�(%d)绉掞紝璇锋�鏌ョ綉缁�!"
 					, httpcheckCount, csHttAddr.GetData(), (SP::Module::Comm::RVCGetTickCount() - beginTick)/1000).GetData());
 			}
-			LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, CSimpleStringA::Format("尝试连接总行服务成功(%s)", csHttAddr.GetData()).GetData());
+			LogWarn(Severity_Low, Error_Succeed, VtmLoader_BootInfoPrint, CSimpleStringA::Format("灏濊瘯杩炴帴鎬昏�鏈嶅姟鎴愬姛(%s)", csHttAddr.GetData()).GetData());
 			return 0;
 		}
 	} 

+ 0 - 4
Module/mod_vtmloader/tokenDefine.h

@@ -1,11 +1,7 @@
 #pragma once
 #include "IHttpFunc.h"
 #include <string>
-#if defined(RVC_OS_WIN)
-#include "json.h"
-#else
 #include "json/json.h"
-#endif
 #include "SpSecureClient.h"
 
 #define TOKEN_GETURL_ERR 0x10A00001