| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203 |
- #pragma once
- #include "YD_DBOperator.h"
- #include "DateBaseManger.h"
- #include "ElectricEqpmt_Breaker.h"
- #include "ElectricEqpmt_Line_110kV_BusLine.h"
- #include "ElectricEqpmt_Line_110kV_PowerLine_Input.h"
- #include "ElectricEqpmt_Line_35kV_BusLine.h"
- #include "ElectricEqpmt_Line_35kV_PowerLine_Input.h"
- #include "ElectricEqpmt_Line_35kV_PowerLine_Output.h"
- #include "ElectricEqpmt_Line_35kV_PowerLine_Feeder.h"
- #include "ElectricEqpmt_Line_DC_Positive_BusLine.h"
- #include "ElectricEqpmt_Line_DC_Negative_BusLine.h"
- #include "ElectricEqpmt_Line_TouchNet.h"
- #include "ElectricEqpmt_Line_Track.h"
- #include "ElectricEqpmt_Line_DC_PowerLine_Input.h"
- #include "ElectricEqpmt_Line_DC_PowerLine_Feeder.h"
- #include "ElectricEqpmt_Line_DC_ReturnLine.h"
- #include "ElectricEqpmt_Line_400V_BusLine.h"
- #include "ElectricEqpmt_Line_400V_PowerLine_Input.h"
- #include "ElectricEqpmt_Line_400V_PowerLine_Feeder.h"
- #include "ElectricEqpmt_Breaker_110kV_Input.h"
- #include "ElectricEqpmt_Breaker_110kV_Circuit.h"
- #include "ElectricEqpmt_Breaker_35kV.h"
- #include "ElectricEqpmt_Breaker_35kV_Input.h"
- #include "ElectricEqpmt_Breaker_35kV_Output.h"
- #include "ElectricEqpmt_Breaker_35kV_Feeder.h"
- #include "ElectricEqpmt_Breaker_35kV_Circuit.h"
- #include "ElectricEqpmt_Breaker_400V.h"
- #include "ElectricEqpmt_Breaker_400V_Input.h"
- #include "ElectricEqpmt_Breaker_400V_Feeder.h"
- #include "ElectricEqpmt_Breaker_400V_Circuit.h"
- #include "ElectricEqpmt_Breaker_DC.h"
- #include "ElectricEqpmt_Breaker_DC_Input.h"
- #include "ElectricEqpmt_Breaker_DC_Feeder.h"
- #include "ElectricEqpmt_IsolatingSwitch_ThreePosition.h"
- #include "ElectricEqpmt_IsolatingSwitch_Power.h"
- #include "ElectricEqpmt_IsolatingSwitch_Manual.h"
- #include "ElectricEqpmt_OVPD.h"
- #include "ElectricEqpmt_PowerBolt_110kV.h"
- #include "ElectricEqpmt_PowerBolt_35kV.h"
- #include "ElectricEqpmt_PowerBolt_400V.h"
- #include "ElectricEqpmt_Breaker_DC.h"
- #include "ElectricEqpmt_PowerBolt.h"
- #include "ElectricEqpmt_BreakHand.h"
- #include "ElectricEqpmt_IsolatingSwitch_Power.h"
- #include "ElectricEqpmt_Rectifier.h"
- #include "ElectricEqpmt_Line.h"
- #include "ElectricEqpmt_Transformer.h"
- #include "ElectricEqpmt_Transformer_Main.h"
- #include "ElectricEqpmt_Transformer_Power.h"
- #include "ElectricEqpmt_Transformer_Traction.h"
- #include "ElectricEqpmt_IsolatingSwitch_Manual.h"
- #include "ElectricEqpmt_EarthSwitch.h"
- #include "ACSysMG.h"
- #include "DCSysMG.h"
- #include "ElectricEqpmt_TelesignalisationMng.h"
- #include "ElectricEqpmt_ElcTurnOffAreaMng.h"
- #include "ElectricEqpmt_SettingGroup.h"
- #include "ElectricEqpmt_StationThreeLoadCut.h"
- #include "ElectricEqpmt_Station400VLoadMng.h"
- #include "ElectricEqpmt_ControlPermission.h"
- #include "ElectricEqpmt_BreakRailPotential.h"
- #include <string>
- #include <sstream>
- #include <iomanip>
- typedef struct tgSEqpmtDEqpmtID
- {
- string DEqpmtID ;
- string SEqpmtID ;
- }SEqpmtDEqpmtID;
- class ElectricDataBaseManger : public CDateBaseManger //此类的作用,类中各个函数的功能或作用?????
- {
- public:
- ElectricDataBaseManger(void);
- void setDDServerConfig(string configItem, string configValue);
- bool initDDServerConfigInfo();//电调的服务器模块配置 add by yangs
- bool initBaseEqpmtDefineInfo();//基础设备定义信息 add by yangs
- bool SavePowerValue(int trainid,int stationid,string eqpmtid,int datatype,double tvalue);
- bool InitDC_StationInfo(DCSysMG& DcSys);//?此函数的功能和作用?
- bool InitAc_PowerLineInfo(ACSysMG& AcSys);//?此函数的功能和作用?
- bool InitAc_PowerCalNodeInfo(ACSysMG& AcSys);//?此函数的功能和作用?
- bool InitAc_PowerLineSwitch(ACSysMG& AcSys); //读取交流侧支路关联开关编号
- bool GetEqpmt_TouchNet_FromDB(ELEEQPMTMAP* ElectricEqpmtMap,TOUCHNETMAP* TouchNetMap);//?此函数的功能和作用?
- bool GetPowerStationFromDB(ELECSTATIONMAP& stationmap);//?此函数的功能和作用?
- bool GetEqpmt_TouchNet_Track_Relation_FromDB(DCSysMG& DcSys);//?此函数的功能和作用?
- bool GetEqpmt_InPutRelation_FromDB(ELEEQPMTMAP* ElectricEqpmtMap);//?此函数的功能和作用?
- bool GetTrackRelationXDData(TrackRelationXDMAP& trackrelationxdmap); //读取接触轨轨道关系
- bool GetEqpmtsFromDB(ELEEQPMTMAP* ElectricEqpmtMap);
- bool GetEqpmtsBeeLineFromDB(/*_RecordsetPtr r_set,*/ELEEQPMTMAP* ElectricEqpmtMap); //获取直线元件
- bool GetEqpmtsThirdTrackBeeLineFromDB(/*_RecordsetPtr r_set,*/ELEEQPMTMAP* ElectricEqpmtMap); //获取直线元件
- bool GetEqpmtsNotThirdTrackBeeLineFromDB(/*_RecordsetPtr r_set,*/ELEEQPMTMAP* ElectricEqpmtMap); //获取直线元件
- bool GetEqpmtsNotUnionCtrlBeeLineFromDB(/*_RecordsetPtr r_set,*/ELEEQPMTMAP* ElectricEqpmtMap); //获取直线元件
- bool GetEqpmtsUnionCtrlBeeLineFromDB(/*_RecordsetPtr r_set,*/ELEEQPMTMAP* ElectricEqpmtMap); //获取直线元件
- bool GetEqpmtsPicUnitFromDB(/*_RecordsetPtr r_set,*/ELEEQPMTMAP* ElectricEqpmtMap); //获取图元元件
- bool GetEqpmtsProtects(); //保护元件
- bool GetEqpmtsActUnions(); //联控
- bool GetEqpmtsHander(); //手车
- bool GetEqpmtsCtrlType(); //控制类型
- bool GetEqpmtsProtectEqpmts(); //保护关系及其设备信息
- bool GetEqpmtsCtrlUnions(); //联控、联跳
- bool InitLogicRelationData(); //初始化逻辑关系数据
- bool UpdateEqpmtBaseInfo(std::shared_ptr<iDBReadSet> r_set,BaseElectricEqpmt* pUnit);
- bool GetPreEqpmtUnionCtrlMap();
- bool GetRepeatShutData();
- bool GetEqpmtAlarmInfoFromDB(ELCEQPMTALARMINFOMAP* ElcEqpmtAlarmInfoMap); //获取电调系统设备报警点表 xyx新增
- bool GetEqpmt_EarthSwitchRelation_FromDB(ELEEQPMTMAP* ElectricEqpmtMap);//获取接地开关相关元件信息 add by yangs
- //bool GetBreakAutoBolt();
- bool GetErrorToProtectData();
- bool UpdateProtectLockingEqpmt(ELEEQPMTMAP* ElectricEqpmtMap);
- bool UpdateFaultSceneLockingEqpmt(ELEEQPMTMAP* ElectricEqpmtMap);
- bool LoadTelesignalisationData( ElectricEqpmt_TelesignalisationMng& telesignalisationMng, ELEEQPMTMAP* ElectricEqpmtMap );
- bool LoadElcTurnOffAreaData( ELEEQPMTMAP* ElectricEqpmtMap, ElectricEqpmt_ElcTurnOffAreaMng& elcTurnOffAreaMng );
- bool LoadElcEqpmtAutoBoltLogic( ELEEQPMTMAP* ElectricEqpmtMap);
- bool LoadStation400VLoadMng( ElectricEqpmt_Station400VLoadMng* pStation400VLoadMng, ELEEQPMTMAP* ElectricEqpmtMap );
- bool AddProtectingEqpmt(ELEEQPMTMAP* ElectricEqpmtMap); //添加断路器开关所保护的故障设备,xyx
- //获取多组模式信息
- bool GetMultiModeData(MULTIMODEMAP& multimodemap);
- //模式数据加载DD
- bool GetModeInfoData(MODEDATAMAP& modemap,MODEIDDATAMAP& modeidmap );
- //断路器遥测量波动数据
- bool GetEqpmtTelemeteryValue(EQPMTTELEINFO& mapTeleInfo);
- //电环联合数据加载
- bool LoadElcToEnvRelaData(ELEEQPMTMAP* ElectricEqpmtMap, ElectricEqpmt_ElcTurnOffAreaMng& elcTurnOffAreaMng );
- //加载设备与IBP映射数据
- bool GetElectric_EqpmtStatusToIBPLight_FromDB(MapIndex_ElcEqpmtStatusToIBPLight& MIEqpmtStatusToIBPLight);
- //加载设备与IBP映射数据
- bool loadRealEqpmtRelationFromDB(ELEEQPMTMAP* ElectricEqpmtMap);
- typedef std::multimap<string,ProtectValue> ProtectValueMap;
- ProtectValueMap m_ProtectValueMap;
- AutoActUnionMAP m_AutoActUnionMap;
- InPutRelationDataMAP m_HanderRelationDataMap;
- EqpmtCtrlAreaRelationMAP m_EqpmtCtrlAreaRelationMap;
- ProtectEqpmtRelationMAP m_ProtectEqpmtRelationMap;
- ProtectEqpmtTypeMAP m_ProtectEqpmtTypeMap;
- EqpmtCtrlUnionMAP m_EqpmtCtrlUnionMap;
- std::map<string,string> m_PreEqpmtUnionCtrlMap;
- std::map<int,SEqpmtDEqpmtID> m_SEqpmtDEqpmtIDmap;
- std::string Make2IntKey(int param1, int param2) {
- std::stringstream ss;
- ss << std::setw(5) << std::setfill('0') << param1 << "_"
- << std::setw(5) << std::setfill('0') << param2;
- return ss.str();
- }
- void SetEqpmtStartID(int nstartid){m_nEqpmtStartID = nstartid;}
- void SetDataAssociationView(string strAssView){m_strDataAssociationView = strAssView;}
- void SetMainViewID(int nViewID_35kV, int nViewID_1500V, int nViewID_400V) {
- m_nMainViewID_35kV = nViewID_35kV;
- m_nMainViewID_1500V = nViewID_1500V;
- m_nMainViewID_400V = nViewID_400V;
- }
- public:
- ~ElectricDataBaseManger(void);
- protected:
- int m_nMainViewID_35kV;
- int m_nMainViewID_1500V;
- int m_nMainViewID_400V;
- int m_nEqpmtStartID; //设备起始编号
- string m_strDataAssociationView; //数据关联视图
- };
|