|
@@ -86,7 +86,25 @@ public:
|
|
|
m_fsm.TriggerAtStatusChanged(true);
|
|
|
}
|
|
|
spEntityFunction->RegistSysVarEvent("UIState", this);
|
|
|
- spEntityFunction->RegistSysVarEvent("terminalStage", this);
|
|
|
+
|
|
|
+ CSimpleStringA terminalStage;
|
|
|
+ spEntityFunction->GetSysVar("TerminalStage", terminalStage);
|
|
|
+ if (
|
|
|
+ 0 == CSimpleStringA("C").Compare(terminalStage, true)
|
|
|
+ || 0 == CSimpleStringA("S").Compare(terminalStage, true)
|
|
|
+ || 0 == CSimpleStringA("M").Compare(terminalStage, true)
|
|
|
+ || 0 == CSimpleStringA("A").Compare(terminalStage, true)
|
|
|
+ )
|
|
|
+ {
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Terminal has been lastStage(%s) before ResourceWatcher start.", terminalStage);
|
|
|
+ m_fsm.TriggerProccessUpload();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Terminal is starting, regist the teminalStage Event.");
|
|
|
+ spEntityFunction->RegistSysVarEvent("terminalStage", this);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
CSmartPointer<IConfigInfo> spCtSettingConfig;
|
|
|
GetFunction()->OpenConfig(Config_CenterSetting, spCtSettingConfig);
|
|
@@ -220,13 +238,14 @@ public:
|
|
|
if ((_strnicmp(pszKey, "UIState", strlen("UIState")) == 0)) {
|
|
|
m_fsm.TriggerAtStatusChanged(_strnicmp(pszValue, "M", strlen("M")) == 0);
|
|
|
}
|
|
|
- else if ((_strnicmp(pszKey, "terminalStage", strlen("terminalStage")) == 0)) {
|
|
|
+ else if ((_strnicmp(pszKey, "TerminalStage", strlen("TerminalStage")) == 0)) {
|
|
|
if (0 == CSimpleStringA("C").Compare(pszValue, true)
|
|
|
|| 0 == CSimpleStringA("S").Compare(pszValue, true)
|
|
|
|| 0 == CSimpleStringA("M").Compare(pszValue, true)
|
|
|
|| 0 == CSimpleStringA("A").Compare(pszValue, true)
|
|
|
)
|
|
|
{
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("Status changed, teminalStage = %s.", pszValue);
|
|
|
m_fsm.TriggerProccessUpload();
|
|
|
}
|
|
|
}
|