| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- #pragma once
- #include <cstring>
- typedef bool (*CALLBACKFUNC_EqpmtElcStatus)(void* pOwner, const std::string& strEqpmtStrID );
- typedef void (*CALLBACKFUNC_TurnOffArea)(void* pOwner, int nAreaID, int nStationID, int nMark );
- #include "ElectricEqpmt_ElcTurnOffArea.h"
- #include <map>
- class ElectricEqpmt_ElcTurnOffAreaMng
- {
- public:
- ElectricEqpmt_ElcTurnOffAreaMng();
- ~ElectricEqpmt_ElcTurnOffAreaMng();
- void AddElcTurnOffArea( int nOffArea, int nStationID, const std::string& strEqpmtStrID );
- /*
- 设备区域电力设备失电发生
- */
- void EqpmtOffOccur( const std::string& strEqpmtID );
- /*
- 设备区是否断电
- */
- void TurnOffArea( int nArea );
- /*
- 根据设备ID获取设备关联400V设备区域ID
- */
- int GetAreaID( const string& strEqpmtID );
- public:
- /*
- 总处理模块句柄
- */
- static void* m_pOwner;
- /*
- 回调函数:设备是否带电状态获取
- */
- static CALLBACKFUNC_EqpmtElcStatus m_hCallBackEqpmtElcStatus;
- /*
- 回调函数:设备区断电处理
- */
- static CALLBACKFUNC_TurnOffArea m_hCallBackTurnOffArea;
- static void SetOwner(void* pOwner )
- {
- m_pOwner = pOwner;
- }
- static void SetCallBackEqpmtElcStatus( CALLBACKFUNC_EqpmtElcStatus hCallBackEqpmtElcStatus )
- {
- m_hCallBackEqpmtElcStatus = hCallBackEqpmtElcStatus;
- }
- static void SetCallBackTurnOffArea( CALLBACKFUNC_TurnOffArea hCallBackTurnOffArea )
- {
- m_hCallBackTurnOffArea = hCallBackTurnOffArea;
- }
- public:
- /*
- 停电区域数据
- */
- /*
- 停电区设备编号和区域ID映射关系
- */
- map<string, int > m_mapEqpmtStrIDAndAreaID;
- /*
- 设备停电区数据集合
- */
- map<int, ElectricEqpmt_ElcTurnOffArea > m_mapElcTurnOffArea;
- public:
- //添加电环联合数据信息 xyx新增
- //************************************
- // 函数名称: AddElcToRelaData
- // 函数功能: 添加电环联合数据信息
- // 函数类型: public
- // 返 回 值: void
- // 参数1说明: int StationID 车站ID
- // 参数2说明: int CtrlAreaID 控制区域ID
- // 参数3说明: string ElcEqpmtStrID 设备图元ID
- // 作 者: xyx新增
- // 日 期: 2019/8/29
- // 修改记录:
- //************************************
- void AddElcToRelaData(int StationID,int CtrlAreaID, string ElcEqpmtStrID);
- private:
- int m_nStationID;
- int m_nCtrlAreaID;
- string m_strEqpmtStrID;
- public:
- void SetStationID(int StationID)
- {
- m_nStationID = StationID;
- }
- int GetStationID()
- {
- return m_nStationID;
- }
- void SetCtrlAreaID(int CtrlAreaID)
- {
- m_nCtrlAreaID = CtrlAreaID;
- }
- int GetCtrlAreaID()
- {
- return m_nCtrlAreaID;
- }
- void SetEqpmtStrID(string EqpmtStrID)
- {
- m_strEqpmtStrID = EqpmtStrID;
- }
- string GetEqpmtStrID()
- {
- return m_strEqpmtStrID;
- }
- };
|