增加了配电控制器操作代码
This commit is contained in:
@@ -74,11 +74,10 @@ class PowerManger : public AppCastingMOOSApp
|
||||
|
||||
//通信相关
|
||||
XPCUdpSocket* setUdpScoket(long lPort);
|
||||
bool disSystemOperation(disBreaker optBreaker, disBreakerOpt);
|
||||
bool buildPowerSysReport();
|
||||
|
||||
protected: // app variables
|
||||
//系统状态
|
||||
//系统运行状态
|
||||
unsigned char workCondition;
|
||||
unsigned char currentMod;
|
||||
unsigned char powerState;
|
||||
@@ -86,16 +85,25 @@ class PowerManger : public AppCastingMOOSApp
|
||||
vector<unsigned int> faultCode;
|
||||
unsigned int soc;
|
||||
unsigned int sustainableTime;
|
||||
pmState m_pmCurrentState;
|
||||
bool m_connected;
|
||||
// 当前传输状态
|
||||
pmState m_pmCurrentState; //能源系统的当前状态
|
||||
//配电系统状态
|
||||
disSysBreakerList m_currentDisBreakerState;
|
||||
disSysBreakerList m_targetDisBreakerState;
|
||||
|
||||
// 配电和CCU的反馈状态
|
||||
msg_CcuStateFbMsg m_CcuCurrentState;
|
||||
msg_disHighVolBusFbMsg m_disHighVolBusCurrentState;
|
||||
msg_disHighAVolBusFbMsg m_disHighAVolBusCurrentState;
|
||||
msg_disHighBVolBusFbMsg m_disHighBVolBusCurrentState;
|
||||
msg_disLowBusFbMsg m_disLowBusState;
|
||||
|
||||
private: // Configuration variables
|
||||
|
||||
//操作函数
|
||||
void disSysOption();
|
||||
char getBreakerOption(char cmd);
|
||||
void initTargetDisBreakerState();
|
||||
|
||||
private:
|
||||
udpComm m_udpComm;
|
||||
XPCUdpSocket *m_pCcuUdpComm;
|
||||
CMOOSThread m_ListenThread;
|
||||
@@ -114,7 +122,6 @@ class PowerManger : public AppCastingMOOSApp
|
||||
private: //
|
||||
bool inline saveStringToJsonFile(const string &strJson, const string &strFileName);
|
||||
|
||||
|
||||
public: //状态实现
|
||||
void printState(FSM_State st, string desp);
|
||||
bool FSM_RUN_IS_OK = true;
|
||||
@@ -133,6 +140,10 @@ class PowerManger : public AppCastingMOOSApp
|
||||
FSM_State m_Inite_s1;
|
||||
static int handleInite_s1(FSM_State &fsm, void* pData);
|
||||
|
||||
//待机状态
|
||||
FSM_State m_Standby_s2;
|
||||
static int handleStandby_s2(FSM_State &fsm, void* pData);
|
||||
|
||||
//故障处理
|
||||
FSM_State m_Fault_s99;
|
||||
static int handleFault_s99(FSM_State &fsm, void* pData);
|
||||
|
||||
Reference in New Issue
Block a user