ElectricEqpmt_PowerBolt.cpp 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991
  1. #include "pch.h"
  2. #include "ElectricEqpmt_PowerBolt.h"
  3. #include "ElectricEqpmt_Breaker.h"
  4. #include "YD_Public_OCC.h"
  5. ElectricEqpmt_PowerBolt::ElectricEqpmt_PowerBolt(void)
  6. {
  7. m_NextBolt = "";
  8. m_RelationBreak = "";
  9. m_LeftInputBreak.clear();
  10. m_RightInputBreak.clear();
  11. m_strAA_ModeStatus = "";
  12. m_strAM_ModeStatus = "";
  13. m_strMM_ModeStatus = "";
  14. m_nCtrlMode = AutoBolt_CtrlMode_Auto_Auto;
  15. m_strLeftInputLine = "";
  16. m_strRightInputLine = "";
  17. m_strLeftMotherLine = "";
  18. m_strRightMotherLine = "";
  19. }
  20. ElectricEqpmt_PowerBolt::~ElectricEqpmt_PowerBolt(void)
  21. {
  22. }
  23. void ElectricEqpmt_PowerBolt::CalculateValue(double inputv,double inputI,ELEEQPMTMAP* PEqpmtMap)
  24. {
  25. }
  26. bool ElectricEqpmt_PowerBolt::handle_delaytime(int64_t& time,ELEEQPMTMAP& eqpmtmap,DelayTimeInfo& delayparm)
  27. {
  28. //CTimeSpan Timespan=CTimeSpan(0,0,0,Auto_AutoBoltDelay_DurTime);
  29. //CTimeSpan Timespan=CTimeSpan(0,0,0,delayparm.delaydur);
  30. if (delayparm.occartime + delayparm.delaydur > time)
  31. return true;
  32. if (GetCtrlMode()==AutoBolt_CtrlMode_Manual_Manual)
  33. {
  34. return true;
  35. }
  36. else if (GetCtrlMode()==AutoBolt_CtrlMode_Manual_Auto)
  37. {
  38. if (delayparm.type==Auto_DelayTime_AutoBolt&&delayparm.destatus==Electric_Eqpmt_Status_ON)
  39. AutoBlotShut(eqpmtmap); //自动合闸
  40. }
  41. else if (GetCtrlMode()==AutoBolt_CtrlMode_Auto_Auto)
  42. {
  43. if (delayparm.type==Auto_DelayTime_AutoBolt&&delayparm.destatus==Electric_Eqpmt_Status_ON)
  44. AutoBlotShut(eqpmtmap); //自动合闸
  45. //AutoBlotOff(eqpmtmap);
  46. if (delayparm.type==Auto_DelayTime_AutoBolt&&delayparm.destatus==Electric_Eqpmt_Status_OFF)
  47. AutoBlotOff(eqpmtmap); //自动分闸
  48. if (delayparm.type==Auto_DelayTime_AutoBolt&&delayparm.destatus==Electric_Eqpmt_Status_ON&&delayparm.srcstatus == Electric_Eqpmt_Status_ON)
  49. AutoBlotOff(eqpmtmap); //自动分闸
  50. }
  51. else if(GetCtrlMode()==AutoBolt_CtrlMode_Auto_Manual)
  52. {
  53. if (delayparm.type==Auto_DelayTime_AutoBolt&&delayparm.destatus==Electric_Eqpmt_Status_ON)
  54. AutoBlotShut(eqpmtmap); //自动合闸
  55. //AutoBlotOff(eqpmtmap);
  56. }
  57. return false;
  58. }
  59. bool ElectricEqpmt_PowerBolt::AutoBlotOff(ELEEQPMTMAP& eqpmtmap)
  60. {
  61. if ( !CheckBoltRelationLRBreak_Off( eqpmtmap ) )//若左右进线断路器均合闸,则备自投启动自复逻辑,母联断路器分闸 add by xyx-2017.07.28
  62. {
  63. return false;
  64. }
  65. ElectricEqpmt_Breaker* pbreaker=NULL;
  66. ELEEQPMTMAP::iterator iterbreaker = eqpmtmap.find(m_RelationBreak);
  67. if (iterbreaker!=eqpmtmap.end())
  68. {
  69. if (iterbreaker->second->GetBaseType()==OCC_EQPMTTYPE_35kVBREAKER || iterbreaker->second->GetBaseType()==OCC_EQPMTTYPE_BREAKER_DC || iterbreaker->second->GetBaseType()==OCC_EQPMTTYPE_400vACControlBreaker)
  70. {
  71. pbreaker = (ElectricEqpmt_Breaker*)iterbreaker->second;
  72. // 自投自复时,先判断是否有故障发生并需要母联开关跳闸,若有,则优先故障跳闸,不会合母联
  73. if ( pbreaker->IsFault() )
  74. {
  75. return false;
  76. }
  77. //if (pbreaker->GetBoltInOff(eqpmtmap)!=NULL) //备自投未处于分闸状态
  78. {
  79. if (CheckEqpmtCtrlCase(Electric_Eqpmt_Status_OFF,eqpmtmap,0,0,0,0,0, CTRLTYPE_STATUS)==DH_CmdReplyStatus_Pass) //检查该设备控制的相关元件
  80. {
  81. if (pbreaker->GetStatus()==Electric_Eqpmt_Status_OFF)
  82. {
  83. return false;
  84. }
  85. pbreaker->TurnOff(eqpmtmap,Auto_DelayTime_AutoBolt);
  86. //xyx屏蔽begin
  87. //string strtext;
  88. //strtext.Format("母联断路器 %s 分闸",pbreaker->GetEqpmentName());
  89. //SendMsgNotice(GetSourceStationID(),GetRegion(),2,DH_MSGCATEGORY_SYS,strtext);
  90. //xyx屏蔽end
  91. //xyx修改begin
  92. string EqpmtTypeName = pbreaker->GetBaseTypeName(); //设备类型名称
  93. string EqpmtName = pbreaker->GetEqpmentName(); //设备名称
  94. int EqpmtSourceStatonID = pbreaker->GetSourceStationID(); //设备所属车站ID
  95. int EqpmtType = pbreaker-> GetBaseType(); //设备类型
  96. int nActType = ElcAlarm_TripActType_Open; //“分闸”报文类型
  97. UpdateAlarmType(EqpmtType,EqpmtTypeName,EqpmtName,EqpmtSourceStatonID,nActType);
  98. //xyx修改end
  99. return true;
  100. }
  101. }
  102. }
  103. }
  104. return false;
  105. }
  106. bool ElectricEqpmt_PowerBolt::AutoBlotShut(ELEEQPMTMAP& eqpmtmap)
  107. {
  108. if ( !CheckBoltRelationLRBreak_On( eqpmtmap ) )//若左右进线断路器任一处于分闸状态,则母联断路器合闸 add by xyx-2017.07.28
  109. {
  110. return false;
  111. }
  112. ElectricEqpmt_Breaker* pbreaker=NULL;
  113. ELEEQPMTMAP::iterator iterbreaker = eqpmtmap.find(m_RelationBreak);
  114. if (iterbreaker!=eqpmtmap.end())
  115. {
  116. if (iterbreaker->second->GetBaseType()==OCC_EQPMTTYPE_35kVBREAKER || iterbreaker->second->GetBaseType()==OCC_EQPMTTYPE_BREAKER_DC|| iterbreaker->second->GetBaseType()==OCC_EQPMTTYPE_400vACControlBreaker)
  117. {
  118. pbreaker = (ElectricEqpmt_Breaker*)iterbreaker->second;
  119. // 自投自复时,先判断是否有故障发生并需要母联开关跳闸,若有,则优先故障跳闸,不会合母联
  120. if ( pbreaker->IsFault() )
  121. {
  122. return false;
  123. }
  124. //if (pbreaker->GetBoltInShut(eqpmtmap)!=NULL)
  125. {
  126. if (CheckEqpmtCtrlCase(Electric_Eqpmt_Status_ON,eqpmtmap,0,0,0,0,0, CTRLTYPE_STATUS)==DH_CmdReplyStatus_Pass)
  127. {
  128. pbreaker->TurnOn(eqpmtmap);
  129. //xyx屏蔽begin
  130. //string strtext;
  131. //strtext.Format("母联断路器 %s 合闸",pbreaker->GetEqpmentName());
  132. //SendMsgNotice(GetSourceStationID(),GetRegion(),2,DH_MSGCATEGORY_SYS,strtext);
  133. //xyx屏蔽end
  134. //xyx修改begin
  135. string EqpmtTypeName = pbreaker->GetBaseTypeName(); //设备类型名称
  136. string EqpmtName = pbreaker->GetEqpmentName(); //设备名称
  137. int EqpmtSourceStatonID = pbreaker->GetSourceStationID(); //设备所属车站ID
  138. int EqpmtType = pbreaker-> GetBaseType(); //设备类型
  139. int nActType = ElcAlarm_TripActType_Close; //母联断路器“合闸”报文类型
  140. UpdateAlarmType(EqpmtType,EqpmtTypeName,EqpmtName,EqpmtSourceStatonID,nActType);
  141. //xyx修改end
  142. return true;
  143. }
  144. }
  145. }
  146. }
  147. return false;
  148. }
  149. bool ElectricEqpmt_PowerBolt::CheckSelfOff(ELEEQPMTMAP& eqpmtmap,string sbreaker) //检查自断
  150. {
  151. if (GetStatus()==Electric_Eqpmt_Status_OFF||sbreaker!=m_RelationBreak)
  152. {
  153. return false;
  154. }
  155. DelayTimeInfo delay;
  156. //modify by dengt
  157. if (GetBaseType() == OCC_EQPMTTYPE_35kVBREAKER)
  158. {
  159. delay.delaydur = Auto_AutoBoltDelay_DurTime_35kv;
  160. }
  161. else
  162. delay.delaydur = Auto_AutoBoltDelay_DurTime;
  163. delay.occartime = GetNumTime_Second_2();
  164. delay.srcstatus = GetStatus();
  165. delay.destatus = Electric_Eqpmt_Status_OFF;
  166. if (GetCtrlMode()==AutoBolt_CtrlMode_Manual_Manual)
  167. {
  168. delay.type=AutoBolt_CtrlMode_Manual_Manual;
  169. }
  170. else if (AutoBolt_CtrlMode_Manual_Auto)
  171. {
  172. delay.type=AutoBolt_CtrlMode_Manual_Auto;
  173. }
  174. else if (AutoBolt_CtrlMode_Auto_Auto)
  175. {
  176. delay.type=Auto_DelayTime_AutoBolt;
  177. }
  178. else if(AutoBolt_CtrlMode_Auto_Manual)
  179. {
  180. delay.type=AutoBolt_CtrlMode_Auto_Manual;
  181. }
  182. p_DelayTimeMap->insert(make_pair(GetEqpmentID(),delay));
  183. return true;
  184. }
  185. bool ElectricEqpmt_PowerBolt::CheckSelfShut(ELEEQPMTMAP& eqpmtmap,string sbreaker) //检查自动合闸
  186. {
  187. if (GetStatus()==Electric_Eqpmt_Status_OFF/*||m_CtrlMode==AutoBolt_CtrlMode_Manual*/||sbreaker!=m_RelationBreak)
  188. {
  189. return false;
  190. }
  191. //手动操作时不分闸
  192. if ( GetCtrlMark() )
  193. {
  194. return false;
  195. }
  196. //获取关联母联断路器
  197. ElectricEqpmt_Breaker* pbreaker = NULL;
  198. ELEEQPMTMAP::iterator iterbreaker = eqpmtmap.find(m_RelationBreak);
  199. if (iterbreaker == eqpmtmap.end())
  200. {
  201. return false;
  202. }
  203. ElectricEqpmt_Breaker* plbreaker1=NULL; //added by zhangjh on 2017.3.21
  204. ElectricEqpmt_Breaker* plbreaker2=NULL;
  205. for (int i=0;i<m_LeftInputBreak.size();i++)
  206. {
  207. ELEEQPMTMAP::iterator iterlbreaker = eqpmtmap.find(m_LeftInputBreak[i]);
  208. if (iterlbreaker!=eqpmtmap.end())
  209. {
  210. if (iterlbreaker->second->GetBaseType()==OCC_EQPMTTYPE_35kVBREAKER
  211. || iterlbreaker->second->GetBaseType()== OCC_EQPMTTYPE_BREAKER_DC
  212. || iterlbreaker->second->GetBaseType()==OCC_EQPMTTYPE_400vACControlBreaker
  213. || iterlbreaker->second->GetBaseType()==OCC_EQPMTTYPE_35kvACPowerLine
  214. || iterlbreaker->second->GetBaseType()== OCC_EQPMTTYPE_400vACPowerLine
  215. || iterlbreaker->second->GetBaseType()==OCC_EQPMTTYPE_110kvPowerLine
  216. || iterlbreaker->second->GetBaseType() == OCC_EQPMTTYPE_10kvPowerLine //花溪10kv馈线 add by dengt
  217. || iterlbreaker->second->GetBaseType()==OCC_EQPMTTYPE_35kVLineInOutlet
  218. || iterlbreaker->second->GetBaseType()==OCC_EQPMTTYPE_400VLineInOutlet)
  219. {
  220. if (i==0)
  221. {
  222. plbreaker1 = (ElectricEqpmt_Breaker*)iterlbreaker->second;
  223. }
  224. if (i==1)
  225. {
  226. plbreaker2 = (ElectricEqpmt_Breaker*)iterlbreaker->second;
  227. }
  228. }
  229. }
  230. }
  231. ElectricEqpmt_Breaker* prbreaker1=NULL; //added by zhangjh on 2017.3.21
  232. ElectricEqpmt_Breaker* prbreaker2=NULL;
  233. for (int i=0;i<m_RightInputBreak.size();i++)
  234. {
  235. ELEEQPMTMAP::iterator iterlbreaker = eqpmtmap.find(m_RightInputBreak[i]);
  236. if (iterlbreaker!=eqpmtmap.end())
  237. {
  238. if (iterlbreaker->second->GetBaseType()==OCC_EQPMTTYPE_35kVBREAKER
  239. || iterlbreaker->second->GetBaseType()== OCC_EQPMTTYPE_BREAKER_DC
  240. || iterlbreaker->second->GetBaseType()==OCC_EQPMTTYPE_400vACControlBreaker
  241. || iterlbreaker->second->GetBaseType()==OCC_EQPMTTYPE_35kvACPowerLine
  242. || iterlbreaker->second->GetBaseType()== OCC_EQPMTTYPE_400vACPowerLine
  243. || iterlbreaker->second->GetBaseType()==OCC_EQPMTTYPE_110kvPowerLine
  244. || iterlbreaker->second->GetBaseType() == OCC_EQPMTTYPE_10kvPowerLine //花溪10kv馈线 add by dengt
  245. || iterlbreaker->second->GetBaseType()==OCC_EQPMTTYPE_35kVLineInOutlet
  246. || iterlbreaker->second->GetBaseType()==OCC_EQPMTTYPE_400VLineInOutlet)
  247. {
  248. if (i==0)
  249. {
  250. prbreaker1 = (ElectricEqpmt_Breaker*)iterlbreaker->second;
  251. }
  252. if (i==1)
  253. {
  254. prbreaker2 = (ElectricEqpmt_Breaker*)iterlbreaker->second;
  255. }
  256. }
  257. }
  258. }
  259. //左右进线开关都存在再进行逻辑判断
  260. if (prbreaker1!=NULL&&plbreaker1!=NULL&&prbreaker2!=NULL&&plbreaker2!=NULL)
  261. {
  262. //左右进线都是失电时逻辑,母联断路器分闸
  263. if (prbreaker1->GetStatus()==Electric_Eqpmt_Status_OFF && plbreaker1->GetStatus()==Electric_Eqpmt_Status_OFF
  264. &&prbreaker2->GetStatus()==Electric_Eqpmt_Status_OFF && plbreaker2->GetStatus()==Electric_Eqpmt_Status_OFF)//added by yangsong
  265. {
  266. //400V备自投逻辑,分闸立即执行
  267. if (iterbreaker->second->GetBaseType()==OCC_EQPMTTYPE_400vACControlBreaker)
  268. {
  269. if (GetCtrlMode()==AutoBolt_CtrlMode_Auto_Auto
  270. || GetCtrlMode() == AutoBolt_CtrlMode_Manual_Auto)
  271. {
  272. AutoBlotOff(eqpmtmap);//如果是400V备自投控制模式是自复,就立即分闸
  273. }
  274. }
  275. else
  276. {
  277. DelayTimeInfo delay;
  278. delay.type = Auto_DelayTime_AutoBolt;
  279. //modify by dengt
  280. if (iterbreaker->second->GetBaseType() == OCC_EQPMTTYPE_35kVBREAKER)
  281. {
  282. delay.delaydur = Auto_AutoBoltDelay_DurTime_35kv;
  283. }
  284. else{
  285. delay.delaydur = Auto_AutoBoltDelay_DurTime;
  286. }
  287. delay.occartime = GetNumTime_Second_2();
  288. delay.srcstatus = GetStatus();
  289. delay.destatus = Electric_Eqpmt_Status_OFF;
  290. p_DelayTimeMap->insert(make_pair(GetEqpmentID(),delay));
  291. }
  292. return true;
  293. }
  294. //左侧进线或者右侧进线失电时逻辑,母联断路器合闸
  295. else if ((prbreaker1->GetStatus()==Electric_Eqpmt_Status_OFF && prbreaker2->GetStatus()==Electric_Eqpmt_Status_OFF)
  296. || (plbreaker1->GetStatus()==Electric_Eqpmt_Status_OFF && plbreaker2->GetStatus()==Electric_Eqpmt_Status_OFF))//added by zhangjh on 2017.3.21
  297. {
  298. DelayTimeInfo delay;
  299. delay.type=Auto_DelayTime_AutoBolt;
  300. //modify by dengt
  301. //35kV备自投延时比400V延时短
  302. if (iterbreaker->second->GetBaseType() == OCC_EQPMTTYPE_35kVBREAKER)
  303. {
  304. delay.delaydur = Auto_AutoBoltDelay_DurTime_35kv;
  305. }
  306. else {
  307. delay.delaydur = Auto_AutoBoltDelay_DurTime;
  308. }
  309. delay.occartime = GetNumTime_Second_2();
  310. delay.srcstatus = GetStatus();
  311. delay.destatus = Electric_Eqpmt_Status_ON;
  312. p_DelayTimeMap->insert(make_pair(GetEqpmentID(),delay));
  313. return true;
  314. }
  315. //左右进线都是得电时逻辑,母联断路器分闸
  316. else if (prbreaker1->GetStatus()==Electric_Eqpmt_Status_ON&&plbreaker1->GetStatus()==Electric_Eqpmt_Status_ON
  317. &&prbreaker2->GetStatus()==Electric_Eqpmt_Status_ON&&plbreaker2->GetStatus()==Electric_Eqpmt_Status_ON)
  318. {
  319. //400V备自投控制模式是自复,就立即分闸
  320. if (iterbreaker->second->GetBaseType()==OCC_EQPMTTYPE_400vACControlBreaker)
  321. {
  322. if (GetCtrlMode()==AutoBolt_CtrlMode_Auto_Auto
  323. || GetCtrlMode() == AutoBolt_CtrlMode_Manual_Auto)
  324. {
  325. AutoBlotOff(eqpmtmap);
  326. }
  327. }
  328. else
  329. {
  330. DelayTimeInfo delay;
  331. delay.type=Auto_DelayTime_AutoBolt;
  332. //modify by dengt
  333. if (iterbreaker->second->GetBaseType() == OCC_EQPMTTYPE_35kVBREAKER)
  334. {
  335. delay.delaydur = Auto_AutoBoltDelay_DurTime_35kv;
  336. }
  337. else
  338. delay.delaydur = Auto_AutoBoltDelay_DurTime;
  339. //delay.delaydur=Auto_AutoBoltDelay_DurTime;
  340. delay.occartime = GetNumTime_Second_2();
  341. delay.srcstatus = GetStatus();
  342. delay.destatus = Electric_Eqpmt_Status_OFF;
  343. p_DelayTimeMap->insert(make_pair(GetEqpmentID(),delay));
  344. }
  345. return true;
  346. }
  347. }
  348. return false;
  349. }
  350. int ElectricEqpmt_PowerBolt::AutoBoltCheckEqpmtCtrlCase(int trainid,ELEEQPMTMAP& ElectricEqpmtMap,int subsysid,int stationid,int viewid,int stdid)
  351. {
  352. DHSVRREPLY CheckReplyMsg;
  353. memset(&CheckReplyMsg,0,sizeof(DHSVRREPLY)) ;
  354. string retstr;
  355. int retstatus = AutoBolt_CtrlMode_Auto_Auto;
  356. ELEEQPMTMAP::iterator iter = ElectricEqpmtMap.find(GetEqpmentID()); //查找联动设备(前一个设备的状态)
  357. if (iter!=ElectricEqpmtMap.end())
  358. {
  359. // retstr.Format("%s %s 控制模式为:",iter->second->GetTypeName(),iter->second->GetName());
  360. retstr = "控制模式为:";
  361. if (GetCtrlMode()==AutoBolt_CtrlMode_Manual_Manual)
  362. {
  363. retstr+="手投手复";
  364. retstatus = AutoBolt_CtrlMode_Manual_Manual;
  365. UpdateEqpmtStatus(ElectricEqpmtMap,Electric_Eqpmt_Status_OFF);
  366. //add by yangs 添加备自投模式切换报警
  367. string EqpmtTypeName = GetBaseTypeName(); //设备类型名称
  368. string EqpmtName = GetEqpmentName(); //设备名称
  369. int EqpmtSourceStatonID = GetSourceStationID(); //设备所属车站ID
  370. int EqpmtType = GetBaseType(); //设备类型
  371. int nActType1 = ElcAlarm_TripActType_CtrlModeManualManual; //“手投手复”报文类型
  372. UpdateAlarmType(EqpmtType,EqpmtTypeName,EqpmtName,EqpmtSourceStatonID,nActType1);
  373. }
  374. else if (GetCtrlMode()==AutoBolt_CtrlMode_Manual_Auto)
  375. {
  376. retstr+="手投自复";
  377. retstatus = AutoBolt_CtrlMode_Manual_Auto;
  378. //add by yangs 添加备自投模式切换报警
  379. string EqpmtTypeName = GetBaseTypeName(); //设备类型名称
  380. string EqpmtName = GetEqpmentName(); //设备名称
  381. int EqpmtSourceStatonID = GetSourceStationID(); //设备所属车站ID
  382. int EqpmtType = GetBaseType(); //设备类型
  383. int nActType1 = ElcAlarm_TripActType_CtrlModeManualAuto; //“手投自复”报文类型
  384. UpdateAlarmType(EqpmtType,EqpmtTypeName,EqpmtName,EqpmtSourceStatonID,nActType1);
  385. }
  386. else if (GetCtrlMode()==AutoBolt_CtrlMode_Auto_Auto)
  387. {
  388. retstr+="自投自复";
  389. retstatus = AutoBolt_CtrlMode_Auto_Auto;
  390. UpdateEqpmtStatus(ElectricEqpmtMap,Electric_Eqpmt_Status_ON);
  391. //add by yangs 添加备自投模式切换报警
  392. string EqpmtTypeName = GetBaseTypeName(); //设备类型名称
  393. string EqpmtName = GetEqpmentName(); //设备名称
  394. int EqpmtSourceStatonID = GetSourceStationID(); //设备所属车站ID
  395. int EqpmtType = GetBaseType(); //设备类型
  396. int nActType1 = ElcAlarm_TripActType_CtrlModeAutoAuto; //“自投自复”报文类型
  397. UpdateAlarmType(EqpmtType,EqpmtTypeName,EqpmtName,EqpmtSourceStatonID,nActType1);
  398. }
  399. else if(GetCtrlMode()==AutoBolt_CtrlMode_Auto_Manual)
  400. {
  401. retstr+="自投手复";
  402. retstatus = AutoBolt_CtrlMode_Auto_Manual;
  403. UpdateEqpmtStatus(ElectricEqpmtMap,Electric_Eqpmt_Status_ON);
  404. //add by yangs 添加备自投模式切换报警
  405. string EqpmtTypeName = GetBaseTypeName(); //设备类型名称
  406. string EqpmtName = GetEqpmentName(); //设备名称
  407. int EqpmtSourceStatonID = GetSourceStationID(); //设备所属车站ID
  408. int EqpmtType = GetBaseType(); //设备类型
  409. int nActType1 = ElcAlarm_TripActType_CtrlModeAutoManual; //“自投手复”报文类型
  410. UpdateAlarmType(EqpmtType,EqpmtTypeName,EqpmtName,EqpmtSourceStatonID,nActType1);
  411. }
  412. if (trainid>0)
  413. {
  414. POWERAUTOBOLTCTRLMODE autoBoltMode;
  415. memset(&autoBoltMode, 0, sizeof(POWERAUTOBOLTCTRLMODE));
  416. string eqpmentid = GetEqpmentID();;
  417. strncpy(autoBoltMode.Eqpmtid, eqpmentid.c_str(),sizeof(autoBoltMode.Eqpmtid));
  418. autoBoltMode.AutoBoltCtrlMode = GetCtrlMode();
  419. autoBoltMode.nStationID = stationid;
  420. autoBoltMode.nViewID = viewid;
  421. OCCCOMMAND NetOrder;
  422. memset(&NetOrder, 0, sizeof(OCCCOMMAND));
  423. NetOrder.DesSysType = OCC_SYS_DD_CLIENT;
  424. NetOrder.ScrSysType = OCC_SYS_DD_SVR;
  425. NetOrder.TrainningID = trainid;
  426. NetOrder.setPacketValue(&autoBoltMode,OCCCOMMAND::eUpdateAutoBolt_CtrlMode);
  427. p_SendList->push(NetOrder);
  428. }
  429. }
  430. if (trainid>0)
  431. {
  432. strncpy(CheckReplyMsg.ReplyText,retstr.c_str(), sizeof(CheckReplyMsg.ReplyText));
  433. CheckReplyMsg.CmdID = OCCCOMMAND::eUpdateAutoBolt_CtrlMode;
  434. string strID=GetEqpmentID();
  435. strncpy(CheckReplyMsg.EqpmtStrID,strID.c_str(), sizeof(CheckReplyMsg.EqpmtStrID));
  436. CheckReplyMsg.StdID = stdid;
  437. CheckReplyMsg.EqpmtStatus =retstatus; //100表示通过,101拒绝
  438. CheckReplyMsg.StationID=stationid;
  439. CheckReplyMsg.ViewID = viewid;
  440. CheckReplyMsg.SubSysID = subsysid;
  441. OCCCOMMAND NetOrder;
  442. NetOrder.DesSysType = OCC_SYS_DD_CLIENT;
  443. NetOrder.ScrSysType = OCC_SYS_DD_SVR;
  444. NetOrder.TrainningID = trainid;
  445. NetOrder.setPacketValue(&CheckReplyMsg,OCCCOMMAND::eUpdateSvrReply);
  446. p_SendList->push(NetOrder);
  447. }
  448. return retstatus;
  449. }
  450. bool ElectricEqpmt_PowerBolt::CheckBoltRelationLRBreak_On( ELEEQPMTMAP& eqpmtmap )//add by xyx-2017.07.28
  451. {
  452. if ( Electric_Eqpmt_Status_OFF == GetStatus() )
  453. {
  454. return false;
  455. }
  456. bool bLeft = true;
  457. ELEEQPMTMAP::iterator iterEqpmt;
  458. // 左进线合闸条件
  459. for ( int i = 0; i < m_LeftInputBreak.size(); i++ )
  460. {
  461. iterEqpmt = eqpmtmap.find( m_LeftInputBreak[i]);
  462. if ( iterEqpmt == eqpmtmap.end() )
  463. {
  464. continue;
  465. }
  466. if ( Electric_Eqpmt_Status_ON == iterEqpmt->second->GetStatus() )
  467. {
  468. bLeft = false;
  469. break;
  470. }
  471. }
  472. // 右进线合闸条件
  473. bool bRight = true;
  474. for ( int i = 0; i < m_RightInputBreak.size(); i++ )
  475. {
  476. iterEqpmt = eqpmtmap.find( m_RightInputBreak[i]);
  477. if ( iterEqpmt == eqpmtmap.end() )
  478. {
  479. continue;
  480. }
  481. if ( Electric_Eqpmt_Status_ON == iterEqpmt->second->GetStatus() )
  482. {
  483. bRight = false;
  484. break;
  485. }
  486. }
  487. if ( bLeft || bRight )
  488. {
  489. return true;
  490. }
  491. if( !bLeft && !bRight )
  492. {
  493. return false;
  494. }
  495. return false;
  496. }
  497. bool ElectricEqpmt_PowerBolt::CheckBoltRelationLRBreak_Off( ELEEQPMTMAP& eqpmtmap )
  498. {
  499. //// 先检查左进线断路器是否合闸
  500. //ELEEQPMTMAP::iterator iterEqpmt;
  501. //for ( int i = 0; i < m_LeftInputBreak.size(); i++ )
  502. //{
  503. // iterEqpmt = eqpmtmap.find( m_LeftInputBreak[i]);
  504. // if ( iterEqpmt == eqpmtmap.end() )
  505. // {
  506. // continue;
  507. // }
  508. // if ( IsBreakType(iterEqpmt->second->GetType()) )
  509. // {
  510. // if ( Electric_Eqpmt_Status_OFF == iterEqpmt->second->GetStatus() )
  511. // {
  512. // return false;
  513. // }
  514. // }
  515. //}
  516. // // 先检查右进线断路器是否合闸
  517. //for ( int i = 0; i < m_RightInputBreak.size(); i++ )
  518. //{
  519. // iterEqpmt = eqpmtmap.find( m_RightInputBreak[i]);
  520. // if ( iterEqpmt == eqpmtmap.end() )
  521. // {
  522. // continue;
  523. // }
  524. // if ( IsBreakType(iterEqpmt->second->GetType()) )
  525. // {
  526. // if ( Electric_Eqpmt_Status_OFF == iterEqpmt->second->GetStatus() )
  527. // {
  528. // return false;
  529. // }
  530. // }
  531. //}
  532. //return true;
  533. /*if ( Electric_Eqpmt_Status_OFF == GetStatus() )
  534. {
  535. return false;
  536. }*/
  537. bool bLeft = false;
  538. ELEEQPMTMAP::iterator iterEqpmt;
  539. // 左进线断路器是否合位
  540. for ( int i = 0; i < m_LeftInputBreak.size(); i++ )
  541. {
  542. iterEqpmt = eqpmtmap.find( m_LeftInputBreak[i]);
  543. if ( iterEqpmt == eqpmtmap.end() )
  544. {
  545. continue;
  546. }
  547. if ( IsBreakType(iterEqpmt->second->GetBaseType()) )
  548. {
  549. if ( Electric_Eqpmt_Status_ON == iterEqpmt->second->GetStatus() )
  550. {
  551. bLeft = true;
  552. break;
  553. }
  554. }
  555. }
  556. // 右进线断路器是否合位
  557. bool bRight = false;
  558. for ( int i = 0; i < m_RightInputBreak.size(); i++ )
  559. {
  560. iterEqpmt = eqpmtmap.find( m_RightInputBreak[i]);
  561. if ( iterEqpmt == eqpmtmap.end() )
  562. {
  563. continue;
  564. }
  565. if ( IsBreakType(iterEqpmt->second->GetBaseType()) )
  566. {
  567. if ( Electric_Eqpmt_Status_ON == iterEqpmt->second->GetStatus() )
  568. {
  569. bRight = true;
  570. break;
  571. }
  572. }
  573. }
  574. if ((bLeft && bRight) || (!bLeft && !bRight))
  575. {
  576. return true;
  577. }
  578. return false;
  579. }
  580. bool ElectricEqpmt_PowerBolt::CheckBoltRelationLRBreak_OnByHand(ELEEQPMTMAP& eqpmtmap)
  581. {
  582. // 左进线断路器状态判断
  583. bool bLeft = true;
  584. ELEEQPMTMAP::iterator iterEqpmt;
  585. for ( int i = 0; i < m_LeftInputBreak.size(); i++ )
  586. {
  587. iterEqpmt = eqpmtmap.find( m_LeftInputBreak[i]);
  588. if ( iterEqpmt == eqpmtmap.end() )
  589. {
  590. continue;
  591. }
  592. if (IsBreakType(iterEqpmt->second->GetBaseType()))
  593. {
  594. if ( Electric_Eqpmt_Status_ON == iterEqpmt->second->GetStatus() )
  595. {
  596. bLeft = false;
  597. break;
  598. }
  599. }
  600. }
  601. // 右进线断路器状态判断
  602. bool bRight = true;
  603. for ( int i = 0; i < m_RightInputBreak.size(); i++ )
  604. {
  605. iterEqpmt = eqpmtmap.find( m_RightInputBreak[i]);
  606. if ( iterEqpmt == eqpmtmap.end() )
  607. {
  608. continue;
  609. }
  610. if (IsBreakType(iterEqpmt->second->GetBaseType()))
  611. {
  612. if ( Electric_Eqpmt_Status_ON == iterEqpmt->second->GetStatus() )
  613. {
  614. bRight = false;
  615. break;
  616. }
  617. }
  618. }
  619. if ( bLeft && bRight ) //左右进线断路器均分闸时,母联断路器不可合闸
  620. {
  621. return false;
  622. }
  623. else if( !bLeft && !bRight ) //左右进线断路器均合闸时,母联断路器不可合闸
  624. {
  625. return false;
  626. }
  627. else if ( bLeft || bRight ) //左右进线断路器有一分一合时,母联断路器可合闸
  628. {
  629. return true;
  630. }
  631. return false;
  632. }
  633. bool ElectricEqpmt_PowerBolt::IsBreakType( int nType )
  634. {
  635. bool bRet = false;
  636. //int nStationType = GetStationType(m_SourceStation);
  637. //switch(nStationType)
  638. //{
  639. //case StationType_CenterControlStation:
  640. //case StationType_JYSubStation:
  641. //case StationType_QYSubStation:
  642. // {
  643. // if ( OCC_EQPMTTYPE_BREAKER == nType || OCC_EQPMTTYPE_400vACControlBreaker == nType )
  644. // {
  645. // bRet = true;
  646. // }
  647. // }
  648. // break;
  649. //case StationType_MainSubStation:
  650. // {
  651. // if ( OCC_EQPMTTYPE_BREAKER == nType || OCC_EQPMTTYPE_400vACControlBreaker == nType || OCC_EQPMTTYPE_35kvACFeedLine == nType || OCC_EQPMTTYPE_400vACFeedLine == nType )
  652. // {
  653. // bRet = true;
  654. // }
  655. // }
  656. // break;
  657. //default:
  658. // break;
  659. //}
  660. if ( OCC_EQPMTTYPE_35kVBREAKER == nType || OCC_EQPMTTYPE_400vACControlBreaker == nType )
  661. {
  662. bRet = true;
  663. }
  664. return bRet;
  665. }
  666. void ElectricEqpmt_PowerBolt::EqpmtCtrl( int status,ELEEQPMTMAP& ElectricEqpmtMap,string Stdid,int CtrlType, int nMark/* = 0*/ )
  667. {
  668. if (CtrlType==CTRLTYPE_LOCKSTATUS)
  669. {
  670. UpdateLockStatus(status);
  671. }
  672. else if (CtrlType ==CTRLTYPE_STATUS)
  673. {
  674. if (GetControlLock()==Electric_Eqpmt_Status_UnLock)
  675. {
  676. //xyx屏蔽begin
  677. //if (status==Eqpmt_Operation_OFF&&GetStatus()==Electric_Eqpmt_Status_ON)
  678. //{
  679. // TurnOff(ElectricEqpmtMap,POWER_EQPMT_OPERNO);
  680. // string text;
  681. // text.Format(" 母联 %s 自投投入/退出 退出",GetEqpmentName() );
  682. // SendMsgNotice(GetSourceStationID(),GetRegion(),2,DH_MSGCATEGORY_SOE,text);
  683. //}
  684. //else if (status==Eqpmt_Operation_ON)
  685. //{
  686. // if (GetStatus()==Electric_Eqpmt_Status_OFF)
  687. // {
  688. // TurnOn(ElectricEqpmtMap);
  689. // string text;
  690. // text.Format(" 母联 %s 自投投入/退出 投入",GetEqpmentName() );
  691. // SendMsgNotice(GetSourceStationID(),GetRegion(),2,DH_MSGCATEGORY_SOE,text);
  692. // }
  693. //}
  694. //else
  695. // UpdateEqpmtStatus(ElectricEqpmtMap,GetStatus());
  696. //xyx屏蔽end
  697. //xyx修改begin
  698. string EqpmtTypeName = GetBaseTypeName(); //设备类型名称
  699. string EqpmtName = GetEqpmentName(); //设备名称
  700. int EqpmtSourceStatonID = GetSourceStationID(); //设备所属车站ID
  701. int EqpmtType = GetBaseType(); //设备类型
  702. if (status==Eqpmt_Operation_OFF&&GetStatus()==Electric_Eqpmt_Status_ON)
  703. {
  704. TurnOff(ElectricEqpmtMap,POWER_EQPMT_OPERNO);
  705. int nActType1 = ElcAlarm_TripActType_Open; //“退出”类型
  706. UpdateAlarmType(EqpmtType,EqpmtTypeName,EqpmtName,EqpmtSourceStatonID,nActType1);
  707. UpdateOperResultToTechEva(GetEqpmentID(),GetStatus()); //更新“退出”操作执行结果
  708. }
  709. else if (status==Eqpmt_Operation_ON)
  710. {
  711. if (GetStatus()==Electric_Eqpmt_Status_OFF)
  712. {
  713. TurnOn(ElectricEqpmtMap);
  714. //备自投操作后检查是否需要启动自投
  715. CheckSelfShut( ElectricEqpmtMap,GetRelationBreaker() );
  716. int nActType2 = ElcAlarm_TripActType_Close; //“投入”类型
  717. UpdateAlarmType(EqpmtType,EqpmtTypeName,EqpmtName,EqpmtSourceStatonID,nActType2);
  718. UpdateOperResultToTechEva(GetEqpmentID(),GetStatus()); //更新“投入”执行结果
  719. }
  720. }
  721. else
  722. UpdateEqpmtStatus(ElectricEqpmtMap,GetStatus());
  723. //xyx修改end
  724. }
  725. }
  726. else if (CtrlType ==CTRLTYPE_CARD)
  727. {
  728. //CardStatus = status;
  729. SetCardStatus(status);
  730. UpdateEqpmtStatus(ElectricEqpmtMap,GetCardStatus(),CTRLTYPE_CARD);
  731. }
  732. }
  733. int ElectricEqpmt_PowerBolt::GetEqpmtCtrlCaseStatus_CircuitBreaker_OnByHand( int status, ELEEQPMTMAP& ElectricEqpmtMap)
  734. {
  735. //int nRet = DH_CmdReplyStatus_Pass;
  736. //if ( !GetStatus() )
  737. //{
  738. // //母联联备自投退出位:不能操作
  739. // nRet = DH_CmdReplyStatus_Deny;
  740. //}
  741. //else
  742. //{
  743. // if ( Electric_Eqpmt_Status_ON == status )
  744. // {
  745. // // 三合两闭合闸检测
  746. // if ( !CheckBoltRelationLRBreak_OnByHand(ElectricEqpmtMap) )
  747. // {
  748. // nRet = DH_CmdReplyStatus_Deny;
  749. // }
  750. // }
  751. //}
  752. //return nRet;
  753. //母联断路器手动操作,三合两闭逻辑校验
  754. int nRet = DH_CmdReplyStatus_Pass;
  755. if ( !CheckBoltRelationLRBreak_OnByHand(ElectricEqpmtMap) )
  756. {
  757. nRet = DH_CmdReplyStatus_Deny;
  758. }
  759. return nRet;
  760. }
  761. int ElectricEqpmt_PowerBolt::GetEqpmtCtrlCaseStatus_LInputBreaker_OnByHand( int status,ELEEQPMTMAP& ElectricEqpmtMap )
  762. {
  763. //左进线断路器手动操作,三合两闭逻辑校验
  764. int nRet = DH_CmdReplyStatus_Pass;
  765. ELEEQPMTMAP::iterator iterEqpmt;
  766. for ( int i = 0; i < m_LeftInputBreak.size(); i++ )
  767. {
  768. iterEqpmt = ElectricEqpmtMap.find( m_LeftInputBreak[i]);
  769. if ( iterEqpmt != ElectricEqpmtMap.end()&&IsBreakType(iterEqpmt->second->GetBaseType()))
  770. {
  771. if ( !CheckBoltRelation_L_Break_OnByHand(ElectricEqpmtMap) )
  772. {
  773. nRet = DH_CmdReplyStatus_Deny;
  774. break;
  775. }
  776. }
  777. }
  778. return nRet;
  779. }
  780. int ElectricEqpmt_PowerBolt::GetEqpmtCtrlCaseStatus_RInputBreaker_OnByHand( int status,ELEEQPMTMAP& ElectricEqpmtMap )
  781. {
  782. //右进线断路器手动操作,三合两闭逻辑校验
  783. int nRet = DH_CmdReplyStatus_Pass;
  784. ELEEQPMTMAP::iterator iterEqpmt;
  785. for ( int i = 0; i < m_RightInputBreak.size(); i++ )
  786. {
  787. iterEqpmt = ElectricEqpmtMap.find( m_RightInputBreak[i]);
  788. if ( iterEqpmt != ElectricEqpmtMap.end()&&IsBreakType(iterEqpmt->second->GetBaseType()))
  789. {
  790. if ( !CheckBoltRelation_R_Break_OnByHand(ElectricEqpmtMap) )
  791. {
  792. nRet = DH_CmdReplyStatus_Deny;
  793. break;
  794. }
  795. }
  796. }
  797. return nRet;
  798. }
  799. bool ElectricEqpmt_PowerBolt::CheckBoltRelation_L_Break_OnByHand( ELEEQPMTMAP& eqpmtmap )
  800. {
  801. //判断母联断路器状态
  802. bool bBustieBreaker = true;
  803. ELEEQPMTMAP::iterator iterEqpmt;
  804. iterEqpmt = eqpmtmap.find( m_RelationBreak);
  805. if (iterEqpmt!=eqpmtmap.end())
  806. {
  807. if ( Electric_Eqpmt_Status_ON == iterEqpmt->second->GetStatus() )
  808. {
  809. bBustieBreaker = false;
  810. }
  811. }
  812. //判断右进线断路器状态
  813. bool bRightBreaker = true;
  814. for ( int i = 0; i < m_RightInputBreak.size(); i++ )
  815. {
  816. iterEqpmt = eqpmtmap.find( m_RightInputBreak[i]);
  817. if ( iterEqpmt == eqpmtmap.end() )
  818. {
  819. continue;
  820. }
  821. if (IsBreakType(iterEqpmt->second->GetBaseType()))
  822. {
  823. if ( Electric_Eqpmt_Status_ON == iterEqpmt->second->GetStatus() )
  824. {
  825. bRightBreaker = false;
  826. break;
  827. }
  828. }
  829. }
  830. if( !bBustieBreaker && !bRightBreaker ) //母联断路器与右进线断路器均合闸时,左进线断路器不可合闸
  831. {
  832. return false;
  833. }
  834. else //其余情况,左进线断路器可合闸
  835. {
  836. return true;
  837. }
  838. return false;
  839. }
  840. bool ElectricEqpmt_PowerBolt::CheckBoltRelation_R_Break_OnByHand( ELEEQPMTMAP& eqpmtmap )
  841. {
  842. //判断母联断路器状态
  843. bool bBustieBreaker = true;
  844. ELEEQPMTMAP::iterator iterEqpmt;
  845. iterEqpmt = eqpmtmap.find( m_RelationBreak);
  846. if (iterEqpmt!=eqpmtmap.end())
  847. {
  848. if ( Electric_Eqpmt_Status_ON == iterEqpmt->second->GetStatus() )
  849. {
  850. bBustieBreaker = false;
  851. }
  852. }
  853. //判断左进线断路器状态
  854. bool bLeftBreaker = true;
  855. for ( int i = 0; i < m_LeftInputBreak.size(); i++ )
  856. {
  857. iterEqpmt = eqpmtmap.find( m_LeftInputBreak[i]);
  858. if ( iterEqpmt == eqpmtmap.end() )
  859. {
  860. continue;
  861. }
  862. if (IsBreakType(iterEqpmt->second->GetBaseType()))
  863. {
  864. if ( Electric_Eqpmt_Status_ON == iterEqpmt->second->GetStatus() )
  865. {
  866. bLeftBreaker = false;
  867. break;
  868. }
  869. }
  870. }
  871. if( !bBustieBreaker && !bLeftBreaker ) //母联断路器与左进线断路器均合闸时,右进线断路器不可合闸
  872. {
  873. return false;
  874. }
  875. else //其余情况,右进线断路器可合闸
  876. {
  877. return true;
  878. }
  879. return false;
  880. }
  881. void ElectricEqpmt_PowerBolt::SetModeStatusShowEqpmt(string strEqpmt, int modeType)
  882. {
  883. if (AutoBolt_CtrlMode_Auto_Auto == modeType)
  884. {
  885. m_strAA_ModeStatus = strEqpmt;
  886. }
  887. else if (AutoBolt_CtrlMode_Auto_Manual == modeType)
  888. {
  889. m_strAM_ModeStatus = strEqpmt;
  890. }
  891. else if (AutoBolt_CtrlMode_Manual_Manual == modeType)
  892. {
  893. m_strMM_ModeStatus = strEqpmt;
  894. }
  895. else
  896. {
  897. m_strAA_ModeStatus = strEqpmt;
  898. }
  899. }
  900. void ElectricEqpmt_PowerBolt::UpdateModeStatusShow(ELEEQPMTMAP& ElectricEqpmtMap, int modeType)
  901. {
  902. ELEEQPMTMAP::iterator iterAAEqpmt = ElectricEqpmtMap.find(m_strAA_ModeStatus); //查找状态显示设备
  903. ELEEQPMTMAP::iterator iterAMEqpmt = ElectricEqpmtMap.find(m_strAM_ModeStatus); //查找状态显示设备
  904. ELEEQPMTMAP::iterator iterMMEqpmt = ElectricEqpmtMap.find(m_strMM_ModeStatus); //查找状态显示设备
  905. if (iterAAEqpmt!=ElectricEqpmtMap.end() && iterAMEqpmt!=ElectricEqpmtMap.end() && iterMMEqpmt!=ElectricEqpmtMap.end())
  906. {
  907. if (AutoBolt_CtrlMode_Auto_Auto == modeType)
  908. {
  909. iterAAEqpmt->second->UpdateEqpmtStatus(ElectricEqpmtMap,Electric_Eqpmt_Status_ON);
  910. iterAMEqpmt->second->UpdateEqpmtStatus(ElectricEqpmtMap,Electric_Eqpmt_Status_OFF);
  911. iterMMEqpmt->second->UpdateEqpmtStatus(ElectricEqpmtMap,Electric_Eqpmt_Status_OFF);
  912. }
  913. else if (AutoBolt_CtrlMode_Auto_Manual == modeType)
  914. {
  915. iterAAEqpmt->second->UpdateEqpmtStatus(ElectricEqpmtMap,Electric_Eqpmt_Status_OFF);
  916. iterAMEqpmt->second->UpdateEqpmtStatus(ElectricEqpmtMap,Electric_Eqpmt_Status_ON);
  917. iterMMEqpmt->second->UpdateEqpmtStatus(ElectricEqpmtMap,Electric_Eqpmt_Status_OFF);
  918. }
  919. else if (AutoBolt_CtrlMode_Manual_Manual == modeType)
  920. {
  921. iterAAEqpmt->second->UpdateEqpmtStatus(ElectricEqpmtMap,Electric_Eqpmt_Status_OFF);
  922. iterAMEqpmt->second->UpdateEqpmtStatus(ElectricEqpmtMap,Electric_Eqpmt_Status_OFF);
  923. iterMMEqpmt->second->UpdateEqpmtStatus(ElectricEqpmtMap,Electric_Eqpmt_Status_ON);
  924. }
  925. else
  926. {
  927. iterAAEqpmt->second->UpdateEqpmtStatus(ElectricEqpmtMap,Electric_Eqpmt_Status_ON);
  928. iterAMEqpmt->second->UpdateEqpmtStatus(ElectricEqpmtMap,Electric_Eqpmt_Status_OFF);
  929. iterMMEqpmt->second->UpdateEqpmtStatus(ElectricEqpmtMap,Electric_Eqpmt_Status_OFF);
  930. }
  931. }
  932. }