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.

1148 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__')}'],[1,'Dismiss Alarms Only'],[2,'Dismiss ALL 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__')}'],[1,'Dismiss Alarms Only'],[2,'Dismiss ALL 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__')}'],[1,'Dismiss Alarms Only'],[2,'Dismiss ALL 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__')}'],[1,'Dismiss Alarms Only'],[2,'Dismiss ALL 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__')}'],
  822. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  823. ]
  824. }),
  825. valueField: 'mode',
  826. displayField: 'mode_txt',
  827. value: '{$CBIV_A}',
  828. width: 120,
  829. listeners:{
  830. select: function( a, c, b ){
  831. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 27, a.getValue(), false );
  832. }
  833. }
  834. },{
  835. xtype: 'combo',
  836. id: 'sce_cb_i_2',
  837. lazyRender: true,
  838. mode: 'local',
  839. forceSelection: true,
  840. triggerAction: 'all',
  841. editable: false,
  842. disableKeyFilter: true,
  843. store: new Ext.data.ArrayStore({
  844. fields: ['mode','mode_txt'],
  845. data: [
  846. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  847. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  848. ]
  849. }),
  850. valueField: 'mode',
  851. displayField: 'mode_txt',
  852. value: '{$CBIV_B}',
  853. width: 120,
  854. listeners:{
  855. select: function( a, c, b ){
  856. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 28, a.getValue(), false );
  857. }
  858. }
  859. },{
  860. xtype: 'combo',
  861. id: 'sce_cb_i_3',
  862. lazyRender: true,
  863. mode: 'local',
  864. forceSelection: true,
  865. triggerAction: 'all',
  866. editable: false,
  867. disableKeyFilter: true,
  868. store: new Ext.data.ArrayStore({
  869. fields: ['mode','mode_txt'],
  870. data: [
  871. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  872. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  873. ]
  874. }),
  875. valueField: 'mode',
  876. displayField: 'mode_txt',
  877. value: '{$CBIV_C}',
  878. width: 120,
  879. listeners:{
  880. select: function( a, c, b ){
  881. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 29, a.getValue(), false );
  882. }
  883. }
  884. },{
  885. xtype: 'combo',
  886. id: 'sce_cb_i_4',
  887. lazyRender: true,
  888. mode: 'local',
  889. forceSelection: true,
  890. triggerAction: 'all',
  891. editable: false,
  892. disableKeyFilter: true,
  893. store: new Ext.data.ArrayStore({
  894. fields: ['mode','mode_txt'],
  895. data: [
  896. [0,'{$Labels->GetLabel('__DISABLED__')}'],
  897. [1,'{$UTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[2,'{$BTN} {$Labels->GetLabel('_LBL_TRACK_')}'],[3,'Both'],[4,'TCC AUX']
  898. ]
  899. }),
  900. valueField: 'mode',
  901. displayField: 'mode_txt',
  902. value: '{$CBIV_D}',
  903. width: 120,
  904. listeners:{
  905. select: function( a, c, b ){
  906. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 30, a.getValue(), false );
  907. }
  908. }
  909. }]
  910. }
  911. DATA_BOUNDARY;
  912. };
  913. };
  914. $MODBUS=<<<DATA_BOUNDARY
  915. {
  916. xtype: 'panel',
  917. l00ayout: 'table',
  918. id: 'c_sca_e_panel',
  919. border: false,
  920. frame: false,
  921. c_do_val: {$CCCV},
  922. c_in_val: {$CIVA},
  923. width: '100%',
  924. items:[{
  925. xtype: 'panel',
  926. layout: 'table',
  927. border: false,
  928. frame: false,
  929. width: '100%',
  930. defaults: { bodyStyle:'padding:10px; text-align: center;'},
  931. layoutConfig: { columns: 2 },
  932. items:[{
  933. xtype: 'panel',
  934. border: false,
  935. frame: false,
  936. width: 160,
  937. html: '<table width="128px" border=0><tr><td class="medium_prop_logo" id="adam">&nbsp;</td></tr></table>'
  938. },{
  939. xtype: 'form',
  940. border: false,
  941. frame: false,
  942. labelWidth: 100,
  943. labelAlign: 'right',
  944. width: '100%',
  945. items:[{
  946. xtype: 'panel',
  947. border: false,
  948. frame: false,
  949. 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>'
  950. },{
  951. xtype: 'spacer',
  952. height: 5
  953. },{
  954. xtype: 'combo',
  955. id: 'sca_func',
  956. fieldLabel: "{$Labels->GetLabel('_MO_FUNC_')}",
  957. lazyRender: true,
  958. mode: 'local',
  959. forceSelection: true,
  960. triggerAction: 'all',
  961. editable: false,
  962. disableKeyFilter: true,
  963. store: new Ext.data.ArrayStore({
  964. fields: ['mode','mode_txt'],
  965. data: [
  966. ['0','{$Labels->GetLabel('__DEFAULT__')}'],
  967. ['1','{$SN['left_side']} {$Labels->GetLabel('___MODULE__')}'],
  968. ['2','{$SN['right_side']} {$Labels->GetLabel('___MODULE__')}'],
  969. ['3','TCC Module']
  970. ]
  971. }),
  972. valueField: 'mode',
  973. displayField: 'mode_txt',
  974. value: '{$SC['func']}',
  975. width: 200,
  976. listeners:{
  977. select: function( a, c, b ){
  978. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 14, b, true );
  979. }
  980. }
  981. },{
  982. xtype: 'combo',
  983. id: 'sca_ena',
  984. fieldLabel: "{$Labels->GetLabel('_STATUS_')}",
  985. lazyRender: true,
  986. mode: 'local',
  987. forceSelection: true,
  988. triggerAction: 'all',
  989. editable: false,
  990. disableKeyFilter: true,
  991. store: new Ext.data.ArrayStore({
  992. fields: ['mode','mode_txt'],
  993. data: [
  994. ['D','{$Labels->GetLabel('__DISABLED__')}'],
  995. ['E','{$Labels->GetLabel('___ENABLED__')}']
  996. ]
  997. }),
  998. valueField: 'mode',
  999. displayField: 'mode_txt',
  1000. value: '{$SC['wm']}',
  1001. width: 200,
  1002. listeners:{
  1003. select: function( a, c, b ){
  1004. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 17, b, true );
  1005. }
  1006. }
  1007. },{
  1008. xtype: 'textfield',
  1009. id: 'sca_ip',
  1010. fieldLabel: '{$Labels->GetLabel('_DEVICE_IP_')}',
  1011. maxlength: 64,
  1012. value: '{$SC['ip4']}',
  1013. listeners:{
  1014. change: function( a, c, b ){
  1015. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 15, c, true );
  1016. }
  1017. }
  1018. },{
  1019. xtype: 'textfield',
  1020. id: 'sca_port',
  1021. fieldLabel: '{$Labels->GetLabel('_DEVICE_PORT_')}',
  1022. maxlength: 2,
  1023. value: '{$SC['port']}',
  1024. listeners:{
  1025. change: function( a, c, b ){
  1026. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 16, c, true );
  1027. }
  1028. }
  1029. }]
  1030. }]
  1031. },{
  1032. xtype: 'panel',
  1033. layout: 'table',
  1034. border: true,
  1035. frame: false,
  1036. width: '100%',
  1037. defaults: { bodyStyle:'padding:10px; text-align: center;' },
  1038. layoutConfig: { columns: 4 },
  1039. items:[{$OCB_SECTION},{
  1040. xtype: 'spacer',
  1041. height: 10,
  1042. colspan: 4
  1043. },{
  1044. xtype: 'button',
  1045. id: 'sc_tbtn_1',
  1046. enableToggle: true,
  1047. allowDepress: true,
  1048. width: '80%',
  1049. text: 'Test D0',
  1050. pressed: {$P1},
  1051. disabled: true,
  1052. handler: function( b, e ){
  1053. b.disable();
  1054. var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
  1055. if( b.pressed ){
  1056. //{$CCCV}
  1057. doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 1 )& 0xFF), false );
  1058. } else {
  1059. doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~1 ) ) & 0xFF), false );
  1060. };
  1061. }
  1062. },{
  1063. xtype: 'button',
  1064. id: 'sc_tbtn_2',
  1065. width: '80%',
  1066. enableToggle: true,
  1067. allowDepress: true,
  1068. text: 'Test D1',
  1069. pressed: {$P2},
  1070. disabled: true,
  1071. handler: function( b, e ){
  1072. b.disable();
  1073. var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
  1074. if( b.pressed ){
  1075. doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 2 )& 0xFF), false );
  1076. } else {
  1077. doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~2 ) ) & 0xFF), false );
  1078. };
  1079. }
  1080. },{
  1081. xtype: 'button',
  1082. id: 'sc_tbtn_3',
  1083. enableToggle: true,
  1084. allowDepress: true,
  1085. width: '80%',
  1086. text: 'Test D2',
  1087. pressed: {$P3},
  1088. disabled: true,
  1089. handler: function( b, e ){
  1090. b.disable();
  1091. var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
  1092. if( b.pressed ){
  1093. doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 4 )& 0xFF), false );
  1094. } else {
  1095. doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~4 ) ) & 0xFF), false );
  1096. };
  1097. }
  1098. },{
  1099. xtype: 'button',
  1100. id: 'sc_tbtn_4',
  1101. enableToggle: true,
  1102. allowDepress: true,
  1103. width: '80%',
  1104. text: 'Test D3',
  1105. pressed: {$P4},
  1106. disabled: true,
  1107. handler: function( b, e ){
  1108. b.disable();
  1109. var cv = Ext.getCmp('c_sca_e_panel').c_do_val;
  1110. if( b.pressed ){
  1111. doPlatformOperation( {$SC['platform_id']}, 18, (( cv | 8 )& 0xFF), false );
  1112. } else {
  1113. doPlatformOperation( {$SC['platform_id']}, 18, (( cv & ( ~8 ) )& 0xFF ), false );
  1114. };
  1115. }
  1116. },{
  1117. xtype: 'spacer',
  1118. height: 5,
  1119. colspan: 4
  1120. },{$ICB_SECTION},{
  1121. xtype: 'spacer',
  1122. height: 5,
  1123. colspan: 4
  1124. },{
  1125. xtype: 'button',
  1126. text: 'Remove this Scada Module',
  1127. width: '100%',
  1128. handler: function(){
  1129. doScadaOperation( {$SC['platform_id']}, {$SC['id']}, 19, 'true', true );
  1130. }
  1131. }],
  1132. listeners: {
  1133. afterrender: function( panel ){
  1134. fetchScadaEditorStatus();
  1135. },
  1136. beforedestroy: function(panel) {
  1137. stopScadaEditorStatusUpdate();
  1138. }
  1139. }
  1140. }
  1141. DATA_BOUNDARY;
  1142. echo $MODBUS;
  1143. } else {
  1144. echo '{ xtype: \'panel\', html: \'Node '.$_POST['EID'].' Loadded\'}';
  1145. };
  1146. } else {
  1147. header('location: /');
  1148. };
  1149. ?>