You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1144 lines
31 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 months ago
​
​
2 months ago
​
​
​
2 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 months ago
​
​
​
​
​
​
​
​
​
2 months ago
​
​
​
​
​
​
​
​
2 months ago
​
​
​
​
​
​
​
​
2 months ago
​
2 months ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
2 months ago
​
2 months ago
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. require_once('../php/argus/server.php');
  4. if( $CUser->Data['id'] > 1 ){
  5. $EID = intval( $_POST['MID'] );
  6. $QS = "SELECT * FROM `modbus_modules` WHERE `id`={$EID}";
  7. $Result = $DATABASE->Query( $QS, false );
  8. if( count( $Result ) ){
  9. $SC = $Result[0];
  10. $CCCV = intval( $SC['values'] );
  11. $CIVA = ( $CCCV >> 8 ) & 0xFF;
  12. if( ( $CCCV & 0x01 ) == 0x01 ) $P1 = 'true'; else $P1 = 'false';
  13. if( ( $CCCV & 0x02 ) == 0x02 ) $P2 = 'true'; else $P2 = 'false';
  14. if( ( $CCCV & 0x04 ) == 0x04 ) $P3 = 'true'; else $P3 = 'false';
  15. if( ( $CCCV & 0x08 ) == 0x08 ) $P4 = 'true'; else $P4 = 'false';
  16. $QS = "SELECT `left_side`,`right_side` FROM `metro_platforms` WHERE `id`={$SC['platform_id']}";
  17. $ZZ = $DATABASE->Query( $QS, false );
  18. $SN = $ZZ[0];
  19. $QS="SELECT `short` FROM `metro_tracks` WHERE `side`='U' AND `platform_id`={$SC['platform_id']}";
  20. $ZZ = $DATABASE->Query( $QS, false );
  21. $UTN = $ZZ[0]['short'];
  22. $QS="SELECT `short` FROM `metro_tracks` WHERE `side`='B' AND `platform_id`={$SC['platform_id']}";
  23. $ZZ = $DATABASE->Query( $QS, false );
  24. $BTN = $ZZ[0]['short'];
  25. $CBOV_A =( intval($SC['crossbar_a']) & 0x0F );
  26. $CBOV_B =( intval($SC['crossbar_a']) & 0x0F );
  27. $CBOV_C =( intval($SC['crossbar_a']) & 0x0F );
  28. $CBOV_D =( intval($SC['crossbar_a']) & 0x0F );
  29. $CBIV_A =( intval($SC['crossbar_a']) >> 4 );
  30. $CBIV_B =( intval($SC['crossbar_a']) >> 4 );
  31. $CBIV_C =( intval($SC['crossbar_a']) >> 4 );
  32. $CBIV_D =( intval($SC['crossbar_a']) >> 4 );
  33. switch($SC['func']){
  34. case 1: {
  35. $FFF=$SN['left_side'] . ' ' . $Labels->GetLabel('___SIDE__');
  36. $OCB_SECTION=<<<DATA_BOUNDARY
  37. {
  38. xtype: 'panel',
  39. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  40. html: '{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  41. },{
  42. xtype: 'panel',
  43. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  44. html: '{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  45. },{
  46. xtype: 'spacer'
  47. },{
  48. xtype: 'spacer'
  49. },{
  50. xtype: 'combo',
  51. id: 'sce_cb_o_1',
  52. lazyRender: true,
  53. mode: 'local',
  54. forceSelection: true,
  55. triggerAction: 'all',
  56. editable: false,
  57. disableKeyFilter: true,
  58. store: new Ext.data.ArrayStore({
  59. fields: ['mode','mode_txt'],
  60. data: [
  61. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  62. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  63. ]
  64. }),
  65. valueField: 'mode',
  66. displayField: 'mode_txt',
  67. value: '{$CBOV_A}',
  68. width: 120,
  69. listeners:{
  70. select: function( a, c, b ){
  71. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 21, b, false );
  72. }
  73. }
  74. },{
  75. xtype: 'combo',
  76. id: 'sce_cb_o_2',
  77. lazyRender: true,
  78. mode: 'local',
  79. forceSelection: true,
  80. triggerAction: 'all',
  81. editable: false,
  82. disableKeyFilter: true,
  83. store: new Ext.data.ArrayStore({
  84. fields: ['mode','mode_txt'],
  85. data: [
  86. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  87. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  88. ]
  89. }),
  90. valueField: 'mode',
  91. displayField: 'mode_txt',
  92. value: '{$CBOV_B}',
  93. width: 120,
  94. listeners:{
  95. select: function( a, c, b ){
  96. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 22, b, false );
  97. }
  98. }
  99. },{
  100. xtype: 'spacer'
  101. },{
  102. xtype: 'spacer'
  103. }
  104. DATA_BOUNDARY;
  105. $ICB_SECTION=<<<DATA_BOUNDARY
  106. {
  107. xtype: 'panel',
  108. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  109. html: 'DI 0 <img id="sce_in_1_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  110. },{
  111. xtype: 'panel',
  112. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  113. html: 'DI 1 <img id="sce_in_2_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  114. },{
  115. xtype: 'panel',
  116. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  117. html: 'DI 2 <img id="sce_in_3_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  118. },{
  119. xtype: 'panel',
  120. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  121. html: 'DI 3a <img id="sce_in_4_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  122. },{
  123. xtype: 'spacer',
  124. height: 5,
  125. colspan: 4
  126. },{
  127. xtype: 'combo',
  128. id: 'sce_cb_i_1',
  129. lazyRender: true,
  130. mode: 'local',
  131. forceSelection: true,
  132. triggerAction: 'all',
  133. editable: false,
  134. disableKeyFilter: true,
  135. store: new Ext.data.ArrayStore({
  136. fields: ['mode','mode_txt'],
  137. data: [
  138. [0,'{$Labels->GetLabel('__DISABLED__')}'],[4,'Strobe Light']
  139. ]
  140. }),
  141. valueField: 'mode',
  142. displayField: 'mode_txt',
  143. value: '{$CBIV_A}',
  144. width: 120,
  145. listeners:{
  146. select: function( a, c, b ){
  147. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 27, a.getValue(), false );
  148. }
  149. }
  150. },{
  151. xtype: 'combo',
  152. id: 'sce_cb_i_2',
  153. lazyRender: true,
  154. mode: 'local',
  155. forceSelection: true,
  156. triggerAction: 'all',
  157. editable: false,
  158. disableKeyFilter: true,
  159. store: new Ext.data.ArrayStore({
  160. fields: ['mode','mode_txt'],
  161. data: [
  162. [0,'{$Labels->GetLabel('__DISABLED__')}'],[4,'Strobe Light']
  163. ]
  164. }),
  165. valueField: 'mode',
  166. displayField: 'mode_txt',
  167. value: '{$CBIV_B}',
  168. width: 120,
  169. listeners:{
  170. select: function( a, c, b ){
  171. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 28, a.getValue(), false );
  172. }
  173. }
  174. },{
  175. xtype: 'combo',
  176. id: 'sce_cb_i_3',
  177. lazyRender: true,
  178. mode: 'local',
  179. forceSelection: true,
  180. triggerAction: 'all',
  181. editable: false,
  182. disableKeyFilter: true,
  183. store: new Ext.data.ArrayStore({
  184. fields: ['mode','mode_txt'],
  185. data: [
  186. [0,'{$Labels->GetLabel('__DISABLED__')}'],[4,'Strobe Light']
  187. ]
  188. }),
  189. valueField: 'mode',
  190. displayField: 'mode_txt',
  191. value: '{$CBIV_C}',
  192. width: 120,
  193. listeners:{
  194. select: function( a, c, b ){
  195. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 29, a.getValue(), false );
  196. }
  197. }
  198. },{
  199. xtype: 'combo',
  200. id: 'sce_cb_i_4',
  201. lazyRender: true,
  202. mode: 'local',
  203. forceSelection: true,
  204. triggerAction: 'all',
  205. editable: false,
  206. disableKeyFilter: true,
  207. store: new Ext.data.ArrayStore({
  208. fields: ['mode','mode_txt'],
  209. data: [
  210. [0,'{$Labels->GetLabel('__DISABLED__')}'],[4,'Strobe Light']
  211. ]
  212. }),
  213. valueField: 'mode',
  214. displayField: 'mode_txt',
  215. value: '{$CBIV_D}',
  216. width: 120,
  217. listeners:{
  218. select: function( a, c, b ){
  219. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 30, a.getValue(), false );
  220. }
  221. }
  222. }]
  223. }
  224. DATA_BOUNDARY;
  225. break;
  226. };
  227. case 2: {
  228. $FFF=$SN['right_side'] . ' ' . $Labels->GetLabel('___SIDE__');
  229. $OCB_SECTION=<<<DATA_BOUNDARY
  230. {
  231. xtype: 'panel',
  232. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  233. html: '{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  234. },{
  235. xtype: 'panel',
  236. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  237. html: '{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  238. },{
  239. xtype: 'spacer',
  240. width: 120
  241. },{
  242. xtype: 'spacer',
  243. width: 120
  244. },{
  245. xtype: 'combo',
  246. id: 'sce_cb_o_1',
  247. lazyRender: true,
  248. mode: 'local',
  249. forceSelection: true,
  250. triggerAction: 'all',
  251. editable: false,
  252. disableKeyFilter: true,
  253. store: new Ext.data.ArrayStore({
  254. fields: ['mode','mode_txt'],
  255. data: [
  256. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  257. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  258. ]
  259. }),
  260. valueField: 'mode',
  261. displayField: 'mode_txt',
  262. value: '{$CBOV_A}',
  263. width: 120,
  264. listeners:{
  265. select: function( a, c, b ){
  266. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 21, b, false );
  267. }
  268. }
  269. },{
  270. xtype: 'combo',
  271. id: 'sce_cb_o_2',
  272. lazyRender: true,
  273. mode: 'local',
  274. forceSelection: true,
  275. triggerAction: 'all',
  276. editable: false,
  277. disableKeyFilter: true,
  278. store: new Ext.data.ArrayStore({
  279. fields: ['mode','mode_txt'],
  280. data: [
  281. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  282. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  283. ]
  284. }),
  285. valueField: 'mode',
  286. displayField: 'mode_txt',
  287. value: '{$CBOV_B}',
  288. width: 120,
  289. listeners:{
  290. select: function( a, c, b ){
  291. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 22, b, false );
  292. }
  293. }
  294. },{
  295. xtype: 'spacer',
  296. width: 120
  297. },{
  298. xtype: 'spacer',
  299. width: 120
  300. }
  301. DATA_BOUNDARY;
  302. $ICB_SECTION=<<<DATA_BOUNDARY
  303. {
  304. xtype: 'panel',
  305. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  306. html: 'DI 0 <img id="sce_in_1_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  307. },{
  308. xtype: 'panel',
  309. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  310. html: 'DI 1 <img id="sce_in_2_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  311. },{
  312. xtype: 'panel',
  313. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  314. html: 'DI 2 <img id="sce_in_3_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  315. },{
  316. xtype: 'panel',
  317. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  318. html: 'DI 3 <img id="sce_in_4_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  319. },{
  320. xtype: 'spacer',
  321. height: 5,
  322. colspan: 4
  323. },{
  324. xtype: 'combo',
  325. id: 'sce_cb_i_1',
  326. lazyRender: true,
  327. mode: 'local',
  328. forceSelection: true,
  329. triggerAction: 'all',
  330. editable: false,
  331. disableKeyFilter: true,
  332. store: new Ext.data.ArrayStore({
  333. fields: ['mode','mode_txt'],
  334. data: [
  335. [0,'{$Labels->GetLabel('__DISABLED__')}'],[4,'Strobe Light']
  336. ]
  337. }),
  338. valueField: 'mode',
  339. displayField: 'mode_txt',
  340. value: '{$CBIV_A}',
  341. width: 120,
  342. listeners:{
  343. select: function( a, c, b ){
  344. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 27, a.getValue(), false );
  345. }
  346. }
  347. },{
  348. xtype: 'combo',
  349. id: 'sce_cb_i_2',
  350. lazyRender: true,
  351. mode: 'local',
  352. forceSelection: true,
  353. triggerAction: 'all',
  354. editable: false,
  355. disableKeyFilter: true,
  356. store: new Ext.data.ArrayStore({
  357. fields: ['mode','mode_txt'],
  358. data: [
  359. [0,'{$Labels->GetLabel('__DISABLED__')}'],[4,'Strobe Light']
  360. ]
  361. }),
  362. valueField: 'mode',
  363. displayField: 'mode_txt',
  364. value: '{$CBIV_B}',
  365. width: 120,
  366. listeners:{
  367. select: function( a, c, b ){
  368. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 28, a.getValue(), false );
  369. }
  370. }
  371. },{
  372. xtype: 'combo',
  373. id: 'sce_cb_i_3',
  374. lazyRender: true,
  375. mode: 'local',
  376. forceSelection: true,
  377. triggerAction: 'all',
  378. editable: false,
  379. disableKeyFilter: true,
  380. store: new Ext.data.ArrayStore({
  381. fields: ['mode','mode_txt'],
  382. data: [
  383. [0,'{$Labels->GetLabel('__DISABLED__')}'],[4,'Strobe Light']
  384. ]
  385. }),
  386. valueField: 'mode',
  387. displayField: 'mode_txt',
  388. value: '{$CBIV_C}',
  389. width: 120,
  390. listeners:{
  391. select: function( a, c, b ){
  392. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 29, a.getValue(), false );
  393. }
  394. }
  395. },{
  396. xtype: 'combo',
  397. id: 'sce_cb_i_4',
  398. lazyRender: true,
  399. mode: 'local',
  400. forceSelection: true,
  401. triggerAction: 'all',
  402. editable: false,
  403. disableKeyFilter: true,
  404. store: new Ext.data.ArrayStore({
  405. fields: ['mode','mode_txt'],
  406. data: [
  407. [0,'{$Labels->GetLabel('__DISABLED__')}'],[4,'Strobe Light']
  408. ]
  409. }),
  410. valueField: 'mode',
  411. displayField: 'mode_txt',
  412. value: '{$CBIV_D}',
  413. width: 120,
  414. listeners:{
  415. select: function( a, c, b ){
  416. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 30, a.getValue(), false );
  417. }
  418. }
  419. }]
  420. }
  421. DATA_BOUNDARY;
  422. break;
  423. };
  424. case 3: {
  425. $FFF='TCC ' . $Labels->GetLabel('___MODULE__');
  426. $OCB_SECTION=<<<DATA_BOUNDARY
  427. {
  428. xtype: 'panel',
  429. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  430. html: '{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  431. },{
  432. xtype: 'panel',
  433. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  434. html: '{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  435. },{
  436. xtype: 'panel',
  437. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  438. html: 'Health Signal'
  439. },{
  440. xtype: 'panel',
  441. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  442. html: 'Strobe Light'
  443. },{
  444. xtype: 'combo',
  445. id: 'sce_cb_o_1',
  446. lazyRender: true,
  447. mode: 'local',
  448. forceSelection: true,
  449. triggerAction: 'all',
  450. editable: false,
  451. disableKeyFilter: true,
  452. store: new Ext.data.ArrayStore({
  453. fields: ['mode','mode_txt'],
  454. data: [
  455. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  456. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  457. ]
  458. }),
  459. valueField: 'mode',
  460. displayField: 'mode_txt',
  461. value: '{$CBOV_A}',
  462. width: 120,
  463. listeners:{
  464. select: function( a, c, b ){
  465. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 21, b, false );
  466. }
  467. }
  468. },{
  469. xtype: 'combo',
  470. id: 'sce_cb_o_2',
  471. lazyRender: true,
  472. mode: 'local',
  473. forceSelection: true,
  474. triggerAction: 'all',
  475. editable: false,
  476. disableKeyFilter: true,
  477. store: new Ext.data.ArrayStore({
  478. fields: ['mode','mode_txt'],
  479. data: [
  480. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  481. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  482. ]
  483. }),
  484. valueField: 'mode',
  485. displayField: 'mode_txt',
  486. value: '{$CBOV_B}',
  487. width: 120,
  488. listeners:{
  489. select: function( a, c, b ){
  490. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 22, b, false );
  491. }
  492. }
  493. },{
  494. xtype: 'combo',
  495. id: 'sce_cb_o_3',
  496. lazyRender: true,
  497. mode: 'local',
  498. forceSelection: true,
  499. triggerAction: 'all',
  500. editable: false,
  501. disableKeyFilter: true,
  502. store: new Ext.data.ArrayStore({
  503. fields: ['mode','mode_txt'],
  504. data: [
  505. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  506. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  507. ]
  508. }),
  509. valueField: 'mode',
  510. displayField: 'mode_txt',
  511. value: '{$CBOV_C}',
  512. width: 120,
  513. listeners:{
  514. select: function( a, c, b ){
  515. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 23, b, false );
  516. }
  517. }
  518. },{
  519. xtype: 'combo',
  520. id: 'sce_cb_o_4',
  521. lazyRender: true,
  522. mode: 'local',
  523. forceSelection: true,
  524. triggerAction: 'all',
  525. editable: false,
  526. disableKeyFilter: true,
  527. store: new Ext.data.ArrayStore({
  528. fields: ['mode','mode_txt'],
  529. data: [
  530. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  531. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  532. ]
  533. }),
  534. valueField: 'mode',
  535. displayField: 'mode_txt',
  536. value: '{$CBOV_D}',
  537. width: 120,
  538. listeners:{
  539. select: function( a, c, b ){
  540. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 24, b, false );
  541. }
  542. }
  543. }
  544. DATA_BOUNDARY;
  545. $ICB_SECTION=<<<DATA_BOUNDARY
  546. {
  547. xtype: 'panel',
  548. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  549. html: 'DI 0 <img id="sce_in_1_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  550. },{
  551. xtype: 'panel',
  552. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  553. html: 'DI 1 <img id="sce_in_2_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  554. },{
  555. xtype: 'panel',
  556. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  557. html: 'DI 2 <img id="sce_in_3_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  558. },{
  559. xtype: 'panel',
  560. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  561. html: 'DI 3 <img id="sce_in_4_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  562. },{
  563. xtype: 'spacer',
  564. height: 5,
  565. colspan: 4
  566. },{
  567. xtype: 'combo',
  568. id: 'sce_cb_i_1',
  569. lazyRender: true,
  570. mode: 'local',
  571. forceSelection: true,
  572. triggerAction: 'all',
  573. editable: false,
  574. disableKeyFilter: true,
  575. store: new Ext.data.ArrayStore({
  576. fields: ['mode','mode_txt'],
  577. data: [
  578. [0,'{$Labels->GetLabel('__DISABLED__')}'],[3,'Dismiss Alarms'],[5,'Dismiss Platform']
  579. ]
  580. }),
  581. valueField: 'mode',
  582. displayField: 'mode_txt',
  583. value: '{$CBIV_A}',
  584. width: 120,
  585. listeners:{
  586. select: function( a, c, b ){
  587. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 27, a.getValue(), false );
  588. }
  589. }
  590. },{
  591. xtype: 'combo',
  592. id: 'sce_cb_i_2',
  593. lazyRender: true,
  594. mode: 'local',
  595. forceSelection: true,
  596. triggerAction: 'all',
  597. editable: false,
  598. disableKeyFilter: true,
  599. store: new Ext.data.ArrayStore({
  600. fields: ['mode','mode_txt'],
  601. data: [
  602. [0,'{$Labels->GetLabel('__DISABLED__')}'],[3,'Dismiss Alarms'],[5,'Dismiss Platform']
  603. ]
  604. }),
  605. valueField: 'mode',
  606. displayField: 'mode_txt',
  607. value: '{$CBIV_B}',
  608. width: 120,
  609. listeners:{
  610. select: function( a, c, b ){
  611. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 28, a.getValue(), false );
  612. }
  613. }
  614. },{
  615. xtype: 'combo',
  616. id: 'sce_cb_i_3',
  617. lazyRender: true,
  618. mode: 'local',
  619. forceSelection: true,
  620. triggerAction: 'all',
  621. editable: false,
  622. disableKeyFilter: true,
  623. store: new Ext.data.ArrayStore({
  624. fields: ['mode','mode_txt'],
  625. data: [
  626. [0,'{$Labels->GetLabel('__DISABLED__')}'],[3,'Dismiss Alarms'],[5,'Dismiss Platform']
  627. ]
  628. }),
  629. valueField: 'mode',
  630. displayField: 'mode_txt',
  631. value: '{$CBIV_C}',
  632. width: 120,
  633. listeners:{
  634. select: function( a, c, b ){
  635. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 29, a.getValue(), false );
  636. }
  637. }
  638. },{
  639. xtype: 'combo',
  640. id: 'sce_cb_i_4',
  641. lazyRender: true,
  642. mode: 'local',
  643. forceSelection: true,
  644. triggerAction: 'all',
  645. editable: false,
  646. disableKeyFilter: true,
  647. store: new Ext.data.ArrayStore({
  648. fields: ['mode','mode_txt'],
  649. data: [
  650. [0,'{$Labels->GetLabel('__DISABLED__')}'],[3,'Dismiss Alarms'],[5,'Dismiss Platform']
  651. ]
  652. }),
  653. valueField: 'mode',
  654. displayField: 'mode_txt',
  655. value: '{$CBIV_D}',
  656. width: 120,
  657. listeners:{
  658. select: function( a, c, b ){
  659. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 30, a.getValue(), false );
  660. }
  661. }
  662. }]
  663. }
  664. DATA_BOUNDARY;
  665. break;
  666. };
  667. default: {
  668. $FFF='Not Assignet';
  669. $OCB_SECTION=<<<DATA_BOUNDARY
  670. {
  671. xtype: 'panel',
  672. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  673. html: '{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  674. },{
  675. xtype: 'panel',
  676. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  677. html: '{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'
  678. },{
  679. xtype: 'panel',
  680. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  681. html: 'Health Signal'
  682. },{
  683. xtype: 'panel',
  684. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  685. html: 'AUX Signal'
  686. },{
  687. xtype: 'combo',
  688. id: 'sce_cb_o_1',
  689. lazyRender: true,
  690. mode: 'local',
  691. forceSelection: true,
  692. triggerAction: 'all',
  693. editable: false,
  694. disableKeyFilter: true,
  695. store: new Ext.data.ArrayStore({
  696. fields: ['mode','mode_txt'],
  697. data: [
  698. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  699. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  700. ]
  701. }),
  702. valueField: 'mode',
  703. displayField: 'mode_txt',
  704. value: '{$CBOV_A}',
  705. width: 120,
  706. listeners:{
  707. select: function( a, c, b ){
  708. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 21, b, false );
  709. }
  710. }
  711. },{
  712. xtype: 'combo',
  713. id: 'sce_cb_o_2',
  714. lazyRender: true,
  715. mode: 'local',
  716. forceSelection: true,
  717. triggerAction: 'all',
  718. editable: false,
  719. disableKeyFilter: true,
  720. store: new Ext.data.ArrayStore({
  721. fields: ['mode','mode_txt'],
  722. data: [
  723. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  724. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  725. ]
  726. }),
  727. valueField: 'mode',
  728. displayField: 'mode_txt',
  729. value: '{$CBOV_B}',
  730. width: 120,
  731. listeners:{
  732. select: function( a, c, b ){
  733. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 22, b, false );
  734. }
  735. }
  736. },{
  737. xtype: 'combo',
  738. id: 'sce_cb_o_3',
  739. lazyRender: true,
  740. mode: 'local',
  741. forceSelection: true,
  742. triggerAction: 'all',
  743. editable: false,
  744. disableKeyFilter: true,
  745. store: new Ext.data.ArrayStore({
  746. fields: ['mode','mode_txt'],
  747. data: [
  748. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  749. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  750. ]
  751. }),
  752. valueField: 'mode',
  753. displayField: 'mode_txt',
  754. value: '{$CBOV_C}',
  755. width: 120,
  756. listeners:{
  757. select: function( a, c, b ){
  758. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 23, b, false );
  759. }
  760. }
  761. },{
  762. xtype: 'combo',
  763. id: 'sce_cb_o_4',
  764. lazyRender: true,
  765. mode: 'local',
  766. forceSelection: true,
  767. triggerAction: 'all',
  768. editable: false,
  769. disableKeyFilter: true,
  770. store: new Ext.data.ArrayStore({
  771. fields: ['mode','mode_txt'],
  772. data: [
  773. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  774. [1,'Coil D0'],[2,'Coil D1'],[3,'Coil D2'],[4,'Coil D3']
  775. ]
  776. }),
  777. valueField: 'mode',
  778. displayField: 'mode_txt',
  779. value: '{$CBOV_D}',
  780. width: 120,
  781. listeners:{
  782. select: function( a, c, b ){
  783. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 24, b, false );
  784. }
  785. }
  786. }
  787. DATA_BOUNDARY;
  788. $ICB_SECTION=<<<DATA_BOUNDARY
  789. {
  790. xtype: 'panel',
  791. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  792. html: 'DI 0 <img id="sce_in_1_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  793. },{
  794. xtype: 'panel',
  795. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  796. html: 'DI 1 <img id="sce_in_2_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  797. },{
  798. xtype: 'panel',
  799. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  800. html: 'DI 2 <img id="sce_in_3_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  801. },{
  802. xtype: 'panel',
  803. bodyCssClass:'_infoPanel', bodyStyle: 'font-size: 10px; background-color: #000; text-align: center;',
  804. html: 'DI 3 <img id="sce_in_4_img" width="8px" src="/style/assets/sm_ico_gw.png">'
  805. },{
  806. xtype: 'spacer',
  807. height: 5,
  808. colspan: 4
  809. },{
  810. xtype: 'combo',
  811. id: 'sce_cb_i_1',
  812. lazyRender: true,
  813. mode: 'local',
  814. forceSelection: true,
  815. triggerAction: 'all',
  816. editable: false,
  817. disableKeyFilter: true,
  818. store: new Ext.data.ArrayStore({
  819. fields: ['mode','mode_txt'],
  820. data: [
  821. [0,'{$Labels->GetLabel('__DISABLED__')}'],[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Dismiss Alarms'],[4,'Strobe Light'],[5,'Dismiss Platform']
  822. ]
  823. }),
  824. valueField: 'mode',
  825. displayField: 'mode_txt',
  826. value: '{$CBIV_A}',
  827. width: 120,
  828. listeners:{
  829. select: function( a, c, b ){
  830. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 27, a.getValue(), false );
  831. }
  832. }
  833. },{
  834. xtype: 'combo',
  835. id: 'sce_cb_i_2',
  836. lazyRender: true,
  837. mode: 'local',
  838. forceSelection: true,
  839. triggerAction: 'all',
  840. editable: false,
  841. disableKeyFilter: true,
  842. store: new Ext.data.ArrayStore({
  843. fields: ['mode','mode_txt'],
  844. data: [
  845. [0,'{$Labels->GetLabel('__DISABLED__')}'],[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Dismiss Alarms'],[4,'Strobe Light'],[5,'Dismiss Platform']
  846. ]
  847. }),
  848. valueField: 'mode',
  849. displayField: 'mode_txt',
  850. value: '{$CBIV_B}',
  851. width: 120,
  852. listeners:{
  853. select: function( a, c, b ){
  854. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 28, a.getValue(), false );
  855. }
  856. }
  857. },{
  858. xtype: 'combo',
  859. id: 'sce_cb_i_3',
  860. lazyRender: true,
  861. mode: 'local',
  862. forceSelection: true,
  863. triggerAction: 'all',
  864. editable: false,
  865. disableKeyFilter: true,
  866. store: new Ext.data.ArrayStore({
  867. fields: ['mode','mode_txt'],
  868. data: [
  869. [0,'{$Labels->GetLabel('__DISABLED__')}'],[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Dismiss Alarms'],[4,'Strobe Light'],[5,'Dismiss Platform']
  870. ]
  871. }),
  872. valueField: 'mode',
  873. displayField: 'mode_txt',
  874. value: '{$CBIV_C}',
  875. width: 120,
  876. listeners:{
  877. select: function( a, c, b ){
  878. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 29, a.getValue(), false );
  879. }
  880. }
  881. },{
  882. xtype: 'combo',
  883. id: 'sce_cb_i_4',
  884. lazyRender: true,
  885. mode: 'local',
  886. forceSelection: true,
  887. triggerAction: 'all',
  888. editable: false,
  889. disableKeyFilter: true,
  890. store: new Ext.data.ArrayStore({
  891. fields: ['mode','mode_txt'],
  892. data: [
  893. [0,'{$Labels->GetLabel('__DISABLED__')}'],[1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Dismiss Alarms'],[4,'Strobe Light'],[5,'Dismiss Platform']
  894. ]
  895. }),
  896. valueField: 'mode',
  897. displayField: 'mode_txt',
  898. value: '{$CBIV_D}',
  899. width: 120,
  900. listeners:{
  901. select: function( a, c, b ){
  902. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 30, a.getValue(), false );
  903. }
  904. }
  905. }]
  906. }
  907. DATA_BOUNDARY;
  908. };
  909. };
  910. $MODBUS=<<<DATA_BOUNDARY
  911. {
  912. xtype: 'panel',
  913. l00ayout: 'table',
  914. id: 'c_sca_e_panel',
  915. border: false,
  916. frame: false,
  917. c_do_val: {$CCCV},
  918. c_in_val: {$CIVA},
  919. width: '100%',
  920. items:[{
  921. xtype: 'panel',
  922. layout: 'table',
  923. border: false,
  924. frame: false,
  925. width: '100%',
  926. defaults: { bodyStyle:'padding:10px; text-align: center;'},
  927. layoutConfig: { columns: 2 },
  928. items:[{
  929. xtype: 'panel',
  930. border: false,
  931. frame: false,
  932. width: 160,
  933. html: '<table width="128px" border=0><tr><td class="medium_prop_logo" id="adam">&nbsp;</td></tr></table>'
  934. },{
  935. xtype: 'form',
  936. border: false,
  937. frame: false,
  938. labelWidth: 100,
  939. labelAlign: 'right',
  940. width: '100%',
  941. items:[{
  942. xtype: 'panel',
  943. border: false,
  944. frame: false,
  945. html: '<table width="100%" border=0><tr><td class="small_prop_title" align="center" style="font-size: 14px; font-weight: bold;">{$Labels->GetLabel('_MODBUS_RTU_')}:{$FFF}</td><td><img id="scae_onl_sts" src="/style/assets/bul_gray.png"></td></tr></table>'
  946. },{
  947. xtype: 'spacer',
  948. height: 5
  949. },{
  950. xtype: 'combo',
  951. id: 'sca_func',
  952. fieldLabel: "{$Labels->GetLabel('_MO_FUNC_')}",
  953. lazyRender: true,
  954. mode: 'local',
  955. forceSelection: true,
  956. triggerAction: 'all',
  957. editable: false,
  958. disableKeyFilter: true,
  959. store: new Ext.data.ArrayStore({
  960. fields: ['mode','mode_txt'],
  961. data: [
  962. ['0','{$Labels->GetLabel('__DEFAULT__')}'],
  963. ['1','{$SN['left_side']} {$Labels->GetLabel('___MODULE__')}'],
  964. ['2','{$SN['right_side']} {$Labels->GetLabel('___MODULE__')}'],
  965. ['3','TCC Module']
  966. ]
  967. }),
  968. valueField: 'mode',
  969. displayField: 'mode_txt',
  970. value: '{$SC['func']}',
  971. width: 200,
  972. listeners:{
  973. select: function( a, c, b ){
  974. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 14, b, true );
  975. }
  976. }
  977. },{
  978. xtype: 'combo',
  979. id: 'sca_ena',
  980. fieldLabel: "{$Labels->GetLabel('_STATUS_')}",
  981. lazyRender: true,
  982. mode: 'local',
  983. forceSelection: true,
  984. triggerAction: 'all',
  985. editable: false,
  986. disableKeyFilter: true,
  987. store: new Ext.data.ArrayStore({
  988. fields: ['mode','mode_txt'],
  989. data: [
  990. ['D','{$Labels->GetLabel('__DISABLED__')}'],
  991. ['E','{$Labels->GetLabel('___ENABLED__')}']
  992. ]
  993. }),
  994. valueField: 'mode',
  995. displayField: 'mode_txt',
  996. value: '{$SC['wm']}',
  997. width: 200,
  998. listeners:{
  999. select: function( a, c, b ){
  1000. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 17, b, true );
  1001. }
  1002. }
  1003. },{
  1004. xtype: 'textfield',
  1005. id: 'sca_ip',
  1006. fieldLabel: '{$Labels->GetLabel('_DEVICE_IP_')}',
  1007. maxlength: 64,
  1008. value: '{$SC['ip4']}',
  1009. listeners:{
  1010. change: function( a, c, b ){
  1011. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 15, c, true );
  1012. }
  1013. }
  1014. },{
  1015. xtype: 'textfield',
  1016. id: 'sca_port',
  1017. fieldLabel: '{$Labels->GetLabel('_DEVICE_PORT_')}',
  1018. maxlength: 2,
  1019. value: '{$SC['port']}',
  1020. listeners:{
  1021. change: function( a, c, b ){
  1022. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 16, c, true );
  1023. }
  1024. }
  1025. }]
  1026. }]
  1027. },{
  1028. xtype: 'panel',
  1029. layout: 'table',
  1030. border: true,
  1031. frame: false,
  1032. width: '100%',
  1033. defaults: { bodyStyle:'padding:10px; text-align: center;' },
  1034. layoutConfig: { columns: 4 },
  1035. items:[{$OCB_SECTION},{
  1036. xtype: 'spacer',
  1037. height: 10,
  1038. colspan: 4
  1039. },{
  1040. xtype: 'button',
  1041. id: 'sc_tbtn_1',
  1042. enableToggle: true,
  1043. allowDepress: true,
  1044. width: '80%',
  1045. text: 'Test D0',
  1046. pressed: {$P1},
  1047. disabled: true,
  1048. handler: function( b, e ){
  1049. b.disable();
  1050. var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
  1051. if( b.pressed ){
  1052. //{$CCCV}
  1053. doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 1 )& 0xFF), false );
  1054. } else {
  1055. doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~1 ) ) & 0xFF), false );
  1056. };
  1057. }
  1058. },{
  1059. xtype: 'button',
  1060. id: 'sc_tbtn_2',
  1061. width: '80%',
  1062. enableToggle: true,
  1063. allowDepress: true,
  1064. text: 'Test D1',
  1065. pressed: {$P2},
  1066. disabled: true,
  1067. handler: function( b, e ){
  1068. b.disable();
  1069. var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
  1070. if( b.pressed ){
  1071. doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 2 )& 0xFF), false );
  1072. } else {
  1073. doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~2 ) ) & 0xFF), false );
  1074. };
  1075. }
  1076. },{
  1077. xtype: 'button',
  1078. id: 'sc_tbtn_3',
  1079. enableToggle: true,
  1080. allowDepress: true,
  1081. width: '80%',
  1082. text: 'Test D2',
  1083. pressed: {$P3},
  1084. disabled: true,
  1085. handler: function( b, e ){
  1086. b.disable();
  1087. var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
  1088. if( b.pressed ){
  1089. doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 4 )& 0xFF), false );
  1090. } else {
  1091. doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~4 ) ) & 0xFF), false );
  1092. };
  1093. }
  1094. },{
  1095. xtype: 'button',
  1096. id: 'sc_tbtn_4',
  1097. enableToggle: true,
  1098. allowDepress: true,
  1099. width: '80%',
  1100. text: 'Test D3',
  1101. pressed: {$P4},
  1102. disabled: true,
  1103. handler: function( b, e ){
  1104. b.disable();
  1105. var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
  1106. if( b.pressed ){
  1107. doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 8 )& 0xFF), false );
  1108. } else {
  1109. doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~8 ) )& 0xFF ), false );
  1110. };
  1111. }
  1112. },{
  1113. xtype: 'spacer',
  1114. height: 5,
  1115. colspan: 4
  1116. },{$ICB_SECTION},{
  1117. xtype: 'spacer',
  1118. height: 5,
  1119. colspan: 4
  1120. },{
  1121. xtype: 'button',
  1122. text: 'Remove this Scada Module',
  1123. width: '100%',
  1124. handler: function(){
  1125. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 19, 'true', true );
  1126. }
  1127. }],
  1128. listeners: {
  1129. afterrender: function( panel ){
  1130. fetchScadaEditorStatus();
  1131. },
  1132. beforedestroy: function(panel) {
  1133. stopScadaEditorStatusUpdate();
  1134. }
  1135. }
  1136. }
  1137. DATA_BOUNDARY;
  1138. echo $MODBUS;
  1139. } else {
  1140. echo '{ xtype: \'panel\', html: \'Node '.$_POST['EID'].' Loadded\'}';
  1141. };
  1142. } else {
  1143. header('location: /');
  1144. };
  1145. ?>