diff --git a/MAC/Navigator/panels/objects/nav_usr/STS/STS_Subrack_RCU_Attenuating.pnl b/MAC/Navigator/panels/objects/nav_usr/STS/STS_Subrack_RCU_Attenuating.pnl new file mode 100644 index 0000000000000000000000000000000000000000..ce26f0e03863ec598a72694c427388e0dd292466 --- /dev/null +++ b/MAC/Navigator/panels/objects/nav_usr/STS/STS_Subrack_RCU_Attenuating.pnl @@ -0,0 +1,209 @@ +V 10 +1 +LANG:1 11 Attenuating +PANEL,419 196 230 100 N "_3DFace" 1 +"$datapoint" +"main() +{ + string dp = $datapoint; + + if(dpAccessable($datapoint + \".Attenuating\")) + { + TextField1.enabled = TRUE; + dpConnect(\"ShowAttenuating\", $datapoint + \".Attenuating:_original.._value\" , + $datapoint + \".Attenuating:_online.._invalid\" ); + } + else + { + DebugTN($datapoint + \".Attenuating isnot accessable\"); + TextField1.enabled = FALSE; + setValue(\"TextField1\", \"text\", \"-10\"); + setValue(\"Border1\", \"backCol\", \"_dpdoesnotexist\"); + } +} + +ShowAttenuating(string dp1, unsigned attenuating , + string dp2, bool invalid) +{ + setValue(\"TextField1\", \"text\", attenuating ); + if (!invalid) + { + TextField1.enabled = TRUE; + setValue(\"Border1\", \"backCol\", \"Lofar_device_active\"); + } + else + { + TextField1.enabled = FALSE; + setValue(\"Border1\", \"backCol\", \"_dpdoesnotexist\"); + } +} +" 0 +EE E E 1 0 0 0 131 67 +"" 0 1 +EE 2 +"CBRef""1" +"EClose"E +"" +1 +DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 +LAYER, 0 +1 +LANG:1 6 Layer1 +6 224 +"Border1" +"" +1 20 81 E E E 1 E 1 E N "_WindowText" E N "grau" E E + E E +16 0 0 0 0 0 +EE E +0 +1 +LANG:1 0 +1 +"dashclr"N "_Transparent" +E E 0 1 1 0 1 E U 1 E 20 19 210 81 +2 72 +"Text1" +"" +1 175 41 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +8 0 0 0 0 0 +EE E +0 +1 +LANG:1 0 +1 +"dashclr"N "_Transparent" +E E 0 1 1 0 1 E U 0 E 177 43 193 59 +0 2 0 "s" 0 0 0 192 0 0 177 43 + 1 +1 +LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,400,0,0,0,0,3,2,1,34,Arial +0 "" +1 +LANG:1 2 dB +2 225 +"Text2" +"" +1 35 41 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +17 0 0 0 0 0 +EE E +0 +1 +LANG:1 0 +1 +"dashclr"N "_Transparent" +E E 0 1 1 0 1 E U 0 E 37 43 103 59 +0 2 0 "s" 0 0 0 192 0 0 37 43 + 1 +1 +LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,400,0,0,0,0,3,2,1,34,Arial +0 "" +1 +LANG:1 11 Attenuating +14 223 +"TextField1" +"" +1 125 38 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +15 0 0 0 0 0 +EE E +0 +1 +LANG:1 0 +0 +1 +LANG:1 107 -microsoft windows-Arial-normal-r-normal-*-*-120-100-100-*-*-iso8859-1|-13,0,0,0,400,0,0,0,0,3,2,1,34,Arial +0 "" +123 36 157 63 +3 "2d" 2 0 0 2 0 0 +E +"main() +{ + +}" 0 + +"// +// It must be possible to change the value of the Attenuating +// This value must be in the range of 0..31 +// +// If the value entered by the user is NOT in this range: +// 1. a logmessage will be generated +// 2. a panel will popup with a warning +// 3. the value will not be stored in the dB +// 4. the current value will be restored in TextField1 +// +// If the value is in range: +// 1. the new value will be stored in the dB +// +// (JjS) + +main() +{ + unsigned newDBValue; + + // Read the value entered by the user + getValue(\"TextField1\",\"text\",newDBValue); + + // Do validation + // + if ( (newDBValue > 31 ) || ( newDBValue < 0 )) + // The newDBValue is NOT in range + { + // LogMessage + DebugTN($datapoint + \".Attenuating Incorrect value \" + newDBValue + \" must be in range 0..31 --> VALUE IS NOT STORED\"); + + // PopUp an panel with a warning + ChildPanelOnCentralModal(\"objects/nav_fw/warning_wrong_attenuatingvalue.pnl\", + \"WRONG AttenuatingValue\", + makeDynString(\"$found_AttValue:\" + newDBValue)); + // Get the original datapoint-value and change the textfield + dpConnect(\"SetAttenuatingField\", $datapoint + \".Attenuating:_original.._value\"); + } + else + // The newDBValue is in range 0..31 + { + // Store the newDBValue + dpSet($datapoint + \".Attenuating:_original.._value\", newDBValue); + } +} + +SetAttenuatingField(string dp1, unsigned attenuating) +{ + // Fill TextField1 with a value + setValue(\"TextField1\", \"text\", attenuating ); +} + +" 0 + +0 +LAYER, 1 +1 +LANG:1 6 Layer2 +0 +LAYER, 2 +1 +LANG:1 6 Layer3 +0 +LAYER, 3 +1 +LANG:1 6 Layer4 +0 +LAYER, 4 +1 +LANG:1 6 Layer5 +0 +LAYER, 5 +1 +LANG:1 6 Layer6 +0 +LAYER, 6 +1 +LANG:1 6 Layer7 +0 +LAYER, 7 +1 +LANG:1 6 Layer8 +0 +0 \ No newline at end of file