|
@@ -765,6 +765,44 @@ unsigned int CVtmLoaderFSM::s5_on_event(FSMEvent* pEvt)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+void CVtmLoaderFSM::LoadNetworkCheckURLConfig()
|
|
|
+{
|
|
|
+ CSmartPointer<IConfigInfo> spConfigCen;
|
|
|
+ CSimpleStringA strValue(true);
|
|
|
+ GetEntityBase()->GetFunction()->OpenConfig(Config_CenterSetting, spConfigCen);
|
|
|
+ int internetOrNot(0);
|
|
|
+ spConfigCen->ReadConfigValueInt("Common", "InternetEnv", internetOrNot);
|
|
|
+ spConfigCen->ReadConfigValue("Common", "CheckURL", strValue);
|
|
|
+ if (!strValue.IsNullOrEmpty()) {
|
|
|
+ m_strNetworkCheckUrl = strValue;
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Read check url from CS: %s", m_strNetworkCheckUrl.GetData());
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ CSmartPointer<IConfigInfo> spConfigShell;
|
|
|
+ GetEntityBase()->GetFunction()->OpenConfig(Config_Shell, spConfigShell);
|
|
|
+ CSimpleStringA strURLSection = "URL";
|
|
|
+#ifdef DEVOPS_ON_ST /*DevOps流水线编译,ST环境*/
|
|
|
+ strURLSection = "URL-ST";
|
|
|
+#elif defined(DEVOPS_ON_PRD)/*DevOps流水线编译,PRD环境*/
|
|
|
+ //strURLSection = "URL-PRD";
|
|
|
+ if (1 == internetOrNot) {
|
|
|
+ strURLSection = "URL-Internet";
|
|
|
+ }
|
|
|
+#elif defined(DEVOPS_ON_UAT)/*DevOps流水线编译,UAT环境*/
|
|
|
+ strURLSection = "URL-UAT";
|
|
|
+#elif defined(DEVOPS_ON_DEV)/*DevOps流水线编译,Dev环境*/
|
|
|
+ strURLSection = "URL-Dev";
|
|
|
+#else/*本地编译等非DevOps环境编译的版本*/
|
|
|
+ strURLSection = "URL-Dev";
|
|
|
+#endif
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Section [%s]", strURLSection.GetData());
|
|
|
+ spConfigShell->ReadConfigValue("NetworkCheck", strURLSection, strValue);
|
|
|
+ if (!strValue.IsNullOrEmpty()) {
|
|
|
+ m_strNetworkCheckUrl = strValue;
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Read check url from local shell %s=%s", strURLSection.GetData(), m_strNetworkCheckUrl.GetData());
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
BOOL CVtmLoaderFSM::DetectNetworkLegality(CSimpleStringA& strInfo)
|
|
|
{
|
|
@@ -926,8 +964,7 @@ int CVtmLoaderFSM::EntityLoad()
|
|
|
arrEntity = arrCoreBoot[i].Split('=');
|
|
|
if (arrEntity.GetCount() <= 0)
|
|
|
break;
|
|
|
- if (arrEntity[0].Compare("VtmLoader", true) == 0 || arrEntity[0].Compare("Chromium", true) == 0
|
|
|
- || arrEntity[0].Compare("GuiConsole", true) == 0)
|
|
|
+ if (arrEntity[0].Compare("VtmLoader", true) == 0 || arrEntity[0].Compare("Chromium", true) == 0)
|
|
|
continue;
|
|
|
m_vCoreBoot.push_back(arrEntity[0]);
|
|
|
if (arrEntity[1].Compare("1") == 0)
|
|
@@ -950,8 +987,7 @@ int CVtmLoaderFSM::EntityLoad()
|
|
|
arrEntity = arrSafeLoad[i].Split('=');
|
|
|
if (arrEntity.GetCount() <= 0)
|
|
|
break;
|
|
|
- if (arrEntity[0].Compare("VtmLoader", true) == 0 || arrEntity[0].Compare("Chromium", true) == 0
|
|
|
- || arrEntity[0].Compare("GuiConsole", true) == 0)
|
|
|
+ if (arrEntity[0].Compare("VtmLoader", true) == 0 || arrEntity[0].Compare("Chromium", true) == 0)
|
|
|
continue;
|
|
|
//去重,防止前面已经加载了
|
|
|
if (find(m_vCoreBoot.begin(), m_vCoreBoot.end(), arrEntity[0].GetData()) != m_vCoreBoot.end())
|
|
@@ -977,8 +1013,7 @@ int CVtmLoaderFSM::EntityLoad()
|
|
|
arrEntity = arrOperating[i].Split('=');
|
|
|
if (arrEntity.GetCount() <= 0)
|
|
|
break;
|
|
|
- if (arrEntity[0].Compare("VtmLoader", true) == 0 || arrEntity[0].Compare("Chromium", true) == 0
|
|
|
- || arrEntity[0].Compare("GuiConsole", true) == 0)
|
|
|
+ if (arrEntity[0].Compare("VtmLoader", true) == 0 || arrEntity[0].Compare("Chromium", true) == 0)
|
|
|
continue;
|
|
|
//去重,防止前面已经加载了
|
|
|
if (find(m_vCoreBoot.begin(), m_vCoreBoot.end(), arrEntity[0].GetData()) != m_vCoreBoot.end()
|
|
@@ -1389,6 +1424,7 @@ bool CVtmLoaderFSM::GetCenterSetting()
|
|
|
GetEntityBase()->GetFunction()->GetPrivilegeFunction()->BeginLogSend(default_endpoint, topicSys, topicUser, topicBeidou, topicBussSys, topicBussUser);
|
|
|
}
|
|
|
|
|
|
+ CSystemStaticInfo m_sysInfo;
|
|
|
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()
|
|
@@ -1443,9 +1479,9 @@ int CVtmLoaderFSM::HttpConnCheck(CSimpleStringA csHttAddr, HttpAddrType eType)
|
|
|
if (SP::Module::Net::GetINETMacAddresses(interNames, macAddrs, ipAddrs) == Error_Succeed)
|
|
|
{
|
|
|
for (int i = 0; i < min(ipAddrs.GetCount(),macAddrs.GetCount()); i++) {
|
|
|
- LogWarn(Severity_Middle, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("interface(%d):%s", i, interNames[i].GetData()));
|
|
|
- LogWarn(Severity_Middle, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("ip(%d):%s", i, ipAddrs[i].GetData()));
|
|
|
- LogWarn(Severity_Middle, Error_Unexpect, VtmLoader_BootInfoPrint, CSimpleStringA::Format("mac(%d):%s", i, macAddrs[i].GetData()));
|
|
|
+ GetEntityBase()->GetFunction()->ShowStartupInfo(CSimpleStringA::Format("interface(%d):%s", i, interNames[i].GetData()));
|
|
|
+ GetEntityBase()->GetFunction()->ShowStartupInfo(CSimpleStringA::Format("ip(%d):%s", i, ipAddrs[i].GetData()));
|
|
|
+ GetEntityBase()->GetFunction()->ShowStartupInfo(CSimpleStringA::Format("mac(%d):%s", i, macAddrs[i].GetData()));
|
|
|
}
|
|
|
}
|
|
|
}
|