|
@@ -235,25 +235,6 @@ void CUpgradeMgrEntity::OnStarted()
|
|
|
|
|
|
}
|
|
|
|
|
|
- if (pFunc->GetSysVar("RunState", strValue) == Error_Succeed && strValue.Compare("N") ==0)
|
|
|
- {
|
|
|
- // 已经进入终端启动成功状态
|
|
|
- DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("====framework is start up 1====");
|
|
|
- m_bSystemStartUp =true;
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- // 否则启动监控RunState
|
|
|
- rc= pFunc->RegistSysVarEvent("RunState", this);
|
|
|
- if (rc != Error_Succeed)
|
|
|
- {
|
|
|
- LogWarn(Severity_Middle, rc, ERR_WRAN_REGIST_SYS_VAR_FAIL, CSimpleStringA::Format("RegistSysVarEvent RunState is fail,%d",(int)rc).GetData());
|
|
|
- m_testResult=Error_InvalidState;//自检失败
|
|
|
- }else{
|
|
|
- DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("RegistSysVarEvent RunState succ");
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
GetFunction()->SubscribeLog(m_uuidHeartBeat, this, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "HeartBeat", false);
|
|
|
|
|
|
//启动灰度控制判断,看启动什么状态机
|
|
@@ -291,14 +272,6 @@ void CUpgradeMgrEntity::OnSysVarEvent(const char *pszKey, const char *pszValue,c
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if(strcmp("RunState",pszKey)==0){
|
|
|
- if(!m_bSystemStartUp){
|
|
|
- if (strcmp(pszValue, "N") ==0){
|
|
|
- DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("====framework is start up 2====");
|
|
|
- m_bSystemStartUp = true;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
void CUpgradeMgrEntity::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 CAutoArray<DWORD>& Param, const char* pszEntityName, const char* pszModuleName, const char* pszMessage, const linkContext& pLinkInfo)
|