|
|
@@ -188,6 +188,8 @@ void CUpgradeMgrEntity::OnStarted()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ GetFunction()->SubscribeLog(m_uuidHeartBeat, this, Log_Event, Severity_Middle, Error_IgnoreAll, -1, "HeartBeat", false);
|
|
|
+
|
|
|
//启动灰度控制判断,看启动什么状态机
|
|
|
Task::InitFSMTask* task = new Task::InitFSMTask(this);
|
|
|
rc = this->GetFunction()->PostThreadPoolTask(task);
|
|
|
@@ -233,6 +235,22 @@ void CUpgradeMgrEntity::OnSysVarEvent(const char *pszKey, const char *pszValue,c
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+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)
|
|
|
+{
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("user code:%x,from entity:%s", dwUserCode, pszEntityName);
|
|
|
+ switch (dwUserCode) {
|
|
|
+
|
|
|
+ case LOG_EVT_INC_VERSION_ROLLBACK:
|
|
|
+ {
|
|
|
+ DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("receive heartBeat instruction version to be rollback to %s", pszMessage);
|
|
|
+ CSimpleStringA rollbackStr = pszMessage;
|
|
|
+ this->RollbackUpdate(rollbackStr);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ return;
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
char CUpgradeMgrEntity::GetInstallStateVal(const InstallStateEnum enumVal)
|
|
|
{
|
|
|
@@ -413,6 +431,7 @@ ErrorCodeEnum CUpgradeMgrEntity::testActive()
|
|
|
|
|
|
}
|
|
|
|
|
|
+
|
|
|
ErrorCodeEnum CUpgradeMgrEntity::NewStopMediaPlay()
|
|
|
{
|
|
|
#ifdef RVC_OS_WIN
|
|
|
@@ -498,3 +517,4 @@ void CUpgradeMgrEntity::HttpsLogCallBack(const char* logtxt)
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|