diff --git a/.gitattributes b/.gitattributes index 224ee1346ace7bf790d80ff73221044232235836..353aeff02b67c16c631f0097bff56d14b1f1336b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -624,7 +624,7 @@ MAC/Navigator2/scripts/libs/navigator.ctl -text MAC/Navigator2/scripts/monitorAlarms.ctl -text MAC/Navigator2/scripts/monitorStateChanges.ctl -text MAC/Navigator2/scripts/monitorStateReset.ctl -text -MAC/Navigator2/scripts/readAntennaConfigs.ctl -text +MAC/Navigator2/scripts/readStationConfigs.ctl -text MAC/Test/APL/PVSSproject/colorDB/Lofar[!!-~]colors -text svneol=native#application/octet-stream MAC/Test/APL/PVSSproject/colorDB/colorDB_de -text svneol=native#application/octet-stream MAC/Test/APL/PVSSproject/config/config -text svneol=native#application/octet-stream diff --git a/MAC/Navigator2/panels/Test/Event_Viewer.pnl b/MAC/Navigator2/panels/Test/Event_Viewer.pnl index b7cd0543d5c177b2798bf19f2d988598d3209be6..1cd0928a545381100c12e14eb39e6269eb639c84 100644 --- a/MAC/Navigator2/panels/Test/Event_Viewer.pnl +++ b/MAC/Navigator2/panels/Test/Event_Viewer.pnl @@ -403,7 +403,7 @@ E E 0 3 1 2 1 E 741 540 727 533 4 40 "LINE16" "" -1 530 429 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E +1 530 428.9999999999999 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E E E 50 0 0 0 0 0 E E E @@ -413,11 +413,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 3 1 2 1 E 530 429 530 650 +E E 0 3 1 2 1 E 530 429 530 740 4 41 "LINE17" "" -1 538 637 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E +1 538 721.7058823529412 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E E E 51 0 0 0 0 0 E E E @@ -427,11 +427,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 3 1 2 1 E 538 637 529 648 +E E 0 3 1 2 1 E 538 722 529 737 4 42 "LINE18" "" -1 520 640 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E +1 520 725.9276018099548 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E E E 52 0 0 0 0 0 E E E @@ -441,7 +441,7 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 3 1 2 1 E 520 640 529 647 +E E 0 3 1 2 1 E 520 726 529 736 4 43 "LINE19" "" @@ -455,11 +455,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 3 1 2 1 E 473 430 203 541 +E E 0 3 1 2 1 E 473 430 260 648 4 44 "LINE20" "" -1 204 539 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E +1 260.7888888888889 644.1071428571429 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E E E 54 0 0 0 0 0 E E E @@ -469,7 +469,7 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 3 1 2 1 E 204 539 227 538 +E E 0 3 1 2 1 E 261 644 279 642 1 636 0 "" 0 0 1 637 1 "" 0 @@ -555,7 +555,7 @@ E E 0 3 1 2 1 E 204 539 227 538 4 87 "LINE21" "" -1 204 542 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E +1 260 650 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E E E 117 0 0 0 0 0 E E E @@ -565,11 +565,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 3 1 2 1 E 204 542 212 521 +E E 0 3 1 2 1 E 260 650 266 630 4 89 "LINE23" "" -1 57 335 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E +1 180.6500695840421 293.0769230769232 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E E E 119 0 0 0 0 0 E E E @@ -579,11 +579,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 3 1 2 1 E 57 335 404 410 +E E 0 3 1 2 1 E 181 293 400 370 4 90 "LINE24" "" -1 56 337 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E +1 180 296.2337662337662 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E E E 120 0 0 0 0 0 E E E @@ -593,11 +593,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 3 1 2 1 E 56 337 62 351 +E E 0 3 1 2 1 E 180 296 184 318 4 91 "LINE25" "" -1 62 333 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E +1 183.8620689655173 290 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E E E 121 0 0 0 0 0 E E E @@ -607,7 +607,7 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 3 1 2 1 E 62 333 81 333 +E E 0 3 1 2 1 E 184 290 196 290 1 677 20 "" 0 0 14 134 @@ -727,7 +727,7 @@ LANG:1 14 show g_alarms 14 181 "alarm_dp" "" -1 37 640 E E E 1 E 1 E N "_WindowText" E N "_Window" E E +1 20 730 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 133 0 0 0 0 0 E E E @@ -739,12 +739,12 @@ LANG:1 9 Datapoint 1 LANG:1 96 -*-Arial Black-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,Arial Black 0 "" - 35 638 322 661 + 18 728 305 751 3 "0s" 0 0 0 0 0 -1 E E E 13 182 "PUSH_BUTTON4" "" -1 199 671 E E E 1 E 1 E N "_ButtonText" E N "_Button" E E +1 182 761 E E E 1 E 1 E N "_ButtonText" E N "_Button" E E E E 135 0 0 0 0 0 E E E @@ -756,7 +756,7 @@ LANG:1 0 1 LANG:1 96 -*-Arial Black-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,Arial Black 0 "" - 197 669 321 696 + 180 759 304 786 T 1 @@ -778,7 +778,7 @@ LANG:1 8 setAlarm 14 183 "alarm_state" "" -1 38 672 E E E 1 E 1 E N "_WindowText" E N "_Window" E E +1 21 762 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 137 0 0 0 0 0 E E E @@ -790,12 +790,12 @@ LANG:1 5 state 1 LANG:1 96 -*-Arial Black-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,Arial Black 0 "" - 36 670 88 693 + 19 760 71 783 3 "4d" 4 0 0 0 0 -1 E E E 14 184 "alarm_message" "" -1 37 704 E E E 1 E 1 E N "_WindowText" E N "_Window" E E +1 20 794 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 139 0 0 0 0 0 E E E @@ -807,7 +807,7 @@ LANG:1 12 alarmmessage 1 LANG:1 96 -*-Arial Black-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,Arial Black 0 "" - 35 702 321 725 + 18 792 304 815 3 "0s" 0 0 0 0 0 -1 E E E 13 227 "PUSH_BUTTON5" @@ -1522,6 +1522,60 @@ LANG:1 21 show g_processesList } }" 0 E E E +1 678 21 "" 0 +0 +1 679 21 "" 1 +0 +1 680 21 "" 2 +0 +1 681 21 "" 3 +0 +1 682 21 "" 4 +0 +1 683 22 "" 0 +0 +4 685 +"LINE28" +"" +1 150.611223387143 462.0652258682719 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + E E +202 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 3 1 2 1 E 151 462 400 390 +4 686 +"LINE29" +"" +1 153.3083950292832 463.4530013836702 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + E E +204 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 3 1 2 1 E 153 463 178 469 +4 687 +"LINE30" +"" +1 149.9999999999999 459.5518089689399 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + E E +206 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 3 1 2 1 E 150 460 160 454 0 LAYER, 1 1 @@ -1568,15 +1622,15 @@ LANG:1 0 1 "$name""fw_locator" 3 5 "PANEL_REF6" -"objects\\Test\\Action.pnl" 413 460 T 109 1 0 1 -42 33 +"objects\\Test\\Action.pnl" 413 460 T 109 1 0 1 -43 220 1 "$name""fw_progressBar" 3 6 "PANEL_REF7" -"objects\\Test\\Action.pnl" 189 450 T 110 1 0 1 22 4 +"objects\\Test\\Action.pnl" 189 450 T 110 1 0 1 -39 130 1 "$name""fw_headLines" 3 7 "PANEL_REF8" -"objects\\Test\\Event.pnl" 15 8 T 111 1 0 1 0 1 +"objects\\Test\\Event.pnl" 15 8 T 111 1 0 1 -5 0 1 "$name""fw_viewSelection" 3 9 "PANEL_REF10" @@ -1592,19 +1646,27 @@ LANG:1 0 1 "$name""fw_locator" 3 17 "PANEL_REF18" -"objects\\Test\\Event.pnl" 334 642 T 115 U +"objects\\Test\\Event.pnl" 334 642 T 115 1 0 1 -4 86 1 "$name""fw_progressBar" 3 18 "PANEL_REF19" -"objects\\Test\\Event.pnl" -2 533 T 116 U +"objects\\Test\\Event.pnl" -2 533 T 116 1 0 1 2 105 1 "$name""fw_headLines" 3 19 "PANEL_REF20" -"objects\\Test\\Event.pnl" 0 205 T 116 1 0 1 9 46 +"objects\\Test\\Event.pnl" 0 205 T 116 1 0 1 -10 3 1 "$name""fw_viewBox" 3 20 "PANEL_REF21" -"objects\\Test\\Action.pnl" 207 346 T 122 1 0 1 -103 8 +"objects\\Test\\Action.pnl" 207 346 T 122 1 0 1 -117 -26 1 "$name""fw_viewBox" +3 21 "PANEL_REF22" +"objects\\Test\\Event.pnl" 0 205 T 197 1 0 1 10 253 +1 +"$name""fw_fastJumper" +3 22 "PANEL_REF23" +"objects\\Test\\Action.pnl" 207 346 T 198 1 0 1 -117 64 +1 +"$name""fw_fastJumper" 0 \ No newline at end of file diff --git a/MAC/Navigator2/panels/navigator.pnl b/MAC/Navigator2/panels/navigator.pnl index 2371e52320bb1dc48fd67370a99c569fb9ad85d3..cc8551ff3f026837c3ee7224c078f0d4d4ac3926 100644 --- a/MAC/Navigator2/panels/navigator.pnl +++ b/MAC/Navigator2/panels/navigator.pnl @@ -60,6 +60,11 @@ PANEL,-1 -1 1232 873 N "_3DFace" 1 } else { setValue(fw_alerts,\"backCol\",\"_dpdoesnotexist\"); } + if (dpExists(DPNAME_NAVIGATOR + g_navigatorID + \".fw_fastJumper\")) { + dpConnect(\"fw_fastJumperEvent\",false,DPNAME_NAVIGATOR + g_navigatorID + \".fw_fastJumper.event\"); + } else { + setValue(fw_fastJumper,\"backCol\",\"_dpdoesnotexist\"); + } @@ -126,6 +131,12 @@ void fw_alertsEvent(string dp, string event) { navCtrl_handleAlertsEvent(dp,event); } } +void fw_fastJumperEvent(string dp, string event) { + LOG_TRACE(\"navigator.pnl:fw_fastJumperEvent| trigger: \" + event); + if (event != \"\") { + navCtrl_handleFastJumperEvent(dp,event); + } +} " 0 "main() { @@ -222,6 +233,10 @@ LANG:1 6 Layer1 0 1 30 13 "" 15 0 +1 31 16 "" 1 +0 +1 32 16 "" 2 +0 0 LAYER, 1 1 @@ -282,4 +297,8 @@ LANG:1 6 Layer8 "objects\\navigator_alerts.pnl" 727 845 T 26 1 0 0.89 -737 29.0500000000001 1 "$name""fw_alerts" +3 16 "PANEL_REF17" +"objects\\navigator_fastJumper.pnl" 580 10 T 26 1 0 1 -10 -9 +1 +"$name""fw_fastJumper" 0 \ No newline at end of file diff --git a/MAC/Navigator2/panels/objects/navigator_headlines.pnl b/MAC/Navigator2/panels/objects/navigator_headlines.pnl index 867fb5754b44919d798ce41f789428598d3c1e32..0c1ea5302af656e031c518826bdbc14ceab7cbba 100644 --- a/MAC/Navigator2/panels/objects/navigator_headlines.pnl +++ b/MAC/Navigator2/panels/objects/navigator_headlines.pnl @@ -47,8 +47,12 @@ void doAction(string aDP, string anAction) { } // EventClick - if (actionString[1] == \"ChangeInfo\") { - changeInfo(actionString[2]); + if (actionString[1] == \"ChangeInfo\" || actionString[1] == \"Update\") { + if(dynlen(actionString) > 1) { + changeInfo(actionString[2]); + } else { + changeInfo(g_currentDatapoint); + } return; } // Initialize diff --git a/MAC/Navigator2/scripts/libs/navConfig.ctl b/MAC/Navigator2/scripts/libs/navConfig.ctl index 65856455f6c9cbcef2c99016102853b1a607c6df..ccb2dbe8ec070d7e71f728b63dcdb72b8909e233 100644 --- a/MAC/Navigator2/scripts/libs/navConfig.ctl +++ b/MAC/Navigator2/scripts/libs/navConfig.ctl @@ -109,6 +109,10 @@ void navConfig_setNavigatorID(int newID) navConfig_resetDP(DPNAME_NAVIGATOR + g_navigatorID+".fw_alerts.action"); navConfig_resetDP(DPNAME_NAVIGATOR + g_navigatorID+".fw_alerts.selection"); + navConfig_resetDP(DPNAME_NAVIGATOR + g_navigatorID+".fw_fastJumper.event"); + navConfig_resetDP(DPNAME_NAVIGATOR + g_navigatorID+".fw_fastJumper.action"); + navConfig_resetDP(DPNAME_NAVIGATOR + g_navigatorID+".fw_fastJumper.selection"); + navConfig_resetDP(DPNAME_NAVIGATOR + g_navigatorID+".navigator.event"); navConfig_resetDP(DPNAME_NAVIGATOR + g_navigatorID+".navigator.initiator"); navConfig_resetDP(DPNAME_NAVIGATOR + g_navigatorID+".navigator.selection"); diff --git a/MAC/Navigator2/scripts/libs/navCtrl.ctl b/MAC/Navigator2/scripts/libs/navCtrl.ctl index 9c8a561cad151e22f647b5af94dcce07b2244fed..361f6cdfbab3e6193ef7dfdaa8560ef81ba0e792 100644 --- a/MAC/Navigator2/scripts/libs/navCtrl.ctl +++ b/MAC/Navigator2/scripts/libs/navCtrl.ctl @@ -35,6 +35,7 @@ // navCtrl_handleProgressBarEvent : handles progressBar // navCtrl_handleHeadLinesEvent : handles headLines // navCtrl_handleAlertEvent : handles alert +// navCtrl_handleFastJumperEvent : handles fastJumper #uses "navigator.ctl" @@ -49,6 +50,7 @@ global string LOCATORACTIONDP; global string PROGRESSBARACTIONDP; global string HEADLINESACTIONDP; global string ALERTSACTIONDP; +global string FASTJUMPERACTIONDP; /////////////////////////////////////////////////////////////////////////// @@ -95,6 +97,9 @@ void navCtrl_handleViewBoxEvent(string dp,string value){ // change locator dpSet(LOCATORACTIONDP,"ChangeSelection|"+aSelection); + + // change fastJumper + dpSet(FASTJUMPERACTIONDP,"ChangeSelection|"+aSelection); // inform headLines Object dpSet(HEADLINESACTIONDP,"ChangeInfo|"+g_currentDatapoint); @@ -132,6 +137,7 @@ void navCtrl_handleViewBoxEvent(string dp,string value){ dpSet(TOPDETAILSELECTIONACTIONDP,"Update"); dpSet(BOTTOMDETAILSELECTIONACTIONDP,"Update"); dpSet(LOCATORACTIONDP,"Update"); + dpSet(FASTJUMPERACTIONDP,"Update"); dpSet(PROGRESSBARACTIONDP,"Update"); dpSet(HEADLINESACTIONDP,"Update"); @@ -294,6 +300,7 @@ void navCtrl_handleViewSelectionEvent(string dp,string value){ dpSet(TOPDETAILSELECTIONACTIONDP,"Initialize"); dpSet(BOTTOMDETAILSELECTIONACTIONDP,"Initialize"); dpSet(LOCATORACTIONDP,"Initialize"); + dpSet(FASTJUMPERACTIONDP,"Initialize"); dpSet(PROGRESSBARACTIONDP,"Initialize"); dpSet(HEADLINESACTIONDP,"Initialize"); dpSet(ALERTSACTIONDP,"Initialize"); @@ -311,6 +318,9 @@ void navCtrl_handleViewSelectionEvent(string dp,string value){ // change locator dpSet(LOCATORACTIONDP,"ChangeSelection|"+aSelection); + // change fastJumper + dpSet(FASTJUMPERACTIONDP,"ChangeSelection|"+aSelection); + // inform headLines Object dpSet(HEADLINESACTIONDP,"ChangeInfo|"+g_currentDatapoint); @@ -584,6 +594,9 @@ void navCtrl_handleDetailSelectionEvent(string dp,string value,string target){ // change locator dpSet(LOCATORACTIONDP,"ChangeSelection|"+aSelection); + + // change fastJumper + dpSet(FASTJUMPERACTIONDP,"ChangeSelection|"+aSelection); } } } @@ -633,6 +646,10 @@ void navCtrl_handleLocatorEvent(string dp,string value){ // change locator dpSet(LOCATORACTIONDP,"ChangeSelection|"+aSelection); + + // change fastJumper + dpSet(FASTJUMPERACTIONDP,"ChangeSelection|"+aSelection); + } } @@ -759,6 +776,9 @@ void navCtrl_handleAlertsEvent(string dp,string value){ } if (navTabCtrl_showView()) { + // change fastJumper + dpSet(FASTJUMPERACTIONDP,"ChangeSelection|"+aSelection); + // change locator dpSet(LOCATORACTIONDP,"ChangeSelection|"+aSelection); @@ -767,6 +787,60 @@ void navCtrl_handleAlertsEvent(string dp,string value){ } } +} + +/////////////////////////////////////////////////////////////////////////// +// +// Function navCtrl_handleFastJumperEvent +// +// handles all interactions after an event from the fastJumper +// +/////////////////////////////////////////////////////////////////////////// +void navCtrl_handleFastJumperEvent(string dp,string value){ + LOG_TRACE("navCtrl.ctl:navCtrl_handleFastJumperEvent|entered with dp: " + dp + " and value: " + value); + + string aShape; + string anEvent; + dyn_string aSelection; + + if (dpExists(DPNAME_NAVIGATOR + g_navigatorID + ".fw_fastJumper.selection")) { + dpGet(DPNAME_NAVIGATOR + g_navigatorID+".fw_fastJumper.selection", aSelection); + } else { + LOG_WARNING("navCtrl.ctl:navCtrl_handleFastJumperEvent| Error getting selection from : " + DPNAME_NAVIGATOR + g_navigatorID+".fw_fastJumper.selection"); + return; + } + + // split the event into shape and event + if (!navFunct_splitEvent(value,aShape,anEvent) ) { + LOG_WARNING("navCtrl.ctl:navCtrl_handleFastJumperEvent| Error splitting event: " + value); + return; + } + + // ok so now we have all essentials + // aShape contains the shape that initiated the event + // anEvent contains the initial event + // aSelection contains the Selections that belongs to the event + LOG_INFO("navCtrl.ctl:navCtrl_handleFastJumperEvent| Found shape : " + aShape); + LOG_INFO("navCtrl.ctl:navCtrl_handleFastJumperEvent| Found event : " + anEvent); + LOG_INFO("navCtrl.ctl:navCtrl_handleFastJumperEvent| Found selection: " + aSelection); + navCtrl_handleNavigatorEvent(aSelection,anEvent,aShape); + // depending on the event received, actions need to be taken + + if (anEvent == "ChangePanel") { + if (navTabCtrl_showView()) { + + //clear old highlights + dynClear(strHighlight); + + // change locator + dpSet(LOCATORACTIONDP,"ChangeSelection|"+aSelection); + + // change fastJumper + dpSet(FASTJUMPERACTIONDP,"ChangeSelection|"+aSelection); + + } + } + } /////////////////////////////////////////////////////////////////////////// // diff --git a/MAC/Navigator2/scripts/libs/navigator.ctl b/MAC/Navigator2/scripts/libs/navigator.ctl index 44ac0dbcd9f9d6582f6fe0c941c7d4ba45beb464..4294d297a2e31ffe34ae447a5c6a1f0005081edb 100644 --- a/MAC/Navigator2/scripts/libs/navigator.ctl +++ b/MAC/Navigator2/scripts/libs/navigator.ctl @@ -43,7 +43,7 @@ #uses "navTabCtrl.ctl" global bool g_initializing = true; -global string g_currentDatapoint = "LOFAR"; +global string g_currentDatapoint = MainDBName+"LOFAR"; global dyn_string g_observationsList; // holds active observations global dyn_string g_processesList; // holds active software global mapping g_observations; // @@ -210,5 +210,8 @@ void navigator_clearWorkDPs() { if (dpExists(DPNAME_NAVIGATOR + g_navigatorID + ".fw_alerts.action")) { dpSet(DPNAME_NAVIGATOR + g_navigatorID + ".fw_alerts.action",""); } + if (dpExists(DPNAME_NAVIGATOR + g_navigatorID + ".fw_fastJumper.action")) { + dpSet(DPNAME_NAVIGATOR + g_navigatorID + ".fw_fastJumper.action",""); + } } diff --git a/MAC/Navigator2/scripts/readAntennaConfigs.ctl b/MAC/Navigator2/scripts/readStationConfigs.ctl similarity index 59% rename from MAC/Navigator2/scripts/readAntennaConfigs.ctl rename to MAC/Navigator2/scripts/readStationConfigs.ctl index 961d381fd0bd082e2abb2b677a8144eeb87855cf..d9ac5fbd2b0c6d93f466c23a586b9d42a06e1113 100644 --- a/MAC/Navigator2/scripts/readAntennaConfigs.ctl +++ b/MAC/Navigator2/scripts/readStationConfigs.ctl @@ -1,4 +1,4 @@ -//# readAntennaConfigs.ctl +//# readStationConfigs.ctl //# //# Copyright (C) 2007-2008 //# ASTRON (Netherlands Foundation for Research in Astronomy) @@ -23,8 +23,13 @@ /** * Controller that will be run once during station startup. - * it will search for an AntenneArrays.conf file in /opt/lofar/etc/ - * and will fill the pvss database type AntennaArrays with the (allowed) + * it will search for different conf files in /opt/lofar/etc/ + * and will fill the pvss database types for those config files. + + * For now we have: + + * AntennaArrays.conf. + * This will be used to fill: AntennaArrays with the (allowed) * antenna configurations. * * Allowed for now are : LBA-HBA-LBL-LBH @@ -34,6 +39,10 @@ * As FieldCenter now the GPS coordinates are taken, this is not correct * * For future compatibility we have to consider other earth coordinates also + + * RemoteStation.conf + * This will fill the RemoteStation point with all data available for this station. + * */ main() { @@ -47,12 +56,15 @@ main() string strCurConfig; // string strDataDir = "/opt/lofar/etc/"; - string strDataDir = "c:/data/CS20_CS010/data/configs/"; - string strAntArrayConfFile = strDataDir+"AntennaArrays.conf"; + string strDataDir = "c:/data/CS20_CS010/data/configs/"; + string strAntArrayConfFile = strDataDir+"AntennaArrays.conf"; + string strRemoteStationConfFile = strDataDir+"RemoteStation.conf"; dyn_string dynStr_fileContent; - + // + // AntennaArray cycle + // dynStr_fileContent = lto_getFile_asDynStr(strAntArrayConfFile); while (dynlen(dynStr_fileContent) > 3 && index < dynlen(dynStr_fileContent)) { @@ -65,7 +77,7 @@ main() // read ConfigurationName sscanf(dynStr_fileContent[index++],"%s",strCurConfig); - Debug("readAntennaConfigs.ctl:main|Reading Config for: "+strCurConfig); + Debug("readStationConfigs.ctl:main|Reading Config for: "+strCurConfig); // read fieldcenter sscanf(dynStr_fileContent[index++],"%*d %*s %f %f %f",centerOL,centerNB,centerH); @@ -118,6 +130,79 @@ main() } index +=nr_ofAnt+1; } + + // + // RemoteStation cycle + // + + dynStr_fileContent = lto_getFile_asDynStr(strRemoteStationConfFile); + //DebugN("fileContent: "+dynStr_fileContent); + + for (index=1;index <= dynlen(dynStr_fileContent);index++) { + if (strpos(dynStr_fileContent[index],"RS.STATION_ID")>-1) { + dyn_string value = strsplit(dynStr_fileContent[index],"="); + if (dynlen(value) > 1) { + dpSet("remoteStation.stationID",value[2]); + } + } + + if (strpos(dynStr_fileContent[index],"RS.N_RSPBOARDS")>-1) { + dyn_string value = strsplit(dynStr_fileContent[index],"="); + if (dynlen(value) > 1) { + dpSet("remoteStation.N_RSPBoards",value[2]); + } + } + + if (strpos(dynStr_fileContent[index],"RS.N_TBBOARDS")>-1) { + dyn_string value = strsplit(dynStr_fileContent[index],"="); + if (dynlen(value) > 1) { + dpSet("remoteStation.N_TBBoards",value[2]); + } + } + + if (strpos(dynStr_fileContent[index],"RS.N_LBAS")>-1) { + dyn_string value = strsplit(dynStr_fileContent[index],"="); + if (dynlen(value) > 1) { + dpSet("remoteStation.N_LBAS",value[2]); + } + } + + if (strpos(dynStr_fileContent[index],"RS.N_HBAS")>-1) { + dyn_string value = strsplit(dynStr_fileContent[index],"="); + if (dynlen(value) > 1) { + dpSet("remoteStation.N_HBAS",value[2]); + } + } + + if (strpos(dynStr_fileContent[index],"RS.HBA_SPLIT")>-1) { + dyn_string value = strsplit(dynStr_fileContent[index],"="); + if (dynlen(value) > 1) { + if (substr(value[2],0,1) == "N" || + substr(value[2],0,1) == "n" || + substr(value[2],0,1) == "F" || + substr(value[2],0,1) == "f") { + dpSet("remoteStation.HBA_Split",false); + } else { + dpSet("remoteStation.HBA_Split",true); + } + } + } + + + if (strpos(dynStr_fileContent[index],"RS.WIDE_LBAS")>-1) { + dyn_string value = strsplit(dynStr_fileContent[index],"="); + if (dynlen(value) > 1) { + if (substr(value[2],0,1) == "N" || + substr(value[2],0,1) == "n" || + substr(value[2],0,1) == "F" || + substr(value[2],0,1) == "f") { + dpSet("remoteStation.wide_LBAS",false); + } else { + dpSet("remoteStation.wide_LBAS",true); + } + } + } + } } dyn_string lto_getFile_asDynStr(string aFileName) @@ -136,7 +221,7 @@ dyn_string lto_getFile_asDynStr(string aFileName) if (err!=0) { - DebugN("readAntennaConfigs.ctl:lto_getFile_asDynStr|Error during read no. " + err); + DebugN("readStationConfigs.ctl:lto_getFile_asDynStr|Error during read no. " + err); } else { @@ -147,7 +232,7 @@ dyn_string lto_getFile_asDynStr(string aFileName) } fclose(f); // close file } else { - DebugN("readAntennaConfigs.ctl:lto_getFile_asDynStr|Error opening file: " + aFileName); + DebugN("readStationConfigs.ctl:lto_getFile_asDynStr|Error opening file: " + aFileName); } return aFile_asDynStr;