修改了次级配电协议,优化消息结构

This commit is contained in:
zjk
2025-05-14 10:02:47 +08:00
parent a0e16ec538
commit 476be20025
43 changed files with 2229 additions and 1226 deletions
+10 -7
View File
@@ -126,6 +126,8 @@ bool PowerManger::Iterate()
AppCastingMOOSApp::Iterate();
// 打印当前状态
// cout << " Current State : " << (int)PowerManagerFsm::current_state_ptr->getCurrentState();
CycleTriggeredEvent cycleEvent;
PowerManagerFsm::dispatch(cycleEvent);
faultLevel = getFaultLevel();
if (m_ticker++ % 5 == 0)
{
@@ -263,14 +265,15 @@ bool PowerManger::writeDataToDB()
int PowerManger::checkError()
{
//TODO:更新协议
//1.检查复合管控器状态
if(m_pmCurrentState.ccustate.fcuGZ_1H != 0 ||
m_pmCurrentState.ccustate.fcuGZ_1L != 0 ||
m_pmCurrentState.ccustate.fcuGZ_2H != 0 ||
m_pmCurrentState.ccustate.fcuGZ_2L != 0 ||
m_pmCurrentState.ccustate.fcuGZ_3H != 0 ||
m_pmCurrentState.ccustate.fcuGZ_3L != 0 ||
m_pmCurrentState.ccustate.insEmergencyStatusWord != 0)
// if(m_pmCurrentState.ccustate.fcuGZ_1H != 0 ||
// m_pmCurrentState.ccustate.fcuGZ_1L != 0 ||
// m_pmCurrentState.ccustate.fcuGZ_2H != 0 ||
// m_pmCurrentState.ccustate.fcuGZ_2L != 0 ||
// m_pmCurrentState.ccustate.fcuGZ_3H != 0 ||
// m_pmCurrentState.ccustate.fcuGZ_3L != 0 ||
// m_pmCurrentState.ccustate.insEmergencyStatusWord != 0)
return 0;
//2.检查断路器状态
}