@ -14,27 +14,28 @@
if ( ( $CCCV & 0x08 ) == 0x08 ) $P4 = 'true' ; else $P4 = 'false' ;
if ( ( $CCCV & 0x08 ) == 0x08 ) $P4 = 'true' ; else $P4 = 'false' ;
$MODBUS =<<< DATA_BOUNDARY
$MODBUS =<<< DATA_BOUNDARY
{
{
xtype : 'panel' ,
l00ayout : 'table' ,
border : false ,
frame : false ,
width : '100%' ,
items : [{
xtype : 'panel' ,
xtype : 'panel' ,
layout : 'table' ,
layout : 'table' ,
border : false ,
border : false ,
frame : false ,
frame : false ,
width : '100%' ,
width : '100%' ,
defaults : {
// applied to each contained panel
bodyStyle : 'padding:10px; text-align: center;'
},
layoutConfig : {
// The total column count must be specified here
columns : 2
},
defaults : { bodyStyle : 'padding:10px; text-align: center;' },
layoutConfig : { columns : 2 },
items : [{
items : [{
xtype : 'panel' ,
xtype : 'panel' ,
border : false ,
border : false ,
frame : false ,
frame : false ,
rowspan : 2 ,
html : '<table width="100%" border=0><tr><td class="small_prop_logo" id="adam"> </td></tr></table>'
html : '<table width="100%" border=0><tr><td class="small_prop_logo" id="adam"> </td></tr></table>'
},{
},{
xtype : 'form' ,
xtype : 'form' ,
border : false ,
frame : false ,
labelWidth : 150 ,
labelWidth : 150 ,
labelAlign : 'right' ,
labelAlign : 'right' ,
width : '100%' ,
width : '100%' ,
@ -42,7 +43,7 @@
xtype : 'panel' ,
xtype : 'panel' ,
border : false ,
border : false ,
frame : false ,
frame : false ,
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_ ')}:{$SC[' label ']}</td></tr></table>'
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_ ')}:{$SC[' label ']}</td><td><img id="scae_onl_sts" src="/style/assets/bul_gray.png"> </td></tr></table>'
},{
},{
xtype : 'textfield' ,
xtype : 'textfield' ,
id : 'sca_label' ,
id : 'sca_label' ,
@ -74,7 +75,7 @@
valueField : 'mode' ,
valueField : 'mode' ,
displayField : 'mode_txt' ,
displayField : 'mode_txt' ,
value : '{$SC[' wm ']}' ,
value : '{$SC[' wm ']}' ,
f width: 200 ,
width : 200 ,
listeners : {
listeners : {
select : function ( a , c , b ){
select : function ( a , c , b ){
doScadaOperation ( { $SC [ 'platform_id' ]}, { $SC [ 'id' ]}, 17 , b , true );
doScadaOperation ( { $SC [ 'platform_id' ]}, { $SC [ 'id' ]}, 17 , b , true );
@ -102,20 +103,16 @@
doPlatformOperation ( { $SC [ 'platform_id' ]}, 16 , c , true );
doPlatformOperation ( { $SC [ 'platform_id' ]}, 16 , c , true );
}
}
}
}
}]
}]
},{
},{
xtype : 'panel' ,
xtype : 'panel' ,
layout : 'table' ,
layout : 'table' ,
border : fals e,
border : tru e,
frame : false ,
frame : false ,
width : '100%' ,
width : '100%' ,
defaults : {
// applied to each contained panel
bodyStyle : 'padding:10px; text-align: center;'
},
layoutConfig : {
// The total column count must be specified here
columns : 4
},
defaults : { bodyStyle : 'padding:10px; text-align: center;' },
layoutConfig : { columns : 4 },
items : [{
items : [{
xtype : 'panel' ,
xtype : 'panel' ,
bodyCssClass : '_infoPanel' , bodyStyle : 'font-size: 10px; background-color: #000; text-align: center;' ,
bodyCssClass : '_infoPanel' , bodyStyle : 'font-size: 10px; background-color: #000; text-align: center;' ,
@ -150,7 +147,7 @@
valueField : 'mode' ,
valueField : 'mode' ,
displayField : 'mode_txt' ,
displayField : 'mode_txt' ,
value : '{$SC[' crossbar_a ']}' ,
value : '{$SC[' crossbar_a ']}' ,
width : 10 0 ,
width : 12 0 ,
listeners : {
listeners : {
select : function ( a , c , b ){
select : function ( a , c , b ){
//doPlatformOperation( {$SC['platform_id']}, 12, b, true );
//doPlatformOperation( {$SC['platform_id']}, 12, b, true );
@ -174,7 +171,7 @@
valueField : 'mode' ,
valueField : 'mode' ,
displayField : 'mode_txt' ,
displayField : 'mode_txt' ,
value : '{$SC[' crossbar_b ']}' ,
value : '{$SC[' crossbar_b ']}' ,
width : 10 0 ,
width : 12 0 ,
listeners : {
listeners : {
select : function ( a , c , b ){
select : function ( a , c , b ){
//doPlatformOperation( {$SC['platform_id']}, 12, b, true );
//doPlatformOperation( {$SC['platform_id']}, 12, b, true );
@ -198,7 +195,7 @@
valueField : 'mode' ,
valueField : 'mode' ,
displayField : 'mode_txt' ,
displayField : 'mode_txt' ,
value : '{$SC[' crossbar_c ']}' ,
value : '{$SC[' crossbar_c ']}' ,
width : 10 0 ,
width : 12 0 ,
listeners : {
listeners : {
select : function ( a , c , b ){
select : function ( a , c , b ){
//doPlatformOperation( {$SC['platform_id']}, 12, b, true );
//doPlatformOperation( {$SC['platform_id']}, 12, b, true );
@ -222,7 +219,7 @@
valueField : 'mode' ,
valueField : 'mode' ,
displayField : 'mode_txt' ,
displayField : 'mode_txt' ,
value : '{$SC[' crossbar_d ']}' ,
value : '{$SC[' crossbar_d ']}' ,
width : 10 0 ,
width : 12 0 ,
listeners : {
listeners : {
select : function ( a , c , b ){
select : function ( a , c , b ){
//doPlatformOperation( {$SC['platform_id']}, 12, b, true );
//doPlatformOperation( {$SC['platform_id']}, 12, b, true );
@ -243,58 +240,66 @@
colspan : 4
colspan : 4
},{
},{
xtype : 'button' ,
xtype : 'button' ,
id : 'sc_tbtn_1' ,
enableToggle : true ,
enableToggle : true ,
allowDepress : true ,
allowDepress : true ,
width : '80%' ,
width : '80%' ,
text : 'Test D1' ,
text : 'Test D1' ,
pressed : { $P1 },
pressed : { $P1 },
handler : function ( b , e ){
handler : function ( b , e ){
b . disable ();
if ( b . pressed ){
if ( b . pressed ){
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } | 1 ), tru e );
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } | 1 ), fals e );
} else {
} else {
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } & ( ~ 1 ) ), tru e );
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } & ( ~ 1 ) ), fals e );
};
};
}
}
},{
},{
xtype : 'button' ,
xtype : 'button' ,
id : 'sc_tbtn_2' ,
width : '80%' ,
width : '80%' ,
enableToggle : true ,
enableToggle : true ,
allowDepress : true ,
allowDepress : true ,
text : 'Test D2' ,
text : 'Test D2' ,
pressed : { $P2 },
pressed : { $P2 },
handler : function ( b , e ){
handler : function ( b , e ){
b . disable ();
if ( b . pressed ){
if ( b . pressed ){
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } | 2 ), tru e );
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } | 2 ), fals e );
} else {
} else {
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } & ( ~ 2 ) ), tru e );
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } & ( ~ 2 ) ), fals e );
};
};
}
}
},{
},{
xtype : 'button' ,
xtype : 'button' ,
id : 'sc_tbtn_3' ,
enableToggle : true ,
enableToggle : true ,
allowDepress : true ,
allowDepress : true ,
width : '80%' ,
width : '80%' ,
text : 'Test D3' ,
text : 'Test D3' ,
pressed : { $P3 },
pressed : { $P3 },
handler : function ( b , e ){
handler : function ( b , e ){
b . disable ();
if ( b . pressed ){
if ( b . pressed ){
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } | 4 ), tru e );
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } | 4 ), fals e );
} else {
} else {
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } & ( ~ 4 ) ), tru e );
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } & ( ~ 4 ) ), fals e );
};
};
}
}
},{
},{
xtype : 'button' ,
xtype : 'button' ,
id : 'sc_tbtn_4' ,
enableToggle : true ,
enableToggle : true ,
allowDepress : true ,
allowDepress : true ,
width : '80%' ,
width : '80%' ,
text : 'Test D4' ,
text : 'Test D4' ,
pressed : { $P4 },
pressed : { $P4 },
handler : function ( b , e ){
handler : function ( b , e ){
b . disable ();
if ( b . pressed ){
if ( b . pressed ){
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } | 8 ), tru e );
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } | 8 ), fals e );
} else {
} else {
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } & ( ~ 8 ) ), tru e );
doPlatformOperation ( { $SC [ 'platform_id' ]}, 18 , ({ $CCCV } & ( ~ 8 ) ), fals e );
};
};
}
}
}]
}]
@ -307,10 +312,21 @@
text : 'Remove this Scada Module' ,
text : 'Remove this Scada Module' ,
width : '100%' ,
width : '100%' ,
handler : function (){
handler : function (){
doScadaOperation ( { $SC [ 'platform_id' ]}, { $SC [ 'id' ]}, 13 , 'true' , true );
doScadaOperation ( { $SC [ 'platform_id' ]}, { $SC [ 'id' ]}, 19 , 'true' , true );
}
}],
listeners : {
afterrender : function ( panel ){
console . log ( 'Panel is Rendered' );
},
beforedestroy : function ( panel ) {
// Return false to halt destruction
console . log ( 'Panel is about to be destroyed' );
},
destroy : function ( panel ) {
console . log ( 'Panel has been destroyed' );
}
}
}
}]
}]
}
}
DATA_BOUNDARY ;
DATA_BOUNDARY ;
echo $MODBUS ;
echo $MODBUS ;