ElectricBaseDefine.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  1. #ifndef OCC_ELECTRICBASEDEFINE_HEADER_FILE
  2. #define OCC_ELECTRICBASEDEFINE_HEADER_FILE
  3. #include <map>
  4. #include <vector>
  5. using namespace std;
  6. //故障状态
  7. #define POWER_ERORR_OCCAR 12500 //故障发生
  8. #define POWER_ERORR_REVERT 12501 //故障恢复
  9. #define Electric_Eqpmt_Status_OFF 0 //设备开关分闸
  10. #define Electric_Eqpmt_Status_ON 1 //合闸
  11. #define Electric_Eqpmt_Status_Error -1 //故障
  12. //手车工作位置
  13. #define OCC_BREAKERHAND_STATUS_WORK 1 //手车工作位
  14. #define OCC_BREAKERHAND_STATUS_TEST 2 //手车试验位
  15. #define OCC_BREAKERHAND_STATUS_REPAIR 3 //手车检修位
  16. //设备控制闭锁
  17. #define Electric_Eqpmt_Status_Lock 1 //设备状态锁 added by zhangjh
  18. #define Electric_Eqpmt_Status_UnLock 0 //解锁 added by zhangjh
  19. //设备遥信闭锁
  20. #define Electric_Eqpmt_Status_RemoteLock 1 //遥信封锁 added by zhangjh
  21. #define Electric_Eqpmt_Status_RemoteUnLock 0 //遥信解锁 added by zhangjh
  22. //设备控制方式
  23. #define Electric_Eqpmt_CtrlType_Mannual 1 //设备控制方式:人工控制 added by zhangjh
  24. #define Electric_Eqpmt_CtrlType_Auto 0 //设备控制方式:自动控制 added by zhangjh
  25. #define Power_Breaker_ProtectValue_UnionBreak 1505 //保护联跳
  26. #define Power_Breaker_ProtectValue_UnionCtrl 1506 //联控
  27. #define Electric_Fault_Status_Start 126000 //故障开始
  28. #define Power_Command_Own 500006 //自定义消息
  29. #define POWER_EQPMT_INIT 14999 //设备初始化
  30. #define POWER_EQPMT_OPERNO 15000 //设备操作(核实)
  31. #define POWER_EQPMT_OPERCHECK 15001 //设备操作前的检查
  32. #define Power_SwitchOper_Ret 11005 //设备开关控制的重置
  33. #define Power_Alarm_Notice 11006 //报警通知
  34. #define Power_Deal_DelayTime 11007 //延时处理
  35. #define Power_Protect_Notice 11008 //保护通知
  36. #define Power_HD_Fault 11010 //环调故障
  37. #define Power_400V_ThreeLoadCut 11011 //三级负荷自切
  38. #define Power_EQPMT_TELEMETERYVALUE 11012 //设置电压电流遥测值
  39. #define POWER_STATIONCOMMUNICATION_SET 11013 //设置车站通信故障
  40. #define POWER_STATIONCONTROL_SWICTH 11014 //设置车站权限转换
  41. #define Elect_Eqpmt_FixedValueArea 11015 //设备定值区切换
  42. #define Elect_Eqpmt_Init 11009 //初始化设备信息
  43. #define Protect_Status_ON 0 //保护状态开
  44. #define Protect_Status_OFF 1 //保护状态关
  45. #define Protect_Kind_Main 1 //主保护类型
  46. #define Protect_Kind_BGK 2 //后备保护类型
  47. #define Protect_MAX_DELAY 1000 //最大延时
  48. #define Auto_RepeatShut_Status_NONE 50000 //重合闸最开始状态
  49. #define Auto_RepeatShut_Status_START 50001 //开启
  50. #define Auto_RepeatShut_Status_WAIT 50002 ///等待
  51. #define Auto_RepeatShut_Status_SHUT 50003 //合闸
  52. #define Auto_RepeatShut_Status_JUDGE 50004 //判断
  53. #define Auto_RepeatShut_Status_BREAK 50005 //断开
  54. #define Auto_RepeatShut_Status_Lock 50006 //锁闭
  55. #define Auto_RepeatShut_Status_SUCCESS 50007 //成功
  56. #define Auto_DelayTime_RepeatShut 30000 //延时:重合闸
  57. #define Auto_DelayTime_AutoBolt 30001 //自投
  58. #define Auto_DelayTime_InitCtrl 30002 //初始化控制
  59. #define Auto_DelayTime_CtrlExecution 30003 //控制执行
  60. #define Auto_AutoBoltDelay_DurTime 5 //备自投延时时间400V5秒(注:青岛=5s,贵阳=1s)
  61. #define Auto_AutoBoltDelay_DurTime_35kv 3 //备自投延时时间35kV5秒(注:青岛=5s,贵阳=1s)
  62. #define Auto_RepeatShut_Dur_Time 3 //重合闸间隔时间
  63. #define Auto_RepeatShut_All_Time 35 //所有的时间
  64. #define Auto_CtrlExecution_Time 5 //设备动作延时的时间
  65. //备自投工作方式
  66. #define AutoBolt_CtrlMode_Auto_Auto 30 //自投自复
  67. #define AutoBolt_CtrlMode_Auto_Manual 31 //自投手复
  68. #define AutoBolt_CtrlMode_Manual_Manual 32 //手投手复
  69. #define AutoBolt_CtrlMode_Manual_Auto 33 //手投自复
  70. #define ShieldStatus_Set 60 //设置屏蔽
  71. #define ShieldStatus_Cancle 61 //取消屏蔽
  72. #define RemoteShut 70 //远方投入投退
  73. //遥信封锁
  74. #define RemoteLock_Set 62//遥信封锁
  75. #define RemoteLock_Cancle 63//遥信解锁
  76. //遥信封锁类型
  77. #define RemoteLockType_No 0 //遥信解锁 add by zhangjh
  78. #define RemoteLockType_Off 1 //遥信封锁分 add by zhangjh
  79. #define RemoteLockType_On 2 //遥信封锁合 add by zhangjh
  80. #define RemoteLockType_Local 3 //遥信封锁就地 add by zhangjh
  81. #define RemoteLockType_Test 4 //手车遥信封锁试验 add by zhangjh
  82. #define RemoteLockType_Work 5 //手车遥信封锁工作 add by zhangjh
  83. #define ControlPermissionChange 65//控制权限切换
  84. //设备控制区域
  85. #define ELC_EQPMTCTRL_LOCAL 6602 //就地控制
  86. #define ELC_EQPMTCTRL_REMOTE 6603 //远程控制
  87. #define ELC_EQPMTCTRL_UNKNOW 6604 //控制区域未知
  88. //设备控制方式
  89. #define ELC_EQPMTCTRLTYPE_AUTO 0 //自动控制
  90. #define ELC_EQPMTCTRLTYPE_MANUAL 1 //人工控制
  91. #define Fault_Type_Fever 1 //永久故障
  92. #define Fault_Type_OneTime 2 //临时故障
  93. #define Eqpmt_Operation_OFF 0 //操作 关
  94. #define Eqpmt_Operation_ON 1 // 开
  95. #define Eqpmt_Operation_Lock 3 //锁
  96. #define Eqpmt_Operation_Unlock 4 //解锁
  97. #define Power_Alarm_Breaker_Break 5000003 //断路器跳闸
  98. #define Power_Alarm_Breaker_Shut 5000004 //断路器合闸
  99. #define Power_Alarm_Breaker_Reject 5000005 //断路器拒动
  100. #define Power_Alarm_AutoBolt_Dive 5000006 //备自投 投入
  101. #define Electric_EqpmtType_Line 1004 //线
  102. #define Electric_EqpmtType_Transformer 1007 //变压器
  103. #define Electric_EqpmtType_EarthSwitch 1008 //接地开关
  104. #define Electric_EqpmtType_ManualSwitch 1009 //手动开关
  105. #define Electric_EqpmtType_PowerSource 1011 //电源
  106. #define Electric_EqpmtType_CommunicateDevice 1012 //通信设备
  107. #define Power_TouchNet_ShortCut_Fault 110000 //接触网短路故障
  108. #define Power_Reverse_ShortCut_Fault 110001 //短路故障恢复
  109. #define Power_Breaker_RepeatShut_Fault 110002 //断路器重合闸故障
  110. #define Power_Breaker_UnionBreak_Fault 110003 //断路器联跳故障
  111. #define Power_TouchNet_ShortCut_Revert 120000 //接触网 短路恢复
  112. #define Power_Reverse_ShortCut_Revert 120001 //
  113. #define Power_TouchNet_Power_Lost 120002 //接触网失电
  114. #define Power_TouchNet_Power_Come 120003 //接触网来电
  115. #define Power_Breaker_ProtectReset 10000 //保护复归
  116. #define Power_Breaker_ProtectAllReset 10001 //保护总复归
  117. #define Power_AutoBolt_Auto_Auto 130001 //备自投自投自复
  118. #define Power_AutoBolt_Auto_Manual 130002 //备自投自投手复
  119. #define Power_AutoBolt_Manual_Auto 130003 //备自投手投自复
  120. #define Power_AutoBolt_Manual_Manual 130004 //备自投手投手复
  121. //输电线路线路子类型 added by zhangjiahua
  122. #define Electric_PowerLine_Input 1 //进线
  123. #define Electric_PowerLine_Output 2 //出线
  124. #define Electric_PowerLine_Feeder 3 //馈线
  125. #define Electric_PowerLine_Contact 4 //联络线
  126. #define Electric_PowerLine_OnTouch 5 //上网线
  127. #define Electric_PowerLine_OnTouch_L 21 //1500V左邻馈出线
  128. #define Electric_PowerLine_OnTouch_R 22 //1500V右邻馈出线
  129. //断路器子类型
  130. #define Electric_Breaker_Input 1 //进线断路器
  131. #define Electric_Breaker_Output 2 //出线断路器
  132. #define Electric_Breaker_Feeder 3 //馈线断路器
  133. #define Electric_Breaker_Circuit 4 //母联断路器
  134. //备自投子类型
  135. #define Electric_AutoBolt_35kV 1 //35kv备自投
  136. #define Electric_AutoBolt_110kV 2 //110kv备自投
  137. #define Electric_AutoBolt_400V 3 //400v备自投
  138. //设备区分类型
  139. #define Electric_EqpmentType_Breaker 1 //断路器设备
  140. //设备类型分类
  141. #define OCC_GRAPHUNIT_TYPE_PIC 500 //图片图元
  142. #define OCC_GRAPHUNIT_TYPE_LINE 501 //线图元
  143. #define Power_Mode_Control 140000 //模式执行
  144. //教员课程事件定义 xyx新增
  145. #define JY_CourseEventOccur 20000 //教员课程事件触发
  146. #define JY_CourseEventType_DD 11 //教员课程事件类型-电调-11
  147. #define JY_CourseEventsubType1_DD_Normal 1 //事件子类型1-基本事件-1
  148. #define JY_CourseEventsubType1_DD_Fault 2 //事件子类型1-故障事件-2
  149. //电环联合车站内控制区域定义 xyx新增
  150. #define ElcToEnv_CtrlArea_Level_1 1 //第一层:I、II母线控制区
  151. #define ElcToEnv_CtrlArea_Level_2 2 //第二层:三级负荷控制区
  152. #define ElcToEnv_CtrlArea_Level_n 3 //第三层:预留其他区域分类
  153. //模式执行状态 added by zhangjiahua
  154. #define MODECTRL_STATUS_START 25002
  155. #define MODECTRL_STATUS_RUNING 25003
  156. #define MODECTRL_STATUS_STOP 25004
  157. #define MODECTRL_STATUS_FINISH 25005
  158. #define MODECTRL_STATUS_PAUSE 25006
  159. #define MODECTRL_STATUS_RESUME 25007
  160. // IBP事件类型
  161. #define Electric_IBPEvent_DCBreakerCtrl 1809001 //直流断路器控制
  162. //IBP盘数据定义
  163. struct CElcEqpmtStatusToIBPLight
  164. {
  165. string m_strEqpmtID; //设备编号
  166. int m_nEqpmtStatus; //设备状态
  167. string m_strStatusName; //状态名称
  168. string m_strLightenIBPKey; //亮灯系列
  169. string m_strLightingOffIBPkey;//灭灯系列
  170. int m_nIBPSysID;//IBP系统号
  171. int m_nEventEqpmtID;//设备事件:设备编号
  172. int m_nEventID; //设备事件:事件编号
  173. /*
  174. IBP车站号
  175. */
  176. int m_nIBPStationID;
  177. CElcEqpmtStatusToIBPLight()
  178. {
  179. m_strEqpmtID = "";
  180. m_nEqpmtStatus = -1;
  181. m_strStatusName = "";
  182. m_strLightenIBPKey = "";
  183. m_strLightingOffIBPkey = "";
  184. m_nIBPSysID = -1;
  185. m_nEventEqpmtID = -1;
  186. m_nEventID = -1;
  187. m_nIBPStationID=-1;
  188. }
  189. };
  190. typedef std::map<string,CElcEqpmtStatusToIBPLight> MapIndex_ElcEqpmtStatusToIBPLight;
  191. struct ErrorToProtect
  192. {
  193. ErrorToProtect()
  194. {
  195. nErrorID = 0;
  196. bSelfLost = false;
  197. strFaultName = "";
  198. vecProtectClass.clear();
  199. }
  200. // 故障与保护类型对应关系
  201. int nErrorID;
  202. bool bSelfLost; // 故障本身设备是否失电
  203. string strFaultName;
  204. int nErrorType; //1:永久故障 2:关联断路器 无法复归故障(长沙用) //add by chenht 2021-09-17
  205. vector<int> vecProtectClass;
  206. void AddProtectClass( int nProtectID )
  207. {
  208. vecProtectClass.push_back(nProtectID);
  209. }
  210. void Clear()
  211. {
  212. vecProtectClass.clear();
  213. }
  214. void SelfLost( bool bLost )
  215. {
  216. bSelfLost = bLost;
  217. }
  218. };
  219. typedef map<int,ErrorToProtect> ErrorToProtectMAP;
  220. struct ProtectValue //电力值
  221. {
  222. int pretectid; //保护ID
  223. int faultid; //故障ID
  224. int faulttype; //故障类型
  225. int PRI; //PRI
  226. int delaytime; //延时
  227. int kind; //类型
  228. string strname; //名称
  229. int status; //状态
  230. string strfaultname; //故障名称
  231. int breakerRejection; // 断路器失灵拒动
  232. string protectDisplayContent; // 保护报文
  233. string trippingDisplayContent; // 联跳报文
  234. int trippingRepeatShut; // 联跳重合闸标识
  235. int nPermanentFault; //永久故障标志 1:永久故障 0:临时故障
  236. };
  237. struct InputLineInfo //输入线信息
  238. {
  239. string ID; //输入ID
  240. bool InputPower; //是否输入电
  241. };
  242. struct ElcEnvirPowerRelation //电环关系
  243. {
  244. int ElcEqpmtID; //设备ID
  245. int EnvirAreaID; //环控区域ID
  246. string Areaname; //区域名称
  247. };
  248. struct ErrorInfo //故障信息
  249. {
  250. int ID; //故障ID
  251. int Status; //故障状态
  252. };
  253. struct DelayTimeInfo //延时信息
  254. {
  255. int type; //延时类型
  256. int delaydur; ///延时
  257. int64_t occartime; //发生时间
  258. string srcid; //原ID
  259. int srcstatus; //原状态
  260. string desid; //目的ID
  261. int destatus; //目的状态
  262. int faultID; //故障ID
  263. int faultType; // 故障类型:永久故障/临时故障
  264. };
  265. struct UionCtrl // 联控类
  266. {
  267. string Sourceid; //源ID
  268. int OperStatus; //操作状态
  269. string PreEqpmtID; //先前设备ID
  270. int PreStatus; //前一状态
  271. int Relation; //关系
  272. int EventID; //故障ID
  273. int delaytime; //延时
  274. string strText; //文本描述
  275. int Index; //编号 added by zhangjiahua
  276. };
  277. struct FaultSceneCtrl // 故障场景控制
  278. {
  279. string Sourceid; //源ID
  280. string PreEqpmtID; //先前设备ID
  281. int EventID; //故障ID
  282. };
  283. struct ProtectCtrl
  284. {
  285. string ProtectStrID;
  286. int EventID;
  287. };
  288. struct BreakerDelayTime
  289. {
  290. int EqpmtType;
  291. map<int, int> IndexDelayTime;
  292. int OneTime;
  293. void AddIndexDelayTime( int nIndex, int nTime )
  294. {
  295. IndexDelayTime.insert( make_pair(nIndex, nTime) );
  296. }
  297. int GetOneTime()
  298. {
  299. return OneTime;
  300. }
  301. int GetAllTime()
  302. {
  303. int nRet = 0;
  304. for ( map<int, int>::iterator iter = IndexDelayTime.begin(); iter != IndexDelayTime.end(); iter++ )
  305. {
  306. nRet += iter->second;
  307. }
  308. return nRet;
  309. }
  310. int GetDelayTime( int nIndex )
  311. {
  312. int nRet = 0;
  313. map<int, int>::iterator iter = IndexDelayTime.find(nIndex);
  314. if ( iter != IndexDelayTime.end() )
  315. {
  316. nRet = iter->second;
  317. }
  318. return nRet;
  319. }
  320. int GetCount()
  321. {
  322. return IndexDelayTime.size();
  323. }
  324. };
  325. enum StationType
  326. {
  327. StationType_NULL = -1, //车站类型为未知
  328. StationType_CenterControlStation = 0, //车站类型为控制中心
  329. StationType_JYSubStation=1, //车站类型为降压所
  330. StationType_QYSubStation=2, //车站类型为牵混所
  331. StationType_MainSubStation=3 //车站类型为主所
  332. };
  333. struct PowerStationInfo //车站相关信息
  334. {
  335. int stationID; //车站ID
  336. std::string strstationname; //车站名称
  337. int nextstationid; //下一个车站ID
  338. int stationType;
  339. int ctrlarea; //控制权限 车站/中心
  340. };
  341. typedef map<string,DelayTimeInfo> DELAYMAP; //延时相关信息列表
  342. typedef map<int,PowerStationInfo> ELECSTATIONMAP; //车站相关信息列表
  343. typedef struct AutoActUnion
  344. {
  345. string m_SEqpmtID;
  346. string m_DEqpmtID;
  347. int m_Sstatus;
  348. int m_Dstatus;
  349. int m_EventID;
  350. int m_Flag;
  351. //tgAutoActUnion()
  352. //{
  353. //}
  354. }/*AutoActUnion,*LPAutoActUnion*/;
  355. typedef std::multimap<string,AutoActUnion> AutoActUnionMAP;
  356. typedef struct InPutRelationData
  357. {
  358. string m_StrID;
  359. string m_InputEqpmtStrID;
  360. int m_RunLineID;
  361. int m_Relation;
  362. }/*InPutRelationData,*LPInPutRelationData*/;
  363. typedef std::map<string,InPutRelationData> InPutRelationDataMAP;
  364. typedef struct tgEqpmtCtrlArea
  365. {
  366. string m_EqpmtStrID;
  367. int m_CtrlArea;
  368. }EqpmtCtrlArea,*LPEqpmtCtrlArea;
  369. typedef std::multimap<string,EqpmtCtrlArea*> EqpmtCtrlAreaMAP;
  370. typedef std::multimap<string,int> EqpmtCtrlAreaRelationMAP;
  371. /*typedef std::map<string,string> ProtectEqpmtRelationMAP;*/
  372. typedef std::multimap<string,ProtectCtrl> ProtectEqpmtRelationMAP;
  373. typedef std::multimap<string,int> ProtectEqpmtTypeMAP;
  374. typedef struct EqpmtCtrlUnion
  375. {
  376. string m_OperEqpmtID;
  377. int m_OpeStatus;
  378. string m_PreEqpmtID;
  379. int m_PreStatus;
  380. int m_Relation;
  381. int m_DelayTime;
  382. int m_Index;
  383. }/*EqpmtCtrlUnion,*LPEqpmtCtrlUnion*/;
  384. typedef std::multimap<string,EqpmtCtrlUnion> EqpmtCtrlUnionMAP;
  385. typedef struct BreakAutoBolt
  386. {
  387. };
  388. typedef struct tgTrackRelationXD //电调与行调接触轨之间的关系数据
  389. {
  390. string m_strID; //图元ID
  391. int m_stationID; //车站ID
  392. string m_StationName; //车站名称
  393. int m_Direction; //运行线方向:1为下行,0为上行
  394. int m_IsPower; //接触轨带电状态:1为带电,0为不带电
  395. int m_SectionNo; //接触轨区段编号:0为两供电区段只有一条接触线,大于0则有多段接触线,并分别按条数进行编号
  396. int m_NoID; //供电编号:1为青岛站,2为汇泉广场,4为延安三路,5为宁夏路。。。。。。。。(3未用,预留给中山公园,全线接触轨中有中山公园,而全线1500V中山中园不为牵引变电所,存在矛盾)
  397. int m_PreIsPower;
  398. string GetStrid()
  399. {
  400. return m_strID;
  401. }
  402. int GetStationID()
  403. {
  404. return m_stationID;
  405. }
  406. string GetStationName()
  407. {
  408. return m_StationName;
  409. }
  410. int GetDirection()
  411. {
  412. return m_Direction;
  413. }
  414. int GetIsPower()
  415. {
  416. return m_IsPower;
  417. }
  418. int GetSectionNo()
  419. {
  420. return m_SectionNo;
  421. }
  422. int GetNoID()
  423. {
  424. return m_NoID;
  425. }
  426. tgTrackRelationXD()
  427. {
  428. m_strID = "";
  429. m_stationID = -1;
  430. m_StationName = "";
  431. m_Direction = -1;
  432. m_IsPower = -1;
  433. m_SectionNo = -1;
  434. m_NoID = -1;
  435. m_PreIsPower = -1;
  436. }
  437. }TrackRelationXD,*LPTrackRelationXD;
  438. typedef std::map<string,TrackRelationXD*> TrackRelationXDMAP;
  439. /*
  440. 针对供电区间进线/出线设备的出线/进线设备
  441. */
  442. struct OutLineElectricEqpmt
  443. {
  444. OutLineElectricEqpmt( int nType, const string& strEqpmtID ) : m_nType(nType), m_strEqpmtID(strEqpmtID)
  445. {
  446. }
  447. int m_nType;
  448. string m_strEqpmtID;
  449. };
  450. /*
  451. 断路器遥测量数据
  452. */
  453. struct EqpmtTelemeteryValueInfo
  454. {
  455. int nType; //设备类型ID
  456. int nSubType; //设备子类型ID
  457. int Namol_nMaxV; //常规波动电压最大值
  458. int Namol_nMinV; //常规波动电压最小值
  459. int Namol_nMaxA; //常规波动电流最大值
  460. int Namol_nMinA; //常规波动电流最小值
  461. int Excptional_nMaxV; //异常波动电压最大值
  462. int Excptional_nMinV; //异常波动电压最小值
  463. int Excptional_nMaxA; //异常波动电流最大值
  464. int Excptional_nMinA; //异常波动电流最小值
  465. };
  466. //多组模式信息 added by zhangjh
  467. typedef struct tgMultiModeInfo
  468. {
  469. int m_nMultiModeID; //多组模式信息编号
  470. string m_strMultiModeName; //多组模式模式名称
  471. int m_nType; //模式类型 0 停电 1送电
  472. vector<int> m_vecModeID; //该模式涉及的所有模式ID
  473. }MULTIMODEINFO,*LPMULTIMODEINFO;
  474. typedef std::map<int,MULTIMODEINFO> MULTIMODEMAP;//多组模式信息 added by zhangjh
  475. typedef struct tgModeData
  476. {
  477. string strid; //设备图元ID
  478. string modename; //模式名称
  479. string statusname; //目标状态名称
  480. int dstatus; //模式执行的目标状态
  481. int index; //模式下的执行顺序
  482. int modeid; //模式ID
  483. int station; //车站ID
  484. int viewid; //视图ID
  485. int curstatus; //设备当前状态
  486. string strModeShowID;
  487. string strModeShowCode;
  488. bool bPitchOn;
  489. int ExecuteResult; //模式执行结果
  490. tgModeData()
  491. {
  492. strid = "";
  493. modename = "";
  494. statusname = "";
  495. dstatus = -1;
  496. index = -1;
  497. modeid = -1;
  498. station = -1;
  499. viewid = -1;
  500. curstatus = -1;
  501. strModeShowID = "";
  502. strModeShowCode = "";
  503. bPitchOn = true;
  504. }
  505. }MODEDATA,*LPMODEDATA;
  506. typedef std::map<string,MODEDATA> MODEDATAMAP; //key:Make2IntKey(mode.modeid,mode.index)组合
  507. typedef std::map<int,map<int,MODEDATA>> MODEIDDATAMAP; //key:modeid-模式ID, value:map<key:index-模式下的执行顺序索引,value:MODEDATA单个设备模式信息>
  508. typedef std::map<string, EqpmtTelemeteryValueInfo*> EQPMTTELEINFO; //key:设备类型ID-子类型ID value:该类型设备对应的遥测量相关信息
  509. typedef struct tgModeCtrlStatus
  510. {
  511. tgModeCtrlStatus(int mode)
  512. {
  513. status = MODECTRL_STATUS_START;
  514. index = 0;
  515. modeid = mode;
  516. }
  517. int modeid; //模式ID
  518. int status; //模式状态(开始、重启、暂停、停止)
  519. int index;
  520. int viewid;
  521. int ctrlresult;
  522. int stationindex;
  523. }MODECTRLSTATUS,*LPMODECTRLSTATUS;
  524. struct EqpmtPowerValue //设备各电气量 xyx新增
  525. {
  526. int Position; //用于区分母线位置I段/II段
  527. double U; //计算电压(kV)
  528. double Uab; //AB线电压
  529. double Ubc; //AB线电压
  530. double Uca; //AB线电压
  531. double Ua; //A相电压
  532. double Ub; //B相电压
  533. double Uc; //C相电压
  534. double I; //计算电流(A)
  535. double Iab; //AB线电流
  536. double Ibc; //BC线电流
  537. double Ica; //CA线电流
  538. double Ia; //A相电流
  539. double Ib; //B相电流
  540. double Ic; //C相电流
  541. double S; //视在功率(kVA)
  542. double P; //有功功率(kW)
  543. double Q; //无功功率(kVar)
  544. double PF; //功率因数
  545. double f; //频率(Hz)
  546. double Forward_P; //正向有功电度(kWh)
  547. double Forward_Q; //正向无功电度(kVarh)
  548. double Backward_P; //反向有功电度
  549. double Backward_Q; //反向无功电度
  550. EqpmtPowerValue()
  551. {
  552. Position = -1;
  553. U=0.0;
  554. Uab=0.0;
  555. Ubc=0.0;
  556. Uca=0.0;
  557. Ua=0.0;
  558. Ub=0.0;
  559. Uc=0.0;
  560. I=0.0;
  561. Iab=0.0;
  562. Ibc=0.0;
  563. Ica=0.0;
  564. Ia=0.0;
  565. Ib=0.0;
  566. Ic=0.0;
  567. S=0.0;
  568. P=0.0;
  569. Q=0.0;
  570. PF=0.0;
  571. f=0.0;
  572. Forward_P=0.0;
  573. Forward_Q=0.0;
  574. Backward_P=0.0;
  575. Backward_Q=0.0;
  576. }
  577. };
  578. //电调设备报警点表信息 xyx新增
  579. typedef struct ElcEqpmtAlarmInfo
  580. {
  581. int m_nEqpmtType; //设备类型
  582. string m_strAlrmText; //报文内容
  583. int m_nAlarmLevel; //报文等级
  584. int m_nAlarmType; //报文类型
  585. int m_nAlarmSystem; //报文系统所属系统
  586. int m_nTripActType; //触发报文的动作类型:故障时为保护ID,常规操作时见定义见ElcAlarm_TripActType_Close系列
  587. int m_nIsFault; //是否为故障触发报文:故障1、常规操作0
  588. string m_strTripText; //联跳报文
  589. string m_strProtectLock; //保护闭锁报文
  590. }ELCEQPMTALARMINFO,*LPELCEQPMTALARMINFO;
  591. typedef std::map<int,ELCEQPMTALARMINFO> ELCEQPMTALARMACTTYPEMAP; //map<int:动作类型m_nTripActType,ELCEQPMTALARMINFO:设备报警信息>
  592. typedef std::map<int,ELCEQPMTALARMACTTYPEMAP> ELCEQPMTALARMINFOMAP; //map<int:设备类型m_nEqpmtType,ELCEQPMTALARMACTTYPEMAP>
  593. //电环联合接口 xyx新增begin
  594. typedef struct ElcToEnvControlArea
  595. {
  596. int AreaLevel_l; //第一层控制区域
  597. int AreaLevel_2; //第二层控制区域
  598. int AreaLevel_n; //预留未知控制区域
  599. }ELCTOENVCONTROLAREA,*LPELCTOENVCONTROLAREA;
  600. typedef struct ElcToEnvRelaInfo
  601. {
  602. int nStationIID; //车站ID
  603. ELCTOENVCONTROLAREA CtrlArea; //控制区域
  604. EqpmtPowerValue PowerValue; //设备电气参数
  605. int EnvEqpmtStatus; //环调设备状态
  606. }ELCTOENVRELAINFO,*LPELCTOENVRELAINFO;
  607. typedef std::map<int,ELCTOENVRELAINFO> ELCTOENVRELAINFOAREAMAP; //map<int:控制层级AreaLevel,ELCTOENVRELAINFO:电环联合信息>
  608. typedef std::map<int,ELCTOENVRELAINFOAREAMAP> ELCTOENVRELAINFOSTATIONMAP; //map<int:车站StationID,ELCTOENVRELAINFOAREAMAP>
  609. #endif