From 0dab6de36a4579921b0b4e018036d06b645320bb Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Wed, 31 Oct 2012 14:03:57 +0000 Subject: [PATCH] Task #3566: Merged trunk with branch --- .gitattributes | 191 ++-- .gitignore | 36 +- .../BBSControl/scripts/plotwindow.py | 12 +- .../BBSControl/scripts/solverdialog.py | 15 +- .../BBSControl/scripts/solverquery.py | 13 +- CEP/Calibration/BBSControl/src/bbs-reducer.cc | 44 +- .../BBSControl/src/bbs-shared-estimator.cc | 2 +- CEP/DP3/AOFlagger/CMakeLists.txt | 2 +- .../AOFlagger/gui/plot/plotpropertieswindow.h | 1 + CEP/DP3/AOFlagger/src/aoquality.cpp | 83 +- .../src/msio/memorybaselinereader.cpp | 41 +- .../src/strategy/actions/imageraction.cpp | 4 +- .../algorithms/baselinetimeplaneimager.cpp | 57 +- CEP/DP3/DPPP/include/DPPP/BaselineSelection.h | 3 +- CEP/DP3/DPPP/include/DPPP/DPInfo.h | 21 +- CEP/DP3/DPPP/include/DPPP/DPStep.h | 2 +- CEP/DP3/DPPP/include/DPPP/Demixer.h | 17 +- CEP/DP3/DPPP/include/DPPP/Filter.h | 16 + CEP/DP3/DPPP/include/DPPP/MSReader.h | 1 - CEP/DP3/DPPP/share/CMakeLists.txt | 1 + CEP/DP3/DPPP/share/HBAdefault | 89 ++ CEP/DP3/DPPP/share/LBAdefault | 11 +- CEP/DP3/DPPP/src/BaselineSelection.cc | 12 +- CEP/DP3/DPPP/src/DPInfo.cc | 28 +- CEP/DP3/DPPP/src/DPStep.cc | 10 +- CEP/DP3/DPPP/src/Demixer.cc | 288 +++-- CEP/DP3/DPPP/src/EstimateNDPPP.cc | 860 --------------- CEP/DP3/DPPP/src/Filter.cc | 43 +- CEP/DP3/DPPP/test/testdemixfilter | 87 ++ CEP/GSM/bremen/cleanup.py | 4 + CEP/GSM/bremen/recreate_tables.py | 107 +- .../create.procedure.fill_temp_assoc_kind.sql | 42 +- .../create.procedure.fill_temp_assoc_kind.sql | 43 +- CEP/GSM/bremen/sql/pg/indices.sql | 22 +- .../sql/tables/create.table.detections.sql | 3 +- .../sql/tables/create.table.image_stats.sql | 8 + .../bremen/sql/tables/create.table.images.sql | 11 +- .../bremen/sql/tables/create.table.runs.sql | 10 + .../tables/create.table.temp_associations.sql | 1 + CEP/GSM/bremen/src/bbsfilesource.py | 79 +- CEP/GSM/bremen/src/gsmconnectionmanager.py | 4 +- CEP/GSM/bremen/src/gsmlogger.py | 6 +- CEP/GSM/bremen/src/gsmparset.py | 66 +- CEP/GSM/bremen/src/pipeline.py | 73 +- CEP/GSM/bremen/src/queries.py | 34 +- CEP/GSM/bremen/src/reprocessor.py | 14 +- CEP/GSM/bremen/src/spectra.py | 24 +- CEP/GSM/bremen/src/sqllist.py | 21 +- CEP/GSM/bremen/src/sqllist.sql | 75 +- CEP/GSM/bremen/src/sqllist_associate.sql | 70 +- CEP/GSM/bremen/src/sqllist_deduct.sql | 16 +- CEP/GSM/bremen/src/sqllist_group.sql | 8 +- CEP/GSM/bremen/src/sqllist_join.sql | 26 +- CEP/GSM/bremen/src/sqllist_new.sql | 34 +- CEP/GSM/bremen/src/sqllist_update.sql | 15 +- CEP/GSM/bremen/src/unifiedConnection.py | 3 +- CEP/GSM/bremen/tests/bbsfiletest.py | 17 +- CEP/GSM/bremen/tests/gsmconnection.py | 17 +- CEP/GSM/bremen/tests/parset.py | 17 +- CEP/GSM/bremen/tests/pipeline_extended.py | 5 +- CEP/GSM/bremen/tests/spectra.py | 2 +- CEP/GSM/bremen/tests/tempparset.py | 4 +- CEP/GSM/bremen/tests/testlib.py | 3 + CEP/GSM/bremen/tests/utils.py | 5 + CEP/Imager/LofarFT/src/CMakeLists.txt | 1 + CEP/Imager/LofarFT/src/fillRootImageGroup.cc | 2 + CEP/Imager/LofarFT/src/makebeamimage.cc | 246 +++++ CEP/LMWCommon/src/cexecms | 24 +- CEP/LMWCommon/src/cexecms-part | 31 +- CEP/MS/test/CMakeLists.txt | 3 +- .../deploy/{ => deprecated}/fabfile.py | 0 .../deploy/{ => deprecated}/ipcontroller.sh | 0 .../deploy/{ => deprecated}/ipengine.sh | 0 .../deploy/{ => deprecated}/start_cluster.py | 0 .../deploy/{ => deprecated}/stop_cluster.py | 0 .../framework/lofarpipe/CMakeLists.txt | 6 +- .../framework/lofarpipe/cuisine/WSRTrecipe.py | 5 +- .../{ => deprecated}/clusterhandler.py | 0 .../support/{ => deprecated}/clusterlogger.py | 0 .../support/{ => deprecated}/ipython.py | 0 .../support/{ => deprecated}/lofarrecipe.py | 0 .../framework/lofarpipe/support/group_data.py | 86 +- .../framework/lofarpipe/support/utilities.py | 19 + CEP/Pipeline/recipes/sip/CMakeLists.txt | 37 +- .../recipes/sip/bin/calibration_pipeline.py | 236 +++++ .../sip/bin/msss_calibrator_pipeline.py | 2 +- .../recipes/sip/bin/msss_imager_pipeline.py | 131 ++- .../recipes/sip/bin/msss_target_pipeline.py | 42 +- .../recipes/sip/bin/preprocessing_pipeline.py | 192 ++++ CEP/Pipeline/recipes/sip/bin/startPython.sh | 2 +- .../sip/master/{ => deprecated}/bbs.py | 0 .../recipes/sip/master/deprecated/casapy.py | 186 ---- .../{ => deprecated}/cep2_datamapper.py | 0 .../sip/master/{ => deprecated}/cimager.py | 0 .../sip/master/deprecated/collector.py | 140 --- .../recipes/sip/master/deprecated/colmaker.py | 67 -- .../{ => deprecated}/compression_pipeline.py | 0 .../recipes/sip/master/deprecated/copier.py | 50 - .../{ => deprecated}/count_timesteps.py | 0 .../sip/master/{ => deprecated}/datamapper.py | 0 .../sip/master/{ => deprecated}/demixing.py | 0 .../recipes/sip/master/deprecated/dppp.py | 151 --- .../master/deprecated/dummy_echo_parallel.py | 63 -- .../recipes/sip/master/deprecated/excluder.py | 18 - .../master/{ => deprecated}/flag_baseline.py | 0 .../recipes/sip/master/deprecated/flagger.py | 68 -- .../master/{ => deprecated}/make_flaggable.py | 0 .../recipes/sip/master/deprecated/mwimager.py | 214 ---- .../sip/master/deprecated/pyraprunner.py | 98 -- .../recipes/sip/master/deprecated/qcheck.py | 91 -- .../sip/master/deprecated/qcheck/README | 4 - .../sip/master/deprecated/qcheck/qcheck.py | 200 ---- .../sip/master/deprecated/sextractor.py | 92 -- .../sip/master/deprecated/simple_se.py | 122 --- .../sip/master/{ => deprecated}/skymodel.py | 0 .../master/{ => deprecated}/storagemapper.py | 0 .../recipes/sip/master/deprecated/trimmer.py | 27 - .../recipes/sip/master/deprecated/vdsmaker.py | 175 ---- CEP/Pipeline/recipes/sip/master/new_bbs.py | 129 ++- CEP/Pipeline/recipes/sip/master/parset.test | 5 - .../recipes/sip/nodes/{ => deprecated}/bbs.py | 0 .../recipes/sip/nodes/deprecated/casapy.py | 68 -- .../sip/nodes/{ => deprecated}/cimager.py | 0 .../recipes/sip/nodes/deprecated/colmaker.py | 17 - .../nodes/{ => deprecated}/count_timesteps.py | 0 .../nodes/{ => deprecated}/demix/demixing.py | 0 .../{ => deprecated}/demix/median_filter.py | 0 .../demix/shiftphasecenter.py | 0 .../{ => deprecated}/demix/smoothdemix.py | 0 .../demix/subtract_from_averaged.py | 0 .../sip/nodes/{ => deprecated}/demixing.py | 0 .../nodes/deprecated/dummy_echo_parallel.py | 14 - .../recipes/sip/nodes/deprecated/excluder.py | 27 - .../nodes/{ => deprecated}/flag_baseline.py | 0 .../recipes/sip/nodes/deprecated/flagger.py | 31 - .../nodes/{ => deprecated}/make_flaggable.py | 0 .../recipes/sip/nodes/deprecated/qcheck.py | 51 - .../sip/nodes/deprecated/sextractor.py | 59 -- .../recipes/sip/nodes/deprecated/trimmer.py | 32 - .../recipes/sip/nodes/imager_awimager.py | 102 +- .../recipes/sip/nodes/imager_create_dbs.py | 84 +- .../recipes/sip/nodes/imager_prepare.py | 111 +- .../sip/nodes/imager_source_finding.py | 7 +- CEP/Pipeline/recipes/sip/pipeline.cfg.in | 4 +- CEP/Pipeline/recipes/sip/tasks.cfg.in | 87 +- .../recipes/nodes/imager_create_dbs_test.py | 67 ++ .../calibrator_regression.config.xml | 176 ++++ .../imaging_regression.config.xml | 162 +++ .../pipeline_task_regression.config.xml | 179 ++++ .../target_regression.config.xml | 176 ++++ .../test/regression_tests/target_pipeline.py | 64 ++ .../doc/source/_templates/searchbox.html | 24 + CEP/PyBDSM/doc/source/conf.py | 4 +- CEP/PyBDSM/doc/source/examples.rst | 155 ++- CEP/PyBDSM/doc/source/export_image.rst | 15 +- CEP/PyBDSM/doc/source/process_image.rst | 7 +- CEP/PyBDSM/doc/source/show_fit.rst | 65 +- CEP/PyBDSM/doc/source/whats_new.rst | 34 + CEP/PyBDSM/doc/source/write_catalog.rst | 9 +- CEP/PyBDSM/src/python/__init__.py | 10 +- CEP/PyBDSM/src/python/_version.py | 66 +- CEP/PyBDSM/src/python/collapse.py | 61 +- CEP/PyBDSM/src/python/functions.py | 114 +- CEP/PyBDSM/src/python/gaul2srl.py | 49 +- CEP/PyBDSM/src/python/gausfit.py | 160 +-- CEP/PyBDSM/src/python/image.py | 3 + CEP/PyBDSM/src/python/interface.py | 45 +- CEP/PyBDSM/src/python/make_residimage.py | 76 +- CEP/PyBDSM/src/python/multi_proc.py | 32 +- CEP/PyBDSM/src/python/mylogger.py | 58 +- CEP/PyBDSM/src/python/opts.py | 48 +- CEP/PyBDSM/src/python/output.py | 303 +++--- CEP/PyBDSM/src/python/plotresults.py | 43 +- CEP/PyBDSM/src/python/polarisation.py | 1 + CEP/PyBDSM/src/python/preprocess.py | 26 +- CEP/PyBDSM/src/python/psf_vary.py | 182 ++-- CEP/PyBDSM/src/python/pybdsm.py | 23 +- CEP/PyBDSM/src/python/readimage.py | 31 +- CEP/PyBDSM/src/python/rmsimage.py | 184 ++-- CEP/PyBDSM/src/python/spectralindex.py | 162 +-- CEP/PyBDSM/src/python/statusbar.py | 11 +- CEP/PyBDSM/src/python/threshold.py | 14 +- CEP/PyBDSM/src/python/wavelet_atrous.py | 89 +- CMake/FindCFITSIO.cmake | 2 +- CMake/variants/variants.RS005C | 1 + JAVA/CEP/jParmFacade/Makefile.am | 16 - JAVA/CEP/jParmFacade/bootstrap | 3 - JAVA/CEP/jParmFacade/build.xml | 74 -- JAVA/CEP/jParmFacade/configure.in | 87 -- ...n_lofar_java_cep_jparmfacade_jParmFacade.h | 45 - JAVA/CEP/jParmFacade/jParmFacade.spec.in | 160 --- JAVA/CEP/jParmFacade/manifest.mf | 3 - JAVA/CEP/jParmFacade/pom.xml | 90 -- JAVA/CEP/jParmFacade/src/Makefile.am | 34 - JAVA/CEP/jParmFacade/test/Makefile.am | 25 - JAVA/GUI/MAC/jRSP/build.xml | 69 -- JAVA/GUI/MAC/jRSP/manifest.mf | 3 - JAVA/GUI/Plotter/pom.xml | 109 +- JAVA/LofarUtils/pom.xml | 117 +-- JAVA/MAC/jRSP/Makefile.am | 16 - JAVA/MAC/jRSP/bootstrap | 3 - JAVA/MAC/jRSP/build.xml | 69 -- JAVA/MAC/jRSP/configure.in | 74 -- JAVA/MAC/jRSP/depcomp | 529 ---------- .../nl_astron_lofar_java_mac_jrsp_Board.h | 125 --- JAVA/MAC/jRSP/jRSP.spec.in | 160 --- JAVA/MAC/jRSP/manifest.mf | 3 - JAVA/MAC/jRSP/pom.xml | 53 - JAVA/MAC/jRSP/src/Makefile.am | 24 - JAVA/pom.xml | 61 ++ .../include/ApplCommon/Observation.h | 6 + .../include/ApplCommon/StationDatatypes.h | 2 - LCS/ApplCommon/src/AntennaSets.cc | 8 +- LCS/ApplCommon/src/Observation.cc | 53 +- LCS/ApplCommon/src/StationInfo.cc | 26 +- LCS/ApplCommon/test/CMakeLists.txt | 1 + LCS/ApplCommon/test/tObservation.cc | 6 + LCS/ApplCommon/test/tObservation.in_conflict1 | 1 + LCS/ApplCommon/test/tObservation.in_conflict2 | 1 + LCS/ApplCommon/test/tObservation.in_conflict3 | 1 + LCS/ApplCommon/test/tObservation.in_conflict4 | 1 + LCS/ApplCommon/test/tObservation.in_conflict5 | 1 + LCS/ApplCommon/test/tObservation.in_conflict6 | 59 ++ LCS/ApplCommon/test/tObservation.in_parset1 | 1 + LCS/ApplCommon/test/tStationInfo.cc | 28 +- LCS/Common/include/Common/CMakeLists.txt | 1 + LCS/Common/include/Common/LofarBitModeInfo.h | 67 ++ LCS/Common/include/Common/LofarConstants.h | 5 +- LCS/Common/include/Common/Thread/Thread.h | 9 + LCS/Common/include/Common/i4complex.h | 15 +- LCS/Common/src/InputParSet.cc | 2 +- LCS/Common/test/CMakeLists.txt | 2 + LCS/Common/test/tBoostBitset.cc | 64 ++ LCS/MSLofar/include/MSLofar/BeamTables.h | 30 +- LCS/MSLofar/include/MSLofar/CMakeLists.txt | 1 + LCS/MSLofar/include/MSLofar/FailedTileInfo.h | 79 ++ .../include/MSLofar/MSAntennaFieldColumns.h | 6 + LCS/MSLofar/src/BeamTables.cc | 185 ++-- LCS/MSLofar/src/CMakeLists.txt | 2 + LCS/MSLofar/src/FailedTileInfo.cc | 279 +++++ LCS/MSLofar/src/MSAntennaField.cc | 3 + LCS/MSLofar/src/MSAntennaFieldColumns.cc | 2 + LCS/MSLofar/src/addfailedtileinfo.cc | 66 ++ LCS/MSLofar/src/makebeamtables.cc | 15 +- LCS/MSLofar/test/tBeamTables.cc | 115 +- .../MSLofar/test/tBeamTables.in_before_empty | 0 LCS/MSLofar/test/tBeamTables.in_before_filled | 12 + .../MSLofar/test/tBeamTables.in_during_empty | 0 LCS/MSLofar/test/tBeamTables.in_during_filled | 27 + LCS/MSLofar/test/tBeamTables.stdout | 340 +++++- LCS/MSLofar/test/tMSLofarTable.cc | 2 + LCS/Stream/include/Stream/PortBroker.h | 4 +- LCS/Stream/include/Stream/SocketStream.h | 6 +- LCS/Stream/src/PortBroker.cc | 14 +- LCS/Stream/src/SocketStream.cc | 35 +- LCU/Firmware/tools/src/flash_images.sh | 2 +- LCU/StationTest/stationtest.py | 78 +- LCU/StationTest/tc/no_dc.py | 37 + MAC/APL/APLCommon/src/ControllerDefines.cc | 6 +- MAC/APL/APLCommon/src/swlevel | 4 +- MAC/APL/CEPCU/CMakeLists.txt | 2 +- .../src/CEPHardwareMonitor/BlueGeneMonitor.cc | 330 ++++++ .../src/CEPHardwareMonitor/BlueGeneMonitor.h | 85 ++ .../src/CEPHardwareMonitor/CEPHWMonitor.dpl | 29 + .../CEPHardwareMonitor.conf | 12 + .../CEPHardwareMonitorMain.cc | 84 ++ .../src/CEPHardwareMonitor/CMakeLists.txt | 14 + .../src/CEPHardwareMonitor/ClusterMonitor.cc | 363 +++++++ .../src/CEPHardwareMonitor/ClusterMonitor.h | 89 ++ .../CEPHardwareMonitor/PVSSDatapointDefs.h | 457 ++++++++ MAC/APL/CEPCU/src/CEPHardwareMonitor/README | 10 + .../CEPCU/src/CEPHardwareMonitor/zabbix_get | Bin 0 -> 172190 bytes .../src/CEPlogProcessor/PVSSDatapointDefs.h | 189 +++- MAC/APL/CEPCU/src/CMakeLists.txt | 1 + .../CEPCU/src/OnlineControl/CMakeLists.txt | 2 + .../CEPCU/src/OnlineControl/OnlineControl.cc | 157 ++- .../CEPCU/src/OnlineControl/OnlineControl.h | 15 +- .../src/OnlineControl/PVSSDatapointDefs.h | 82 +- .../CEPCU/src/OnlineControl/tPVSSMapping.cc | 87 ++ .../src/PythonControl/PVSSDatapointDefs.h | 183 +++- .../CEPCU/src/PythonControl/PythonControl.cc | 28 +- .../include/APL/CR_Protocol/CRreadRequest.h | 6 +- .../include/APL/CR_Protocol/CRreadVector.h | 6 +- .../include/APL/CR_Protocol/CRrecordRequest.h | 6 +- .../include/APL/CR_Protocol/CRrecordVector.h | 6 +- .../include/APL/CR_Protocol/CRstopRequest.h | 6 +- .../include/APL/CR_Protocol/CRstopVector.h | 6 +- MAC/APL/CR_Protocol/src/CRreadRequest.cc | 22 +- MAC/APL/CR_Protocol/src/CRreadVector.cc | 22 +- MAC/APL/CR_Protocol/src/CRrecordRequest.cc | 22 +- MAC/APL/CR_Protocol/src/CRrecordVector.cc | 22 +- MAC/APL/CR_Protocol/src/CRstopRequest.cc | 28 +- MAC/APL/CR_Protocol/src/CRstopVector.cc | 18 +- .../src/CTStartDaemon/startController.sh | 2 +- .../src/SoftwareMonitor/PVSSDatapointDefs.h | 197 +++- .../src/SoftwareMonitor/SoftwareMonitor.cc | 1 + .../src/CRTriggerControl/PVSSDatapointDefs.h | 166 ++- MAC/APL/MainCU/src/MACScheduler/ObsClaimer.cc | 5 + .../src/MACScheduler/PVSSDatapointDefs.h | 168 ++- .../ObservationControl/ObservationControl.cc | 12 +- .../ObservationControl/PVSSDatapointDefs.h | 183 +++- .../include/APL/CAL_Protocol/AntennaGains.h | 6 +- .../include/APL/CAL_Protocol/SpectralWindow.h | 6 +- .../include/APL/CAL_Protocol/SubArray.h | 12 +- MAC/APL/PAC/CAL_Protocol/src/AntennaGains.cc | 22 +- .../PAC/CAL_Protocol/src/CAL_Protocol.prot | 6 +- .../PAC/CAL_Protocol/src/SpectralWindow.cc | 34 +- MAC/APL/PAC/CAL_Protocol/src/SubArray.cc | 64 +- MAC/APL/PAC/Cal_Server/src/ACMProxy.cc | 12 +- .../APL/IBS_Protocol/Beamlet2SubbandMap.h | 14 +- .../include/APL/IBS_Protocol/Pointing.h | 6 +- .../IBS_Protocol/src/Beamlet2SubbandMap.cc | 39 +- .../PAC/IBS_Protocol/src/IBS_Protocol.prot | 4 +- MAC/APL/PAC/IBS_Protocol/src/Pointing.cc | 34 +- .../include/APL/ICAL_Protocol/AntennaGains.h | 6 +- .../APL/ICAL_Protocol/SpectralWindow.h | 6 +- .../include/APL/ICAL_Protocol/SubArray.h | 12 +- MAC/APL/PAC/ICAL_Protocol/src/AntennaGains.cc | 22 +- .../PAC/ICAL_Protocol/src/SpectralWindow.cc | 30 +- MAC/APL/PAC/ICAL_Protocol/src/SubArray.cc | 52 +- MAC/APL/PAC/ITRFBeamServer/src/AnaBeamMgr.h | 5 +- .../PAC/ITRFBeamServer/src/AnalogueBeam.cc | 8 +- MAC/APL/PAC/ITRFBeamServer/src/AnalogueBeam.h | 1 + MAC/APL/PAC/ITRFBeamServer/src/Beam.h | 4 +- MAC/APL/PAC/ITRFBeamServer/src/BeamServer.cc | 212 +++- MAC/APL/PAC/ITRFBeamServer/src/BeamServer.h | 24 +- MAC/APL/PAC/ITRFBeamServer/src/DigitalBeam.cc | 12 +- MAC/APL/PAC/ITRFBeamServer/src/DigitalBeam.h | 1 + MAC/APL/PAC/ITRFBeamServer/src/beamctl.cc | 12 +- MAC/APL/PAC/ITRFBeamServer/src/beamctl.h | 12 +- MAC/APL/PAC/SHMInfo_Server/src/RspStatus.cc | 16 +- MAC/APL/PAC/SHMInfo_Server/src/RspStatus.h | 6 +- MAC/APL/PAC/SHMInfo_Server/src/SHMSession.cc | 9 +- .../PAC/SHMInfo_Server/src/XCStatistics.cc | 16 +- MAC/APL/PAC/SHMInfo_Server/src/XCStatistics.h | 6 +- MAC/APL/PIC/RSP_Driver/src/BMRead.cc | 108 ++ MAC/APL/PIC/RSP_Driver/src/BMRead.h | 68 ++ MAC/APL/PIC/RSP_Driver/src/BMWrite.cc | 114 ++ MAC/APL/PIC/RSP_Driver/src/BMWrite.h | 68 ++ MAC/APL/PIC/RSP_Driver/src/BWRead.cc | 61 +- MAC/APL/PIC/RSP_Driver/src/BWRead.h | 1 + MAC/APL/PIC/RSP_Driver/src/BWWrite.cc | 84 +- MAC/APL/PIC/RSP_Driver/src/BWWrite.h | 2 + MAC/APL/PIC/RSP_Driver/src/BstRead.cc | 180 ++-- MAC/APL/PIC/RSP_Driver/src/BstRead.h | 5 +- MAC/APL/PIC/RSP_Driver/src/CDOWrite.cc | 7 +- MAC/APL/PIC/RSP_Driver/src/CMakeLists.txt | 14 +- MAC/APL/PIC/RSP_Driver/src/Cache.cc | 126 ++- MAC/APL/PIC/RSP_Driver/src/Cache.h | 14 +- MAC/APL/PIC/RSP_Driver/src/Command.h | 18 +- MAC/APL/PIC/RSP_Driver/src/GetBitModeCmd.cc | 102 ++ MAC/APL/PIC/RSP_Driver/src/GetBitModeCmd.h | 92 ++ MAC/APL/PIC/RSP_Driver/src/GetStatsCmd.cc | 31 +- MAC/APL/PIC/RSP_Driver/src/GetSubbandsCmd.cc | 88 +- MAC/APL/PIC/RSP_Driver/src/GetWeightsCmd.cc | 51 +- MAC/APL/PIC/RSP_Driver/src/RSPDriver.cc | 155 ++- MAC/APL/PIC/RSP_Driver/src/RSPDriver.conf.in | 2 + MAC/APL/PIC/RSP_Driver/src/RSPDriver.h | 5 + MAC/APL/PIC/RSP_Driver/src/RawEvent.cc | 108 +- MAC/APL/PIC/RSP_Driver/src/SSRead.cc | 147 +-- MAC/APL/PIC/RSP_Driver/src/SSRead.h | 1 + MAC/APL/PIC/RSP_Driver/src/SSWrite.cc | 165 ++- MAC/APL/PIC/RSP_Driver/src/SSWrite.h | 2 + MAC/APL/PIC/RSP_Driver/src/Scheduler.cc | 42 +- MAC/APL/PIC/RSP_Driver/src/Scheduler.h | 4 +- MAC/APL/PIC/RSP_Driver/src/SetBitModeCmd.cc | 124 +++ MAC/APL/PIC/RSP_Driver/src/SetBitModeCmd.h | 87 ++ MAC/APL/PIC/RSP_Driver/src/SetSubbandsCmd.cc | 118 ++- MAC/APL/PIC/RSP_Driver/src/SetWeightsCmd.cc | 42 +- MAC/APL/PIC/RSP_Driver/src/SyncAction.h | 3 +- MAC/APL/PIC/RSP_Driver/src/UpdBitModeCmd.cc | 107 ++ MAC/APL/PIC/RSP_Driver/src/UpdBitModeCmd.h | 88 ++ MAC/APL/PIC/RSP_Driver/src/UpdStatsCmd.cc | 45 +- MAC/APL/PIC/RSP_Driver/src/UpdSubbandsCmd.cc | 78 +- MAC/APL/PIC/RSP_Driver/src/XWWrite.cc | 43 +- MAC/APL/PIC/RSP_Driver/src/XWWrite.h | 1 + MAC/APL/PIC/RSP_Driver/src/rspctl.cc | 588 ++++++++--- MAC/APL/PIC/RSP_Driver/src/rspctl.conf.in | 5 - MAC/APL/PIC/RSP_Driver/src/rspctl.h | 50 +- MAC/APL/PIC/RSP_Driver/test/RSPTest.cc | 12 +- .../APL/RSP_Protocol/AllRegisterState.h | 22 +- .../include/APL/RSP_Protocol/BeamletWeights.h | 12 +- .../include/APL/RSP_Protocol/Bitmode.h | 83 ++ .../include/APL/RSP_Protocol/BypassSettings.h | 6 +- .../include/APL/RSP_Protocol/CMakeLists.txt | 3 +- .../include/APL/RSP_Protocol/EPADefinitions.h | 14 +- .../include/APL/RSP_Protocol/HBASettings.h | 6 +- .../include/APL/RSP_Protocol/Latency.h | 6 +- .../include/APL/RSP_Protocol/MEPData.h | 6 +- .../include/APL/RSP_Protocol/MEPHeader.h | 65 +- .../include/APL/RSP_Protocol/RCUSettings.h | 6 +- .../include/APL/RSP_Protocol/RSUSettings.h | 6 +- .../include/APL/RSP_Protocol/SPUStatus.h | 6 +- .../include/APL/RSP_Protocol/Statistics.h | 8 +- .../APL/RSP_Protocol/SubbandSelection.h | 23 +- .../include/APL/RSP_Protocol/SystemStatus.h | 6 +- .../include/APL/RSP_Protocol/TBBSettings.h | 6 +- .../include/APL/RSP_Protocol/TDStatus.h | 6 +- .../include/APL/RSP_Protocol/Versions.h | 6 +- .../include/APL/RSP_Protocol/WGSettings.h | 6 +- .../include/APL/RSP_Protocol/XCStatistics.h | 6 +- .../PIC/RSP_Protocol/src/AllRegisterState.cc | 131 +-- .../PIC/RSP_Protocol/src/BeamletWeights.cc | 20 +- .../APL/PIC/RSP_Protocol/src/Bitmode.cc | 47 +- .../PIC/RSP_Protocol/src/BypassSettings.cc | 20 +- MAC/APL/PIC/RSP_Protocol/src/CMakeLists.txt | 3 +- .../PIC/RSP_Protocol/src/EPA_Protocol.prot | 22 + MAC/APL/PIC/RSP_Protocol/src/HBASettings.cc | 16 +- MAC/APL/PIC/RSP_Protocol/src/Latency.cc | 16 +- MAC/APL/PIC/RSP_Protocol/src/MEPData.cc | 9 +- MAC/APL/PIC/RSP_Protocol/src/MEPHeader.cc | 57 +- MAC/APL/PIC/RSP_Protocol/src/RCUSettings.cc | 16 +- .../PIC/RSP_Protocol/src/RSP_Protocol.prot | 185 +++- MAC/APL/PIC/RSP_Protocol/src/RSUSettings.cc | 16 +- MAC/APL/PIC/RSP_Protocol/src/SPUStatus.cc | 16 +- MAC/APL/PIC/RSP_Protocol/src/Statistics.cc | 16 +- .../PIC/RSP_Protocol/src/SubbandSelection.cc | 31 +- MAC/APL/PIC/RSP_Protocol/src/SystemStatus.cc | 16 +- MAC/APL/PIC/RSP_Protocol/src/TBBSettings.cc | 16 +- MAC/APL/PIC/RSP_Protocol/src/TDStatus.cc | 16 +- MAC/APL/PIC/RSP_Protocol/src/Versions.cc | 22 +- MAC/APL/PIC/RSP_Protocol/src/WGSettings.cc | 16 +- MAC/APL/PIC/RSP_Protocol/src/XCStatistics.cc | 16 +- .../include/APL/RTCCommon/MarshallBlitz.h | 80 +- .../include/APL/RTCCommon/NsTimestamp.h | 18 +- .../include/APL/RTCCommon/RegisterState.h | 16 +- .../include/APL/RTCCommon/Timestamp.h | 12 +- MAC/APL/RTCCommon/test/tMarshallBlitz.cc | 14 +- .../src/BeamControl/PVSSDatapointDefs.h | 203 +++- .../CalibrationControl/PVSSDatapointDefs.h | 203 +++- .../src/ClockControl/ClockControl.cc | 436 +++++++- .../StationCU/src/ClockControl/ClockControl.h | 14 +- .../src/ClockControl/PVSSDatapointDefs.h | 203 +++- MAC/APL/StationCU/src/ClockControl/clkctl.cc | 33 +- .../src/ClockProtocol/Clock_Protocol.prot | 53 + .../src/HardwareMonitor/ECMonitor.cc | 12 +- .../src/HardwareMonitor/PVSSDatapointDefs.h | 170 ++- .../StationCU/src/StationControl/ActiveObs.cc | 95 +- .../StationCU/src/StationControl/ActiveObs.h | 6 + .../src/StationControl/PVSSDatapointDefs.h | 197 +++- .../src/StationControl/StationControl.cc | 519 ++++++--- .../src/StationControl/StationControl.h | 17 +- .../src/StationControl/StationControlMain.cc | 4 - .../src/TBBControl/PVSSDatapointDefs.h | 170 ++- .../FI609/FI609-antenna-positions-etrs.csv | 50 + .../FI609/FI609-lba-solution.lisp | 12 + MAC/Deployment/data/OTDB/Calibration.comp | 4 +- MAC/Deployment/data/OTDB/DPPP.comp | 3 + MAC/Deployment/data/OTDB/Observation.comp | 1 + MAC/Deployment/data/OTDB/PreProcessing.comp | 13 + MAC/Deployment/data/OTDB/PythonControl.comp | 2 +- MAC/Deployment/data/OTDB/createPICfile | 25 +- MAC/Deployment/data/OTDB/create_OTDB_comps | 2 +- .../471_3031_2_Astron_Gen_II_2_311.log | 31 + .../PVSS/License/Astron_Central_1_shield.txt | 53 +- .../PVSS/License/Astron_Station_1_shield.txt | 28 +- .../data/PVSS/License/PVSStoolLicense.exe | Bin 65536 -> 89088 bytes .../data/PVSS/License/RS305C_option.txt | 29 + .../data/PVSS/License/shield.RS305C.txt | 29 + .../shield_471_3031_1_Astron_Gen_I_2_311.txt | 29 - .../shield_471_3031_2_Astron_Gen_II_2_311.txt | 30 - MAC/Deployment/data/PVSS/data/Adder.dpdef | 6 +- MAC/Deployment/data/PVSS/data/BGPAppl.dpdef | 11 +- .../data/PVSS/data/CEPHardwareMonitor.dpdef | 4 + .../data/PVSS/data/ClockControl.dpdef | 2 + MAC/Deployment/data/PVSS/data/MCUbase.dpdef | 16 +- .../data/PVSS/data/Observation.dpdef | 3 + .../data/PVSS/data/PVSSDataPoints.base | 8 +- MAC/Deployment/data/PVSS/data/RSPBoard.dpdef | 2 + .../data/PVSS/data/SoftwareMonitor.dpdef | 2 + MAC/Deployment/data/PVSS/data/Station.dpdef | 5 - .../data/PVSS/data/StationInfo.dpdef | 4 + .../data/PVSS/data/StnObservation.dpdef | 4 +- .../AntennaFields/DE601-AntennaField.conf | 408 ++++---- .../AntennaFields/FI609-AntennaField.conf | 258 ++--- .../AntennaFields/RS305-AntennaField.conf | 179 ++++ .../Attenuation/Attenuation.conf | 17 + .../Attenuation/DE601-Attenuation.conf | 17 + .../Attenuation/FI609-Attenuation.conf | 17 + .../CableDelays/DE601-CableDelays.conf | 99 +- .../CableDelays/FI609-CableDelays.conf | 225 ++-- .../CableDelays/RS210-CableDelays.conf | 114 ++ .../CableDelays/RS305-CableDelays.conf | 114 ++ .../data/StaticMetaData/ControlInfo.dat | 2 +- .../StaticMetaData/RSPConnections_CCU.dat | 8 +- .../StaticMetaData/RSPConnections_local.dat | 8 +- .../data/StaticMetaData/RSPDriver.conf.tmpl | 3 +- .../data/StaticMetaData/StationInfo.dat | 2 +- .../data/StaticMetaData/TBBConnections.dat | 1 + .../iHBADeltas/DE601-iHBADeltas.conf | 35 +- .../iHBADeltas/FI609-iHBADeltas.conf | 23 + .../iHBADeltas/RS305-iHBADeltas.conf | 23 + MAC/GCF/PVSS/src/PVSSinfo.cc | 8 +- MAC/MACIO/include/MACIO/CMakeLists.txt | 2 +- MAC/MACIO/include/MACIO/DoubleVector.h | 25 +- MAC/MACIO/include/MACIO/Marshalling.h | 244 ----- MAC/MACIO/include/MACIO/Marshalling.tcc | 237 +++++ MAC/MACIO/include/MACIO/ProtocolDefs.h | 19 +- MAC/MACIO/include/MACIO/StringVector.h | 26 +- MAC/MACIO/test/tMarshalling.cc | 164 +-- MAC/MACIO/test/tMarshalling.h | 14 +- MAC/Navigator2/panels/Hardware/CEP.pnl | 3 - .../panels/Hardware/CEP_BGPRack_detailed.pnl | 6 +- MAC/Navigator2/panels/Hardware/CEP_IONode.pnl | 784 ++++++++++++++ .../panels/Hardware/CEP_Midplane.pnl | 70 +- MAC/Navigator2/panels/Hardware/LOFAR_Core.pnl | 62 +- .../Observations/Observation_overview.pnl | 194 +++- MAC/Navigator2/panels/Processes/BGPAppl.pnl | 163 +-- MAC/Navigator2/panels/Processes/BGPProc.pnl | 928 +++++++++++++++++ .../panels/Processes/BGPProc_mainloader.pnl | 169 --- .../panels/Processes/CEP_IONodeProcesses.pnl | 408 ++++++++ .../panels/Processes/CEP_Processes.pnl | 20 +- .../panels/Processes/CEPlogProcessor.pnl | 88 ++ .../panels/Processes/CalibrationControl.pnl | 80 +- .../panels/Processes/MACScheduler.pnl | 85 +- .../panels/Processes/MainCU_Processes.pnl | 131 ++- .../panels/Processes/PythonControl.pnl | 165 +++ .../panels/Processes/Station_Processes.pnl | 111 +- MAC/Navigator2/panels/main.pnl | 423 +++++++- .../panels/objects/Hardware/CEP_BGPRack.pnl | 2 +- .../objects/Hardware/CEP_IONode_small.pnl | 26 +- .../objects/Hardware/CEP_Midplane_small.pnl | 36 +- .../objects/Hardware/Station-2Cabinets.pnl | 296 +++--- .../objects/Hardware/midplane_small.pnl | 42 +- .../panels/objects/Processes/BGPProc.pnl | 652 ------------ .../panels/objects/Processes/ObsSW_CEP.pnl | 29 +- .../panels/objects/Processes/ObsSW_Main.pnl | 74 +- .../panels/objects/Processes/adder.pnl | 482 ++++++--- .../objects/Processes/circularBuffer.pnl | 985 ++++++++++++++---- .../interactive_controller_small.pnl | 24 +- .../station_interactive_controller_small.pnl | 35 +- .../panels/objects/navigator_alerts.pnl | 45 +- .../panels/objects/navigator_progressBar.pnl | 21 +- .../objects/navigator_viewSelection.pnl | 89 +- MAC/Navigator2/scripts/libs/CEP_Processes.ctl | 2 +- .../scripts/libs/MainCU_Processes.ctl | 4 +- .../scripts/libs/Station_Processes.ctl | 9 +- MAC/Navigator2/scripts/libs/navCtrl.ctl | 70 +- MAC/Navigator2/scripts/libs/navFunct.ctl | 73 +- MAC/Navigator2/scripts/libs/navTabCtrl.ctl | 3 +- MAC/Navigator2/scripts/libs/navigator.ctl | 3 + .../scripts/readStationBGPconnections.ctl | 180 ++-- MAC/Tools/Clock/plotclock | 27 +- MAC/Tools/Rubidium/plotrubidium | 21 +- RTCP/CNProc/src/AsyncTransposeBeams.cc | 19 +- RTCP/CNProc/src/PPF.cc | 8 +- RTCP/IONProc/src/ION_main.cc | 16 +- RTCP/IONProc/src/InputThreadAsm.S | 2 +- RTCP/IONProc/src/Job.cc | 48 +- RTCP/IONProc/src/Job.h | 2 + RTCP/IONProc/src/LogThread.cc | 14 +- RTCP/IONProc/src/OutputSection.cc | 4 +- RTCP/IONProc/src/OutputThread.cc | 5 +- RTCP/IONProc/src/OutputThread.h | 1 + RTCP/IONProc/src/RSP.h | 17 +- RTCP/IONProc/src/SSH.cc | 220 ++-- RTCP/IONProc/src/SSH.h | 11 +- RTCP/IONProc/src/WallClockTime.h | 2 +- RTCP/IONProc/test/CMakeLists.txt | 3 + RTCP/IONProc/test/RTCP.parset | 20 +- .../test/newInputSection/CMakeLists.txt | 1 + RTCP/IONProc/test/newInputSection/OMPThread.h | 67 ++ RTCP/IONProc/test/newInputSection/Poll.h | 82 ++ RTCP/IONProc/test/newInputSection/Ranges.h | 217 ++++ .../test/newInputSection/SampleBuffer.h | 99 ++ .../test/newInputSection/SharedMemory.h | 149 +++ .../test/newInputSection/StationData.h | 390 +++++++ RTCP/IONProc/test/newInputSection/StationID.h | 82 ++ .../test/newInputSection/StationSettings.h | 79 ++ RTCP/IONProc/test/newInputSection/TimeSync.h | 89 ++ RTCP/IONProc/test/newInputSection/foo.cc | 457 ++++++++ .../test/newInputSection/newInputSection.cc | 922 ++++++++++++++++ .../newInputSection/newInputSection_old.cc | 706 +++++++++++++ RTCP/IONProc/test/newInputSection/shmtest.cc | 12 + .../test/newInputSection/tRSPTimeStamp.cc | 27 + RTCP/IONProc/test/tSSH.cc | 18 +- RTCP/IONProc/test/tSSH.stdout | 7 +- RTCP/Interface/include/Interface/Allocator.h | 21 +- .../include/Interface/MultiDimArray.h | 49 +- RTCP/Interface/include/Interface/Parset.h | 23 +- .../include/Interface/RSPTimeStamp.h | 1 + RTCP/Interface/include/Interface/SmartPtr.h | 8 + RTCP/Interface/include/Interface/Stream.h | 2 +- RTCP/Interface/src/Stream.cc | 18 +- RTCP/Run/src/LOFAR/Parset.py | 3 +- RTCP/Run/src/OLAP.parset | 177 ++-- RTCP/Run/src/RSPConnections.dat | 2 + RTCP/Run/src/RTCP.parset | 6 +- RTCP/Run/src/locations.sh.in | 8 +- RTCP/Run/src/startBGL.sh | 2 - RTCP/Storage/include/Storage/InputThread.h | 1 + RTCP/Storage/src/InputThread.cc | 5 +- RTCP/Storage/src/MSWriterDAL.cc | 4 +- RTCP/Storage/src/Storage_main.cc | 10 +- RTCP/Storage/src/TBB_Writer_main.cc | 7 +- RTCP/Storage/src/TBB_Writer_main.log_prop | 29 + RTCP/Storage/test/tMSWriterDAL.parset | 2 +- .../test/tMeasurementSetFormat.parset-j2000 | 4 +- .../test/tMeasurementSetFormat.parset-sun | 4 +- RTCP/Storage/test/tTBB_Writer.parset | 4 +- SAS/Beaminfo/CMakeLists.txt | 5 +- SAS/Beaminfo/src/CMakeLists.txt | 19 +- SAS/Beaminfo/src/FailedTileInfo.cc | 2 +- SAS/Beaminfo/src/failedtilesinfo.cc | 305 ++---- SAS/Beaminfo/test/CMakeLists.txt | 19 +- SAS/Beaminfo/test/failedtilesinfo.parset | 10 +- SAS/Beaminfo/test/tfailedtilesinfo.run | 26 + SAS/Beaminfo/test/tfailedtilesinfo.sh | 2 + SAS/Beaminfo/test/tfailedtilesinfo.stdout | 29 + SAS/OTB/OTB-distribution/assembly.xml | 64 +- SAS/OTB/OTB-distribution/pom.xml | 193 ++-- SAS/OTB/OTB/dist-src/startClientOTB | 4 +- SAS/OTB/OTB/pom.xml | 338 +++--- .../nl/astron/lofar/sas/otb/SharedVars.java | 9 +- .../lofar/sas/otb/panels/MainPanel.java | 2 +- .../sas/otb/panels/ResultBrowserPanel.form | 2 +- .../sas/otb/panels/ResultBrowserPanel.java | 60 +- .../lofar/sas/otb/panels/SamplePanel.form | 2 +- .../lofar/sas/otb/panels/SamplePanel.java | 13 +- .../otb/panels/TemplateMaintenancePanel.java | 42 +- .../nl/astron/lofar/sas/otb/util/CmdExec.java | 6 +- .../lofar/sas/otb/util/ConfigPanelHelper.java | 48 +- .../nl/astron/lofar/sas/otb/util/OtdbRmi.java | 29 +- .../otb/util/ParmDBConfigurationHelper.java | 2 +- .../lofar/sas/otb/util/ResultPanelHelper.java | 62 +- .../otb/util/SerializableFileContents.java | 10 +- .../lofar/sas/otb/util/StorageLocation.java | 4 +- .../plotter/PlotDataAccessParmDBImpl.java | 79 +- .../lofar/sas/otb/util/plotter/PlotSlot.java | 4 +- .../sas/otb/util/plotter/PlotSlotManager.java | 8 +- .../otb/util/plotter/PlotSlotViewFrame.java | 2 +- .../sas/otb/util/plotter/PlotSlotsPanel.form | 4 +- .../sas/otb/util/plotter/PlotSlotsPanel.java | 17 +- .../BeamformerConfigurationTableModel.java | 1 - .../util/tablemodels/ComponentTableModel.java | 27 +- .../DefaultTemplatetableModel.java | 2 - .../util/tablemodels/LogParamTableModel.java | 16 +- .../otb/util/tablemodels/PICtableModel.java | 36 +- .../tablemodels/ParamExtensionTableModel.java | 22 +- .../PencilConfigurationTableModel.java | 50 +- .../StateChangeHistoryTableModel.java | 16 +- .../TBBConfigurationTableModel.java | 249 +++-- .../util/tablemodels/TemplatetableModel.java | 34 +- .../otb/util/tablemodels/VICtableModel.java | 38 +- .../treemanagers/OTDBParamTreeManager.java | 11 +- .../util/treemanagers/ParmDBTreeManager.java | 10 +- .../util/treemanagers/ResultTreeManager.java | 11 +- .../treemanagers/TemplateTreeManager.java | 12 +- .../lofar/sas/otbcomponents/ButtonPanel.form | 2 +- .../lofar/sas/otbcomponents/ButtonPanel.java | 6 +- .../lofar/sas/otbcomponents/CampaignInfo.form | 2 +- .../lofar/sas/otbcomponents/CampaignInfo.java | 6 +- .../sas/otbcomponents/LogParamPanel.form | 10 +- .../sas/otbcomponents/LogParamPanel.java | 28 +- .../lofar/sas/otbcomponents/LoginDialog.form | 2 +- .../lofar/sas/otbcomponents/LoginDialog.java | 4 +- .../sas/otbcomponents/ParameterViewPanel.form | 2 +- .../sas/otbcomponents/ParameterViewPanel.java | 11 +- .../sas/otbcomponents/ParmDBConfigPanel.form | 2 +- .../sas/otbcomponents/ParmDBConfigPanel.java | 75 +- .../sas/otbcomponents/ParmDBPlotPanel.form | 2 +- .../sas/otbcomponents/ParmDBPlotPanel.java | 12 +- .../lofar/sas/otbcomponents/PencilDialog.form | 6 +- .../lofar/sas/otbcomponents/PencilDialog.java | 22 +- .../lofar/sas/otbcomponents/RoundButton.java | 2 +- .../lofar/sas/otbcomponents/SquareButton.java | 2 +- .../otbcomponents/StorageSelectionPanel.form | 8 +- .../otbcomponents/StorageSelectionPanel.java | 37 +- .../sas/otbcomponents/TBBControlPanel.form | 2 +- .../sas/otbcomponents/TBBControlPanel.java | 64 +- .../sas/otbcomponents/TreeInfoDialog.java | 4 +- .../otbcomponents/VerticalButtonPanel.form | 2 +- .../otbcomponents/VerticalButtonPanel.java | 4 +- .../lofar/sas/otbcomponents/bbs/BBSPanel.form | 2 +- .../lofar/sas/otbcomponents/bbs/BBSPanel.java | 110 +- .../otbcomponents/bbs/BBSStrategyPanel.form | 2 +- .../otbcomponents/bbs/BBSStrategyPanel.java | 225 ++-- .../bbs/stepmanagement/BBSStep.java | 18 +- .../bbs/stepmanagement/BBSStepData.java | 40 +- .../stepmanagement/BBSStepDataManager.java | 216 ++-- .../stepmanagement/BBSStepExplorerPanel.form | 2 +- .../stepmanagement/BBSStepExplorerPanel.java | 182 ++-- .../bbs/stepmanagement/BBSStrategy.java | 12 +- .../BBSStepOperationPanelSolveImpl.form | 2 +- .../BBSStepOperationPanelSolveImpl.java | 10 +- .../userpanels/ObservationPanel.java | 9 +- .../userpanels/TBBConfigPanel.java | 122 ++- .../OTB/src/no/geosoft/cc/io/FileMonitor.java | 13 +- {JAVA/GUI/MAC/jRSP => SAS/OTB/RSP}/.cvsignore | 0 SAS/OTB/RSP/pom.xml | 75 ++ .../lofar/java/sas/otb/rsp}/ControlPanel.form | 0 .../lofar/java/sas/otb/rsp}/ControlPanel.java | 3 +- .../lofar/java/sas/otb/rsp}/ITabPanel.java | 2 +- .../lofar/java/sas/otb/rsp}/ListPanel.form | 0 .../lofar/java/sas/otb/rsp}/ListPanel.java | 2 +- .../lofar/java/sas/otb/rsp}/MainPanel.form | 0 .../lofar/java/sas/otb/rsp}/MainPanel.java | 31 +- .../java/sas/otb/rsp}/MaskSelectionPanel.form | 0 .../java/sas/otb/rsp}/MaskSelectionPanel.java | 6 +- .../java/sas/otb/rsp}/PlotContainer.java | 5 +- .../java/sas/otb/rsp}/PlotDataModel.java | 3 +- .../rsp}/beamletstats/BeamletStatsPanel.form | 0 .../rsp}/beamletstats/BeamletStatsPanel.java | 16 +- .../sas/otb/rsp}/control/RSPControlPanel.form | 0 .../sas/otb/rsp}/control/RSPControlPanel.java | 15 +- .../sas/otb/rsp}/status/ADOStatusPanel.form | 0 .../sas/otb/rsp}/status/ADOStatusPanel.java | 5 +- .../sas/otb/rsp}/status/DIAGStatusPanel.form | 0 .../sas/otb/rsp}/status/DIAGStatusPanel.java | 4 +- .../sas/otb/rsp}/status/ETHStatusPanel.form | 0 .../sas/otb/rsp}/status/ETHStatusPanel.java | 4 +- .../sas/otb/rsp}/status/MEPStatusPanel.form | 0 .../sas/otb/rsp}/status/MEPStatusPanel.java | 4 +- .../sas/otb/rsp}/status/RCUStatusPanel.form | 0 .../sas/otb/rsp}/status/RCUStatusPanel.java | 5 +- .../sas/otb/rsp}/status/RSPStatusPanel.form | 0 .../sas/otb/rsp}/status/RSPStatusPanel.java | 5 +- .../sas/otb/rsp}/status/RSUStatusPanel.form | 0 .../sas/otb/rsp}/status/RSUStatusPanel.java | 4 +- .../java/sas/otb/rsp}/status/StatusPanel.form | 0 .../java/sas/otb/rsp}/status/StatusPanel.java | 79 +- .../sas/otb/rsp}/status/SyncStatusPanel.form | 0 .../sas/otb/rsp}/status/SyncStatusPanel.java | 5 +- .../java/sas/otb/rsp}/subbandstats/.cvsignore | 0 .../rsp}/subbandstats/SubbandStatsPanel.form | 0 .../rsp}/subbandstats/SubbandStatsPanel.java | 26 +- .../subbandstats/SubbandStatsPlotPanel.form | 0 .../subbandstats/SubbandStatsPlotPanel.java | 21 +- .../WaveformSettingsInputPanel.form | 0 .../WaveformSettingsInputPanel.java | 3 +- .../WaveformSettingsListPanel.java | 10 +- .../subbandstats/WaveformSettingsPanel.form | 0 .../subbandstats/WaveformSettingsPanel.java | 12 +- .../rsp}/subbandstats/WaveformTableModel.java | 6 +- SAS/OTB/jOTDB3/assembly.xml | 96 +- SAS/OTB/jOTDB3/dist-src/startServerOTB | 6 +- ...nl_astron_lofar_sas_otb_jotdb3_jCampaign.h | 85 +- ...astron_lofar_sas_otb_jotdb3_jClassifConv.h | 83 +- ...tron_lofar_sas_otb_jotdb3_jInitCPPLogger.h | 38 +- ...ron_lofar_sas_otb_jotdb3_jOTDBconnection.h | 272 +---- ...tron_lofar_sas_otb_jotdb3_jParamTypeConv.h | 83 +- ...on_lofar_sas_otb_jotdb3_jTreeMaintenance.h | 443 ++------ ...tron_lofar_sas_otb_jotdb3_jTreeStateConv.h | 83 +- ...stron_lofar_sas_otb_jotdb3_jTreeTypeConv.h | 83 +- ...l_astron_lofar_sas_otb_jotdb3_jTreeValue.h | 129 +-- ...nl_astron_lofar_sas_otb_jotdb3_jUnitConv.h | 83 +- SAS/OTB/jOTDB3/pom.xml | 368 +++---- .../lofar/sas/otb/jotdb3/jTreeValue.java | 20 +- .../sas/otb/jotdb3/jTreeValueInterface.java | 5 +- ..._astron_lofar_sas_otb_jotdb3_jTreeValue.cc | 48 + .../conf/Plotter-config-jparmfacade.jar | Bin .../OTB}/jParmFacade/include/Makefile.am | 0 .../include/jParmFacade/Makefile.am | 0 ...on_lofar_sas_otb_jparmfacade_jParmFacade.h | 45 + SAS/OTB/jParmFacade/pom.xml | 83 ++ .../sas/otb}/jparmfacade/jParmFacade.java | 28 +- .../sas/otb}/jparmfacade/jParmFacade.log_prop | 0 .../otb}/jparmfacade/jParmFacadeAdapter.java | 37 +- .../jparmfacade/jParmFacadeInterface.java | 12 +- .../otb}/jparmfacade/jParmFacadeServer.java | 4 +- ...stron_lofar_otb_jparmfacade_jParmFacade.cc | 617 ++++++----- .../otb/jparmfacade}/test/tParmFacade.java | 15 +- .../jparmfacade}/test/tRemoteParmFacade.java | 16 +- {JAVA/MAC => SAS/OTB}/jRSP/.cvsignore | 0 .../MAC => SAS/OTB}/jRSP/include/Makefile.am | 0 .../OTB}/jRSP/include/jRSP/Makefile.am | 0 .../jRSP/nl_astron_lofar_sas_otb_jrsp_Board.h | 125 +++ SAS/OTB/jRSP/pom.xml | 75 ++ .../astron/lofar/sas/otb}/jrsp/ADOStatus.java | 2 +- .../nl/astron/lofar/sas/otb}/jrsp/Board.java | 2 +- .../lofar/sas/otb}/jrsp/BoardStatus.java | 2 +- .../nl/astron/lofar/sas/otb}/jrsp/IMask.java | 2 +- .../astron/lofar/sas/otb}/jrsp/RCUMask.java | 2 +- .../astron/lofar/sas/otb}/jrsp/RCUStatus.java | 2 +- .../astron/lofar/sas/otb}/jrsp/RSPMask.java | 2 +- .../lofar/sas/otb}/jrsp/SyncStatus.java | 2 +- .../lofar/sas/otb}/jrsp/WGRegisterType.java | 2 +- .../sas/otb}/jrsp/tools/CodeGenerator.java | 2 +- .../sas/otb}/jrsp/tools/SubbandStatsTest.java | 4 +- .../lofar/sas/otb}/jrsp/tools/TestClass.java | 6 +- .../nl_astron_lofar_java_mac_jrsp_Board.cc | 0 {JAVA/MAC => SAS/OTB}/jRSP/test/Makefile.am | 0 SAS/OTB/pom.xml | 190 ++++ SAS/OTDB/SPRINT_1.8 | 25 + SAS/OTDB/include/OTDB/TreeValue.h | 7 +- SAS/OTDB/sql/getBrokenHardware_func.sql | 26 +- SAS/OTDB/src/TreeValue.cc | 80 +- SAS/OTDB/test/CMakeLists.txt | 1 + SAS/OTDB/test/tBrokenHardware.cc | 201 ++++ SubSystems/LCU_MAC/CMakeLists.txt | 2 +- 790 files changed, 28874 insertions(+), 16012 deletions(-) create mode 100644 CEP/DP3/DPPP/share/HBAdefault delete mode 100644 CEP/DP3/DPPP/src/EstimateNDPPP.cc create mode 100755 CEP/DP3/DPPP/test/testdemixfilter create mode 100644 CEP/GSM/bremen/sql/tables/create.table.image_stats.sql create mode 100644 CEP/GSM/bremen/sql/tables/create.table.runs.sql create mode 100644 CEP/Imager/LofarFT/src/makebeamimage.cc rename CEP/Pipeline/deploy/{ => deprecated}/fabfile.py (100%) rename CEP/Pipeline/deploy/{ => deprecated}/ipcontroller.sh (100%) rename CEP/Pipeline/deploy/{ => deprecated}/ipengine.sh (100%) rename CEP/Pipeline/deploy/{ => deprecated}/start_cluster.py (100%) rename CEP/Pipeline/deploy/{ => deprecated}/stop_cluster.py (100%) rename CEP/Pipeline/framework/lofarpipe/support/{ => deprecated}/clusterhandler.py (100%) rename CEP/Pipeline/framework/lofarpipe/support/{ => deprecated}/clusterlogger.py (100%) rename CEP/Pipeline/framework/lofarpipe/support/{ => deprecated}/ipython.py (100%) rename CEP/Pipeline/framework/lofarpipe/support/{ => deprecated}/lofarrecipe.py (100%) create mode 100644 CEP/Pipeline/recipes/sip/bin/calibration_pipeline.py create mode 100644 CEP/Pipeline/recipes/sip/bin/preprocessing_pipeline.py rename CEP/Pipeline/recipes/sip/master/{ => deprecated}/bbs.py (100%) delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/casapy.py rename CEP/Pipeline/recipes/sip/master/{ => deprecated}/cep2_datamapper.py (100%) rename CEP/Pipeline/recipes/sip/master/{ => deprecated}/cimager.py (100%) delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/collector.py delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/colmaker.py rename CEP/Pipeline/recipes/sip/master/{ => deprecated}/compression_pipeline.py (100%) delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/copier.py rename CEP/Pipeline/recipes/sip/master/{ => deprecated}/count_timesteps.py (100%) rename CEP/Pipeline/recipes/sip/master/{ => deprecated}/datamapper.py (100%) rename CEP/Pipeline/recipes/sip/master/{ => deprecated}/demixing.py (100%) delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/dppp.py delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/dummy_echo_parallel.py delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/excluder.py rename CEP/Pipeline/recipes/sip/master/{ => deprecated}/flag_baseline.py (100%) delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/flagger.py rename CEP/Pipeline/recipes/sip/master/{ => deprecated}/make_flaggable.py (100%) delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/mwimager.py delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/pyraprunner.py delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/qcheck.py delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/qcheck/README delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/qcheck/qcheck.py delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/sextractor.py delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/simple_se.py rename CEP/Pipeline/recipes/sip/master/{ => deprecated}/skymodel.py (100%) rename CEP/Pipeline/recipes/sip/master/{ => deprecated}/storagemapper.py (100%) delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/trimmer.py delete mode 100644 CEP/Pipeline/recipes/sip/master/deprecated/vdsmaker.py delete mode 100644 CEP/Pipeline/recipes/sip/master/parset.test rename CEP/Pipeline/recipes/sip/nodes/{ => deprecated}/bbs.py (100%) delete mode 100644 CEP/Pipeline/recipes/sip/nodes/deprecated/casapy.py rename CEP/Pipeline/recipes/sip/nodes/{ => deprecated}/cimager.py (100%) delete mode 100644 CEP/Pipeline/recipes/sip/nodes/deprecated/colmaker.py rename CEP/Pipeline/recipes/sip/nodes/{ => deprecated}/count_timesteps.py (100%) rename CEP/Pipeline/recipes/sip/nodes/{ => deprecated}/demix/demixing.py (100%) rename CEP/Pipeline/recipes/sip/nodes/{ => deprecated}/demix/median_filter.py (100%) rename CEP/Pipeline/recipes/sip/nodes/{ => deprecated}/demix/shiftphasecenter.py (100%) rename CEP/Pipeline/recipes/sip/nodes/{ => deprecated}/demix/smoothdemix.py (100%) rename CEP/Pipeline/recipes/sip/nodes/{ => deprecated}/demix/subtract_from_averaged.py (100%) rename CEP/Pipeline/recipes/sip/nodes/{ => deprecated}/demixing.py (100%) delete mode 100644 CEP/Pipeline/recipes/sip/nodes/deprecated/dummy_echo_parallel.py delete mode 100644 CEP/Pipeline/recipes/sip/nodes/deprecated/excluder.py rename CEP/Pipeline/recipes/sip/nodes/{ => deprecated}/flag_baseline.py (100%) delete mode 100644 CEP/Pipeline/recipes/sip/nodes/deprecated/flagger.py rename CEP/Pipeline/recipes/sip/nodes/{ => deprecated}/make_flaggable.py (100%) delete mode 100644 CEP/Pipeline/recipes/sip/nodes/deprecated/qcheck.py delete mode 100644 CEP/Pipeline/recipes/sip/nodes/deprecated/sextractor.py delete mode 100644 CEP/Pipeline/recipes/sip/nodes/deprecated/trimmer.py create mode 100644 CEP/Pipeline/test/regression_tests/jenkins_config/calibrator_regression.config.xml create mode 100644 CEP/Pipeline/test/regression_tests/jenkins_config/imaging_regression.config.xml create mode 100644 CEP/Pipeline/test/regression_tests/jenkins_config/pipeline_task_regression.config.xml create mode 100644 CEP/Pipeline/test/regression_tests/jenkins_config/target_regression.config.xml create mode 100644 CEP/Pipeline/test/regression_tests/target_pipeline.py create mode 100644 CEP/PyBDSM/doc/source/_templates/searchbox.html delete mode 100644 JAVA/CEP/jParmFacade/Makefile.am delete mode 100755 JAVA/CEP/jParmFacade/bootstrap delete mode 100644 JAVA/CEP/jParmFacade/build.xml delete mode 100644 JAVA/CEP/jParmFacade/configure.in delete mode 100644 JAVA/CEP/jParmFacade/include/jParmFacade/nl_astron_lofar_java_cep_jparmfacade_jParmFacade.h delete mode 100644 JAVA/CEP/jParmFacade/jParmFacade.spec.in delete mode 100644 JAVA/CEP/jParmFacade/manifest.mf delete mode 100644 JAVA/CEP/jParmFacade/pom.xml delete mode 100644 JAVA/CEP/jParmFacade/src/Makefile.am delete mode 100644 JAVA/CEP/jParmFacade/test/Makefile.am delete mode 100644 JAVA/GUI/MAC/jRSP/build.xml delete mode 100644 JAVA/GUI/MAC/jRSP/manifest.mf delete mode 100644 JAVA/MAC/jRSP/Makefile.am delete mode 100755 JAVA/MAC/jRSP/bootstrap delete mode 100644 JAVA/MAC/jRSP/build.xml delete mode 100644 JAVA/MAC/jRSP/configure.in delete mode 100644 JAVA/MAC/jRSP/depcomp delete mode 100644 JAVA/MAC/jRSP/include/jRSP/nl_astron_lofar_java_mac_jrsp_Board.h delete mode 100644 JAVA/MAC/jRSP/jRSP.spec.in delete mode 100644 JAVA/MAC/jRSP/manifest.mf delete mode 100644 JAVA/MAC/jRSP/pom.xml delete mode 100644 JAVA/MAC/jRSP/src/Makefile.am create mode 100644 JAVA/pom.xml create mode 100644 LCS/ApplCommon/test/tObservation.in_conflict6 create mode 100644 LCS/Common/include/Common/LofarBitModeInfo.h create mode 100644 LCS/Common/test/tBoostBitset.cc create mode 100644 LCS/MSLofar/include/MSLofar/FailedTileInfo.h create mode 100644 LCS/MSLofar/src/FailedTileInfo.cc create mode 100644 LCS/MSLofar/src/addfailedtileinfo.cc rename CEP/Pipeline/recipes/sip/master/deprecated/qcheck/__init__.py => LCS/MSLofar/test/tBeamTables.in_before_empty (100%) create mode 100644 LCS/MSLofar/test/tBeamTables.in_before_filled rename MAC/Deployment/data/PVSS/License/test_shield.txt => LCS/MSLofar/test/tBeamTables.in_during_empty (100%) create mode 100644 LCS/MSLofar/test/tBeamTables.in_during_filled create mode 100644 LCU/StationTest/tc/no_dc.py create mode 100644 MAC/APL/CEPCU/src/CEPHardwareMonitor/BlueGeneMonitor.cc create mode 100644 MAC/APL/CEPCU/src/CEPHardwareMonitor/BlueGeneMonitor.h create mode 100644 MAC/APL/CEPCU/src/CEPHardwareMonitor/CEPHWMonitor.dpl create mode 100644 MAC/APL/CEPCU/src/CEPHardwareMonitor/CEPHardwareMonitor.conf create mode 100644 MAC/APL/CEPCU/src/CEPHardwareMonitor/CEPHardwareMonitorMain.cc create mode 100644 MAC/APL/CEPCU/src/CEPHardwareMonitor/CMakeLists.txt create mode 100644 MAC/APL/CEPCU/src/CEPHardwareMonitor/ClusterMonitor.cc create mode 100644 MAC/APL/CEPCU/src/CEPHardwareMonitor/ClusterMonitor.h create mode 100644 MAC/APL/CEPCU/src/CEPHardwareMonitor/PVSSDatapointDefs.h create mode 100644 MAC/APL/CEPCU/src/CEPHardwareMonitor/README create mode 100755 MAC/APL/CEPCU/src/CEPHardwareMonitor/zabbix_get create mode 100644 MAC/APL/CEPCU/src/OnlineControl/tPVSSMapping.cc create mode 100644 MAC/APL/PIC/RSP_Driver/src/BMRead.cc create mode 100644 MAC/APL/PIC/RSP_Driver/src/BMRead.h create mode 100644 MAC/APL/PIC/RSP_Driver/src/BMWrite.cc create mode 100644 MAC/APL/PIC/RSP_Driver/src/BMWrite.h create mode 100644 MAC/APL/PIC/RSP_Driver/src/GetBitModeCmd.cc create mode 100644 MAC/APL/PIC/RSP_Driver/src/GetBitModeCmd.h create mode 100644 MAC/APL/PIC/RSP_Driver/src/SetBitModeCmd.cc create mode 100644 MAC/APL/PIC/RSP_Driver/src/SetBitModeCmd.h create mode 100644 MAC/APL/PIC/RSP_Driver/src/UpdBitModeCmd.cc create mode 100644 MAC/APL/PIC/RSP_Driver/src/UpdBitModeCmd.h delete mode 100644 MAC/APL/PIC/RSP_Driver/src/rspctl.conf.in create mode 100644 MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Bitmode.h rename JAVA/CEP/jParmFacade/include/jParmFacade/nl_astron_lofar_java_cep_jparmfacade_jCommon.h => MAC/APL/PIC/RSP_Protocol/src/Bitmode.cc (54%) create mode 100644 MAC/Deployment/data/Coordinates/vectors-and-matrices/FI609/FI609-lba-solution.lisp create mode 100644 MAC/Deployment/data/OTDB/PreProcessing.comp create mode 100644 MAC/Deployment/data/PVSS/License/471_3031_2_Astron_Gen_II_2_311.log create mode 100644 MAC/Deployment/data/PVSS/License/RS305C_option.txt create mode 100644 MAC/Deployment/data/PVSS/License/shield.RS305C.txt delete mode 100644 MAC/Deployment/data/PVSS/License/shield_471_3031_1_Astron_Gen_I_2_311.txt delete mode 100644 MAC/Deployment/data/PVSS/License/shield_471_3031_2_Astron_Gen_II_2_311.txt create mode 100644 MAC/Deployment/data/PVSS/data/CEPHardwareMonitor.dpdef create mode 100644 MAC/Deployment/data/PVSS/data/SoftwareMonitor.dpdef delete mode 100644 MAC/Deployment/data/PVSS/data/Station.dpdef create mode 100644 MAC/Deployment/data/StaticMetaData/AntennaFields/RS305-AntennaField.conf create mode 100644 MAC/Deployment/data/StaticMetaData/Attenuation/Attenuation.conf create mode 100644 MAC/Deployment/data/StaticMetaData/Attenuation/DE601-Attenuation.conf create mode 100644 MAC/Deployment/data/StaticMetaData/Attenuation/FI609-Attenuation.conf create mode 100644 MAC/Deployment/data/StaticMetaData/CableDelays/RS210-CableDelays.conf create mode 100644 MAC/Deployment/data/StaticMetaData/CableDelays/RS305-CableDelays.conf create mode 100644 MAC/Deployment/data/StaticMetaData/iHBADeltas/FI609-iHBADeltas.conf create mode 100644 MAC/Deployment/data/StaticMetaData/iHBADeltas/RS305-iHBADeltas.conf delete mode 100644 MAC/MACIO/include/MACIO/Marshalling.h create mode 100644 MAC/MACIO/include/MACIO/Marshalling.tcc create mode 100644 MAC/Navigator2/panels/Hardware/CEP_IONode.pnl create mode 100644 MAC/Navigator2/panels/Processes/BGPProc.pnl delete mode 100644 MAC/Navigator2/panels/Processes/BGPProc_mainloader.pnl create mode 100644 MAC/Navigator2/panels/Processes/CEP_IONodeProcesses.pnl create mode 100644 MAC/Navigator2/panels/Processes/CEPlogProcessor.pnl create mode 100644 MAC/Navigator2/panels/Processes/PythonControl.pnl delete mode 100644 MAC/Navigator2/panels/objects/Processes/BGPProc.pnl create mode 100644 RTCP/IONProc/test/newInputSection/CMakeLists.txt create mode 100644 RTCP/IONProc/test/newInputSection/OMPThread.h create mode 100644 RTCP/IONProc/test/newInputSection/Poll.h create mode 100644 RTCP/IONProc/test/newInputSection/Ranges.h create mode 100644 RTCP/IONProc/test/newInputSection/SampleBuffer.h create mode 100644 RTCP/IONProc/test/newInputSection/SharedMemory.h create mode 100644 RTCP/IONProc/test/newInputSection/StationData.h create mode 100644 RTCP/IONProc/test/newInputSection/StationID.h create mode 100644 RTCP/IONProc/test/newInputSection/StationSettings.h create mode 100644 RTCP/IONProc/test/newInputSection/TimeSync.h create mode 100644 RTCP/IONProc/test/newInputSection/foo.cc create mode 100644 RTCP/IONProc/test/newInputSection/newInputSection.cc create mode 100644 RTCP/IONProc/test/newInputSection/newInputSection_old.cc create mode 100644 RTCP/IONProc/test/newInputSection/shmtest.cc create mode 100644 RTCP/IONProc/test/newInputSection/tRSPTimeStamp.cc create mode 100644 RTCP/Storage/src/TBB_Writer_main.log_prop create mode 100755 SAS/Beaminfo/test/tfailedtilesinfo.run create mode 100755 SAS/Beaminfo/test/tfailedtilesinfo.sh create mode 100644 SAS/Beaminfo/test/tfailedtilesinfo.stdout rename {JAVA/GUI/MAC/jRSP => SAS/OTB/RSP}/.cvsignore (100%) create mode 100644 SAS/OTB/RSP/pom.xml rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/ControlPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/ControlPanel.java (99%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/ITabPanel.java (97%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/ListPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/ListPanel.java (99%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/MainPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/MainPanel.java (94%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/MaskSelectionPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/MaskSelectionPanel.java (99%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/PlotContainer.java (98%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/PlotDataModel.java (99%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/beamletstats/BeamletStatsPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/beamletstats/BeamletStatsPanel.java (91%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/control/RSPControlPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/control/RSPControlPanel.java (97%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/ADOStatusPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/ADOStatusPanel.java (98%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/DIAGStatusPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/DIAGStatusPanel.java (99%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/ETHStatusPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/ETHStatusPanel.java (98%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/MEPStatusPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/MEPStatusPanel.java (98%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/RCUStatusPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/RCUStatusPanel.java (98%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/RSPStatusPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/RSPStatusPanel.java (99%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/RSUStatusPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/RSUStatusPanel.java (98%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/StatusPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/StatusPanel.java (81%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/SyncStatusPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/status/SyncStatusPanel.java (98%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/subbandstats/.cvsignore (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/subbandstats/SubbandStatsPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/subbandstats/SubbandStatsPanel.java (94%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/subbandstats/SubbandStatsPlotPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/subbandstats/SubbandStatsPlotPanel.java (93%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/subbandstats/WaveformSettingsInputPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/subbandstats/WaveformSettingsInputPanel.java (99%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/subbandstats/WaveformSettingsListPanel.java (94%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/subbandstats/WaveformSettingsPanel.form (100%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/subbandstats/WaveformSettingsPanel.java (88%) rename {JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp => SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp}/subbandstats/WaveformTableModel.java (96%) rename {JAVA/CEP => SAS/OTB}/jParmFacade/conf/Plotter-config-jparmfacade.jar (100%) rename {JAVA/CEP => SAS/OTB}/jParmFacade/include/Makefile.am (100%) rename {JAVA/CEP => SAS/OTB}/jParmFacade/include/jParmFacade/Makefile.am (100%) create mode 100644 SAS/OTB/jParmFacade/include/jParmFacade/nl_astron_lofar_sas_otb_jparmfacade_jParmFacade.h create mode 100644 SAS/OTB/jParmFacade/pom.xml rename {JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep => SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb}/jparmfacade/jParmFacade.java (82%) rename {JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep => SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb}/jparmfacade/jParmFacade.log_prop (100%) rename {JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep => SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb}/jparmfacade/jParmFacadeAdapter.java (79%) rename {JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep => SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb}/jparmfacade/jParmFacadeInterface.java (85%) rename {JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep => SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb}/jparmfacade/jParmFacadeServer.java (98%) rename JAVA/CEP/jParmFacade/src/nl_astron_lofar_java_cep_jparmfacade_jParmFacade.cc => SAS/OTB/jParmFacade/src/nl_astron_lofar_otb_jparmfacade_jParmFacade.cc (78%) rename {JAVA/CEP/jParmFacade => SAS/OTB/jParmFacade/test/nl/astron/lofar/sas/otb/jparmfacade}/test/tParmFacade.java (86%) rename {JAVA/CEP/jParmFacade => SAS/OTB/jParmFacade/test/nl/astron/lofar/sas/otb/jparmfacade}/test/tRemoteParmFacade.java (88%) rename {JAVA/MAC => SAS/OTB}/jRSP/.cvsignore (100%) rename {JAVA/MAC => SAS/OTB}/jRSP/include/Makefile.am (100%) rename {JAVA/MAC => SAS/OTB}/jRSP/include/jRSP/Makefile.am (100%) create mode 100644 SAS/OTB/jRSP/include/jRSP/nl_astron_lofar_sas_otb_jrsp_Board.h create mode 100644 SAS/OTB/jRSP/pom.xml rename {JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac => SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb}/jrsp/ADOStatus.java (96%) rename {JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac => SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb}/jrsp/Board.java (99%) rename {JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac => SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb}/jrsp/BoardStatus.java (99%) rename {JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac => SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb}/jrsp/IMask.java (98%) rename {JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac => SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb}/jrsp/RCUMask.java (98%) rename {JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac => SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb}/jrsp/RCUStatus.java (96%) rename {JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac => SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb}/jrsp/RSPMask.java (98%) rename {JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac => SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb}/jrsp/SyncStatus.java (97%) rename {JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac => SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb}/jrsp/WGRegisterType.java (98%) rename {JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac => SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb}/jrsp/tools/CodeGenerator.java (97%) rename {JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac => SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb}/jrsp/tools/SubbandStatsTest.java (86%) rename {JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac => SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb}/jrsp/tools/TestClass.java (86%) rename {JAVA/MAC => SAS/OTB}/jRSP/src/nl_astron_lofar_java_mac_jrsp_Board.cc (100%) rename {JAVA/MAC => SAS/OTB}/jRSP/test/Makefile.am (100%) create mode 100644 SAS/OTB/pom.xml create mode 100644 SAS/OTDB/SPRINT_1.8 create mode 100644 SAS/OTDB/test/tBrokenHardware.cc diff --git a/.gitattributes b/.gitattributes index c813390d67f..cb6389607ce 100644 --- a/.gitattributes +++ b/.gitattributes @@ -752,6 +752,7 @@ CEP/DP3/DPPP/include/DPPP/SourceDBUtil.h -text CEP/DP3/DPPP/include/DPPP/Stokes.h -text CEP/DP3/DPPP/include/DPPP/SubtractMixed.h -text CEP/DP3/DPPP/package.dox -text +CEP/DP3/DPPP/share/HBAdefault -text CEP/DP3/DPPP/share/LBAdefault -text CEP/DP3/DPPP/src/Apply.cc -text CEP/DP3/DPPP/src/BandpassCorrector.cc -text @@ -760,7 +761,6 @@ CEP/DP3/DPPP/src/ComplexMedianFlagger2.cc -text CEP/DP3/DPPP/src/DataBuffer.cc -text CEP/DP3/DPPP/src/DataSquasher.cc -text CEP/DP3/DPPP/src/EstimateMixed.cc -text -CEP/DP3/DPPP/src/EstimateNDPPP.cc -text CEP/DP3/DPPP/src/FrequencyFlagger.cc -text CEP/DP3/DPPP/src/GaussianSource.cc -text CEP/DP3/DPPP/src/IDPPP.cc -text @@ -786,6 +786,7 @@ CEP/DP3/DPPP/src/taqlflagger -text CEP/DP3/DPPP/test/CS1_IDPPP.log_prop -text CEP/DP3/DPPP/test/CS1_IDPPP.parset -text CEP/DP3/DPPP/test/tNDPPP.in_MS.tgz -text svneol=unset#application/x-compressed-tar +CEP/DP3/DPPP/test/testdemixfilter -text CEP/DP3/DPPP/test/tmwflagger.in_cd -text CEP/DP3/DPPP/test/tmwflagger.in_vd -text CEP/GSM/bremen/Makefile -text @@ -808,9 +809,11 @@ CEP/GSM/bremen/sql/tables/create.table.datasets.sql -text CEP/GSM/bremen/sql/tables/create.table.detections.sql -text CEP/GSM/bremen/sql/tables/create.table.extractedsources.sql -text CEP/GSM/bremen/sql/tables/create.table.frequencybands.sql -text +CEP/GSM/bremen/sql/tables/create.table.image_stats.sql -text CEP/GSM/bremen/sql/tables/create.table.images.sql -text CEP/GSM/bremen/sql/tables/create.table.runningcatalog.sql -text CEP/GSM/bremen/sql/tables/create.table.runningcatalog_fluxes.sql -text +CEP/GSM/bremen/sql/tables/create.table.runs.sql -text CEP/GSM/bremen/sql/tables/create.table.temp_associations.sql -text CEP/GSM/bremen/sql/tables/create.table.temprunningcatalog.sql -text CEP/GSM/bremen/sql/tables/freq.dat -text @@ -979,6 +982,7 @@ CEP/Imager/LofarFT/src/LofarCubeSkyEquation.cc -text CEP/Imager/LofarFT/src/LofarVisibilityResampler.cc -text CEP/Imager/LofarFT/src/LofarVisibilityResamplerBase.cc -text CEP/Imager/LofarFT/src/addImagingInfo -text +CEP/Imager/LofarFT/src/makebeamimage.cc -text CEP/LMWCommon/share/cep1_test.clusterdesc -text CEP/LMWCommon/share/cep2.clusterdesc -text CEP/LMWCommon/share/development.clusterdesc -text @@ -1046,11 +1050,11 @@ CEP/ParmDB/test/tsetupsourcedb.in_ms2.vds -text CEP/Pipeline/CMakeLists.txt eol=lf CEP/Pipeline/Doxyfile eol=lf CEP/Pipeline/InputFilter eol=lf -CEP/Pipeline/deploy/fabfile.py eol=lf -CEP/Pipeline/deploy/ipcontroller.sh eol=lf -CEP/Pipeline/deploy/ipengine.sh eol=lf -CEP/Pipeline/deploy/start_cluster.py eol=lf -CEP/Pipeline/deploy/stop_cluster.py eol=lf +CEP/Pipeline/deploy/deprecated/fabfile.py eol=lf +CEP/Pipeline/deploy/deprecated/ipcontroller.sh eol=lf +CEP/Pipeline/deploy/deprecated/ipengine.sh eol=lf +CEP/Pipeline/deploy/deprecated/start_cluster.py eol=lf +CEP/Pipeline/deploy/deprecated/stop_cluster.py eol=lf CEP/Pipeline/docs/examples/definition/dummy/pipeline.cfg eol=lf CEP/Pipeline/docs/examples/definition/dummy/pipeline.py eol=lf CEP/Pipeline/docs/examples/definition/dummy/tasks.cfg eol=lf @@ -1163,16 +1167,16 @@ CEP/Pipeline/framework/lofarpipe/cuisine/pipeline_manager_config.py eol=lf CEP/Pipeline/framework/lofarpipe/support/__init__.py eol=lf CEP/Pipeline/framework/lofarpipe/support/baserecipe.py eol=lf CEP/Pipeline/framework/lofarpipe/support/clusterdesc.py eol=lf -CEP/Pipeline/framework/lofarpipe/support/clusterhandler.py eol=lf -CEP/Pipeline/framework/lofarpipe/support/clusterlogger.py eol=lf CEP/Pipeline/framework/lofarpipe/support/control.py eol=lf +CEP/Pipeline/framework/lofarpipe/support/deprecated/clusterhandler.py eol=lf +CEP/Pipeline/framework/lofarpipe/support/deprecated/clusterlogger.py eol=lf +CEP/Pipeline/framework/lofarpipe/support/deprecated/ipython.py eol=lf +CEP/Pipeline/framework/lofarpipe/support/deprecated/lofarrecipe.py eol=lf CEP/Pipeline/framework/lofarpipe/support/group_data.py eol=lf -CEP/Pipeline/framework/lofarpipe/support/ipython.py eol=lf CEP/Pipeline/framework/lofarpipe/support/jobserver.py eol=lf CEP/Pipeline/framework/lofarpipe/support/lofarexceptions.py eol=lf CEP/Pipeline/framework/lofarpipe/support/lofaringredient.py eol=lf CEP/Pipeline/framework/lofarpipe/support/lofarnode.py eol=lf -CEP/Pipeline/framework/lofarpipe/support/lofarrecipe.py eol=lf CEP/Pipeline/framework/lofarpipe/support/mac.py eol=lf CEP/Pipeline/framework/lofarpipe/support/parset.py eol=lf CEP/Pipeline/framework/lofarpipe/support/pipelinelogging.py eol=lf @@ -1231,34 +1235,19 @@ CEP/Pipeline/recipes/sip/helpers/WritableParmDB.py -text CEP/Pipeline/recipes/sip/helpers/__init__.py eol=lf CEP/Pipeline/recipes/sip/helpers/metadata.py eol=lf CEP/Pipeline/recipes/sip/master/__init__.py eol=lf -CEP/Pipeline/recipes/sip/master/bbs.py eol=lf -CEP/Pipeline/recipes/sip/master/cep2_datamapper.py eol=lf -CEP/Pipeline/recipes/sip/master/cimager.py eol=lf -CEP/Pipeline/recipes/sip/master/compression_pipeline.py eol=lf CEP/Pipeline/recipes/sip/master/copier.py -text -CEP/Pipeline/recipes/sip/master/count_timesteps.py eol=lf -CEP/Pipeline/recipes/sip/master/datamapper.py eol=lf -CEP/Pipeline/recipes/sip/master/demixing.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/casapy.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/collector.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/colmaker.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/copier.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/dppp.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/dummy_echo_parallel.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/excluder.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/flagger.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/mwimager.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/pyraprunner.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/qcheck.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/qcheck/README eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/qcheck/__init__.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/qcheck/qcheck.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/sextractor.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/simple_se.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/trimmer.py eol=lf -CEP/Pipeline/recipes/sip/master/deprecated/vdsmaker.py eol=lf +CEP/Pipeline/recipes/sip/master/deprecated/bbs.py eol=lf +CEP/Pipeline/recipes/sip/master/deprecated/cep2_datamapper.py eol=lf +CEP/Pipeline/recipes/sip/master/deprecated/cimager.py eol=lf +CEP/Pipeline/recipes/sip/master/deprecated/compression_pipeline.py eol=lf +CEP/Pipeline/recipes/sip/master/deprecated/count_timesteps.py eol=lf +CEP/Pipeline/recipes/sip/master/deprecated/datamapper.py eol=lf +CEP/Pipeline/recipes/sip/master/deprecated/demixing.py eol=lf +CEP/Pipeline/recipes/sip/master/deprecated/flag_baseline.py eol=lf +CEP/Pipeline/recipes/sip/master/deprecated/make_flaggable.py eol=lf +CEP/Pipeline/recipes/sip/master/deprecated/skymodel.py eol=lf +CEP/Pipeline/recipes/sip/master/deprecated/storagemapper.py eol=lf CEP/Pipeline/recipes/sip/master/dppp.py eol=lf -CEP/Pipeline/recipes/sip/master/flag_baseline.py eol=lf CEP/Pipeline/recipes/sip/master/gainoutliercorrection.py -text CEP/Pipeline/recipes/sip/master/get_metadata.py eol=lf CEP/Pipeline/recipes/sip/master/imager_awimager.py eol=lf @@ -1267,38 +1256,27 @@ CEP/Pipeline/recipes/sip/master/imager_create_dbs.py eol=lf CEP/Pipeline/recipes/sip/master/imager_finalize.py -text CEP/Pipeline/recipes/sip/master/imager_prepare.py eol=lf CEP/Pipeline/recipes/sip/master/imager_source_finding.py eol=lf -CEP/Pipeline/recipes/sip/master/make_flaggable.py eol=lf CEP/Pipeline/recipes/sip/master/new_bbs.py eol=lf -CEP/Pipeline/recipes/sip/master/parset.test eol=lf CEP/Pipeline/recipes/sip/master/rficonsole.py eol=lf CEP/Pipeline/recipes/sip/master/setupparmdb.py eol=lf CEP/Pipeline/recipes/sip/master/setupsourcedb.py eol=lf -CEP/Pipeline/recipes/sip/master/skymodel.py eol=lf -CEP/Pipeline/recipes/sip/master/storagemapper.py eol=lf CEP/Pipeline/recipes/sip/master/vdsmaker.py eol=lf CEP/Pipeline/recipes/sip/master/vdsreader.py eol=lf CEP/Pipeline/recipes/sip/nodes/__init__.py eol=lf -CEP/Pipeline/recipes/sip/nodes/bbs.py eol=lf -CEP/Pipeline/recipes/sip/nodes/cimager.py eol=lf CEP/Pipeline/recipes/sip/nodes/copier.py -text -CEP/Pipeline/recipes/sip/nodes/count_timesteps.py eol=lf -CEP/Pipeline/recipes/sip/nodes/demix/demixing.py eol=lf CEP/Pipeline/recipes/sip/nodes/demix/find_a_team.py eol=lf -CEP/Pipeline/recipes/sip/nodes/demix/median_filter.py eol=lf -CEP/Pipeline/recipes/sip/nodes/demix/shiftphasecenter.py eol=lf -CEP/Pipeline/recipes/sip/nodes/demix/smoothdemix.py eol=lf -CEP/Pipeline/recipes/sip/nodes/demix/subtract_from_averaged.py eol=lf -CEP/Pipeline/recipes/sip/nodes/demixing.py eol=lf -CEP/Pipeline/recipes/sip/nodes/deprecated/casapy.py eol=lf -CEP/Pipeline/recipes/sip/nodes/deprecated/colmaker.py eol=lf -CEP/Pipeline/recipes/sip/nodes/deprecated/dummy_echo_parallel.py eol=lf -CEP/Pipeline/recipes/sip/nodes/deprecated/excluder.py eol=lf -CEP/Pipeline/recipes/sip/nodes/deprecated/flagger.py eol=lf -CEP/Pipeline/recipes/sip/nodes/deprecated/qcheck.py eol=lf -CEP/Pipeline/recipes/sip/nodes/deprecated/sextractor.py eol=lf -CEP/Pipeline/recipes/sip/nodes/deprecated/trimmer.py eol=lf +CEP/Pipeline/recipes/sip/nodes/deprecated/bbs.py eol=lf +CEP/Pipeline/recipes/sip/nodes/deprecated/cimager.py eol=lf +CEP/Pipeline/recipes/sip/nodes/deprecated/count_timesteps.py eol=lf +CEP/Pipeline/recipes/sip/nodes/deprecated/demix/demixing.py eol=lf +CEP/Pipeline/recipes/sip/nodes/deprecated/demix/median_filter.py eol=lf +CEP/Pipeline/recipes/sip/nodes/deprecated/demix/shiftphasecenter.py eol=lf +CEP/Pipeline/recipes/sip/nodes/deprecated/demix/smoothdemix.py eol=lf +CEP/Pipeline/recipes/sip/nodes/deprecated/demix/subtract_from_averaged.py eol=lf +CEP/Pipeline/recipes/sip/nodes/deprecated/demixing.py eol=lf +CEP/Pipeline/recipes/sip/nodes/deprecated/flag_baseline.py eol=lf +CEP/Pipeline/recipes/sip/nodes/deprecated/make_flaggable.py eol=lf CEP/Pipeline/recipes/sip/nodes/dppp.py eol=lf -CEP/Pipeline/recipes/sip/nodes/flag_baseline.py eol=lf CEP/Pipeline/recipes/sip/nodes/gainoutliercorrection.py -text CEP/Pipeline/recipes/sip/nodes/get_metadata.py eol=lf CEP/Pipeline/recipes/sip/nodes/imager_awimager.py eol=lf @@ -1307,7 +1285,6 @@ CEP/Pipeline/recipes/sip/nodes/imager_create_dbs.py eol=lf CEP/Pipeline/recipes/sip/nodes/imager_finalize.py -text CEP/Pipeline/recipes/sip/nodes/imager_prepare.py eol=lf CEP/Pipeline/recipes/sip/nodes/imager_source_finding.py eol=lf -CEP/Pipeline/recipes/sip/nodes/make_flaggable.py eol=lf CEP/Pipeline/recipes/sip/nodes/new_bbs.py eol=lf CEP/Pipeline/recipes/sip/nodes/rficonsole.py eol=lf CEP/Pipeline/recipes/sip/nodes/setupparmdb.py eol=lf @@ -1346,6 +1323,11 @@ CEP/Pipeline/test/recipes/nodes/imager_create_dbs_test.py eol=lf CEP/Pipeline/test/recipes/nodes/imager_prepare_test.py eol=lf CEP/Pipeline/test/regression_tests/calibrator_pipeline.py -text CEP/Pipeline/test/regression_tests/imaging_pipeline.py -text +CEP/Pipeline/test/regression_tests/jenkins_config/calibrator_regression.config.xml -text +CEP/Pipeline/test/regression_tests/jenkins_config/imaging_regression.config.xml -text +CEP/Pipeline/test/regression_tests/jenkins_config/pipeline_task_regression.config.xml -text +CEP/Pipeline/test/regression_tests/jenkins_config/target_regression.config.xml -text +CEP/Pipeline/test/regression_tests/target_pipeline.py -text CEP/Pipeline/test/support/__init__.py eol=lf CEP/Pipeline/test/support/pipelinexml_standalone.py -text CEP/Pipeline/test/support/pipelinexml_test.py -text @@ -1368,6 +1350,7 @@ CEP/Pipeline/test/test_framework/fixture/read.me eol=lf CEP/Pipeline/test/test_framework/unittest_runner.py eol=lf CEP/PyBDSM/doc/anaamika_overview.doc -text CEP/PyBDSM/doc/source/HydraA_74MHz_fit.png -text svneol=unset#image/png +CEP/PyBDSM/doc/source/_templates/searchbox.html -text CEP/PyBDSM/doc/source/algorithms.rst -text CEP/PyBDSM/doc/source/art_fit_alt.png -text svneol=unset#image/png CEP/PyBDSM/doc/source/art_fit_def.png -text svneol=unset#image/png @@ -2001,10 +1984,6 @@ CMake/variants/variants.lofar17 -text CMake/variants/variants.macdiepen -text CMake/variants/variants.mars -text CMake/variants/variants.sas099 -text -JAVA/CEP/jParmFacade/conf/Plotter-config-jparmfacade.jar -text -JAVA/CEP/jParmFacade/pom.xml -text -JAVA/GUI/MAC/jRSP/.cvsignore -text -JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/.cvsignore -text JAVA/GUI/Plotter/.cvsignore -text JAVA/GUI/Plotter/PlotterConfig/.cvsignore -text JAVA/GUI/Plotter/PlotterConfig/nbproject/.cvsignore -text @@ -2146,8 +2125,7 @@ JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/TimeValidator.java -te JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/TimeVectorValidator.java -text JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/Validators.java -text JAVA/LofarUtils/src/nl/astron/lofar/lofarutils/validation/WantsValidationStatus.java -text -JAVA/MAC/jRSP/.cvsignore -text -JAVA/MAC/jRSP/pom.xml -text +JAVA/pom.xml -text svneol=unset#application/xml LCS/AMC/AMCImpl/src/AMCServer.cc -text LCS/AMC/amc_main_classes.png -text LCS/AMC/amc_package.png -text @@ -2165,6 +2143,7 @@ LCS/ApplCommon/test/tObservation.in_conflict2 -text LCS/ApplCommon/test/tObservation.in_conflict3 -text LCS/ApplCommon/test/tObservation.in_conflict4 -text LCS/ApplCommon/test/tObservation.in_conflict5 -text +LCS/ApplCommon/test/tObservation.in_conflict6 -text LCS/ApplCommon/test/tObservation.in_newParset -text LCS/ApplCommon/test/tObservation.in_oldParset -text LCS/ApplCommon/test/tObservation.in_parset1 -text @@ -2173,6 +2152,7 @@ LCS/Blob/test/tBlobField.in_be -text svneol=unset#unset LCS/Blob/test/tBlobField.in_le -text svneol=unset#unset LCS/Blob/test/tBlobStream.in_be -text svneol=unset#unset LCS/Blob/test/tBlobStream.in_le -text svneol=unset#unset +LCS/Common/include/Common/LofarBitModeInfo.h -text LCS/Common/include/Common/NewHandler.h -text LCS/Common/include/Common/Thread/Cancellation.h -text LCS/Common/include/Common/Thread/Condition.h -text @@ -2181,6 +2161,7 @@ LCS/Common/src/Common-Model.cat -text LCS/Common/src/NewHandler.cc -text LCS/Common/src/Thread/Cancellation.cc -text LCS/Common/src/Thread/Thread.cc -text +LCS/Common/test/tBoostBitset.cc -text LCS/Common/test/tCancellation.cc -text LCS/Common/test/tCancellation.sh -text LCS/Common/test/tCondition.cc -text @@ -2202,6 +2183,10 @@ LCS/MSLofar/test/tBeamTables.in_af/CS001-AntennaField.conf -text LCS/MSLofar/test/tBeamTables.in_af/DE601-AntennaField.conf -text LCS/MSLofar/test/tBeamTables.in_af/RS106-AntennaField.conf -text LCS/MSLofar/test/tBeamTables.in_antset -text +LCS/MSLofar/test/tBeamTables.in_before_empty -text +LCS/MSLofar/test/tBeamTables.in_before_filled -text +LCS/MSLofar/test/tBeamTables.in_during_empty -text +LCS/MSLofar/test/tBeamTables.in_during_filled -text LCS/MSLofar/test/tBeamTables.in_hd/CS001-iHBADeltas.conf -text LCS/MSLofar/test/tBeamTables.in_hd/DE601-iHBADeltas.conf -text LCS/MSLofar/test/tBeamTables.in_hd/RS106-iHBADeltas.conf -text @@ -2313,6 +2298,7 @@ LCU/StationTest/tc/empty.py eol=lf LCU/StationTest/tc/hba_client.py eol=lf LCU/StationTest/tc/hba_line_level.py eol=lf LCU/StationTest/tc/hba_server.py eol=lf +LCU/StationTest/tc/no_dc.py -text LCU/StationTest/tc/prsg.py eol=lf LCU/StationTest/tc/rad_lanemode.py eol=lf LCU/StationTest/tc/rad_latency.py eol=lf @@ -2406,10 +2392,22 @@ MAC/APL/CASATools/include/CASATools/CasaConverter.h -text MAC/APL/CASATools/src/CasaConverter.cc -text MAC/APL/CASATools/test/tCasaConverter.cc -text MAC/APL/CASATools/test/tCasaConverter.log_prop -text +MAC/APL/CEPCU/src/CEPHardwareMonitor/BlueGeneMonitor.cc -text +MAC/APL/CEPCU/src/CEPHardwareMonitor/BlueGeneMonitor.h -text +MAC/APL/CEPCU/src/CEPHardwareMonitor/CEPHWMonitor.dpl -text +MAC/APL/CEPCU/src/CEPHardwareMonitor/CEPHardwareMonitor.conf -text +MAC/APL/CEPCU/src/CEPHardwareMonitor/CEPHardwareMonitorMain.cc -text +MAC/APL/CEPCU/src/CEPHardwareMonitor/CMakeLists.txt -text +MAC/APL/CEPCU/src/CEPHardwareMonitor/ClusterMonitor.cc -text +MAC/APL/CEPCU/src/CEPHardwareMonitor/ClusterMonitor.h -text +MAC/APL/CEPCU/src/CEPHardwareMonitor/PVSSDatapointDefs.h -text +MAC/APL/CEPCU/src/CEPHardwareMonitor/README -text +MAC/APL/CEPCU/src/CEPHardwareMonitor/zabbix_get -text MAC/APL/CEPCU/src/CEPlogProcessor/CEPDatapoints.dpl -text MAC/APL/CEPCU/src/CEPlogProcessor/CEPDatapointtypes.dpl -text MAC/APL/CEPCU/src/CEPlogProcessor/CircularBuffer.h -text MAC/APL/CEPCU/src/CEPlogProcessor/rtlogsender.py -text +MAC/APL/CEPCU/src/OnlineControl/tPVSSMapping.cc -text MAC/APL/CEPCU/src/PythonControl/PythonControl.conf -text MAC/APL/CEPCU/src/PythonControl/tMDparser.cc -text MAC/APL/CR_Protocol/CMakeLists.txt -text @@ -2510,17 +2508,27 @@ MAC/APL/PAC/SHMInfo_Server/test/mis.btsw -text svneol=native#application/octet-s MAC/APL/PAC/SHMInfo_Server/test/mis.io -text svneol=native#application/octet-stream MAC/APL/PAC/SHMInfo_Server/test/mis.pol -text svneol=native#application/octet-stream MAC/APL/PAC/SHMInfo_Server/test/test.sh -text svneol=native#application/octet-stream +MAC/APL/PIC/RSP_Driver/src/BMRead.cc -text +MAC/APL/PIC/RSP_Driver/src/BMRead.h -text +MAC/APL/PIC/RSP_Driver/src/BMWrite.cc -text +MAC/APL/PIC/RSP_Driver/src/BMWrite.h -text MAC/APL/PIC/RSP_Driver/src/CRSyncWrite.cc -text MAC/APL/PIC/RSP_Driver/src/CRSyncWrite.h -text +MAC/APL/PIC/RSP_Driver/src/GetBitModeCmd.cc -text +MAC/APL/PIC/RSP_Driver/src/GetBitModeCmd.h -text MAC/APL/PIC/RSP_Driver/src/GetDatastreamCmd.cc -text MAC/APL/PIC/RSP_Driver/src/GetDatastreamCmd.h -text MAC/APL/PIC/RSP_Driver/src/GetSwapxyCmd.cc -text MAC/APL/PIC/RSP_Driver/src/GetSwapxyCmd.h -text MAC/APL/PIC/RSP_Driver/src/RSPCommands.xls -text +MAC/APL/PIC/RSP_Driver/src/SetBitModeCmd.cc -text +MAC/APL/PIC/RSP_Driver/src/SetBitModeCmd.h -text MAC/APL/PIC/RSP_Driver/src/SetDatastreamCmd.cc -text MAC/APL/PIC/RSP_Driver/src/SetDatastreamCmd.h -text MAC/APL/PIC/RSP_Driver/src/SetSwapxyCmd.cc -text MAC/APL/PIC/RSP_Driver/src/SetSwapxyCmd.h -text +MAC/APL/PIC/RSP_Driver/src/UpdBitModeCmd.cc -text +MAC/APL/PIC/RSP_Driver/src/UpdBitModeCmd.h -text MAC/APL/PIC/RSP_Driver/test/tCableAttenuation.in_1 -text MAC/APL/PIC/RSP_Driver/test/tCableAttenuation.in_2 -text MAC/APL/PIC/RSP_Driver/test/tCableAttenuation.in_3 -text @@ -2534,6 +2542,8 @@ MAC/APL/PIC/RSP_Driver/test/tRCUCables.in_4 -text MAC/APL/PIC/RSP_Driver/test/tRCUCables.in_5 -text MAC/APL/PIC/RSP_Driver/test/tRCUCables.in_6 -text MAC/APL/PIC/RSP_Driver/test/tRCUCables.in_CableAtts -text +MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Bitmode.h -text +MAC/APL/PIC/RSP_Protocol/src/Bitmode.cc -text MAC/APL/PIC/RSP_Protocol/test/tRCUSettings.cc -text MAC/APL/PIC/RSP_Protocol/test/tRCUSettings.stdout -text MAC/APL/PIC/TBB_Driver/test/StubRawEvent.cc -text @@ -2695,6 +2705,7 @@ MAC/Deployment/data/Coordinates/vectors-and-matrices/DE604/de604-lba-solution.li MAC/Deployment/data/Coordinates/vectors-and-matrices/DE605/de605-hba-solution.lisp -text MAC/Deployment/data/Coordinates/vectors-and-matrices/DE605/de605-lba-solution.lisp -text MAC/Deployment/data/Coordinates/vectors-and-matrices/FI609/FI609-hba-solution.lisp -text +MAC/Deployment/data/Coordinates/vectors-and-matrices/FI609/FI609-lba-solution.lisp -text MAC/Deployment/data/Coordinates/vectors-and-matrices/FR606/fr606-hba-solution.lisp -text MAC/Deployment/data/Coordinates/vectors-and-matrices/FR606/fr606-lba-solution.lisp -text MAC/Deployment/data/Coordinates/vectors-and-matrices/RS106/rs106-core-solution-hba.lisp -text @@ -2738,6 +2749,7 @@ MAC/Deployment/data/OTDB/genArrayC++.py -text MAC/Deployment/data/OTDB/genArrayJava.py -text MAC/Deployment/data/OTDB/genArrayTable.py -text MAC/Deployment/data/OTDB/genArrayTest.py -text +MAC/Deployment/data/PVSS/License/471_3031_2_Astron_Gen_II_2_311.log -text MAC/Deployment/data/PVSS/License/CCU099_option.txt -text MAC/Deployment/data/PVSS/License/CS001C_option_lcu037.txt -text MAC/Deployment/data/PVSS/License/CS002_option.txt -text @@ -2783,6 +2795,7 @@ MAC/Deployment/data/PVSS/License/PVSStoolLicense.exe -text MAC/Deployment/data/PVSS/License/RS106C_option.txt -text MAC/Deployment/data/PVSS/License/RS205C_option.txt -text MAC/Deployment/data/PVSS/License/RS208C_option.txt -text +MAC/Deployment/data/PVSS/License/RS305C_option.txt -text MAC/Deployment/data/PVSS/License/RS306C_option.txt -text MAC/Deployment/data/PVSS/License/RS307C_option.lcu013.txt -text MAC/Deployment/data/PVSS/License/RS307C_option.lcu045.txt -text @@ -2832,6 +2845,7 @@ MAC/Deployment/data/PVSS/License/shield.MCU099.txt -text MAC/Deployment/data/PVSS/License/shield.RS106C.txt -text MAC/Deployment/data/PVSS/License/shield.RS205C.txt -text MAC/Deployment/data/PVSS/License/shield.RS208C.txt -text +MAC/Deployment/data/PVSS/License/shield.RS305C.txt -text MAC/Deployment/data/PVSS/License/shield.RS306C.txt -text MAC/Deployment/data/PVSS/License/shield.RS307C.txt -text MAC/Deployment/data/PVSS/License/shield.RS307C_lcu045.txt -text @@ -2841,13 +2855,11 @@ MAC/Deployment/data/PVSS/License/shield.RS508C.txt -text MAC/Deployment/data/PVSS/License/shield.RS509C.txt -text MAC/Deployment/data/PVSS/License/shield.SE607C.txt -text MAC/Deployment/data/PVSS/License/shield.UK608C.txt -text -MAC/Deployment/data/PVSS/License/shield_471_3031_1_Astron_Gen_I_2_311.txt -text -MAC/Deployment/data/PVSS/License/shield_471_3031_2_Astron_Gen_II_2_311.txt -text MAC/Deployment/data/PVSS/License/shield_developdongles.txt -text -MAC/Deployment/data/PVSS/License/test_shield.txt -text MAC/Deployment/data/PVSS/data/Adder.dpdef -text MAC/Deployment/data/PVSS/data/BGPAppl.dpdef -text MAC/Deployment/data/PVSS/data/BGPRack.dpdef -text +MAC/Deployment/data/PVSS/data/CEPHardwareMonitor.dpdef -text MAC/Deployment/data/PVSS/data/CEPObservation.dpdef -text MAC/Deployment/data/PVSS/data/CEPbase.dpdef -text MAC/Deployment/data/PVSS/data/HBAAntenna.dpdef -text @@ -2860,6 +2872,7 @@ MAC/Deployment/data/PVSS/data/Observation.dpdef -text MAC/Deployment/data/PVSS/data/ObservationControl.dpdef -text MAC/Deployment/data/PVSS/data/PVSSbase.dpdef -text MAC/Deployment/data/PVSS/data/RTDBPort.dpdef -text +MAC/Deployment/data/PVSS/data/SoftwareMonitor.dpdef -text MAC/Deployment/data/PVSS/data/StationControl.dpdef -text MAC/Deployment/data/PVSS/data/StationInfo.dpdef -text MAC/Deployment/data/PVSS/data/Stationbase.dpdef -text @@ -2899,12 +2912,12 @@ MAC/Deployment/data/StaticMetaData/AntennaFields/CS301-AntennaField.conf -text MAC/Deployment/data/StaticMetaData/AntennaFields/CS302-AntennaField.conf -text MAC/Deployment/data/StaticMetaData/AntennaFields/CS401-AntennaField.conf -text MAC/Deployment/data/StaticMetaData/AntennaFields/CS501-AntennaField.conf -text -MAC/Deployment/data/StaticMetaData/AntennaFields/DE601-AntennaField.conf -text MAC/Deployment/data/StaticMetaData/AntennaFields/DE604-AntennaField.conf -text MAC/Deployment/data/StaticMetaData/AntennaFields/FR606-AntennaField.conf -text MAC/Deployment/data/StaticMetaData/AntennaFields/RS106-AntennaField.conf -text MAC/Deployment/data/StaticMetaData/AntennaFields/RS205-AntennaField.conf -text MAC/Deployment/data/StaticMetaData/AntennaFields/RS208-AntennaField.conf -text +MAC/Deployment/data/StaticMetaData/AntennaFields/RS305-AntennaField.conf -text MAC/Deployment/data/StaticMetaData/AntennaFields/RS306-AntennaField.conf -text MAC/Deployment/data/StaticMetaData/AntennaFields/RS307-AntennaField.conf -text MAC/Deployment/data/StaticMetaData/AntennaFields/RS503-AntennaField.conf -text @@ -2962,13 +2975,14 @@ MAC/Deployment/data/StaticMetaData/iHBADeltas/CS103-iHBADeltas.conf -text MAC/Deployment/data/StaticMetaData/iHBADeltas/CS301-iHBADeltas.conf -text MAC/Deployment/data/StaticMetaData/iHBADeltas/CS302-iHBADeltas.conf -text MAC/Deployment/data/StaticMetaData/iHBADeltas/CS401-iHBADeltas.conf -text -MAC/Deployment/data/StaticMetaData/iHBADeltas/DE601-iHBADeltas.conf -text MAC/Deployment/data/StaticMetaData/iHBADeltas/DE603-iHBADeltas.conf -text MAC/Deployment/data/StaticMetaData/iHBADeltas/DE604-iHBADeltas.conf -text +MAC/Deployment/data/StaticMetaData/iHBADeltas/FI609-iHBADeltas.conf -text MAC/Deployment/data/StaticMetaData/iHBADeltas/FR606-iHBADeltas.conf -text MAC/Deployment/data/StaticMetaData/iHBADeltas/RS106-iHBADeltas.conf -text MAC/Deployment/data/StaticMetaData/iHBADeltas/RS205-iHBADeltas.conf -text MAC/Deployment/data/StaticMetaData/iHBADeltas/RS208-iHBADeltas.conf -text +MAC/Deployment/data/StaticMetaData/iHBADeltas/RS305-iHBADeltas.conf -text MAC/Deployment/data/StaticMetaData/iHBADeltas/RS306-iHBADeltas.conf -text MAC/Deployment/data/StaticMetaData/iHBADeltas/RS307-iHBADeltas.conf -text MAC/Deployment/data/StaticMetaData/iHBADeltas/RS503-iHBADeltas.conf -text @@ -3020,6 +3034,7 @@ MAC/GCF/_PALlight/PMLlight/src/gcf-pmllight.conf.in -text svneol=native#applicat MAC/GCF/_PALlight/PMLlight/src/genTypeInfo -text svneol=native#application/octet-stream MAC/MACIO/include/MACIO/DoubleVector.h -text MAC/MACIO/include/MACIO/KVTLogger.h -text +MAC/MACIO/include/MACIO/Marshalling.tcc -text MAC/MACIO/src/KVTLogger.cc -text MAC/MACIO/src/KVT_Protocol.prot -text MAC/MACIO/src/LOG_Protocol.prot -text @@ -3028,6 +3043,7 @@ MAC/MACIO/test/Clone_Protocol.prot -text MAC/MACIO/test/Echo_Protocol.prot -text MAC/MACIO/test/tClone.stdout -text MAC/MACIO/test/tKVTLogger.cc -text +MAC/MACIO/test/tMarshalling.h -text MAC/Navigator2/Lofar[!!-~]stations.kml -text MAC/Navigator2/Lofar2002.vsd -text MAC/Navigator2/colorDB/Lofar[!!-~]colors -text @@ -3059,6 +3075,7 @@ MAC/Navigator2/panels/FRENKM/TEST.pnl -text MAC/Navigator2/panels/FRENKMnavigator.pnl -text MAC/Navigator2/panels/Hardware/CEP.pnl -text MAC/Navigator2/panels/Hardware/CEP_BGPRack_detailed.pnl -text +MAC/Navigator2/panels/Hardware/CEP_IONode.pnl -text MAC/Navigator2/panels/Hardware/CEP_Midplane.pnl -text MAC/Navigator2/panels/Hardware/CEP_OSRack_detailed.pnl -text MAC/Navigator2/panels/Hardware/HBAAntenna.pnl -text @@ -3077,11 +3094,13 @@ MAC/Navigator2/panels/Observations/Observation_overview.pnl -text MAC/Navigator2/panels/Observations/Observations.pnl -text MAC/Navigator2/panels/Processes/AMCServer.pnl -text MAC/Navigator2/panels/Processes/BGPAppl.pnl -text -MAC/Navigator2/panels/Processes/BGPProc_mainloader.pnl -text +MAC/Navigator2/panels/Processes/BGPProc.pnl -text MAC/Navigator2/panels/Processes/BeamControl.pnl -text MAC/Navigator2/panels/Processes/BeamServer.pnl -text MAC/Navigator2/panels/Processes/CEPHardwareMonitor.pnl -text +MAC/Navigator2/panels/Processes/CEP_IONodeProcesses.pnl -text MAC/Navigator2/panels/Processes/CEP_Processes.pnl -text +MAC/Navigator2/panels/Processes/CEPlogProcessor.pnl -text MAC/Navigator2/panels/Processes/CTStartDaemon.pnl -text MAC/Navigator2/panels/Processes/CalServer.pnl -text MAC/Navigator2/panels/Processes/CalibrationControl.pnl -text @@ -3093,6 +3112,7 @@ MAC/Navigator2/panels/Processes/LogProcessor.pnl -text MAC/Navigator2/panels/Processes/MACScheduler.pnl -text MAC/Navigator2/panels/Processes/MainCU_Processes.pnl -text MAC/Navigator2/panels/Processes/ObservationControl.pnl -text +MAC/Navigator2/panels/Processes/PythonControl.pnl -text MAC/Navigator2/panels/Processes/RSPDriver.pnl -text MAC/Navigator2/panels/Processes/SASGateway.pnl -text MAC/Navigator2/panels/Processes/SHMInfoServer.pnl -text @@ -3177,7 +3197,6 @@ MAC/Navigator2/panels/objects/Hardware/lofar_HW_state.pnl -text MAC/Navigator2/panels/objects/Hardware/midplane_small.pnl -text MAC/Navigator2/panels/objects/Observations/Observation_small.pnl -text MAC/Navigator2/panels/objects/Observations/lofar_Obs_state.pnl -text -MAC/Navigator2/panels/objects/Processes/BGPProc.pnl -text MAC/Navigator2/panels/objects/Processes/ObsSW_CEP.pnl -text MAC/Navigator2/panels/objects/Processes/ObsSW_Main.pnl -text MAC/Navigator2/panels/objects/Processes/ObsSW_Station.pnl -text @@ -3554,6 +3573,21 @@ RTCP/IONProc/src/StreamMultiplexer.h -text RTCP/IONProc/src/generateDelays.cc -text RTCP/IONProc/test/CMakeLists.txt -text RTCP/IONProc/test/RTCP.parset -text +RTCP/IONProc/test/newInputSection/CMakeLists.txt -text +RTCP/IONProc/test/newInputSection/OMPThread.h -text +RTCP/IONProc/test/newInputSection/Poll.h -text +RTCP/IONProc/test/newInputSection/Ranges.h -text +RTCP/IONProc/test/newInputSection/SampleBuffer.h -text +RTCP/IONProc/test/newInputSection/SharedMemory.h -text +RTCP/IONProc/test/newInputSection/StationData.h -text +RTCP/IONProc/test/newInputSection/StationID.h -text +RTCP/IONProc/test/newInputSection/StationSettings.h -text +RTCP/IONProc/test/newInputSection/TimeSync.h -text +RTCP/IONProc/test/newInputSection/foo.cc -text +RTCP/IONProc/test/newInputSection/newInputSection.cc -text +RTCP/IONProc/test/newInputSection/newInputSection_old.cc -text +RTCP/IONProc/test/newInputSection/shmtest.cc -text +RTCP/IONProc/test/newInputSection/tRSPTimeStamp.cc -text RTCP/IONProc/test/tDelayCompensation.cc -text RTCP/IONProc/test/tDelayCompensation.parset -text RTCP/IONProc/test/tDelayCompensation.sh -text @@ -3775,6 +3809,9 @@ SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/icons/navigation/Down16.gi SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/icons/navigation/Up16.gif -text SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/userpanels/ImagerPanel.form -text SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/userpanels/TBBConfigPanel.form -text +SAS/OTB/RSP/.cvsignore -text +SAS/OTB/RSP/pom.xml -text svneol=unset#application/xml +SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/.cvsignore -text SAS/OTB/jOTDB3/CMakeLists.txt -text SAS/OTB/jOTDB3/assembly.xml -text SAS/OTB/jOTDB3/build.xml -text @@ -3848,6 +3885,14 @@ SAS/OTB/jOTDB3/test/tTreeMaintenance.in -text SAS/OTB/jOTDB3/test/tTreeMaintenance.java -text SAS/OTB/jOTDB3/test/tTreeMaintenance.log_prop -text SAS/OTB/jOTDB3/test/testStates.java -text +SAS/OTB/jParmFacade/conf/Plotter-config-jparmfacade.jar -text +SAS/OTB/jParmFacade/include/jParmFacade/nl_astron_lofar_sas_otb_jparmfacade_jParmFacade.h -text +SAS/OTB/jParmFacade/pom.xml -text +SAS/OTB/jParmFacade/src/nl_astron_lofar_otb_jparmfacade_jParmFacade.cc -text +SAS/OTB/jRSP/.cvsignore -text +SAS/OTB/jRSP/include/jRSP/nl_astron_lofar_sas_otb_jrsp_Board.h -text +SAS/OTB/jRSP/pom.xml -text +SAS/OTB/pom.xml -text svneol=unset#application/xml SAS/OTB/scripts/CMakeLists.txt -text SAS/OTB/scripts/src/CMakeLists.txt -text SAS/OTB/scripts/src/checkOTDBServer -text @@ -3855,6 +3900,7 @@ SAS/OTB/scripts/src/startOTB -text SAS/OTB/scripts/src/startOTBServer -text SAS/OTB/scripts/src/startOTBTest -text SAS/OTB/scripts/src/stopOTBServer -text +SAS/OTDB/SPRINT_1.8 -text SAS/OTDB/bin/copyTree.py -text SAS/OTDB/bin/revertDefaultTemplates.py -text SAS/OTDB/include/OTDB/DefaultTemplate.h -text @@ -3874,6 +3920,7 @@ SAS/OTDB/sql/getVTitem_func.sql -text SAS/OTDB/sql/saveSchedulerInfo_func.sql -text SAS/OTDB/sql/upgradeOTDB.sql -text SAS/OTDB/src/DefaultTemplate.cc -text +SAS/OTDB/test/tBrokenHardware.cc -text SAS/OTDB/test/tQueryPIC.cc -text SDP/SPP/DSP[!!-~]BUILDER/myfilterbank.mdl -text SDP/SPP/MATLAB/gui2/gui_qt.fig -text svneol=unset#unset diff --git a/.gitignore b/.gitignore index 0c4db2f3c86..eb2ea92ad29 100644 --- a/.gitignore +++ b/.gitignore @@ -26,18 +26,6 @@ CEP/pyparmdb/Makefile.common CEP/pyparmdb/autoconf_share CEP/pyparmdb/lofarconf CEP/pyparmdb/py-compile -JAVA/CEP/jParmFacade/Makefile.common -JAVA/CEP/jParmFacade/autoconf_share -JAVA/CEP/jParmFacade/build -JAVA/CEP/jParmFacade/dist -JAVA/CEP/jParmFacade/lofarconf -JAVA/CEP/jParmFacade/nbproject -JAVA/CEP/jParmFacade/target -JAVA/GUI/MAC/jRSP/build -JAVA/GUI/MAC/jRSP/dist -JAVA/GUI/MAC/jRSP/nbproject -JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsListPanel.form -JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsListPanel.java JAVA/GUI/Plotter/PlotterConfig/build JAVA/GUI/Plotter/PlotterConfig/dist JAVA/GUI/Plotter/PlotterConfig/nbproject/private @@ -51,11 +39,6 @@ JAVA/LofarUtils/build JAVA/LofarUtils/dist JAVA/LofarUtils/nbproject JAVA/LofarUtils/target -JAVA/MAC/jRSP/Makefile.am -JAVA/MAC/jRSP/autoconf_share -JAVA/MAC/jRSP/bootstrap -JAVA/MAC/jRSP/configure.in -JAVA/MAC/jRSP/nbproject LCS/ACC/ALC/Makefile.common LCS/ACC/ALC/autoconf_share LCS/ACC/ALC/lofarconf @@ -261,9 +244,28 @@ SAS/OTB/OTB/build SAS/OTB/OTB/dist SAS/OTB/OTB/nbproject SAS/OTB/OTB/target +SAS/OTB/RSP/build +SAS/OTB/RSP/dist +SAS/OTB/RSP/nbproject +SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformSettingsListPanel.form +SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformSettingsListPanel.java +SAS/OTB/RSP/target SAS/OTB/jOTDB3/build SAS/OTB/jOTDB3/dist SAS/OTB/jOTDB3/target +SAS/OTB/jParmFacade/Makefile.common +SAS/OTB/jParmFacade/autoconf_share +SAS/OTB/jParmFacade/build +SAS/OTB/jParmFacade/dist +SAS/OTB/jParmFacade/lofarconf +SAS/OTB/jParmFacade/nbproject +SAS/OTB/jParmFacade/target +SAS/OTB/jRSP/Makefile.am +SAS/OTB/jRSP/autoconf_share +SAS/OTB/jRSP/bootstrap +SAS/OTB/jRSP/configure.in +SAS/OTB/jRSP/nbproject +SAS/OTB/jRSP/target SAS/OTB/nbproject SAS/OTB/scripts/Makefile.common SAS/OTB/scripts/autoconf_share diff --git a/CEP/Calibration/BBSControl/scripts/plotwindow.py b/CEP/Calibration/BBSControl/scripts/plotwindow.py index 8749503af9a..e9185c946cf 100755 --- a/CEP/Calibration/BBSControl/scripts/plotwindow.py +++ b/CEP/Calibration/BBSControl/scripts/plotwindow.py @@ -228,13 +228,13 @@ class PlotWindow(QFrame): self.show() # show the plotWindow widget self.parent.setXLabel() self.parent.setYLabel() - + # Matplotlib event connections #if self.showMarker==True: # cid = self.fig.canvas.mpl_connect('motion_notify_event', self.update_marker) # cid = self.fig.canvas.mpl_connect('button_press_event', onclick) - cid = self.fig.canvas.mpl_connect('motion_notify_event', self.on_solverMessage) + cid = self.fig.canvas.mpl_connect('motion_notify_event', self.on_solverMessage) # TODO: this doesn work self.cursorId = self.fig.canvas.mpl_connect('button_press_event', self.on_click) self.plot() @@ -400,10 +400,14 @@ class PlotWindow(QFrame): #self.solverMessageText.setText(self.messages[resultType][index]) self.solverMessageText.setReadOnly(False) # make it writable + + #print "resultType =", resultType # DEBUG if resultType=="last": - self.solverMessageText.setText(self.messages[resultType][index]) + #self.solverMessageText.setText(self.messages[resultType][index]) + self.solverMessageText.setText(self.messages[index]) elif resultType=="all": - self.solverMessageText.setText(self.messages[resultType][index]) + #self.solverMessageText.setText(self.messages[resultType][index]) + self.solverMessageText.setText(self.messages[index]) elif resultType==None: print "on_solverMessage() None messages" return diff --git a/CEP/Calibration/BBSControl/scripts/solverdialog.py b/CEP/Calibration/BBSControl/scripts/solverdialog.py index 1a9396b556d..6e69bb61a19 100755 --- a/CEP/Calibration/BBSControl/scripts/solverdialog.py +++ b/CEP/Calibration/BBSControl/scripts/solverdialog.py @@ -5,7 +5,7 @@ # File: solverdialog.py # Author: Sven Duscha (duscha@astron.nl) # Date: 2010-08-05 -# Last change; 2011-12-11 +# Last change; 2012-09-27 # # @@ -13,6 +13,8 @@ import sys, os, random import lofar.bbs.solverquery as sq import lofar.bbs.plotwindow +#import solverquery as sq # DEBUG!!! +#import plotwindow # DEBUG!!! import lofar.parmdb as parmdb @@ -870,7 +872,8 @@ class SolverAppForm(QMainWindow): self.getMessages() # get dictionary with solver messages # TODO: get current PlotWindow - self.plots.append(lofar.bbs.plotwindow.PlotWindow(self)) # call PlotWindow class with this class as parent + self.plots.append(lofar.bbs.plotwindow.PlotWindow(self)) # call PlotWindow class with this class as parent + #self.plots.append(plotwindow.PlotWindow(self)) # DEBUG print "on_plot() finished drawing" @@ -1127,7 +1130,6 @@ class SolverAppForm(QMainWindow): # This solverQuery functions fetches the parameter along with the corresponding time stamps y, x=self.solverQuery.readParameter(parameter, start_time, end_time, start_freq, end_freq) - return x, y["last"] # If we plot a single solution per iteration @@ -1152,9 +1154,6 @@ class SolverAppForm(QMainWindow): print "getSolutions() start_time = ", start_time, " end_time = ", end_time # DEBUG y, x=self.solverQuery.getSolution(start_time, end_time, start_freq, end_freq) - - # This then calls Joris' plot function - #self.plot(self.fig, y["last"], x, sub=parsub, scatter=scatter, clf=self.clf) return y, x elif parameter == "CORRMATRIX": @@ -1171,7 +1170,9 @@ class SolverAppForm(QMainWindow): #y=self.solverQuery.readParameter(parameter, start_time, end_time, start_freq, end_freq) #x=self.solverQuery.getMidTimes(start_time, end_time) - #self.plot(self.fig, y['last'], x, sub=111, scatter=scatter, clf=self.clf) # OLD + print "x=",x # DEBUG + print "y=",y # DEBUG + return x, y['last'] else: diff --git a/CEP/Calibration/BBSControl/scripts/solverquery.py b/CEP/Calibration/BBSControl/scripts/solverquery.py index 9405499dba5..188eb7dcba9 100644 --- a/CEP/Calibration/BBSControl/scripts/solverquery.py +++ b/CEP/Calibration/BBSControl/scripts/solverquery.py @@ -140,7 +140,7 @@ class SolverQuery: if iteration is "last": #print "readParameter(): last" # DEBUG # Fetch requested parameter for time and freq where LASTITER=TRUE - taqlcmd = "SELECT * FROM " + self.tablename + " WHERE STARTTIME >= "+ str(start_time) + " AND ENDTIME <= " + str(end_time) + " AND STARTFREQ >= "+ str(start_freq) + " AND ENDFREQ <= " + str(end_freq) + " AND LASTITER=TRUE" + taqlcmd = "SELECT * FROM " + self.tablename + " WHERE STARTTIME >= "+ str(start_time) + " AND ENDTIME <= " + str(end_time) + " AND STARTFREQ >= "+ str(start_freq) + " AND ENDFREQ <= " + str(end_freq) + " AND LASTITER=TRUE ORDER BY STARTTIME" result=pt.taql(taqlcmd) parameter=result.getcol(parameter_name) @@ -151,6 +151,9 @@ class SolverQuery: else: starttimes = result.getcol('STARTTIME') + #print "sq::starttimes =", starttimes # DEBUG + #print "sq::starttimes.sort() =", starttimes.sort() # DEBUG + #print "readParameter(): len(parameter): ", len(parameter) # DEBUG #print "readParameter() result.nrows() = ", result.nrows() @@ -168,7 +171,7 @@ class SolverQuery: parameter=result.getcol(parameter_name) if self.convertTime == True: - taqlcmd= "SELECT STARTTIME FROM " + self.tablename + " WHERE STARTTIME >= "+ str(start_time) + " AND ENDTIME <= " + str(end_time) + " AND STARTFREQ >= "+ str(start_freq) + " AND ENDFREQ <= " + str(end_freq) + " AND LASTITER=TRUE" + taqlcmd= "SELECT STARTTIME FROM " + self.tablename + " WHERE STARTTIME >= "+ str(start_time) + " AND ENDTIME <= " + str(end_time) + " AND STARTFREQ >= "+ str(start_freq) + " AND ENDFREQ <= " + str(end_freq) + " AND LASTITER=TRUE ORDER BY STARTTIME" resultTime=pt.taql(taqlcmd) starttimes = resultTime.getcol('STARTTIME') else: @@ -190,7 +193,7 @@ class SolverQuery: if self.convertTime == False: starttimes = result.getcol('STARTTIME') else: - taqlcmd="SELECT CTOD(STARTTIME s) FROM " + self.tablename + taqlcmd="SELECT CTOD(STARTTIME s) FROM " + self.tablename + " ORDER BY STARTTIME" resultTime=pt.taql(timecmd) starttimes = resultTime.getcol('STARTTIME') @@ -985,7 +988,7 @@ class SolverQuery: # Measurementset # def getStartTimes(self): - taqlcmd="SELECT UNIQUE STARTTIME FROM " + self.tablename + taqlcmd="SELECT UNIQUE STARTTIME FROM " + self.tablename + " ORDER BY STARTTIME" self.startTimes=pt.taql(taqlcmd) @@ -1073,7 +1076,7 @@ class SolverQuery: # Measurementset # def setStartFreqs(self): - taqlcmd="SELECT UNIQUE STARTFREQ FROM " + self.tablename + taqlcmd="SELECT UNIQUE STARTFREQ FROM " + self.tablename + " ORDER BY STARTTIME" self.startFreqs=pt.taql(taqlcmd) diff --git a/CEP/Calibration/BBSControl/src/bbs-reducer.cc b/CEP/Calibration/BBSControl/src/bbs-reducer.cc index 4a621d6e120..c5c1d5dc730 100644 --- a/CEP/Calibration/BBSControl/src/bbs-reducer.cc +++ b/CEP/Calibration/BBSControl/src/bbs-reducer.cc @@ -235,7 +235,13 @@ int run(const ParameterSet &options, const OptionParser::ArgumentList &args) // Fake intialization. InitializeCommand initCmd(strategy); - initCmd.accept(handler); + CommandResult initResult = initCmd.accept(handler); + if(!initResult) + { + LOG_ERROR_STR("Error executing " << initCmd.type() << " command: " + << initResult.message()); + return 1; + } // Fake session control. StrategyIterator it; @@ -243,9 +249,19 @@ int run(const ParameterSet &options, const OptionParser::ArgumentList &args) { if(!it.atEnd()) { + // Execute the current command. LOG_DEBUG_STR("Executing a " << (*it)->type() << " command:" << endl << **it); - (*it)->accept(handler); + CommandResult result = (*it)->accept(handler); + + if(!result) + { + LOG_ERROR_STR("Error executing " << (*it)->type() << " command: " + << result.message()); + return 1; + } + + // Move to the next command in the strategy. ++it; } else @@ -255,7 +271,17 @@ int run(const ParameterSet &options, const OptionParser::ArgumentList &args) { // Fake finalization. FinalizeCommand finCmd; - finCmd.accept(handler); + + LOG_DEBUG_STR("Executing a " << finCmd.type() << " command:" << endl + << finCmd); + CommandResult result = finCmd.accept(handler); + + if(!result) + { + LOG_ERROR_STR("Error executing " << finCmd.type() << " command: " + << result.message()); + return 1; + } } else { @@ -270,9 +296,17 @@ int run(const ParameterSet &options, const OptionParser::ArgumentList &args) // Fake next chunk. NextChunkCommand nextCmd(msFreqRange.first, msFreqRange.second, start, end); + LOG_DEBUG_STR("Executing a " << nextCmd.type() << " command:" << endl << nextCmd); - nextCmd.accept(handler); + CommandResult result = nextCmd.accept(handler); + + if(!result) + { + LOG_ERROR_STR("Error executing " << nextCmd.type() << " command: " + << result.message()); + return 1; + } // Re-initialize strategy iterator. it = StrategyIterator(strategy); @@ -368,7 +402,7 @@ int runDistributed(const ParameterSet &options, session.postResult(command.first, result); // If an error occurred, log a descriptive message and exit. - if(result.is(CommandResult::ERROR)) + if(!result) { LOG_ERROR_STR("Error executing " << command.second->type() << " command: " << result.message()); diff --git a/CEP/Calibration/BBSControl/src/bbs-shared-estimator.cc b/CEP/Calibration/BBSControl/src/bbs-shared-estimator.cc index e26c8834d68..37fd65d7363 100644 --- a/CEP/Calibration/BBSControl/src/bbs-shared-estimator.cc +++ b/CEP/Calibration/BBSControl/src/bbs-shared-estimator.cc @@ -188,7 +188,7 @@ int run(const ParameterSet &options, const OptionParser::ArgumentList&) session.postResult(command.first, result); // If an error occurred, log a descriptive message and exit. - if(result.is(CommandResult::ERROR)) + if(!result) { LOG_ERROR_STR("Error executing " << command.second->type() << " command: " << result.message()); diff --git a/CEP/DP3/AOFlagger/CMakeLists.txt b/CEP/DP3/AOFlagger/CMakeLists.txt index 23510fec8c0..7a1ea970a3e 100644 --- a/CEP/DP3/AOFlagger/CMakeLists.txt +++ b/CEP/DP3/AOFlagger/CMakeLists.txt @@ -3,7 +3,7 @@ lofar_package(AOFlagger 1.0 DEPENDS LofarStMan Common LMWCommon) find_package(PkgConfig) -pkg_check_modules(GTKMM gtkmm-2.4) +pkg_check_modules(GTKMM gtkmm-2.4>=2.18) pkg_check_modules(SIGCXX sigc++-2.0) include(LofarFindPackage) diff --git a/CEP/DP3/AOFlagger/include/AOFlagger/gui/plot/plotpropertieswindow.h b/CEP/DP3/AOFlagger/include/AOFlagger/gui/plot/plotpropertieswindow.h index c37e9384de1..75e5a089017 100644 --- a/CEP/DP3/AOFlagger/include/AOFlagger/gui/plot/plotpropertieswindow.h +++ b/CEP/DP3/AOFlagger/include/AOFlagger/gui/plot/plotpropertieswindow.h @@ -27,6 +27,7 @@ #include <gtkmm/buttonbox.h> #include <gtkmm/checkbutton.h> #include <gtkmm/entry.h> +#include <gtkmm/image.h> #include <gtkmm/label.h> #include <gtkmm/frame.h> #include <gtkmm/radiobutton.h> diff --git a/CEP/DP3/AOFlagger/src/aoquality.cpp b/CEP/DP3/AOFlagger/src/aoquality.cpp index f469c272841..2e851b4b6e5 100644 --- a/CEP/DP3/AOFlagger/src/aoquality.cpp +++ b/CEP/DP3/AOFlagger/src/aoquality.cpp @@ -60,7 +60,7 @@ enum CollectingMode CollectHistograms }; -void actionCollect(const std::string &filename, enum CollectingMode mode, StatisticsCollection &statisticsCollection, HistogramCollection &histogramCollection) +void actionCollect(const std::string &filename, enum CollectingMode mode, StatisticsCollection &statisticsCollection, HistogramCollection &histogramCollection, bool mwaChannels, size_t flaggedTimesteps, const std::set<size_t> &flaggedAntennae) { MeasurementSet *ms = new MeasurementSet(filename); const unsigned polarizationCount = ms->GetPolarizationCount(); @@ -85,8 +85,7 @@ void actionCollect(const std::string &filename, enum CollectingMode mode, Statis std::cout << "Polarizations: " << polarizationCount << '\n' << "Bands: " << bandCount << '\n' - << "Channels/band: " << (totalChannels / bandCount) << '\n' - << "Name of observatory: " << stationName << '\n'; + << "Channels/band: " << (totalChannels / bandCount) << '\n'; if(ignoreChannelZero) std::cout << "Channel zero will be ignored, as this looks like a LOFAR data set with bad channel 0.\n"; else @@ -119,7 +118,32 @@ void actionCollect(const std::string &filename, enum CollectingMode mode, Statis std::cout << "Collecting statistics..." << std::endl; + size_t channelCount = bands[0].channels.size(); + bool correlatorFlags[channelCount], correlatorFlagsForBadAntenna[channelCount]; + for(size_t ch=0; ch!=channelCount; ++ch) + { + correlatorFlags[ch] = false; + correlatorFlagsForBadAntenna[ch] = true; + } + + if(mwaChannels) + { + if(channelCount%24 != 0) + std::cout << "MWA channels requested, but nr of channels not a multiply of 24. Ignoring.\n"; + else { + size_t chanPerSb = channelCount/24; + for(size_t x=0;x!=24;++x) + { + correlatorFlags[x*chanPerSb] = true; + correlatorFlags[x*chanPerSb + chanPerSb/2] = true; + correlatorFlags[x*chanPerSb + chanPerSb-1] = true; + } + } + } + const unsigned nrow = table.nrow(); + size_t timestepIndex = (size_t) -1; + double prevtime = -1.0; for(unsigned row = 0; row!=nrow; ++row) { const double time = timeColumn(row); @@ -127,6 +151,12 @@ void actionCollect(const std::string &filename, enum CollectingMode mode, Statis const unsigned antenna2Index = antenna2Column(row); const unsigned bandIndex = windowColumn(row); + if(time != prevtime) + { + ++timestepIndex; + prevtime = time; + } + const BandInfo &band = bands[bandIndex]; const casa::Array<casa::Complex> dataArray = dataColumn(row); @@ -139,6 +169,9 @@ void actionCollect(const std::string &filename, enum CollectingMode mode, Statis isRFI[p] = new bool[band.channels.size()]; samples[p] = new std::complex<float>[band.channels.size()]; } + const bool antennaIsFlagged = + flaggedAntennae.find(antenna1Index) != flaggedAntennae.end() || + flaggedAntennae.find(antenna2Index) != flaggedAntennae.end(); casa::Array<casa::Complex>::const_iterator dataIter = dataArray.begin(); casa::Array<bool>::const_iterator flagIter = flagArray.begin(); @@ -168,10 +201,10 @@ void actionCollect(const std::string &filename, enum CollectingMode mode, Statis switch(mode) { case CollectDefault: - { - const bool origFlags = false; - statisticsCollection.Add(antenna1Index, antenna2Index, time, bandIndex, p, &samples[p]->real(), &samples[p]->imag(), isRFI[p], &origFlags, band.channels.size() - startChannel, 2, 1, 0); - } + if(antennaIsFlagged || timestepIndex < flaggedTimesteps) + statisticsCollection.Add(antenna1Index, antenna2Index, time, bandIndex, p, &samples[p]->real(), &samples[p]->imag(), isRFI[p], correlatorFlagsForBadAntenna, band.channels.size() - startChannel, 2, 1, 1); + else + statisticsCollection.Add(antenna1Index, antenna2Index, time, bandIndex, p, &samples[p]->real(), &samples[p]->imag(), isRFI[p], correlatorFlags, band.channels.size() - startChannel, 2, 1, 1); break; case CollectHistograms: histogramCollection.Add(antenna1Index, antenna2Index, p, samples[p], isRFI[p], band.channels.size() - startChannel); @@ -195,12 +228,12 @@ void actionCollect(const std::string &filename, enum CollectingMode mode, Statis std::cout << "100\n"; } -void actionCollect(const std::string &filename, enum CollectingMode mode) +void actionCollect(const std::string &filename, enum CollectingMode mode, bool mwaChannels, size_t flaggedTimesteps, const std::set<size_t> &flaggedAntennae) { StatisticsCollection statisticsCollection; HistogramCollection histogramCollection; - actionCollect(filename, mode, statisticsCollection, histogramCollection); + actionCollect(filename, mode, statisticsCollection, histogramCollection, mwaChannels, flaggedTimesteps, flaggedAntennae); switch(mode) { @@ -225,10 +258,10 @@ void actionCollect(const std::string &filename, enum CollectingMode mode) std::cout << "Done.\n"; } -void actionCollectHistogram(const std::string &filename, HistogramCollection &histogramCollection) +void actionCollectHistogram(const std::string &filename, HistogramCollection &histogramCollection, bool mwaChannels, size_t flaggedTimesteps, const std::set<size_t> &flaggedAntennae) { StatisticsCollection tempCollection; - actionCollect(filename, CollectHistograms, tempCollection, histogramCollection); + actionCollect(filename, CollectHistograms, tempCollection, histogramCollection, mwaChannels, flaggedTimesteps, flaggedAntennae); } void printStatistics(std::complex<long double> *complexStat, unsigned count) @@ -495,7 +528,7 @@ void printRFISlopeForHistogram(const std::map<HistogramCollection::AntennaPair, } } -void actionHistogram(const std::string &filename, const std::string &query) +void actionHistogram(const std::string &filename, const std::string &query, bool mwaChannels) { HistogramTablesFormatter histogramFormatter(filename); const unsigned polarizationCount = MeasurementSet::GetPolarizationCount(filename); @@ -515,7 +548,7 @@ void actionHistogram(const std::string &filename, const std::string &query) } else if(query == "rfislope-per-baseline") { HistogramCollection collection; - actionCollectHistogram(filename, collection); + actionCollectHistogram(filename, collection, mwaChannels, 0, std::set<size_t>()); MeasurementSet set(filename); size_t antennaCount = set.AntennaCount(); AntennaInfo antennae[antennaCount]; @@ -642,16 +675,30 @@ int main(int argc, char *argv[]) } } } - else if(action == "collect") + else if(action == "collect" || action == "mwacollect") { - if(argc != 3 && !(argc == 4 && std::string(argv[2]) == "-h") ) + bool mwacollect = (action == "mwacollect"); + if(argc < 3) { std::cerr << "collect actions needs one or two parameters (the measurement set)\n"; return -1; } else { - std::string filename = (argc==3) ? argv[2] : argv[3]; - actionCollect(filename, argc==4 ? CollectHistograms : CollectDefault); + bool histograms = (std::string(argv[2]) == "-h"); + int argi = histograms ? 3 : 2; + std::string filename = argv[argi]; + size_t flaggedTimesteps = 0; + ++argi; + std::set<size_t> flaggedAntennae; + if(argi != argc) { + flaggedTimesteps = atoi(argv[argi]); + ++argi; + while(argi != argc) { + flaggedAntennae.insert(atoi(argv[argi])); + ++argi; + } + } + actionCollect(filename, histograms ? CollectHistograms : CollectDefault, mwacollect, flaggedTimesteps, flaggedAntennae); } } else if(action == "combine") @@ -677,7 +724,7 @@ int main(int argc, char *argv[]) return -1; } else { - actionHistogram(argv[3], argv[2]); + actionHistogram(argv[3], argv[2], false); } } else if(action == "summarize") diff --git a/CEP/DP3/AOFlagger/src/msio/memorybaselinereader.cpp b/CEP/DP3/AOFlagger/src/msio/memorybaselinereader.cpp index c3339da62f3..dfb02f44645 100644 --- a/CEP/DP3/AOFlagger/src/msio/memorybaselinereader.cpp +++ b/CEP/DP3/AOFlagger/src/msio/memorybaselinereader.cpp @@ -91,20 +91,8 @@ void MemoryBaselineReader::readSet() for(size_t a1=0;a1!=antennaCount;++a1) { matrix[a1].resize(antennaCount); - for(size_t a2=0;a2!=a1;++a2) + for(size_t a2=0;a2!=antennaCount;++a2) matrix[a1][a2] = 0; - for(size_t a2=a1;a2!=antennaCount;++a2) - { - Result *result = new Result(); - for(size_t p=0;p!=polarizationCount;++p) { - result->_realImages.push_back(Image2D::CreateZeroImagePtr(timeStepCount, frequencyCount)); - result->_imaginaryImages.push_back(Image2D::CreateZeroImagePtr(timeStepCount, frequencyCount)); - result->_flags.push_back(Mask2D::CreateSetMaskPtr<true>(timeStepCount, frequencyCount)); - } - result->_bandInfo = band; - result->_uvw.resize(timeStepCount); - matrix[a1][a2] = result; - } } // The actual reading of the data @@ -141,6 +129,18 @@ void MemoryBaselineReader::readSet() if(ant1 > ant2) std::swap(ant1, ant2); Result *result = matrix[ant1][ant2]; + if(result == 0) + { + result = new Result(); + for(size_t p=0;p!=polarizationCount;++p) { + result->_realImages.push_back(Image2D::CreateZeroImagePtr(timeStepCount, frequencyCount)); + result->_imaginaryImages.push_back(Image2D::CreateZeroImagePtr(timeStepCount, frequencyCount)); + result->_flags.push_back(Mask2D::CreateSetMaskPtr<true>(timeStepCount, frequencyCount)); + } + result->_bandInfo = band; + result->_uvw.resize(timeStepCount); + matrix[ant1][ant2] = result; + } dataColumn.get(rowIndex, dataArray); flagColumn.get(rowIndex, flagArray); @@ -195,12 +195,15 @@ void MemoryBaselineReader::readSet() { for(size_t a2=a1;a2!=antennaCount;++a2) { - BaselineID id; - id.antenna1 = a1; - id.antenna2 = a2; - id.spw = 0; - _baselines.insert(std::pair<BaselineID, Result>(id, *matrix[a1][a2])); - delete matrix[a1][a2]; + if(matrix[a1][a2] != 0) + { + BaselineID id; + id.antenna1 = a1; + id.antenna2 = a2; + id.spw = 0; + _baselines.insert(std::pair<BaselineID, Result>(id, *matrix[a1][a2])); + delete matrix[a1][a2]; + } } } _areFlagsChanged = false; diff --git a/CEP/DP3/AOFlagger/src/strategy/actions/imageraction.cpp b/CEP/DP3/AOFlagger/src/strategy/actions/imageraction.cpp index a760f35bd81..ed6bcdda17c 100644 --- a/CEP/DP3/AOFlagger/src/strategy/actions/imageraction.cpp +++ b/CEP/DP3/AOFlagger/src/strategy/actions/imageraction.cpp @@ -42,10 +42,10 @@ namespace rfiStrategy { delete tmp; } - bool btPlaneImager = false; + bool btPlaneImager = true; if(btPlaneImager) { - typedef float ImagerNumeric; + typedef double ImagerNumeric; BaselineTimePlaneImager<ImagerNumeric> btImager; BandInfo band = metaData->Band(); Image2DCPtr diff --git a/CEP/DP3/AOFlagger/src/strategy/algorithms/baselinetimeplaneimager.cpp b/CEP/DP3/AOFlagger/src/strategy/algorithms/baselinetimeplaneimager.cpp index 60e39de0e36..05371c6df01 100644 --- a/CEP/DP3/AOFlagger/src/strategy/algorithms/baselinetimeplaneimager.cpp +++ b/CEP/DP3/AOFlagger/src/strategy/algorithms/baselinetimeplaneimager.cpp @@ -4,14 +4,15 @@ #include <cmath> #include <fftw3.h> +#include <boost/iterator/iterator_concepts.hpp> template<typename NumType> void BaselineTimePlaneImager<NumType>::Image(NumType uTimesLambda, NumType vTimesLambda, NumType wTimesLambda, NumType lowestFrequency, NumType frequencyStep, size_t channelCount, const std::complex<NumType> *data, Image2D &output) { - AOLogger::Debug << "BTImager...\n"; NumType phi = atan2(vTimesLambda, uTimesLambda); size_t imgSize = output.Width(); NumType minLambda = frequencyToWavelength(lowestFrequency + frequencyStep*(NumType) channelCount); + NumType uvDist = sqrt(uTimesLambda*uTimesLambda + vTimesLambda*vTimesLambda) / minLambda; NumType scale = 1.0; // scale down from all sky to ... // Steps to be taken: @@ -30,56 +31,66 @@ void BaselineTimePlaneImager<NumType>::Image(NumType uTimesLambda, NumType vTime // 4. Add to output size_t sampleDist = 2*((size_t) round(lowestFrequency/frequencyStep) + channelCount); - size_t fftSize = std::max(imgSize*2, 2*sampleDist) * 4; - fftw_complex - *fftInp = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * fftSize), - *fftOut = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * fftSize); - fftw_plan plan = fftw_plan_dft_1d(fftSize, fftInp, fftOut, FFTW_FORWARD, FFTW_ESTIMATE); - size_t fftCentre = fftSize / 2; + size_t fftSize = std::max((size_t) (imgSize*sampleDist/(scale * (2.0*uvDist))), 2*sampleDist); + fftw_complex *fftInp = (fftw_complex*) fftw_malloc(sizeof(fftw_complex) * (fftSize/2+1)); + double *fftOut = (double*) fftw_malloc(sizeof(double) * fftSize); + fftw_plan plan = fftw_plan_dft_c2r_1d(fftSize, fftInp, fftOut, FFTW_ESTIMATE); size_t startChannel = (lowestFrequency/frequencyStep); - for(size_t i=0;i!=fftSize;++i) { + for(size_t i=0;i!=(fftSize/2+1);++i) { fftInp[i][0] = 0.0; fftInp[i][1] = 0.0; } for(size_t ch=0;ch!=channelCount;++ch) { - fftInp[fftSize - (startChannel + ch)][0] = data->real(); - fftInp[fftSize - (startChannel + ch)][1] = data->imag(); + //fftInp[fftSize - (startChannel + ch)][0] = data->real(); + //fftInp[fftSize - (startChannel + ch)][1] = data->imag(); + //fftInp[(startChannel + ch)][0] = data->real(); + //fftInp[(startChannel + ch)][1] = -data->imag(); fftInp[(startChannel + ch)][0] = data->real(); - fftInp[(startChannel + ch)][1] = -data->imag(); + fftInp[(startChannel + ch)][1] = data->imag(); ++data; } - AOLogger::Debug << "FFT...\n"; - fftw_execute_dft(plan, fftInp, fftOut); - //std::swap(fftInp, fftOut); + //AOLogger::Debug << "FFT...\n"; + fftw_execute(plan); fftw_free(fftInp); - NumType uvwDist = sqrt(uTimesLambda*uTimesLambda + vTimesLambda*vTimesLambda + wTimesLambda*wTimesLambda) / minLambda; - AOLogger::Debug << "phi=" << phi << ",imgSize=" << imgSize << ",minLambda=" << minLambda << ",fftSize=" << fftSize << ",uvwDist=" << uvwDist << ",sampleDist=" << sampleDist << '\n'; + // fftw gives unnormalized results; have to divide by sqrt fftSize. + NumType fftFactor = 1.0 / sqrt(fftSize); + for(size_t i=0;i!=fftSize;++i) + { + fftOut[i] *= fftFactor; + } + AOLogger::Debug << "phi=" << phi << ",imgSize=" << imgSize << ",minLambda=" << minLambda << ",fftSize=" << fftSize << ",uvOnlyDist=" << uvDist << ",sampleDist=" << sampleDist << '\n'; + + size_t fftCentre = fftSize / 2; NumType cosPhi = cos(phi), sinPhi = sin(phi); NumType mid = (NumType) imgSize / 2.0; - NumType transformGen = scale * (2.0*uvwDist / sampleDist) * (fftSize / imgSize); + NumType transformGen = scale * (2.0*uvDist / sampleDist) * (fftSize / imgSize); NumType transformX = cosPhi * transformGen; // Negative rotation (thus positive sin sign) NumType transformY = sinPhi * transformGen; + NumType tanZsinChi = 1.0, tanZcosChi = 1.0; // TODO testing! for(size_t y=0;y!=imgSize;++y) { num_t *destPtr = output.ValuePtr(0, y); - NumType yr = (NumType) y - mid; - NumType yrTransformed = yr * transformY; + NumType m = (NumType) y - mid; for(size_t x=0;x!=imgSize;++x) { - NumType xr = (NumType) x - mid; - NumType srcX = xr * transformX + yrTransformed; + NumType l = (NumType) x - mid; + // We need lookup table for ''(sqrt(1-l*l-m*m)-1)'' + NumType mSeen = m - (sqrt(1-l*l-m*m)-1) * tanZsinChi; + NumType lSeen = l + (sqrt(1-l*l-m*m)-1) * tanZcosChi; + NumType yrTransformed = mSeen * transformY; + NumType srcX = lSeen * transformX + yrTransformed; size_t srcXIndex = (size_t) round(srcX) + fftCentre; if(srcXIndex < fftSize) { if(srcXIndex < fftCentre) - *destPtr += fftOut[srcXIndex+fftCentre][0]; + *destPtr += fftOut[srcXIndex+fftCentre]; else - *destPtr += fftOut[srcXIndex-fftCentre][0]; + *destPtr += fftOut[srcXIndex-fftCentre]; } ++destPtr; //else diff --git a/CEP/DP3/DPPP/include/DPPP/BaselineSelection.h b/CEP/DP3/DPPP/include/DPPP/BaselineSelection.h index de02f2b1133..7f83ace2753 100644 --- a/CEP/DP3/DPPP/include/DPPP/BaselineSelection.h +++ b/CEP/DP3/DPPP/include/DPPP/BaselineSelection.h @@ -54,7 +54,8 @@ namespace LOFAR { // <li> maxbl: maximum baseline length (in m); only if minmax=true // </ul> BaselineSelection (const ParSet&, const string& prefix, - bool minmax=false); + bool minmax=false, + const string& defaultCorrType=string()); // Is there any selection? bool hasSelection() const; diff --git a/CEP/DP3/DPPP/include/DPPP/DPInfo.h b/CEP/DP3/DPPP/include/DPPP/DPInfo.h index cc3efd17f87..f14b5ac0c51 100644 --- a/CEP/DP3/DPPP/include/DPPP/DPInfo.h +++ b/CEP/DP3/DPPP/include/DPPP/DPInfo.h @@ -82,10 +82,6 @@ namespace LOFAR { const casa::Vector<casa::Int>& ant1, const casa::Vector<casa::Int>& ant2); - // Set the info for the given baselines. - void set (const casa::Vector<casa::Int>& ant1, - const casa::Vector<casa::Int>& ant2); - // Update the info for the given average factors. // If chanAvg is higher than the actual nr of channels, it is reset. // The same is true for timeAvg. @@ -153,6 +149,17 @@ namespace LOFAR { double refFreq() const { return itsRefFreq; } + // Get the antenna numbers actually used in the (selected) baselines. + // E.g. [0,2,5,6] + const vector<int>& antennaUsed() const + { return itsAntUsed; } + + // Get the indices of all antennae in the used antenna vector above. + // -1 means that the antenna is not used. + // E.g. [0,-1,1,-1,-1,2,3] for the example above. + const vector<int>& antennaMap() const + { return itsAntMap; } + // Are the visibility data needed? bool needVisData() const { return itsNeedVisData; } @@ -175,6 +182,10 @@ namespace LOFAR { const vector<double>& getBaselineLengths() const; private: + // Set which antennae are actually used. + void setAntUsed(); + + //# Data members. bool itsNeedVisData; //# Are the visibility data needed? bool itsNeedWrite; //# Does the last step need to write? string itsMSName; @@ -200,6 +211,8 @@ namespace LOFAR { double itsRefFreq; casa::Vector<casa::String> itsAntNames; vector<casa::MPosition> itsAntPos; + vector<int> itsAntUsed; + vector<int> itsAntMap; casa::Vector<casa::Int> itsAnt1; //# ant1 of all baselines casa::Vector<casa::Int> itsAnt2; //# ant2 of all baselines mutable vector<double> itsBLength; //# baseline lengths diff --git a/CEP/DP3/DPPP/include/DPPP/DPStep.h b/CEP/DP3/DPPP/include/DPPP/DPStep.h index 6c6b1d900bc..fc56fadc0fd 100644 --- a/CEP/DP3/DPPP/include/DPPP/DPStep.h +++ b/CEP/DP3/DPPP/include/DPPP/DPStep.h @@ -118,7 +118,7 @@ namespace LOFAR { // The default implementation copies the info. virtual void updateInfo (const DPInfo&); - //# Data mamabers. + //# Data members. DPStep::ShPtr itsNextStep; DPInfo itsInfo; }; diff --git a/CEP/DP3/DPPP/include/DPPP/Demixer.h b/CEP/DP3/DPPP/include/DPPP/Demixer.h index 857a089bcf6..25b8258a8d6 100644 --- a/CEP/DP3/DPPP/include/DPPP/Demixer.h +++ b/CEP/DP3/DPPP/include/DPPP/Demixer.h @@ -32,6 +32,7 @@ #include <DPPP/DPBuffer.h> #include <DPPP/Patch.h> #include <DPPP/PhaseShift.h> +#include <DPPP/Filter.h> #include <casa/Arrays/Cube.h> #include <casa/Quanta/Quantum.h> @@ -102,6 +103,9 @@ namespace LOFAR { uint nChanOut, uint nChanAvg); + // Do the demixing. + void handleDemix(); + // Deproject the sources without a model. void deproject (casa::Array<casa::DComplex>& factors, vector<MultiResultStep*> avgResults, @@ -113,18 +117,27 @@ namespace LOFAR { // Export the solutions to a ParmDB. void dumpSolutions(); + // Merge the data of the selected baselines from the subtract buffer + // into the full buffer. + void mergeSubtractResult(); + //# Data members. DPInput* itsInput; string itsName; string itsSkyName; string itsInstrumentName; + BaselineSelection itsSelBL; + Filter itsFilter; vector<PhaseShift*> itsPhaseShifts; - //# Phase shift and average steps. + //# Phase shift and average steps for demix. vector<DPStep::ShPtr> itsFirstSteps; //# Result of phase shifting and averaging the directions of interest //# at the demix resolution. vector<MultiResultStep*> itsAvgResults; + DPStep::ShPtr itsAvgStepSubtr; + Filter* itsFilterSubtr; //# Result of averaging the target at the subtract resolution. + MultiResultStep* itsAvgResultFull; MultiResultStep* itsAvgResultSubtr; //# Ignore target in demixing? bool itsIgnoreTarget; @@ -180,7 +193,7 @@ namespace LOFAR { casa::Vector<double> itsFreqDemix; casa::Vector<double> itsFreqSubtr; vector<double> itsUnknowns; - vector<double> itsLastKnowns; + vector<double> itsPrevSolution; uint itsTimeIndex; uint itsNConverged; diff --git a/CEP/DP3/DPPP/include/DPPP/Filter.h b/CEP/DP3/DPPP/include/DPPP/Filter.h index 9b0acb82bc5..ee63f382749 100644 --- a/CEP/DP3/DPPP/include/DPPP/Filter.h +++ b/CEP/DP3/DPPP/include/DPPP/Filter.h @@ -130,6 +130,9 @@ namespace LOFAR { // Parameters are obtained from the parset using the given prefix. Filter (DPInput* input, const ParSet&, const string& prefix); + // Construct the object for the given MS and baseline selection. + Filter (DPInput* input, const BaselineSelection&); + virtual ~Filter(); // Process the next data chunk. @@ -148,6 +151,18 @@ namespace LOFAR { // Show the timings. virtual void showTimings (std::ostream&, double duration) const; + // Does the filter step has an actual selection? + bool hasSelection() const + { return itsDoSelect; } + + // Get the indices of the selected baselines. + const vector<uint>& getIndicesBL() const + { return itsSelBL; } + + // Get the buffer. + const DPBuffer& getBuffer() const + { return itsBuf; } + private: //# Data members. DPInput* itsInput; @@ -158,6 +173,7 @@ namespace LOFAR { BaselineSelection itsBaselines; uint itsStartChan; vector<uint> itsSelBL; //# Index of baselines to select + bool itsDoSelect; //# Any selection? NSTimer itsTimer; }; diff --git a/CEP/DP3/DPPP/include/DPPP/MSReader.h b/CEP/DP3/DPPP/include/DPPP/MSReader.h index b50f16d4858..62ba12d5494 100644 --- a/CEP/DP3/DPPP/include/DPPP/MSReader.h +++ b/CEP/DP3/DPPP/include/DPPP/MSReader.h @@ -31,7 +31,6 @@ #include <DPPP/DPBuffer.h> #include <DPPP/UVWCalculator.h> #include <DPPP/FlagCounter.h> -#include <DPPP/BaselineSelection.h> #include <tables/Tables/TableIter.h> #include <tables/Tables/RefRows.h> #include <casa/Arrays/Slicer.h> diff --git a/CEP/DP3/DPPP/share/CMakeLists.txt b/CEP/DP3/DPPP/share/CMakeLists.txt index be25d401632..75e8809b010 100644 --- a/CEP/DP3/DPPP/share/CMakeLists.txt +++ b/CEP/DP3/DPPP/share/CMakeLists.txt @@ -3,4 +3,5 @@ # Data files install(FILES LBAdefault + HBAdefault DESTINATION share/rfistrategies) diff --git a/CEP/DP3/DPPP/share/HBAdefault b/CEP/DP3/DPPP/share/HBAdefault new file mode 100644 index 00000000000..1f46b4e4ac9 --- /dev/null +++ b/CEP/DP3/DPPP/share/HBAdefault @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- This is a Strategy configuration file for the +rfi detector by André Offringa (offringa@astro.rug.nl). +--> +<rfi-strategy format-version="3.7" reader-version-required="3.4"> + <action type="Strategy"> + <children> + <action type="SetFlaggingAction"> + <new-flagging>0</new-flagging> + </action> + <action type="ForEachPolarisationBlock"> + <on-xx>0</on-xx> + <on-xy>1</on-xy> + <on-yx>1</on-yx> + <on-yy>0</on-yy> + <on-stokes-i>0</on-stokes-i> + <on-stokes-q>0</on-stokes-q> + <on-stokes-u>0</on-stokes-u> + <on-stokes-v>0</on-stokes-v> + <children> + <action type="ForEachComplexComponentAction"> + <on-amplitude>1</on-amplitude> + <on-phase>0</on-phase> + <on-real>0</on-real> + <on-imaginary>0</on-imaginary> + <restore-from-amplitude>0</restore-from-amplitude> + <children> + <action type="IterationBlock"> + <iteration-count>2</iteration-count> + <sensitivity-start>4</sensitivity-start> + <children> + <action type="SumThresholdAction"> + <base-sensitivity>1</base-sensitivity> + <time-direction-flagging>1</time-direction-flagging> + <frequency-direction-flagging>1</frequency-direction-flagging> + </action> + <action type="CombineFlagResults"> + <children> + <action type="FrequencySelectionAction"> + <threshold>3</threshold> + </action> + <action type="TimeSelectionAction"> + <threshold>3.5</threshold> + </action> + </children> + </action> + <action type="SetImageAction"> + <new-image>1</new-image> + </action> + <action type="ChangeResolutionAction"> + <time-decrease-factor>3</time-decrease-factor> + <frequency-decrease-factor>3</frequency-decrease-factor> + <restore-revised>1</restore-revised> + <restore-masks>0</restore-masks> + <children> + <action type="HighPassFilterAction"> + <horizontal-kernel-sigma-sq>2.5</horizontal-kernel-sigma-sq> + <vertical-kernel-sigma-sq>5</vertical-kernel-sigma-sq> + <window-width>21</window-width> + <window-height>31</window-height> + <mode>1</mode> + </action> + </children> + </action> + </children> + </action> + <action type="SumThresholdAction"> + <base-sensitivity>1</base-sensitivity> + <time-direction-flagging>1</time-direction-flagging> + <frequency-direction-flagging>1</frequency-direction-flagging> + </action> + </children> + </action> + </children> + </action> + <action type="SetFlaggingAction"> + <new-flagging>4</new-flagging> + </action> + <action type="StatisticalFlagAction"> + <enlarge-frequency-size>0</enlarge-frequency-size> + <enlarge-time-size>0</enlarge-time-size> + <max-contaminated-frequencies-ratio>0.5</max-contaminated-frequencies-ratio> + <max-contaminated-times-ratio>0.5</max-contaminated-times-ratio> + <minimum-good-frequency-ratio>0.2</minimum-good-frequency-ratio> + <minimum-good-time-ratio>0.2</minimum-good-time-ratio> + </action> + </children> + </action> +</rfi-strategy> diff --git a/CEP/DP3/DPPP/share/LBAdefault b/CEP/DP3/DPPP/share/LBAdefault index 200dc2f9617..0a7ba38f0f5 100644 --- a/CEP/DP3/DPPP/share/LBAdefault +++ b/CEP/DP3/DPPP/share/LBAdefault @@ -1,7 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- This is a Strategy configuration file for the rfi detector by André Offringa (offringa@astro.rug.nl). -It is the default strategy for LBA observations. --> <rfi-strategy format-version="3.7" reader-version-required="3.4"> <action type="Strategy"> @@ -32,8 +31,8 @@ It is the default strategy for LBA observations. <children> <action type="SumThresholdAction"> <base-sensitivity>1</base-sensitivity> - <time-direction-flagging>1</time-direction-flagging> - <frequency-direction-flagging>0</frequency-direction-flagging> + <time-direction-flagging>0</time-direction-flagging> + <frequency-direction-flagging>1</frequency-direction-flagging> </action> <action type="CombineFlagResults"> <children> @@ -67,8 +66,8 @@ It is the default strategy for LBA observations. </action> <action type="SumThresholdAction"> <base-sensitivity>1</base-sensitivity> - <time-direction-flagging>1</time-direction-flagging> - <frequency-direction-flagging>0</frequency-direction-flagging> + <time-direction-flagging>0</time-direction-flagging> + <frequency-direction-flagging>1</frequency-direction-flagging> </action> </children> </action> @@ -114,4 +113,4 @@ It is the default strategy for LBA observations. </action> </children> </action> -</rfi-strategy> +</rfi-strategy> \ No newline at end of file diff --git a/CEP/DP3/DPPP/src/BaselineSelection.cc b/CEP/DP3/DPPP/src/BaselineSelection.cc index efa40f0baea..d5d3f45f5c1 100644 --- a/CEP/DP3/DPPP/src/BaselineSelection.cc +++ b/CEP/DP3/DPPP/src/BaselineSelection.cc @@ -39,9 +39,10 @@ namespace LOFAR { BaselineSelection::BaselineSelection (const ParSet& parset, const string& prefix, - bool minmax) + bool minmax, + const string& defaultCorrType) : itsStrBL (parset.getString (prefix + "baseline", "")), - itsCorrType (parset.getString (prefix + "corrtype", "")), + itsCorrType (parset.getString (prefix + "corrtype", defaultCorrType)), itsRangeBL (parset.getDoubleVector (prefix + "blrange", vector<double>())) { @@ -69,9 +70,10 @@ namespace LOFAR { void BaselineSelection::show (ostream& os) const { - os << " baseline: " << itsStrBL << std::endl; - os << " corrtype: " << itsCorrType << std::endl; - os << " blrange: " << itsRangeBL << std::endl; + os << " Baseline selection:" << std::endl; + os << " baseline: " << itsStrBL << std::endl; + os << " corrtype: " << itsCorrType << std::endl; + os << " blrange: " << itsRangeBL << std::endl; } Matrix<bool> BaselineSelection::apply (const DPInfo& info) const diff --git a/CEP/DP3/DPPP/src/DPInfo.cc b/CEP/DP3/DPPP/src/DPInfo.cc index 43e7efa192d..d1b9496ef08 100644 --- a/CEP/DP3/DPPP/src/DPInfo.cc +++ b/CEP/DP3/DPPP/src/DPInfo.cc @@ -111,13 +111,28 @@ namespace LOFAR { itsAntPos = antPos; itsAnt1.reference (ant1); itsAnt2.reference (ant2); + // Set which antennae are used. + setAntUsed(); } - void DPInfo::set (const Vector<Int>& ant1, - const Vector<Int>& ant2) + void DPInfo::setAntUsed() { - itsAnt1.reference (ant1); - itsAnt2.reference (ant2); + itsAntUsed.clear(); + itsAntMap.resize (itsAntNames.size()); + std::fill (itsAntMap.begin(), itsAntMap.end(), -1); + for (uint i=0; i<itsAnt1.size(); ++i) { + ASSERT (itsAnt1[i] >= 0 && itsAnt1[i] < int(itsAntMap.size()) && + itsAnt2[i] >= 0 && itsAnt2[i] < int(itsAntMap.size())); + itsAntMap[itsAnt1[i]] = 0; + itsAntMap[itsAnt2[i]] = 0; + } + itsAntUsed.reserve (itsAntNames.size()); + for (uint i=0; i<itsAntMap.size(); ++i) { + if (itsAntMap[i] == 0) { + itsAntMap[i] = itsAntUsed.size(); + itsAntUsed.push_back (i); + } + } } uint DPInfo::update (uint chanAvg, uint timeAvg) @@ -171,8 +186,8 @@ namespace LOFAR { Vector<Int> ant1 (baselines.size()); Vector<Int> ant2 (baselines.size()); for (uint i=0; i<baselines.size(); ++i) { - ant1 = itsAnt1[i]; - ant2 = itsAnt2[i]; + ant1[i] = itsAnt1[baselines[i]]; + ant2[i] = itsAnt2[baselines[i]]; } itsAnt1.reference (ant1); itsAnt2.reference (ant2); @@ -180,6 +195,7 @@ namespace LOFAR { itsBLength.resize (0); itsAutoCorrIndex.resize (0); } + setAntUsed(); } const vector<double>& DPInfo::getBaselineLengths() const diff --git a/CEP/DP3/DPPP/src/DPStep.cc b/CEP/DP3/DPPP/src/DPStep.cc index 19317fe0374..aa9ab1192fb 100644 --- a/CEP/DP3/DPPP/src/DPStep.cc +++ b/CEP/DP3/DPPP/src/DPStep.cc @@ -78,11 +78,14 @@ namespace LOFAR { bool ResultStep::process (const DPBuffer& buf) { itsBuffer = buf; + getNextStep()->process (buf); return true; } void ResultStep::finish() - {} + { + getNextStep()->finish(); + } void ResultStep::show (std::ostream&) const {} @@ -100,11 +103,14 @@ namespace LOFAR { bool MultiResultStep::process (const DPBuffer& buf) { itsBuffers.push_back (buf); + getNextStep()->process (buf); return true; } void MultiResultStep::finish() - {} + { + getNextStep()->finish(); + } void MultiResultStep::show (std::ostream&) const {} diff --git a/CEP/DP3/DPPP/src/Demixer.cc b/CEP/DP3/DPPP/src/Demixer.cc index cc04916e0ae..34a33b0e0c2 100644 --- a/CEP/DP3/DPPP/src/Demixer.cc +++ b/CEP/DP3/DPPP/src/Demixer.cc @@ -75,7 +75,9 @@ namespace LOFAR { itsName (prefix), itsSkyName (parset.getString(prefix+"skymodel", "sky")), itsInstrumentName (parset.getString(prefix+"instrumentmodel", - "instrument")), + "instrument")), + itsSelBL (parset, prefix, false, "cross"), + itsFilter (input, itsSelBL), itsAvgResultSubtr (0), itsIgnoreTarget (parset.getBool (prefix+"ignoretarget", false)), itsTargetSource (parset.getString(prefix+"targetsource", string())), @@ -137,6 +139,9 @@ namespace LOFAR { "An empty name is given for the sky and/or instrument model"); ASSERTSTR (!itsIgnoreTarget || itsTargetSource.empty(), "Target source name cannot be given if ignoretarget=true"); + // Add a null step as last step in the filter. + DPStep::ShPtr nullStep(new NullStep()); + itsFilter.setNextStep (nullStep); // Default nr of time chunks is maximum number of threads. if (itsNTimeChunk == 0) { itsNTimeChunk = OpenMP::maxThreads(); @@ -178,18 +183,26 @@ namespace LOFAR { itsFactors.resize (itsNTimeChunk); itsFactorsSubtr.resize (itsNTimeChunkSubtr); itsPhaseShifts.reserve (itsNDir-1); // not needed for target direction - itsFirstSteps.reserve (itsNDir+1); // one extra for itsAvgSubtr + itsFirstSteps.reserve (itsNDir); itsAvgResults.reserve (itsNDir); - // Create the steps for the sources to be removed. - // Demixing consists of the following steps: - // - phaseshift data to each demix source - // - average data in each direction, also for original phasecenter. - // - determine demix factors for all directions - // - use BBS to predict and solve in each direction. It is possible to - // predict more directions than to solve (for strong sources in field). - // - use BBS to subtract the solved sources using the demix factors. - // The averaging used here can be smaller than used when solving. + // Create the solve and subtract steps for the sources to be removed. + // Solving consists of the following steps: + // - select the requested baselines (longer baselines may need no demix) + // - phaseshift selected data to each demix source + // - average selected data in each direction, also original phasecenter. + // - determine and average demix factors for all directions + // - predict and solve in each direction. It is possible to predict + // more directions than to solve (for strong sources in field). + // Subtract consists of the following steps: + // - average all data (possibly different averaging than used in solve) + // - determine and average demix factors (using select output in solve) + // - select the requested baselines + // - subtract sources for selected data + // - merge subtract result into averaged data. This is not needed if + // no selection is done. + // Note that multiple time chunks are handled jointly, so a + // MultiResultStep is used to catch the results of all time chunks. for (uint i=0; i<itsNDir-1; ++i) { // First make the phaseshift and average steps for each demix source. // The resultstep gets the result. @@ -224,12 +237,18 @@ namespace LOFAR { itsAvgResults.push_back (targetAvgRes); // Create the data average step for the subtract. - DPStep::ShPtr targetAvgSubtr(new Averager(input, prefix, - itsNChanAvgSubtr, - itsNTimeAvgSubtr)); + // The entire average result is needed for the next NDPPP step. + // Only the selected baselines need to be subtracted, so add a + // filter step as the last one. + itsAvgStepSubtr = DPStep::ShPtr(new Averager(input, prefix, + itsNChanAvgSubtr, + itsNTimeAvgSubtr)); + itsAvgResultFull = new MultiResultStep(itsNTimeChunkSubtr); + itsFilterSubtr = new Filter(input, itsSelBL); itsAvgResultSubtr = new MultiResultStep(itsNTimeChunkSubtr); - targetAvgSubtr->setNextStep (DPStep::ShPtr(itsAvgResultSubtr)); - itsFirstSteps.push_back (targetAvgSubtr); + itsAvgStepSubtr->setNextStep (DPStep::ShPtr(itsAvgResultFull)); + itsAvgResultFull->setNextStep (DPStep::ShPtr(itsFilterSubtr)); + itsFilterSubtr->setNextStep (DPStep::ShPtr(itsAvgResultSubtr)); // while(itsCutOffs.size() < itsNModel) { // itsCutOffs.push_back(0.0); @@ -242,11 +261,28 @@ namespace LOFAR { info() = infoIn; // Get size info. - itsNStation = infoIn.antennaNames().size(); - itsNChanIn = infoIn.nchan(); - itsNBl = infoIn.nbaselines(); - itsNCorr = infoIn.ncorr(); + itsNChanIn = infoIn.nchan(); + itsNCorr = infoIn.ncorr(); ASSERTSTR (itsNCorr==4, "Demixing requires data with 4 polarizations"); + + // Handle possible data selection. + itsFilter.setInfo (infoIn); + const DPInfo& infoSel = itsFilter.getInfo(); + // NB. The number of baselines and stations refer to the number of + // selected baselines and the number of unique stations that participate + // in the selected baselines. + itsNBl = infoSel.nbaselines(); + itsNStation = infoSel.antennaUsed().size(); + + // Re-number the station IDs in the selected baselines, removing gaps in + // the numbering due to unused stations. + const vector<int> &antennaMap = infoSel.antennaMap(); + for (uint i=0; i<itsNBl; ++i) { + itsBaselines.push_back(Baseline(antennaMap[infoSel.getAnt1()[i]], + antennaMap[infoSel.getAnt2()[i]])); + } + + // Allocate buffers used to compute the smearing factors. itsFactorBuf.resize (IPosition(4, itsNCorr, itsNChanIn, itsNBl, itsNDir*(itsNDir-1)/2)); itsFactorBufSubtr.resize (IPosition(4, itsNCorr, itsNChanIn, itsNBl, @@ -254,25 +290,22 @@ namespace LOFAR { // Adapt averaging to available nr of channels and times. // Use a copy of the DPInfo, otherwise it is updated multiple times. - DPInfo infoDemix(infoIn); - itsNTimeAvg = std::min (itsNTimeAvg, infoIn.ntime()); + DPInfo infoDemix(infoSel); + itsNTimeAvg = std::min (itsNTimeAvg, infoSel.ntime()); itsNChanAvg = infoDemix.update (itsNChanAvg, itsNTimeAvg); itsNChanOut = infoDemix.nchan(); itsTimeIntervalAvg = infoDemix.timeInterval(); itsNTimeDemix = infoDemix.ntime(); - for (size_t i=0; i<infoIn.getAnt1().size(); ++i) { - itsBaselines.push_back (Baseline(infoIn.getAnt1()[i], - infoIn.getAnt2()[i])); - } // Let the internal steps update their data. for (uint i=0; i<itsFirstSteps.size(); ++i) { - itsFirstSteps[i]->setInfo (infoIn); + itsFirstSteps[i]->setInfo (infoSel); } + itsAvgStepSubtr->setInfo (infoIn); // Update the info of this object. info().setNeedVisData(); info().setNeedWrite(); - itsNTimeAvgSubtr = std::min (itsNTimeAvgSubtr, infoIn.ntime()); + itsNTimeAvgSubtr = std::min (itsNTimeAvgSubtr, infoSel.ntime()); itsNChanAvgSubtr = info().update (itsNChanAvgSubtr, itsNTimeAvgSubtr); itsNChanOutSubtr = info().nchan(); ASSERTSTR (itsNChanAvg % itsNChanAvgSubtr == 0, @@ -296,9 +329,9 @@ namespace LOFAR { // Intialize the unknowns. itsUnknowns.resize(itsNTimeDemix * itsNModel * itsNStation * 8); - itsLastKnowns.resize(itsNModel * itsNStation * 8); - vector<double>::iterator it = itsLastKnowns.begin(); - vector<double>::iterator it_end = itsLastKnowns.end(); + itsPrevSolution.resize(itsNModel * itsNStation * 8); + vector<double>::iterator it = itsPrevSolution.begin(); + vector<double>::iterator it_end = itsPrevSolution.end(); while(it != it_end) { *it++ = 1.0; @@ -317,6 +350,14 @@ namespace LOFAR { os << "Demixer " << itsName << std::endl; os << " skymodel: " << itsSkyName << std::endl; os << " instrumentmodel: " << itsInstrumentName << std::endl; + itsSelBL.show (os); + if (itsSelBL.hasSelection()) { + os << " demixing " << itsFilter.getInfo().nbaselines() + << " out of " << getInfo().nbaselines() << " baselines (" + << itsFilter.getInfo().antennaUsed().size() + << " out of " << getInfo().antennaUsed().size() + << " stations)" << std::endl; + } os << " targetsource: " << itsTargetSource << std::endl; os << " subtractsources: " << itsSubtrSources << std::endl; os << " modelsources: " << itsModelSources << std::endl; @@ -388,16 +429,22 @@ namespace LOFAR { itsTimer)); } - // Do the initial steps (phaseshift and average). + // Do the filter step first. + itsFilter.process (newBuf); + const DPBuffer& selBuf = itsFilter.getBuffer(); + // Do the next steps (phaseshift and average) on the filter output. itsTimerPhaseShift.start(); for (int i=0; i<int(itsFirstSteps.size()); ++i) { - itsFirstSteps[i]->process(newBuf); + itsFirstSteps[i]->process(selBuf); } + // Do the average and filter step for the output for all data. + itsAvgStepSubtr->process (newBuf); itsTimerPhaseShift.stop(); - // For each itsNTimeAvg times, calculate the phase rotation per direction. + // For each itsNTimeAvg times, calculate the phase rotation per direction + // for the selected data. itsTimerDemix.start(); - addFactors (newBuf, itsFactorBuf); + addFactors (selBuf, itsFactorBuf); if (itsNTimeIn % itsNTimeAvg == 0) { makeFactors (itsFactorBuf, itsFactors[itsNTimeOut], itsAvgResults[0]->get()[itsNTimeOut].getWeights(), @@ -409,8 +456,8 @@ namespace LOFAR { itsNTimeOut++; } // Subtract is done with different averaging parameters, so calculate the - // factors for it. - addFactors (newBuf, itsFactorBufSubtr); + // factors for it (again for selected data only). + addFactors (selBuf, itsFactorBufSubtr); if (itsNTimeIn % itsNTimeAvgSubtr == 0) { makeFactors (itsFactorBufSubtr, itsFactorsSubtr[itsNTimeOutSubtr], itsAvgResultSubtr->get()[itsNTimeOutSubtr].getWeights(), @@ -424,34 +471,8 @@ namespace LOFAR { // Estimate gains and subtract source contributions when sufficient time // slots have been collected. if (itsNTimeOut == itsNTimeChunk) { - if(itsNModel > 0) { - itsTimerSolve.start(); - demix(); - itsTimerSolve.stop(); - } - - // Clear the input buffers. - for (size_t i=0; i<itsAvgResults.size(); ++i) { - itsAvgResults[i]->clear(); - } - - // Let the next step process the data. - for (uint i=0; i<itsNTimeOutSubtr; ++i) { - itsTimer.stop(); - getNextStep()->process (itsAvgResultSubtr->get()[i]); - itsTimer.start(); - } - - // Clear the output buffer. - itsAvgResultSubtr->clear(); - - // Reset counters. - itsNTimeIn = 0; - itsNTimeOut = 0; - itsNTimeOutSubtr = 0; - itsTimeIndex += itsNTimeChunk; + handleDemix(); } - itsTimer.stop(); return true; } @@ -467,6 +488,7 @@ namespace LOFAR { for (int i=0; i<int(itsFirstSteps.size()); ++i) { itsFirstSteps[i]->finish(); } + itsAvgStepSubtr->finish(); itsTimerPhaseShift.stop(); // Only average if there is some unaveraged data. itsTimerDemix.start(); @@ -492,26 +514,7 @@ namespace LOFAR { itsFactorsSubtr.resize(itsNTimeOutSubtr); // Demix the source directions. - if(itsNModel > 0) { - itsTimerSolve.start(); - demix(); - itsTimerSolve.stop(); - } - - // Clear the input buffers. - for (size_t i=0; i<itsAvgResults.size(); ++i) { - itsAvgResults[i]->clear(); - } - - // Let the next step process the data. - for (uint i=0; i<itsNTimeOutSubtr; ++i) { - itsTimer.stop(); - getNextStep()->process (itsAvgResultSubtr->get()[i]); - itsTimer.start(); - } - - // Clear the output buffer. - itsAvgResultSubtr->clear(); + handleDemix(); } // Write solutions to disk in ParmDB format. @@ -525,6 +528,62 @@ namespace LOFAR { getNextStep()->finish(); } + void Demixer::handleDemix() + { + if(itsNModel > 0) { + itsTimerSolve.start(); + demix(); + itsTimerSolve.stop(); + // If selection was done, merge the subtract results back into the + // buffer. + } + // If needed, merge in the deselected baselines. + if (itsSelBL.hasSelection()) { + mergeSubtractResult(); + } + + // Clear the input buffers. + for (size_t i=0; i<itsAvgResults.size(); ++i) { + itsAvgResults[i]->clear(); + } + // Let the next step process the data. + for (uint i=0; i<itsNTimeOutSubtr; ++i) { + itsTimer.stop(); + if (itsSelBL.hasSelection()) { + getNextStep()->process (itsAvgResultFull->get()[i]); + } else { + getNextStep()->process (itsAvgResultSubtr->get()[i]); + } + itsTimer.start(); + } + + // Clear the output buffer. + itsAvgResultFull->clear(); + itsAvgResultSubtr->clear(); + + // Reset counters. + itsNTimeIn = 0; + itsNTimeOut = 0; + itsNTimeOutSubtr = 0; + itsTimeIndex += itsNTimeChunk; + } + + void Demixer::mergeSubtractResult() + { + // Merge the selected baselines from the subtract buffer into the + // full buffer. Do it for all timestamps. + for (uint i=0; i<itsNTimeOutSubtr; ++i) { + const Array<Complex>& arr = itsAvgResultSubtr->get()[i].getData(); + size_t nr = arr.shape()[0] * arr.shape()[1]; + const Complex* in = arr.data(); + Complex* out = itsAvgResultFull->get()[i].getData().data(); + for (size_t j=0; j<itsFilter.getIndicesBL().size(); ++j) { + size_t inx = itsFilter.getIndicesBL()[j]; + memcpy (out+inx*nr, in+j*nr, nr*sizeof(Complex)); + } + } + } + void Demixer::addFactors (const DPBuffer& newBuf, Array<DComplex>& factorBuf) { @@ -781,9 +840,14 @@ namespace LOFAR { { initThreadPrivateStorage(*it, nDr, nSt, nBl, nCh, nChSubtr); - // Copy solutions from global solution array to thread private solution - // array (solution propagation between chunks). - copy(itsLastKnowns.begin(), itsLastKnowns.end(), it->unknowns.begin()); + // Copy the previous solution to the thread private vectors of unknowns. + // When solution propagation is disabled, itsPrevSolution is never + // updated. It then contains 1.0+0.0i for the diagonal terms and + // 0.0+0.0i for the off-diagonal terms. Thus, when solution propagation + // is disabled this statement effectively re-initializes the thread + // private vectors of unknowns. + copy(itsPrevSolution.begin(), itsPrevSolution.end(), + it->unknowns.begin()); } const_cursor<double> cr_freq = casa_const_cursor(itsFreqDemix); @@ -796,6 +860,14 @@ namespace LOFAR { const size_t thread = OpenMP::threadNum(); ThreadPrivateStorage &storage = threadStorage[thread]; + // If solution propagation is disabled, re-initialize the thread-private + // vector of unknowns. + if(!itsPropagateSolutions) + { + copy(itsPrevSolution.begin(), itsPrevSolution.end(), + storage.unknowns.begin()); + } + // Simulate. // // Model visibilities for each direction of interest will be computed @@ -946,7 +1018,7 @@ namespace LOFAR { { copy(&(itsUnknowns[(itsTimeIndex + nTime - 1) * nDr * nSt * 8]), &(itsUnknowns[(itsTimeIndex + nTime) * nDr * nSt * 8]), - itsLastKnowns.begin()); + itsPrevSolution.begin()); } // Update convergence count. @@ -978,42 +1050,40 @@ namespace LOFAR { resolution[1] = itsTimeIntervalAvg; parmDB.setDefaultSteps(resolution); - // Convert station names from casa::String to std::string. - ASSERT(getInfo().antennaNames().size() == itsNStation); - vector<string> stations(itsNStation); - copy(getInfo().antennaNames().begin(), getInfo().antennaNames().end(), - stations.begin()); + // Map station indices in the solution array to the corresponding antenna + // names. This is required because solutions are only produced for + // stations that participate in one or more baselines. Due to the baseline + // selection or missing baselines, solutions may be available for less + // than the total number of station available in the observation. + const DPInfo &info = itsFilter.getInfo(); + const vector<int> &antennaUsed = info.antennaUsed(); + const Vector<String> &antennaNames = info.antennaNames(); vector<BBS::Parm> parms; for(size_t dr = 0; dr < itsNModel; ++dr) { for(size_t st = 0; st < itsNStation; ++st) { + string name(antennaNames[antennaUsed[st]]); + string suffix(name + ":" + itsAllSources[dr]); + parms.push_back(BBS::Parm(parmCache, parmSet.addParm(parmDB, - "DirectionalGain:0:0:Real:" + stations[st] + ":" - + itsAllSources[dr]))); + "DirectionalGain:0:0:Real:" + suffix))); parms.push_back(BBS::Parm(parmCache, parmSet.addParm(parmDB, - "DirectionalGain:0:0:Imag:" + stations[st] + ":" - + itsAllSources[dr]))); + "DirectionalGain:0:0:Imag:" + suffix))); parms.push_back(BBS::Parm(parmCache, parmSet.addParm(parmDB, - "DirectionalGain:0:1:Real:" + stations[st] + ":" - + itsAllSources[dr]))); + "DirectionalGain:0:1:Real:" + suffix))); parms.push_back(BBS::Parm(parmCache, parmSet.addParm(parmDB, - "DirectionalGain:0:1:Imag:" + stations[st] + ":" - + itsAllSources[dr]))); + "DirectionalGain:0:1:Imag:" + suffix))); parms.push_back(BBS::Parm(parmCache, parmSet.addParm(parmDB, - "DirectionalGain:1:0:Real:" + stations[st] + ":" - + itsAllSources[dr]))); + "DirectionalGain:1:0:Real:" + suffix))); parms.push_back(BBS::Parm(parmCache, parmSet.addParm(parmDB, - "DirectionalGain:1:0:Imag:" + stations[st] + ":" - + itsAllSources[dr]))); + "DirectionalGain:1:0:Imag:" + suffix))); parms.push_back(BBS::Parm(parmCache, parmSet.addParm(parmDB, - "DirectionalGain:1:1:Real:" + stations[st] + ":" - + itsAllSources[dr]))); + "DirectionalGain:1:1:Real:" + suffix))); parms.push_back(BBS::Parm(parmCache, parmSet.addParm(parmDB, - "DirectionalGain:1:1:Imag:" + stations[st] + ":" - + itsAllSources[dr]))); + "DirectionalGain:1:1:Imag:" + suffix))); } } diff --git a/CEP/DP3/DPPP/src/EstimateNDPPP.cc b/CEP/DP3/DPPP/src/EstimateNDPPP.cc deleted file mode 100644 index a2cad2d8546..00000000000 --- a/CEP/DP3/DPPP/src/EstimateNDPPP.cc +++ /dev/null @@ -1,860 +0,0 @@ -//# EstimateNDPPP.cc: NDPPP specific variant of BBS estimation routines. -//# -//# Copyright (C) 2012 -//# ASTRON (Netherlands Institute for Radio Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands -//# -//# This file is part of the LOFAR software suite. -//# The LOFAR software suite is free software: you can redistribute it and/or -//# modify it under the terms of the GNU General Public License as published -//# by the Free Software Foundation, either version 3 of the License, or -//# (at your option) any later version. -//# -//# The LOFAR software suite is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License along -//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. -//# -//# $Id$ - -#include <lofar_config.h> -#include <DPPP/EstimateNDPPP.h> -#include <BBSKernel/EstimateUtil.h> - -namespace LOFAR -{ -namespace DPPP -{ -using namespace BBS; - -namespace -{ - // State kept for a single cell in the solution grid. - struct Cell - { - // LSQ solver and current estimates for the coefficients. - casa::LSQFit solver; - vector<double> coeff; - }; - - template <typename T_SAMPLE_MODIFIER> - struct SampleProcessorComplex; - - JonesMatrix mix(const vector<JonesMatrix> &in, - const vector<casa::Array<casa::DComplex> > &coeff, - unsigned int target, - unsigned int nsources, - unsigned int baseline); - - void mix(const vector<JonesMatrix> &in, vector<JonesMatrix> &out, - const vector<casa::Array<casa::DComplex> > &coeff, - const Location &start, const Location &end, unsigned int baseline); - - FlagArray mergeFlags(const vector<JonesMatrix> &in); - void mixAndMerge(const Matrix &factor, const Element &in, Element &out); - - Matrix makeMixingFactor(const vector<casa::Array<casa::DComplex> > &coeff, - const Location &start, const Location &end, unsigned int baseline, - unsigned int correlation, unsigned int row, unsigned int column); - - void subtract2(vector<DPPP::DPBuffer> &buffer, - const vector<MeasurementExpr::Ptr> &models, - const vector<casa::Array<casa::DComplex> > &coeff, - unsigned int target, - unsigned int nsources, - const vector<pair<size_t, size_t> > &baselineMap, - const vector<pair<size_t, size_t> > &correlationMap); - - template <typename T_SAMPLE_PROCESSOR> - void equate(const Location &start, const Location &end, - const vector<vector<DPPP::DPBuffer> > &buffers, - const vector<MeasurementExpr::Ptr> &models, - const vector<casa::Array<casa::DComplex> > &coeff, - const vector<pair<size_t, size_t> > &baselineMap, - const vector<pair<size_t, size_t> > &correlationMap, - const vector<Interval<size_t> > (&cellMap)[2], - const map<PValueKey, unsigned int> &coeffMap, - vector<Cell> &cells); - - template <typename T_SAMPLE_PROCESSOR> - void equate2(const Location &start, const Location &end, size_t blIndex, - const vector<DPPP::DPBuffer> &obs, const JonesMatrix &sim, - const vector<pair<size_t, size_t> > &correlationMap, - const vector<Interval<size_t> > (&cellMap)[2], - const map<PValueKey, unsigned int> &coeffMap, - vector<Cell> &cells); - - void initCells(const Location &start, const Location &end, - const ParmGroup &solvables, size_t nCoeff, - const EstimateOptions &options, - vector<Cell> &cells); - - // Perform a single iteration for all cells in the range [\p start, \p end) - // that have not yet converged or failed, updating the coefficient values - // to the new estimates found. - // \pre The range starting at \p cell should contain exactly one Cell - // instance for each cell in the range [\p start, \p end]. - bool iterate(const Location &start, const Location &end, - const ParmGroup &solvables, const EstimateOptions &options, - vector<Cell> &cells); -} // unnamed namespace - -void estimate(const vector<vector<DPPP::DPBuffer> > &buffers, - const vector<MeasurementExpr::Ptr> &models, - const vector<casa::Array<dcomplex> > &coeff, - const BaselineSeq &baselines, - const CorrelationSeq &correlations, - const BaselineMask &baselineMask, - const CorrelationMask &correlationMask, - const Grid &visGrid, - const Grid &solGrid, - const EstimateOptions &options) -{ - // ========================================================================= - // CHECK PRECONDITIONS - // ========================================================================= - const size_t nDirections = buffers.size(); - const size_t nModels = models.size(); - { - ASSERT(nDirections >= nModels && nModels > 0); - ASSERT(int(nDirections) == coeff[0].shape()[0]); - ASSERT(int(nModels) == coeff[0].shape()[1]); - - CorrelationSeq tmp; - tmp.append(Correlation::XX); - tmp.append(Correlation::XY); - tmp.append(Correlation::YX); - tmp.append(Correlation::YY); - - for(size_t i = 0; i < nModels; ++i) - { - ASSERT(models[i]->baselines() == models.front()->baselines()); - ASSERT(models[i]->correlations() == tmp); - ASSERT(models[i]->domain().contains(visGrid.getBoundingBox())); - } - } - // ========================================================================= - - // Construct a sequence of pairs of indices of matching baselines (i.e. - // baselines common to both buffer and model). - vector<pair<size_t, size_t> > blMap; - makeIndexMap(baselines, models.front()->baselines(), baselineMask, - back_inserter(blMap)); - - // Construct a sequence of pairs of indices of matching correlations - // (i.e. correlations known by both buffer and model). - vector<pair<size_t, size_t> > crMap; - makeIndexMap(correlations, models.front()->correlations(), correlationMask, - back_inserter(crMap)); - - // Compute a mapping from cells of the solution grid to cell intervals - // in the evaluation grid. - vector<Interval<size_t> > cellMap[2]; - Interval<size_t> domain[2]; - domain[FREQ] = makeAxisMap(solGrid[FREQ], visGrid[FREQ], - back_inserter(cellMap[FREQ])); - domain[TIME] = makeAxisMap(solGrid[TIME], visGrid[TIME], - back_inserter(cellMap[TIME])); - - ParmGroup solvables; - for(size_t i = 0; i < nModels; ++i) - { - ParmGroup tmp = models[i]->solvables(); - solvables.insert(tmp.begin(), tmp.end()); - } - - // Make coefficient map. - map<PValueKey, unsigned int> coeffMap; - makeCoeffMap(solvables, inserter(coeffMap, coeffMap.begin())); - LOG_DEBUG_STR("No. of coefficients to estimate: " << coeffMap.size()); - - // Assign solution grid to solvables. - ParmManager::instance().setGrid(solGrid, solvables); - - // --------------------------------------------------------------------- - // Process each chunk of cells in a loop. - // --------------------------------------------------------------------- - - // Clip chunk size to the size of the solution grid. - size_t chunkSize = options.chunkSize() == 0 ? solGrid[TIME]->size() - : std::min(options.chunkSize(), solGrid[TIME]->size()); - - // Allocate cells. - vector<Cell> cells(solGrid[FREQ]->size() * chunkSize); - - // Compute the number of cell chunks to process. - size_t nChunks = (solGrid[TIME]->size() + chunkSize - 1) / chunkSize; - - // Process the solution grid in chunks. - for(size_t chunk = 0; chunk < nChunks; ++chunk) - { - NSTimer timerChunk, timerEquate, timerIterate; - timerChunk.start(); - - // Compute cell chunk boundaries in solution grid coordinates. - Location chunkStart(0, chunk * chunkSize); - Location chunkEnd(solGrid[FREQ]->size() - 1, - std::min(chunkStart.second + chunkSize - 1, - solGrid[TIME]->size() - 1)); - - // Adjust cell chunk boundaries to exclude those cells for which no - // visibility data is available. - chunkStart = - Location(std::max(chunkStart.first, domain[FREQ].start), - std::max(chunkStart.second, domain[TIME].start)); - chunkEnd = - Location(std::min(chunkEnd.first, domain[FREQ].end), - std::min(chunkEnd.second, domain[TIME].end)); - - // If there are no cells for which visibility data is available, - // skip the chunk. - if(chunkStart.first > chunkEnd.first - || chunkStart.second > chunkEnd.second) - { - timerChunk.stop(); - continue; - } - - // Ensure a model value is computed for all the visibility samples - // within the chunk. - Location reqStart(cellMap[FREQ][chunkStart.first].start, - cellMap[TIME][chunkStart.second].start); - Location reqEnd(cellMap[FREQ][chunkEnd.first].end, - cellMap[TIME][chunkEnd.second].end); - for(size_t i = 0; i < nModels; ++i) - { - models[i]->setEvalGrid(visGrid.subset(reqStart, reqEnd)); - } - - // Initialize a cell instance for each cell in [chunkEnd, - // chunkStart]. - initCells(chunkStart, chunkEnd, solvables, coeffMap.size(), options, - cells); - - typedef SampleProcessorComplex<SampleModifierComplex> SampleProcessor; - - bool done = false; - unsigned int nIterations = 0; - while(!done) - { - // Construct normal equations from the data and an evaluation of - // the model based on the current coefficient values. - timerEquate.start(); - equate<SampleProcessor>(chunkStart, chunkEnd, buffers, models, - coeff, blMap, crMap, cellMap, coeffMap, cells); - timerEquate.stop(); - - // Perform a single iteration. - timerIterate.start(); - done = iterate(chunkStart, chunkEnd, solvables, options, cells); - timerIterate.stop(); - - // Notify model that solvables have changed. - for(size_t i = 0; i < nModels; ++i) - { - models[i]->solvablesChanged(); - } - - // Update iteration count. - ++nIterations; - } - timerChunk.stop(); - - // Output statistics and timers. - const size_t nCells = (chunkEnd.second - chunkStart.second + 1) - * (chunkEnd.first - chunkStart.first + 1); - LOG_DEBUG_STR("chunk: " << (chunk + 1) << "/" << nChunks - << " cells: " << nCells << " iterations: " << nIterations); - LOG_DEBUG_STR("\ttimers: all: " << toString(timerChunk) - << " equate: " << toString(timerEquate) << " iterate: " - << toString(timerIterate) << " total/count/average"); - - // Propagate solutions to the next chunk if required. - if(options.propagate() && (chunk + 1) < nChunks) - { - Location srcStart(0, chunk * chunkSize); - Location srcEnd(solGrid[FREQ]->size() - 1, - srcStart.second + chunkSize - 1); - - Location destStart(0, (chunk + 1) * chunkSize); - Location destEnd(solGrid[FREQ]->size() - 1, - std::min(destStart.second + chunkSize - 1, - solGrid[TIME]->size() - 1)); - - passCoeff(solvables, srcStart, srcEnd, destStart, destEnd); - } - } -} - -void subtract(vector<DPPP::DPBuffer> &buffer, - const vector<BBS::MeasurementExpr::Ptr> &models, - const vector<casa::Array<casa::DComplex> > &coeff, - const BBS::BaselineSeq &baselines, - const BBS::CorrelationSeq &correlations, - const BBS::BaselineMask &baselineMask, - const BBS::CorrelationMask &correlationMask, - const BBS::Grid &visGrid, - unsigned int target, - unsigned int nsources) -{ - // ========================================================================= - // CHECK PRECONDITIONS - // ========================================================================= - { - ASSERT(nsources <= models.size()); - ASSERT(buffer.size() > 0); - ASSERT(int(target) < coeff[0].shape()[1]); - - CorrelationSeq tmp; - tmp.append(Correlation::XX); - tmp.append(Correlation::XY); - tmp.append(Correlation::YX); - tmp.append(Correlation::YY); - - for(size_t i = 0; i < nsources; ++i) - { - ASSERT(models[i]->baselines() == models.front()->baselines()); - ASSERT(models[i]->correlations() == tmp); - ASSERT(models[i]->domain().contains(visGrid.getBoundingBox())); - } - } - // ========================================================================= - - // Construct a sequence of pairs of indices of matching baselines (i.e. - // baselines common to both buffer and model). - vector<pair<size_t, size_t> > blMap; - makeIndexMap(baselines, models.front()->baselines(), baselineMask, - back_inserter(blMap)); - - // Construct a sequence of pairs of indices of matching correlations - // (i.e. correlations known by both buffer and model). - vector<pair<size_t, size_t> > crMap; - makeIndexMap(correlations, models.front()->correlations(), correlationMask, - back_inserter(crMap)); - - for(size_t i = 0; i < nsources; ++i) - { - models[i]->setEvalGrid(visGrid); - } - - subtract2(buffer, models, coeff, target, nsources, blMap, crMap); -} - - -namespace -{ - -template <typename T_SAMPLE_PROCESSOR> -void equate(const Location &start, const Location &end, - const vector<vector<DPPP::DPBuffer> > &buffers, - const vector<MeasurementExpr::Ptr> &models, - const vector<casa::Array<casa::DComplex> > &coeff, - const vector<pair<size_t, size_t> > &baselineMap, - const vector<pair<size_t, size_t> > &correlationMap, - const vector<Interval<size_t> > (&cellMap)[2], - const map<PValueKey, unsigned int> &coeffMap, - vector<Cell> &cells) - -{ - ASSERT(buffers.size() >= models.size()); - - const size_t nDirections = buffers.size(); - const size_t nModels = models.size(); - - vector<JonesMatrix> sim(nModels); - vector<JonesMatrix> mixed(nDirections); - - typedef vector<pair<size_t, size_t> >::const_iterator bl_iterator; - for(bl_iterator it = baselineMap.begin(), it_end = baselineMap.end(); - it != it_end; ++it) - { - // Evaluate models. - for(size_t i = 0; i < nModels; ++i) - { - sim[i] = models[i]->evaluate(it->second); - } - - // Mix - Location visStart(cellMap[FREQ][start.first].start, - cellMap[TIME][start.second].start); - Location visEnd(cellMap[FREQ][end.first].end, - cellMap[TIME][end.second].end); - mix(sim, mixed, coeff, visStart, visEnd, it->first); - - // Flags will be equal for all mixed simulations. Skip baseline if all - // grid points are flagged. - if(sim.front().hasFlags()) - { - FlagArray flags(sim.front().flags()); - if(flags.rank() == 0 && (*flags.begin() != 0)) - { - continue; - } - } - - // Equate. - for(size_t i = 0; i < nDirections; ++i) - { - equate2<T_SAMPLE_PROCESSOR>(start, end, it->first, buffers[i], mixed[i], correlationMap, - cellMap, coeffMap, cells); - } - } // baselines -} - -template <typename T_SAMPLE_PROCESSOR> -void equate2(const Location &start, const Location &end, size_t blIndex, - const vector<DPPP::DPBuffer> &obs, const JonesMatrix &sim, - const vector<pair<size_t, size_t> > &correlationMap, - const vector<Interval<size_t> > (&cellMap)[2], - const map<PValueKey, unsigned int> &coeffMap, - vector<Cell> &cells) -{ -// // can we somehow properly clear() if nUnkowns does not change? -// // instead of using set() which reallocates? - - const unsigned int nFreq = cellMap[FREQ][end.first].end - - cellMap[FREQ][start.first].start + 1; - const unsigned int nTime = cellMap[TIME][end.second].end - - cellMap[TIME][start.second].start + 1; - - double *reSim = 0, *imSim = 0; - vector<unsigned int> coeffIndex(coeffMap.size()); - vector<double> reDerivative(coeffMap.size()); - vector<double> imDerivative(coeffMap.size()); - vector<double*> reSimDerivative(coeffMap.size(), 0); - vector<double*> imSimDerivative(coeffMap.size(), 0); - - typedef vector<pair<size_t, size_t> >::const_iterator cr_iterator; - for(cr_iterator cr_it = correlationMap.begin(), cr_end = correlationMap.end(); - cr_it != cr_end; ++cr_it) - { - const Element element = sim.element(cr_it->second); - if(element.size() <= 1) - { - continue; - } - - const size_t nCoeff = element.size() - 1; - - // ----------------------------------------------------------------- - // Setup pointers and strides to access the model value and - // derivatives. - // ----------------------------------------------------------------- - Matrix sim(element.value()); - ASSERT(sim.isComplex() && sim.isArray() - && static_cast<unsigned int>(sim.nx()) == nFreq - && static_cast<unsigned int>(sim.ny()) == nTime); - sim.dcomplexStorage(reSim, imSim); - - size_t i = 0; - for(Element::const_iterator el_it = element.begin(), - el_end = element.end(); el_it != el_end; ++el_it, ++i) - { - // Look-up coefficient index for this coefficient. - map<PValueKey, unsigned int>::const_iterator coeff_it = - coeffMap.find(el_it->first); - ASSERT(coeff_it != coeffMap.end()); - coeffIndex[i] = coeff_it->second; - - // Get pointers to the real and imaginary part of the partial - // derivarive of the model with respect to this coefficient. - Matrix derivative(el_it->second); - ASSERT(derivative.isComplex() && derivative.isArray() - && static_cast<unsigned int>(derivative.nx()) == nFreq - && static_cast<unsigned int>(derivative.ny()) == nTime); - derivative.dcomplexStorage(reSimDerivative[i], imSimDerivative[i]); - } - - size_t offset[2]; - offset[FREQ] = cellMap[FREQ][start.first].start; - offset[TIME] = cellMap[TIME][start.second].start; - - vector<Cell>::iterator cell = cells.begin(); - for(CellIterator it(start, end); !it.atEnd(); ++it, ++cell) - { - if(cell->solver.isReady()) - { - // Skip cell if it is inactive (converged or failed). - continue; - } - - const Interval<size_t> &freqInterval = cellMap[FREQ][it->first]; - const Interval<size_t> &timeInterval = cellMap[TIME][it->second]; - - size_t index = (timeInterval.start - offset[TIME]) * nFreq - + (freqInterval.start - offset[FREQ]); - - for(size_t t = timeInterval.start; t <= timeInterval.end; ++t) - { - const DPPP::DPBuffer &buffer = obs[t]; - - for(size_t f = freqInterval.start; f <= freqInterval.end; ++f) - { - const bool &flagged = buffer.getFlags()(cr_it->first, f, blIndex); - if(!flagged) - { - for(size_t i = 0; i < nCoeff; ++i) - { - reDerivative[i] = reSimDerivative[i][index]; - imDerivative[i] = imSimDerivative[i][index]; - } - - const fcomplex &vis = buffer.getData()(cr_it->first, f, blIndex); - const float &weight = buffer.getWeights()(cr_it->first, f, blIndex); - - T_SAMPLE_PROCESSOR::process(*cell, weight, real(vis), - imag(vis), reSim[index], imSim[index], nCoeff, - &(reDerivative[0]), &(imDerivative[0]), - &(coeffIndex[0])); - } - - ++index; - } - - index -= (freqInterval.end - freqInterval.start + 1); - index += nFreq; - } - } - } -} - -void subtract2(vector<DPPP::DPBuffer> &buffer, - const vector<MeasurementExpr::Ptr> &models, - const vector<casa::Array<casa::DComplex> > &coeff, - unsigned int target, - unsigned int nsources, - const vector<pair<size_t, size_t> > &baselineMap, - const vector<pair<size_t, size_t> > &correlationMap) -{ - vector<JonesMatrix> sim(nsources); - - typedef vector<pair<size_t, size_t> >::const_iterator - index_map_iterator; - - for(index_map_iterator bl_it = baselineMap.begin(), - bl_end = baselineMap.end(); bl_it != bl_end; ++bl_it) - { - // Evaluate models. - for(unsigned int i = 0; i < nsources; ++i) - { - sim[i] = models[i]->evaluate(bl_it->second); - } - - // Mix - JonesMatrix mixed = mix(sim, coeff, target, nsources, bl_it->first); - - // Subtract. - for(index_map_iterator cr_it = correlationMap.begin(), - cr_end = correlationMap.end(); cr_it != cr_end; ++cr_it) - { - Matrix crMixed = mixed.element(cr_it->second).value(); - ASSERT(!crMixed.isNull()); - - const unsigned int nFreq = crMixed.nx(); - const unsigned int nTime = crMixed.ny(); - ASSERT(crMixed.isComplex() && crMixed.isArray()); - ASSERTSTR(nTime == buffer.size(), "nTime: " << nTime << " buffer size: " << buffer.size()); - - const double *mixed_re = 0, *mixed_im = 0; - crMixed.dcomplexStorage(mixed_re, mixed_im); - - for(vector<DPBuffer>::iterator buffer_it = buffer.begin(), - buffer_end = buffer.end(); buffer_it != buffer_end; - ++buffer_it) - { - casa::Cube<casa::Complex> &data = buffer_it->getData(); - ASSERT(data.shape()(1) == int(nFreq)); - - for(size_t i = 0; i < nFreq; ++i) - { - data(cr_it->first, i, bl_it->first) -= - makedcomplex(*mixed_re++, *mixed_im++); - } // frequency - } // time - } // correlations - } // baselines -} - -JonesMatrix mix(const vector<JonesMatrix> &in, - const vector<casa::Array<casa::DComplex> > &coeff, - unsigned int target, - unsigned int nsources, - unsigned int baseline) -{ - const unsigned int nFreq = coeff.front().shape()(3); - const unsigned int nTime = coeff.size(); - - ASSERT(nFreq >= 1 && nTime >= 1); - const Location start(0, 0); - const Location end(nFreq - 1, nTime - 1); - - Matrix out[4]; - for(unsigned int i = 0; i < nsources; ++i) - { - for(unsigned int correlation = 0; correlation < 4; ++correlation) - { - // Exchanged target and i, because we want the effect of - // direction i on the target direction. - Matrix weight = makeMixingFactor(coeff, start, end, baseline, - correlation, target, i); - - const Matrix sim = in[i].element(correlation).value(); - - ASSERTSTR(sim.nx() == weight.nx(), "sim: " << sim.nx() << " weight: " << weight.nx()); - ASSERTSTR(sim.ny() == weight.ny(), "sim: " << sim.ny() << " weight: " << weight.ny()); - if(out[correlation].isNull()) - { - out[correlation] = weight * sim; - } - else - { - out[correlation] += weight * sim; - } - } // correlations - } // nsources - - JonesMatrix result(out[0], out[1], out[2], out[3]); - result.setFlags(mergeFlags(in)); - return result; -} - -void mix(const vector<JonesMatrix> &in, vector<JonesMatrix> &out, - const vector<casa::Array<casa::DComplex> > &coeff, - const Location &start, const Location &end, unsigned int baseline) -{ - // dims array: ndir x nmodel x ncorr x nchan x nbl (minor -> major). - // better dims: nbl x ncorr x ndir x nmodel x nchan ??? - - const unsigned int nModels = in.size(); - const unsigned int nDirections = coeff[0].shape()[0]; - ASSERT(nDirections == out.size()); - ASSERT(int(nModels) == coeff[0].shape()[1]); - - FlagArray flags = mergeFlags(in); - - for(unsigned int i = 0; i < nDirections; ++i) - { - Element element[4]; - for(unsigned int j = 0; j < nModels; ++j) - { - for(unsigned int k = 0; k < 4; ++k) - { - Matrix factor = makeMixingFactor(coeff, start, end, - baseline, k, i, j); - - mixAndMerge(factor, in[j].element(k), element[k]); - } - } - - out[i] = JonesMatrix(element[0], element[1], element[2], - element[3]); - out[i].setFlags(flags); - } -} - -FlagArray mergeFlags(const vector<JonesMatrix> &in) -{ - vector<JonesMatrix>::const_iterator first = in.begin(); - vector<JonesMatrix>::const_iterator last = in.end(); - - for(; first != last && !first->hasFlags(); ++first) - { - } - - if(first == last) - { - return FlagArray(); - } - - FlagArray flags = first->flags().clone(); - ++first; - - for(; first != last; ++first) - { - if(first->hasFlags()) - { - flags |= first->flags(); - } - } - - return flags; -} - -void mixAndMerge(const Matrix &factor, const Element &in, Element &out) -{ - // Update value. - Matrix value = out.value(); - if(value.isNull()) - { - out.assign(factor * in.value()); - } - else - { - value += factor * in.value(); - } - - // Update partial derivatives. - Element::const_iterator inIter = in.begin(); - Element::const_iterator inEnd = in.end(); - - Element::iterator outIter = out.begin(); - Element::iterator outEnd = out.end(); - - while(inIter != inEnd && outIter != outEnd) - { - if(outIter->first == inIter->first) - { - outIter->second += factor * inIter->second; - ++inIter; - ++outIter; - } - else if(outIter->first < inIter->first) - { - ++outIter; - } - else - { - out.assign(inIter->first, factor * inIter->second); - ++inIter; - } - } - - while(inIter != inEnd) - { - out.assign(inIter->first, factor * inIter->second); - ++inIter; - } -} - -Matrix makeMixingFactor(const vector<casa::Array<casa::DComplex> > &coeff, - const Location &start, const Location &end, unsigned int baseline, - unsigned int correlation, unsigned int row, unsigned int column) -{ - const unsigned int nFreq = end.first - start.first + 1; - const unsigned int nTime = end.second - start.second + 1; - - Matrix factor(makedcomplex(0.0, 0.0), nFreq, nTime, false); - double *re = 0, *im = 0; - factor.dcomplexStorage(re, im); - - // dims coeff: ndir x nmodel x ncorr x nchan x nbl (minor -> major). - // nmodel = nr of directions with source model (thus excl. target) - casa::IPosition index(5, row, column, correlation, 0, baseline); - for(unsigned int t = start.second; t <= end.second; ++t) - { - const casa::Array<casa::DComplex> &tmp = coeff[t]; - ASSERTSTR(tmp.shape()(3) == int(nFreq), "nFreq: " - << nFreq << ' ' << tmp.shape()); - for(index(3) = start.first; index(3) <= static_cast<int>(end.first); - ++index(3)) - { - const casa::DComplex &weight = tmp(index); - *re++ = real(weight); - *im++ = imag(weight); - } - } - - return factor; -} - -template <typename T_SAMPLE_MODIFIER> -struct SampleProcessorComplex -{ - static inline void process(Cell &cell, double weight, double reObs, - double imObs, double reSim, double imSim, unsigned int nDerivative, - double *reDerivative, double *imDerivative, - const unsigned int *index) - { - // Modify the observed and simulated data depending on the solving - // mode (complex, phase only, amplitude only). - T_SAMPLE_MODIFIER::process(weight, reObs, imObs, reSim, imSim, - reDerivative, imDerivative, nDerivative); - - if(weight == 0.0) - { - return; - } - - // Compute the residual. - double reResidual = reObs - reSim; - double imResidual = imObs - imSim; - - // Update the normal equations. - cell.solver.makeNorm(nDerivative, index, reDerivative, weight, - reResidual); - cell.solver.makeNorm(nDerivative, index, imDerivative, weight, - imResidual); - } -}; - -void initCells(const Location &start, const Location &end, - const ParmGroup &solvables, size_t nCoeff, - const EstimateOptions &options, - vector<Cell> &cells) -{ - vector<Cell>::iterator cell = cells.begin(); - for(CellIterator it(start, end); !it.atEnd(); ++it, ++cell) - { - // Initalize LSQ solver. - cell->solver = casa::LSQFit(static_cast<casa::uInt>(nCoeff)); - configLSQSolver(cell->solver, options.lsqOptions()); - - // Initialize coefficients. - cell->coeff.resize(nCoeff); - loadCoeff(*it, solvables, cell->coeff.begin()); - } -} - -bool iterate(const Location &start, const Location &end, - const ParmGroup &solvables, const EstimateOptions &options, - vector<Cell> &cells) -{ - const size_t nCellFreq = end.first - start.first + 1; - const size_t nCellTime = end.second - start.second + 1; - const size_t nCell = nCellFreq * nCellTime; - - bool done = true; -#pragma omp parallel for - for(size_t i = 0; i < nCell; ++i) - { - Cell &cell = cells[i]; - - // If processing on the cell is already done, only update the status - // counts and continue to the next cell. - if(cell.solver.isReady()) - { - continue; - } - - // Perform a single iteration if the cell has not yet converged or - // failed. - // - // LSQFit::solveLoop() only returns false if the normal - // equations are singular. This can also be seen from the result - // of LSQFit::isReady(), so we don't update the iteration status - // here but do skip the update of the solvables. - casa::uInt rank; - if(cell.solver.solveLoop(rank, &(cell.coeff[0]), - options.lsqOptions().useSVD)) - { - // Store the updated coefficient values. - storeCoeff(Location(start.first + i % nCellFreq, start.second + i - / nCellFreq), solvables, cell.coeff.begin()); - } - - if(!cell.solver.isReady()) - { - done = false; - } - } - - return done; -} - -} // unnamed namespace - -} //# namespace BBS -} //# namespace LOFAR diff --git a/CEP/DP3/DPPP/src/Filter.cc b/CEP/DP3/DPPP/src/Filter.cc index 1021a26fd94..9b4bb455897 100644 --- a/CEP/DP3/DPPP/src/Filter.cc +++ b/CEP/DP3/DPPP/src/Filter.cc @@ -43,7 +43,16 @@ namespace LOFAR { itsName (prefix), itsStartChanStr (parset.getString(prefix+"startchan", "0")), itsNrChanStr (parset.getString(prefix+"nchan", "0")), - itsBaselines (parset, prefix) + itsBaselines (parset, prefix), + itsDoSelect (false) + {} + + Filter::Filter (DPInput* input, const BaselineSelection& baselines) + : itsInput (input), + itsStartChanStr ("0"), + itsNrChanStr ("0"), + itsBaselines (baselines), + itsDoSelect (false) {} Filter::~Filter() @@ -76,6 +85,7 @@ namespace LOFAR { } else { nrChan = std::min (nrChan, maxNrChan); } + itsDoSelect = itsStartChan>0 || nrChan<maxNrChan; // Handle possible baseline selection. if (itsBaselines.hasSelection()) { Matrix<bool> selbl(itsBaselines.apply (infoIn)); @@ -87,14 +97,19 @@ namespace LOFAR { itsSelBL.push_back (i); } } + if (itsSelBL.size() < ant1.size()) { + itsDoSelect = true; + } + } + if (itsDoSelect) { + // Update the DPInfo object. + info().update (itsStartChan, nrChan, itsSelBL); + // Shape the arrays in the buffer. + IPosition shape (3, infoIn.ncorr(), nrChan, getInfo().nbaselines()); + itsBuf.getData().resize (shape); + itsBuf.getFlags().resize (shape); + itsBuf.getWeights().resize (shape); } - // Update the DPInfo object. - info().update (itsStartChan, nrChan, itsSelBL); - // Shape the arrays in the buffer. - IPosition shape (3, infoIn.ncorr(), nrChan, getInfo().nbaselines()); - itsBuf.getData().resize (shape); - itsBuf.getFlags().resize (shape); - itsBuf.getWeights().resize (shape); } void Filter::show (std::ostream& os) const @@ -117,6 +132,17 @@ namespace LOFAR { bool Filter::process (const DPBuffer& buf) { itsTimer.start(); + if (!itsDoSelect) { + itsBuf = buf; // uses reference semantics + itsTimer.stop(); + getNextStep()->process (itsBuf); + return true; + } + // Make sure no other object references the DATA and UVW arrays. + itsBuf.getData().unique(); + itsBuf.getFlags().unique(); + itsBuf.getWeights().unique(); + itsBuf.getFullResFlags().unique(); // Get the various data arrays. RefRows rowNrs(buf.getRowNrs()); const Array<Complex>& data = buf.getData(); @@ -154,6 +180,7 @@ namespace LOFAR { } else { // Copy the data of the selected baselines and channels. itsBuf.getUVW().resize (IPosition(2, 3, getInfo().nbaselines())); + itsBuf.getUVW().unique(); Complex* toData = itsBuf.getData().data(); Bool* toFlag = itsBuf.getFlags().data(); Float* toWeight = itsBuf.getWeights().data(); diff --git a/CEP/DP3/DPPP/test/testdemixfilter b/CEP/DP3/DPPP/test/testdemixfilter new file mode 100755 index 00000000000..19532daaec3 --- /dev/null +++ b/CEP/DP3/DPPP/test/testdemixfilter @@ -0,0 +1,87 @@ +#!/bin/sh + +# This script tests if selection in a demix gives the same result as demixing +# a selection. + +# Make a selection of the MS (core stations only) +msselect in=L29067_SAP000_SB069_uv.MS out=demix.sel.ms baseline='CS*&' + +# Do simple averaging of the rest of the MS. +cat > demix.avg.ps <<EOF +msin = L29067_SAP000_SB069_uv.MS +msin.startchan = 2 +msin.nchan=60 +msin.baseline=!CS*& +msout=demix.avg.ms +msout.overwrite=true +steps=[avg] +avg.type=averager +avg.freqstep=30 +avg.timestep=5 +EOF +NDPPP demix.avg.ps + +# Do the demixing of the MS selection. +# Create an empty instrument model. +parmdbm <<EOF +create table='demix.inst.pdb1' +adddef gain values=1 +EOF + +cat > demix.sel.demix.ps <<EOF +msin = demix.sel.ms +msin.startchan = 2 +msin.nchan=60 +msout=demix.sel.demix.ms +msout.overwrite=true +steps=[demix] +demix.type=demixer +demix.subtractsources=[CasA,CygA] +#demix.targetsource=3C196 +demix.skymodel=sky.pdb +demix.instrumentmodel=demix.inst.pdb1 +demix.demixfreqstep=60 +demix.demixtimestep=10 +demix.freqstep=30 +demix.timestep=5 +demix.ntimechunk=4 +EOF +NDPPP demix.sel.demix.ps + +# Do the demixing of the entire MS using a selection. +# Create an empty instrument model. +parmdbm <<EOF +create table='demix.inst.pdb2' +adddef gain values=1 +EOF + +cat > demix.demixsel.ps <<EOF +msin = L29067_SAP000_SB069_uv.MS +msin.startchan = 2 +msin.nchan=60 +msout=demix.demixsel.ms +msout.overwrite=true +steps=[demix] +demix.type=demixer +demix.subtractsources=[CasA,CygA] +demix.skymodel=sky.pdb +demix.instrumentmodel=demix.inst.pdb2 +demix.baseline=CS*& +demix.demixfreqstep=60 +demix.demixtimestep=10 +demix.freqstep=30 +demix.timestep=5 +demix.ntimechunk=2 +EOF +NDPPP demix.demixsel.ps + +# Select the baselines from the last demix result and check if equal to first demix. +msselect in=demix.demixsel.ms out=demix.demixsel.sel.ms baseline='CS*&' +taql 'select t1.DATA,t2.DATA as td from demix.sel.demix.ms t1, demix.demixsel.sel.ms t2 where !all((isnan(t1.DATA) && isnan(t2.DATA)) or t1.DATA=t2.DATA) limit 10' +taql 'select t1.DATA,t2.DATA as td from demix.sel.demix.ms t1, demix.demixsel.sel.ms t2 where t1.ANTENNA1 != t2.ANTENNA1 or t1.ANTENNA2 != t2.ANTENNA2' + +# Select the non-demixed baselines from the last demix result and check if equal +# to the averaged selection. +msselect in=demix.demixsel.ms out=demix.demixsel.rest.ms baseline='!CS*&' +taql 'select t1.DATA,t2.DATA as td from demix.avg.ms t1, demix.demixsel.rest.ms t2 where !all((isnan(t1.DATA) && isnan(t2.DATA)) or t1.DATA=t2.DATA) limit 10' +taql 'select t1.DATA,t2.DATA as td from demix.avg.ms t1, demix.demixsel.rest.ms t2 where t1.ANTENNA1 != t2.ANTENNA1 or t1.ANTENNA2 != t2.ANTENNA2' diff --git a/CEP/GSM/bremen/cleanup.py b/CEP/GSM/bremen/cleanup.py index 693ea4d9b21..16473e3ef21 100755 --- a/CEP/GSM/bremen/cleanup.py +++ b/CEP/GSM/bremen/cleanup.py @@ -23,3 +23,7 @@ args = parser.parse_args() cm = GSMConnectionManager(use_monet=args.monetdb, database=args.database) cleanup_db(cm.get_connection()) +if args.monetdb: + print "MonetDB database %s cleaned" % args.database +else: + print "PostgreSQL database %s cleaned" % args.database diff --git a/CEP/GSM/bremen/recreate_tables.py b/CEP/GSM/bremen/recreate_tables.py index 8297d523ef0..7534f00cc2b 100755 --- a/CEP/GSM/bremen/recreate_tables.py +++ b/CEP/GSM/bremen/recreate_tables.py @@ -1,33 +1,52 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +""" +Tool to recreate all tables/procedures in the database. +""" import argparse import copy import re -import sys from os import path -import monetdb.sql as db -import monetdb.monetdb_exceptions as me -import psycopg2 -from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT +try: + import monetdb.sql as db + import monetdb.monetdb_exceptions as me + HAS_MONET = True +except ImportError: + HAS_MONET =False + +try: + import psycopg2 + from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT + HAS_POSTGRESQL = True +except ImportError: + HAS_POSTGRESQL = False import subprocess -""" -Tool to recreate all tables/procedures in the database. -""" +def re_sub(regexp, sub_to, sub_from, flags=0): + prog = re.compile(regexp, flags) + return prog.sub(sub_to, sub_from) class Recreator(object): + """ + Tool to recreate all tables/procedures in the database. + """ + + # all procedures to be recreated + PROCEDURES = ['fill_temp_assoc_kind'] + + # list of views to be recreated + VIEWS = ['v_catalog_info'] - PROCEDURES = ['fill_temp_assoc_kind'] # all procedures to be recreated - VIEWS = ['v_catalog_info'] # list of views - TABLES = [ 'frequencybands', 'datasets', 'images', 'extractedsources', - 'assocxtrsources', 'detections', + # list of tables to be recreated + TABLES = ['frequencybands', 'datasets', 'runs', 'images', + 'extractedsources', 'assocxtrsources', 'detections', 'runningcatalog', 'runningcatalog_fluxes', - 'temp_associations'] # list of tables to be recreated + 'temp_associations', 'image_stats'] def __init__(self, database="test", use_monet=True): self.monet = use_monet if use_monet: - db_port = 50000 + db_port = 52000 db_autocommit = True db_host = "localhost" db_dbase = database @@ -37,7 +56,8 @@ class Recreator(object): if use_monet: self.conn = db.connect(hostname=db_host, database=db_dbase, username=db_user, password=db_passwd, - port=db_port, autocommit=db_autocommit) + port=db_port, + autocommit=db_autocommit) else: connect = psycopg2.connect(host=db_host, user=db_user, database=db_dbase) @@ -50,11 +70,13 @@ class Recreator(object): """ if self.monet: cur = self.conn.cursor() - cur.execute("select count(*) from sys.tables where name = '%s';" + cur.execute( + "select count(*) from sys.tables where name = '%s';" % tab_name) else: cur = self.conn - cur.execute("select count(*) from pg_tables where tablename ='%s';" + cur.execute( + "select count(*) from pg_tables where tablename ='%s';" % tab_name) data = cur.fetchone() return data[0] == 1 @@ -68,12 +90,14 @@ class Recreator(object): self.conn.execute("drop table %s;" % tab_name) else: self.conn.execute("drop table %s cascade;" % tab_name) + self.conn.execute( + "drop sequence if exists seq_%s cascade;" % tab_name) print 'Table %s dropped' % tab_name # For MonetDB-PostgreSQL convertion. PG_SUBSTITUTOR = [ (r'next value for "(.*?)"', r"nextval('\1'::regclass)"), - (r'^create sequence .*?$', ''), + #(r'^create sequence (.*?)$', ''), (r'as integer', ''), (r' double ', ' double precision '), (r'current_timestamp\(\)', 'current_timestamp'), @@ -84,12 +108,12 @@ class Recreator(object): Prepare SQL code for MonetDB/PostgreSQL. Remove all comments, make necessary substitutions. """ - sql_lines = re.sub(r'/\*.*?\*/', '', sql_lines, flags=re.DOTALL) - sql_lines = re.sub(r'--.*$', '', sql_lines, flags=re.MULTILINE) + sql_lines = re_sub(r'/\*.*?\*/', '', sql_lines, flags=re.DOTALL) + sql_lines = re_sub(r'--.*$', '', sql_lines, flags=re.MULTILINE) if not self.monet: # Has to apply substitutions for PostgreSQL. for from_, to_ in self.PG_SUBSTITUTOR: - sql_lines = re.sub(from_, to_, sql_lines, + sql_lines = re_sub(from_, to_, sql_lines, flags=re.MULTILINE | re.IGNORECASE) return sql_lines @@ -101,11 +125,19 @@ class Recreator(object): print "Table %s recreated" % tab_name def create_view(self, view_name): + """ + Create a view with a given name. + """ self.run_sql_file("sql/create.view.%s.sql" % view_name) print "View %s recreated" % view_name - def create_procedure(self, tab_name): + """ + Create a procedure with a given name. + Procedure SQL is located in the project files: + sql/pg/create.procedure.NAME.sql (PostrgeSQL) or + sql/create.procedure.NAME.sql (MonetDB). + """ if self.monet: sql_file = open("sql/create.procedure.%s.sql" % tab_name, 'r') else: @@ -117,6 +149,9 @@ class Recreator(object): print "Procedure %s recreated" % tab_name def run_sql_file(self, filename): + """ + Execute SQL from file (with proper substitutions for psql. + """ sql_file = open(filename, 'r') sql_lines = ''.join(sql_file.readlines()) sql_lines = self.refactor_lines(sql_lines) @@ -124,31 +159,41 @@ class Recreator(object): def reload_frequencies(self): if self.monet: - self.conn.execute("copy into frequencybands from '%s';" % path.realpath('sql/tables/freq.dat')) + self.conn.execute("copy into frequencybands from '%s';" % + path.realpath('sql/tables/freq.dat')) else: - sp = subprocess.Popen(['psql', '-U', 'monetdb', - '-d', self.database, - '-c', "copy frequencybands from stdin delimiter '|' null 'null';"], - stdout=subprocess.PIPE, - stdin=subprocess.PIPE) + sp = subprocess.Popen(['psql', '-U', 'monetdb', + '-d', self.database, '-c', + "copy frequencybands " \ + "from stdin delimiter '|'" \ + " null 'null';"], + stdout=subprocess.PIPE, + stdin=subprocess.PIPE) for line in open('sql/tables/freq.dat', 'r').readlines(): sp.stdin.write(line) sp.communicate() print 'Frequencies loaded' def run(self): + error_set = [] + if HAS_MONET: + error_set.append(me.OperationalError) + if HAS_POSTGRESQL: + error_set.append(psycopg2.ProgrammingError) + error_set = tuple(error_set) try: for procedure in self.PROCEDURES: if self.monet: try: - self.conn.execute("drop procedure %s;" % procedure) + self.conn.execute("drop procedure %s;" % + procedure) print "drop procedure %s;" % procedure - except (psycopg2.ProgrammingError, me.OperationalError): + except error_set: pass for view in self.VIEWS: try: self.conn.execute("drop view %s;" % view) - except (psycopg2.ProgrammingError, me.OperationalError): + except error_set: pass print "drop view %s;" % view diff --git a/CEP/GSM/bremen/sql/create.procedure.fill_temp_assoc_kind.sql b/CEP/GSM/bremen/sql/create.procedure.fill_temp_assoc_kind.sql index 6310b2278b5..91e99be3970 100644 --- a/CEP/GSM/bremen/sql/create.procedure.fill_temp_assoc_kind.sql +++ b/CEP/GSM/bremen/sql/create.procedure.fill_temp_assoc_kind.sql @@ -1,54 +1,67 @@ --drop procedure fill_temp_assoc_kind; -create procedure fill_temp_assoc_kind() +create procedure fill_temp_assoc_kind(i_image_id int) begin update temp_associations set xtr_count = (select count(xtrsrc_id2) from temp_associations as ta - where ta.xtrsrc_id2 = temp_associations.xtrsrc_id2); + where ta.xtrsrc_id2 = temp_associations.xtrsrc_id2 + and ta.image_id = i_image_id) + where image_id = i_image_id; update temp_associations set run_count = (select count(runcat_id) from temp_associations as ta - where ta.runcat_id = temp_associations.runcat_id); + where ta.runcat_id = temp_associations.runcat_id + and ta.image_id = i_image_id) + where image_id = i_image_id; update temp_associations set kind = 1 where xtr_count = 1 - and run_count = 1; + and run_count = 1 + and image_id = i_image_id; update temp_associations set kind = 2 where xtr_count > 1 - and run_count = 1; + and run_count = 1 + and image_id = i_image_id; update temp_associations set kind = 3 where xtr_count = 1 - and run_count > 1; + and run_count > 1 + and image_id = i_image_id; update temp_associations set kind = 4 where xtr_count > 1 - and run_count > 1; + and run_count > 1 + and image_id = i_image_id; --complete groups update temp_associations set kind = 4 where kind <> 4 + and image_id = i_image_id and exists (select kind from temp_associations ta where ta.runcat_id = temp_associations.runcat_id - and kind = 4); + and ta.kind = 4 + and ta.image_id = i_image_id); update temp_associations set kind = 4 where kind <> 4 + and image_id = i_image_id and exists (select kind from temp_associations ta where ta.xtrsrc_id2 = temp_associations.xtrsrc_id2 - and kind = 4); + and ta.kind = 4 + and ta.image_id = i_image_id); update temp_associations set group_head_id = runcat_id where kind = 4 + and image_id = i_image_id and group_head_id is null; --extended sources merging @@ -56,6 +69,7 @@ update temp_associations set kind = 5 where lr_method = 3 and kind = 2 + and image_id = i_image_id and not exists (select r.band from runningcatalog r, temp_associations ta, @@ -67,6 +81,16 @@ update temp_associations and r.band = r2.band and r.stokes = r2.stokes and ta.kind = 2 + and ta.image_id = i_image_id and ta.lr_method = 3 ); + +insert into image_stats(image_id, run_id, kind, lr_method, value) +select t.image_id, run_id, kind, lr_method, count(*) + from temp_associations t, + images i + where i.imageid = i_image_id + and t.image_id = i_image_id +group by image_id, run_id, kind, lr_method; + end; diff --git a/CEP/GSM/bremen/sql/pg/create.procedure.fill_temp_assoc_kind.sql b/CEP/GSM/bremen/sql/pg/create.procedure.fill_temp_assoc_kind.sql index e8ca45baf8c..e65d5b8300f 100644 --- a/CEP/GSM/bremen/sql/pg/create.procedure.fill_temp_assoc_kind.sql +++ b/CEP/GSM/bremen/sql/pg/create.procedure.fill_temp_assoc_kind.sql @@ -2,57 +2,70 @@ -- DROP FUNCTION fill_temp_assoc_kind(); -CREATE OR REPLACE FUNCTION fill_temp_assoc_kind() +CREATE OR REPLACE FUNCTION fill_temp_assoc_kind(i_image_id int) RETURNS void AS $BODY$begin update temp_associations set xtr_count = (select count(xtrsrc_id2) from temp_associations as ta - where ta.xtrsrc_id2 = temp_associations.xtrsrc_id2); + where ta.xtrsrc_id2 = temp_associations.xtrsrc_id2 + and ta.image_id = i_image_id) + where image_id = i_image_id; update temp_associations set run_count = (select count(runcat_id) from temp_associations as ta - where ta.runcat_id = temp_associations.runcat_id); + where ta.runcat_id = temp_associations.runcat_id + and ta.image_id = i_image_id) + where image_id = i_image_id; update temp_associations set kind = 1 where xtr_count = 1 - and run_count = 1; + and run_count = 1 + and image_id = i_image_id; update temp_associations set kind = 2 where xtr_count > 1 - and run_count = 1; + and run_count = 1 + and image_id = i_image_id; update temp_associations set kind = 3 where xtr_count = 1 - and run_count > 1; + and run_count > 1 + and image_id = i_image_id; update temp_associations set kind = 4 where xtr_count > 1 - and run_count > 1; + and run_count > 1 + and image_id = i_image_id; --complete groups update temp_associations set kind = 4 where kind <> 4 + and image_id = i_image_id and exists (select kind from temp_associations ta where ta.runcat_id = temp_associations.runcat_id - and kind = 4); + and ta.image_id = i_image_id + and ta.kind = 4); update temp_associations set kind = 4 where kind <> 4 + and image_id = i_image_id and exists (select kind from temp_associations ta where ta.xtrsrc_id2 = temp_associations.xtrsrc_id2 - and kind = 4); + and ta.image_id = i_image_id + and ta.kind = 4); update temp_associations set group_head_id = runcat_id where kind = 4 + and image_id = i_image_id and group_head_id is null; --extended sources merging @@ -60,6 +73,7 @@ update temp_associations set kind = 5 where lr_method = 3 and kind = 2 + and image_id = i_image_id and not exists (select r.band from runningcatalog r, temp_associations ta, @@ -72,8 +86,19 @@ update temp_associations and r.stokes = r2.stokes and ta.kind = 2 and ta.lr_method = 3 + and ta.image_id = i_image_id ); + +insert into image_stats(image_id, run_id, kind, lr_method, value) +select t.image_id, run_id, kind, lr_method, count(*) + from temp_associations t, + images i + where i.imageid = i_image_id + and t.image_id = i_image_id +group by image_id, run_id, kind, lr_method; + end; + $BODY$ LANGUAGE plpgsql VOLATILE COST 100; diff --git a/CEP/GSM/bremen/sql/pg/indices.sql b/CEP/GSM/bremen/sql/pg/indices.sql index c893af3bbf5..34cff3b9fb9 100644 --- a/CEP/GSM/bremen/sql/pg/indices.sql +++ b/CEP/GSM/bremen/sql/pg/indices.sql @@ -1,17 +1,17 @@ CREATE INDEX i_assoc_extracted ON assocxtrsources USING btree (xtrsrc_id ); CREATE INDEX i_assoc_runcat ON assocxtrsources USING btree (runcat_id ); +CREATE INDEX i_run ON images USING btree (run_id); -CREATE INDEX i_extract_xyz ON extractedsources USING btree (x , y , z ); -CREATE INDEX i_image ON extractedsources USING btree (image_id ); -CREATE INDEX i_xtrsrc ON extractedsources USING btree (xtrsrcid ); - - -CREATE INDEX i_runcat_first ON runningcatalog USING btree (first_xtrsrc_id ); -CREATE INDEX i_runcat_xyz ON runningcatalog USING btree (x , y , z ); -CREATE INDEX i_runcat_id ON runningcatalog USING btree (runcatid, band, stokes); -CREATE INDEX i_runcat_parent ON runningcatalog USING btree (parent_runcat_id, band, stokes); -CREATE INDEX i_runcat_parent0 ON runningcatalog USING btree (parent_runcat_id) - +CREATE INDEX i_extract_xyz ON extractedsources USING btree (x , y , z ); +CREATE INDEX i_extract_image ON extractedsources USING btree (image_id ); +CREATE INDEX i_extract_xtrsrc ON extractedsources USING btree (xtrsrcid ); +CREATE INDEX i_extract_healpix ON extractedsources USING btree (healpix_zone ); +CREATE INDEX i_runcat_first ON runningcatalog USING btree (first_xtrsrc_id ); +CREATE INDEX i_runcat_xyz ON runningcatalog USING btree (x , y , z ); +CREATE INDEX i_runcat_id ON runningcatalog USING btree (runcatid, band, stokes); +CREATE INDEX i_runcat_parent ON runningcatalog USING btree (parent_runcat_id, band, stokes); +CREATE INDEX i_runcat_parent0 ON runningcatalog USING btree (parent_runcat_id); +CREATE INDEX i_runcat_healpix ON runningcatalog USING btree (healpix_zone ); diff --git a/CEP/GSM/bremen/sql/tables/create.table.detections.sql b/CEP/GSM/bremen/sql/tables/create.table.detections.sql index 949565ed585..f972a516209 100644 --- a/CEP/GSM/bremen/sql/tables/create.table.detections.sql +++ b/CEP/GSM/bremen/sql/tables/create.table.detections.sql @@ -3,7 +3,8 @@ * the detections from the sources extraction. */ CREATE TABLE detections - (image_id VARCHAR(64) NOT NULL + (run_id int NULL + ,image_name CHAR(64) NOT NULL ,lra double NOT NULL ,ldecl double NOT NULL ,lra_err double NOT NULL diff --git a/CEP/GSM/bremen/sql/tables/create.table.image_stats.sql b/CEP/GSM/bremen/sql/tables/create.table.image_stats.sql new file mode 100644 index 00000000000..310b69bc405 --- /dev/null +++ b/CEP/GSM/bremen/sql/tables/create.table.image_stats.sql @@ -0,0 +1,8 @@ +--table for image statistics +CREATE TABLE image_stats( + image_id int not null, + run_id int not null, + kind int not null, + lr_method int not null, + value int not null +); diff --git a/CEP/GSM/bremen/sql/tables/create.table.images.sql b/CEP/GSM/bremen/sql/tables/create.table.images.sql index 4e9f80cdede..c4af850b2da 100644 --- a/CEP/GSM/bremen/sql/tables/create.table.images.sql +++ b/CEP/GSM/bremen/sql/tables/create.table.images.sql @@ -25,24 +25,15 @@ CREATE TABLE images ,band INT NOT NULL ,stokes CHAR(1) NOT NULL DEFAULT 'I' ,imagename CHAR(64) NOT NULL --unique LOFAR image id - --,tau_time double NOT NULL - --,freq_eff double NOT NULL - --,freq_bw double NULL - --,taustart_ts TIMESTAMP NOT NULL - --,bmaj double NOT NULL - --,bmin double NOT NULL - --,bpa double NOT NULL ,centr_ra double NOT NULL ,centr_decl double NOT NULL ,fov_radius double null -- field of view size - --,x double NOT NULL - --,y double NOT NULL - --,z double NOT NULL ,url VARCHAR(120) NULL ,reprocessing INT NOT NULL DEFAULT 0 ,status int not null -- 0-created, 1-Ok, 2-removed from runningcatalog, 3-removed completely ,process_date timestamp not null default current_timestamp ,svn_version int null + ,run_id int not null ,PRIMARY KEY (imageid) --,FOREIGN KEY (ds_id) REFERENCES datasets (dsid) --,FOREIGN KEY (band) REFERENCES frequencybands (freqbandid) diff --git a/CEP/GSM/bremen/sql/tables/create.table.runs.sql b/CEP/GSM/bremen/sql/tables/create.table.runs.sql new file mode 100644 index 00000000000..36efcb73d65 --- /dev/null +++ b/CEP/GSM/bremen/sql/tables/create.table.runs.sql @@ -0,0 +1,10 @@ +CREATE SEQUENCE "seq_runs" AS INTEGER; + +CREATE TABLE runs ( + runid INT DEFAULT NEXT VALUE FOR "seq_runs", + start_date timestamp not null default current_timestamp, + end_date timestamp null, + status int null, --0-started, 1-finished, 2-broken + user_id char(100) not null, + process_id int not null +); diff --git a/CEP/GSM/bremen/sql/tables/create.table.temp_associations.sql b/CEP/GSM/bremen/sql/tables/create.table.temp_associations.sql index 41307387550..26d27ede6d7 100644 --- a/CEP/GSM/bremen/sql/tables/create.table.temp_associations.sql +++ b/CEP/GSM/bremen/sql/tables/create.table.temp_associations.sql @@ -12,6 +12,7 @@ create table temp_associations( ,kind int null -- 1: 1-1, 2: 1-n; 3: n-1; 4: n-n; 5: merge extended ,group_head_id int null ,flux_fraction double null + ,image_id int not null ,PRIMARY KEY (xtrsrc_id, runcat_id) diff --git a/CEP/GSM/bremen/src/bbsfilesource.py b/CEP/GSM/bremen/src/bbsfilesource.py index 74f44e4092f..28461a8e8af 100644 --- a/CEP/GSM/bremen/src/bbsfilesource.py +++ b/CEP/GSM/bremen/src/bbsfilesource.py @@ -52,15 +52,16 @@ class GSMBBSFileSource(object): 3.0, ]) - def __init__(self, file_id, filename, fileformat="default"): + def __init__(self, parset_id, run_id, filename, fileformat="default"): """ - :param file_id: Unique LOFAR image identificator. + :param parset_id: Unique LOFAR image identificator. :param filename: Name of the file on disk. :param fileformat: 'default' or 'test'. Test file format allows setting default values for columns. """ self.filename = filename - self.file_id = file_id + self.parset_id = parset_id + self.run_id = run_id self.fileformat = fileformat self.defaults = copy(self.DEFAULTS) self.sources = 0 @@ -94,44 +95,65 @@ class GSMBBSFileSource(object): answer[to_index] = line[from_index] return answer + def get_header_test(self, datafile): + """ + Get header for a 'test' data-format. + No comments are supported. First line is a list + of column-names or column default values, like: + ra ra_err=0.01 decl decl_err=0.01 + In the example above two columns (ra and decl) are taken from + the data, and for ra_err and decl_err a default value is taken. + """ + try: + header = datafile.readline().split('=', + 1)[1].strip(' ').lower().split(',') + for ind, head_parts in enumerate(header): + head_part = head_parts.split('=') + if len(head_part) != 1: # Default value is given + header[ind] = (head_part[0], + head_part[1].strip("'").strip()) + except IndexError: + raise SourceException('Wrong header in the first line' \ + ' of file %s' % self.filename) + return header + + def get_header_default(self, datafile): + """ + Get header for a 'default' data-format. + Comments should start with #. + List of columns should be in the header: + # RA DECL... + """ + line = datafile.readline() + while not (line.startswith('# Gaus_id') or + line.startswith("# RA")): + line = datafile.readline() + if not line: + raise SourceException('No header in file %s' % + self.filename) + return line[2:].strip().lower().split(' ') + def read_and_store_data(self, conn): """ Read all from the BBS file. """ - line = None header = None if not os.path.isfile(self.filename): raise SourceException('no file %s' % self.filename) datafile = open(self.filename, 'r') if self.fileformat == 'test': - try: - header = datafile.readline().split('=', - 1)[1].strip(' ').lower().split(',') - for ind, head_parts in enumerate(header): - head_part = head_parts.split('=') - if len(head_part) != 1: # Default value is given - header[ind] = (head_part[0], - head_part[1].strip("'").strip()) - except IndexError: - raise SourceException('Wrong header in the first line' \ - ' of file %s' % self.filename) + header = self.get_header_test(datafile) elif self.fileformat == 'default': - line = datafile.readline() - while not (line.startswith('# Gaus_id') or line.startswith("# RA")): - line = datafile.readline() - if not line: - raise SourceException('No header in file %s' % - self.filename) - header = line[2:].strip().lower().split(' ') + header = self.get_header_default(datafile) if not header: raise SourceException('No header in file %s' % self.filename) self.process_header(header) sql_data = [] # Switch off autocommit (if it is switched on) for better performance. - sql_insert = 'insert into detections (image_id, lra, ldecl, lra_err, '\ - 'ldecl_err, lf_peak, lf_peak_err, ' \ - 'lf_int, lf_int_err, ' \ + sql_insert = 'insert into detections (run_id, image_name, '\ + 'lra, ldecl, lra_err, ldecl_err,'\ + 'lf_peak, lf_peak_err, lf_int, lf_int_err, ' \ 'g_minor, g_minor_err, g_major, g_major_err,' \ 'g_pa, g_pa_err, ldet_sigma, healpix_zone) values' while True: @@ -144,10 +166,11 @@ class GSMBBSFileSource(object): continue self.sources = self.sources + 1 dhash = self.process_line(data_line.split()) - pix = hp.ang2pix(64, radians(90.-float(dhash[1])), + pix = hp.ang2pix(16, radians(90. - float(dhash[1])), radians(float(dhash[0])), nest=True) - sql_data.append("('%s', %s, %s )" % - (self.file_id, ','.join(dhash), pix)) + sql_data.append("(%s, '%s', %s, %s )" % + (self.run_id, self.parset_id, + ','.join(dhash), pix)) sql = "%s %s;" % (sql_insert, ',\n'.join(sql_data)) conn.execute(sql) self.log.info('%s sources loaded from %s' % (self.sources, diff --git a/CEP/GSM/bremen/src/gsmconnectionmanager.py b/CEP/GSM/bremen/src/gsmconnectionmanager.py index 99ec45f37ac..7a03e24e8ff 100644 --- a/CEP/GSM/bremen/src/gsmconnectionmanager.py +++ b/CEP/GSM/bremen/src/gsmconnectionmanager.py @@ -12,8 +12,8 @@ class GSMConnectionManager(object): """ DEFAULTS = { 'hostname': 'localhost', - 'port': 50000, - 'database': 'gsm', + 'port': 52000, + 'database': 'GSM', 'username': 'monetdb', 'password': 'monetdb', 'autocommit': True diff --git a/CEP/GSM/bremen/src/gsmlogger.py b/CEP/GSM/bremen/src/gsmlogger.py index a735bd15c1a..22ab18e779f 100644 --- a/CEP/GSM/bremen/src/gsmlogger.py +++ b/CEP/GSM/bremen/src/gsmlogger.py @@ -7,7 +7,11 @@ import os LOGGERS = {} -BASE_LOG_DIR = os.path.join(os.getenv('HOME'), 'prog', 'GSM') +import platform +if platform.node() == 'ldb001': + BASE_LOG_DIR = os.path.join(os.getenv('HOME'), 'GSM') +else: + BASE_LOG_DIR = os.path.join(os.getenv('HOME'), 'prog', 'GSM') USE_CONSOLE = False diff --git a/CEP/GSM/bremen/src/gsmparset.py b/CEP/GSM/bremen/src/gsmparset.py index a98b1a22738..1392744d9f3 100644 --- a/CEP/GSM/bremen/src/gsmparset.py +++ b/CEP/GSM/bremen/src/gsmparset.py @@ -13,6 +13,7 @@ from src.errors import ParsetContentError, SourceException, GSMException from src.bbsfilesource import GSMBBSFileSource from src.sqllist import get_sql, get_svn_version from src.gsmlogger import get_gsm_logger +from src.queries import sql_insert_run class GSMParset(object): @@ -24,6 +25,7 @@ class GSMParset(object): Read parset from a given file. """ self.filename = filename + self.run_id = None self.log = get_gsm_logger('parsets', 'import.log') if not path.isfile(filename): self.log.error('Parset file does not exist: %s' % filename) @@ -36,6 +38,7 @@ class GSMParset(object): self.parset_id = self.data.get('image_id') self.image_id = None # Not yet known. self.source_count = None + self.recalculate_pointing = False self.log.info('Parset opened: %s' % filename) def process(self, conn): @@ -49,51 +52,55 @@ class GSMParset(object): elif isinstance(sources, str): sources = sources.strip(' []').replace(' ', '').split(',') elif isinstance(sources, list): - sources = ','.join(sources).strip(' []').replace(' ', '').split(',') + sources = ','.join(sources).strip(' []' + ).replace(' ', '').split(',') if not self.parset_id: raise ParsetContentError('"image_id" missing') conn.start() + conn.execute(sql_insert_run()) + self.run_id = conn.exec_return(""" + select max(runid) from runs where status=0;""", + single_column=True) for source in sources: if self.data.get('bbs_format'): - bbsfile = GSMBBSFileSource(self.parset_id, + bbsfile = GSMBBSFileSource(self.parset_id, self.run_id, "%s/%s" % (self.path, source), self.data.get('bbs_format')) else: - bbsfile = GSMBBSFileSource(self.parset_id, - "%s/%s" % (self.path, source)) + bbsfile = GSMBBSFileSource(self.parset_id, self.run_id, + "%s/%s" % (self.path, source)) bbsfile.read_and_store_data(conn) loaded_sources = loaded_sources + bbsfile.sources self.image_id = self.save_image_info(conn) conn.commit() - self.log.info('%s sources loaded from parset %s' % (loaded_sources, - self.filename)) + self.log.info('%s sources loaded from parset %s' % ( + loaded_sources, self.filename)) self.source_count = loaded_sources return loaded_sources - - def get_image_size(self, min_decl, max_decl, min_ra, max_ra, + + def get_image_size(self, min_decl, max_decl, min_ra, max_ra, avg_decl, avg_ra): """ >>> t = GSMParset('tests/image1.parset') >>> t.get_image_size(1.0, 3.0, 1.0, 3.0, 2.0, 2.0) (1.0, 2.0, 2.0) >>> t.get_image_size(-4.0, 4.0, 1.0, 359.0, 0.0, 359.8) - (4.0, 0.0, -0.19999999999998863) + (4.0, 0.0, 0.0) """ if max_ra - min_ra > 250.0: # Field across zero-ra. Has to be shifted. # E.g. min = 0.1 max = 359.7 avg = 359.9 # transfers to: # min = -0.3 max = 0.1 avg = -0.1 - min_ra, max_ra = max_ra - 360.0, min_ra - if avg_ra > 250: - avg_ra = avg_ra - 360.0 + min_ra, max_ra = max_ra - 360.0, min_ra + avg_ra = 0.5 * (max_ra + min_ra) min_ra = min_ra * cos(avg_decl) max_ra = max_ra * cos(avg_decl) - return max( [ avg_decl - min_decl, max_decl - avg_decl, - avg_ra * cos(avg_decl) - min_ra, - max_ra - avg_ra * cos(avg_decl) ]), \ - avg_decl, avg_ra + return max([avg_decl - min_decl, max_decl - avg_decl, + avg_ra * cos(avg_decl) - min_ra, + max_ra - avg_ra * cos(avg_decl)]), \ + avg_decl, avg_ra def save_image_info(self, conn): """ @@ -106,28 +113,29 @@ class GSMParset(object): self.data.get('frequency'))) if not band or band == -1: raise SourceException( - 'No matching frequency band found for frequency %s' % + 'No matching frequency band found for frequency %s' % self.data.get('frequency')) - - if not self.data.has_key('pointing_ra') or \ - not self.data.has_key('pointing_decl') or \ - not self.data.has_key('beam_size'): + + if not 'pointing_ra' in self.data or \ + not 'pointing_decl' in self.data or \ + not 'beam_size' in self.data: data = conn.exec_return( - """select min(ldecl), max(ldecl), - min(lra), max(lra), - avg(ldecl), avg(lra) - from detections;""", single_column=False) + """select min(ldecl), max(ldecl), + min(lra), max(lra), + avg(ldecl), avg(lra) + from detections + where run_id = %s;""" % self.run_id, single_column=False) size, avg_decl, avg_ra = self.get_image_size(*data) + self.recalculate_pointing = True else: size = self.data.get('beam_size') avg_decl = self.data.get('pointing_decl') avg_ra = self.data.get('pointing_ra') - + conn.execute(get_sql('insert image', self.parset_id, band, - avg_ra, avg_decl, size, - get_svn_version())) + avg_ra, avg_decl, size, + get_svn_version(), self.run_id)) image_id = conn.exec_return(get_sql('get last image_id')) self.log.info('Image %s created' % image_id) return image_id - diff --git a/CEP/GSM/bremen/src/pipeline.py b/CEP/GSM/bremen/src/pipeline.py index 6d0eb2bdf0b..9106615aa22 100644 --- a/CEP/GSM/bremen/src/pipeline.py +++ b/CEP/GSM/bremen/src/pipeline.py @@ -3,7 +3,7 @@ import monetdb.sql as db from src.errors import SourceException, ImageStateError from src.gsmconnectionmanager import GSMConnectionManager from src.gsmlogger import get_gsm_logger -from src.sqllist import get_sql, get_svn_version +from src.sqllist import get_sql, get_svn_version, GLOBALS from src.grouper import Grouper from src.updater import run_update import logging @@ -15,7 +15,8 @@ class GSMPipeline(object): """ General pipeline class. """ - def __init__(self, custom_cm=None, use_monet=None, profile=False, + def __init__(self, custom_cm=None, use_monet=None, + profile=False, **params): """ @param custom_cm: allows to pass an object to be used as connection @@ -35,6 +36,7 @@ class GSMPipeline(object): if profile: self.conn.profile = True self.conn.log.setLevel(logging.DEBUG) + self.conn.commit() except db.Error as exc: self.log.error("Failed to connect: %s" % exc) raise exc @@ -66,9 +68,9 @@ class GSMPipeline(object): Process single parset file. """ self.conn.start() - self.conn.execute("delete from detections;") parset.process(self.conn) - self.process_image(parset.image_id) + self.parset = parset + self.process_image(parset.image_id, parset.run_id) self.log.info('Parset %s done.' % parset.filename) return parset.image_id @@ -92,63 +94,70 @@ class GSMPipeline(object): """ vector = healpy.ang2vec(math.radians(90.0 - centr_decl), math.radians(centr_ra)) - pixels = healpy.query_disc(64, vector, math.radians(fov_radius), + pixels = healpy.query_disc(16, vector, math.radians(fov_radius), inclusive=True, nest=True) return str(pixels.tolist())[1:-1] - def process_image(self, image_id, sources_loaded=False): + def update_image_pointing(self, image_id): + avg_x, avg_y, avg_z, count = self.conn.exec_return( + get_sql('Image properties selector', image_id), + single_column=False) + avg_x, avg_y, avg_z = avg_x / count, avg_y / count, avg_z / count + decl = math.asin(avg_z) + ra = math.atan2(avg_x, avg_y) + self.conn.execute(get_sql('Image properties updater', + ra, decl, image_id)) + + def process_image(self, image_id, run_id=None, sources_loaded=False): """ Process single image. @sources_loaded: True if there are records in the extractedsources already. """ self.conn.start() - status, band, stokes, fov_radius, centr_ra, centr_decl = \ + status, band, stokes, fov_radius, centr_ra, centr_decl, run_loaded = \ self.conn.exec_return(""" - select status, band, stokes, fov_radius, centr_ra, centr_decl + select status, band, stokes, fov_radius, centr_ra, centr_decl, run_id from images where imageid = %s;""" % image_id, single_column=False) + if not run_id: + run_id = run_loaded if status == 1: raise ImageStateError('Image %s in state 1 (Ok). Cannot process' % image_id) - self.conn.execute("delete from temp_associations;") - pix = self.get_pixels(centr_ra, centr_decl, fov_radius) + pix = self.get_pixels(centr_ra, centr_decl, fov_radius + 0.5) + GLOBALS.update({'i': image_id, 'r': run_id, + 'b': band, 's': stokes}) if not sources_loaded: - self.conn.execute(get_sql('insert_extractedsources', image_id)) - self.conn.execute(get_sql('insert dummysources', image_id)) + self.conn.execute(get_sql('insert_extractedsources')) + self.conn.execute(get_sql('insert dummysources')) self.conn.execute(get_sql('Associate point', - image_id, math.sin(0.025), 1.0, pix)) + math.sin(0.025), 1.0, pix)) self.conn.execute_set(get_sql('Associate extended', - image_id, math.sin(0.025), 0.5, - band, stokes, pix)) - self.conn.call_procedure("fill_temp_assoc_kind();") + math.sin(0.025), 0.5, pix)) + self.conn.call_procedure("fill_temp_assoc_kind(%s);" % image_id) # Process one-to-one associations; self.conn.execute(get_sql('add 1 to 1')) #process one-to-many associations; self.conn.execute(get_sql('add 1 to N')) self.conn.execute_set(get_sql('update flux_fraction')) #process many-to-one associations; - self.conn.execute_set(get_sql('add N to 1', band)) + self.conn.execute_set(get_sql('add N to 1')) #Process many-to-many; self.run_grouper() #updating runningcatalog - run_update(self.conn, 'update runningcatalog', image_id) - run_update(self.conn, 'update runningcatalog extended', image_id) - self.conn.execute(get_sql('update runningcatalog XYZ', image_id)) + run_update(self.conn, 'update runningcatalog') + run_update(self.conn, 'update runningcatalog extended') + self.conn.execute(get_sql('update runningcatalog XYZ')) #First update, then insert new (!!!) - run_update(self.conn, 'update runningcatalog_fluxes', - image_id) - self.conn.execute(get_sql('insert new bands for point sources', - image_id, band)) + run_update(self.conn, 'update runningcatalog_fluxes') + self.conn.execute(get_sql('insert new bands for point sources')) #inserting new sources - self.conn.execute_set(get_sql('Insert new sources', image_id)) - self.conn.execute_set(get_sql('Join extended', image_id)) + self.conn.execute_set(get_sql('Insert new sources')) + self.conn.execute_set(get_sql('Join extended')) #update image status and save current svn verion. - self.conn.execute(""" -update images - set status = 1, - process_date = current_timestamp, - svn_version = %s - where imageid = %s""" % (get_svn_version(), image_id)) + self.conn.execute_set(get_sql('Cleanup', get_svn_version())) + if self.parset.recalculate_pointing: + self.update_image_pointing(image_id) self.conn.commit() diff --git a/CEP/GSM/bremen/src/queries.py b/CEP/GSM/bremen/src/queries.py index 305537af1a7..dbeb72e393c 100644 --- a/CEP/GSM/bremen/src/queries.py +++ b/CEP/GSM/bremen/src/queries.py @@ -4,6 +4,7 @@ General query generator for GSM. """ import math import os +import pwd try: import pysvn @@ -26,6 +27,16 @@ def get_svn_version(): else: return -1 + +def sql_insert_run(): + """ + Returns a query to insert a new run. + """ + return """ +insert into runs(status, user_id, process_id) values (0, '%s', '%s'); +""" % (pwd.getpwuid(os.getuid())[0], os.getpid()) + + def makelistable(fn): """ Allows passing a list instead of the first string parameter. @@ -84,6 +95,7 @@ DEGREES(2.0 * ASIN(0.5*SQRT(({0}.x - {1}.x) * ({0}.x - {1}.x) ({0}.wm_g_major*{0}.wm_g_major + {1}.g_major*{1}.g_major) """.format(runcat_alias, extract_alias) + @makelistable def get_column_insert(column_alias, prefix=None): """ @@ -97,6 +109,7 @@ def get_column_insert(column_alias, prefix=None): {1}wm_{0}, {1}wm_{0}_err, {1}avg_w{0},{1}avg_weight_{0}""".format(column_alias, prefix) + @makelistable def get_column_insert_values(column_alias): """ @@ -105,6 +118,7 @@ def get_column_insert_values(column_alias): return """ {0},{0}_err, {0}/({0}_err*{0}_err), 1/({0}_err*{0}_err)""".format(column_alias) + @makelistable def get_column_update_total(column_alias, fluxes=False): """ @@ -128,6 +142,7 @@ def get_column_update_total(column_alias, fluxes=False): and a.runcat_id = {1}) """.format(column_alias, suffix) + @makelistable def get_column_update_second(column_alias): """ @@ -152,6 +167,7 @@ avg_w{0} = avg_w{0} + {1}/({2}*{2}), avg_weight_{0} = avg_weight_{0} + 1/({2}*{2})""".format(column_alias, new_value, new_weight) + def get_column_deduct(column_alias, new_value, new_weight): """ Updater for error-columns for single item ipdate. @@ -161,6 +177,7 @@ avg_w{0} = avg_w{0} - {1}/({2}*{2}), avg_weight_{0} = avg_weight_{0} - 1/({2}*{2})""".format(column_alias, new_value, new_weight) + def get_column_deduct_nonzero(column_alias, new_value, new_weight): """ Updater for error-columns for single item ipdate. @@ -207,18 +224,22 @@ def get_column_from(column_alias): """ Fills "SELECT" in the subquery for multiple update. """ - return """sum({0}/({0}_err*{0}_err)) as {0}_value, sum(1/({0}_err*{0}_err)) as {0}_weight""".format(column_alias) + return """ +sum({0}/({0}_err*{0}_err)) as {0}_value, +sum(1/({0}_err*{0}_err)) as {0}_weight""".format(column_alias) -def get_field(ra, decl, radius, band, stokes='I', min_flux=None): +def get_field(ra, decl, radius, band, stokes='I', min_flux=None, + min_datapoints=None): """ Create a query to get sources for a given fov in a given band. """ - def get_field_conditions(x, y, z, r, min_flux): + def get_field_conditions(x, y, z, r, min_flux, min_datapoints): + sql = '' if min_flux: sql = "\n and f.wm_f_peak > %s" % min_flux - else: - sql = '' + if min_datapoints: + sql = '%s\n and f.datapoints > %s' % (sql, min_datapoints) return """r.x * {0} + r.y * {1} + r.z * {2} > {3} and r.x between {0} - {3} and {0} + {3} and r.y between {1} - {3} and {1} + {3} @@ -251,7 +272,8 @@ select r.wm_ra as ra, r.wm_decl as decl, f.wm_f_peak and f.runcat_id = r.runcatid and f.stokes = '{1}' and f.band = {2} -""".format(get_field_conditions(x, y, z, r, min_flux), stokes, band) +""".format(get_field_conditions(x, y, z, r, min_flux, min_datapoints), + stokes, band) return sql diff --git a/CEP/GSM/bremen/src/reprocessor.py b/CEP/GSM/bremen/src/reprocessor.py index bf075c909c1..daa55fd26d2 100644 --- a/CEP/GSM/bremen/src/reprocessor.py +++ b/CEP/GSM/bremen/src/reprocessor.py @@ -1,5 +1,5 @@ #!/usr/bin/python -from src.sqllist import get_sql +from src.sqllist import get_sql, GLOBALS from src.updater import run_update from src.pipeline import GSMPipeline @@ -13,6 +13,7 @@ class Reprocessor(GSMPipeline): """ Remove all data from runningcatalog/runningcatalog_fluxes. """ + GLOBALS['i'] = image_id self.log.info('removing data from image %s' % image_id) self.conn.start() for sql in ['deduct runningcatalog', @@ -22,11 +23,10 @@ class Reprocessor(GSMPipeline): 'deduct runningcatalog_fluxes', 'deduct runningcatalog_fluxes non-zero']: run_update(self.conn, sql, image_id) - self.conn.execute(get_sql('deduct cleanup', image_id)) - self.conn.execute(get_sql('update runningcatalog XYZ', image_id)) + self.conn.execute(get_sql('deduct cleanup')) + self.conn.execute(get_sql('update runningcatalog XYZ')) if delete_observations: - self.conn.execute(get_sql('deduct remove extractedsources', - image_id)) + self.conn.execute(get_sql('deduct remove extractedsources')) image_status = 99 else: image_status = 2 @@ -42,12 +42,15 @@ update images Remove old and insert new data. Do not reload the data and do not touch extractedsources. """ + GLOBALS['i'] = image_id self.remove_image(image_id) self.process_image(image_id, sources_loaded=True) self.conn.execute(""" update images set reprocessing = reprocessing + 1 where imageid = %s""" % image_id) + self.conn.execute("delete from temp_associations where image_id = %s;" + % image_id) self.conn.commit() def full_reprocess_image(self, image_id, new_parset): @@ -57,6 +60,7 @@ update images New image_id will be created with the new parset, with the old image switched to status=99. """ + GLOBALS['i'] = image_id self.remove_image(image_id, delete_observations=True) self.run_parset(new_parset) self.conn.execute(""" diff --git a/CEP/GSM/bremen/src/spectra.py b/CEP/GSM/bremen/src/spectra.py index f0216d444e9..b4d01b4fcde 100644 --- a/CEP/GSM/bremen/src/spectra.py +++ b/CEP/GSM/bremen/src/spectra.py @@ -1,7 +1,29 @@ #!/usr/bin/python import numpy from copy import copy -from numpy.polynomial.polynomial import polyval + + +def _verify_versions(a, b): + a = map(int, a.split('.')) + b = map(int, b.split('.')) + for i, val in enumerate(a): + if b[i] < val: + return False + return True + +if _verify_versions('1.4.0', numpy.__version__): + print 'Using 1.4 version' + from numpy.polynomial.polynomial import polyval +else: + print 'Using substitute for 1.3 version' + from numpy import polyval as polyval_numpy + def polyval(x, args): + if not isinstance(args, list): + args = args.tolist() + pargs = copy(args) + pargs.reverse() + return polyval_numpy(pargs, x) + #Unused: #from scipy.stats import chi2 diff --git a/CEP/GSM/bremen/src/sqllist.py b/CEP/GSM/bremen/src/sqllist.py index 75a357d7134..37b7c6828ea 100644 --- a/CEP/GSM/bremen/src/sqllist.py +++ b/CEP/GSM/bremen/src/sqllist.py @@ -13,6 +13,11 @@ from src.queries import * SQL_LIST = {} +GLOBALS = {} + +def re_sub(regexp, sub_to, sub_from, count, flags=0): + prog = re.compile(regexp, flags) + return prog.sub(sub_to, sub_from, count=count) def _expand_value(value): """ @@ -23,7 +28,7 @@ def _expand_value(value): Expand $$..$$ by calculating value in $s. """ return str(eval(matchvalues.group(0)[2:-2])) - return re.sub(r'\$\$(.*?)\$\$', _expand_formula, value, count=0) + return re_sub(r'\$\$(.*?)\$\$', _expand_formula, value, count=0) def _load_from_sql_list(filename): @@ -49,6 +54,15 @@ def _load_from_sql_list(filename): sqls.close() +def _substitute_globals(sql): + def _substitute_global(matchvalue): + if matchvalue.group(0)[1:-1] in GLOBALS: + return str(GLOBALS[matchvalue.group(0)[1:-1]]) + else: + return '' + return re_sub(r'\[(.?)\]', _substitute_global, sql, count=0) + + def get_sql(name, *params): """ Returns an sql from the list by it's name with parameter substitution. @@ -56,9 +70,10 @@ def get_sql(name, *params): if not name in SQL_LIST: raise IndexError('Name %s not in sqllist.sql' % name) if (SQL_LIST[name].find('%') >= 0): - return SQL_LIST[name] % (params) + return_sql = SQL_LIST[name] % (params) else: - return SQL_LIST[name].format(*params) + return_sql = SQL_LIST[name].format(*params) + return _substitute_globals(return_sql) for sqlfile in ['sqllist.sql', diff --git a/CEP/GSM/bremen/src/sqllist.sql b/CEP/GSM/bremen/src/sqllist.sql index 3e4f725e4ba..a8bfd36284e 100644 --- a/CEP/GSM/bremen/src/sqllist.sql +++ b/CEP/GSM/bremen/src/sqllist.sql @@ -8,9 +8,36 @@ select max(imageid) from images; --#insert image insert into images (ds_id, tau, band, imagename, status, - centr_ra, centr_decl, fov_radius, svn_version) + centr_ra, centr_decl, fov_radius, svn_version, run_id) select 0, 1, {1}, '{0}' as imagename, 0, - {2}, {3}, {4}, {5} + {2}, {3}, {4}, {5}, {6} + +--#Cleanup +delete from detections where run_id = [r]; +delete from temp_associations where image_id = [i]; + +update runs + set status = 1, + end_date = current_timestamp + where runid = [r]; + +update images + set status = 1, + process_date = current_timestamp, + svn_version = {0} + where imageid = [i]; + +--#Image properties selector +select sum(x), sum(y), sum(z), count(*) + from extractedsources + where image_id = [i] + and xtrsrcid2 is null; + +--#Image properties updater +update images + set centr_ra = {0}, + centr_decl = {1} + where imageid = {2}; --#insert_extractedsources @@ -20,7 +47,7 @@ insert into extractedsources (image_id, zone, ra, decl, ra_err, decl_err, source_kind, g_minor, g_minor_err, g_major, g_major_err, g_pa, g_pa_err, healpix_zone) -select {0}, cast(floor(ldecl) as integer) as zone, lra, ldecl, lra_err, ldecl_err, +select [i], cast(floor(ldecl) as integer) as zone, lra, ldecl, lra_err, ldecl_err, cos(radians(ldecl))*cos(radians(lra)), cos(radians(ldecl))*sin(radians(lra)), sin(radians(ldecl)), 3.0, lf_peak, lf_peak_err, lf_int, lf_int_err, @@ -31,7 +58,8 @@ select {0}, cast(floor(ldecl) as integer) as zone, lra, ldecl, lra_err, ldecl_er from detections where lf_int_err > 0 and lf_int > 0 - and lf_peak_err > 0; + and lf_peak_err > 0 + and run_id = [r]; --#insert dummysources @@ -48,7 +76,7 @@ select image_id, zone, ra - 360.0, decl, ra_err, decl_err, g_minor, g_minor_err, g_major, g_major_err, g_pa, g_pa_err, xtrsrcid, healpix_zone from extractedsources - where image_id = {0} + where image_id = [i] and ra > 360 - 1/cos(radians(decl)) and ra > 180 union @@ -59,7 +87,7 @@ select image_id, zone, ra + 360.0, decl, ra_err, decl_err, g_minor, g_minor_err, g_major, g_major_err, g_pa, g_pa_err, xtrsrcid, healpix_zone from extractedsources - where image_id = {0} + where image_id = [i] and ra < 1/cos(radians(decl)) and ra < 180; @@ -70,8 +98,10 @@ update temp_associations from extractedsources e, temp_associations ta where e.xtrsrcid = ta.xtrsrc_id + and ta.image_id = [i] and ta.runcat_id = temp_associations.runcat_id) where kind = 3 + and image_id = [i] and lr_method < 3; update temp_associations @@ -79,9 +109,11 @@ update temp_associations from extractedsources e, temp_associations ta where e.xtrsrcid = ta.xtrsrc_id + and ta.image_id = [i] and ta.xtrsrc_id = temp_associations.xtrsrc_id and ta.runcat_id = temp_associations.runcat_id) where kind = 3 + and image_id = [i] and lr_method < 3; --#add 1 to 1 @@ -91,12 +123,14 @@ insert into assocxtrsources(xtrsrc_id, runcat_id, distance_arcsec, lr_method, r) select ta.xtrsrc_id, ta.runcat_id, ta.distance_arcsec, ta.lr_method, ta.r from temp_associations ta where kind = 1 + and image_id = [i] union select ta.xtrsrc_id, r.parent_runcat_id, ta.distance_arcsec, 3, ta.r from temp_associations ta, runningcatalog r where ta.kind = 1 and ta.lr_method = 2 + and ta.image_id = [i] and r.runcatid = ta.runcat_id; @@ -108,9 +142,11 @@ insert into assocxtrsources(xtrsrc_id, runcat_id, distance_arcsec, lr_method, r) select ta.xtrsrc_id, ta.runcat_id, ta.distance_arcsec, ta.lr_method, ta.r from temp_associations ta where ta.kind = 2 + and ta.image_id = [i] and ta.distance_arcsec = (select min(tb.distance_arcsec) from temp_associations tb where tb.xtrsrc_id = ta.xtrsrc_id + and tb.image_id = [i] and tb.kind = 2 ) union @@ -118,11 +154,13 @@ select ta.xtrsrc_id, r.parent_runcat_id, ta.distance_arcsec, ta.lr_method, ta.r from temp_associations ta, runningcatalog r where ta.kind = 2 + and ta.image_id = [i] and r.runcatid = ta.runcat_id and r.band is not null and ta.distance_arcsec = (select min(tb.distance_arcsec) from temp_associations tb where tb.xtrsrc_id = ta.xtrsrc_id + and tb.image_id = [i] and tb.kind = 2 ); @@ -138,12 +176,14 @@ select e.xtrsrcid, 1, zone, from extractedsources e, temp_associations ta where ta.xtrsrc_id = e.xtrsrcid + and ta.image_id = [i] and ta.kind = 3 and ta.lr_method = 1 and ta.xtrsrc_id not in (select tx.min_id from (select tb.runcat_id, min(tb.xtrsrc_id) as min_id from temp_associations tb where tb.kind = 3 + and tb.image_id = [i] group by tb.runcat_id) tx); --extended sources - per-band match @@ -161,11 +201,13 @@ select r.band, r.stokes, r.parent_runcat_id, where ta.xtrsrc_id = e.xtrsrcid and ta.kind = 3 and ta.lr_method = 2 + and ta.image_id = [i] and r.runcatid = ta.runcat_id and ta.xtrsrc_id not in (select tx.min_id from (select tb.runcat_id, min(tb.xtrsrc_id) as min_id from temp_associations tb where tb.kind = 3 + and tb.image_id = [i] group by tb.runcat_id) tx); --extended sources - cross-band match @@ -182,6 +224,7 @@ select i.band, i.stokes, ta.runcat_id, images i where ta.xtrsrc_id = e.xtrsrcid and ta.kind = 3 + and ta.image_id = [i] and ta.lr_method = 3 and i.imageid = e.image_id; @@ -195,6 +238,7 @@ select r.runcatid, r.band, r.stokes, 1, where ta.xtrsrc_id = e.xtrsrcid and r.first_xtrsrc_id = e.xtrsrcid and r.parent_runcat_id is not null + and ta.image_id = [i] and ta.kind = 3 and ta.lr_method = 3; @@ -209,6 +253,7 @@ select a.xtrsrc_id, r.runcatid, $$get_distance('r', 'e')$$, 4, 0.0, a.weight*ta. runningcatalog r where a.runcat_id = ta.runcat_id and e.xtrsrcid = a.xtrsrc_id + and ta.image_id = [i] and r.first_xtrsrc_id = ta.xtrsrc_id and not r.deleted and ta.kind = 3; @@ -219,7 +264,8 @@ select ta.xtrsrc_id, r.runcatid, 0.0, ta.lr_method, 0.0 from temp_associations ta, runningcatalog r where r.first_xtrsrc_id = ta.xtrsrc_id - and (r.band is null or r.band = {0}) + and (r.band is null or r.band = [b]) + and ta.image_id = [i] and ta.runcat_id <> r.runcatid --not to the old sources(!!!) and ta.kind = 3; @@ -234,11 +280,13 @@ select e.xtrsrcid, ta.runcat_id, where ta.kind = 3 and ta.xtrsrc_id = e.xtrsrcid and not r.deleted + and ta.image_id = [i] and r.runcatid = ta.runcat_id and ta.xtrsrc_id in (select tx.min_id from (select tb.runcat_id, min(tb.xtrsrc_id) as min_id from temp_associations tb where tb.kind = 3 + and tb.image_id = [i] group by tb.runcat_id) tx) union select e.xtrsrcid, r.parent_runcat_id, @@ -248,6 +296,7 @@ select e.xtrsrcid, r.parent_runcat_id, temp_associations ta, runningcatalog r where ta.kind = 3 + and ta.image_id = [i] and ta.xtrsrc_id = e.xtrsrcid and not r.deleted and r.source_kind = 1 @@ -262,6 +311,7 @@ select e.xtrsrcid, r.runcatid, runningcatalog r where ta.kind = 3 and ta.xtrsrc_id = e.xtrsrcid + and ta.image_id = [i] and not r.deleted and r.source_kind = 1 and r.runcatid = ta.runcat_id @@ -277,6 +327,7 @@ SET weight = weight * (SELECT ta.flux_fraction AND ta.xtrsrc_id = a.xtrsrc_id AND r.first_xtrsrc_id <> ta.xtrsrc_id AND r.runcatid = ta.runcat_id + and ta.image_id = [i] AND ta.lr_method < 3 AND ta.kind = 3) WHERE EXISTS (SELECT ta.flux_fraction @@ -288,6 +339,7 @@ WHERE EXISTS (SELECT ta.flux_fraction AND r.first_xtrsrc_id <> ta.xtrsrc_id AND r.runcatid = ta.runcat_id AND ta.lr_method < 3 + and ta.image_id = [i] AND ta.kind = 3); --update old fluxes with new weights @@ -298,8 +350,9 @@ update runningcatalog_fluxes temp_associations ta where e.xtrsrcid = ta.xtrsrc_id and ta.runcat_id = runningcatalog_fluxes.runcat_id + and ta.image_id = [i] and ta.kind = 3) - and band <> {0}; + and band <> [b]; update runningcatalog_fluxes set $$get_column_update_second(['f_peak', 'f_int'])$$ @@ -308,8 +361,9 @@ update runningcatalog_fluxes temp_associations ta where e.xtrsrcid = ta.xtrsrc_id and ta.runcat_id = runningcatalog_fluxes.runcat_id + and ta.image_id = [i] and ta.kind = 3) - and band <> {0}; + and band <> [b]; --insert old fluxes for new sources insert into runningcatalog_fluxes(runcat_id, band, datapoints, @@ -327,5 +381,6 @@ select r.runcatid, f.band, f.datapoints, temp_associations ta where ta.runcat_id = f.runcat_id and ta.xtrsrc_id = r.first_xtrsrc_id - and f.band <> {0} + and ta.image_id = [i] + and f.band <> [b] and ta.kind = 3 ; diff --git a/CEP/GSM/bremen/src/sqllist_associate.sql b/CEP/GSM/bremen/src/sqllist_associate.sql index feef4e9c089..967a6930aa2 100644 --- a/CEP/GSM/bremen/src/sqllist_associate.sql +++ b/CEP/GSM/bremen/src/sqllist_associate.sql @@ -1,24 +1,26 @@ --#Associate point INSERT INTO temp_associations (xtrsrc_id, xtrsrc_id2, runcat_id, distance_arcsec, - lr_method, r, group_head_id) + lr_method, r, group_head_id, image_id) SELECT e.xtrsrcid, coalesce(e.xtrsrcid2, e.xtrsrcid), rc.runcatid, $$get_distance('rc', 'e')$$ AS assoc_distance_arcsec, 1, $$get_assoc_r('rc', 'e')$$ as assoc_r, - rc.group_head_id + rc.group_head_id, [i] FROM runningcatalog rc ,extractedsources e - WHERE e.image_id = {0} - and rc.x between e.x - {1} and e.x + {1} - and rc.y between e.y - {1} and e.y + {1} - and rc.z between e.z - {1} and e.z + {1} + ,images i + WHERE e.image_id = [i] + and i.imageid = [i] + and rc.x between e.x - {0} and e.x + {0} + and rc.y between e.y - {0} and e.y + {0} + and rc.z between e.z - {0} and e.z + {0} and e.source_kind = 0 and rc.source_kind = 0 and not rc.deleted - and rc.healpix_zone in ({3}) - AND rc.decl_zone BETWEEN e.zone - cast(0.025 as integer) - AND e.zone + cast(0.025 as integer) - AND $$get_assoc_r('rc', 'e')$$ < {2}; + AND rc.decl_zone BETWEEN CAST(FLOOR(e.decl - i.fov_radius) AS INTEGER) + AND CAST(FLOOR(e.decl + i.fov_radius) AS INTEGER) + and rc.healpix_zone in ({2}) + AND $$get_assoc_r('rc', 'e')$$ < {1}; --#Associate extended @@ -26,52 +28,56 @@ $$get_assoc_r('rc', 'e')$$ as assoc_r, --first associate per-band INSERT INTO temp_associations (xtrsrc_id, xtrsrc_id2, runcat_id, distance_arcsec, - lr_method, r, group_head_id) + lr_method, r, group_head_id, image_id) SELECT e.xtrsrcid, e.xtrsrcid, rc.runcatid, $$get_distance('rc', 'e')$$ AS assoc_distance_arcsec, 2, $$get_assoc_r_extended('rc', 'e')$$ as assoc_r, - rc.group_head_id + rc.group_head_id, [i] FROM runningcatalog rc ,extractedsources e - WHERE e.image_id = {0} - and rc.x between e.x - {1} and e.x + {1} - and rc.y between e.y - {1} and e.y + {1} - and rc.z between e.z - {1} and e.z + {1} + ,images i + WHERE e.image_id = [i] + and i.imageid = [i] + and rc.x between e.x - {0} and e.x + {0} + and rc.y between e.y - {0} and e.y + {0} + and rc.z between e.z - {0} and e.z + {0} and e.source_kind = 1 and rc.source_kind = 1 - and rc.band = {3} - and rc.stokes = '{4}' - and rc.healpix_zone in ({5}) + and rc.band = [b] + and rc.stokes = '[s]' + AND rc.decl_zone BETWEEN CAST(FLOOR(e.decl - i.fov_radius) AS INTEGER) + AND CAST(FLOOR(e.decl + i.fov_radius) AS INTEGER) + and rc.healpix_zone in ({2}) and not rc.deleted and e.xtrsrcid2 is null - AND rc.decl_zone BETWEEN e.zone - cast(0.025 as integer) - AND e.zone + cast(0.025 as integer) - AND $$get_assoc_r_extended('rc', 'e')$$ < {2}; + AND $$get_assoc_r_extended('rc', 'e')$$ < {1}; --if no match was found for this band, then use cross-band source. INSERT INTO temp_associations (xtrsrc_id, xtrsrc_id2, runcat_id, distance_arcsec, - lr_method, r, group_head_id) + lr_method, r, group_head_id, image_id) SELECT e.xtrsrcid, e.xtrsrcid, rc.runcatid, $$get_distance('rc', 'e')$$ AS assoc_distance_arcsec, 3, $$get_assoc_r_extended('rc', 'e')$$ as assoc_r, - rc.group_head_id + rc.group_head_id, [i] FROM runningcatalog rc ,extractedsources e - WHERE e.image_id = {0} - and rc.x between e.x - {1} and e.x + {1} - and rc.y between e.y - {1} and e.y + {1} - and rc.z between e.z - {1} and e.z + {1} + ,images i + WHERE e.image_id = [i] + and i.imageid = [i] + and rc.x between e.x - {0} and e.x + {0} + and rc.y between e.y - {0} and e.y + {0} + and rc.z between e.z - {0} and e.z + {0} and e.source_kind = 1 and rc.source_kind = 1 and rc.band is null and rc.stokes is null and not rc.deleted and e.xtrsrcid2 is null - and rc.healpix_zone in ({5}) - AND rc.decl_zone BETWEEN e.zone - cast(0.025 as integer) - AND e.zone + cast(0.025 as integer) + AND rc.decl_zone BETWEEN CAST(FLOOR(e.decl - i.fov_radius) AS INTEGER) + AND CAST(FLOOR(e.decl + i.fov_radius) AS INTEGER) + and rc.healpix_zone in ({2}) and not exists (select ta.runcat_id from temp_associations ta where ta.xtrsrc_id = e.xtrsrcid) - AND $$get_assoc_r_extended('rc', 'e')$$ < {2}; + AND $$get_assoc_r_extended('rc', 'e')$$ < {1}; diff --git a/CEP/GSM/bremen/src/sqllist_deduct.sql b/CEP/GSM/bremen/src/sqllist_deduct.sql index f787f6f7491..b583c1559bf 100644 --- a/CEP/GSM/bremen/src/sqllist_deduct.sql +++ b/CEP/GSM/bremen/src/sqllist_deduct.sql @@ -9,7 +9,7 @@ update runningcatalog and runningcatalog.runcatid = a.runcat_id and runningcatalog.group_head_id is null and runningcatalog.source_kind = 0 - and e.image_id = {0}; + and e.image_id = [i]; --#deduct runningcatalog non-zero update runningcatalog @@ -22,7 +22,7 @@ update runningcatalog and runningcatalog.group_head_id is null and runningcatalog.source_kind = 0 and runningcatalog.datapoints <> 0 - and e.image_id = {0}; + and e.image_id = [i]; --#deduct runningcatalog extended @@ -38,7 +38,7 @@ update runningcatalog and r.runcatid = a.runcat_id and r.group_head_id is null and r.source_kind <> 0 - and e.image_id = {0} + and e.image_id = [i] group by runcatid) as y where y.runcatid = runningcatalog.runcatid; @@ -52,7 +52,7 @@ update runningcatalog and runningcatalog.group_head_id is null and runningcatalog.source_kind <> 0 and runningcatalog.datapoints <> 0 - and e.image_id = {0}; + and e.image_id = [i]; --#deduct runningcatalog_fluxes update runningcatalog_fluxes @@ -66,7 +66,7 @@ update runningcatalog_fluxes runningcatalog_fluxes f where a.xtrsrc_id = e.xtrsrcid and f.runcat_id = a.runcat_id - and e.image_id = {0} + and e.image_id = [i] and e.image_id = i.imageid and a.lr_method <> 5 --not a group association and f.band = i.band @@ -88,17 +88,17 @@ update runningcatalog_fluxes and runningcatalog_fluxes.band = i.band and i.imageid = e.image_id and runningcatalog_fluxes.datapoints <> 0 - and e.image_id = {0}; + and e.image_id = [i]; --#deduct cleanup delete from assocxtrsources where exists (select 1 from extractedsources e - where e.image_id = {0} + where e.image_id = [i] and e.xtrsrcid = assocxtrsources.xtrsrc_id); --#deduct remove extractedsources delete from extractedsources - where image_id = {0} + where image_id = [i] and not exists (select 1 from assocxtrsources a where a.xtrsrc_id = extractedsources.xtrsrcid); diff --git a/CEP/GSM/bremen/src/sqllist_group.sql b/CEP/GSM/bremen/src/sqllist_group.sql index 37abcd66338..0a1b85c5a65 100644 --- a/CEP/GSM/bremen/src/sqllist_group.sql +++ b/CEP/GSM/bremen/src/sqllist_group.sql @@ -1,12 +1,14 @@ --#GroupFinder select xtrsrc_id, runcat_id, group_head_id from temp_associations - where kind = 4; + where kind = 4 + and image_id = [i]; --#GroupUpdate update temp_associations set group_head_id = {0} where kind = 4 + and image_id = [i] and runcat_id in ({1}); update runningcatalog @@ -18,4 +20,6 @@ update runningcatalog insert into assocxtrsources(xtrsrc_id, runcat_id, distance_arcsec, lr_method, r) select xtrsrc_id, runcat_id, distance_arcsec, 5, r from temp_associations - where kind = 4; + where kind = 4 + and image_id = [i] +; diff --git a/CEP/GSM/bremen/src/sqllist_join.sql b/CEP/GSM/bremen/src/sqllist_join.sql index 175b0975b70..09c6915e887 100644 --- a/CEP/GSM/bremen/src/sqllist_join.sql +++ b/CEP/GSM/bremen/src/sqllist_join.sql @@ -7,11 +7,13 @@ update runningcatalog temp_associations tt where ta.runcat_id = runningcatalog.parent_runcat_id and ta.xtrsrc_id = tt.xtrsrc_id + and ta.image_id = [i] and ta.kind = 5), last_update_date = current_timestamp where exists (select ta.kind from temp_associations ta where ta.runcat_id = runningcatalog.parent_runcat_id + and ta.image_id = [i] and ta.kind = 5) and parent_runcat_id is not null; @@ -22,10 +24,12 @@ update assocxtrsources temp_associations tt where ta.runcat_id = assocxtrsources.runcat_id and ta.xtrsrc_id = tt.xtrsrc_id + and ta.image_id = [i] and ta.kind = 5) where exists (select ta.kind from temp_associations ta where ta.runcat_id = assocxtrsources.runcat_id + and ta.image_id = [i] and ta.kind = 5); --mark obsolete sources as deleted @@ -35,6 +39,7 @@ update runningcatalog where exists (select ta.kind from temp_associations ta where ta.runcat_id = runningcatalog.runcatid + and ta.image_id = [i] and ta.kind = 5) and not exists (select a.lr_method from assocxtrsources a @@ -46,6 +51,7 @@ update runningcatalog where exists (select ta.kind from temp_associations ta where ta.runcat_id = runningcatalog.runcatid + and ta.image_id = [i] and ta.kind = 5) and exists (select a.lr_method from assocxtrsources a @@ -62,12 +68,13 @@ select i.band, i.stokes, e.xtrsrcid, 1, zone, images i, temp_associations ta, runningcatalog r - where e.image_id = {0} - and i.imageid = e.image_id + where e.image_id = [i] + and i.imageid = [i] and e.source_kind = 1 and e.xtrsrcid = ta.xtrsrc_id and ta.kind = 5 --there is only one association and ta.lr_method = 3 --this indicates that there is a cross-band association + and ta.image_id = [i] and r.runcatid = ta.runcat_id and not r.deleted order by e.xtrsrcid; @@ -79,6 +86,7 @@ select xtrsrc_id, r.runcatid, 0, 4, 0, 0 from temp_associations ta, runningcatalog r where ta.kind = 5 + and ta.image_id = [i] and r.parent_runcat_id = ta.runcat_id and r.first_xtrsrc_id = ta.xtrsrc_id union @@ -86,6 +94,7 @@ select xtrsrc_id, r.parent_runcat_id, 0, 4, 0, 0 from temp_associations ta, runningcatalog r where ta.kind = 5 + and ta.image_id = [i] and r.parent_runcat_id = ta.runcat_id and r.first_xtrsrc_id = ta.xtrsrc_id; @@ -98,12 +107,13 @@ select r.runcatid, i.band, 1, images i, runningcatalog r, temp_associations ta - where e.image_id = {0} + where e.image_id = [i] and i.imageid = e.image_id and r.first_xtrsrc_id = e.xtrsrcid and r.band is not null --this is not a cross-band source and ta.runcat_id = r.parent_runcat_id and ta.xtrsrc_id = e.xtrsrcid + and ta.image_id = [i] and ta.kind = 5; update runningcatalog @@ -112,6 +122,11 @@ update runningcatalog where a.runcat_id = runningcatalog.runcatid), $$get_column_update_total(['ra', 'decl', 'g_minor', 'g_major', 'g_pa'])$$ where not deleted + and exists (select ta.kind + from temp_associations ta + where ta.runcat_id = runningcatalog.runcatid + and ta.image_id = [i] + and ta.kind = 5) and source_kind = 4; update runningcatalog @@ -119,4 +134,9 @@ update runningcatalog last_update_date = current_timestamp, source_kind = 1 where not deleted + and exists (select ta.kind + from temp_associations ta + where ta.runcat_id = runningcatalog.runcatid + and ta.image_id = [i] + and ta.kind = 5) and source_kind = 4; diff --git a/CEP/GSM/bremen/src/sqllist_new.sql b/CEP/GSM/bremen/src/sqllist_new.sql index 05b6a9f99ac..c0f397cf74a 100644 --- a/CEP/GSM/bremen/src/sqllist_new.sql +++ b/CEP/GSM/bremen/src/sqllist_new.sql @@ -7,11 +7,12 @@ select e.xtrsrcid, 1, zone, $$get_column_insert_values(['ra', 'decl'])$$, x, y, z, 0, healpix_zone from extractedsources e - where image_id = {0} + where image_id = [i] and source_kind = 0 and not exists (select x.xtrsrc_id from temp_associations x - where x.xtrsrc_id = e.xtrsrcid) + where x.xtrsrc_id = e.xtrsrcid + and x.image_id = [i]) and e.xtrsrcid2 is null order by e.xtrsrcid; @@ -27,7 +28,8 @@ select i.band, i.stokes, e.xtrsrcid, 1, zone, from extractedsources e, images i, temp_associations ta - where e.image_id = {0} + where e.image_id = [i] + and ta.image_id = [i] and i.imageid = e.image_id and e.source_kind = 1 and e.xtrsrcid = ta.xtrsrc_id @@ -47,7 +49,8 @@ select i.band, i.stokes, e.xtrsrcid, 1, zone, from extractedsources e, images i, temp_associations ta - where e.image_id = {0} + where e.image_id = [i] + and ta.image_id = [i] and i.imageid = e.image_id and e.source_kind = 1 and e.xtrsrcid = ta.xtrsrc_id @@ -57,6 +60,7 @@ select i.band, i.stokes, e.xtrsrcid, 1, zone, from temp_associations tb where tb.xtrsrc_id = ta.xtrsrc_id and tb.kind = 2 + and tb.image_id = [i] ) order by e.xtrsrcid; @@ -70,12 +74,13 @@ select e.xtrsrcid, 1, zone, $$get_column_insert_values(['ra', 'decl', 'g_minor', 'g_major','g_pa'])$$, x, y, z, 1, null, healpix_zone from extractedsources e - where image_id = {0} + where image_id = [i] and source_kind = 1 and xtrsrcid2 is null and not exists (select x.xtrsrc_id from temp_associations x - where x.xtrsrc_id = e.xtrsrcid) + where x.xtrsrc_id = e.xtrsrcid + and x.image_id = [i]) order by e.xtrsrcid; insert into runningcatalog(band, stokes, first_xtrsrc_id, datapoints, decl_zone, @@ -88,8 +93,8 @@ select i.band, i.stokes, e.xtrsrcid, 1, zone, from extractedsources e, images i, runningcatalog r - where e.image_id = {0} - and i.imageid = {0} + where e.image_id = [i] + and i.imageid = [i] and e.source_kind = 1 and r.source_kind = 1 and e.xtrsrcid = r.first_xtrsrc_id @@ -97,7 +102,8 @@ select i.band, i.stokes, e.xtrsrcid, 1, zone, and not r.deleted and not exists (select x.xtrsrc_id from temp_associations x - where x.xtrsrc_id = e.xtrsrcid) + where x.xtrsrc_id = e.xtrsrcid + and x.image_id = [i]) order by e.xtrsrcid; --associate new extended sources and new point sources @@ -106,17 +112,19 @@ insert into assocxtrsources(xtrsrc_id, runcat_id, distance_arcsec, lr_method, select r.first_xtrsrc_id, r.runcatid, 0.0, 0, 0.0, 0.0 from runningcatalog r, extractedsources e - where e.image_id = {0} + where e.image_id = [i] and e.xtrsrcid = r.first_xtrsrc_id and not exists (select x.xtrsrc_id from temp_associations x - where x.xtrsrc_id = e.xtrsrcid) + where x.xtrsrc_id = e.xtrsrcid + and x.image_id = [i]) union select r.first_xtrsrc_id, r.runcatid, 0.0, 0, 0.0, 0.0 from runningcatalog r, extractedsources e, temp_associations ta - where e.image_id = {0} + where e.image_id = [i] + and ta.image_id = [i] and e.xtrsrcid = r.first_xtrsrc_id and ta.xtrsrc_id = e.xtrsrcid and not r.deleted @@ -132,7 +140,7 @@ select r.runcatid, i.band, r.datapoints, from extractedsources e, images i, runningcatalog r - where e.image_id = {0} + where e.image_id = [i] and i.imageid = e.image_id and r.first_xtrsrc_id = e.xtrsrcid and not r.deleted diff --git a/CEP/GSM/bremen/src/sqllist_update.sql b/CEP/GSM/bremen/src/sqllist_update.sql index da6896fee1c..518d5556edc 100644 --- a/CEP/GSM/bremen/src/sqllist_update.sql +++ b/CEP/GSM/bremen/src/sqllist_update.sql @@ -4,7 +4,7 @@ insert into runningcatalog_fluxes(runcat_id, band, datapoints, avg_wf_peak, avg_weight_f_peak, wm_f_int, wm_f_int_err, avg_wf_int, avg_weight_f_int) -select a.runcat_id, {1}, 1, +select a.runcat_id, [b], 1, e.f_peak, e.f_peak_err, e.f_peak/(e.f_peak_err*e.f_peak_err), 1/(e.f_peak_err*e.f_peak_err), e.f_int, e.f_int_err, @@ -16,6 +16,7 @@ select a.runcat_id, {1}, 1, where a.xtrsrc_id = e.xtrsrcid and ta.xtrsrc_id = a.xtrsrc_id and ta.runcat_id = a.runcat_id + and ta.image_id = [i] and ta.kind <> 4 and i.imageid = e.image_id and not exists (select f.band @@ -24,7 +25,7 @@ select a.runcat_id, {1}, 1, and f.band = i.band and f.stokes = i.stokes) and ta.lr_method = 1 - and e.image_id = {0}; + and e.image_id = [i]; --#update runningcatalog @@ -38,7 +39,7 @@ update runningcatalog and runningcatalog.runcatid = a.runcat_id and runningcatalog.group_head_id is null and runningcatalog.source_kind = 0 - and e.image_id = {0}; + and e.image_id = [i]; --#update runningcatalog extended update runningcatalog @@ -53,7 +54,7 @@ update runningcatalog and r.runcatid = a.runcat_id and r.group_head_id is null and r.source_kind <> 0 - and e.image_id = {0} + and e.image_id = [i] group by runcatid) as y where y.runcatid = runningcatalog.runcatid; @@ -70,7 +71,7 @@ update runningcatalog where a.xtrsrc_id = e.xtrsrcid and runningcatalog.runcatid = a.runcat_id and runningcatalog.group_head_id is null - and e.image_id = {0}); + and e.image_id = [i]); --#update runningcatalog_fluxes @@ -85,8 +86,8 @@ update runningcatalog_fluxes runningcatalog_fluxes f where a.xtrsrc_id = e.xtrsrcid and f.runcat_id = a.runcat_id - and e.image_id = {0} - and e.image_id = i.imageid + and e.image_id = [i] + and i.imageid = [i] and a.lr_method <> 5 --not a group association and f.band = i.band and f.stokes = i.stokes diff --git a/CEP/GSM/bremen/src/unifiedConnection.py b/CEP/GSM/bremen/src/unifiedConnection.py index 4e32e0b5f9a..f490caee0b3 100644 --- a/CEP/GSM/bremen/src/unifiedConnection.py +++ b/CEP/GSM/bremen/src/unifiedConnection.py @@ -82,6 +82,7 @@ class UnifiedConnection(object): query = query + ';' try: self.start() + self.log.debug(query.replace('\n', ' ')) result = cursor.execute(query) except Exception as oerr: self.log.error(query.replace('\n', ' ')) @@ -166,7 +167,7 @@ class UnifiedConnection(object): """ Proper procedure call (for Monet/Postgres compatibility.) """ - self.conn.execute('call %s' % procname) + self.execute('call %s' % procname) def cursor(self): """ diff --git a/CEP/GSM/bremen/tests/bbsfiletest.py b/CEP/GSM/bremen/tests/bbsfiletest.py index c4031e96e98..68870519628 100644 --- a/CEP/GSM/bremen/tests/bbsfiletest.py +++ b/CEP/GSM/bremen/tests/bbsfiletest.py @@ -15,11 +15,11 @@ class BBSFileTest(SwitchableTest): self.conn = self.cm.get_connection() def test_first_file(self): - xfile = GSMBBSFileSource('test', 'tests/data/new_field.dat', 'test') + xfile = GSMBBSFileSource('test', 0, 'tests/data/new_field.dat', 'test') self.assertTrue(xfile.read_and_store_data(self.conn)) def test_full(self): - xfile = GSMBBSFileSource('test', 'tests/data/full_file.dat') + xfile = GSMBBSFileSource('test', 0, 'tests/data/full_file.dat') self.assertTrue(xfile.read_and_store_data(self.conn)) g_major =self.conn.exec_return('select g_major ' \ 'from detections where lra < 123.0;') @@ -29,19 +29,16 @@ class BBSFileTest(SwitchableTest): self.assertEqual(g_major, 0.101701) def test_full2(self): - xfile = GSMBBSFileSource('test', 'tests/data_extended/field_ext.dat') + xfile = GSMBBSFileSource('test', 0, 'tests/data_extended/field_ext.dat') self.assertTrue(xfile.read_and_store_data(self.conn)) def test_wrong_default(self): - with self.assertRaises(SourceException): - xfile = GSMBBSFileSource('test', 'tests/data/bad_file.dat') - xfile.read_and_store_data(self.conn) + xfile = GSMBBSFileSource('test', 0, 'tests/data/bad_file.dat') + self.assertRaises(SourceException, xfile.read_and_store_data, self.conn) def test_wrong_test(self): - with self.assertRaises(SourceException): - xfile = GSMBBSFileSource('test', 'tests/data/bbs_field.dat', 'test') - self.assertTrue(xfile.read_and_store_data(self.conn)) - + xfile = GSMBBSFileSource('test', 0, 'tests/data/bbs_field.dat', 'test') + self.assertRaises(SourceException, xfile.read_and_store_data, self.conn) def tearDown(self): self.conn.execute("delete from detections;") diff --git a/CEP/GSM/bremen/tests/gsmconnection.py b/CEP/GSM/bremen/tests/gsmconnection.py index fddd1c963b2..b1690a149ce 100644 --- a/CEP/GSM/bremen/tests/gsmconnection.py +++ b/CEP/GSM/bremen/tests/gsmconnection.py @@ -19,18 +19,16 @@ class ConnectionTest(SwitchableTest): self.assertTrue(conn.established()) def test_fail_connection(self): - with self.assertRaises((MonetDatabaseError, - psycopg2.OperationalError)): - self.cm.get_connection(database='test_nonexistent', - username='test1', - password='test1') + self.assertRaises((MonetDatabaseError, psycopg2.OperationalError), + self.cm.get_connection, database='test_nonexistent', + username='test1', + password='test1') def test_bad_sql(self): conn = self.cm.get_connection(database='test') self.assertTrue(conn.established()) - with self.assertRaises((MonetDatabaseError, - psycopg2.DatabaseError)): - conn.execute('select abracadabra from xxxtable;') + self.assertRaises((MonetDatabaseError, psycopg2.DatabaseError), + conn.execute, 'select abracadabra from xxxtable;') conn.rollback() bad_sql = """update assocxtrsources set weight = weight*(select ta.flux_fraction @@ -53,8 +51,7 @@ class ConnectionTest(SwitchableTest): and ta.lr_method = 1 and ta.kind = 3);""" if self.is_monet: - with self.assertRaises(MonetDatabaseError): - conn.execute(bad_sql) + self.assertRaises(MonetDatabaseError, conn.execute, bad_sql) self.assertFalse(conn.established()) def test_store_properties(self): diff --git a/CEP/GSM/bremen/tests/parset.py b/CEP/GSM/bremen/tests/parset.py index d730ebb5314..be177ee82ad 100644 --- a/CEP/GSM/bremen/tests/parset.py +++ b/CEP/GSM/bremen/tests/parset.py @@ -1,11 +1,11 @@ #!/usr/bin/python import unittest from src.errors import ParsetContentError, SourceException, GSMException -#from src.bbsfilesource import GSMBBSFileSource from src.gsmparset import GSMParset from src.gsmconnectionmanager import GSMConnectionManager from tests.switchable import SwitchableTest + class ParsetTest(SwitchableTest): def test_sample_parset(self): parset = GSMParset('tests/sample.parset') @@ -13,13 +13,12 @@ class ParsetTest(SwitchableTest): self.assertEquals(loaded, 22) def test_missing_parset(self): - with self.assertRaises(GSMException): - _ = GSMParset('tests/nonexists.parset') + self.assertRaises(GSMException, GSMParset, 'tests/nonexists.parset') def test_wrong_parset(self): - with self.assertRaises(ParsetContentError): - parset = GSMParset('tests/wrong1.parset') - loaded = parset.process(self.cm.get_connection(database='test')) - with self.assertRaises(SourceException): - parset = GSMParset('tests/wrong2.parset') - _ = parset.process(self.cm.get_connection(database='test')) + parset = GSMParset('tests/wrong1.parset') + self.assertRaises(ParsetContentError, parset.process, + self.cm.get_connection(database='test')) + parset = GSMParset('tests/wrong2.parset') + self.assertRaises(SourceException, parset.process, + self.cm.get_connection(database='test')) diff --git a/CEP/GSM/bremen/tests/pipeline_extended.py b/CEP/GSM/bremen/tests/pipeline_extended.py index add5d2942b6..a42f9605f5d 100644 --- a/CEP/GSM/bremen/tests/pipeline_extended.py +++ b/CEP/GSM/bremen/tests/pipeline_extended.py @@ -9,8 +9,11 @@ from tests.tempparset import TempParset from tests.pipelinegeneral import PipelineGeneralTest class PipelineExtendedTest(PipelineGeneralTest): + PARSET_EXTRAS = {'pointing_ra': 0.0, + 'pointing_decl': 0.0, + 'beam_size': 1.0 } def run_series_part(self, x, band='150000000'): - parset = TempParset('data_extended/series%s.dat' % x, band) + parset = TempParset('data_extended/series%s.dat' % x, band, **self.PARSET_EXTRAS) self.pipeline.run_parset(parset) self.assertEquals(parset.source_count, 1) diff --git a/CEP/GSM/bremen/tests/spectra.py b/CEP/GSM/bremen/tests/spectra.py index edf9fd1f9a3..d8d07513f32 100644 --- a/CEP/GSM/bremen/tests/spectra.py +++ b/CEP/GSM/bremen/tests/spectra.py @@ -1,7 +1,7 @@ #!/usr/bin/python import unittest from math import log10, pow -from numpy.polynomial.polynomial import polyval +from src.spectra import polyval from numpy.testing import assert_array_almost_equal from stress.generator import FREQUENCY from src.gsmconnectionmanager import GSMConnectionManager diff --git a/CEP/GSM/bremen/tests/tempparset.py b/CEP/GSM/bremen/tests/tempparset.py index 42fa1f8019a..53d03cc2fa0 100644 --- a/CEP/GSM/bremen/tests/tempparset.py +++ b/CEP/GSM/bremen/tests/tempparset.py @@ -6,7 +6,7 @@ from src.gsmparset import GSMParset class TempParset(GSMParset): """ """ - def __init__(self, datafilename, freq): + def __init__(self, datafilename, freq, **extras): """ """ self.filename = datafilename @@ -14,7 +14,9 @@ class TempParset(GSMParset): self.data = {'image_id': datafilename, 'source_lists': datafilename, 'frequency': freq} + self.data.update(extras) self.parset_id = self.data.get('image_id') self.image_id = None # Not yet known. self.source_count = None self.log = get_gsm_logger('parsets', 'test.log') + self.recalculate_pointing = False diff --git a/CEP/GSM/bremen/tests/testlib.py b/CEP/GSM/bremen/tests/testlib.py index ee254d69dc6..6d9bff89f36 100644 --- a/CEP/GSM/bremen/tests/testlib.py +++ b/CEP/GSM/bremen/tests/testlib.py @@ -54,6 +54,8 @@ def cleanup_db(conn): 'runningcatalog', 'temp_associations', 'images', + 'image_stats', + 'runs', 'extractedsources', 'detections']: if isinstance(conn, MonetConnection): @@ -63,6 +65,7 @@ def cleanup_db(conn): for seq in ['seq_datasets', 'seq_images', + 'seq_runs', 'seq_runningcatalog']: conn._execute_with_cursor('alter sequence %s restart with 1;' % seq, cursor) conn._execute_with_cursor('alter sequence seq_extractedsources restart with 1001;', cursor) diff --git a/CEP/GSM/bremen/tests/utils.py b/CEP/GSM/bremen/tests/utils.py index 3d1e9f3ca18..7fcfe432084 100644 --- a/CEP/GSM/bremen/tests/utils.py +++ b/CEP/GSM/bremen/tests/utils.py @@ -1,8 +1,13 @@ #!/usr/bin/python import unittest +import sys from src.queries import get_svn_version, makelistable class UtilsTest(unittest.TestCase): + if sys.version_info < (2, 7): + def assertIsInstance(self, par1, par2): + self.assertTrue(isinstance(par1, par2)) + def test_svn(self): self.assertIsInstance(get_svn_version(), int) diff --git a/CEP/Imager/LofarFT/src/CMakeLists.txt b/CEP/Imager/LofarFT/src/CMakeLists.txt index f52729c0ecb..d75b3284917 100644 --- a/CEP/Imager/LofarFT/src/CMakeLists.txt +++ b/CEP/Imager/LofarFT/src/CMakeLists.txt @@ -25,6 +25,7 @@ lofar_add_bin_program(versionlofarft versionlofarft.cc) lofar_add_bin_program(awimager awimager.cc) lofar_add_bin_program(makefftwisdom2d makefftwisdom2d.cc) lofar_add_bin_program(fillRootImageGroup fillRootImageGroup.cc) +lofar_add_bin_program(makebeamimage makebeamimage.cc) install(PROGRAMS addImagingInfo diff --git a/CEP/Imager/LofarFT/src/fillRootImageGroup.cc b/CEP/Imager/LofarFT/src/fillRootImageGroup.cc index 7e340891816..93893cc4856 100644 --- a/CEP/Imager/LofarFT/src/fillRootImageGroup.cc +++ b/CEP/Imager/LofarFT/src/fillRootImageGroup.cc @@ -25,6 +25,8 @@ //# //# $Id$ +#include <lofar_config.h> + #include <casa/Containers/Record.h> #include <casa/HDF5/HDF5File.h> #include <casa/HDF5/HDF5Group.h> diff --git a/CEP/Imager/LofarFT/src/makebeamimage.cc b/CEP/Imager/LofarFT/src/makebeamimage.cc new file mode 100644 index 00000000000..b587ae4c3ae --- /dev/null +++ b/CEP/Imager/LofarFT/src/makebeamimage.cc @@ -0,0 +1,246 @@ +//# makebeamimage.cc: Generate images of the beam response of multiple stations +//# for a given MS. +//# +//# Copyright (C) 2011 +//# Associated Universities, Inc. Washington DC, USA. +//# +//# This program is free software; you can redistribute it and/or modify it +//# under the terms of the GNU General Public License as published by the Free +//# Software Foundation; either version 2 of the License, or (at your option) +//# any later version. +//# +//# This program is distributed in the hope that it will be useful, but WITHOUT +//# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +//# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for +//# more details. +//# +//# You should have received a copy of the GNU General Public License along +//# with this program; if not, write to the Free Software Foundation, Inc., +//# 675 Massachusetts Ave, Cambridge, MA 02139, USA. +//# +//# Correspondence concerning AIPS++ should be addressed as follows: +//# Internet email: aips2-request@nrao.edu. +//# Postal address: AIPS++ Project Office +//# National Radio Astronomy Observatory +//# 520 Edgemont Road +//# Charlottesville, VA 22903-2475 USA +//# +//# $Id$ + +#include <lofar_config.h> +#include <LofarFT/Exceptions.h> +#include <LofarFT/LofarConvolutionFunction.h> +#include <LofarFT/Package__Version.h> +#include <Common/InputParSet.h> +#include <Common/LofarLogger.h> +#include <Common/SystemUtil.h> + +#include <images/Images/PagedImage.h> +#include <images/Images/HDF5Image.h> +#include <images/Images/ImageFITSConverter.h> + +#include <ms/MeasurementSets/MSAntenna.h> +#include <ms/MeasurementSets/MSAntennaParse.h> +#include <ms/MeasurementSets/MSAntennaColumns.h> +#include <ms/MeasurementSets/MSDataDescription.h> +#include <ms/MeasurementSets/MSDataDescColumns.h> +#include <ms/MeasurementSets/MSField.h> +#include <ms/MeasurementSets/MSFieldColumns.h> +#include <ms/MeasurementSets/MSObservation.h> +#include <ms/MeasurementSets/MSObsColumns.h> +#include <ms/MeasurementSets/MSPolarization.h> +#include <ms/MeasurementSets/MSPolColumns.h> +#include <ms/MeasurementSets/MSSpectralWindow.h> +#include <ms/MeasurementSets/MSSpWindowColumns.h> +#include <ms/MeasurementSets/MSSelection.h> + +#include <measures/Measures/MDirection.h> +#include <measures/Measures/MEpoch.h> + +#include <casa/Arrays/ArrayUtil.h> +#include <casa/Arrays/ArrayMath.h> +#include <casa/Arrays/ArrayIter.h> +#include <casa/Utilities/Regex.h> +#include <casa/Utilities/Assert.h> +#include <casa/OS/Directory.h> +#include <casa/OS/File.h> +#include <casa/Exceptions/Error.h> +#include <casa/OS/Timer.h> +#include <casa/OS/PrecTimer.h> +#include <casa/iostream.h> +#include <casa/sstream.h> + +using namespace casa; +using namespace LOFAR; +using LOFAR::operator<<; + +Quantity readQuantity (const String& in) +{ + Quantity res; + if (!Quantity::read(res, in)) { + THROW(AWImagerException, in + " is an illegal quantity"); + } + return res; +} + +int main(int argc, char *argv[]) +{ + TEST_SHOW_VERSION(argc, argv, LofarFT); + INIT_LOGGER(basename(string(argv[0]))); + Version::show<LofarFTVersion>(cout); + + LOFAR::InputParSet inputs; + inputs.create("ms", "", "Name of input MeasurementSet", "string"); + inputs.create("stations", "[0]", "IDs of stations to process", + "int vector"); + inputs.create("cellsize", "60arcsec", "Angular pixel size", + "quantity string"); + inputs.create("size", "256", "Number of pixels along each axis", "int"); + inputs.create("offset", "0s", "Time offset from the start of the MS", + "quantity string"); + inputs.create("frames", "0", "Number of images that will be generated for" + " each station (equally spaced over the duration of the MS)", "int"); + inputs.create("abs", "false", "If set to true, store the absolute value of" + " the beam response instead of the complex value (intended for use with" + " older versions of casaviewer)", "bool"); + inputs.readArguments(argc, argv); + + String msName = inputs.getString("ms"); + if(msName.empty()) + { + THROW(AWImagerException, "An MS name must be provided, for example:" + " ms=test.ms"); + } + + vector<int> stationID(inputs.getIntVector("stations")); + Quantity cellsize = readQuantity(inputs.getString("cellsize")); + size_t size = max(inputs.getInt("size"), 1); + Quantity offset = readQuantity(inputs.getString("offset")); + size_t nFrames = max(inputs.getInt("frames"), 1); + Bool abs = inputs.getBool("abs"); + + // ---------------------------------------------------------------------- // + + MeasurementSet ms(msName); + + uInt idObservation = 0; + uInt idField = 0; + uInt idDataDescription = 0; + + // Read number of stations. + ROMSAntennaColumns antenna(ms.antenna()); + uInt nStation = antenna.nrow(); + + // Filter invalid station IDs. + vector<unsigned int> filteredID; + for(vector<int>::const_iterator it = stationID.begin(), + end = stationID.end(); it != end; ++it) + { + if(*it >= 0 && static_cast<size_t>(*it) < nStation) + { + filteredID.push_back(*it); + } + } + + // Read phase reference direction. + ROMSFieldColumns field(ms.field()); + ASSERT(field.nrow() > idField); + ASSERT(!field.flagRow()(idField)); + MDirection refDir = field.phaseDirMeas(idField); + + // Read reference frequency. + ROMSDataDescColumns desc(ms.dataDescription()); + ASSERT(desc.nrow() > idDataDescription); + ASSERT(!desc.flagRow()(idDataDescription)); + uInt idWindow = desc.spectralWindowId()(idDataDescription); + + ROMSSpWindowColumns window(ms.spectralWindow()); + ASSERT(window.nrow() > idWindow); + ASSERT(!window.flagRow()(idWindow)); + + double refFreq = window.refFrequency()(idWindow); + + // Read reference time. + Table msView = + ms(ms.col("OBSERVATION_ID") == static_cast<Int>(idObservation) + && ms.col("FIELD_ID") == static_cast<Int>(idField) + && ms.col("DATA_DESC_ID") == static_cast<Int>(idDataDescription)); + + Table tab_sorted = msView.sort("TIME", Sort::Ascending, + Sort::HeapSort | Sort::NoDuplicates); + + ROScalarColumn<Double> c_time(tab_sorted, "TIME"); + Vector<Double> time = c_time.getColumn(); + + // ---------------------------------------------------------------------- // + + MDirection refDirJ2000(MDirection::Convert(refDir, MDirection::J2000)()); + Quantum<Vector<Double> > angles = refDirJ2000.getAngle(); + + double ra = angles.getBaseValue()(0); + double dec = angles.getBaseValue()(1); + double delta = cellsize.getValue("rad"); + + // Construct DirectionCoordinate instance. + Matrix<Double> xform(2,2); + xform = 0.0; xform.diagonal() = 1.0; + DirectionCoordinate coordinates(MDirection::J2000, + Projection(Projection::SIN), + ra, dec, + -delta, delta, + xform, + size / 2, size / 2); + + // ---------------------------------------------------------------------- // + + LofarATerm aTerm(ms, Record()); + + IPosition shape(2, size, size); + aTerm.setDirection(coordinates, shape); + + Vector<Double> freq(1, refFreq); + + Quantity refTime(time(0), "s"); + refTime = refTime + offset; + + Quantity deltaTime((time(time.size() - 1) - time(0) - offset.getValue("s")) + / (nFrames - 1), "s"); + + cout << "computing..." << flush; + for(size_t j = 0; j < nFrames; ++j) + { + MEpoch refEpoch; + refEpoch.set(refTime); + aTerm.setEpoch(refEpoch); + refTime = refTime + deltaTime; + + for(vector<unsigned int>::const_iterator it = filteredID.begin(), + end = filteredID.end(); it != end; ++it) + { + vector<Cube<Complex> > response = aTerm.evaluate(*it, freq, freq); + + std::ostringstream oss; + oss << "beam-id-" << *it; + if(nFrames > 1) + { + oss << "-frame-" << j; + } + oss << ".img"; + + if(abs) + { + Cube<Float> ampl(amplitude(response[0])); + store(coordinates, ampl, oss.str()); + } + else + { + store(coordinates, response[0], oss.str()); + } + } + + cout << "." << flush; + } + cout << " done." << endl; + + return 0; +} diff --git a/CEP/LMWCommon/src/cexecms b/CEP/LMWCommon/src/cexecms index b6be7ec9103..a1419b49d91 100755 --- a/CEP/LMWCommon/src/cexecms +++ b/CEP/LMWCommon/src/cexecms @@ -8,15 +8,16 @@ showhelp() { echo '' echo ' cexecms runs a command or script on cluster nodes for files matching the' - echo ' given file name glob pattern. Placeholders in command or script are' - echo ' replaced by the actual file name.' + echo ' given file name glob pattern. Placeholders in the command or script are' + echo ' replaced by the actual file name parts.' echo '' echo ' usage:' echo ' cexecms [-c cluster] [-d] [-s script] [-w workdir] command nameglob [arg1 arg2 ...]' echo '' echo ' -c cluster Cluster name as defined for cexec.' - echo ' default is lce: if run on an lfe node,' - echo ' test: if run on lce072, otherwise locus:' + echo ' default is lce: if run on an lfe node' + echo ' test: if run on lce072' + echo ' locus: otherwise' echo ' -d Do a dryrun.' echo ' (do not execute, but only print the command/script)' echo ' -i ids List of ids to replace <ID> in the nameglob argument.' @@ -31,9 +32,12 @@ showhelp() echo ' command Command to be executed remotely.' echo ' Quotes are needed if it contains spaces, etc.' echo ' Placeholders (like <FN>) in the command are replaced.' - echo ' nameglob File name glob pattern (# is a shorthand for [0-9]).' + echo ' nameglob File name glob pattern to find matching files' + echo ' # can be used as a shorthand for [0-9].' echo ' E.g., one can use SB### meaning any subband.' - echo ' arg1 arg2 .. Optional extra arguments to be given to command.' + echo ' The pattern can contain the placeholder <ID> as explained' + echo ' above in the -i option.' + echo ' arg1 arg2 .. Optional extra arguments to be given to the command.' echo '' echo ' Using cexec, the script cexecms-part is executed on the given cluster' echo ' nodes. It looks for files matching the given file name glob pattern.' @@ -46,6 +50,12 @@ showhelp() echo ' <DIRNAME> or <DN> for the directory part' echo ' The first two can be followed by a . (e.g. <FN.>) meaning that the' echo ' basename is used till the first dot (thus the extension is removed.)' + echo ' Similarly, <.BN> gives the extension (thus after the first dot).' + echo ' For standard LOFAR file names the following placeholders can also be used:' + echo ' <OBSID> for the obsid part of <BN.> (till first _)' + echo ' <SAP> for the subarray pointing part of <BN.> (till next _)' + echo ' <SB> for the subband part of <BN.> (till next _)' + echo ' <TYPE> for the dataset type part of <BN.> (after last _)' echo '' echo ' If -s is given, the command is executed like:' echo ' command script arg1 arg2 ..' @@ -68,7 +78,7 @@ showhelp() echo ' Also note that (t)csh requires a ! to be escaped with a backslash.' echo '' echo ' Sometimes a command can be dangerous or take a long time to run.' - echo ' In such a case it makes sense to execute it first with the -d option.' + echo ' In such a case it makes sense to first do a dry-run execution with the -d option.' echo '' echo ' Note that the current environment (paths, etc.) is copied. You should' echo ' have done "use LofIm" if you need LofIm in the (remote) command.' diff --git a/CEP/LMWCommon/src/cexecms-part b/CEP/LMWCommon/src/cexecms-part index 48b7e9268cf..4f68ccce6a9 100755 --- a/CEP/LMWCommon/src/cexecms-part +++ b/CEP/LMWCommon/src/cexecms-part @@ -11,6 +11,10 @@ # <BASENAME> or <BN> by the basename part # <DIRNAME> or <DN> by the directory part # The first two can be followed by a . meaning that the extension is ignored. +# <OBSID> by the obsid part of <BN.> (till first _) +# <SAP> by the subarray pointing part of <BN.> (till next _) +# <SB> by the subband part of <BN.> (till next _) +# <TYPE> by the dataset type part of <BN.> (after last _) # If no substitutions are done, the command is executed like # command filename arg1 arg2 ... # otherwise like @@ -125,10 +129,15 @@ command=`echo "$command" | sed \ for fname in $names do # Form the various placeholder replacements. - dname=`dirname $fname` # directory - bname=`basename $fname` # basename - bnamed=`echo $bname | sed -e 's%\..*%%'` # basename without extension - fnamed=$dname/$bnamed # full name without extension + dname=`dirname $fname` # directory + bname=`basename $fname` # basename + bnamed=`echo $bname | sed -e 's%\..*%%'` # basename without extension + fnamed=$dname/$bnamed # full name without extension + ename=`echo $bname | sed -e "s%$bnamed\.%%"` # extension + obsid=`echo $bnamed | awk -F_ '{print $1}'` + sap=`echo $bnamed | awk -F_ '{print $2}'` + sb=`echo $bnamed | awk -F_ '{print $3}'` + type=`echo $bnamed | awk -F_ '{print $4}'` # Replace the placeholders. commandnew=`echo "$command" | sed \ -e "s%<FN>%$fname%g" \ @@ -137,12 +146,18 @@ do -e "s%<FN\.>%$fnamed%g" \ -e "s%<DN\.>%$dnamed%g" \ -e "s%<BN\.>%$bnamed%g" \ + -e "s%<\.BN>%$ename%g" \ -e "s%<FILENAME>%$fname%g" \ -e "s%<DIRNAME>%$dname%g" \ -e "s%<BASENAME>%$bname%g" \ -e "s%<FILENAME\.>%$fnamed%g" \ -e "s%<DIRNAME\.>%$dnamed%g" \ - -e "s%<BASENAME\.>%$bnamed%g"` + -e "s%<BASENAME\.>%$bnamed%g" \ + -e "s%<\.BASENAME>%$ename%g" \ + -e "s%<OBSID>%$obsid%g" \ + -e "s%<SAP>%$sap%g" \ + -e "s%<SB>%$sb%g" \ + -e "s%<TYPE>%$type%g"` if test "$script" != ""; then # A script is given, replace placeholders in there as well. psname=$HOME/`basename $script`-$USER-$$ @@ -153,12 +168,18 @@ do -e "s%<FN\.>%$fnamed%g" \ -e "s%<DN\.>%$dnamed%g" \ -e "s%<BN\.>%$bnamed%g" \ + -e "s%<\.BN>%$ename%g" \ -e "s%<FILENAME>%$fname%g" \ -e "s%<DIRNAME>%$dname%g" \ -e "s%<BASENAME>%$bname%g" \ -e "s%<FILENAME\.>%$fnamed%g" \ -e "s%<DIRNAME\.>%$dnamed%g" \ -e "s%<BASENAME\.>%$bnamed%g" \ + -e "s%<\.BASENAME>%$ename%g" \ + -e "s%<OBSID>%$obsid%g" \ + -e "s%<SAP>%$sap%g" \ + -e "s%<SB>%$sb%g" \ + -e "s%<TYPE>%$type%g" \ $script > $psname if test $dryrun = 1; then echo "Dryrun: " $commandnew $psname "$@" diff --git a/CEP/MS/test/CMakeLists.txt b/CEP/MS/test/CMakeLists.txt index e8148fe2d52..f9dc314fdf7 100644 --- a/CEP/MS/test/CMakeLists.txt +++ b/CEP/MS/test/CMakeLists.txt @@ -22,4 +22,5 @@ lofar_add_test(tMSSplit tMSSplit.cc) lofar_add_test(tBaselineSelect tBaselineSelect.cc) lofar_add_test(tVdsMaker tVdsMaker.cc DEPENDS combinevds) lofar_add_test(tcombinevds DEPENDS combinevds) -lofar_add_test(tmakems DEPENDS getparsetvalue startdistproc finddproc socketrun) +lofar_add_test(tmakems + DEPENDS makems getparsetvalue finddproc startdistproc socketrun) diff --git a/CEP/Pipeline/deploy/fabfile.py b/CEP/Pipeline/deploy/deprecated/fabfile.py similarity index 100% rename from CEP/Pipeline/deploy/fabfile.py rename to CEP/Pipeline/deploy/deprecated/fabfile.py diff --git a/CEP/Pipeline/deploy/ipcontroller.sh b/CEP/Pipeline/deploy/deprecated/ipcontroller.sh similarity index 100% rename from CEP/Pipeline/deploy/ipcontroller.sh rename to CEP/Pipeline/deploy/deprecated/ipcontroller.sh diff --git a/CEP/Pipeline/deploy/ipengine.sh b/CEP/Pipeline/deploy/deprecated/ipengine.sh similarity index 100% rename from CEP/Pipeline/deploy/ipengine.sh rename to CEP/Pipeline/deploy/deprecated/ipengine.sh diff --git a/CEP/Pipeline/deploy/start_cluster.py b/CEP/Pipeline/deploy/deprecated/start_cluster.py similarity index 100% rename from CEP/Pipeline/deploy/start_cluster.py rename to CEP/Pipeline/deploy/deprecated/start_cluster.py diff --git a/CEP/Pipeline/deploy/stop_cluster.py b/CEP/Pipeline/deploy/deprecated/stop_cluster.py similarity index 100% rename from CEP/Pipeline/deploy/stop_cluster.py rename to CEP/Pipeline/deploy/deprecated/stop_cluster.py diff --git a/CEP/Pipeline/framework/lofarpipe/CMakeLists.txt b/CEP/Pipeline/framework/lofarpipe/CMakeLists.txt index f6e20c1a2fa..1ac285fef55 100644 --- a/CEP/Pipeline/framework/lofarpipe/CMakeLists.txt +++ b/CEP/Pipeline/framework/lofarpipe/CMakeLists.txt @@ -17,22 +17,18 @@ python_install( support/__init__.py support/baserecipe.py support/clusterdesc.py - support/clusterhandler.py - support/clusterlogger.py support/control.py support/group_data.py - support/ipython.py support/jobserver.py support/lofarexceptions.py support/lofaringredient.py support/lofarnode.py - support/lofarrecipe.py support/mac.py support/parset.py support/pipelinelogging.py support/pipelinexml.py support/remotecommand.py support/stateful.py - support/utilities.py support/subprocessgroup.py + support/utilities.py DESTINATION lofarpipe) diff --git a/CEP/Pipeline/framework/lofarpipe/cuisine/WSRTrecipe.py b/CEP/Pipeline/framework/lofarpipe/cuisine/WSRTrecipe.py index ea9b27cad4f..e03ad0a7749 100644 --- a/CEP/Pipeline/framework/lofarpipe/cuisine/WSRTrecipe.py +++ b/CEP/Pipeline/framework/lofarpipe/cuisine/WSRTrecipe.py @@ -138,7 +138,10 @@ class WSRTrecipe(object): ## confidence in return 1 else: - self.logger.info('recipe ' + name + ' completed') + if status == 0: + self.logger.info('recipe ' + name + ' completed') + else: + self.logger.warn('recipe ' + name + ' completed with errors') return status def get_run_info(self, filepath): diff --git a/CEP/Pipeline/framework/lofarpipe/support/clusterhandler.py b/CEP/Pipeline/framework/lofarpipe/support/deprecated/clusterhandler.py similarity index 100% rename from CEP/Pipeline/framework/lofarpipe/support/clusterhandler.py rename to CEP/Pipeline/framework/lofarpipe/support/deprecated/clusterhandler.py diff --git a/CEP/Pipeline/framework/lofarpipe/support/clusterlogger.py b/CEP/Pipeline/framework/lofarpipe/support/deprecated/clusterlogger.py similarity index 100% rename from CEP/Pipeline/framework/lofarpipe/support/clusterlogger.py rename to CEP/Pipeline/framework/lofarpipe/support/deprecated/clusterlogger.py diff --git a/CEP/Pipeline/framework/lofarpipe/support/ipython.py b/CEP/Pipeline/framework/lofarpipe/support/deprecated/ipython.py similarity index 100% rename from CEP/Pipeline/framework/lofarpipe/support/ipython.py rename to CEP/Pipeline/framework/lofarpipe/support/deprecated/ipython.py diff --git a/CEP/Pipeline/framework/lofarpipe/support/lofarrecipe.py b/CEP/Pipeline/framework/lofarpipe/support/deprecated/lofarrecipe.py similarity index 100% rename from CEP/Pipeline/framework/lofarpipe/support/lofarrecipe.py rename to CEP/Pipeline/framework/lofarpipe/support/deprecated/lofarrecipe.py diff --git a/CEP/Pipeline/framework/lofarpipe/support/group_data.py b/CEP/Pipeline/framework/lofarpipe/support/group_data.py index b30e79fb41f..06af8ce7366 100644 --- a/CEP/Pipeline/framework/lofarpipe/support/group_data.py +++ b/CEP/Pipeline/framework/lofarpipe/support/group_data.py @@ -9,7 +9,6 @@ from collections import defaultdict import os import subprocess -from lofar.parameterset import parameterset from lofar.mstools import findFiles import lofarpipe.support.utilities as utilities @@ -17,44 +16,47 @@ from lofarpipe.support.clusterdesc import get_compute_nodes from lofarpipe.support.parset import Parset def group_files(logger, clusterdesc, node_directory, group_size, filenames): - """ - Group a list of files into blocks suitable for simultaneous - processing, such that a limited number of processes run on any given - host at a time. - - All node_directory on all compute nodes specified in clusterdesc is - searched for any of the files listed in filenames. A generator is - produced; on each call, no more than group_size files per node - are returned. - """ - # Given a limited number of processes per node, the first task is to - # partition up the data for processing. - logger.debug('Listing data on nodes') - data = {} - for node in get_compute_nodes(clusterdesc): - logger.debug("Node: %s" % (node)) - exec_string = ["ssh", node, "--", "find", - node_directory, - "-maxdepth 1", - "-print0" - ] - logger.debug("Executing: %s" % (" ".join(exec_string))) - my_process = subprocess.Popen(exec_string, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - sout, serr = my_process.communicate() - data[node] = sout.split('\x00') - data[node] = utilities.group_iterable( - [element for element in data[node] if element in filenames], - group_size, - ) - - # Now produce an iterator which steps through the various chunks of - # data to image, and image each chunk - data_iterator = utilities.izip_longest(*list(data.values())) - for data_chunk in data_iterator: - to_process = [] - for node_data in data_chunk: - if node_data: to_process.extend(node_data) - yield to_process + """ + Group a list of files into blocks suitable for simultaneous + processing, such that a limited number of processes run on any given + host at a time. + + All node_directory on all compute nodes specified in clusterdesc is + searched for any of the files listed in filenames. A generator is + produced; on each call, no more than group_size files per node + are returned. + """ + # Given a limited number of processes per node, the first task is to + # partition up the data for processing. + logger.debug('Listing data on nodes') + data = {} + for node in get_compute_nodes(clusterdesc): + logger.debug("Node: %s" % (node)) + exec_string = ["ssh", node, "--", "find", + node_directory, + "-maxdepth 1", + "-print0" + ] + logger.debug("Executing: %s" % (" ".join(exec_string))) + my_process = subprocess.Popen( + exec_string, stdout=subprocess.PIPE, stderr=subprocess.PIPE + ) + sout = my_process.communicate()[0] + data[node] = sout.split('\x00') + data[node] = utilities.group_iterable( + [element for element in data[node] if element in filenames], + group_size, + ) + + # Now produce an iterator which steps through the various chunks of + # data to image, and image each chunk + data_iterator = utilities.izip_longest(*list(data.values())) + for data_chunk in data_iterator: + to_process = [] + for node_data in data_chunk: + if node_data: + to_process.extend(node_data) + yield to_process def gvds_iterator(gvds_file, nproc=4): """ @@ -134,13 +136,15 @@ def validate_data_maps(*args): # Check if all lists have equal length. We do this by creating a set # from a tuple of lenghts of `args`. The set must have length 1. - if len(set(len(arg) for arg in args)) != 1: return False + if len(set(len(arg) for arg in args)) != 1: + return False # Next, check if the data products in `args`, when matched by index, # reside on the same node. We can use the same trick as before, by # checking the size of a set created from a tuple of hostnames. for i in xrange(len(args[0])): - if len(set(arg[i][0] for arg in args)) != 1: return False + if len(set(arg[i][0] for arg in args)) != 1: + return False return True diff --git a/CEP/Pipeline/framework/lofarpipe/support/utilities.py b/CEP/Pipeline/framework/lofarpipe/support/utilities.py index 7bf619b5f99..32a827d0baa 100644 --- a/CEP/Pipeline/framework/lofarpipe/support/utilities.py +++ b/CEP/Pipeline/framework/lofarpipe/support/utilities.py @@ -3,6 +3,8 @@ # Utility routines # John Swinbank, 2009-10 # swinbank@transientskp.org +# Marcel Loose, 2011-12 +# loose@astron.nl # ------------------------------------------------------------------------------ from __future__ import with_statement @@ -12,6 +14,7 @@ from itertools import islice, repeat, chain, izip from contextlib import closing, contextmanager from time import sleep from random import randint +import warnings import os import errno @@ -20,6 +23,22 @@ import subprocess from lofarpipe.support.pipelinelogging import log_process_output +def deprecated(func): + """ + This is a decorator which can be used to mark functions as deprecated. + It will result in a warning being emmitted when the function is used. + Ref.: http://code.activestate.com/recipes/391367-deprecated/ + """ + def new_func(*args, **kwargs): + warnings.warn("Call to deprecated function %s." % func.__name__, + category=DeprecationWarning, + stacklevel=2) + return func(*args, **kwargs) + new_func.__name__ = func.__name__ + new_func.__doc__ = func.__doc__ + new_func.__dict__.update(func.__dict__) + return new_func + # Compatibility # The following used to be defined in this module; # they are now included so as not to break existing code. diff --git a/CEP/Pipeline/recipes/sip/CMakeLists.txt b/CEP/Pipeline/recipes/sip/CMakeLists.txt index 45650061d70..14e457a2413 100644 --- a/CEP/Pipeline/recipes/sip/CMakeLists.txt +++ b/CEP/Pipeline/recipes/sip/CMakeLists.txt @@ -8,60 +8,37 @@ python_install( helpers/WritableParmDB.py helpers/ComplexArray.py master/__init__.py - master/bbs.py master/bbs_reducer.py - master/cep2_datamapper.py - master/cimager.py - master/compression_pipeline.py master/copier.py - master/count_timesteps.py - master/datamapper.py - master/demixing.py master/dppp.py - master/flag_baseline.py + master/gainoutliercorrection.py + master/get_metadata.py master/imager_awimager.py + master/imager_bbs.py master/imager_create_dbs.py master/imager_finalize.py master/imager_prepare.py - master/imager_bbs.py master/imager_source_finding.py - master/get_metadata.py - master/make_flaggable.py master/new_bbs.py - master/gainoutliercorrection.py master/rficonsole.py master/setupparmdb.py master/setupsourcedb.py - master/skymodel.py - master/storagemapper.py master/vdsmaker.py master/vdsreader.py nodes/__init__.py - nodes/bbs.py nodes/bbs_reducer.py - nodes/cimager.py nodes/copier.py - nodes/count_timesteps.py - nodes/demix/demixing.py nodes/demix/find_a_team.py - nodes/demix/median_filter.py - nodes/demix/shiftphasecenter.py - nodes/demix/smoothdemix.py - nodes/demix/subtract_from_averaged.py - nodes/demixing.py nodes/dppp.py - nodes/flag_baseline.py + nodes/gainoutliercorrection.py nodes/get_metadata.py - nodes/imager_create_dbs.py - nodes/make_flaggable.py - nodes/new_bbs.py - nodes/imager_bbs.py nodes/imager_awimager.py + nodes/imager_bbs.py nodes/imager_create_dbs.py nodes/imager_finalize.py nodes/imager_prepare.py nodes/imager_source_finding.py - nodes/gainoutliercorrection.py + nodes/new_bbs.py nodes/rficonsole.py nodes/setupparmdb.py nodes/setupsourcedb.py @@ -69,9 +46,11 @@ python_install( DESTINATION lofarpipe/recipes) install(PROGRAMS + bin/calibration_pipeline.py bin/msss_calibrator_pipeline.py bin/msss_imager_pipeline.py bin/msss_target_pipeline.py + bin/preprocessing_pipeline.py bin/startPython.sh external/bad_station_detection/asciistats.py external/bad_station_detection/statsplot.py diff --git a/CEP/Pipeline/recipes/sip/bin/calibration_pipeline.py b/CEP/Pipeline/recipes/sip/bin/calibration_pipeline.py new file mode 100644 index 00000000000..a469008c490 --- /dev/null +++ b/CEP/Pipeline/recipes/sip/bin/calibration_pipeline.py @@ -0,0 +1,236 @@ +#!/usr/bin/env python +# LOFAR CALIBRATION PIPELINE +# +# Calibration Pipeline recipe +# Marcel Loose, 2012 +# loose@astron.nl +# ------------------------------------------------------------------------------ + +import os +import sys + +from lofarpipe.support.control import control +from lofarpipe.support.group_data import validate_data_maps, tally_data_map +from lofarpipe.support.lofarexceptions import PipelineException +from lofarpipe.support.utilities import create_directory +from lofar.parameterset import parameterset + +class calibration_pipeline(control): + """ + The calibration pipeline can be used to pre-process raw UV-data (i.e. + average in time and frequency, flag RFI, and demix strong A-team sources), + and to calibrate these data using a user-supplied sky model. + + This pipeline will perform the following operations: + + 1. Prepare phase, collect data from parset and input mapfiles. + 2. Create VDS-file; it will contain important input-data for NDPPP + 3. Average and flag data, and demix A-team sources using NDPPP. + 4. Create a sourcedb from the user-supplied sky model, and an empty parmdb. + 5. Run BBS to calibrate the data. + """ + + def __init__(self): + super(calibration_pipeline, self).__init__() + self.parset = parameterset() + self.input_data = [] + self.output_data = [] + self.io_data_mask = [] + self.parset_feedback_file = None + + + def usage(self): + """ + Display usage + """ + print >> sys.stderr, "Usage: %s [options] <parset-file>" % sys.argv[0] + return 1 + + + def _get_io_product_specs(self): + """ + Get input- and output-data product specifications from the + parset-file, and do some sanity checks. + """ + dataproducts = self.parset.makeSubset( + self.parset.fullModuleName('DataProducts') + '.' + ) + self.input_data = [ + tuple(os.path.join(location, filename).split(':')) + for location, filename, skip in zip( + dataproducts.getStringVector('Input_Correlated.locations'), + dataproducts.getStringVector('Input_Correlated.filenames'), + dataproducts.getBoolVector('Input_Correlated.skip')) + if not skip + ] + self.logger.debug("%d Input_Correlated data products specified" % + len(self.input_data)) + self.output_data = [ + tuple(os.path.join(location, filename).split(':')) + for location, filename, skip in zip( + dataproducts.getStringVector('Output_Correlated.locations'), + dataproducts.getStringVector('Output_Correlated.filenames'), + dataproducts.getBoolVector('Output_Correlated.skip')) + if not skip + ] + self.logger.debug("%d Output_Correlated data products specified" % + len(self.output_data)) + # Sanity checks on input- and output data product specifications + if not validate_data_maps(self.input_data, self.output_data): + raise PipelineException( + "Validation of input/output data product specification failed!" + ) + # Validate input data, by searching the cluster for files + self._validate_input_data() + # Update input- and output-data product specifications if needed + if not all(self.io_data_mask): + self.logger.info("Updating input/output product specifications") + self.input_data = [ + f for (f, m) in zip(self.input_data, self.io_data_mask) if m + ] + self.output_data = [ + f for (f, m) in zip(self.output_data, self.io_data_mask) if m + ] + + + def _validate_input_data(self): + """ + Search for the requested input files and mask the files in + `self.input_data[]` that could not be found on the system. + """ + # Use filename glob-pattern as defined in LOFAR-USG-ICD-005. + self.io_data_mask = tally_data_map( + self.input_data, 'L*_SB???_uv.MS', self.logger + ) + # Log a warning if not all input data files were found. + if not all(self.io_data_mask): + self.logger.warn( + "The following input data files were not found: %s" % + ', '.join( + ':'.join(f) for (f, m) in zip( + self.input_data, self.io_data_mask + ) if not m + ) + ) + + + def go(self): + """ + Read the parset-file that was given as input argument; + set jobname, and input/output data products before calling the + base-class's `go()` method. + """ + try: + parset_file = os.path.abspath(self.inputs['args'][0]) + except IndexError: + return self.usage() + self.parset.adoptFile(parset_file) + self.parset_feedback_file = parset_file + "_feedback" + + # Set job-name to basename of parset-file w/o extension, if it's not + # set on the command-line with '-j' or '--job-name' + if not self.inputs.has_key('job_name'): + self.inputs['job_name'] = ( + os.path.splitext(os.path.basename(parset_file))[0]) + + # Call the base-class's `go()` method. + return super(calibration_pipeline, self).go() + + + def pipeline_logic(self): + """ + Define the individual tasks that comprise the current pipeline. + This method will be invoked by the base-class's `go()` method. + """ + # ********************************************************************* + # 1. Prepare phase, collect data from parset and input mapfiles. + py_parset = self.parset.makeSubset( + self.parset.fullModuleName('PythonControl') + '.') + + # Get input/output-data products specifications. + self._get_io_product_specs() + + job_dir = self.config.get("layout", "job_directory") + parset_dir = os.path.join(job_dir, "parsets") + mapfile_dir = os.path.join(job_dir, "mapfiles") + + # Create directories for temporary parset- and map files + create_directory(parset_dir) + create_directory(mapfile_dir) + + # Write input- and output data map-files + input_data_mapfile = os.path.join(mapfile_dir, "input_data.mapfile") + self._store_data_map(input_data_mapfile, self.input_data, "inputs") + output_data_mapfile = os.path.join(mapfile_dir, "output_data.mapfile") + self._store_data_map(output_data_mapfile, self.output_data, "output") + + if len(self.input_data) == 0: + self.logger.warn("No input data files to process. Bailing out!") + return 0 + + self.logger.debug("Processing: %s" % + ', '.join(':'.join(f) for f in self.input_data)) + + # ********************************************************************* + # 2. Create VDS-file; it will contain important input-data for NDPPP + gvds_file = self.run_task("vdsmaker", input_data_mapfile)['gvds'] + + # Read metadata (start, end times, pointing direction) from GVDS. + vdsinfo = self.run_task("vdsreader", gvds=gvds_file) + + # ********************************************************************* + # 3. Average and flag data, using NDPPP. + ndppp_parset = os.path.join(parset_dir, "NDPPP.parset") + py_parset.makeSubset('DPPP.').writeFile(ndppp_parset) + + # Run the Default Pre-Processing Pipeline (DPPP); + dppp_mapfile = self.run_task("ndppp", + input_data_mapfile, + data_start_time=vdsinfo['start_time'], + data_end_time=vdsinfo['end_time'], + parset=ndppp_parset)['mapfile'] + + # ********************************************************************* + # 4. Create a sourcedb from the user-supplied sky model, + # and an empty parmdb. + skymodel = py_parset.getString('Calibration.SkyModel') + + # The user-supplied sky model can either be a name, in which case the + # pipeline will search for a file <name>.skymodel in the default search + # path $LOFARROOT/share/pipeline/skymodels; or a full path. + # It is an error if the file does not exist. + if not os.path.isabs(skymodel): + skymodel = os.path.join( + # This should really become os.environ['LOFARROOT'] + self.config.get('DEFAULT', 'lofarroot'), + 'share', 'pipeline', 'skymodels', skymodel + '.skymodel' + ) + if not os.path.isfile(skymodel): + raise PipelineException("Skymodel %s does not exist" % skymodel) + + sourcedb_mapfile = self.run_task( + "setupsourcedb", dppp_mapfile, + skymodel=skymodel + )['mapfile'] + + parmdb_mapfile = self.run_task( + "setupparmdb", dppp_mapfile + )['mapfile'] + + # ********************************************************************* + # 5. Run BBS to calibrate the data. + + # Create a parameter subset for BBS + bbs_parset = os.path.join(parset_dir, "BBS.parset") + py_parset.makeSubset('BBS.').writeFile(bbs_parset) + + self.run_task("bbs_reducer", + (dppp_mapfile, output_data_mapfile), + parset=bbs_parset, + instrument_mapfile=parmdb_mapfile, + sky_mapfile=sourcedb_mapfile + ) + + +if __name__ == '__main__': + sys.exit(calibration_pipeline().main()) diff --git a/CEP/Pipeline/recipes/sip/bin/msss_calibrator_pipeline.py b/CEP/Pipeline/recipes/sip/bin/msss_calibrator_pipeline.py index 7c1028fef5f..2eb66409748 100755 --- a/CEP/Pipeline/recipes/sip/bin/msss_calibrator_pipeline.py +++ b/CEP/Pipeline/recipes/sip/bin/msss_calibrator_pipeline.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# LOFAR IMAGING PIPELINE +# LOFAR CALIBRATION PIPELINE # # Calibrator Pipeline recipe # Marcel Loose, 2011-2012 diff --git a/CEP/Pipeline/recipes/sip/bin/msss_imager_pipeline.py b/CEP/Pipeline/recipes/sip/bin/msss_imager_pipeline.py index 6e1fd0f0c63..534c0ca7928 100755 --- a/CEP/Pipeline/recipes/sip/bin/msss_imager_pipeline.py +++ b/CEP/Pipeline/recipes/sip/bin/msss_imager_pipeline.py @@ -1,10 +1,12 @@ #!/usr/bin/env python -# LOFAR IMAGING PIPELINE +# LOFAR IMAGING PIPELINE # -# Imager Pipeline recipe -# Marcel Loose, 2012 -# loose@astron.nl -# ------------------------------------------------------------------------------ +# Imager Pipeline recipe +# Marcel Loose, 2012 +# loose@astron.nl +# Wouter Klijn, 2012 +# klijn@astron.nl +# ----------------------------------------------------------------------------- import os import sys @@ -21,20 +23,20 @@ from lofar.parameterset import parameterset class msss_imager_pipeline(control): """ The Automatic MSSS imager pipeline is used to generate MSSS images and find - sources in the generated images. Generated images and lists of found sources - are complemented with meta data and thus ready for consumption by the - Long Term Storage (LTA) + sources in the generated images. Generated images and lists of found + sources are complemented with meta data and thus ready for consumption by + the Long Term Storage (LTA) *subband groups* The imager_pipeline is able to generate images on the frequency range of - LOFAR in parallel. Combining the frequency subbands together in so called - subbandgroups. Each subband group will result in an image and sourcelist, - (typically 8, because ten subband groups are combined). + LOFAR in parallel. Combining the frequency subbands together in so called + subbandgroups. Each subband group will result in an image and sourcelist, + (typically 8, because ten subband groups are combined). *Time Slices* - MSSS images are compiled from a number of so-called (time) slices. Each slice - comprises a short (approx. 10 min) observation of a field (an area on the - sky) containing typically 80 subbands. The number of slices will be + MSSS images are compiled from a number of so-called (time) slices. Each + slice comprises a short (approx. 10 min) observation of a field (an area on + the sky) containing typically 80 subbands. The number of slices will be different for LBA observations (typically 9) and HBA observations (typically 2), due to differences in sensitivity. @@ -45,38 +47,39 @@ class msss_imager_pipeline(control): **This pipeline performs the following operations:** 1. Prepare Phase. Copy the preprocessed MS's from the different compute - nodes to the nodes where the images will be compiled (the prepare phase). + nodes to the nodes where the images will be compiled (the prepare phase) Combine the subbands in subband groups, concattenate the timeslice in a single large measurement set and perform flagging, RFI and bad station exclusion. 2. Create db. Generate a local sky model (LSM) from the global sky model (GSM) for the sources that are in the field-of-view (FoV). The LSM is stored as sourcedb. - In step 3 calibration of the measurement sets is performed on these - sources and in step 4 to create a mask for the awimager. The calibration + In step 3 calibration of the measurement sets is performed on these + sources and in step 4 to create a mask for the awimager. The calibration solution will be placed in an instrument table/db also created in this step. 3. BBS. Calibrate the measurement set with the sourcedb from the gsm. In later iterations sourced found in the created images will be added - to this list. Resulting in a selfcalibration cycle. - 4. Awimager. The combined measurement sets are now imaged. The imaging - is performed using a mask: The sources in the sourcedb are used to create - an casa image masking known sources. Together with the measurement set - an image is created. - 5. Sourcefinding. The images created in step 4 are fed to pyBDSM to find and - describe sources. In multiple itterations substracting the found sources, - all sources are collectedin a sourcelist. - Step I. The sources found in step 5 are fed back into step 2. This allows the - Measurement sets to be calibrated with sources currently found in the - image. This loop will continue until convergence (3 times for the time - being). - 6. Finalize. Meta data with regards to the input, computations performed and - results are collected an added to the casa image. The images created are - converted from casa to HDF5 and copied to the correct output location. + to this list. Resulting in a selfcalibration cycle. + 4. Awimager. The combined measurement sets are now imaged. The imaging + is performed using a mask: The sources in the sourcedb are used to + create an casa image masking known sources. Together with the + measurement set an image is created. + 5. Sourcefinding. The images created in step 4 are fed to pyBDSM to find + and describe sources. In multiple itterations substracting the found + sources, all sources are collectedin a sourcelist. + Step I. The sources found in step 5 are fed back into step 2. + This allows the Measurement sets to be calibrated with sources currently + found in the image. This loop will continue until convergence (3 times + for the time being). + 6. Finalize. Meta data with regards to the input, computations performed + and results are collected an added to the casa image. The images created + are converted from casa to HDF5 and copied to the correct output + location. 7. Export meta data: An outputfile with meta data is generated ready for consumption by the LTA and/or the LOFAR framework. - + **Per subband-group, the following output products will be delivered:** a. An image @@ -98,7 +101,6 @@ class msss_imager_pipeline(control): self.parset_dir = None self.mapfile_dir = None - def usage(self): """ Display usage information @@ -119,13 +121,12 @@ class msss_imager_pipeline(control): self.parset_feedback_file = parset_file + "_feedback" # Set job-name to basename of parset-file w/o extension, if it's not # set on the command-line with '-j' or '--job-name' - if not self.inputs.has_key('job_name'): + if not 'job_name' in self.inputs: self.inputs['job_name'] = ( os.path.splitext(os.path.basename(parset_file))[0] ) return super(msss_imager_pipeline, self).go() - def pipeline_logic(self): """ Define the individual tasks that comprise the current pipeline. @@ -155,7 +156,7 @@ class msss_imager_pipeline(control): # ********************************************************************* # (INPUT) Get the input from external sources and create pipeline types - # Input measure ment sets + # Input measure ment sets input_mapfile = os.path.join(self.mapfile_dir, "uvdata.mapfile") store_data_map(input_mapfile, self.input_data) self.logger.debug( @@ -174,7 +175,7 @@ class msss_imager_pipeline(control): "Wrote output sky-image mapfile: {0}".format(output_image_mapfile)) # ****************************************************************** - # (1) prepare phase: copy and collect the ms + # (1) prepare phase: copy and collect the ms concat_ms_map_path, timeslice_map_path, raw_ms_per_image_map_path, \ processed_ms_dir = self._prepare_phase(input_mapfile, target_mapfile, skip=False) @@ -196,15 +197,14 @@ class msss_imager_pipeline(control): bbs_output = self._bbs(timeslice_map_path, parmdbs_path, sourcedb_map_path, skip=False) - - # ****************************************************************** + # ***************************************************************** # (4) Get parameters awimager from the prepare_parset and inputs aw_image_mapfile, maxbaseline = self._aw_imager(concat_ms_map_path, idx_loop, sourcedb_map_path, skip=False) # ***************************************************************** - # (5) Source finding + # (5) Source finding sourcelist_map, found_sourcedb_path = self._source_finding( aw_image_mapfile, idx_loop, skip=False) #should the output be a sourcedb? instead of a sourcelist @@ -271,7 +271,7 @@ class msss_imager_pipeline(control): """ Perform the final step of the imager: Convert the output image to hdf5 and copy to output location - Collect meta data and add to the image + Collect meta data and add to the image """ placed_image_mapfile = self._write_datamap_to_file(None, @@ -317,7 +317,8 @@ class msss_imager_pipeline(control): sourcedb_map_path = self._write_datamap_to_file(None, "source_dbs_outputs", "Map to sourcedbs based in found sources") - # construct the location to save the output products of the sourcefinder + # construct the location to save the output products of the + # sourcefinder cycle_path = os.path.join(self.scratch_directory, "awimage_cycle_{0}".format(major_cycle)) catalog_path = os.path.join(cycle_path, "bdsm_catalog") @@ -340,31 +341,30 @@ class msss_imager_pipeline(control): return source_list_map, sourcedb_map_path - def _bbs(self, timeslice_map_path, parmdbs_map_path, sourcedb_map_path, skip=False): """ Perform a calibration step. First with a set of sources from the gsm and in later iterations also on the found sources """ - #create parset for bbs run + #create parset for bbs run parset = self.parset.makeSubset("BBS.") parset_path = self._write_parset_to_file(parset, "bbs", - "Parset for calibration on local sky model") + "Parset for calibration on local sky model") # create the output file path output_mapfile = self._write_datamap_to_file(None, "bbs_output", "Mapfile with calibrated measurement sets.") converted_sourcedb_map_path = self._write_datamap_to_file(None, - "source_db", "correctly shaped mapfile for input sourcedbs") + "source_db", "correctly shaped mapfile for input sourcedbs") if skip: return output_mapfile # The create db step produces a mapfile with a single sourcelist for # the different timeslices. Generate a mapfile with copies of the - # sourcelist location: This allows validation of maps in combination + # sourcelist location: This allows validation of maps in combination # get the original map data sourcedb_map = load_data_map(sourcedb_map_path) @@ -408,12 +408,17 @@ class msss_imager_pipeline(control): parset = self.parset.makeSubset("AWimager.") # Get maxbaseline from 'full' parset max_baseline = self.parset.getInt("Imaging.maxbaseline") - patch_dictionary = {"maxbaseline":str( + patch_dictionary = {"maxbaseline": str( max_baseline)} - temp_parset_filename = patch_parset(parset, patch_dictionary) - aw_image_parset = get_parset(temp_parset_filename) - aw_image_parset_path = self._write_parset_to_file(aw_image_parset, - "awimager_cycle_{0}".format(major_cycle), "Awimager recipe parset") + try: + temp_parset_filename = patch_parset(parset, patch_dictionary) + aw_image_parset = get_parset(temp_parset_filename) + aw_image_parset_path = self._write_parset_to_file(aw_image_parset, + "awimager_cycle_{0}".format(major_cycle), + "Awimager recipe parset") + finally: + # remove tempfile + os.remove(temp_parset_filename) # Create path to write the awimage files intermediate_image_path = os.path.join(self.scratch_directory, @@ -438,16 +443,15 @@ class msss_imager_pipeline(control): return output_mapfile, max_baseline - def _prepare_phase(self, input_ms_map_path, target_mapfile, skip=False): """ - Copy ms to correct location, combine the ms in slices and combine + Copy ms to correct location, combine the ms in slices and combine the time slices into a large virtual measurement set """ # Create the dir where found and processed ms are placed # raw_ms_per_image_map_path contains all the original ms locations: - # this list contains possible missing files + # this list contains possible missing files processed_ms_dir = os.path.join(self.scratch_directory, "subbands") # get the parameters, create a subset for ndppp, save @@ -459,7 +463,7 @@ class msss_imager_pipeline(control): #[1] output -> prepare_output output_mapfile = self._write_datamap_to_file(None, "prepare_output") time_slices_mapfile = self._write_datamap_to_file(None, - "prepare_time_slices") + "prepare_time_slices") raw_ms_per_image_mapfile = self._write_datamap_to_file(None, "raw_ms_per_image") @@ -505,11 +509,10 @@ class msss_imager_pipeline(control): return output_mapfile, time_slices_mapfile, raw_ms_per_image_mapfile, \ processed_ms_dir - def _create_dbs(self, input_map_path, timeslice_map_path, source_list="", skip_create_dbs=False): """ - Create for each of the concatenated input measurement sets + Create for each of the concatenated input measurement sets an instrument model and parmdb """ # Create the parameters set @@ -545,10 +548,9 @@ class msss_imager_pipeline(control): # TODO: Move these helpers to the parent class def _write_parset_to_file(self, parset, parset_name, message): """ - Write the suplied the suplied parameterset to the parameter set + Write the suplied the suplied parameterset to the parameter set directory in the jobs dir with the filename suplied in parset_name. Return the full path to the created file. - """ parset_dir = os.path.join( self.config.get("layout", "job_directory"), "parsets") @@ -566,12 +568,11 @@ class msss_imager_pipeline(control): return parset_path - def _write_datamap_to_file(self, datamap, mapfile_name, message=""): """ - Write the suplied the suplied map to the mapfile + Write the suplied the suplied map to the mapfile. directory in the jobs dir with the filename suplied in mapfile_name. - Return the full path to the created file. + Return the full path to the created file. Id supllied data is None then the file is touched if not existing, but existing files are kept as is """ @@ -596,10 +597,8 @@ class msss_imager_pipeline(control): self.logger.debug( "Touched mapfile <{0}>: {1}".format(mapfile_path, message)) - return mapfile_path if __name__ == '__main__': sys.exit(msss_imager_pipeline().main()) - diff --git a/CEP/Pipeline/recipes/sip/bin/msss_target_pipeline.py b/CEP/Pipeline/recipes/sip/bin/msss_target_pipeline.py index f02495c285f..a952274df85 100755 --- a/CEP/Pipeline/recipes/sip/bin/msss_target_pipeline.py +++ b/CEP/Pipeline/recipes/sip/bin/msss_target_pipeline.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# LOFAR IMAGING PIPELINE +# LOFAR CALIBRATION PIPELINE # # Target Pre-Processing Pipeline recipe # Marcel Loose, 2011 @@ -162,20 +162,20 @@ class msss_target_pipeline(control): self.io_data_mask = [x and y for (x, y) in zip(data_mask, inst_mask)] - def _create_target_map_for_instruments(self, instrument_map, - input_data_map): + def _create_target_map_for_instruments(self): """ - Create a mapfile with target locations: based on the host found in the - input_data_map, the name of the instrument file and the working \ - directory + job name + Create a mapfile with target locations: based on the host found in + the input data map, the name of the instrument file in the input + instrument map, and the working directory + job name """ scratch_dir = os.path.join( self.inputs['working_directory'], self.inputs['job_name']) target_locations = [] - for instrument_pair, data_pair in zip(instrument_map, input_data_map): - host_instr, path_instr = instrument_pair - host_data, path_data = data_pair + for instrument_pair, data_pair \ + in zip(self.input_data['instrument'], self.input_data['data']): + path_instr = instrument_pair[1] + host_data = data_pair[0] # target location == working dir instrument file name target_path = os.path.join(scratch_dir, os.path.basename(path_instr)) target_locations.append((host_data, target_path)) @@ -183,19 +183,17 @@ class msss_target_pipeline(control): return target_locations - def _copy_instrument_files(self, instrument_map, input_data_map, - mapfile_dir): + def _copy_instrument_files(self, mapfile_dir): # For the copy recipe a target mapfile is needed - # create target map based on the node and the dir in the input_data_map + # create target map based on the node and the dir in the input data map # with the filename based on the copier_map_path = os.path.join(mapfile_dir, "copier") create_directory(copier_map_path) - target_map = self._create_target_map_for_instruments(instrument_map, - input_data_map) + target_map = self._create_target_map_for_instruments() #Write the two needed maps to file source_path = os.path.join(copier_map_path, "source_instruments.map") - store_data_map(source_path, instrument_map) + store_data_map(source_path, self.input_data['instrument']) target_path = os.path.join(copier_map_path, "target_instruments.map") store_data_map(target_path, target_map) @@ -215,13 +213,19 @@ class msss_target_pipeline(control): copied_instruments_map = load_data_map(copied_instruments_mapfile) new_instrument_map = [] new_input_data_map = [] - for instrument_pair, input_data_pair in zip(target_map, input_data_map): + new_output_data_map = [] + for instrument_pair, input_data_pair, output_data_pair in \ + zip(target_map, self.input_data['data'], self.output_data['data']): if instrument_pair in copied_instruments_map: new_instrument_map.append(instrument_pair) new_input_data_map.append(input_data_pair) + new_output_data_map.append(output_data_pair) # else: Do not process further in the recipe - return new_instrument_map, new_input_data_map + self.input_data['instrument'] = new_instrument_map + self.input_data['data'] = new_input_data_map + self.output_data['data'] = new_output_data_map + def go(self): """ @@ -272,9 +276,7 @@ class msss_target_pipeline(control): # Copy the instrument files to the corrent nodes: failures might happen # update both intrument and datamap to contain only successes! - self.input_data['instrument'], self.input_data['data'] = \ - self._copy_instrument_files(self.input_data['instrument'], - self.input_data['data'], mapfile_dir) + self._copy_instrument_files(mapfile_dir) # Write input- and output data map-files. diff --git a/CEP/Pipeline/recipes/sip/bin/preprocessing_pipeline.py b/CEP/Pipeline/recipes/sip/bin/preprocessing_pipeline.py new file mode 100644 index 00000000000..4f0a1f15335 --- /dev/null +++ b/CEP/Pipeline/recipes/sip/bin/preprocessing_pipeline.py @@ -0,0 +1,192 @@ +#!/usr/bin/env python +# LOFAR PRE-PROCESSING PIPELINE +# +# Pre-Processing Pipeline recipe +# Marcel Loose, 2012 +# loose@astron.nl +# ------------------------------------------------------------------------------ + +import os +import sys + +from lofarpipe.support.control import control +from lofarpipe.support.group_data import validate_data_maps, tally_data_map +from lofarpipe.support.lofarexceptions import PipelineException +from lofarpipe.support.utilities import create_directory +from lofar.parameterset import parameterset + +class preprocessing_pipeline(control): + """ + The pre-processing pipeline can be used to average raw UV-data in time + and frequency, to flag RFI, and to demix strong A-team sources. + + This pipeline will perform the following operations: + + 1. Prepare phase, collect data from parset and input mapfiles. + 2. Create VDS-file; it will contain important input-data for NDPPP + 3. Average and flag data, and demix A-team sources using NDPPP. + """ + + def __init__(self): + super(preprocessing_pipeline, self).__init__() + self.parset = parameterset() + self.input_data = [] + self.output_data = [] + self.io_data_mask = [] + self.parset_feedback_file = None + + + def usage(self): + """ + Display usage + """ + print >> sys.stderr, "Usage: %s [options] <parset-file>" % sys.argv[0] + return 1 + + + def _get_io_product_specs(self): + """ + Get input- and output-data product specifications from the + parset-file, and do some sanity checks. + """ + dataproducts = self.parset.makeSubset( + self.parset.fullModuleName('DataProducts') + '.' + ) + self.input_data = [ + tuple(os.path.join(location, filename).split(':')) + for location, filename, skip in zip( + dataproducts.getStringVector('Input_Correlated.locations'), + dataproducts.getStringVector('Input_Correlated.filenames'), + dataproducts.getBoolVector('Input_Correlated.skip')) + if not skip + ] + self.logger.debug("%d Input_Correlated data products specified" % + len(self.input_data)) + self.output_data = [ + tuple(os.path.join(location, filename).split(':')) + for location, filename, skip in zip( + dataproducts.getStringVector('Output_Correlated.locations'), + dataproducts.getStringVector('Output_Correlated.filenames'), + dataproducts.getBoolVector('Output_Correlated.skip')) + if not skip + ] + self.logger.debug("%d Output_Correlated data products specified" % + len(self.output_data)) + # Sanity checks on input- and output data product specifications + if not validate_data_maps(self.input_data, self.output_data): + raise PipelineException( + "Validation of input/output data product specification failed!" + ) + # Validate input data, by searching the cluster for files + self._validate_input_data() + # Update input- and output-data product specifications if needed + if not all(self.io_data_mask): + self.logger.info("Updating input/output product specifications") + self.input_data = [ + f for (f, m) in zip(self.input_data, self.io_data_mask) if m + ] + self.output_data = [ + f for (f, m) in zip(self.output_data, self.io_data_mask) if m + ] + + + def _validate_input_data(self): + """ + Search for the requested input files and mask the files in + `self.input_data[]` that could not be found on the system. + """ + # Use filename glob-pattern as defined in LOFAR-USG-ICD-005. + self.io_data_mask = tally_data_map( + self.input_data, 'L*_SB???_uv.MS', self.logger + ) + # Log a warning if not all input data files were found. + if not all(self.io_data_mask): + self.logger.warn( + "The following input data files were not found: %s" % + ', '.join( + ':'.join(f) for (f, m) in zip( + self.input_data, self.io_data_mask + ) if not m + ) + ) + + + def go(self): + """ + Read the parset-file that was given as input argument; + set jobname, and input/output data products before calling the + base-class's `go()` method. + """ + try: + parset_file = os.path.abspath(self.inputs['args'][0]) + except IndexError: + return self.usage() + self.parset.adoptFile(parset_file) + self.parset_feedback_file = parset_file + "_feedback" + + # Set job-name to basename of parset-file w/o extension, if it's not + # set on the command-line with '-j' or '--job-name' + if not self.inputs.has_key('job_name'): + self.inputs['job_name'] = ( + os.path.splitext(os.path.basename(parset_file))[0]) + + # Call the base-class's `go()` method. + return super(preprocessing_pipeline, self).go() + + + def pipeline_logic(self): + """ + Define the individual tasks that comprise the current pipeline. + This method will be invoked by the base-class's `go()` method. + """ + # ********************************************************************* + # 1. Prepare phase, collect data from parset and input mapfiles. + py_parset = self.parset.makeSubset( + self.parset.fullModuleName('PythonControl') + '.') + + # Get input/output-data products specifications. + self._get_io_product_specs() + + job_dir = self.config.get("layout", "job_directory") + parset_dir = os.path.join(job_dir, "parsets") + mapfile_dir = os.path.join(job_dir, "mapfiles") + + # Create directories for temporary parset- and map files + create_directory(parset_dir) + create_directory(mapfile_dir) + + # Write input- and output data map-files + input_data_mapfile = os.path.join(mapfile_dir, "input_data.mapfile") + self._store_data_map(input_data_mapfile, self.input_data, "inputs") + output_data_mapfile = os.path.join(mapfile_dir, "output_data.mapfile") + self._store_data_map(output_data_mapfile, self.output_data, "output") + + if len(self.input_data) == 0: + self.logger.warn("No input data files to process. Bailing out!") + return 0 + + self.logger.debug("Processing: %s" % + ', '.join(':'.join(f) for f in self.input_data)) + + # ********************************************************************* + # 2. Create VDS-file; it will contain important input-data for NDPPP + gvds_file = self.run_task("vdsmaker", input_data_mapfile)['gvds'] + + # Read metadata (start, end times, pointing direction) from GVDS. + vdsinfo = self.run_task("vdsreader", gvds=gvds_file) + + # ********************************************************************* + # 3. Average and flag data, using NDPPP. + ndppp_parset = os.path.join(parset_dir, "NDPPP.parset") + py_parset.makeSubset('DPPP.').writeFile(ndppp_parset) + + # Run the Default Pre-Processing Pipeline (DPPP); + self.run_task("ndppp", + (input_data_mapfile, output_data_mapfile), + data_start_time=vdsinfo['start_time'], + data_end_time=vdsinfo['end_time'], + parset=ndppp_parset) + + +if __name__ == '__main__': + sys.exit(preprocessing_pipeline().main()) diff --git a/CEP/Pipeline/recipes/sip/bin/startPython.sh b/CEP/Pipeline/recipes/sip/bin/startPython.sh index 61f04cb99f8..dcd39e36328 100755 --- a/CEP/Pipeline/recipes/sip/bin/startPython.sh +++ b/CEP/Pipeline/recipes/sip/bin/startPython.sh @@ -53,7 +53,7 @@ if [ -n "$debug" ]; then echo "**** $(date) ****" >> ${logFile} echo "$0 $@" >> ${logFile} echo "PATH=${PATH}" >> ${logFile} - echo "PYHONTPATH=${PYTHONPATH}" >> ${logFile} + echo "PYTHONPATH=${PYTHONPATH}" >> ${logFile} echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" >> ${logFile} echo "${pythonProgram} ${programOptions} ${parsetFile}" >> ${logFile} fi diff --git a/CEP/Pipeline/recipes/sip/master/bbs.py b/CEP/Pipeline/recipes/sip/master/deprecated/bbs.py similarity index 100% rename from CEP/Pipeline/recipes/sip/master/bbs.py rename to CEP/Pipeline/recipes/sip/master/deprecated/bbs.py diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/casapy.py b/CEP/Pipeline/recipes/sip/master/deprecated/casapy.py deleted file mode 100644 index 36332ca328d..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/casapy.py +++ /dev/null @@ -1,186 +0,0 @@ -from __future__ import with_statement -import sys, os - -# Local helpers -from lofarpipe.support.lofarrecipe import LOFARrecipe -from lofarpipe.support.lofaringredient import LOFARoutput, LOFARinput -from lofarpipe.support.ipython import LOFARTask -from lofarpipe.support.group_data import group_files -import lofarpipe.support.utilities as utilities -from lofarpipe.support.clusterlogger import clusterlogger -from lofarpipe.support.clusterdesc import ClusterDesc - -def run_casapy(infile, parset, start_time, end_time, increment): - # Run on engine to process data with Casapy - from lofarrecipe.nodes.casapy import casapy_node - return casapy_node(loghost=loghost, logport=logport).run( - infile, - parset, - start_time, - end_time, - increment - ) - -class casapy(LOFARrecipe): - def __init__(self): - super(casapy, self).__init__() - self.optionparser.add_option( - '--executable', - dest="executable", - help="CASApy executable" - ) - self.optionparser.add_option( - '-p', '--parset', - dest="parset", - help="Parset containing configuration for CASAPY" - ) - self.optionparser.add_option( - '-w', '--working-directory', - dest="working_directory", - help="Working directory used on compute nodes" - ) - self.optionparser.add_option( - '-t', '--increment', - dest="increment", - help="Length of each image in seconds" - ) - self.optionparser.add_option( - '-g', '--g(v)ds-file', - dest="gvds", - help="G(V)DS file describing data to be processed" - ) - self.optionparser.add_option( - '--makevds-exec', - dest="makevds_exec", - help="makevds executable" - ) - self.optionparser.add_option( - '--combinevds-exec', - dest="combinevds_exec", - help="combinevds executable" - ) - self.optionparser.add_option( - '--max-bands-per-node', - dest="max_bands_per_node", - help="Maximum number of subbands to farm out to a given cluster node", - default="8" - ) - - def go(self): - self.logger.info("Starting CASApy run") - super(casapy, self).go() - - job_directory = self.config.get("layout", "job_directory") - - # Connect to the IPython cluster and initialise it with - # the funtions we need. - tc, mec = self._get_cluster() - mec.push_function( - dict( - run_casapy=run_casapy, - build_available_list=utilities.build_available_list, - clear_available_list=utilities.clear_available_list - ) - ) - self.logger.info("Pushed functions to cluster") - - # Use build_available_list() to determine which SBs are available - # on each engine; we use this for dependency resolution later. - self.logger.info("Building list of data available on engines") - available_list = "%s%s" % ( - self.inputs['job_name'], self.__class__.__name__ - ) - mec.push(dict(filenames=self.inputs['args'])) - mec.execute( - "build_available_list(\"%s\")" % (available_list,) - ) - - clusterdesc = ClusterDesc( - self.config.get('cluster', 'clusterdesc') - ) - - for data_group in group_files( - self.logger, - clusterdesc, - os.path.join(self.inputs['working_directory'], self.inputs['job_name']), - int(self.inputs['max_bands_per_node']), - self.inputs['args'] - ): - self.logger.debug("Processing: " + str(data_group)) - self.logger.info("Calling vdsmaker") - inputs = LOFARinput(self.inputs) - inputs['directory'] = self.config.get('layout', 'vds_directory') - inputs['gvds'] = self.inputs['gvds'] - inputs['args'] = data_group - inputs['makevds'] = self.inputs['makevds_exec'] - inputs['combinevds'] = self.inputs['combinevds_exec'] - outputs = LOFARoutput() - if self.cook_recipe('vdsmaker', inputs, outputs): - self.logger.warn("vdsmaker reports failure") - return 1 - - - gvds = utilities.get_parset( - os.path.join( - self.config.get('layout', 'vds_directory'), self.inputs['gvds'] - ) - ) - start_time = gvds['StartTime'] - end_time = gvds['EndTime'] - self.inputs['increment'] = int(self.inputs['increment']) - - # clusterlogger context manager accepts networked logging - # from compute nodes. - with clusterlogger(self.logger) as (loghost, logport): - # Timer for total casapy job execution - with utilities.log_time(self.logger): - self.logger.debug("Logging to %s:%d" % (loghost, logport)) - tasks = [] - # Iterate over SB names, building and scheduling a casapy job - # for each one. - for ms_name in data_group: - task = LOFARTask( - "result = run_casapy(infile, parset, start_time, end_time, increment)", - push=dict( - infile=ms_name, - parset=self.inputs['parset'], - start_time=start_time, - end_time=end_time, - increment=self.inputs['increment'], - loghost=loghost, - logport=logport - ), - pull="result", - depend=utilities.check_for_path, - dependargs=(ms_name, available_list) - ) - self.logger.info("Scheduling processing of %s" % (ms_name,)) - if self.inputs['dry_run'] == "False": - self.inputs['dry_run'] = False - if not self.inputs['dry_run']: - tasks.append(tc.run(task)) - else: - self.logger.info("Dry run: scheduling skipped") - - # Wait for all jobs to finish - self.logger.info("Waiting for all CASApy tasks to complete") - tc.barrier(tasks) - - failure = False - for task in tasks: - ##### Print failing tasks? - ##### Abort if all tasks failed? - res = tc.get_task_result(task) - if res.failure: - self.logger.warn("Task %s failed" % (task)) - self.logger.warn(res) - self.logger.warn(res.failure.getTraceback()) - failure = True - - if failure: - return 1 -# self.outputs['data'] = outnames - return 0 - -if __name__ == '__main__': - sys.exit(casapy().main()) diff --git a/CEP/Pipeline/recipes/sip/master/cep2_datamapper.py b/CEP/Pipeline/recipes/sip/master/deprecated/cep2_datamapper.py similarity index 100% rename from CEP/Pipeline/recipes/sip/master/cep2_datamapper.py rename to CEP/Pipeline/recipes/sip/master/deprecated/cep2_datamapper.py diff --git a/CEP/Pipeline/recipes/sip/master/cimager.py b/CEP/Pipeline/recipes/sip/master/deprecated/cimager.py similarity index 100% rename from CEP/Pipeline/recipes/sip/master/cimager.py rename to CEP/Pipeline/recipes/sip/master/deprecated/cimager.py diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/collector.py b/CEP/Pipeline/recipes/sip/master/deprecated/collector.py deleted file mode 100644 index 5d87ba4845c..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/collector.py +++ /dev/null @@ -1,140 +0,0 @@ -# Local helpers -from lofarpipe.support.lofarrecipe import LOFARrecipe -from lofarpipe.support.ipython import LOFARTask -from lofarpipe.support.clusterdesc import ClusterDesc, get_compute_nodes -import lofarpipe.support.utilities as utilities -import pyrap.images -from skim.main import run as create_hdf5 -import os, os.path, glob, subprocess, sys, numpy -import shutil, errno, re, logging, imp - -class collector(LOFARrecipe): - """ - Collect images into results directory. - Convert to fits files. - Average. - - Outstanding issue: breaks if the results directory is already - populated and the --clobber option isn't set. - """ - - def __init__(self): - super(collector, self).__init__() - self.optionparser.add_option( - '--image-re', - dest="image_re", - help="Regular expression to match CASA image names", - ) - self.optionparser.add_option( - '--working-directory', - dest="working_directory", - help="Working directory containing images on compute nodes", - ) - self.optionparser.add_option( - '--image2fits', - dest="image2fits", - help="Location of image2fits tool (from casacore)" - ) - self.optionparser.add_option( - '--averaged-name', - dest="averaged_name", - help="Base filename for averaged images" - ) - - def go(self): - self.logger.info("Starting data collector run") - super(collector, self).go() - - clusterdesc = ClusterDesc( - self.config.get('cluster', 'clusterdesc') - ) - results_dir = self.config.get('layout', 'results_directory') - try: - os.makedirs(results_dir) - except OSError, failure: - if failure.errno != errno.EEXIST: - raise - - self.logger.debug("Copying CASA images to to %s" % (results_dir)) - for node in get_compute_nodes(clusterdesc): - self.logger.debug("Node: %s" % (node)) - try: - exec_string = [ - "ssh", - node, - "--", - "cp", - "-r", - "%s/%s/%s" % ( - self.inputs['working_directory'], - self.inputs['job_name'], - self.inputs['image_re'] - ), - results_dir - ] - self.logger.info(exec_string) - subprocess.check_call(exec_string, close_fds=True) - except subprocess.CalledProcessError: - self.logger.warn("No images moved from %s" % (node)) - - image_names = glob.glob("%s/%s" % (results_dir, self.inputs['image_re'])) - if len(image_names) > 0: - self.logger.info("Averaging results") - result = reduce( - numpy.add, - (pyrap.images.image(file).getdata() for file in image_names) - ) / len(image_names) - - self.logger.info("Writing averaged files") - averaged_file = os.path.join( - self.config.get('layout', 'results_directory'), - self.inputs['averaged_name'] - ) - # Output for the averaged image. - # Use the coordinate system from SB0. - output = pyrap.images.image( - averaged_file + ".img", values=result, - coordsys=pyrap.images.image(image_names[0]).coordinates() - ) - self.logger.info("Wrote: %s" % (averaged_file + ".img",)) - output.tofits(averaged_file + ".fits") - self.logger.info("Wrote: %s" % (averaged_file + ".fits",)) - self.outputs['data'] = (averaged_file + ".fits",) - else: - self.logger.info("No images found; not averaging") - self.outputs['data'] = None - - self.logger.info("Generating FITS files") - fits_files = [] - for filename in image_names: - self.logger.debug(filename) - subband = re.search('(SB\d+)', os.path.basename(filename)).group() - output = os.path.join( - self.config.get('layout', 'results_directory'), - "%s.fits" % (subband) - ) - fits_files.append(output) - subprocess.check_call( - [ - self.inputs['image2fits'], - 'in=%s' % (filename), - 'out=%s' % (output) - ], - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - close_fds=True - ) - - self.logger.info("Creating HDF5 file") - hdf5logger = logging.getLogger(self.logger.name + ".hdf5") - hdf5logger.setLevel(logging.INFO) - create_hdf5( - self.config.get('layout', 'job_directory'), - self.inputs['start_time'], - hdf5logger - ) - - return 0 - -if __name__ == '__main__': - sys.exit(collector().main()) diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/colmaker.py b/CEP/Pipeline/recipes/sip/master/deprecated/colmaker.py deleted file mode 100644 index cf4bf423b56..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/colmaker.py +++ /dev/null @@ -1,67 +0,0 @@ -from __future__ import with_statement -import sys, os, tempfile - -from lofarpipe.support.ipython import LOFARTask -from lofarpipe.support.lofarrecipe import LOFARrecipe -import lofarpipe.support.utilities as utilities -from lofarpipe.support.clusterlogger import clusterlogger - -def make_columns(file): - from lofarrecipe.nodes.colmaker import makecolumns_node - return makecolumns_node(loghost=loghost, logport=logport).run(file) - -class colmaker(LOFARrecipe): - """ - Add imaging columns to inputs using pyrap. - """ - def go(self): - super(colmaker, self).go() - - ms_names = self.inputs['args'] - - tc, mec = self._get_cluster() - mec.push_function( - dict( - make_columns=make_columns, - build_available_list=utilities.build_available_list, - clear_available_list=utilities.clear_available_list - ) - ) - self.logger.info("Pushed functions to cluster") - - # Build VDS files for each of the newly created MeasurementSets - self.logger.info("Building list of data available on engines") - available_list = "%s%s" % (self.inputs['job_name'], "colmaker") - mec.push(dict(filenames=ms_names)) - mec.execute( - "build_available_list(\"%s\")" % (available_list,) - ) - clusterdesc = self.config.get('cluster', 'clusterdesc') - tasks = [] - - with clusterlogger(self.logger) as (loghost, logport): - for ms_name in ms_names: - task = LOFARTask( - "result = make_columns(ms_name)", - push=dict( - ms_name=ms_name, - loghost=loghost, - logport=logport - ), - pull="result", - depend=utilities.check_for_path, - dependargs=(ms_name, available_list) - ) - self.logger.info("Scheduling processing of %s" % (ms_name,)) - tasks.append(tc.run(task)) - self.logger.info("Waiting for all colmaker tasks to complete") - tc.barrier(tasks) - for task in tasks: - res = tc.get_task_result(task) - if res.failure: - print res.failure - - mec.execute("clear_available_list(\"%s\")" % (available_list,)) - -if __name__ == '__main__': - sys.exit(colmaker().main()) diff --git a/CEP/Pipeline/recipes/sip/master/compression_pipeline.py b/CEP/Pipeline/recipes/sip/master/deprecated/compression_pipeline.py similarity index 100% rename from CEP/Pipeline/recipes/sip/master/compression_pipeline.py rename to CEP/Pipeline/recipes/sip/master/deprecated/compression_pipeline.py diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/copier.py b/CEP/Pipeline/recipes/sip/master/deprecated/copier.py deleted file mode 100644 index 47434b3d242..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/copier.py +++ /dev/null @@ -1,50 +0,0 @@ -# Local helpers -from lofarpipe.support.lofarrecipe import LOFARrecipe -import lofarpipe.support.utilities as utilities -import os.path - -class copier(LOFARrecipe): - """ - Copy files to compute nodes. - """ - def __init__(self): - super(copier, self).__init__() - self.optionparser.add_option( - '--destination', - dest="destination", - help="Destination directory on compute nodes" - ) - - def go(self): - self.logger.info("Starting copier run") - super(copier, self).go() - - tc, mec = self._get_cluster() - - mec.execute('import shutil') - - self.logger.info("Compiling list of output destinations") - destinations = [ - os.path.join( - self.inputs['destination'], - os.path.basename(file) - ) - for file in self.inputs['args'] - ] - self.logger.debug(destinations) - - self.logger.info("Copying files on cluster") - try: - tc.map( - lambda x: shutil.copytree(x[0], x[1]), - zip(self.inputs['args'], destinations) - ) - except Exception, e: - self.logger.exception('Failed to copy files on cluster') - return 1 - - self.outputs['ms_names'] = destinations - - return 0 - - diff --git a/CEP/Pipeline/recipes/sip/master/count_timesteps.py b/CEP/Pipeline/recipes/sip/master/deprecated/count_timesteps.py similarity index 100% rename from CEP/Pipeline/recipes/sip/master/count_timesteps.py rename to CEP/Pipeline/recipes/sip/master/deprecated/count_timesteps.py diff --git a/CEP/Pipeline/recipes/sip/master/datamapper.py b/CEP/Pipeline/recipes/sip/master/deprecated/datamapper.py similarity index 100% rename from CEP/Pipeline/recipes/sip/master/datamapper.py rename to CEP/Pipeline/recipes/sip/master/deprecated/datamapper.py diff --git a/CEP/Pipeline/recipes/sip/master/demixing.py b/CEP/Pipeline/recipes/sip/master/deprecated/demixing.py similarity index 100% rename from CEP/Pipeline/recipes/sip/master/demixing.py rename to CEP/Pipeline/recipes/sip/master/deprecated/demixing.py diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/dppp.py b/CEP/Pipeline/recipes/sip/master/deprecated/dppp.py deleted file mode 100644 index 71795699c67..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/dppp.py +++ /dev/null @@ -1,151 +0,0 @@ -from __future__ import with_statement -import sys, os - -import lofarpipe.support.utilities as utilities -from lofarpipe.support.lofarrecipe import LOFARrecipe -from lofarpipe.support.ipython import LOFARTask -from lofarpipe.support.clusterlogger import clusterlogger -from lofarpipe.support.lofarnode import run_node - -class dppp(LOFARrecipe): - def __init__(self): - super(dppp, self).__init__() - self.optionparser.add_option( - '--executable', - dest="executable", - help="DPPP executable" - ) - self.optionparser.add_option( - '--initscript', - dest="initscript", - help="DPPP initscript" - ) - self.optionparser.add_option( - '-p', '--parset', - dest="parset", - help="Parset containing configuration for DPPP" - ) - self.optionparser.add_option( - '--suffix', - dest="suffix", - default=".dppp", - help="Suffix to add to trimmed data (default: overwrite existing)" - ) - self.optionparser.add_option( - '-w', '--working-directory', - dest="working_directory", - help="Working directory used on compute nodes" - ) - self.optionparser.add_option( - '--data-start-time', - help="Start time to be passed to DPPP (optional)", - ) - self.optionparser.add_option( - '--data-end-time', - help="End time to be passed to DPPP (optional)", - ) - self.optionparser.add_option( - '--nthreads', - help="Number of threads per (N)DPPP process", - default="2" - ) - - - def go(self): - self.logger.info("Starting DPPP run") - super(dppp, self).go() - - job_directory = self.config.get("layout", "job_directory") - ms_names = self.inputs['args'] - - # Connect to the IPython cluster and initialise it with - # the funtions we need. - tc, mec = self._get_cluster() - mec.push_function( - dict( - run_dppp=run_node, - build_available_list=utilities.build_available_list, - clear_available_list=utilities.clear_available_list - ) - ) - self.logger.debug("Pushed functions to cluster") - - # Use build_available_list() to determine which SBs are available - # on each engine; we use this for dependency resolution later. - self.logger.debug("Building list of data available on engines") - available_list = "%s%s" % ( - self.inputs['job_name'], self.__class__.__name__ - ) - mec.push(dict(filenames=ms_names)) - mec.execute( - "build_available_list(\"%s\")" % (available_list,) - ) - self.logger.debug("Data lists available. Starting processing loop.") - - # clusterlogger context manager accepts networked logging - # from compute nodes. - with clusterlogger(self.logger) as (loghost, logport): - # Timer for total DPPP job execution - with utilities.log_time(self.logger): - self.logger.debug("Logging to %s:%d" % (loghost, logport)) - tasks = [] - outnames = [] - # Iterate over SB names, building and scheduling a DPPP job - # for each one. - for ms_name in ms_names: - outnames.append( - os.path.join( - self.inputs['working_directory'], - self.inputs['job_name'], - os.path.basename(ms_name) + self.inputs['suffix'] - ) - ) - task = LOFARTask( - "result = run_dppp(ms_name, ms_outname, parset, executable, initscript, start_time, end_time, nthreads)", - push=dict( - recipename=self.name, - nodepath=os.path.dirname(self.__file__.replace('master', 'nodes')), - ms_name=ms_name, - ms_outname=outnames[-1], - parset=self.inputs['parset'], - executable=self.inputs['executable'], - initscript=self.inputs['initscript'], - start_time=self.inputs['data_start_time'], - end_time=self.inputs['data_end_time'], - end_time=self.inputs['nthreads'], - loghost=loghost, - logport=logport - ), - pull="result", - depend=utilities.check_for_path, - dependargs=(ms_name, available_list) - ) - self.logger.info("Scheduling processing of %s" % (ms_name,)) - if self.inputs['dry_run'] == "False": - self.inputs['dry_run'] = False - if not self.inputs['dry_run']: - tasks.append((tc.run(task), ms_name)) - else: - self.logger.info("Dry run: scheduling skipped") - - # Wait for all jobs to finish - self.logger.debug("Waiting for all DPPP tasks to complete") - tc.barrier([task for task, subband in tasks]) - - failure = False - for task, subband in tasks: - ##### Print failing tasks? - ##### Abort if all tasks failed? - res = tc.get_task_result(task) - if res.failure: - self.logger.warn("Task %s failed (processing %s)" % (task, subband)) - self.logger.warn(res) - self.logger.warn(res.failure.getTraceback()) - failure = True - if failure: - return 1 - self.outputs['data'] = outnames - return 0 - -if __name__ == '__main__': - sys.exit(dppp().main()) diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/dummy_echo_parallel.py b/CEP/Pipeline/recipes/sip/master/deprecated/dummy_echo_parallel.py deleted file mode 100644 index efab8383573..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/dummy_echo_parallel.py +++ /dev/null @@ -1,63 +0,0 @@ -from __future__ import with_statement -import sys, os - -from lofarpipe.support.lofarrecipe import LOFARrecipe -from lofarpipe.support.ipython import LOFARTask -from lofarpipe.support.clusterlogger import clusterlogger -from lofarpipe.support.lofarnode import run_node - -class dummy_echo_parallel(LOFARrecipe): - def __init__(self): - super(dummy_echo_parallel, self).__init__() - self.optionparser.add_option( - '--executable', - dest="executable", - help="Executable to be run (ie, dummy_echo.sh)", - default="/home/swinbank/sw/bin/dummy_echo.sh" - ) - - def go(self): - self.logger.info("Starting dummy_echo run") - super(dummy_echo_parallel, self).go() - - # Connect to the IPython cluster and initialise it with the functions - # we need. - tc, mec = self._get_cluster() - mec.push_function( - dict( - run_dummy_echo=run_node, - ) - ) - self.logger.info("Cluster initialised") - - with clusterlogger(self.logger) as (loghost, logport): - self.logger.debug("Logging to %s:%d" % (loghost, logport)) - tasks = [] # this will be a list of scheduled jobs - for filename in self.inputs['args']: - task = LOFARTask( - "result = run_dummy_echo(filename, executable)", - push = dict( - recipename=self.name, - nodepath=os.path.dirname(self.__file__.replace('master', 'nodes')), - filename=filename, - executable=self.inputs['executable'], - loghost=loghost, - logport=logport - ), - pull="result" - ) - self.logger.info("Scheduling processing of %s" % (filename)) - tasks.append(tc.run(task)) - self.logger.info("Waiting for all dummy_echo tasks to complete") - tc.barrier(tasks) - - for task in tasks: - result = tc.get_task_result(task) - if result.failure: - self.logger.warn(result) - self.logger.warn(result.failure.getTraceback()) - - return 0 - -if __name__ == '__main__': - sys.exit(dummy_echo_parallel().main()) diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/excluder.py b/CEP/Pipeline/recipes/sip/master/deprecated/excluder.py deleted file mode 100644 index 7c023ea6c11..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/excluder.py +++ /dev/null @@ -1,18 +0,0 @@ -import sys -from lofarpipe.support.pyraprunner import pyraprunner -from lofarpipe.support.utilities import string_to_list - -class excluder(pyraprunner): - def __init__(self): - super(excluder, self).__init__() - self.optionparser.add_option( - '--station', - dest="station", - help="Name of stations to exclude (e.g. DE001LBA)" - ) - - def _generate_arguments(self): - return "\"%s\"" % ('\", \"'.join(string_to_list(self.inputs['station']))) - -if __name__ == '__main__': - sys.exit(excluder().main()) diff --git a/CEP/Pipeline/recipes/sip/master/flag_baseline.py b/CEP/Pipeline/recipes/sip/master/deprecated/flag_baseline.py similarity index 100% rename from CEP/Pipeline/recipes/sip/master/flag_baseline.py rename to CEP/Pipeline/recipes/sip/master/deprecated/flag_baseline.py diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/flagger.py b/CEP/Pipeline/recipes/sip/master/deprecated/flagger.py deleted file mode 100644 index 3a303aead78..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/flagger.py +++ /dev/null @@ -1,68 +0,0 @@ -from __future__ import with_statement -import sys, os -from lofarpipe.support.pyraprunner import pyraprunner - -# Quick n dirty tool to read ASCII sourcelists used as input by BBS. -# The format for these doesn't seem all that well specified: see the -# makesourcedb tool, which vaguely refers to a format string which might have -# spaces, commas, ... -# We'll do our best. - -class Source(dict): - pass - -class SourceList(list): - def __init__(self, filename): - # Default format if we can't read one from the file - format = ( - "Name", "Type", "Ra", "Dec", "I", "Q", "U", "V", - "ReferenceFrequency='60e6'", "SpectralIndexDegree='0'", - "SpectralIndex:0='0.0'", "Major", "Minor", "Phi" - ) - with open(filename, 'r') as file: - try: - # Maybe the first line is a comma-separated format string... - first_line = file.readline().strip().split() - if first_line.split()[-1] == "format": - format = map(str.strip, first_line[3:-10].split(",")) - else: - raise - except: - # ...or maybe not. - file.seek(0) - for line in file: - if len(line.strip()) == 0 or line.strip()[0] == '#': continue - data = map(str.strip, line.split(',')) - self.append(Source(zip(format, data))) - -class flagger(pyraprunner): - def __init__(self): - super(flagger, self).__init__() - self.optionparser.add_option( - '-s', '--skymodel', - dest="skymodel", - help="initial sky model (in makesourcedb format)" - ) - self.optionparser.add_option( - '--n-factor', - dest="n_factor", - type="float", - help="Custom factor for flagging threshold" - ) - - def _generate_arguments(self): - self.inputs['skymodel'] = os.path.join( - self.config.get("layout", "parset_directory"), - self.inputs['skymodel'] - ) - self.logger.info("Using %s for %s skymodel" % - (self.inputs['skymodel'], "flagger") - ) - if not os.access(self.inputs['skymodel'], os.R_OK): - raise IOError - - sl = SourceList(self.inputs['skymodel']) - return float(self.inputs['n_factor']) * sum(float(s['I']) for s in sl) - -if __name__ == '__main__': - sys.exit(flagger().main()) diff --git a/CEP/Pipeline/recipes/sip/master/make_flaggable.py b/CEP/Pipeline/recipes/sip/master/deprecated/make_flaggable.py similarity index 100% rename from CEP/Pipeline/recipes/sip/master/make_flaggable.py rename to CEP/Pipeline/recipes/sip/master/deprecated/make_flaggable.py diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/mwimager.py b/CEP/Pipeline/recipes/sip/master/deprecated/mwimager.py deleted file mode 100644 index ec28e97b68b..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/mwimager.py +++ /dev/null @@ -1,214 +0,0 @@ -from __future__ import with_statement -import sys, os, tempfile, glob, subprocess, itertools -from contextlib import closing -from lofarpipe.support.clusterdesc import ClusterDesc - -# Local helpers -from lofarpipe.support.lofarrecipe import LOFARrecipe -from lofarpipe.support.lofaringredient import LOFARinput, LOFARoutput -from lofarpipe.support.group_data import group_files -import lofarpipe.support.utilities as utilities - -class mwimager(LOFARrecipe): - def __init__(self): - super(mwimager, self).__init__() - self.optionparser.add_option( - '--executable', - dest="executable", - help="Executable to be run (ie, mwimager script)" - ) - self.optionparser.add_option( - '--initscript', - dest="initscript", - help="Initscript to source (ie, lofarinit.sh)" - ) - self.optionparser.add_option( - '-g', '--g(v)ds-file', - dest="gvds", - help="G(V)DS file describing data to be processed" - ) - self.optionparser.add_option( - '-p', '--parset', - dest="parset", - help="MWImager configuration parset" - ) - self.optionparser.add_option( - '-w', '--working-directory', - dest="working_directory", - help="Working directory used on compute nodes" - ) - self.optionparser.add_option( - '--log', - dest="log", - help="Log file" - ) - self.optionparser.add_option( - '--askapsoft-path', - dest="askapsoft_path", - help="Path to cimager.sh" - ) - self.optionparser.add_option( - '--casa', - dest="casa", - help="Use the CASA lwimager", - action="store_true" - ) - self.optionparser.add_option( - '--makevds-exec', - dest="makevds_exec", - help="makevds executable" - ) - self.optionparser.add_option( - '--combinevds-exec', - dest="combinevds_exec", - help="combinevds executable" - ) - self.optionparser.add_option( - '--max-bands-per-node', - dest="max_bands_per_node", - help="Maximum number of subbands to farm out to a given cluster node", - default="8" - ) - - def go(self): - self.logger.info("Starting MWImager run") - super(mwimager, self).go() - - clusterdesc = ClusterDesc( - self.config.get('cluster', 'clusterdesc') - ) - - self.outputs["data"] = [] - - # Given a limited number of processes per node, the first task is to - # partition up the data for processing. - for iteration, data_group in enumerate(group_files( - self.logger, - clusterdesc, - os.path.join(self.inputs['working_directory'], self.inputs['job_name']), - int(self.inputs['max_bands_per_node']), - self.inputs['args'] - )): - self.logger.info("Calling vdsmaker") - vds_file = os.path.join( - self.config.get("layout", "vds_directory"), self.inputs['gvds'] - ) - self.run_task('vdsmaker', data_group, gvds=vds_file, unlink=False) - - # Patch GVDS filename into parset - self.logger.debug("Setting up MWImager configuration") - temp_parset_filename = utilities.patch_parset( - self.inputs['parset'], - { - 'dataset': os.path.join( - self.config.get('layout', 'vds_directory'), self.inputs['gvds'] - ) - }, - self.config.get('layout', 'parset_directory') - ) - - # Individual subband logs go in a temporary directory - # to be sorted out later. - log_root = os.path.join(tempfile.mkdtemp(), self.inputs['log']) - self.logger.debug("Logs dumped with root %s" % (log_root)) - - # Initscript for basic LOFAR utilities - env = utilities.read_initscript(self.inputs['initscript']) - # Also add the path for cimager.sh - env['PATH'] = "%s:%s" % (self.inputs['askapsoft_path'], env['PATH']) - - # For the overall MWimgager log - log_location = "%s/%s" % ( - self.config.get('layout', 'log_directory'), - self.inputs['log'] - ) - self.logger.debug("Logging to %s" % (log_location)) - - mwimager_cmd = [ - self.inputs['executable'], - temp_parset_filename, - self.config.get('cluster', 'clusterdesc'), - os.path.join( - self.inputs['working_directory'], - self.inputs['job_name'] - ), - log_root - ] - if self.inputs['casa'] is True or self.inputs['casa'] == "True": - mwimager_cmd.insert(1, '-casa') - try: - self.logger.info("Running MWImager") - self.logger.debug("Executing: %s" % " ".join(mwimager_cmd)) - if not self.inputs['dry_run']: - with utilities.log_time(self.logger): - with closing(open(log_location + '-' + str(iteration), 'w')) as log: - result = subprocess.check_call( - mwimager_cmd, - env=env, - stdout=log, - stderr=log, - close_fds=True - ) - else: - self.logger.info("Dry run: execution skipped") - result = 0 - except subprocess.CalledProcessError: - self.logger.exception("Call to mwimager failed") - result = 1 - finally: - os.unlink(temp_parset_filename) - - # Now parse the log files to: - # 1: find the name of the images that have been written - # 2: save the logs in appropriate places - # This is ugly! - self.logger.info("Parsing logfiles") - for log_file in glob.glob("%s%s" % (log_root, "*")): - self.logger.debug("Processing %s" % (log_file)) - ms_name, image_name = "", "" - with closing(open(log_file)) as file: - for line in file.xreadlines(): - if 'Cimager.Images.Names' in line.strip(): - try: - image_name = line.strip().split("=")[1].lstrip("['").rstrip("]'") - break - except IndexError: - pass - file.seek(0) - for line in file.xreadlines(): - split_line = line.split('=') - if split_line[0] == "Cimager.dataset": - ms_name = os.path.basename(split_line[1].rstrip()) - break - if not image_name: - self.logger.info("Couldn't identify image for %s "% (log_file)) - else: - self.logger.debug("Found image: %s" % (image_name)) - self.outputs["data"].append(image_name) - if not ms_name: - self.logger.info("Couldn't identify file for %s" % (log_file)) - else: - destination = "%s/%s/%s" % ( - self.config.get('layout', 'log_directory'), - ms_name, - self.inputs['log'] - ) - self.logger.debug( - "Moving logfile %s to %s" % (log_file, destination) - ) - utilities.move_log(log_file, destination) - try: - self.logger.debug("Removing temporary log directory") - os.rmdir(os.path.dirname(log_root)) - except OSError, failure: - self.logger.info("Failed to remove temporary directory") - self.logger.debug(failure) - try: - utilities.move_log(os.path.dirname(log_root), log_location) - except: - pass - - return result - -if __name__ == '__main__': - sys.exit(mwimager().main()) diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/pyraprunner.py b/CEP/Pipeline/recipes/sip/master/deprecated/pyraprunner.py deleted file mode 100644 index e09b5560208..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/pyraprunner.py +++ /dev/null @@ -1,98 +0,0 @@ -from __future__ import with_statement -import sys, os - -import lofarpipe.support.utilities as utilities -from lofarpipe.support.ipython import LOFARTask -from lofarpipe.support.lofarrecipe import LOFARrecipe -from lofarpipe.support.clusterlogger import clusterlogger -from lofarpipe.support.lofarnode import run_node - -class pyraprunner(LOFARrecipe): - """ - Provides all the basic infrastructure for applying a pyrap-based filter to - code on the cluster, distributed using an IPython task client. - """ - def __init__(self): - super(pyraprunner, self).__init__() - self.optionparser.add_option( - '--suffix', - dest="suffix", - help="Suffix to add to trimmed data (default: overwrite existing)" - ) - - def _generate_arguments(self): - return '' - - def go(self): - super(pyraprunner, self).go() - - ms_names = self.inputs['args'] - - tc, mec = self._get_cluster() - function_name = self.__class__.__name__ + "_remote" - mec.push_function( - { - function_name: run_node, - "build_available_list": utilities.build_available_list, - "clear_available_list": utilities.clear_available_list - } - ) - self.logger.info("Pushed functions to cluster") - - self.logger.info("Building list of data available on engines") - available_list = "%s%s" % ( - self.inputs['job_name'], self.__class__.__name__ - ) - mec.push(dict(filenames=ms_names)) - mec.execute( - "build_available_list(\"%s\")" % (available_list,) - ) - - with clusterlogger(self.logger) as (loghost, logport): - self.logger.debug("Logging to %s:%d" % (loghost, logport)) - tasks = [] - outnames = [] - for ms_name in ms_names: - outnames.append(ms_name + self.inputs['suffix']) - execute_string = "result = %s(ms_name, \"%s\", %s)" % ( - function_name, outnames[-1], self._generate_arguments() - ) - task = LOFARTask( - execute_string, - push=dict( - recipename=self.name, - nodepath=os.path.dirname(self.__file__.replace('master', 'nodes')), - ms_name=ms_name, - loghost=loghost, - logport=logport - ), - pull="result", - depend=utilities.check_for_path, - dependargs=(ms_name, available_list) - ) - self.logger.info("Scheduling processing of %s" % (ms_name,)) - tasks.append(tc.run(task)) - self.logger.info( - "Waiting for all %s tasks to complete" % - (self.__class__.__name__) - ) - tc.barrier(tasks) - - - failure = False - for task in tasks: - res = tc.get_task_result(task) - if res.failure: - self.logger.warn("Task %s failed" % (task)) - self.logger.warn(res) - self.logger.warn(res.failure.getTraceback()) - failure = True - if failure: - return 1 - - mec.execute("clear_available_list(\"%s\")" % (available_list,)) - self.outputs['data'] = outnames - return 0 - -if __name__ == '__main__': - sys.exit(pyraprunner().main()) diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/qcheck.py b/CEP/Pipeline/recipes/sip/master/deprecated/qcheck.py deleted file mode 100644 index 567f6873875..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/qcheck.py +++ /dev/null @@ -1,91 +0,0 @@ -from __future__ import with_statement -import sys, os - -from lofarpipe.support.ipython import LOFARTask -from lofarpipe.support.lofarrecipe import LOFARrecipe -import lofarpipe.support.utilities as utilities -from lofarpipe.support.clusterlogger import clusterlogger - -def run_qcheck(infile, pluginlist, outputdir): - from lofarrecipe.nodes.qcheck import qcheck_node - return qcheck_node(loghost=loghost, logport=logport).run( - infile, - pluginlist, - outputdir - ) - -class qcheck(LOFARrecipe): - def __init__(self): - super(qcheck, self).__init__() - self.optionparser.add_option( - '-w', '--working-directory', - dest="working_directory", - help="Working directory used on compute nodes" - ) - self.optionparser.add_option( - '--plugins', - dest="plugins", - help="[Expert use] Quality check plugins" - ) - - def go(self): - super(qcheck, self).go() - self.logger.info("Quality check system starting") - - self.outputs['data'] = [ - os.path.join( - self.inputs['working_directory'], self.inputs['job_name'], filename - ) - for filename in self.inputs['args'] - ] - plugins = utilities.string_to_list(self.inputs['plugins']) - self.logger.info("Using plugins: %s" % (str(plugins))) - - tc, mec = self._get_cluster() - mec.push_function( - dict( - run_qcheck=run_qcheck, - build_available_list=utilities.build_available_list, - clear_available_list=utilities.clear_available_list - ) - ) - self.logger.info("Pushed functions to cluster") - - self.logger.info("Building list of data available on engines") - available_list = "%s%s" % (self.inputs['job_name'], "qcheck") - mec.push(dict(filenames=self.outputs['data'])) - mec.execute( - "build_available_list(\"%s\")" % (available_list,) - ) - clusterdesc = self.config.get('cluster', 'clusterdesc') - - with clusterlogger(self.logger) as (loghost, logport): - self.logger.debug("Logging to %s:%d" % (loghost, logport)) - tasks = [] - for image_name in self.outputs['data']: - task = LOFARTask( - "result = run_qcheck(infile, pluginlist, outputdir)", - push=dict( - infile=image_name, - pluginlist=plugins, - outputdir=self.config.get('layout', 'results_directory'), - loghost=loghost, - logport=logport - ), - pull="result", - depend=utilities.check_for_path, - dependargs=(image_name, available_list) - ) - self.logger.info("Scheduling processing of %s" % (image_name,)) - tasks.append(tc.run(task)) - self.logger.info("Waiting for all qcheck tasks to complete") - tc.barrier(tasks) - - for task in tasks: - tc.get_task_result(task) - - mec.execute("clear_available_list(\"%s\")" % (available_list,)) - self.logger.info("qcheck done") - -if __name__ == '__main__': - sys.exit(eval(os.path.splitext(os.path.basename(sys.argv[0]))[0])().main()) diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/qcheck/README b/CEP/Pipeline/recipes/sip/master/deprecated/qcheck/README deleted file mode 100644 index e7152d38e65..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/qcheck/README +++ /dev/null @@ -1,4 +0,0 @@ -Simple image quality check, designed for use in (deprecated) pipeline qcheck -recipe. - -Original by Evert Rol. diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/qcheck/qcheck.py b/CEP/Pipeline/recipes/sip/master/deprecated/qcheck/qcheck.py deleted file mode 100644 index eb99a3cf642..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/qcheck/qcheck.py +++ /dev/null @@ -1,200 +0,0 @@ -from pyrap import tables as ptables -import numpy -import logging -import sys -import os.path -import pylab -from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas -from matplotlib.figure import Figure - - -DEFAULTS = {} -DEFAULTS['fieldnames'] = ['logtable', 'coords', 'units'] -DEFAULTS['colnames'] = ['map'] -IMAGEDIMS = {'y': 3, 'x': 4, 'polarization': 2, 'channel': 1} - -""" - -TODO: - - - check for NaNs - -""" - - - -def check_basics(image, loggers): - logger = loggers["main"] - assert image.ndim == 5, "image does not have 5 dimensions" - - -def clip_image(image, niter=0, clip=(-3, 3)): - if niter > 0: - mean = image.mean() - sigma = numpy.sqrt(image.var()) - return clip_image(image[(image > mean+clip[0]*sigma)&(image < mean+clip[1]*sigma)], - niter=niter-1, clip=clip) - return image - - -def check_stats(image, filename, loggers, plot=False): - BINCOUNTS = 1000 - MINNBINS = 20 - CLIPCOUNTS = 0.001 - NSIGMA = 0.1 - NMAXSIGMA = 10.0 - POLAXIS = ['I', 'Q', 'U', 'V'] - if plot: - figure = Figure() - canvas = FigureCanvas(figure) - npols = image.shape[IMAGEDIMS['polarization']] - nchannels = image.shape[IMAGEDIMS['channel']] - nsubplotrows = nsubplotcols = int(numpy.sqrt(npols)) - if nsubplotcols * nsubplotrows < npols: - nsubplotrows += 1 - for npol in range(npols): - if plot: - axes = figure.add_subplot(nsubplotrows, nsubplotcols, npol+1) - for nchan in range(nchannels): - twodimage = image[0, nchan, npol, :, :] - flatimage = twodimage.flatten() - mean = flatimage.mean() - variance = flatimage.var() - stddev = numpy.sqrt(variance) - median = numpy.median(flatimage) - imgmin, imgmax = min(flatimage), max(flatimage) - loggers["main"].info("%d.%d.minimum = %.4e" % (npol+1, nchan+1, - imgmin)) - loggers["main"].info("%d.%d.maximum = %.4e" % (npol+1, nchan+1, - imgmax)) - loggers["main"].info("%d.%d.mean = %.4e" % (npol+1, nchan+1, mean)) - loggers["main"].info("%d.%d.median = %.4e" % ( - npol+1, nchan+1, median)) - loggers["main"].info("%d.%d.Standard deviation = %.4e" % ( - npol+1, nchan+1,stddev)) - # Keep only the bins with a minimum number of counts, - # so we can 'fit' a Gaussian distribution to calculate the mode - nbins = (int(flatimage.size/BINCOUNTS) - if flatimage.size > 1e5 else MINNBINS) - counts, bins = numpy.histogram(flatimage, nbins) - clipped = {} - clipped['indices'] = counts > max(counts)*CLIPCOUNTS - clipped['counts'] = counts[clipped['indices']] - clipped['bins'] = bins[clipped['indices']] - if plot: - axes.plot(bins[numpy.invert(clipped['indices'])], - counts[numpy.invert(clipped['indices'])], 'ob') - clippedimage = flatimage[(flatimage >= min(clipped['bins'])) & - (flatimage <= max(clipped['bins']))] - nbins = (int(clippedimage.size/BINCOUNTS) - if clippedimage.size > 1e5 else MINNBINS) - counts, bins = numpy.histogram(clippedimage, nbins) - bins = (bins[0:-1] + bins[1:])/2. # new behaviour in numpy 1.2 - mode = sum(bins * counts)/sum(counts) - width = (numpy.sqrt(abs(sum( (bins - mode)**2 * counts) / - sum(counts)))) - loggers["main"].info("%d.%d.mode = %.4e" % (npol+1, nchan+1, mode)) - # Also calculate the statistics for a clipped image, ie - # only the background (no sources) - clippedimage = clip_image(flatimage, niter=3, clip=(-1, 1)) - mean = clippedimage.mean() - variance = clippedimage.var() - stddev = numpy.sqrt(variance) - median = numpy.median(clippedimage) - imgmin, imgmax = min(clippedimage), max(clippedimage) - loggers["main"].info("%d.%d.background-minimum = %.4e" % ( - npol+1, nchan+1, imgmin)) - loggers["main"].info("%d.%d.background-maximum = %.4e" % ( - npol+1, nchan+1, imgmax)) - loggers["main"].info("%d.%d.background-mean = %.4e" % ( - npol+1, nchan+1, mean)) - loggers["main"].info("%d.%d.background-median = %.4e" % ( - npol+1, nchan+1, median)) - loggers["main"].info("%d.%d.background-stddev = %.4e" % ( - npol+1, nchan+1, stddev)) - # Verify that mode, background mean & background median are within - # a few background sigma from each other: - if abs(mean-median) > NSIGMA*stddev: - loggers["warn"].warn( - " Background mean and background median are more " - "than %.1f standard deviations different" % NSIGMA) - if abs(mean-mode) > NSIGMA*stddev: - loggers["warn"].warn( - " Mode and background mean are more than %.1f " - "standard deviations different" % NSIGMA) - if abs(mode-median) > NSIGMA*stddev: - loggers["warn"].warn( - " Mode and background median are more than %.1f " - "standard deviations different" % NSIGMA) - if imgmax < 0: - loggers["warn"].warn(" Background maximum is negative") - if imgmin > 0: - loggers["warn"].warn(" Background minimum is positive") - if imgmax > NMAXSIGMA*stddev: - loggers["warn"].warn( - " Background maximum is more than %.1f the " - "standard deviation") - if imgmin < -NMAXSIGMA*stddev: - loggers["warn"].warn( - " Background minimum is less than %.1f the " - "standard deviation") - - if plot: - axes.plot(bins, counts, 'ob') - axes.plot(bins, max(counts) * numpy.exp(-(bins-mode)**2 / - (2 * width**2)), '-g') - if plot: - canvas.print_figure(plot) - - -def setup_logging(logfile): - loggers = {'main': logging.getLogger('main'), - 'warn': logging.getLogger('warn')} - handlers = {'main': logging.FileHandler(logfile, mode="w"), - 'warn': logging.StreamHandler()} - formatters = {'main': logging.Formatter("%(message)s"), - 'warn': logging.Formatter("%(levelname)s: %(message)s")} - handlers['main'].setFormatter(formatters['main']) - handlers['warn'].setFormatter(formatters['warn']) - loggers['main'].addHandler(handlers['main']) - loggers['warn'].addHandler(handlers['warn']) - loggers['main'].setLevel(logging.INFO) - loggers['warn'].setLevel(logging.WARNING) # warnings only - return loggers - - -def run(filename, logfile=None, plot=False, outputdir=False, loggers=False): - if not logfile: - logfile = filename + "_stats.log" - if not isinstance(plot, basestring): - plot = filename + "_histo.pdf" - if outputdir: - plot = os.path.join(outputdir, os.path.basename(plot)) - if not loggers: - loggers = setup_logging(logfile) - try: - table = ptables.table(filename, ack=False) - except RuntimeError: # pyrap is just a wrapper around C++, so no proper exceptions are thrown - loggers['main'].error("Error: image %s not properly opened" % filename) - return - names = {} - for part in ('col', 'field'): - partname = part + 'names' - names[part] = table.__getattribute__(partname)() - for defaultname in DEFAULTS[partname]: - if defaultname not in names[part]: - # use 'warn' logger instead? - # But script can't continue with this fault, - # so should quit - raise KeyError("%s not in %snames" % (defaultname, part)) - imgcol = table.col('map') - image = imgcol.getcol() - check_basics(image, loggers) - check_stats(image, filename, loggers, plot=plot) - - -if __name__ == '__main__': - args = sys.argv[1:] - if len(args) != 1: - sys.exit(1) - run(args[0], plot=True) diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/sextractor.py b/CEP/Pipeline/recipes/sip/master/deprecated/sextractor.py deleted file mode 100644 index e4f566c383a..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/sextractor.py +++ /dev/null @@ -1,92 +0,0 @@ -import sys, os - -# Local helpers -from lofarpipe.support.lofarrecipe import LOFARrecipe -from lofarpipe.support.lofaringredient import LOFARinput, LOFARoutput -from lofarpipe.support.ipython import LOFARTask -import lofarpipe.support.utilities as utilities - -from tkp_lib.dataset import DataSet - -def sextract(image, dataset): - # Run on engine to source extract - from lofarrecipe.nodes.sextractor import sextract - return sextract(image, dataset) - -class sextractor(LOFARrecipe): - def __init__(self): - super(sextractor, self).__init__() - self.optionparser.add_option( - '-w', '--working-directory', - dest="working_directory", - help="Working directory used on compute nodes" - ) - - def go(self): - self.logger.info("Starting source extraction run") - super(sextractor, self).go() - - tc, mec = self._get_cluster() - mec.push_function( - dict( - sextract=sextract, - build_available_list=utilities.build_available_list - ) - ) - self.logger.info("Pushed functions to cluster") - - # We read the GVDS file to find the names of all the data files we're - # going to process, then push this list out to the engines so they can - # let us know which we have available - image_names = [ - "%s/%s" % (self._input_or_default('working_directory'), image) - for image in self.inputs['args'] - ] - - # Construct list of available files on engines - self.logger.info("Building list of data available on engines") - available_list = "%s%s" % (self.inputs['job_name'], "sextractor") - mec.push(dict(filenames=image_names)) - mec.execute( - "build_available_list(\"%s\")" % (available_list,) - ) - - tasks = [] - - dataset = DataSet(self.inputs['job_name']) - - for image_name in image_names: - task = LOFARTask( - "result = sextract(image_name, dataset)", - push=dict( - image_name=image_name, - dataset=dataset, - ), - pull="result", - depend=utilities.check_for_path, - dependargs=(image_name, available_list) - ) - self.logger.info("Scheduling processing of %s" % (image_name,)) - tasks.append(tc.run(task)) - self.logger.info("Waiting for all source extraction tasks to complete") - tc.barrier(tasks) - for task in tasks: - ##### Print failing tasks? - ##### Abort if all tasks failed? - res = tc.get_task_result(task) - self.logger.info(res) - if res.failure: - print res.failure - - mec.push_function( - dict( - clear_available_list=utilities.clear_available_list - ) - ) - # Save space on engines by clearing out old file lists - mec.execute("clear_available_list(\"%s\")" % (available_list,)) - - self.logger.info("Source extraction done") - -if __name__ == '__main__': - sys.exit(sextractor().main()) diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/simple_se.py b/CEP/Pipeline/recipes/sip/master/deprecated/simple_se.py deleted file mode 100644 index 57fdec55ff2..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/simple_se.py +++ /dev/null @@ -1,122 +0,0 @@ -from __future__ import with_statement -from contextlib import closing - -# Local helpers -from lofarpipe.support.lofarrecipe import LOFARrecipe -import lofarpipe.support.utilities as utilities -import os, os.path, glob, subprocess, sys, numpy, shutil, errno, re - -# SE tools -from tkp_lib.dataset import DataSet -from tkp_lib.image import ImageData -from tkp_lib.accessors import FitsFile -from tkp_lib.dbplots import plotAssocCloudByXSource -from tkp_lib.dbregion import createRegionByImage -import tkp_lib.database as database - -associations = """ -SELECT - x1.xtrsrcid, x1.ra, x1.decl, x1.i_peak, x1.i_int, c.catname, c1.ra, c1.decl, a1.assoc_distance_arcsec -FROM - extractedsources x1 -LEFT OUTER JOIN - assoccatsources a1 ON x1.xtrsrcid = a1.xtrsrc_id -LEFT OUTER JOIN - catalogedsources c1 ON a1.assoc_catsrc_id = c1.catsrcid -LEFT OUTER JOIN - catalogs c ON c.catid = c1.cat_id -WHERE - image_id = %d -ORDER BY - x1.I_Peak; -""" - -class simple_se(LOFARrecipe): - """ - Run source extraction on FITS images on the front-end. - Dump ds9 region files of found sources & WENSS sources. - Dump text file of assocations with catalogue sources. - - Designed to be run e.g. on an averaged image at the end of a pipeline run. - """ - - def __init__(self): - super(simple_se, self).__init__() - self.optionparser.add_option( - '--detected-regions', - dest="detected_regions", - help="Filename for region file of local detections", - default="detected.reg" - ) - self.optionparser.add_option( - '--wenss-regions', - dest="wenss_regions", - help="Filename for region file of WENSS detections", - default="wenss.reg" - ) - self.optionparser.add_option( - '--associations', - dest="associations", - help="Filename for association list", - default="association.list" - ) - - def go(self): - self.logger.info("Starting source identification") - super(simple_se, self).go() - - ds_name = "%s-%s" % (self.inputs['job_name'], self.inputs['start_time']) - self.logger.info("Creating dataset %s" % (ds_name,)) - dataset = DataSet(ds_name) - src_ids = [] - for file in self.inputs['args']: - self.logger.info("Processing %s" % (file,)) - image = ImageData(FitsFile(file), dataset=dataset) - self.logger.info("Running source finder") - sr = image.sextract(det=5, anl=2) - with closing(database.connection()) as con: - self.logger.debug("Saving results to database") - sr.savetoDB(con) - self.logger.info("Generating source associations") - database.assocXSrc2XSrc(image.id, con) - database.assocXSrc2Cat(image.id, con) - self.logger.info("Querying for region file") - createRegionByImage(image.id[0], con, - os.path.join( - os.path.dirname(file), - self.inputs['detected_regions'] - ), logger=self.logger - ) - with closing(con.cursor()) as cur: - self.logger.info("Querying for association list") - my_query = associations % (image.id) - self.logger.debug(my_query) - cur.execute(my_query) - with open( - os.path.join( - os.path.dirname(file), - self.inputs['associations'] - ), - 'w' - ) as output_file: - for line in cur.fetchall(): - output_file.write(str(line) + '\n') - src_ids.append(line[0]) - - # Diagnostic plot for each extracted source - self.logger.info("Generating associations plots") - # Use set to uniqify the list of src_ids - src_ids = list(set(src_ids)) - with closing(database.connection()) as con: - for src_id in src_ids: - self.logger.debug("Generating associations plot for src %d" % src_id) - plotAssocCloudByXSource( - src_id, con, os.path.dirname(self.inputs['args'][0]) - ) - - self.outputs['data'] = None - return 0 - -if __name__ == '__main__': - sys.exit(eval(os.path.splitext(os.path.basename(sys.argv[0]))[0])().main()) - diff --git a/CEP/Pipeline/recipes/sip/master/skymodel.py b/CEP/Pipeline/recipes/sip/master/deprecated/skymodel.py similarity index 100% rename from CEP/Pipeline/recipes/sip/master/skymodel.py rename to CEP/Pipeline/recipes/sip/master/deprecated/skymodel.py diff --git a/CEP/Pipeline/recipes/sip/master/storagemapper.py b/CEP/Pipeline/recipes/sip/master/deprecated/storagemapper.py similarity index 100% rename from CEP/Pipeline/recipes/sip/master/storagemapper.py rename to CEP/Pipeline/recipes/sip/master/deprecated/storagemapper.py diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/trimmer.py b/CEP/Pipeline/recipes/sip/master/deprecated/trimmer.py deleted file mode 100644 index 71b5b16e8c0..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/trimmer.py +++ /dev/null @@ -1,27 +0,0 @@ -import sys -from lofarpipe.support.pyraprunner import pyraprunner - -class trimmer(pyraprunner): - def __init__(self): - super(trimmer, self).__init__() - self.optionparser.add_option( - '--start-seconds', - dest="start_seconds", - type="float", - help="Seconds to trim from start of data" - ) - self.optionparser.add_option( - '--end-seconds', - dest="end_seconds", - type="float", - help="Seconds to trim from end of data" - ) - - def _generate_arguments(self): - return "%f, %f" % ( - float(self.inputs['start_seconds']), - float(self.inputs['end_seconds']) - ) - -if __name__ == '__main__': - sys.exit(trimmer().main()) diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/vdsmaker.py b/CEP/Pipeline/recipes/sip/master/deprecated/vdsmaker.py deleted file mode 100644 index 0df58c549ff..00000000000 --- a/CEP/Pipeline/recipes/sip/master/deprecated/vdsmaker.py +++ /dev/null @@ -1,175 +0,0 @@ -from __future__ import with_statement -import sys, os, tempfile, errno -import subprocess - -import lofarpipe.support.utilities as utilities -from lofarpipe.support.ipython import LOFARTask -from lofarpipe.support.lofarrecipe import LOFARrecipe -from lofarpipe.support.clusterlogger import clusterlogger -from lofarpipe.support.lofarnode import run_node - -class vdsmaker(LOFARrecipe): - def __init__(self): - super(vdsmaker, self).__init__() - self.optionparser.add_option( - '-g', '--gvds', - dest="gvds", - help="Output file name" - ) - self.optionparser.add_option( - '--directory', - dest="directory", - help="Directory for output files" - ) - self.optionparser.add_option( - '--makevds', - dest="makevds", - help="makevds executable", - default="/opt/LofIm/daily/lofar/bin/makevds" - ) - self.optionparser.add_option( - '--combinevds', - dest="combinevds", - help="combinevds executable", - default="/opt/LofIm/daily/lofar/bin/combinevds" - ) - self.optionparser.add_option( - '--unlink', - help="Unlink VDS files after combining", - default="True" - ) - - def go(self): - super(vdsmaker, self).go() - - ms_names = self.inputs['args'] - if self.inputs['unlink'] == "False": - self.inputs['unlink'] = False - - try: - os.makedirs(self.inputs['directory']) - except OSError, failure: - if failure.errno != errno.EEXIST: - raise - - tc, mec = self._get_cluster() - mec.push_function( - dict( - make_vds=run_node, - build_available_list=utilities.build_available_list, - clear_available_list=utilities.clear_available_list - ) - ) - self.logger.info("Pushed functions to cluster") - - # Build VDS files for each of the newly created MeasurementSets - self.logger.info("Building list of data available on engines") - available_list = "%s%s" % (self.inputs['job_name'], "dppp-vds") - mec.push(dict(filenames=ms_names)) - mec.execute( - "build_available_list(\"%s\")" % (available_list,) - ) - clusterdesc = self.config.get('cluster', 'clusterdesc') - - with clusterlogger(self.logger) as (loghost, logport): - self.logger.debug("Logging to %s:%d" % (loghost, logport)) - tasks = [] - vdsnames = [] - for ms_name in ms_names: - vdsnames.append( - "%s/%s.vds" % (self.inputs['directory'], os.path.basename(ms_name)) - ) - task = LOFARTask( - "result = make_vds(ms_name, clusterdesc, vds_name, executable)", - push=dict( - recipename=self.name, - nodepath=os.path.dirname(self.__file__.replace('master', 'nodes')), - ms_name=ms_name, - vds_name=vdsnames[-1], - clusterdesc=clusterdesc, - executable=self.inputs['makevds'], - loghost=loghost, - logport=logport - ), - pull="result", - depend=utilities.check_for_path, - dependargs=(ms_name, available_list) - ) - self.logger.info("Scheduling processing of %s" % (ms_name,)) - tasks.append(tc.run(task)) - self.logger.info("Waiting for all makevds tasks to complete") - tc.barrier(tasks) - - # Save space on engines by clearing out old file lists - mec.execute("clear_available_list(\"%s\")" % (available_list,)) - failure = False - for task in tasks: - res = tc.get_task_result(task) - if res.failure: - self.logger.warn("Task %s failed" % (task)) - self.logger.warn(res) - self.logger.warn(res.failure.getTraceback()) - failure = True - if failure: - return 1 - - # Combine VDS files to produce GDS - self.logger.info("Combining VDS files") - executable = self.inputs['combinevds'] - gvds_out = self.inputs['gvds'] - try: - command = [executable, gvds_out] + vdsnames - combineproc = subprocess.Popen( - command, - close_fds=True, - stdout=subprocess.PIPE, - stderr=subprocess.PIPE - ) - sour, serr = combineproc.communicate() - if combineproc.returncode != 0: - raise subprocess.CalledProcessError(combineproc.returncode, command) - self.outputs['gvds'] = gvds_out - except subprocess.CalledProcessError, cpe: - self.logger.exception("combinevds failed with status %d: %s" % (cpe.returncode, serr)) - failure = True - except OSError, failure: - self.logger.warn("Caught OSError") - try: - if failure.errno == errno.EMFILE: - count = 0 - for x in xrange(0, os.sysconf('SC_OPEN_MAX')): - try: - self.logger.debug("open file %d: %s" (x, str(os.fstat(x)))) - count += 1 - except: - pass - self.logger.info("Had %d open files" % (count,)) - elif failure.errno == errno.ENOMEM: - self.logger.info("Failed to run: %s" % str(command)) - import operator - total = reduce(operator.add, (len(x) for x in command)) - self.logger.debug("Num args: %d, num characters: %d" % (len(command), total)) - try: - p = subprocess.Popen(['free'], stdout=subprocess.PIPE) - sout, serr = p.communicate() - self.logger.free(sout) - except: - self.logger.warn("Failed to spawn free") - self.logger.exception(failure) - else: - self.logger.exception(failure) - finally: - failure = True - finally: - if self.inputs["unlink"]: - self.logger.debug("Unlinking temporary files") - for file in vdsnames: - os.unlink(file) - self.logger.info("vdsmaker done") - if failure: - return 1 - else: - return 0 - -if __name__ == '__main__': - sys.exit(vdsmaker().main()) diff --git a/CEP/Pipeline/recipes/sip/master/new_bbs.py b/CEP/Pipeline/recipes/sip/master/new_bbs.py index 4997c9a2ba8..02b99cb8076 100644 --- a/CEP/Pipeline/recipes/sip/master/new_bbs.py +++ b/CEP/Pipeline/recipes/sip/master/new_bbs.py @@ -1,9 +1,11 @@ -# LOFAR IMAGING PIPELINE +# LOFAR IMAGING PIPELINE # -# BBS (BlackBoard Selfcal) recipe -# John Swinbank, 2009-10 -# swinbank@transientskp.org -# ------------------------------------------------------------------------------ +# BBS (BlackBoard Selfcal) recipe +# John Swinbank, 2009-10 +# swinbank@transientskp.org +# Wouter Klijn, 2012 +# klijn@astron.nl +# ----------------------------------------------------------------------------- from __future__ import with_statement import subprocess @@ -20,7 +22,6 @@ from lofar.parameterset import parameterset from lofarpipe.support.baserecipe import BaseRecipe from lofarpipe.support.group_data import load_data_map, store_data_map from lofarpipe.support.group_data import validate_data_maps -from lofarpipe.support.lofarexceptions import PipelineException from lofarpipe.support.pipelinelogging import CatchLog4CPlus from lofarpipe.support.pipelinelogging import log_process_output from lofarpipe.support.remotecommand import run_remote_command @@ -28,13 +29,14 @@ from lofarpipe.support.remotecommand import ComputeJob from lofarpipe.support.jobserver import job_server import lofarpipe.support.utilities as utilities import lofarpipe.support.lofaringredient as ingredient +from lofarpipe.support.utilities import create_directory class new_bbs(BaseRecipe): """ **This bbs recipe still uses the oldstyle bbs with global control** **New versions will have stand alone capability** - + The bbs recipe coordinates running BBS on a group of MeasurementSets. It runs both GlobalControl and KernelControl; as yet, SolverControl has not been integrated. @@ -111,7 +113,6 @@ class new_bbs(BaseRecipe): self.parset = parameterset() self.killswitch = threading.Event() - def _set_input(self, in_key, ps_key): """ Set the input-key `in_key` to the value of `ps_key` in the parset, if @@ -119,9 +120,8 @@ class new_bbs(BaseRecipe): """ try: self.inputs[in_key] = self.parset.getString(ps_key) - except RuntimeError, e: - self.logger.warn(str(e)) - + except RuntimeError, exceptionobject: + self.logger.warn(str(exceptionobject)) def _make_bbs_map(self): """ @@ -140,7 +140,7 @@ class new_bbs(BaseRecipe): '/data/scratch/loose/L29697/L29697_SAP000_SB000_uv.MS.instrument', '/data/scratch/loose/L29697/L29697_SAP000_SB000_uv.MS.sky') ) - + Returns `False` if validation of the three map-files fails, otherwise returns `True`. """ @@ -166,13 +166,12 @@ class new_bbs(BaseRecipe): return True - def go(self): self.logger.info("Starting BBS run") super(new_bbs, self).go() - # Check for relevant input parameters in the parset-file - # ---------------------------------------------------------------------- + # Check for relevant input parameters in the parset-file + # --------------------------------------------------------------------- self.logger.debug("Reading parset from %s" % self.inputs['parset']) self.parset = parameterset(self.inputs['parset']) @@ -183,8 +182,8 @@ class new_bbs(BaseRecipe): #self.logger.debug("self.inputs = %s" % self.inputs) - # Clean the blackboard database - # ---------------------------------------------------------------------- + # Clean the blackboard database + # --------------------------------------------------------------------- self.logger.info( "Cleaning BBS database for key '%s'" % (self.inputs['db_key']) ) @@ -202,8 +201,8 @@ class new_bbs(BaseRecipe): self.inputs['db_key'] ) - # Create a bbs_map describing the file mapping on disk - # ---------------------------------------------------------------------- + # Create a bbs_map describing the file mapping on disk + # --------------------------------------------------------------------- if not self._make_bbs_map(): return 1 @@ -218,18 +217,33 @@ class new_bbs(BaseRecipe): # file and database information into the supplied template # ------------------------------------------------------------------ self.logger.debug("Building parset for BBS control") - bbs_parset = utilities.patch_parset( - self.parset, - { - 'Observation': gvds_file, - 'BBDB.Key': self.inputs['db_key'], - 'BBDB.Name': self.inputs['db_name'], - 'BBDB.User': self.inputs['db_user'], - 'BBDB.Host': self.inputs['db_host'], - #'BBDB.Port': self.inputs['db_name'], - } - ) - self.logger.debug("BBS control parset is %s" % (bbs_parset,)) + # Create a location for parsets + job_directory = self.config.get( + "layout", "job_directory") + parset_directory = os.path.join(job_directory, "parsets") + create_directory(parset_directory) + + # patch the parset and copy result to target location remove tempfile + try: + bbs_parset = utilities.patch_parset( + self.parset, + { + 'Observation': gvds_file, + 'BBDB.Key': self.inputs['db_key'], + 'BBDB.Name': self.inputs['db_name'], + 'BBDB.User': self.inputs['db_user'], + 'BBDB.Host': self.inputs['db_host'], + #'BBDB.Port': self.inputs['db_name'], + } + ) + bbs_parset_path = os.path.join(parset_directory, + "bbs_control.parset") + shutil.copyfile(bbs_parset, bbs_parset_path) + self.logger.debug("BBS control parset is %s" % (bbs_parset_path,)) + + finally: + # Always remove the file in the tempdir + os.remove(bbs_parset) try: # When one of our processes fails, we set the killswitch. @@ -262,7 +276,8 @@ class new_bbs(BaseRecipe): command = "python %s" % (self.__file__.replace('master', 'nodes')) jobpool = {} bbs_kernels = [] - with job_server(self.logger, jobpool, self.error) as (jobhost, jobport): + with job_server(self.logger, jobpool, self.error) as(jobhost, + jobport): self.logger.debug("Job server at %s:%d" % (jobhost, jobport)) for job_id, details in enumerate(self.bbs_map): host, files = details @@ -284,10 +299,11 @@ class new_bbs(BaseRecipe): ) ) self.logger.info("Starting %d threads" % len(bbs_kernels)) - [thread.start() for thread in bbs_kernels] + for thread in bbs_kernels: + thread.start() self.logger.debug("Waiting for all kernels to complete") - [thread.join() for thread in bbs_kernels] - + for thread in bbs_kernels: + thread.join() # When GlobalControl finishes, our work here is done # ---------------------------------------------------------- @@ -295,11 +311,12 @@ class new_bbs(BaseRecipe): bbs_control.join() finally: os.unlink(bbs_parset) - if self.killswitch.isSet(): - # If killswitch is set, then one of our processes failed so - # the whole run is invalid - # ---------------------------------------------------------- - return 1 + + if self.killswitch.isSet(): + # If killswitch is set, then one of our processes failed so + # the whole run is invalid + # ---------------------------------------------------------- + return 1 self.outputs['mapfile'] = self.inputs['data_mapfile'] return 0 @@ -321,11 +338,12 @@ class new_bbs(BaseRecipe): self.environment, arguments=arguments ) - except Exception, e: + except OSError: self.logger.exception("BBS Kernel failed to start") self.killswitch.set() return 1 - result = self._monitor_process(bbs_kernel_process, "BBS Kernel on %s" % host) + result = self._monitor_process(bbs_kernel_process, + "BBS Kernel on %s" % host) sout, serr = bbs_kernel_process.communicate() serr = serr.replace("Connection to %s closed.\r\n" % host, "") log_process_output("SSH session (BBS kernel)", sout, serr, self.logger) @@ -356,9 +374,11 @@ class new_bbs(BaseRecipe): env=self.environment ) # _monitor_process() needs a convenient kill() method. - bbs_control_process.kill = lambda : os.kill(bbs_control_process.pid, signal.SIGKILL) + bbs_control_process.kill = lambda : os.kill( + bbs_control_process.pid, signal.SIGKILL) except OSError, e: - self.logger.error("Failed to spawn BBS Control (%s)" % str(e)) + self.logger.error( + "Failed to spawn BBS Control (%s)" % str(e)) self.killswitch.set() return 1 finally: @@ -385,22 +405,33 @@ class new_bbs(BaseRecipe): while True: try: returncode = process.poll() - if returncode == None: # Process still running + # Process still running + if returncode == None: time.sleep(1) - elif returncode != 0: # Process broke! + + # Process broke! + elif returncode != 0: self.logger.warn( - "%s returned code %d; aborting run" % (name, returncode) + "%s returned code %d; aborting run" % (name, + returncode) ) self.killswitch.set() break - else: # Process exited cleanly + + # Process exited cleanly + else: self.logger.info("%s clean shutdown" % (name)) break - if self.killswitch.isSet(): # Other process failed; abort + + # Other process failed; abort + if self.killswitch.isSet(): self.logger.warn("Killing %s" % (name)) process.kill() returncode = process.wait() break + + # Catch All exceptions: we need to take down all processes whatever + # is throw except: # An exception here is likely a ctrl-c or similar. Whatever it # is, we bail out. diff --git a/CEP/Pipeline/recipes/sip/master/parset.test b/CEP/Pipeline/recipes/sip/master/parset.test deleted file mode 100644 index 8cb90402ed5..00000000000 --- a/CEP/Pipeline/recipes/sip/master/parset.test +++ /dev/null @@ -1,5 +0,0 @@ -data=CORRECTED_DATA -operation=csclean -select="sumsqr(UVW[0:1])<1e8" -image=TestImage -maxbaseline=10000 diff --git a/CEP/Pipeline/recipes/sip/nodes/bbs.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/bbs.py similarity index 100% rename from CEP/Pipeline/recipes/sip/nodes/bbs.py rename to CEP/Pipeline/recipes/sip/nodes/deprecated/bbs.py diff --git a/CEP/Pipeline/recipes/sip/nodes/deprecated/casapy.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/casapy.py deleted file mode 100644 index 8478e836537..00000000000 --- a/CEP/Pipeline/recipes/sip/nodes/deprecated/casapy.py +++ /dev/null @@ -1,68 +0,0 @@ -# Python standard library -from __future__ import with_statement -from contextlib import closing -from subprocess import check_call, CalledProcessError -from dateutil.parser import parse as parse_date -from datetime import timedelta -import os.path, tempfile, shutil, time - -from pipeline.support.lofarnode import LOFARnode -from pipeline.support.utilities import patch_parset, create_directory, log_time -from pipeline.support.lofarexceptions import ExecutableMissing -import pipeline.support.utilities as utilities - -CASA_DATE_FORMAT = "%Y/%m/%d/%H:%M:%S.000" - -class casapy_node(LOFARnode): - def run(self, infile, parset, start_time, end_time, increment): - # Time execution of this job - with log_time(self.logger): - self.logger.info("Processing %s" % (infile,)) - - start_time = parse_date(start_time) - end_time = parse_date(end_time) - - self.logger.debug("Start time: %s, end time: %s" % (str(start_time), str(end_time))) - increment = timedelta(0, increment) - - process_start = start_time - while process_start < end_time: - process_end = process_start + increment - if process_end > end_time: - td = end_time - process_start - self.logger.info( - "Note: final image is %.3f seconds long" % ( - td.days * 86400 + td.seconds + td.microseconds / 1e6 - ) - ) - process_end = end_time - time_range = "\'%s~%s\'" % ( - process_start.strftime(CASA_DATE_FORMAT), - process_end.strftime(CASA_DATE_FORMAT) - ) - self.logger.debug("Now processing %s" % (time_range)) - - tmp_parset_filename = patch_parset( - parset, { - 'Selection.timerange': time_range, - 'Images.name': '-' + str(int(time.mktime(process_start.timetuple()))), - 'dataset': infile - } - ) - - try: - result = check_call([ - os.path.expanduser('~rol/sw/bin/casapy'), - tmp_parset_filename, - ]) - except CalledProcessError, e: - self.logger.error(str(e)) - self.logger.error("Failed dataset was %s %s" % (infile, time_range)) - raise Exception - finally: - # Clean up tempoerary files. - os.unlink(tmp_parset_filename) - - process_start += increment - - return result diff --git a/CEP/Pipeline/recipes/sip/nodes/cimager.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/cimager.py similarity index 100% rename from CEP/Pipeline/recipes/sip/nodes/cimager.py rename to CEP/Pipeline/recipes/sip/nodes/deprecated/cimager.py diff --git a/CEP/Pipeline/recipes/sip/nodes/deprecated/colmaker.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/colmaker.py deleted file mode 100644 index 7a2a43cdf73..00000000000 --- a/CEP/Pipeline/recipes/sip/nodes/deprecated/colmaker.py +++ /dev/null @@ -1,17 +0,0 @@ -from __future__ import with_statement -import pyrap.tables - -from pipeline.support.lofarnode import LOFARnode -from pipeline.support.utilities import log_time - -class makecolumns_node(LOFARnode): - """ - Add imaging columns to a given MS using pyrap. - """ - def run(self, file): - with log_time(self.logger): - self.logger.info("Processing: %s" % (file)) - try: - pyrap.tables.addImagingColumns(file) - except ValueError: - self.logger.debug('Add imaging columns failed: already exist?') diff --git a/CEP/Pipeline/recipes/sip/nodes/count_timesteps.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/count_timesteps.py similarity index 100% rename from CEP/Pipeline/recipes/sip/nodes/count_timesteps.py rename to CEP/Pipeline/recipes/sip/nodes/deprecated/count_timesteps.py diff --git a/CEP/Pipeline/recipes/sip/nodes/demix/demixing.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/demix/demixing.py similarity index 100% rename from CEP/Pipeline/recipes/sip/nodes/demix/demixing.py rename to CEP/Pipeline/recipes/sip/nodes/deprecated/demix/demixing.py diff --git a/CEP/Pipeline/recipes/sip/nodes/demix/median_filter.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/demix/median_filter.py similarity index 100% rename from CEP/Pipeline/recipes/sip/nodes/demix/median_filter.py rename to CEP/Pipeline/recipes/sip/nodes/deprecated/demix/median_filter.py diff --git a/CEP/Pipeline/recipes/sip/nodes/demix/shiftphasecenter.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/demix/shiftphasecenter.py similarity index 100% rename from CEP/Pipeline/recipes/sip/nodes/demix/shiftphasecenter.py rename to CEP/Pipeline/recipes/sip/nodes/deprecated/demix/shiftphasecenter.py diff --git a/CEP/Pipeline/recipes/sip/nodes/demix/smoothdemix.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/demix/smoothdemix.py similarity index 100% rename from CEP/Pipeline/recipes/sip/nodes/demix/smoothdemix.py rename to CEP/Pipeline/recipes/sip/nodes/deprecated/demix/smoothdemix.py diff --git a/CEP/Pipeline/recipes/sip/nodes/demix/subtract_from_averaged.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/demix/subtract_from_averaged.py similarity index 100% rename from CEP/Pipeline/recipes/sip/nodes/demix/subtract_from_averaged.py rename to CEP/Pipeline/recipes/sip/nodes/deprecated/demix/subtract_from_averaged.py diff --git a/CEP/Pipeline/recipes/sip/nodes/demixing.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/demixing.py similarity index 100% rename from CEP/Pipeline/recipes/sip/nodes/demixing.py rename to CEP/Pipeline/recipes/sip/nodes/deprecated/demixing.py diff --git a/CEP/Pipeline/recipes/sip/nodes/deprecated/dummy_echo_parallel.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/dummy_echo_parallel.py deleted file mode 100644 index c165e51626d..00000000000 --- a/CEP/Pipeline/recipes/sip/nodes/deprecated/dummy_echo_parallel.py +++ /dev/null @@ -1,14 +0,0 @@ -import subprocess -from lofarpipe.support.lofarnode import LOFARnode - -class dummy_echo_parallel(LOFARnode): - def run(self, filename, executable): - self.logger.info("Processing %s" % (filename)) - execute = [executable, filename] - - my_process = subprocess.Popen(execute, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - sout, serr = my_process.communicate() - self.logger.info("stdout: " + sout) - self.logger.info("stderr: " + serr) - - return filename diff --git a/CEP/Pipeline/recipes/sip/nodes/deprecated/excluder.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/excluder.py deleted file mode 100644 index 2d212e9bee6..00000000000 --- a/CEP/Pipeline/recipes/sip/nodes/deprecated/excluder.py +++ /dev/null @@ -1,27 +0,0 @@ -from __future__ import with_statement -from pyrap.tables import table - -from lofarpipe.support.lofarnode import LOFARnode -from lofarpipe.support.utilities import log_time - -class excluder(LOFARnode): - """ - Remove data from the given station from the input MS. - """ - def run(self, input, output, *stations): - try: - t = table(input) - except Exception, e: - self.logger.error(str(e)) - raise e - try: - a = table(t.getkeyword('ANTENNA').split()[1]) - station_ids = [a.getcol('NAME').index(name) for name in stations] - selection = t.query( - "ANTENNA1 not in %s and ANTENNA2 not in %s" % - (str(station_ids), str(station_ids)) - ) - selection.copy(output, deep=True).close() - except Exception, e: - self.logger.error(str(e)) - raise e diff --git a/CEP/Pipeline/recipes/sip/nodes/flag_baseline.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/flag_baseline.py similarity index 100% rename from CEP/Pipeline/recipes/sip/nodes/flag_baseline.py rename to CEP/Pipeline/recipes/sip/nodes/deprecated/flag_baseline.py diff --git a/CEP/Pipeline/recipes/sip/nodes/deprecated/flagger.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/flagger.py deleted file mode 100644 index b5a6c49d2c6..00000000000 --- a/CEP/Pipeline/recipes/sip/nodes/deprecated/flagger.py +++ /dev/null @@ -1,31 +0,0 @@ -from __future__ import with_statement -from pyrap.tables import table -import numpy - -from lofarpipe.support.lofarnode import LOFARnode -from lofarpipe.support.utilities import log_time - -class flagger(LOFARnode): - """ - Flag out CORRECTED_DATA greater than some maximum value. - """ - def run(self, input, output, max_value): - with log_time(self.logger): - self.logger.info("Processing: %s" % (input)) - try: - t = table(input) - t2 = t.copy(output, deep=True) - t2.close() - t = table(output, readonly=False) - except Exception, e: - self.logger.error(str(e)) - raise e - try: - for i, data in enumerate(t.getcol('CORRECTED_DATA')): - if max([abs(val) for val in data[0]]) > max_value: - t.putcell('FLAG', i, numpy.array([[True, True, True, True]])) - t.putcell('FLAG_ROW', i, True) - t.close() - except Exception, e: - self.logger.error(str(e)) - raise e diff --git a/CEP/Pipeline/recipes/sip/nodes/make_flaggable.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/make_flaggable.py similarity index 100% rename from CEP/Pipeline/recipes/sip/nodes/make_flaggable.py rename to CEP/Pipeline/recipes/sip/nodes/deprecated/make_flaggable.py diff --git a/CEP/Pipeline/recipes/sip/nodes/deprecated/qcheck.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/qcheck.py deleted file mode 100644 index da2c5f6ad73..00000000000 --- a/CEP/Pipeline/recipes/sip/nodes/deprecated/qcheck.py +++ /dev/null @@ -1,51 +0,0 @@ -from __future__ import with_statement -import os, imp, logging, errno - -from pipeline.support.lofarnode import LOFARnode -from pipeline.support.utilities import log_time - -class qcheck_node(LOFARnode): - """ - Run quality check modules on an image. - """ - def run(self, infile, pluginlist, outputdir): - with log_time(self.logger): - self.logger.info("Processing: %s" % (infile)) - - try: - os.makedirs(outputdir) - except OSError, failure: - if failure.errno != errno.EEXIST: - raise - - file_handler = logging.FileHandler(os.path.join( - outputdir, - os.path.basename(infile) + ".qcheck.log" - ), - mode='w' - ) - file_handler.setFormatter(logging.Formatter("%(message)s")) - file_logger = logging.getLogger('main') - file_logger.addHandler(file_handler) - file_logger.setLevel(logging.INFO) - pipeline_logger = logging.getLogger(self.logger.name + "." + os.path.basename(infile)) - pipeline_logger.setLevel(logging.WARN) - - loggers = {'main': file_logger, 'warn': pipeline_logger} - - for plugin in pluginlist: - try: - qcheck = imp.load_source('qcheck', plugin) - except ImportError: - self.logger.warn("Quality check module (%s) not found" % (plugin)) - try: - qcheck.run(infile, outputdir=outputdir, loggers=loggers) - except Exception, e: - self.logger.warn("Quality check failed on %s" % (infile)) - self.logger.exception(str(e)) - - # Tidy up for the next image - file_handler.flush() - loggers['main'].remove_handler(file_handler) - - return 0 diff --git a/CEP/Pipeline/recipes/sip/nodes/deprecated/sextractor.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/sextractor.py deleted file mode 100644 index bf87b51e9f7..00000000000 --- a/CEP/Pipeline/recipes/sip/nodes/deprecated/sextractor.py +++ /dev/null @@ -1,59 +0,0 @@ -# Python standard library -from __future__ import with_statement -from contextlib import closing -from subprocess import check_call -from tempfile import mkdtemp -from ConfigParser import SafeConfigParser as ConfigParser -from shutil import rmtree -import os.path - -# Root directory for config file -from pipeline import __path__ as config_path - -from tkp_lib.accessors import FitsFile -from tkp_lib.image import ImageData -from tkp_lib.database import connection - -from tkp_lib.dataset import DataSet - -def sextract(filename, dataset): - raise NotImplementedError - # Hack around MonetDB concurrency issues(!) - import time, random - time.sleep(random.randint(0,60)) - - try: - config = ConfigParser() - config.read("%s/pipeline.cfg" % (config_path[0],)) - image2fits = config.get('sextractor', 'image2fits') - - tempdir = mkdtemp(dir='/data/swinbank') - fitsfile = os.path.join(tempdir, os.path.basename(filename) + ".fits") - - command_line = [image2fits, "in=%s" % (os.path.basename(filename)), "out=%s" % (fitsfile)] - cwd = os.path.dirname(filename) - - check_call( - command_line, - cwd=os.path.dirname(filename), - close_fds=True - ) - - image = ImageData(FitsFile(fitsfile), dataset=dataset) - except Exception, inst: - return "ERROR: %s on %s, %s" % (str((type(inst))), platform.node(), fitsfile) - - sr = image.sextract() - with closing(connection()) as con: - sr.savetoDB(con) - - rmtree(tempdir) - return "%s found %d sources" % (filename, len(sr)) - -if __name__ == "__main__": - from sys import argv - dataset = DataSet("command line") - try: - sextract(argv[1], dataset) - except: - print "Usage: sextractor [filename]" diff --git a/CEP/Pipeline/recipes/sip/nodes/deprecated/trimmer.py b/CEP/Pipeline/recipes/sip/nodes/deprecated/trimmer.py deleted file mode 100644 index 391a76ec89f..00000000000 --- a/CEP/Pipeline/recipes/sip/nodes/deprecated/trimmer.py +++ /dev/null @@ -1,32 +0,0 @@ -from __future__ import with_statement -from pyrap.tables import table - -from lofarpipe.support.lofarnode import LOFARnode -from lofarpipe.support.utilities import log_time - -class trimmer(LOFARnode): - """ - Remove data from the start and/or end of a MeasurementSet. - """ - def run(self, input, output, start_seconds, end_seconds): - # Remove data from the start and/or end of a MeasurementSet. - copy_columns = ",".join([ - 'UVW', 'FLAG', 'FLAG_CATEGORY', 'WEIGHT', 'SIGMA', 'ANTENNA1', - 'ANTENNA2', 'ARRAY_ID', 'DATA_DESC_ID', 'EXPOSURE', 'FEED1', 'FEED2', - 'FIELD_ID', 'FLAG_ROW', 'INTERVAL', 'OBSERVATION_ID', 'PROCESSOR_ID', - 'SCAN_NUMBER', 'STATE_ID', 'TIME', 'TIME_CENTROID', 'DATA', - 'WEIGHT_SPECTRUM' - ]) - try: - t = table(input) - selection = t.query( - "TIME > %.16f AND TIME < %.16f" % ( - t.getcol('TIME')[0] + float(start_seconds), - t.getcol('TIME')[-1] - float(end_seconds) - ), - columns=copy_columns - ) - selection.copy(output, deep=True) - except Exception, e: - self.logger.error(str(e)) - raise e diff --git a/CEP/Pipeline/recipes/sip/nodes/imager_awimager.py b/CEP/Pipeline/recipes/sip/nodes/imager_awimager.py index 75c68fe76ca..a2af35124a3 100644 --- a/CEP/Pipeline/recipes/sip/nodes/imager_awimager.py +++ b/CEP/Pipeline/recipes/sip/nodes/imager_awimager.py @@ -34,14 +34,15 @@ from lofarpipe.support.parset import Parset import lofar.parmdb #@UnresolvedImport import numpy as np + class imager_awimager(LOFARnodeTCP): def run(self, executable, environment, parset, working_directory, output_image, concatenated_measurement_set, sourcedb_path, mask_patch_size): - """ + """ :param executable: Path to awimager executable :param environment: environment for catch_segfaults (executable runner) - :param parset: parameters for the awimager, + :param parset: parameters for the awimager, :param working_directory: directory the place temporary files :param output_image: location and filesname to story the output images the multiple images are appended with type extentions @@ -49,14 +50,14 @@ class imager_awimager(LOFARnodeTCP): :param sourcedb_path: Path the the sourcedb used to create the image mask :param mask_patch_size: Scaling of the patch around the source in the - mask + mask :rtype: self.outputs["image"] The path to the output image """ self.logger.info("Start imager_awimager node run:") log4_cplus_name = "imager_awimager" self.environment.update(environment) - + with log_time(self.logger): # **************************************************************** # 1. Calculate awimager parameters that depend on measurement set @@ -79,28 +80,33 @@ class imager_awimager(LOFARnodeTCP): working_directory, log4_cplus_name, sourcedb_path, mask_patch_size, image_path_head) - # ****************************************************************** + # ***************************************************************** # 4. Update the parset with calculated parameters, and output image patch_dictionary = {'uselogger': 'True', # enables log4cpluscd log 'ms': str(concatenated_measurement_set), 'cellsize': str(cell_size), 'npix': str(npix), 'wmax': str(w_max), - 'wprojplanes':str(w_proj_planes), - 'image':str(output_image), - 'maxsupport':str(npix), - #'mask':str(mask_file_path), #TODO REINTRODUCE + 'wprojplanes': str(w_proj_planes), + 'image': str(output_image), + 'maxsupport': str(npix), + #'mask':str(mask_file_path), #TODO REINTRODUCE # MASK, excluded to speed up in this debug stage } - # save the parset at the target dir for the image - temp_parset_filename = patch_parset(parset, patch_dictionary) + # save the parset at the target dir for the image calculated_parset_path = os.path.join(image_path_head, - "parset.par") - # Copy tmp file to the final location - shutil.copy(temp_parset_filename, calculated_parset_path) - self.logger.debug("Wrote parset for awimager run: {0}".format( + "parset.par") + + try: + temp_parset_filename = patch_parset(parset, patch_dictionary) + # Copy tmp file to the final location + shutil.copyfile(temp_parset_filename, calculated_parset_path) + self.logger.debug("Wrote parset for awimager run: {0}".format( calculated_parset_path)) + finally: + # remove temp file + os.remove(temp_parset_filename) # ***************************************************************** # 5. Run the awimager with the updated parameterset @@ -126,24 +132,26 @@ class imager_awimager(LOFARnodeTCP): # ********************************************************************* # 6. Return output # Append static .restored: This might change but prob. not - # The actual output image has this extention always, default of awimager + # The actual output image has this extention always, default of + # awimager self.outputs["image"] = output_image + ".restored" return 0 def _calc_par_from_measurement(self, measurement_set, parset): """ - (1) calculate and format some parameters that are determined runtime. + (1) calculate and format some parameters that are determined runtime. Based on values in the measurementset and input parameter (set): - a. <string> The cellsize + a. <string> The cellsize b. <int> The npixels in a each of the two dimension of the image c. <string> The largest baseline in the ms smaller then the maxbaseline d. <string> The number of projection planes - + The calculation of these parameters is done in three steps: 1. Calculate intermediate results based on the ms. - 2. The calculation of the actual target values using intermediate result + 2. The calculation of the actual target values using intermediate + result 3. Scaling of cellsize and npix to allow for user input of the npix """ @@ -155,16 +163,17 @@ class imager_awimager(LOFARnodeTCP): # npix round up to nearest pow 2 parset_npix = self._nearest_ceiled_power2(parset_object.getInt('npix')) - # Get the longest baseline + # Get the longest baseline sqrt_max_baseline = pt.taql( 'CALC sqrt(max([select sumsqr(UVW[:2]) from ' + \ '{0} where sumsqr(UVW[:2]) <{1} giving as memory]))'.format(\ measurement_set, baseline_limit * - baseline_limit))[0] #ask ger van diepen for details if ness. + baseline_limit))[0] # ask ger van diepen for details if ness. #Calculate the wave_length table_ms = pt.table(measurement_set) - table_spectral_window = pt.table(table_ms.getkeyword("SPECTRAL_WINDOW")) + table_spectral_window = pt.table( + table_ms.getkeyword("SPECTRAL_WINDOW")) freq = table_spectral_window.getcell("REF_FREQUENCY", 0) table_spectral_window.close() wave_length = pt.taql('CALC C()') / freq @@ -200,12 +209,12 @@ class imager_awimager(LOFARnodeTCP): "Calculated w_max and the number pf projection plances:" " {0} , {1}".format(w_max, w_proj_planes)) - # MAximum number of proj planes set to 1024: George Heald, Ger van + # MAximum number of proj planes set to 1024: George Heald, Ger van # Diepen if this exception occurs maxsupport = max(1024, npix) if w_proj_planes > maxsupport: - raise Exception("The number of projections planes for the current" + - "measurement set is to large.") + raise Exception("The number of projections planes for the current" + + "measurement set is to large.") # ********************************************************************* # 3. if the npix from the parset is different to the ms calculations, @@ -231,7 +240,7 @@ class imager_awimager(LOFARnodeTCP): """ _field_of_view calculates the fov, which is dependend on the station type, location and mode: - For details see: + For details see: (1) http://www.astron.nl/radio-observatory/astronomers/lofar-imaging-capabilities-sensitivity/lofar-imaging-capabilities/lofar """ @@ -247,7 +256,7 @@ class imager_awimager(LOFARnodeTCP): antenna_set = observation.getcell('LOFAR_ANTENNA_SET', 0) observation.close() - #static parameters for the station diameters ref (1) + #static parameters for the station diameters ref (1) hba_core_diameter = 30.8 hba_remote_diameter = 41.1 lba_inner = 32.3 @@ -275,13 +284,14 @@ class imager_awimager(LOFARnodeTCP): "Unknown antenna type encountered in Measurement set") #Get the wavelength - spectral_window_table = pt.table(table_ms.getkeyword("SPECTRAL_WINDOW")) + spectral_window_table = pt.table(table_ms.getkeyword( + "SPECTRAL_WINDOW")) freq = float(spectral_window_table.getcell("REF_FREQUENCY", 0)) wave_length = pt.taql('CALC C()') / freq spectral_window_table.close() # Now calculate the FOV see ref (1) - # alpha_one is a magic parameter: The value 1.3 is representative for a + # alpha_one is a magic parameter: The value 1.3 is representative for a # WSRT dish, where it depends on the dish illumination alpha_one = 1.3 @@ -322,17 +332,18 @@ class imager_awimager(LOFARnodeTCP): # 1. Create the parset used to make a mask mask_file_path = output_image + ".mask" - mask_patch_dictionary = {"npix":str(npix), - "cellsize":str(cell_size), - "image":str(mask_file_path), - "ms":str(concatenated_measurement_set), - "operation":"empty", - "stokes":"'I'" + mask_patch_dictionary = {"npix": str(npix), + "cellsize": str(cell_size), + "image": str(mask_file_path), + "ms": str(concatenated_measurement_set), + "operation": "empty", + "stokes": "'I'" } mask_parset = Parset.fromDict(mask_patch_dictionary) mask_parset_path = os.path.join(image_path_directory, "mask.par") mask_parset.writeFile(mask_parset_path) - self.logger.debug("Write parset for awimager mask creation: {0}".format( + self.logger.debug( + "Write parset for awimager mask creation: {0}".format( mask_parset_path)) # ********************************************************************* @@ -393,21 +404,21 @@ class imager_awimager(LOFARnodeTCP): Version 0.3 (Wouter Klijn, klijn@astron.nl) - Usage of sourcedb instead of txt document as 'source' of sources This allows input from different source sources - Version 0.31 (Wouter Klijn, klijn@astron.nl) + Version 0.31 (Wouter Klijn, klijn@astron.nl) - Adaptable patch size (patch size needs specification) - Patch size and geometry is broken: needs some astronomer magic to fix it, problem with afine transformation prol. Version 0.32 (Wouter Klijn, klijn@astron.nl) - - Renaming of variable names to python convention + - Renaming of variable names to python convention """ - pad = 500. # increment in maj/minor axes [arcsec] + # increment in maj/minor axes [arcsec] + pad = 500. # open mask mask = pim.image(mask_file_path, overwrite=True) mask_data = mask.getdata() xlen, ylen = mask.shape()[2:] - freq, stokes, null, null = mask.toworld([0, 0, 0, 0]) #@UnusedVariable - + freq, stokes, null, null = mask.toworld([0, 0, 0, 0]) #Open the sourcedb: table = pt.table(sourcedb_path + "::SOURCES") @@ -442,12 +453,13 @@ class imager_awimager(LOFARnodeTCP): # minor radius (+pad) in rad minor = (((min_raw + pad)) / 3600.) * np.pi / 180. pix_asc = pa_raw * np.pi / 180. - # wenss writes always 'GAUSSIAN' even for point sources + # wenss writes always 'GAUSSIAN' even for point sources #-> set to wenss beam+pad if maj == 0 or minor == 0: maj = ((54. + pad) / 3600.) * np.pi / 180. minor = ((54. + pad) / 3600.) * np.pi / 180. - elif source_type == 0: # set to wenss beam+pad + # set to wenss beam+pad + elif source_type == 0: maj = (((54. + pad) / 2.) / 3600.) * np.pi / 180. minor = (((54. + pad) / 2.) / 3600.) * np.pi / 180. pix_asc = 0. @@ -505,7 +517,7 @@ class imager_awimager(LOFARnodeTCP): # some helper functions def _nearest_ceiled_power2(self, value): """ - Return int value of the nearest Ceiled power of 2 for the + Return int value of the nearest Ceiled power of 2 for the suplied argument """ diff --git a/CEP/Pipeline/recipes/sip/nodes/imager_create_dbs.py b/CEP/Pipeline/recipes/sip/nodes/imager_create_dbs.py index c9ac3acc051..f2b714fa0cd 100644 --- a/CEP/Pipeline/recipes/sip/nodes/imager_create_dbs.py +++ b/CEP/Pipeline/recipes/sip/nodes/imager_create_dbs.py @@ -73,7 +73,7 @@ class imager_create_dbs(LOFARnodeTCP): #******************************************************************* # 2convert it to a sourcedb (casa table) if self._create_source_db(source_list, sourcedb_target_path, - working_directory, makesourcedb_path, + working_directory, makesourcedb_path, append) == None: self.logger.error("failed creating sourcedb") return 1 @@ -151,7 +151,7 @@ class imager_create_dbs(LOFARnodeTCP): os.path.basename(executable) ) as logger: catch_segfaults(cmd, working_directory, self.environment, - logger, cleanup = None) + logger, cleanup=None) except subprocess.CalledProcessError, called_proc_error: self.logger.error("Execution of external failed:") @@ -372,21 +372,101 @@ class imager_create_dbs(LOFARnodeTCP): if ra_c < 0: #gsm utils break when using negative ra_c ergo add 360 ra_c += 360.0 decl_c = float(decl_c) * (180 / math.pi) + self.logger.debug("external call to gsm module:") + self.logger.debug("gsm.expected_fluxes_in_fov(conn, {0} , {1}, {2}, {3}, {4}, {5})".format( + ra_c, decl_c, float(fov_radius), float(assoc_theta), sourcelist, "storespectraplots=False")) gsm.expected_fluxes_in_fov(conn, ra_c , decl_c, float(fov_radius), float(assoc_theta), sourcelist, storespectraplots=False) + self.logger.debug(gsm.__file__) + except Exception, exception: self.logger.error("expected_fluxes_in_fov raise exception: " + str(exception)) return 1 + # validate the retrieve sourcelist + fp = open(sourcelist) + sourcelist_corrected = self._validate_and_correct_sourcelist(fp.read()) + fp.close() + + if sourcelist_corrected != None: + self.logger.debug("Found duplicates in the sourcelist!") + self.logger.debug("Creating a new sourcelist") + #if a corrected sourcelist is created. + # move original sourcelist + shutil.move(sourcelist, sourcelist + "_with_duplicates") + # write correcte sourcelist at that location + fp = open(sourcelist, "w",) + fp.write(sourcelist_corrected) + self.logger.debug("Moved sourcelist and create a new sourcelist") + fp.close() + else: + self.logger.debug("Sourcelist did not contain duplicates") return 0 + def _validate_and_correct_sourcelist(self, sourcelist): + """ + Create a sourcelist with non duplicate entries based on the + supplied sourcelist + Return None of no duplicate found + """ + all_lines = sourcelist.split("\n") + header = "" + all_entries_list = [] + for line in all_lines: + #skip the whiteline + if len(line) == 0: + continue + # get the header + if line[0] == "#": + header = line + continue + # unpack the values + all_entries_list.append(line.split(",")) + + # Get the names for the entries + entrie_names = [] + for entrie in all_entries_list: + entrie_names.append(entrie[0]) #name is first index in entrie + + #enumerate over all names-1 + duplicate_entry_idx = 0 + for idx, name in enumerate(entrie_names[:-1]): + if name in entrie_names[idx + 1:]: + # If duplicate change current entrie to unique name + entrie_names[idx] = name + "_duplicate_{0}".format(duplicate_entry_idx) + duplicate_entry_idx += 1 + + # now put back the possible changed name + for entrie, entrie_name in zip(all_entries_list, + entrie_names) : + entrie[0] = entrie_name + + # Write the new sourcelist if we found duplicate entries! + if duplicate_entry_idx > 0: + new_lines = [] + # add header + new_lines.append(header) + # empty line + new_lines.append("") + # entries with non duplicate names + for entrie in all_entries_list: + new_lines.append(",".join(entrie)) + # return the sourcelist + return "\n".join(new_lines) + + return None + + + if __name__ == "__main__": # args contain information regarding to the logging server _jobid, _jobhost, _jobport = sys.argv[1:4] sys.exit(imager_create_dbs( _jobid, _jobhost, _jobport).run_with_stored_arguments()) + + diff --git a/CEP/Pipeline/recipes/sip/nodes/imager_prepare.py b/CEP/Pipeline/recipes/sip/nodes/imager_prepare.py index be24bf7e18b..8c4d1c73ac3 100644 --- a/CEP/Pipeline/recipes/sip/nodes/imager_prepare.py +++ b/CEP/Pipeline/recipes/sip/nodes/imager_prepare.py @@ -1,9 +1,9 @@ # LOFAR IMAGING PIPELINE -# Prepare phase node -# Wouter Klijn +# Prepare phase node +# Wouter Klijn # 2012 # klijn@astron.nl -# ------------------------------------------------------------------------------ +# ----------------------------------------------------------------------------- from __future__ import with_statement import sys import shutil @@ -19,7 +19,7 @@ from lofarpipe.support.utilities import create_directory from lofarpipe.support.group_data import load_data_map from lofarpipe.support.subprocessgroup import SubProcessGroup -import pyrap.tables as pt #@UnresolvedImport +import pyrap.tables as pt # Some constant settings for the recipe _time_slice_dir_name = "time_slices" @@ -37,8 +37,8 @@ class imager_prepare(LOFARnodeTCP): 5. Concatenate the time slice measurment sets, to a single virtual ms. 6. Filter bad stations. Find station with repeated bad measurement and remove these completely from the dataset. - - **Members:** + + **Members:** """ def run(self, environment, parset, working_dir, processed_ms_dir, ndppp_executable, output_measurement_set, @@ -53,10 +53,10 @@ class imager_prepare(LOFARnodeTCP): input_map = load_data_map(raw_ms_mapfile) #****************************************************************** - # I. Create the directories used in this recipe + # I. Create the directories used in this recipe create_directory(processed_ms_dir) - # time slice dir_to_remove: assure empty directory: Stale data + # time slice dir_to_remove: assure empty directory: Stale data # is problematic for dppp time_slice_dir = os.path.join(working_dir, _time_slice_dir_name) create_directory(time_slice_dir) @@ -84,6 +84,12 @@ class imager_prepare(LOFARnodeTCP): time_slices_per_image, input_map, subbands_per_group, processed_ms_dir, parset, ndppp_executable) + # If no timeslices were created, bail out with exit status 1 + if len(time_slices) == 0: + self.logger.error("No timeslices were created.") + self.logger.error("Exiting with error state 1") + return 1 + self.logger.debug("Produced time slices: {0}".format(time_slices)) #*********************************************************** # 3. run rfi_concole: flag datapoints which are corrupted @@ -95,7 +101,8 @@ class imager_prepare(LOFARnodeTCP): # ndppp_executable fails if not present for ms in time_slices: pt.addImagingColumns(ms) - self.logger.debug("Added imaging columns to ms: {0}".format(ms)) + self.logger.debug( + "Added imaging columns to ms: {0}".format(ms)) #***************************************************************** # 5. Filter bad stations @@ -109,7 +116,7 @@ class imager_prepare(LOFARnodeTCP): output_measurement_set) #****************************************************************** - # return + # return self.outputs["time_slices"] = group_measurement_filtered self.outputs["completed"] = "true" @@ -120,7 +127,7 @@ class imager_prepare(LOFARnodeTCP): """ Perform a optionalskip_copy copy of the input ms: For testing purpose the output, the missing_files can be saved - allowing the skip of this step + allowing the skip of this step """ missing_files = [] temp_missing = os.path.join(processed_ms_dir, "temp_missing") @@ -147,7 +154,7 @@ class imager_prepare(LOFARnodeTCP): """ Collect all the measurement sets in a single directory: The measurement sets are located on different nodes on the cluster. - This function collects all the file in the input map in the + This function collects all the file in the input map in the processed_ms_dir Return value is a set of missing files """ missing_files = [] @@ -155,22 +162,23 @@ class imager_prepare(LOFARnodeTCP): #loop all measurement sets for node, path in input_map: # construct copy command - command = ["rsync", "-r", "{0}:{1}".format(node, path) , + command = ["rsync", "-r", "{0}:{1}".format(node, path), "{0}".format(processed_ms_dir)] self.logger.debug("executing: " + " ".join(command)) # Spawn a subprocess and connect the pipes - # DO NOT USE SUBPROCESSGROUP - # The copy step is performed 720 at once in that case which might - # saturate the cluster. + # DO NOT USE SUBPROCESSGROUP + # The copy step is performed 720 at once in that case which might + # saturate the cluster. copy_process = subprocess.Popen( command, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - # Wait for finish of copy inside the loop: enforce single tread copy + # Wait for finish of copy inside the loop: enforce single tread + # copy (stdoutdata, stderrdata) = copy_process.communicate() exit_status = copy_process.returncode @@ -200,9 +208,9 @@ class imager_prepare(LOFARnodeTCP): input_map, subbands_per_image, collected_ms_dir_name, parset, ndppp): """ - Run NDPPP: + Run NDPPP: Create dir for grouped measurements, assure clean workspace - Call with log for cplus and catch segfaults. Pparameters are + Call with log for cplus and catch segfaults. Pparameters are supplied in parset """ time_slice_path_collected = [] @@ -213,7 +221,7 @@ class imager_prepare(LOFARnodeTCP): ((idx_time_slice + 1) * subbands_per_image)] # get the filenames - input_subgroups = map(lambda x: x.split("/")[-1] , + input_subgroups = map(lambda x: x.split("/")[-1], list(zip(*input_map_subgroup)[1])) # join with the group_measurement_directory to get the locations @@ -226,29 +234,35 @@ class imager_prepare(LOFARnodeTCP): # construct time slice name time_slice_path = os.path.join(time_slice_dir_path, output_ms_name) - time_slice_path_collected.append(time_slice_path) msin = "['{0}']".format("', '".join(ndppp_input_ms)) # Update the parset with computed parameters patch_dictionary = {'uselogger': 'True', # enables log4cplus 'msin': msin, - 'msout':time_slice_path} + 'msout': time_slice_path} nddd_parset_path = time_slice_path + ".ndppp.par" - temp_parset_filename = patch_parset(parset, patch_dictionary) - shutil.copy(temp_parset_filename, nddd_parset_path) + try: + temp_parset_filename = patch_parset(parset, patch_dictionary) + shutil.copyfile(temp_parset_filename, nddd_parset_path) + # Remove the temp file + finally: + os.remove(temp_parset_filename) try: nddd_parset_path = time_slice_path + ".ndppp.par" temp_parset_filename = patch_parset(parset, patch_dictionary) shutil.copy(temp_parset_filename, nddd_parset_path) - self.logger.debug("Wrote a ndppp parset with runtime variables:" + self.logger.debug( + "Wrote a ndppp parset with runtime variables:" " {0}".format(nddd_parset_path)) - os.unlink(temp_parset_filename) except Exception, exception: self.logger.error("failed loading and updating the " + "parset: {0}".format(parset)) raise exception + # remove the temp file + finally: + os.unlink(temp_parset_filename) #run ndppp cmd = [ndppp, nddd_parset_path] @@ -256,13 +270,17 @@ class imager_prepare(LOFARnodeTCP): try: # Actual dppp call to externals (allows mucking) self._dppp_call(working_dir, ndppp, cmd, self.environment) + # append the created timeslice on succesfull run + time_slice_path_collected.append(time_slice_path) + # On error the current timeslice should be skipped except subprocess.CalledProcessError, exception: - self.logger.error(str(exception)) - return 1 + self.logger.warning(str(exception)) + continue + except Exception, exception: - self.logger.error(str(exception)) - return 1 + self.logger.warning(str(exception)) + continue return time_slice_path_collected @@ -270,9 +288,9 @@ class imager_prepare(LOFARnodeTCP): output_file_path): """ Msconcat to combine the time slices in a single ms: - It is a virtual ms, a ms with symbolic links to actual data is created! + It is a virtual ms, a ms with symbolic links to actual data is created! """ - pt.msconcat(group_measurements_collected, #@UndefinedVariable + pt.msconcat(group_measurements_collected, output_file_path, concatTime=True) self.logger.debug("Concatenated the files: {0} into the single measure" "mentset: {1}".format( @@ -281,25 +299,23 @@ class imager_prepare(LOFARnodeTCP): def _run_rficonsole(self, rficonsole_executable, time_slice_dir, time_slices): """ - _run_rficonsole runs the rficonsole application on the supplied timeslices - in time_slices. - + _run_rficonsole runs the rficonsole application on the supplied + timeslices in time_slices. + """ #loop all measurement sets rfi_temp_dir = os.path.join(time_slice_dir, "rfi_temp_dir") create_directory(rfi_temp_dir) - try: rfi_console_proc_group = SubProcessGroup(self.logger) for time_slice in time_slices: - temp_slice_path = os.path.join(temp_dir_path, + # Each rfi console needs own working space for temp files + temp_slice_path = os.path.join(rfi_temp_dir, os.path.basename(time_slice)) create_directory(temp_slice_path) - # Each rfi console needs own working space for temp files - temp_dir_path = os.path.join(rfi_temp_dir, os.path.basename(group_set)) - create_directory(temp_dir_path) + # construct copy command self.logger.info(time_slice) command = [rficonsole_executable, "-indirect-read", @@ -315,20 +331,20 @@ class imager_prepare(LOFARnodeTCP): raise Exception("an rfi_console_proc_group run failed!") finally: - shutil.rmtree(temp_dir_path) + shutil.rmtree(rfi_temp_dir) def _filter_bad_stations(self, group_measurements_collected, asciistat_executable, statplot_executable, msselect_executable): """ A Collection of scripts for finding and filtering of bad stations: - 1. First a number of statistics with regards to the spread of the data + 1. First a number of statistics with regards to the spread of the data is collected using the asciistat_executable. 2. Secondly these statistics are consumed by the statplot_executable which produces a set of bad stations. - 3. In the final step the bad stations are removed from the dataset using - ms select - + 3. In the final step the bad stations are removed from the dataset + using ms select + REF: http://www.lofar.org/wiki/lib/exe/fetch.php?media=msss:pandeymartinez-week9-v1p2.pdf """ # run asciistat to collect statistics about the ms @@ -353,7 +369,8 @@ class imager_prepare(LOFARnodeTCP): asciiplot_output = [] asciiplot_proc_group = SubProcessGroup(self.logger) for (ms, output_dir) in asciistat_output: - ms_stats = os.path.join(output_dir, os.path.split(ms)[1] + ".stats") + ms_stats = os.path.join( + output_dir, os.path.split(ms)[1] + ".stats") cmd_string = "{0} -i {1} -o {2}".format(statplot_executable, ms_stats, ms_stats) @@ -383,7 +400,7 @@ class imager_prepare(LOFARnodeTCP): #add the name of station station_to_filter.append(entries[1]) - # if this measurement does not contain baselines to skip do not + # if this measurement does not contain baselines to skip do not # filter and provide the original ms as output if len(station_to_filter) == 0: msselect_output[ms] = ms diff --git a/CEP/Pipeline/recipes/sip/nodes/imager_source_finding.py b/CEP/Pipeline/recipes/sip/nodes/imager_source_finding.py index f58e45748e7..b8f41a9f7c1 100644 --- a/CEP/Pipeline/recipes/sip/nodes/imager_source_finding.py +++ b/CEP/Pipeline/recipes/sip/nodes/imager_source_finding.py @@ -92,6 +92,7 @@ class imager_source_finding(LOFARnodeTCP): pass #do nothing bdsm_parameters[key] = parameter_value + # ***************************************************************** # 3. Start pybdsm self.logger.debug( @@ -119,7 +120,7 @@ class imager_source_finding(LOFARnodeTCP): img.write_catalog( outfile=catalog_output_path + "_{0}".format(str(idx)), catalog_type='gaul', clobber=True, - format="bbs") + format="bbs", force_output=True) self.logger.debug("Wrote list of sources to file at: {0})".format( catalog_output_path)) @@ -132,7 +133,7 @@ class imager_source_finding(LOFARnodeTCP): # Save the frequency from image header of the original input file, # This information is not written by pybdsm to the exported image - frequency = img.cfreq + frequency = img.frequency # if not set the maximum number of itteration us performed if n_itter_sourcefind == None: @@ -244,7 +245,7 @@ class imager_source_finding(LOFARnodeTCP): os.path.basename(create_sourcdb_exec) ) as logger: catch_segfaults(cmd, working_directory, self.environment, - logger, cleanup = None) + logger, cleanup=None) except Exception, exception: self.logger.error("Execution of external failed:") diff --git a/CEP/Pipeline/recipes/sip/pipeline.cfg.in b/CEP/Pipeline/recipes/sip/pipeline.cfg.in index 0ac8e373673..83de06dd17c 100644 --- a/CEP/Pipeline/recipes/sip/pipeline.cfg.in +++ b/CEP/Pipeline/recipes/sip/pipeline.cfg.in @@ -11,7 +11,7 @@ working_directory = /data/scratch/$ENV{USER} task_files = [%(lofarroot)s/share/pipeline/tasks.cfg] [layout] -job_directory = %(runtime_directory)s/jobs/%(job_name)s +job_directory = %(runtime_directory)s/%(job_name)s [cluster] clusterdesc = %(lofarroot)s/share/cep2.clusterdesc @@ -21,5 +21,5 @@ engine_ppath = %(pythonpath)s:%(pyraproot)s/lib:/opt/cep/pythonlibs/lib/python/s engine_lpath = %(lofarroot)s/lib:%(casaroot)s/lib:%(pyraproot)s/lib:%(hdf5root)s/lib:%(wcsroot)s/lib [logging] -log_file = %(runtime_directory)s/jobs/%(job_name)s/logs/%(start_time)s/pipeline.log +log_file = %(runtime_directory)s/%(job_name)s/logs/%(start_time)s/pipeline.log diff --git a/CEP/Pipeline/recipes/sip/tasks.cfg.in b/CEP/Pipeline/recipes/sip/tasks.cfg.in index db5f7b75b5f..bb8d2472f7c 100644 --- a/CEP/Pipeline/recipes/sip/tasks.cfg.in +++ b/CEP/Pipeline/recipes/sip/tasks.cfg.in @@ -1,105 +1,54 @@ -[cep2_datamapper] -recipe = cep2_datamapper -mapfile = %(runtime_directory)s/jobs/%(job_name)s/mapfiles/data.mapfile - -[datamapper] -recipe = datamapper -mapfile = %(runtime_directory)s/jobs/%(job_name)s/mapfiles/data.mapfile - [ndppp] recipe = dppp executable = %(lofarroot)s/bin/NDPPP dry_run = False -mapfile = %(runtime_directory)s/jobs/%(job_name)s/mapfiles/dppp.mapfile -parset = %(runtime_directory)s/jobs/%(job_name)s/parsets/NDPPP.parset +mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/dppp.mapfile +parset = %(runtime_directory)s/%(job_name)s/parsets/NDPPP.parset #demix_always = #demix_if_needed = CasA nproc = 1 nthreads = 8 clobber = False -[bbs] -recipe = bbs -control_exec = %(lofarroot)s/bin/GlobalControl -kernel_exec = %(lofarroot)s/bin/KernelControl -parset = %(runtime_directory)s/jobs/%(job_name)s/parsets/bbs.parset -key = bbs_%(job_name)s -db_host = ldb001 -db_name = $ENV{USER} -db_user = postgres -makevds = %(lofarroot)s/bin/makevds -combinevds = %(lofarroot)s/bin/combinevds -makesourcedb = %(lofarroot)s/bin/makesourcedb -parmdbm = %(lofarroot)s/bin/parmdbm - [vdsreader] recipe = vdsreader -gvds = %(runtime_directory)s/jobs/%(job_name)s/vds/%(job_name)s.gvds +gvds = %(runtime_directory)s/%(job_name)s/vds/%(job_name)s.gvds [setupparmdb] recipe = setupparmdb executable = %(lofarroot)s/bin/parmdbm -mapfile = %(runtime_directory)s/jobs/%(job_name)s/mapfiles/parmdb.mapfile +mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/parmdb.mapfile [setupsourcedb] recipe = setupsourcedb executable = %(lofarroot)s/bin/makesourcedb -mapfile = %(runtime_directory)s/jobs/%(job_name)s/mapfiles/sky.mapfile - -[skymodel] -recipe = skymodel -min_flux = 0.5 -skymodel_file = %(runtime_directory)s/jobs/%(job_name)s/parsets/bbs.skymodel +mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/sky.mapfile [vdsmaker] recipe = vdsmaker -directory = %(runtime_directory)s/jobs/%(job_name)s/vds -gvds = %(runtime_directory)s/jobs/%(job_name)s/vds/%(job_name)s.gvds +directory = %(runtime_directory)s/%(job_name)s/vds +gvds = %(runtime_directory)s/%(job_name)s/vds/%(job_name)s.gvds makevds = %(lofarroot)s/bin/makevds combinevds = %(lofarroot)s/bin/combinevds -[cimager] -recipe = cimager -imager_exec = /opt/LofIm/daily/askapsoft/bin/cimager.sh -convert_exec = /opt/LofIm/daily/lofar/bin/convertimagerparset -parset = %(runtime_directory)s/jobs/%(job_name)s/parsets/mwimager.parset -results_dir = %(runtime_directory)s/jobs/%(job_name)s/results/%(start_time)s - -[flag_baseline] -recipe = flag_baseline - -[demixing] -recipe = demixing -demix_parset_dir = %(lofarroot)s/share/pipeline/demixing -db_host = ldb001 -skymodel = %(lofarroot)s/share/pipeline/skymodels/Ateam_LBA_CC.skymodel -demix_sources = CasA,CygA -mapfile = %(runtime_directory)s/jobs/%(job_name)s/mapfiles/demix.mapfile -nproc=1 - [new_bbs] recipe = new_bbs control_exec = %(lofarroot)s/bin/GlobalControl kernel_exec = %(lofarroot)s/bin/KernelControl -parset = %(runtime_directory)s/jobs/%(job_name)s/parsets/BBS.parset -gvds = %(runtime_directory)s/jobs/%(job_name)s/vds/%(job_name)s.gvds +parset = %(runtime_directory)s/%(job_name)s/parsets/BBS.parset +gvds = %(runtime_directory)s/%(job_name)s/vds/%(job_name)s.gvds db_key = %(job_name)s db_host = ldb001 db_user = postgres db_name = $ENV{USER} -instrument_mapfile = %(runtime_directory)s/jobs/%(job_name)s/mapfiles/instrument.mapfile -sky_mapfile = %(runtime_directory)s/jobs/%(job_name)s/mapfiles/sky.mapfile -data_mapfile = %(runtime_directory)s/jobs/%(job_name)s/mapfiles/bbs.mapfile +instrument_mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/instrument.mapfile +sky_mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/sky.mapfile +data_mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/bbs.mapfile [gainoutliercorrection] recipe = gainoutliercorrection executable = '' # Comment out the executable, for now use the editparmdb behaviour. #%(lofarroot)s/bin/parmexportcal -mapfile = %(runtime_directory)s/jobs/%(job_name)s/mapfiles/instrument.mapfile - -[parmexportcal] -recipe = parmexportcal -executable = %(lofarroot)s/bin/parmexportcal -mapfile = %(runtime_directory)s/jobs/%(job_name)s/mapfiles/instrument.mapfile +mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/instrument.mapfile [rficonsole] recipe = rficonsole @@ -139,13 +88,13 @@ fillrootimagegroup_exec = %(lofarroot)s/bin/fillRootImageGroup [copier] recipe = copier -mapfiles_dir = %(runtime_directory)s/jobs/%(job_name)s/mapfiles +mapfiles_dir = %(runtime_directory)s/%(job_name)s/mapfiles [bbs_reducer] recipe = bbs_reducer executable = %(lofarroot)s/bin/bbs-reducer -parset = %(runtime_directory)s/jobs/%(job_name)s/parsets/bbs.parset -instrument_mapfile = %(runtime_directory)s/jobs/%(job_name)s/mapfiles/instrument.mapfile -sky_mapfile = %(runtime_directory)s/jobs/%(job_name)s/mapfiles/sky.mapfile -data_mapfile = %(runtime_directory)s/jobs/%(job_name)s/mapfiles/bbs.mapfile +parset = %(runtime_directory)s/%(job_name)s/parsets/bbs.parset +instrument_mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/instrument.mapfile +sky_mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/sky.mapfile +data_mapfile = %(runtime_directory)s/%(job_name)s/mapfiles/bbs.mapfile diff --git a/CEP/Pipeline/test/recipes/nodes/imager_create_dbs_test.py b/CEP/Pipeline/test/recipes/nodes/imager_create_dbs_test.py index 2cbdd591d26..bce1838dae1 100644 --- a/CEP/Pipeline/test/recipes/nodes/imager_create_dbs_test.py +++ b/CEP/Pipeline/test/recipes/nodes/imager_create_dbs_test.py @@ -288,6 +288,73 @@ class ImagerCreateDBsTest(unittest.TestCase): self.assertTrue(self.imager_create_dbs.logger.last()[1].count(error_message) > 0, "The last logged message is incorrect") + def test_validate_and_correct_sourcelist_duplicate(self): + input_sourcelist = """# (Name, Type, Ra, Dec, I, Q, U, V, ReferenceFrequency='60e6', SpectralIndex='[0.0]', MajorAxis, MinorAxis, Orientation) = format + +1409.2+7035, POINT, 14:09:16.30080000, +70.35.38.18400000, 1.4221, , , , , [-0.5251, -0.1572] +1409.2+7035, POINT, 14:09:16.30080000, +70.35.38.18400000, 1.4221, , , , , [-0.51, -2.1572] # <-- duplicatie +1410.6+7004, POINT, 14:10:37.39920000, +70.04.00.58800000, 0.6217, , , , , [-0.4707, -0.3064] +1413.4+7122, POINT, 14:13:24.47040000, +71.22.08.18400000, 0.5473, , , , , [-0.8313, 0.0274] +1414.8+6831, POINT, 14:14:49.54080000, +68.31.23.59200000, 1.627, , , , , [-0.5004, -0.1755]""" + + target_sourcelist = """# (Name, Type, Ra, Dec, I, Q, U, V, ReferenceFrequency='60e6', SpectralIndex='[0.0]', MajorAxis, MinorAxis, Orientation) = format + +1409.2+7035_duplicate_0, POINT, 14:09:16.30080000, +70.35.38.18400000, 1.4221, , , , , [-0.5251, -0.1572] +1409.2+7035, POINT, 14:09:16.30080000, +70.35.38.18400000, 1.4221, , , , , [-0.51, -2.1572] # <-- duplicatie +1410.6+7004, POINT, 14:10:37.39920000, +70.04.00.58800000, 0.6217, , , , , [-0.4707, -0.3064] +1413.4+7122, POINT, 14:13:24.47040000, +71.22.08.18400000, 0.5473, , , , , [-0.8313, 0.0274] +1414.8+6831, POINT, 14:14:49.54080000, +68.31.23.59200000, 1.627, , , , , [-0.5004, -0.1755]""" + + output_sourcelist = self.imager_create_dbs._validate_and_correct_sourcelist(input_sourcelist) + self.assertTrue(output_sourcelist == target_sourcelist, + "The produced sourcelist was not correct: duplicate entry was not correctted properly: \n{0} \n{1}".format(output_sourcelist, target_sourcelist)) + + def test_validate_and_correct_sourcelist_2duplicate(self): + input_sourcelist = """# (Name, Type, Ra, Dec, I, Q, U, V, ReferenceFrequency='60e6', SpectralIndex='[0.0]', MajorAxis, MinorAxis, Orientation) = format + +1409.2+7035, POINT, 14:09:16.30080000, +70.35.38.18400000, 1.4221, , , , , [-0.5251, -0.1572] +1409.2+7035, POINT, 14:09:16.30080000, +70.35.38.18400000, 1.4221, , , , , [-0.51, -2.1572] # <-- duplicatie +1409.2+7035, POINT, 14:09:16.30080000, +70.35.38.18400000, 1.4221, , , , , [-0.51, -2.1572] # <-- duplicatie +1410.6+7004, POINT, 14:10:37.39920000, +70.04.00.58800000, 0.6217, , , , , [-0.4707, -0.3064] +1413.4+7122, POINT, 14:13:24.47040000, +71.22.08.18400000, 0.5473, , , , , [-0.8313, 0.0274] +1414.8+6831, POINT, 14:14:49.54080000, +68.31.23.59200000, 1.627, , , , , [-0.5004, -0.1755]""" + + target_sourcelist = """# (Name, Type, Ra, Dec, I, Q, U, V, ReferenceFrequency='60e6', SpectralIndex='[0.0]', MajorAxis, MinorAxis, Orientation) = format + +1409.2+7035_duplicate_0, POINT, 14:09:16.30080000, +70.35.38.18400000, 1.4221, , , , , [-0.5251, -0.1572] +1409.2+7035_duplicate_1, POINT, 14:09:16.30080000, +70.35.38.18400000, 1.4221, , , , , [-0.51, -2.1572] # <-- duplicatie +1409.2+7035, POINT, 14:09:16.30080000, +70.35.38.18400000, 1.4221, , , , , [-0.51, -2.1572] # <-- duplicatie +1410.6+7004, POINT, 14:10:37.39920000, +70.04.00.58800000, 0.6217, , , , , [-0.4707, -0.3064] +1413.4+7122, POINT, 14:13:24.47040000, +71.22.08.18400000, 0.5473, , , , , [-0.8313, 0.0274] +1414.8+6831, POINT, 14:14:49.54080000, +68.31.23.59200000, 1.627, , , , , [-0.5004, -0.1755]""" + + output_sourcelist = self.imager_create_dbs._validate_and_correct_sourcelist(input_sourcelist) + self.assertTrue(output_sourcelist == target_sourcelist, + "The produced sourcelist was not correct: duplicate entry was not correctted properly: \n{0} \n{1}".format(output_sourcelist, target_sourcelist)) + + + + def test_validate_and_correct_sourcelist_nonduplicate(self): + input_sourcelist = """# (Name, Type, Ra, Dec, I, Q, U, V, ReferenceFrequency='60e6', SpectralIndex='[0.0]', MajorAxis, MinorAxis, Orientation) = format + +1409.2+7035, POINT, 14:09:16.30080000, +70.35.38.18400000, 1.4221, , , , , [-0.5251, -0.1572] +1409.2+7036, POINT, 14:09:16.30080000, +70.35.38.18400000, 1.4221, , , , , [-0.51, -2.1572] # <-- nonduplicatie +1410.6+7004, POINT, 14:10:37.39920000, +70.04.00.58800000, 0.6217, , , , , [-0.4707, -0.3064] +1413.4+7122, POINT, 14:13:24.47040000, +71.22.08.18400000, 0.5473, , , , , [-0.8313, 0.0274] +1414.8+6831, POINT, 14:14:49.54080000, +68.31.23.59200000, 1.627, , , , , [-0.5004, -0.1755]""" + + target_sourcelist = """# (Name, Type, Ra, Dec, I, Q, U, V, ReferenceFrequency='60e6', SpectralIndex='[0.0]', MajorAxis, MinorAxis, Orientation) = format + +1409.2+7035, POINT, 14:09:16.30080000, +70.35.38.18400000, 1.4221, , , , , [-0.5251, -0.1572] +1409.2+7036, POINT, 14:09:16.30080000, +70.35.38.18400000, 1.4221, , , , , [-0.51, -2.1572] # <-- nonduplicatie +1410.6+7004, POINT, 14:10:37.39920000, +70.04.00.58800000, 0.6217, , , , , [-0.4707, -0.3064] +1413.4+7122, POINT, 14:13:24.47040000, +71.22.08.18400000, 0.5473, , , , , [-0.8313, 0.0274] +1414.8+6831, POINT, 14:14:49.54080000, +68.31.23.59200000, 1.627, , , , , [-0.5004, -0.1755]""" + + output_sourcelist = self.imager_create_dbs._validate_and_correct_sourcelist(input_sourcelist) + self.assertTrue(output_sourcelist == None, + "The produced sourcelist was not correct: the output for correct sourcelists was not correct!") + if __name__ == "__main__": unittest.main() diff --git a/CEP/Pipeline/test/regression_tests/jenkins_config/calibrator_regression.config.xml b/CEP/Pipeline/test/regression_tests/jenkins_config/calibrator_regression.config.xml new file mode 100644 index 00000000000..22799078eae --- /dev/null +++ b/CEP/Pipeline/test/regression_tests/jenkins_config/calibrator_regression.config.xml @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <actions/> + <description>Regression/delta test for the LOFAR calibration pipeline. +Triggers after a build on changes in the trunk at 2:00 AM</description> + <logRotator> + <daysToKeep>-1</daysToKeep> + <numToKeep>15</numToKeep> + <artifactDaysToKeep>-1</artifactDaysToKeep> + <artifactNumToKeep>-1</artifactNumToKeep> + </logRotator> + <keepDependencies>false</keepDependencies> + <properties> + <hudson.plugins.redmine.RedmineProjectProperty> + <redmineWebsite>https://support.astron.nl/lofar_issuetracker/</redmineWebsite> + <projectName>lofarsys</projectName> + <redmineVersion>true</redmineVersion> + </hudson.plugins.redmine.RedmineProjectProperty> + </properties> + <scm class="hudson.scm.SubversionSCM"> + <locations> + <hudson.scm.SubversionSCM_-ModuleLocation> + <remote>https://svn.astron.nl/LOFAR/trunk/CEP</remote> + <local>LOFAR/CEP</local> + </hudson.scm.SubversionSCM_-ModuleLocation> + <hudson.scm.SubversionSCM_-ModuleLocation> + <remote>https://svn.astron.nl/LOFAR/trunk/CMake</remote> + <local>LOFAR/CMake</local> + </hudson.scm.SubversionSCM_-ModuleLocation> + </locations> + <browser class="hudson.plugins.viewVC.ViewVCRepositoryBrowser"> + <url>https://svn.astron.nl/</url> + <location>LOFAR</location> + </browser> + <excludedRegions/> + <includedRegions/> + <excludedUsers/> + <excludedRevprop/> + <excludedCommitMessages/> + <workspaceUpdater class="hudson.scm.subversion.UpdateUpdater"/> + </scm> + <assignedNode>LCE072</assignedNode> + <canRoam>false</canRoam> + <disabled>false</disabled> + <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> + <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> + <jdk>(Default)</jdk> + <triggers class="vector"> + <hudson.triggers.SCMTrigger> + <spec>0 2 * * *</spec> + </hudson.triggers.SCMTrigger> + </triggers> + <concurrentBuild>true</concurrentBuild> + <customWorkspace>/home/lofarbuild/jenkins_builds/msss_calibrator</customWorkspace> + <builders> + <hudson.plugins.cmake.CmakeBuilder> + <sourceDir>LOFAR</sourceDir> + <buildDir>gnu_debug</buildDir> + <installDir>install</installDir> + <buildType>Debug</buildType> + <otherBuildType/> + <generator>Unix Makefiles</generator> + <makeCommand>make -j8</makeCommand> + <installCommand>make install -j8</installCommand> + <preloadScript/> + <cmakeArgs>-Wdev -DBUILD_ASKAPsoft=OFF -DUSE_OPENMP=ON -DBUILD_PACKAGES=Offline </cmakeArgs> + <projectCmakePath/> + <cleanBuild>false</cleanBuild> + <cleanInstallDir>false</cleanInstallDir> + <builderImpl/> + </hudson.plugins.cmake.CmakeBuilder> + <hudson.tasks.Shell> + <command># This command will perform the actual regression test steps + +# 1. A unit test +ctest -R pipeline + +# 2. set environment +. /opt/cep/login/bashrc +use LofIm +export PYTHONPATH=$WORKSPACE/install/lib/python2.6/dist-packages:$PYTHONPATH + +# 3. run the pipeline +#remove old state file +rm -f $WORKSPACE/install/var/run/pipeline/jobs/Observation64405/statefile + +# remove old data products +ssh lce068 "rm -rf /data/scratch/lofarbuild/Observation64405/*" +ssh lce069 "rm -rf /data/scratch/lofarbuild/Observation64405/*" + +mkdir -p $WORKSPACE/install/var/run/pipeline + +#copy the config file to a 'writable' location +cp $WORKSPACE/install/share/pipeline/pipeline.cfg $WORKSPACE/install/var/run/pipeline/pipeline_copy.cfg + +# replace clusterdesc file in the cfg file: allows running in lce072 +sed -i 's/cep2.clusterdesc/cep1_test.clusterdesc/g' $WORKSPACE/install/var/run/pipeline/pipeline_copy.cfg +cd $WORKSPACE/install/bin + +# Copy the parsetfile from a local to a global location +mkdir -p $WORKSPACE/parset_files +cp /data/lofar/testdata/CEP/Pipeline/calibrator_pipeline/Observation64405 $WORKSPACE/parset_files/Observation64405 + +# Run the calibrator with adapted cfg file +python msss_calibrator_pipeline.py $WORKSPACE/parset_files/Observation64405 -c $WORKSPACE/install/var/run/pipeline/pipeline_copy.cfg -d + +# 4. Test correct functioning +# a. copy target image data to the scratch directory +rm -rf /data/scratch/lofarbuild/pipeline_regression_test/calibrator +mkdir -p /data/scratch/lofarbuild/pipeline_regression_test/calibrator + +# copy target data +scp -r /data/lofar/testdata/CEP/Pipeline/calibrator_pipeline/datasets/*.INST /data/scratch/lofarbuild/pipeline_regression_test/calibrator + +# copy the run results +scp -r lce068:/data/scratch/lofarbuild/calibrator_test/L64405_SAP000_SB000_inst.INST /data/scratch/lofarbuild/pipeline_regression_test/calibrator/L64405_SAP000_SB000_inst.INST.result + +scp -r lce069:/data/scratch/lofarbuild/calibrator_test/L64405_SAP000_SB001_inst.INST /data/scratch/lofarbuild/pipeline_regression_test/calibrator/L64405_SAP000_SB001_inst.INST.result + +# c. Do actual comparison +#cd /data/scratch/lofarbuild/pipeline +# first sb +python $WORKSPACE/LOFAR/CEP/Pipeline/test/regression_tests/calibrator_pipeline.py /data/scratch/lofarbuild/pipeline_regression_test/calibrator/L64405_SAP000_SB000_inst.INST /data/scratch/lofarbuild/pipeline_regression_test/calibrator/L64405_SAP000_SB000_inst.INST.result 0.0001 + +#second subband +python $WORKSPACE/LOFAR/CEP/Pipeline/test/regression_tests/calibrator_pipeline.py /data/scratch/lofarbuild/pipeline_regression_test/calibrator/L64405_SAP000_SB001_inst.INST /data/scratch/lofarbuild/pipeline_regression_test/calibrator/L64405_SAP000_SB001_inst.INST.result 0.0001 + +# 5 remove the pipeline products +# On failure of the test this delete step is not performed and the data can be inspected +# ***************** DANGER: HERE BE DRAGONS!!************* +#ssh lce069 "rm -rf /data/scratch/lofarbuild/out/*" +#rm /home/lofarbuild/jenkins_builds/install/var/run/pipeline/jobs/out/statefile +# ***************** DANGER: HERE BE DRAGONS!!************* +</command> + </hudson.tasks.Shell> + </builders> + <publishers> + <hudson.plugins.warnings.WarningsPublisher> + <healthy/> + <unHealthy/> + <thresholdLimit>low</thresholdLimit> + <pluginName>[WARNINGS] </pluginName> + <defaultEncoding/> + <canRunOnFailed>true</canRunOnFailed> + <useDeltaValues>false</useDeltaValues> + <thresholds> + <unstableTotalAll/> + <unstableTotalHigh/> + <unstableTotalNormal/> + <unstableTotalLow/> + <unstableNewAll/> + <unstableNewHigh/> + <unstableNewNormal/> + <unstableNewLow/> + <failedTotalAll/> + <failedTotalHigh/> + <failedTotalNormal/> + <failedTotalLow/> + <failedNewAll/> + <failedNewHigh/> + <failedNewNormal/> + <failedNewLow/> + </thresholds> + <shouldDetectModules>false</shouldDetectModules> + <dontComputeNew>false</dontComputeNew> + <parserConfigurations/> + <consoleLogParsers> + <string>GNU compiler 4 (ld)</string> + <string>GNU compiler 4 (gcc)</string> + </consoleLogParsers> + </hudson.plugins.warnings.WarningsPublisher> + </publishers> + <buildWrappers> + <hudson.plugins.timestamper.TimestamperBuildWrapper/> + </buildWrappers> +</project> \ No newline at end of file diff --git a/CEP/Pipeline/test/regression_tests/jenkins_config/imaging_regression.config.xml b/CEP/Pipeline/test/regression_tests/jenkins_config/imaging_regression.config.xml new file mode 100644 index 00000000000..15d4c1c3da3 --- /dev/null +++ b/CEP/Pipeline/test/regression_tests/jenkins_config/imaging_regression.config.xml @@ -0,0 +1,162 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <actions/> + <description>Regression/delta test for the LOFAR imaging pipeline. +Triggers a build and test at midnight on changes in the trunk.</description> + <logRotator> + <daysToKeep>-1</daysToKeep> + <numToKeep>15</numToKeep> + <artifactDaysToKeep>-1</artifactDaysToKeep> + <artifactNumToKeep>-1</artifactNumToKeep> + </logRotator> + <keepDependencies>false</keepDependencies> + <properties> + <hudson.plugins.redmine.RedmineProjectProperty> + <redmineWebsite>https://support.astron.nl/lofar_issuetracker/</redmineWebsite> + <projectName>lofarsys</projectName> + <redmineVersion>true</redmineVersion> + </hudson.plugins.redmine.RedmineProjectProperty> + </properties> + <scm class="hudson.scm.SubversionSCM"> + <locations> + <hudson.scm.SubversionSCM_-ModuleLocation> + <remote>https://svn.astron.nl/LOFAR/trunk/CEP</remote> + <local>LOFAR/CEP</local> + </hudson.scm.SubversionSCM_-ModuleLocation> + <hudson.scm.SubversionSCM_-ModuleLocation> + <remote>https://svn.astron.nl/LOFAR/trunk/CMake</remote> + <local>LOFAR/CMake</local> + </hudson.scm.SubversionSCM_-ModuleLocation> + </locations> + <browser class="hudson.plugins.viewVC.ViewVCRepositoryBrowser"> + <url>https://svn.astron.nl/</url> + <location>LOFAR</location> + </browser> + <excludedRegions/> + <includedRegions/> + <excludedUsers/> + <excludedRevprop/> + <excludedCommitMessages/> + <workspaceUpdater class="hudson.scm.subversion.UpdateUpdater"/> + </scm> + <assignedNode>LCE072</assignedNode> + <canRoam>false</canRoam> + <disabled>false</disabled> + <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> + <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> + <jdk>(Default)</jdk> + <triggers class="vector"> + <hudson.triggers.SCMTrigger> + <spec>0 5 * * *</spec> + </hudson.triggers.SCMTrigger> + </triggers> + <concurrentBuild>true</concurrentBuild> + <customWorkspace>/home/lofarbuild/jenkins_builds</customWorkspace> + <builders> + <hudson.tasks.Shell> + <command># Perform svn steps needed before building +if [ -f $WORKSPACE/LOFAR/CMakeLists.txt ] + then echo "Found a previous checkout: updating"; svn up --depth files LOFAR + else echo "not found a previous checkout: checkingout"; svn checkout --depth files https://svn.astron.nl/LOFAR/trunk LOFAR +fi</command> + </hudson.tasks.Shell> + <hudson.plugins.cmake.CmakeBuilder> + <sourceDir>LOFAR</sourceDir> + <buildDir>gnu_debug</buildDir> + <installDir>install</installDir> + <buildType>Debug</buildType> + <otherBuildType/> + <generator>Unix Makefiles</generator> + <makeCommand>make -j8</makeCommand> + <installCommand>make install</installCommand> + <preloadScript/> + <cmakeArgs>-Wdev -DBUILD_ASKAPsoft=OFF -DUSE_OPENMP=ON -DBUILD_PACKAGES=Offline </cmakeArgs> + <projectCmakePath/> + <cleanBuild>false</cleanBuild> + <cleanInstallDir>false</cleanInstallDir> + <builderImpl/> + </hudson.plugins.cmake.CmakeBuilder> + <hudson.tasks.Shell> + <command># This command will perform the actual regression test steps + +# 1. A unit test +ctest -R pipeline + +# 2. set environment +. /opt/cep/login/bashrc +use LofIm +use Pythonlibs +export PYTHONPATH=$WORKSPACE/install/lib/python2.6/dist-packages:$PYTHONPATH + +# 3. run the pipeline +#remove old state file +rm -f $WORKSPACE/install/var/run/pipeline/jobs/Observation64405/statefile +ssh lce069 "rm -rf /data/scratch/lofarbuild/out/*" + +mkdir -p $WORKSPACE/install/var/run/pipeline +cd $WORKSPACE/install/bin + +python msss_imager_pipeline.py /data/lofar/testdata/CEP/Pipeline/imager_pipeline/basic_test/out.parset -c $WORKSPACE/install/share/pipeline/pipeline.cfg -d +# 4. Test correct functioning +# a. copy target image data to the scratch directory +scp -r /data/lofar/testdata/CEP/Pipeline/imager_pipeline/basic_test/image.restored /data/scratch/lofarbuild/pipeline/image.restored.target +scp -r lce069:/data/scratch/lofarbuild/out/awimage_cycle_0/image.restored /data/scratch/lofarbuild/pipeline/image.restored + +# b. copy target sourcelist to the scratch directory +scp -r /data/lofar/testdata/CEP/Pipeline/imager_pipeline/basic_test/bdsm_catalog /data/scratch/lofarbuild/pipeline/bdsm_catalog.target +scp -r lce069:/data/scratch/lofarbuild/out/awimage_cycle_0/bdsm_catalog /data/scratch/lofarbuild/pipeline/bdsm_catalog + +# c. Do actual comparison +cd /data/scratch/lofarbuild/pipeline + +python $WORKSPACE/LOFAR/CEP/Pipeline/test/regression_tests/imaging_pipeline.py bdsm_catalog bdsm_catalog.target image.restored image.restored.target 0.0002 + +# 5 remove the pipeline products +# On failure of the test this delete step is not performed and the data can be inspected +# ***************** DANGER: HERE BE DRAGONS!!************* +ssh lce069 "rm -rf /data/scratch/lofarbuild/out/*" +rm /home/lofarbuild/jenkins_builds/install/var/run/pipeline/jobs/out/statefile +# ***************** DANGER: HERE BE DRAGONS!!************* +</command> + </hudson.tasks.Shell> + </builders> + <publishers> + <hudson.plugins.warnings.WarningsPublisher> + <healthy/> + <unHealthy/> + <thresholdLimit>low</thresholdLimit> + <pluginName>[WARNINGS] </pluginName> + <defaultEncoding/> + <canRunOnFailed>true</canRunOnFailed> + <useDeltaValues>false</useDeltaValues> + <thresholds> + <unstableTotalAll/> + <unstableTotalHigh/> + <unstableTotalNormal/> + <unstableTotalLow/> + <unstableNewAll/> + <unstableNewHigh/> + <unstableNewNormal/> + <unstableNewLow/> + <failedTotalAll/> + <failedTotalHigh/> + <failedTotalNormal/> + <failedTotalLow/> + <failedNewAll/> + <failedNewHigh/> + <failedNewNormal/> + <failedNewLow/> + </thresholds> + <shouldDetectModules>false</shouldDetectModules> + <dontComputeNew>false</dontComputeNew> + <parserConfigurations/> + <consoleLogParsers> + <string>GNU compiler 4 (ld)</string> + <string>GNU compiler 4 (gcc)</string> + </consoleLogParsers> + </hudson.plugins.warnings.WarningsPublisher> + </publishers> + <buildWrappers> + <hudson.plugins.timestamper.TimestamperBuildWrapper/> + </buildWrappers> +</project> \ No newline at end of file diff --git a/CEP/Pipeline/test/regression_tests/jenkins_config/pipeline_task_regression.config.xml b/CEP/Pipeline/test/regression_tests/jenkins_config/pipeline_task_regression.config.xml new file mode 100644 index 00000000000..f2d69e1536d --- /dev/null +++ b/CEP/Pipeline/test/regression_tests/jenkins_config/pipeline_task_regression.config.xml @@ -0,0 +1,179 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <actions/> + <description>This is a jenkins build to test the imaging pipeline regressions test on task branches. +It performs a complete build from scratch. Builds the task branche and performs a simple imaging pipeline. +Produced data products are compared default data. +This build will fail if the branche produces output different to the baseline. +</description> + <logRotator> + <daysToKeep>-1</daysToKeep> + <numToKeep>15</numToKeep> + <artifactDaysToKeep>-1</artifactDaysToKeep> + <artifactNumToKeep>-1</artifactNumToKeep> + </logRotator> + <keepDependencies>false</keepDependencies> + <properties> + <hudson.plugins.redmine.RedmineProjectProperty> + <redmineWebsite>https://support.astron.nl/lofar_issuetracker/</redmineWebsite> + <projectName>lofarsys</projectName> + <redmineVersion>true</redmineVersion> + </hudson.plugins.redmine.RedmineProjectProperty> + <hudson.model.ParametersDefinitionProperty> + <parameterDefinitions> + <hudson.scm.listtagsparameter.ListSubversionTagsParameterDefinition> + <name>BRANCHE</name> + <description>Select a Subversion entry</description> + <tagsDir>https://svn.astron.nl/LOFAR/branches</tagsDir> + <tagsFilter/> + <reverseByDate>true</reverseByDate> + <reverseByName>false</reverseByName> + <defaultValue/> + <maxTags/> + <uuid>41b88e15-dbbe-4a3b-96b0-4a4b9949e906</uuid> + </hudson.scm.listtagsparameter.ListSubversionTagsParameterDefinition> + </parameterDefinitions> + </hudson.model.ParametersDefinitionProperty> + </properties> + <scm class="hudson.scm.SubversionSCM"> + <locations> + <hudson.scm.SubversionSCM_-ModuleLocation> + <remote>https://svn.astron.nl/LOFAR/branches/$BRANCHE/CEP</remote> + <local>LOFAR/CEP</local> + </hudson.scm.SubversionSCM_-ModuleLocation> + <hudson.scm.SubversionSCM_-ModuleLocation> + <remote>https://svn.astron.nl/LOFAR/branches/$BRANCHE/CMake</remote> + <local>LOFAR/CMake</local> + </hudson.scm.SubversionSCM_-ModuleLocation> + </locations> + <browser class="hudson.plugins.viewVC.ViewVCRepositoryBrowser"> + <url>https://svn.astron.nl/</url> + <location>LOFAR</location> + </browser> + <excludedRegions/> + <includedRegions/> + <excludedUsers/> + <excludedRevprop/> + <excludedCommitMessages/> + <workspaceUpdater class="hudson.scm.subversion.UpdateUpdater"/> + </scm> + <assignedNode>LCE072</assignedNode> + <canRoam>false</canRoam> + <disabled>false</disabled> + <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> + <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> + <jdk>(Default)</jdk> + <triggers class="vector"/> + <concurrentBuild>true</concurrentBuild> + <customWorkspace>/home/lofarbuild/jenkins_builds/imager_branche_test</customWorkspace> + <builders> + <hudson.tasks.Shell> + <command># Perform svn steps needed before building +echo "This is a test" +if [ -f $WORKSPACE/LOFAR/CMakeLists.txt ] + then echo "Found a previous checkout: updating"; svn up --depth files LOFAR + else echo "not found a previous checkout: checkingout"; svn checkout --depth files https://svn.astron.nl/LOFAR/branches/$BRANCHE LOFAR +fi +#svn checkout --depth files https://svn.astron.nl/LOFAR/branches/$BRANCHE LOFAR +</command> + </hudson.tasks.Shell> + <hudson.plugins.cmake.CmakeBuilder> + <sourceDir>LOFAR</sourceDir> + <buildDir>gnu_debug</buildDir> + <installDir>install</installDir> + <buildType>Debug</buildType> + <otherBuildType/> + <generator>Unix Makefiles</generator> + <makeCommand>make -j8</makeCommand> + <installCommand>make install</installCommand> + <preloadScript/> + <cmakeArgs>-Wdev -DBUILD_ASKAPsoft=OFF -DUSE_OPENMP=ON -DBUILD_PACKAGES=Offline </cmakeArgs> + <projectCmakePath/> + <cleanBuild>false</cleanBuild> + <cleanInstallDir>false</cleanInstallDir> + <builderImpl/> + </hudson.plugins.cmake.CmakeBuilder> + <hudson.tasks.Shell> + <command># This command will perform the actual regression test steps + +# 1. A unit test +ctest -R pipeline + +# ***************** DANGER: HERE BE DRAGONS!!************* +# assure existance of a single file in dir +ssh lce069 "touch /data/scratch/lofarbuild/$BRANCHE/file.txt" +ssh lce069 "rm -rf /data/scratch/lofarbuild/$BRANCHE/*" +rm -f $WORKSPACE/install/var/run/pipeline/jobs/$BRANCHE/statefile +# ***************** DANGER: HERE BE DRAGONS!!************* + +# 2. set environment +. /opt/cep/login/bashrc +use LofIm +use Pythonlibs +export PYTHONPATH=$WORKSPACE/install/lib/python2.6/dist-packages:$PYTHONPATH + +# 3. run the pipeline +mkdir -p $WORKSPACE/install/var/run/pipeline +cd $WORKSPACE/install/bin + +python msss_imager_pipeline.py /data/lofar/testdata/CEP/Pipeline/imager_pipeline/basic_test/out.parset -c $WORKSPACE/install/share/pipeline/pipeline.cfg --job $BRANCHE -d + +# 4. Test correct functioning +# a. copy target image data to the scratch directory +scp -r /data/lofar/testdata/CEP/Pipeline/imager_pipeline/basic_test/image.restored /data/scratch/lofarbuild/pipeline/image.restored.target +scp -r lce069:/data/scratch/lofarbuild/out/awimage_cycle_0/image.restored /data/scratch/lofarbuild/pipeline/image.restored + +# b. copy target sourcelist to the scratch directory +scp -r /data/lofar/testdata/CEP/Pipeline/imager_pipeline/basic_test/bdsm_catalog /data/scratch/lofarbuild/pipeline/bdsm_catalog.target +scp -r lce069:/data/scratch/lofarbuild/$BRANCHE/awimage_cycle_0/bdsm_catalog /data/scratch/lofarbuild/pipeline/bdsm_catalog + +# c. Do actual comparison +cd /data/scratch/lofarbuild/pipeline + +python $WORKSPACE/LOFAR/CEP/Pipeline/test/regression_tests/imaging_pipeline.py bdsm_catalog bdsm_catalog.target image.restored image.restored.target 0.0002 + + + +</command> + </hudson.tasks.Shell> + </builders> + <publishers> + <hudson.plugins.warnings.WarningsPublisher> + <healthy/> + <unHealthy/> + <thresholdLimit>low</thresholdLimit> + <pluginName>[WARNINGS] </pluginName> + <defaultEncoding/> + <canRunOnFailed>true</canRunOnFailed> + <useDeltaValues>false</useDeltaValues> + <thresholds> + <unstableTotalAll/> + <unstableTotalHigh/> + <unstableTotalNormal/> + <unstableTotalLow/> + <unstableNewAll/> + <unstableNewHigh/> + <unstableNewNormal/> + <unstableNewLow/> + <failedTotalAll/> + <failedTotalHigh/> + <failedTotalNormal/> + <failedTotalLow/> + <failedNewAll/> + <failedNewHigh/> + <failedNewNormal/> + <failedNewLow/> + </thresholds> + <shouldDetectModules>false</shouldDetectModules> + <dontComputeNew>false</dontComputeNew> + <parserConfigurations/> + <consoleLogParsers> + <string>GNU compiler 4 (ld)</string> + <string>GNU compiler 4 (gcc)</string> + </consoleLogParsers> + </hudson.plugins.warnings.WarningsPublisher> + </publishers> + <buildWrappers> + <hudson.plugins.timestamper.TimestamperBuildWrapper/> + </buildWrappers> +</project> \ No newline at end of file diff --git a/CEP/Pipeline/test/regression_tests/jenkins_config/target_regression.config.xml b/CEP/Pipeline/test/regression_tests/jenkins_config/target_regression.config.xml new file mode 100644 index 00000000000..fe5cbfb5216 --- /dev/null +++ b/CEP/Pipeline/test/regression_tests/jenkins_config/target_regression.config.xml @@ -0,0 +1,176 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project> + <actions/> + <description>Regression/delta test for the LOFAR target pipeline. +Triggers a build and test after midnight on changes in the trunk.</description> + <logRotator> + <daysToKeep>-1</daysToKeep> + <numToKeep>15</numToKeep> + <artifactDaysToKeep>-1</artifactDaysToKeep> + <artifactNumToKeep>-1</artifactNumToKeep> + </logRotator> + <keepDependencies>false</keepDependencies> + <properties> + <hudson.plugins.redmine.RedmineProjectProperty> + <redmineWebsite>https://support.astron.nl/lofar_issuetracker/</redmineWebsite> + <projectName>lofarsys</projectName> + <redmineVersion>true</redmineVersion> + </hudson.plugins.redmine.RedmineProjectProperty> + </properties> + <scm class="hudson.scm.SubversionSCM"> + <locations> + <hudson.scm.SubversionSCM_-ModuleLocation> + <remote>https://svn.astron.nl/LOFAR/trunk/CEP</remote> + <local>LOFAR/CEP</local> + </hudson.scm.SubversionSCM_-ModuleLocation> + <hudson.scm.SubversionSCM_-ModuleLocation> + <remote>https://svn.astron.nl/LOFAR/trunk/CMake</remote> + <local>LOFAR/CMake</local> + </hudson.scm.SubversionSCM_-ModuleLocation> + </locations> + <browser class="hudson.plugins.viewVC.ViewVCRepositoryBrowser"> + <url>https://svn.astron.nl/</url> + <location>LOFAR</location> + </browser> + <excludedRegions/> + <includedRegions/> + <excludedUsers/> + <excludedRevprop/> + <excludedCommitMessages/> + <workspaceUpdater class="hudson.scm.subversion.UpdateUpdater"/> + </scm> + <assignedNode>LCE072</assignedNode> + <canRoam>false</canRoam> + <disabled>false</disabled> + <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> + <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> + <jdk>(Default)</jdk> + <triggers class="vector"> + <hudson.triggers.SCMTrigger> + <spec>0 4 * * *</spec> + </hudson.triggers.SCMTrigger> + </triggers> + <concurrentBuild>true</concurrentBuild> + <customWorkspace>/home/lofarbuild/jenkins_builds/target_regression</customWorkspace> + <builders> + <hudson.plugins.cmake.CmakeBuilder> + <sourceDir>LOFAR</sourceDir> + <buildDir>gnu_debug</buildDir> + <installDir>install</installDir> + <buildType>Debug</buildType> + <otherBuildType/> + <generator>Unix Makefiles</generator> + <makeCommand>make -j4</makeCommand> + <installCommand>make install</installCommand> + <preloadScript/> + <cmakeArgs>-Wdev -DBUILD_ASKAPsoft=OFF -DUSE_OPENMP=ON -DBUILD_PACKAGES=Offline </cmakeArgs> + <projectCmakePath/> + <cleanBuild>false</cleanBuild> + <cleanInstallDir>false</cleanInstallDir> + <builderImpl/> + </hudson.plugins.cmake.CmakeBuilder> + <hudson.tasks.Shell> + <command># This command will perform the actual regression test steps + +# 1. A unit test +ctest -R pipeline + +# 2. set environment +. /opt/cep/login/bashrc +use LofIm +export PYTHONPATH=$WORKSPACE/install/lib/python2.6/dist-packages:$PYTHONPATH + +ssh lce068 "rm -rf /data/scratch/lofarbuild/Observation64406/*" +ssh lce069 "rm -rf /data/scratch/lofarbuild/Observation64406/*" +ssh lce068 "rm -rf /data/scratch/lofarbuild/target_integration/*" +ssh lce069 "rm -rf /data/scratch/lofarbuild/target_integration/*" + +# copy the test data to the correct place on the node +ssh lce068 "mkdir -p /data/scratch/lofarbuild/target_integration" +scp -rp /data/lofar/testdata/CEP/Pipeline/target_pipeline/datasets/L64372_SAP000_SB000_uv.MS lce068:/data/scratch/lofarbuild/target_integration + +scp -rp /data/lofar/testdata/CEP/Pipeline/target_pipeline/datasets/L64405_SAP000_SB000_inst.INST lce068:/data/scratch/lofarbuild/target_integration + +ssh lce069 "mkdir -p /data/scratch/lofarbuild/target_integration" +scp -rp /data/lofar/testdata/CEP/Pipeline/target_pipeline/datasets/L64372_SAP000_SB001_uv.MS lce069:/data/scratch/lofarbuild/target_integration + +scp -rp /data/lofar/testdata/CEP/Pipeline/target_pipeline/datasets/L64405_SAP000_SB001_inst.INST lce069:/data/scratch/lofarbuild/target_integration + +# 3. run the pipeline +#remove old state file +rm -f $WORKSPACE/install/var/run/pipeline/jobs/Observation64406/statefile + +mkdir -p $WORKSPACE/install/var/run/pipeline + +#copy the config file to a 'writable' location +cp $WORKSPACE/install/share/pipeline/pipeline.cfg $WORKSPACE/install/var/run/pipeline/pipeline_copy.cfg + +#copy the parset to a writable location +cp /data/lofar/testdata/CEP/Pipeline/target_pipeline/Observation64406 $WORKSPACE/install/var/run/pipeline/Observation64406 + +# replace clusterdesc file in the cfg file: allows running in lce072 +sed -i 's/cep2.clusterdesc/cep1_test.clusterdesc/g' $WORKSPACE/install/var/run/pipeline/pipeline_copy.cfg + +cd $WORKSPACE/install/bin + +python msss_target_pipeline.py $WORKSPACE/install/var/run/pipeline/Observation64406 -c $WORKSPACE/install/var/run/pipeline/pipeline_copy.cfg -d + +## 4. Test correct functioning +# a. copy target calibrated data to the scratch directory +mkdir -p /data/scratch/lofarbuild/target_regression_test +scp -r /data/lofar/testdata/CEP/Pipeline/target_pipeline/datasets/L64406_SB000_uv.dppp.MS_target /data/scratch/lofarbuild/target_regression_test/L64406_SB000_uv.dppp.MS_target +scp -r /data/lofar/testdata/CEP/Pipeline/target_pipeline/datasets/L64406_SB001_uv.dppp.MS_target /data/scratch/lofarbuild/target_regression_test/L64406_SB001_uv.dppp.MS_target + +# b. copy target sourcelist to the scratch directory +scp -r lce068:/data/scratch/lofarbuild/target_integration/L64406_SB000_uv.dppp.MS /data/scratch/lofarbuild/target_regression_test/L64406_SB000_uv.dppp.MS +scp -r lce069:/data/scratch/lofarbuild/target_integration/L64406_SB001_uv.dppp.MS /data/scratch/lofarbuild/target_regression_test/L64406_SB001_uv.dppp.MS + + +# c. Do actual comparison +python $WORKSPACE/LOFAR/CEP/Pipeline/test/regression_tests/target_pipeline.py /data/scratch/lofarbuild/target_regression_test/L64406_SB000_uv.dppp.MS_target /data/scratch/lofarbuild/target_regression_test/L64406_SB000_uv.dppp.MS + +python $WORKSPACE/LOFAR/CEP/Pipeline/test/regression_tests/target_pipeline.py /data/scratch/lofarbuild/target_regression_test/L64406_SB001_uv.dppp.MS_target /data/scratch/lofarbuild/target_regression_test/L64406_SB001_uv.dppp.MS + +</command> + </hudson.tasks.Shell> + </builders> + <publishers> + <hudson.plugins.warnings.WarningsPublisher> + <healthy/> + <unHealthy/> + <thresholdLimit>low</thresholdLimit> + <pluginName>[WARNINGS] </pluginName> + <defaultEncoding/> + <canRunOnFailed>true</canRunOnFailed> + <useDeltaValues>false</useDeltaValues> + <thresholds> + <unstableTotalAll/> + <unstableTotalHigh/> + <unstableTotalNormal/> + <unstableTotalLow/> + <unstableNewAll/> + <unstableNewHigh/> + <unstableNewNormal/> + <unstableNewLow/> + <failedTotalAll/> + <failedTotalHigh/> + <failedTotalNormal/> + <failedTotalLow/> + <failedNewAll/> + <failedNewHigh/> + <failedNewNormal/> + <failedNewLow/> + </thresholds> + <shouldDetectModules>false</shouldDetectModules> + <dontComputeNew>false</dontComputeNew> + <parserConfigurations/> + <consoleLogParsers> + <string>GNU compiler 4 (ld)</string> + <string>GNU compiler 4 (gcc)</string> + </consoleLogParsers> + </hudson.plugins.warnings.WarningsPublisher> + </publishers> + <buildWrappers> + <hudson.plugins.timestamper.TimestamperBuildWrapper/> + </buildWrappers> +</project> \ No newline at end of file diff --git a/CEP/Pipeline/test/regression_tests/target_pipeline.py b/CEP/Pipeline/test/regression_tests/target_pipeline.py new file mode 100644 index 00000000000..fff69f7a4cc --- /dev/null +++ b/CEP/Pipeline/test/regression_tests/target_pipeline.py @@ -0,0 +1,64 @@ +import pyrap.tables as pt +import numpy +import sys + +def load_and_compare_data_sets(ms1, ms2): + # open the two datasets + ms1 = pt.table(ms1) + ms2 = pt.table(ms2) + + #get the amount of rows in the dataset + n_row = len(ms1.getcol('DATA')) + n_complex_vis = 4 + + # create a target array with the same length as the datacolumn + div_array = numpy.zeros((n_row, 1, n_complex_vis), dtype=numpy.complex64) + ms1_array = ms1.getcol('DATA') + ms2_array = ms2.getcol('DATA') + + div_max = 0 + for idx in xrange(n_row): + for idy in xrange(n_complex_vis): + + div_value = ms1_array[idx][0][idy] - ms2_array[idx][0][idy] + if numpy.abs(div_value) > numpy.abs(div_max): + div_max = div_value + + div_array[idx][0][idy] = div_value + print "maximum different value between measurement sets: {0}".format(div_max) + + if div_max != 0: + print "The measurement sets are contained a different value" + print "failed delta test!" + return False + + return True + + + + + +if __name__ == "__main__": + ms_1, mw_2 = None, None + # Parse parameters from command line + error = False + print sys.argv + try: + ms_1, mw_2 = sys.argv[1:3] + except Exception, e: + print e + print "usage: python {0} ms1 "\ + " ms2 ".format(sys.argv[0]) + print "target calibration is deterministic and should result in the same ms" + sys.exit(1) + + if not error: + print "regression test:" + data_equality = load_and_compare_data_sets(ms_1, mw_2) + + if not data_equality: + print "Regression test failed: exiting with exitstatus 1" + sys.exit(1) + + print "Regression test Succeed!!" + sys.exit(0) diff --git a/CEP/PyBDSM/doc/source/_templates/searchbox.html b/CEP/PyBDSM/doc/source/_templates/searchbox.html new file mode 100644 index 00000000000..5899a99386a --- /dev/null +++ b/CEP/PyBDSM/doc/source/_templates/searchbox.html @@ -0,0 +1,24 @@ +{# + basic/searchbox.html + ~~~~~~~~~~~~~~~~~~~~ + + Sphinx sidebar template: quick search box. + + :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. + :license: BSD, see LICENSE for details. +#} +{%- if pagename != "search" %} +<div id="searchbox" style="display: none"> + <h3>{{ _('Quick search') }}</h3> + <form class="search" action="{{ pathto('search') }}" method="get"> + <input type="text" name="q" /> + <input type="submit" value="{{ _('Go') }}" /> + <input type="hidden" name="check_keywords" value="yes" /> + <input type="hidden" name="area" value="default" /> + </form> + <p class="searchtip" style="font-size: 90%"> + {{ _('Enter search terms or a command, task, or parameter name.') }} + </p> +</div> +<script type="text/javascript">$('#searchbox').show(0);</script> +{%- endif %} diff --git a/CEP/PyBDSM/doc/source/conf.py b/CEP/PyBDSM/doc/source/conf.py index 2c1e500dc6e..457c7341fe3 100644 --- a/CEP/PyBDSM/doc/source/conf.py +++ b/CEP/PyBDSM/doc/source/conf.py @@ -34,7 +34,7 @@ templates_path = ['_templates'] source_suffix = '.rst' # The encoding of source files. -#source_encoding = 'utf-8-sig' +source_encoding = 'utf-8-sig' # The master toctree document. master_doc = 'index' @@ -50,7 +50,7 @@ copyright = u'2012, David Rafferty and Niruj Mohan' # The short X.Y version. version = '1.4' # The full version, including alpha/beta/rc tags. -release = '1.4.0' +release = '1.4.5' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/CEP/PyBDSM/doc/source/examples.rst b/CEP/PyBDSM/doc/source/examples.rst index b435a3ad5d1..09fe759e3b8 100644 --- a/CEP/PyBDSM/doc/source/examples.rst +++ b/CEP/PyBDSM/doc/source/examples.rst @@ -7,7 +7,7 @@ Below is an example of running PyBDSM on an image composed primarily of point so :: $ pybdsm - + PyBDSM version 1.1 (LOFAR revision 20883) ======================================================================== PyBDSM commands @@ -29,30 +29,30 @@ Below is an example of running PyBDSM on an image composed primarily of point so help 'par' .......... : Get help on a parameter (e.g., help 'rms_box') help changelog ...... : See list of recent changes ________________________________________________________________________ - + BDSM [1]: filename='VLSS.fits' - + .. note:: When PyBDSM starts up, the ``process_image`` task is automatically set to be the current task, so one does not need to set it with ``inp process_image``. - + :: BDSM [2]: frequency=74e6 - + .. note:: For this image, no frequency information was present in the image header, so the frequency must be specified manually. - + :: BDSM [3]: interactive=T - + .. note:: It is often advisable to use the interactive mode when processing an image for the first time. This mode will display the islands that PyBDSM has found before proceeding to fitting, allowing the user to check that they are reasonable. - + :: BDSM [4]: go @@ -84,23 +84,23 @@ Below is an example of running PyBDSM on an image composed primarily of point so Press "m" ........ : Change min and max scaling values Press "n" ........ : Show / hide island IDs Press "0" ........ : Reset scaling to default - Click Gaussian ... : Print Gaussian and source IDs (zoom_rect mode, - toggled with the "zoom" button and indicated in + Click Gaussian ... : Print Gaussian and source IDs (zoom_rect mode, + toggled with the "zoom" button and indicated in the lower right corner, must be off) ________________________________________________________________________ - + .. note:: At this point, because ``interactive=True``, PyBDSM plots the islands. Once the plot window is closed, PyBDSM prompts the user to continue or to quit fitting: :: - Press enter to continue or 'q' to quit .. : + Press enter to continue or 'q' to quit .. : Fitting islands with Gaussians .......... : [==========================================] 115/115 Total number of Gaussians fit to image .. : 147 Total flux in model ..................... : 211.800 Jy Number of sources formed from Gaussians : 117 - + The ``process_image`` task has now finished. PyBDSM estimated a reasonable value for the ``rms_box`` parameter and determined that 2-D rms and mean maps were required to model the background of the image. Straightforward island thresholding at the 5-sigma level was used, and the minimum island size was set at 5 pixels. In total 115 islands were found, and 147 Gaussians were fit to these islands. These 147 Gaussians were then grouped into 117 sources. To check the fit, call the ``show_fit`` task: @@ -115,8 +115,8 @@ The ``process_image`` task has now finished. PyBDSM estimated a reasonable value Press "m" ........ : Change min and max scaling values Press "n" ........ : Show / hide island IDs Press "0" ........ : Reset scaling to default - Click Gaussian ... : Print Gaussian and source IDs (zoom_rect mode, - toggled with the "zoom" button and indicated in + Click Gaussian ... : Print Gaussian and source IDs (zoom_rect mode, + toggled with the "zoom" button and indicated in the lower right corner, must be off) ________________________________________________________________________ @@ -138,26 +138,26 @@ Lastly, the plot window is closed, and the source catalog is written out to an A --------> inp(write_catalog) WRITE_CATALOG: Write the Gaussian, source, or shapelet list to a file. ================================================================================ - outfile ............... None : Output file name. None => file is named - automatically + outfile ............... None : Output file name. None => file is named + automatically bbs_patches ........... None : For BBS format, type of patch to use: None => no patches. 'single' => all Gaussians in one patch. 'gaussian' => each Gaussian gets its own patch. 'source' => all Gaussians belonging to a single - source are grouped into one patch + source are grouped into one patch catalog_type ......... 'gaul': Type of catalog to write: 'gaul' - Gaussian list, 'srl' - source list (formed by grouping - Gaussians), 'shap' - shapelet list - clobber .............. False : Overwrite existing file? + Gaussians), 'shap' - shapelet list + clobber .............. False : Overwrite existing file? format ................ 'bbs': Format of output catalog: 'bbs', 'ds9', 'fits', - 'star', 'kvis', or 'ascii' + 'star', 'kvis', or 'ascii' srcroot ............... None : Root name for entries in the output catalog. None - => use image file name - + => use image file name + BDSM [7]: catalog_type='srl' - + BDSM [8]: format='ascii' - + BDSM [9]: go ---------> go() --> Wrote ASCII file 'VLSS.fits.pybdsm.srl' @@ -166,7 +166,7 @@ Lastly, the plot window is closed, and the source catalog is written out to an A Image with artifacts -------------------- -Occasionally, an analysis run with the default parameters does not produce good results. For example, if there are significant deconvolution artifacts in the image, the ``thresh_isl``, ``thresh_pix``, or ``rms_box`` parameters might need to be changed to prevent PyBDSM from fitting Gaussians to such artifacts. An example of running PyBDSM with the default parameters on such an image is shown in the figures below. +Occasionally, an analysis run with the default parameters does not produce good results. For example, if there are significant deconvolution artifacts in the image, the ``thresh_isl``, ``thresh_pix``, or ``rms_box`` parameters might need to be changed to prevent PyBDSM from fitting Gaussians to such artifacts. An example of running PyBDSM with the default parameters on such an image is shown in the figures below. .. figure:: art_fit_def.png :scale: 50 % @@ -225,48 +225,119 @@ You can use the complete functionality of PyBDSM within Python scripts (see :ref .. note:: If you are working on the LOFAR CEP I/II clusters, then at some point before running the script, you will need to do:: - + $ use LofIm $ use Pythonlibs :: - + # pybdsm_example.py # - # This script fits a number of images automatically, writing out source + # This script fits a number of images automatically, writing out source # catalogs and residual and model images for each input image. Call it # with "python pybdsm_example.py" - + import lofar.bdsm as bdsm - + # Define the list of images to process and the parameter save file input_images = ['a2597.fits', 'a2256_1.fits', 'a2256_2.fits', 'a2256_3.fits', 'a2256_4.fits', 'a2256_5.fits'] save_file = 'a2256.sav' - + # Now loop over the input images and process them for input_image in input_images: - + if input_image == 'a2597.fits': # For this one image, run with different parameters. - # Note that the image name is the first argument to + # Note that the image name is the first argument to # process_image: img = bdsm.process_image(input_image, rms_box=(100,20)) - + else: # For the other images, use the 'a2256.sav` parameter save file. # The quiet argument is used to supress output to the terminal # (it still goes to the log file). - # Note: when a save file is used, it must be given first in the + # Note: when a save file is used, it must be given first in the # call to process_image: - img = bdsm.process_image(save_file, filename=input_image, quiet=True) + img = bdsm.process_image(save_file, filename=input_image, quiet=True) # Write the source list catalog. File is named automatically. - img.write_catalog(format='fits', catalog_type='srl') + img.write_catalog(format='fits', catalog_type='srl') # Write the residual image. File is name automatically. - img.export_image(img_type='gaus_resid') - + img.export_image(img_type='gaus_resid') + # Write the model image. File name is specified. - img.export_image(img_type='gaus_model', outfile=input_image+'.model') - + img.export_image(img_type='gaus_model', outfile=input_image+'.model') + + +.. _samp_example: + +Using SAMP interoperability +--------------------------- +PyBDSM supports SAMP (Simple Application Messaging Protocol) to provide interoperability to other applications, such as TOPCAT [#f1]_, ds9 [#f2]_, and Aladin [#f3]_. To use this functionality, a SAMP hub must be running (both TOPCAT and Aladin come with SAMP hubs). Below is an example of using PyBDSM with TOPCAT. In this example, it is assumed that an image has already been processed with ``process_image``. + +:: + + BDSM [1]: process_image('VLSS.fits') + ... + +At this point, make sure that TOPCAT is started and its SAMP hub is running (activated by clicking the "Attempt to connect to SAMP hub" icon in the lower right-hand corner and selecting "Start internal hub"). Next, we send the PyBDSM source list to TOPCAT with ``write_catalog``: + +:: + + BSDM [2]: inp write_catalog + --------> inp(write_catalog) + WRITE_CATALOG: Write the Gaussian, source, or shapelet list to a file. + ================================================================================ + outfile ............... None : Output file name. None => file is named + automatically; 'SAMP' => send to SAMP hub (e.g., + to TOPCAT, ds9, or Aladin) + bbs_patches ........... None : For BBS format, type of patch to use: None => no + patches. 'single' => all Gaussians in one patch. + 'gaussian' => each Gaussian gets its own patch. + 'source' => all Gaussians belonging to a single + source are grouped into one patch + catalog_type ......... 'gaul': Type of catalog to write: 'gaul' - Gaussian + list, 'srl' - source list (formed by grouping + Gaussians), 'shap' - shapelet list + clobber .............. False : Overwrite existing file? + format ................ 'bbs': Format of output catalog: 'bbs', 'ds9', 'fits', + 'star', 'kvis', or 'ascii' + srcroot ............... None : Root name for entries in the output catalog. None + => use image file name + + BDSM [3]: outfile='SAMP' + + BDSM [4]: catalog_type='srl' + + BDSM [5]: go + ---------> go() + --> Table sent to SAMP hub. + +TOPCAT should automatically load the table. Double-click on the table name in TOPCAT to open the table viewer. We can use now the ``show_fit`` task to highlight the table row that corresponds to a source of interest. To do this, we start ``show_fit`` with ``broadcast = True``: + +:: + + BDSM [6]: show_fit(broadcast=T) + ======================================================================== + NOTE -- With the mouse pointer in plot window: + Press "i" ........ : Get integrated flux densities and mean rms + values for the visible portion of the image + Press "m" ........ : Change min and max scaling values + Press "n" ........ : Show / hide island IDs + Press "0" ........ : Reset scaling to default + Click Gaussian ... : Print Gaussian and source IDs (zoom_rect mode, + toggled with the "zoom" button and indicated in + the lower right corner, must be off) + ________________________________________________________________________ + +Now, clicking on a Gaussian will highlight the row corresponding to the source to which the Gaussian belongs. Gaussian catalogs (i.e., made with ``catalog_type='srl'`` in ``write_catalog``) are also supported (and may be used simultaneously in TOPCAT with source catalogs). + +Images can be sent to ds9 or Aladin using the ``export_image`` task in the same way (with ``outfile = 'SAMP'``). Furthermore, if an image was sent, clicking on a Gaussian in the ``show_fit`` window will tell ds9 or Aladin to center their view on the coordinates of the Gaussian's center. + + +.. rubric:: Footnotes +.. [#f1] http://www.star.bristol.ac.uk/~mbt/topcat/ +.. [#f2] http://hea-www.harvard.edu/RD/ds9/site/Home.html +.. [#f3] http://aladin.u-strasbg.fr diff --git a/CEP/PyBDSM/doc/source/export_image.rst b/CEP/PyBDSM/doc/source/export_image.rst index e8eb8691b38..ac353ad8406 100644 --- a/CEP/PyBDSM/doc/source/export_image.rst +++ b/CEP/PyBDSM/doc/source/export_image.rst @@ -11,14 +11,15 @@ Internally derived images (e.g, the Gaussian model image) can be exported to FIT EXPORT_IMAGE: Write one or more images to a file. ================================================================================ :term:`outfile` ............... None : Output file name. None => file is named - automatically; 'SAMP' => send to SAMP Hub (e.g., to + automatically; 'SAMP' => send to SAMP hub (e.g., to TOPCAT, ds9, or Aladin) :term:`clobber` .............. False : Overwrite existing file? :term:`img_format` ........... 'fits': Format of output image: 'fits' or 'casa' (at the moment only 'fits' is supported) :term:`img_type` ....... 'gaus_resid': Type of image to export: 'gaus_resid', 'shap_resid', 'rms', 'mean', 'gaus_model', - 'shap_model', 'ch0', 'pi' + 'shap_model', 'ch0', 'pi', 'psf_major', 'psf_minor', + 'psf_pa', 'psf_ratio', 'psf_ratio_aper' Each of the parameters is described in detail below. @@ -53,3 +54,13 @@ Each of the parameters is described in detail below. * ``'shap_model'`` - Shapelet model image + * ``'psf_major'`` - image of major axis FWHM variation (arcsec) + + * ``'psf_minor'`` - image of minor axis FWHM variation (arcsec) + + * ``'psf_pa'`` - image of position angle variation (degrees east of north) + + * ``'psf_ratio'`` - image of peak-to-total flux variation (1/beam) + + * ``'psf_ratio_aper'`` - image of peak-to-aperture flux variation (1/beam) + diff --git a/CEP/PyBDSM/doc/source/process_image.rst b/CEP/PyBDSM/doc/source/process_image.rst index 1fe0b26dcc0..67594324bbb 100644 --- a/CEP/PyBDSM/doc/source/process_image.rst +++ b/CEP/PyBDSM/doc/source/process_image.rst @@ -850,7 +850,7 @@ If ``psf_vary_do = True``, then the spatial variations in the PSF are estimated * The unresolved sources within each tile that have SNRs greater than ``psf_snrcutstack`` are then stacked to form a high-SNR PSF. For each tile, this PSF is fit with a Gaussian to recover its size. The significance of the variation in the sizes across the image is quantified. -* If the variation is significant, the major axis, minor axis, and position angle are then interpolated across the image. Where there is sufficient information, the interpolation is done using Delaunay triangulation; otherwise, the values within the tiles defined by tessellation are simply set to those of the appropriate PSF. +* If the variation is significant, the major axis, minor axis, and position angle are then interpolated across the image. Smoothing can be applied to these images to smooth out artifacts due to noise and the interpolation. Additionally, images are made of the ratio of peak-to-total flux and peak-to-aperture flux (if an aperture is specified). These ratio images provide conversions from total flux to peak flux for point sources. In the absence of smearing effects, these ratios should be around unity. However, if ionospheric effects are present, significant smearing can be present. In this case, these ratio images can be useful, for example, in determining the sensitivity at a particular location in the image to a point source with a given total flux. * Lastly, the deconvolved source sizes are adjusted to include the PSF variation as a function of position. @@ -868,6 +868,8 @@ The options for this module are as follows: :term:`psf_nsig` ............. 3.0 : Kappa for clipping within each bin :term:`psf_over` ............... 2 : Factor of nyquist sample for binning bmaj, etc. vs SNR + :term:`psf_smooth` .......... None : Size of Gaussian to use for smoothing of + interpolated images in arcsec. None => no smoothing :term:`psf_snrcut` .......... 10.0 : Minimum SNR for statistics :term:`psf_snrcutstack` ..... 15.0 : Unresolved sources with higher SNR taken for stacked psfs @@ -906,6 +908,9 @@ The options for this module are as follows: psf_over This parameter is an integer (default is 2). When constructing a set of 'unresolved' sources for psf estimation, this parameter controls the factor of nyquist sample for binning bmaj, etc. vs SNR. + psf_smooth + This parameter is a float (default is ``None``) that sets the smoothing scale (in arcsec) used to smooth the interpolated images. Generally, artifacts due to noise and the interpolation can be significantly reduced if the smoothing scale is similar to the typical source separation scale. + psf_snrcut This parameter is a float (default is 10.0). Only Gaussians with SNR greater than this are considered for processing. The minimum value is 5.0 diff --git a/CEP/PyBDSM/doc/source/show_fit.rst b/CEP/PyBDSM/doc/source/show_fit.rst index 99ae8a7c70f..2a676f81fc9 100644 --- a/CEP/PyBDSM/doc/source/show_fit.rst +++ b/CEP/PyBDSM/doc/source/show_fit.rst @@ -10,70 +10,75 @@ PyBDSM includes a task named ``show_fit`` that allows the user to quickly check SHOW_FIT: Show results of fit. ================================================================================ + :term:`broadcast` ............ False : Broadcast Gaussian and source IDs and coordinates + to SAMP hub when a Gaussian is clicked? :term:`ch0_flagged` .......... False : Show the ch0 image with flagged Gaussians (if - any) overplotted + any) overplotted :term:`ch0_image` ............. True : Show the ch0 image. This is the image used for - source detection + source detection :term:`ch0_islands` ........... True : Show the ch0 image with islands and Gaussians (if - any) overplotted - :term:`gmodel_image` .......... True : Show the Gaussian model image - :term:`gresid_image` .......... True : Show the Gaussian residual image + any) overplotted + :term:`gmodel_image` .......... True : Show the Gaussian model image + :term:`gresid_image` .......... True : Show the Gaussian residual image :term:`mean_image` ............ True : Show the background mean image :term:`pi_image` ............. False : Show the polarized intensity image - :term:`psf_major` ............ False : Show the PSF major axis variation - :term:`psf_minor` ............ False : Show the PSF minor axis variation - :term:`psf_pa` ............... False : Show the PSF position angle variation - :term:`rms_image` ............. True : Show the background rms image - :term:`smodel_image` ......... False : Show the shapelet model image - :term:`source_seds` .......... False : Plot the source SEDs and best-fit spectral - indices (if image was processed with + :term:`psf_major` ............ False : Show the PSF major axis variation + :term:`psf_minor` ............ False : Show the PSF minor axis variation + :term:`psf_pa` ............... False : Show the PSF position angle variation + :term:`rms_image` ............. True : Show the background rms image + :term:`smodel_image` ......... False : Show the shapelet model image + :term:`source_seds` .......... False : Plot the source SEDs and best-fit spectral + indices (if image was processed with spectralindex_do = True). Sources may be chosen by ID with the 'c' key or, if ch0_islands = True, - by picking a source with the mouse - :term:`sresid_image` ......... False : Show the shapelet residual image + by picking a source with the mouse + :term:`sresid_image` ......... False : Show the shapelet residual image Each of the parameters is described in detail below. .. glossary:: + broadcast + This parameter is a Boolean (default is ``False``) that determines whether the Gaussian and source IDs and coordinates are sent to a running SAMP Hub when a Gaussian is clicked on. Note that for the IDs to be useful, a catalog must have been sent to the SAMP hub previously using the ``write_catalog`` task (with ``outfile = 'SAMP'``). + ch0_flagged This parameter is a Boolean (default is ``False``) that determines whether to plot the ch0 image (the image used for source detection) with any flagged Gaussians overplotted. - + ch0_image This parameter is a Boolean (default is ``True``) that determines whether to plot the ch0 image (the image used for source detection). - - ch0_islands + + ch0_islands This parameter is a Boolean (default is ``True``) that determines whether to plot the ch0 image (the image used for source detection) with islands and Gaussians overplotted. - + gmodel_image This parameter is a Boolean (default is ``True``) that determines whether to plot the Gaussian model image. - + gresid_image This parameter is a Boolean (default is ``True``) that determines whether to plot the Gaussian residual image. - + mean_image This parameter is a Boolean (default is ``True``) that determines whether to plot the background mean image. - + pi_image This parameter is a Boolean (default is ``False``) that determines whether to plot the polarized intensity image. - + psf_major This parameter is a Boolean (default is ``False``) that determines whether to plot the variation of the major axis of the PSF. - + psf_minor This parameter is a Boolean (default is ``False``) that determines whether to plot the variation of the minor axis of the PSF. - + psf_pa This parameter is a Boolean (default is ``False``) that determines whether to plot the variation of the position angle of the PSF. - + rms_image This parameter is a Boolean (default is ``True``) that determines whether to plot the background rms image. - + smodel_image This parameter is a Boolean (default is ``False``) that determines whether to plot the shapelet model image. - - source_seds - This parameter is a Boolean (default is ``False``) that determines whether to plot the source SEDs and best-fit spectral indices. - + + source_seds + This parameter is a Boolean (default is ``False``) that determines whether to plot the source SEDs and best-fit spectral indices. + sresid_image This parameter is a Boolean (default is ``False``) that determines whether to plot the shapelet residual image. diff --git a/CEP/PyBDSM/doc/source/whats_new.rst b/CEP/PyBDSM/doc/source/whats_new.rst index 8f18108a387..b62ae3fffb3 100644 --- a/CEP/PyBDSM/doc/source/whats_new.rst +++ b/CEP/PyBDSM/doc/source/whats_new.rst @@ -4,6 +4,40 @@ What's New ********** +Version 1.4.5 (2012/10/12): + + * Added option (``incl_empty``) to include empty islands (that have no un-flagged Gaussians) in output catalogs. Any such empty islands are given negative source IDs and have positions given by the location of the peak of the island. + + * Fixed a bug in Gaussian fitting that could cause a crash when fitting fails. + + * Fixed a bug in parallelization that could cause a crash due to improper concatenation of result lists. + +Version 1.4.4 (2012/10/09): + + * Fixed a bug related to the parallelization of Gaussian fitting that could cause a crash due to improper mapping of island lists to processes. + + * Improved logging. + + * Added a warning when one or more islands are not fit (i.e., no valid, unflagged Gaussians were found). + + * Added code to handle images with no unblanked pixels. + + * Improved fitting robustness. + +Version 1.4.3 (2012/10/04): + + * Fixed a bug in the mean map calculation that caused mean maps with constant values (i.e., non-2D maps) to have values of 0.0 Jy/beam unless ``mean_map = 'const'`` was explicitly specified. + + * Fixed a bug in the PSF vary module that resulted in incorrect PSF generators being used. Added an option to smooth the resulting PSF images (``psf_smooth``). Parallelized the PSF interpolation and smoothing steps. Improved PSF vary documentation. + +Version 1.4.2 (2012/09/25): + + * Dramatically reduced time required to identify valid wavelet islands. Fixed bug that resulted in output FITS gaul tables being improperly sorted. + +Version 1.4.1 (2012/09/11): + + * Added SAMP (Simple Application Messaging Protocol) support to the write_catalog, export_image, and show_fit tasks. These tasks can now use SAMP to communicate with other programs connected to a SAMP hub (e.g., ds9, Topcat, Aladin). + Version 1.4.0 (2012/09/11): * Parallelized Gaussian fitting, shapelet decomposition, validation of wavelet islands, and mean/rms map generation. The number of cores to be used can be specified with the ``ncores`` option (default is to use all). diff --git a/CEP/PyBDSM/doc/source/write_catalog.rst b/CEP/PyBDSM/doc/source/write_catalog.rst index 70c79853da8..e5fc7d128aa 100644 --- a/CEP/PyBDSM/doc/source/write_catalog.rst +++ b/CEP/PyBDSM/doc/source/write_catalog.rst @@ -17,7 +17,7 @@ The task parameters are as follows: WRITE_CATALOG: Write the Gaussian, source, or shapelet list to a file. ================================================================================ :term:`outfile` ............... None : Output file name. None => file is named - automatically; 'SAMP' => send to SAMP Hub (e.g., to + automatically; 'SAMP' => send to SAMP hub (e.g., to TOPCAT, ds9, or Aladin) :term:`bbs_patches` ........... None : For BBS format, type of patch to use: None => no patches. 'single' => all Gaussians in one patch. @@ -32,6 +32,8 @@ The task parameters are as follows: :term:`format` ................ 'bbs': Format of output Gaussian list: 'bbs', 'ds9', 'fits', 'star', 'kvis', or 'ascii' :term:`incl_chan` ............ False : Include fluxes from each channel (if any)? + :term:`incl_empty` ........... False : Include islands without any valid Gaussians + (source list only)? :term:`srcroot` ............... None : Root name for entries in the output catalog. None => use image file name @@ -40,7 +42,7 @@ Each of the parameters is described in detail below. .. glossary:: outfile - This parameter is a string (default is ``None``) that sets the name of the output file. If ``None``, the file is named automatically. If 'SAMP' the table is sent to a running SAMP Hub (e.g., to TOPCAT or Aladin). + This parameter is a string (default is ``None``) that sets the name of the output file. If ``None``, the file is named automatically. If 'SAMP' the full catalog (i.e., ``format = 'fits'``) is sent to a running SAMP Hub (e.g., to TOPCAT or Aladin). bbs_patches This parameter is a string (default is ``None``) that sets the type of patch to use in BBS-formatted catalogs. When the Gaussian catalogue is written as a BBS-readable sky file, this @@ -86,6 +88,9 @@ Each of the parameters is described in detail below. incl_chan This parameter is a Boolean (default is ``False``) that determines whether the total flux densities of each source measured in each channel by the spectral index module are included in the output. + incl_empty + This parameter is a Boolean (default is ``False``) that determines whether islands without any valid Gaussians are included in the output catalog. This option is only available for source lists. If True, islands for which Gaussian fitting failed will be included in the output catalog. In these cases, the source IDs are negative. + srcroot This parameter is a string (default is ``None``) that sets the root for source names in the output catalog. diff --git a/CEP/PyBDSM/src/python/__init__.py b/CEP/PyBDSM/src/python/__init__.py index 2d3e8d0db1d..e6b53202ead 100644 --- a/CEP/PyBDSM/src/python/__init__.py +++ b/CEP/PyBDSM/src/python/__init__.py @@ -124,13 +124,14 @@ def _run_op_list(img, chain): mylog = mylogger.logging.getLogger("PyBDSM.Init") mylog.info("PyBDSM version %s (LUS revision %s)" % (__version__, __revision__)) - mylog.info("Non-default input parameters:") + par_msg = "Non-default input parameters:\n" user_opts = img.opts.to_list() for user_opt in user_opts: k, v = user_opt val = img.opts.__getattribute__(k) if val != v._default and v.group() != 'hidden': - mylog.info(' %-20s : %s' % (k, repr(val))) + par_msg += ' %-20s : %s\n' % (k, repr(val)) + mylog.info(par_msg[:-1]) # -1 is to trim final newline # Run all op's dc = '\033[34;1m' @@ -194,7 +195,7 @@ def _run_op_list(img, chain): # Log all internally derived parameters mylog = mylogger.logging.getLogger("PyBDSM.Final") - mylog.info("Internally derived input parameters:") + par_msg = "Internally derived parameters:\n" import inspect import types @@ -207,7 +208,8 @@ def _run_op_list(img, chain): types.NoneType, tuple, list)): - mylog.info(' %-20s : %s' % (attr[0], repr(used))) + par_msg += ' %-20s : %s\n' % (attr[0], repr(used)) + mylog.info(par_msg[:-1]) # -1 is to trim final newline return True diff --git a/CEP/PyBDSM/src/python/_version.py b/CEP/PyBDSM/src/python/_version.py index 8d0014cbde0..f62324431f6 100644 --- a/CEP/PyBDSM/src/python/_version.py +++ b/CEP/PyBDSM/src/python/_version.py @@ -9,7 +9,7 @@ adding to the changelog will naturally do this. """ # Version number -__version__ = '1.4.0' +__version__ = '1.4.5' # Store svn Revision number. For this to work, one also needs to do: # @@ -27,15 +27,73 @@ def changelog(): PyBDSM Changelog. ----------------------------------------------------------------------- - 2011/09/18 - Added option to send images and catalogs to a SAMP hub + 2012/10/22 - Added option ("force_output") to force output of catalogs + even if they are empty (when no sources are found). + + 2012/10/12 - Version 1.4.5 + + 2012/10/12 - Added option ("incl_empty") to include empty islands (that + have no un-flagged Gaussians) in output catalogs. Any such empty + islands are given negative source IDs and positions given by the + location of the peak of the island. + + 2012/10/10 - Fixed a bug in Gaussian fitting that could cause a crash + when fitting fails. Fixed a bug in parallelization that could + cause a crash due to improper concatenation of result lists. + + 2012/10/09 - Version 1.4.4 + + 2012/10/09 - Improved logging. Added a warning when one or more islands + are not fit properly (i.e., no valid, unflagged Gaussians were + fit). Fixed a bug in parallelization of Gaussian fitting that + could cause a crash due to improper mapping of island lists to + processes. + + 2012/10/05 - Added code to handle images with no unblanked pixels. + Improved fitting robustness. + + 2012/10/04 - Version 1.4.3 + + 2012/10/04 - Fixed a bug in the mean map calculation that caused mean + maps with constant values (i.e., non-2D maps) to have values of + 0.0 Jy/beam unless "mean_map = 'const'" was explicitly specified. + Fixed a bug in Gaussian fitting that could cause an island to be + skipped. + + 2012/10/02 - Fixed a bug in the PSF vary module that resulted in + incorrect PSF generators being used. Added an option to smooth + the resulting PSF images ("psf_smooth"). Parallelized the PSF + interpolation and smoothing steps. Improved PSF vary documentation. + + 2012/09/25 - Version 1.4.2 + + 2012/09/25 - Dramatically reduced the time required to identify valid + wavelet islands. + + 2012/09/21 - Fixed bug that resulted in output FITS gaul tables being + improperly sorted. Fixed cosmetic bug in the statusbar that could + sometimes cause improper formatting. Added example of SAMP usage + to the documentation. + + 2012/09/20 - Version 1.4.1 + + 2012/09/20 - Fixed a bug in the wavelet module that caused a crash when + no Gaussians were fit to the ch0 image. + + 2012/09/19 - Added "broadcast" option to show_fit task to send + coordinates and row highlight request to a SAMP hub when a Gaussian + is clicked. Fixed bug in aperture flux masking that sometimes caused + the mask to be the wrong shape. + + 2012/09/18 - Added option to send images and catalogs to a SAMP hub (activated by setting outfile = 'SAMP' in the export_image and write_catalog tasks). - 2011/09/13 - Improved speed of plotting when images are large and in + 2012/09/13 - Improved speed of plotting when images are large and in mean/rms map generation. Fixed bug that caused residual image statistics to fail when NaNs are present. - 2011/09/11 - Version 1.4.0 + 2012/09/11 - Version 1.4.0 2012/09/11 - Parallelized Gaussian fitting, shapelet decomposition, validation of wavelet islands, and mean/rms map generation. diff --git a/CEP/PyBDSM/src/python/collapse.py b/CEP/PyBDSM/src/python/collapse.py index c10d8cba75f..7b5d8a09297 100644 --- a/CEP/PyBDSM/src/python/collapse.py +++ b/CEP/PyBDSM/src/python/collapse.py @@ -22,9 +22,9 @@ class Op_collapse(Op): def __call__(self, img): mylog = mylogger.logging.getLogger("PyBDSM."+img.log+"Collapse") - if img.opts.polarisation_do: + if img.opts.polarisation_do: pols = ['I', 'Q', 'U', 'V'] # make sure I is done first - else: + else: pols = ['I'] # assume I is always present if img.image.shape[1] > 1: @@ -36,10 +36,10 @@ class Op_collapse(Op): if len(c_list) == 1: c_mode = 'single' chan0 = c_list[0] - img.collapse_ch0 = chan0 + img.collapse_ch0 = chan0 ch0sh = img.image.shape[2:] img.ch0 = N.zeros(ch0sh) - if img.opts.polarisation_do: + if img.opts.polarisation_do: img.ch0_Q = N.zeros(ch0sh); img.ch0_U = N.zeros(ch0sh); img.ch0_V = N.zeros(ch0sh) ch0images = [img.ch0, img.ch0_Q, img.ch0_U, img.ch0_V] else: @@ -51,30 +51,30 @@ class Op_collapse(Op): kappa = img.opts.kappa_clip mean, rms, cmean, crms = chan_stats(img, kappa) - img.channel_mean = mean; img.channel_rms = rms + img.channel_mean = mean; img.channel_rms = rms img.channel_clippedmean = cmean; img.channel_clippedrms = crms for ipol, pol in enumerate(pols): if c_mode == 'single': - if pol == 'I': + if pol == 'I': img.ch0 = ch0 = img.image[0, chan0] mylogger.userinfo(mylog, 'Source extraction will be ' \ 'done on channel', '%i (%.3f MHz)' % \ - (chan0, img.cfreq/1e6)) + (chan0, img.frequency/1e6)) else: ch0images[ipol][:] = ch0[:] = img.image[ipol, chan0][:] if c_mode == 'average': if not hasblanks: - if pol == 'I': + if pol == 'I': ch0, wtarr = avspc_direct(c_list, img.image[0], img.channel_clippedrms, c_wts) else: # use wtarr from the I image, which is always collapsed first ch0, wtarr = avspc_direct(c_list, img.image[ipol], img.channel_clippedrms, c_wts, wtarr=wtarr) else: - if pol == 'I': + if pol == 'I': ch0, wtarr = avspc_blanks(c_list, img.image[0], img.channel_clippedrms, c_wts) - else: + else: # use wtarr from the I image, which is always collapsed first ch0, wtarr = avspc_blanks(c_list, img.image[ipol], img.channel_clippedrms, c_wts, wtarr=wtarr) ch0images[ipol][:] = ch0[:] @@ -92,29 +92,29 @@ class Op_collapse(Op): 'done on averaged ("ch0") image') mylogger.userinfo(mylog, 'Frequency of averaged '\ 'image', '%.3f MHz' % \ - (img.cfreq/1e6,)) + (img.frequency/1e6,)) str1 = " ".join(str(n) for n in c_list) mylog.debug('%s %s' % ('Channels averaged : ', str1)) str1 = " ".join(["%9.4e" % n for n in wtarr]) mylog.debug('%s %s %s' % ('Channel weights : ', str1, '; unity=zero if c_wts="rms"')) - + if img.opts.output_all: func.write_image_to_file(img.use_io, img.imagename+'.ch0_'+pol+'.fits', ch0, img) mylog.debug('%s %s ' % ('Writing file ', img.imagename+'.ch0_'+pol+'.fits')) - + else: # Only one channel in image img.ch0 = img.image[0, 0] mylogger.userinfo(mylog, 'Frequency of image', - '%.3f MHz' % (img.cfreq/1e6,)) - if img.opts.polarisation_do: + '%.3f MHz' % (img.frequency/1e6,)) + if img.opts.polarisation_do: for pol in pols[1:]: if pol == 'Q': img.ch0_Q = img.image[1, 0][:] if pol == 'U': img.ch0_U = img.image[2, 0][:] if pol == 'V': img.ch0_V = img.image[3, 0][:] - + # Lastly, remove Q, U, and V images from img.image, as they are no longer needed - if img.opts.polarisation_do: + if img.opts.polarisation_do: img.image = img.image[0,:].reshape(1, img.image.shape[1], img.image.shape[2], img.image.shape[3]) # create mask if needed (assume all pols have the same mask as I) @@ -128,9 +128,12 @@ class Op_collapse(Op): frac_blank = round(float(img.blankpix)/float(image.shape[0]*image.shape[1]),3) mylogger.userinfo(mylog, "Number of blank pixels", str(img.blankpix) +' ('+str(frac_blank*100.0)+'%)') + if img.blankpix == image.shape[0]*image.shape[1]: + # ALL pixels are blanked! + raise RuntimeError('All pixels in the image are blanked.') img.completed_Ops.append('collapse') - - + + ######################################################################################## def chan_stats(img, kappa): @@ -149,7 +152,7 @@ def chan_stats(img, kappa): if N.any(im): immask = N.isnan(im) - if immask.all(): + if immask.all(): m, r, cm, cr = 0, 0, 0, 0 else: if immask.any(): @@ -160,7 +163,7 @@ def chan_stats(img, kappa): m, r, cm, cr = 0, 0, 0, 0 mean.append(m); rms.append(r); cmean.append(cm); crms.append(cr) - return N.array(mean), N.array(rms), N.array(cmean), N.array(crms) + return N.array(mean), N.array(rms), N.array(cmean), N.array(crms) ######################################################################################## @@ -170,7 +173,7 @@ def avspc_direct(c_list, image, rmsarr, c_wts, wtarr=None): shape2 = image.shape[1:] ch0 = N.zeros(shape2) sumwts = 0.0 - if wtarr == None: + if wtarr == None: wtarr = N.zeros(len(c_list)) for i, ch in enumerate(c_list): im = image[ch] @@ -178,7 +181,7 @@ def avspc_direct(c_list, image, rmsarr, c_wts, wtarr=None): if c_wts == 'unity': wt = 1.0 if c_wts == 'rms': wt = r if r != 0: - wt = 1.0/(wt*wt) + wt = 1.0/(wt*wt) else: wt = 0 sumwts += wt @@ -194,13 +197,13 @@ def avspc_direct(c_list, image, rmsarr, c_wts, wtarr=None): return ch0, wtarr ######################################################################################## - + def avspc_blanks(c_list, image, rmsarr, c_wts, wtarr=None): shape2 = image.shape[1:] ch0 = N.zeros(shape2) sumwtim = N.zeros(shape2) - if wtarr == None: + if wtarr == None: wtarr = N.zeros(len(c_list)) for i, ch in enumerate(c_list): im = image[ch] @@ -208,7 +211,7 @@ def avspc_blanks(c_list, image, rmsarr, c_wts, wtarr=None): if c_wts == 'unity': wt = 1.0 if c_wts == 'rms': wt = r if r != 0: - wt = 1.0/(wt*wt) + wt = 1.0/(wt*wt) else: wt = 0 wtim = N.ones(shape2)*wt*(~N.isnan(im)) @@ -242,8 +245,8 @@ def init_freq_collapse(img, wtarr): for i, ch in enumerate(c_list): sumwts += wtarr[i] sumfrq += freqs[ch]*wtarr[i] - img.cfreq = sumfrq / sumwts - img.freq_pars = (img.cfreq, 0.0, 0.0) + img.frequency = sumfrq / sumwts + img.freq_pars = (img.frequency, 0.0, 0.0) else: # Calculate from header info c_list = img.opts.collapse_av @@ -260,4 +263,4 @@ def init_freq_collapse(img, wtarr): sumwts += wtarr[i] freq = crval+cdelt*(ch+1-crpix) sumfrq += freq*wtarr[i] - img.cfreq = sumfrq / sumwts + img.frequency = sumfrq / sumwts diff --git a/CEP/PyBDSM/src/python/functions.py b/CEP/PyBDSM/src/python/functions.py index d1a18162647..79bd29e45a2 100755 --- a/CEP/PyBDSM/src/python/functions.py +++ b/CEP/PyBDSM/src/python/functions.py @@ -179,8 +179,12 @@ def gdist_pa(pix1, pix2, gsize): val = atanproper(dumr, dx, dy) psi = val - (gsize[2]+90.0)/180.0*pi - # convert angle to eccentric anomaly - psi=atan(gsize[0]/gsize[1]*tan(psi)) + + # convert angle to eccentric anomaly + if approx_equal(gsize[1], 0.0): + psi = pi/2.0 + else: + psi=atan(gsize[0]/gsize[1]*tan(psi)) dumr2 = gsize[0]*cos(psi) dumr3 = gsize[1]*sin(psi) fwhm = sqrt(dumr2*dumr2+dumr3*dumr3) @@ -514,11 +518,12 @@ def imageshift(image, shift): def trans_gaul(q): " transposes a tuple " y=[] - for i in range(len(q[0])): - elem=[] - for j in range(len(q)): - elem.append(q[j][i]) - y.append(elem) + if len(q) > 0: + for i in range(len(q[0])): + elem=[] + for j in range(len(q)): + elem.append(q[j][i]) + y.append(elem) return y def momanalmask_gaus(subim, mask, isrc, bmar_p, allpara=True): @@ -730,38 +735,41 @@ def get_errors(img, p, stdav, bm_pix=None): errors = [] for i in range(ngaus): pp = p[i*7:i*7+7] - ### Now do error analysis as in Condon (and fBDSM) + ### Now do error analysis as in Condon (and fBDSM) size = pp[3:6] size = corrected_size(size) # angle is now degrees CCW from +y-axis - sq2 = sqrt(2.0) - if bm_pix == None: - bm_pix = N.array([img.pixel_beam[0]*fwsig, img.pixel_beam[1]*fwsig, img.pixel_beam[2]]) - dumr = sqrt(abs(size[0]*size[1]/(4.0*bm_pix[0]*bm_pix[1]))) - dumrr1 = 1.0+bm_pix[0]*bm_pix[1]/(size[0]*size[0]) - dumrr2 = 1.0+bm_pix[0]*bm_pix[1]/(size[1]*size[1]) - dumrr3 = dumr*pp[0]/stdav - d1 = sqrt(8.0*log(2.0)) - d2 = (size[0]*size[0]-size[1]*size[1])/(size[0]*size[0]) - try: - e_peak = pp[0]*sq2/(dumrr3*pow(dumrr1,0.75)*pow(dumrr2,0.75)) - e_maj=size[0]*sq2/(dumrr3*pow(dumrr1,1.25)*pow(dumrr2,0.25)) - e_min=size[1]*sq2/(dumrr3*pow(dumrr1,0.25)*pow(dumrr2,1.25)) # in fw - pa_rad = size[2]*pi/180.0 - e_x0 = sqrt( (e_maj*N.sin(pa_rad))**2 + (e_min*N.cos(pa_rad))**2 ) / d1 - e_y0 = sqrt( (e_maj*N.cos(pa_rad))**2 + (e_min*N.sin(pa_rad))**2 ) / d1 - e_pa=2.0/(d2*dumrr3*pow(dumrr1,0.25)*pow(dumrr2,1.25)) - e_pa=e_pa*180.0/pi - e_tot=pp[0]*sqrt(e_peak*e_peak/(pp[0]*pp[0])+(0.25/dumr/dumr)*(e_maj*e_maj/(size[0]*size[0])+e_min*e_min/(size[1]*size[1]))) - except: - e_peak = 0.0 - e_x0 = 0.0 - e_y0 = 0.0 - e_maj = 0.0 - e_min = 0.0 - e_pa = 0.0 - e_tot = 0.0 - if abs(e_pa) > 180.0: e_pa=180.0 # dont know why i did this - errors = errors + [e_peak, e_x0, e_y0, e_maj, e_min, e_pa, e_tot] + if size[0] == 0.0 or size[1] == 0.0: + errors = errors + [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] + else: + sq2 = sqrt(2.0) + if bm_pix == None: + bm_pix = N.array([img.pixel_beam[0]*fwsig, img.pixel_beam[1]*fwsig, img.pixel_beam[2]]) + dumr = sqrt(abs(size[0]*size[1]/(4.0*bm_pix[0]*bm_pix[1]))) + dumrr1 = 1.0+bm_pix[0]*bm_pix[1]/(size[0]*size[0]) + dumrr2 = 1.0+bm_pix[0]*bm_pix[1]/(size[1]*size[1]) + dumrr3 = dumr*pp[0]/stdav + d1 = sqrt(8.0*log(2.0)) + d2 = (size[0]*size[0]-size[1]*size[1])/(size[0]*size[0]) + try: + e_peak = pp[0]*sq2/(dumrr3*pow(dumrr1,0.75)*pow(dumrr2,0.75)) + e_maj=size[0]*sq2/(dumrr3*pow(dumrr1,1.25)*pow(dumrr2,0.25)) + e_min=size[1]*sq2/(dumrr3*pow(dumrr1,0.25)*pow(dumrr2,1.25)) # in fw + pa_rad = size[2]*pi/180.0 + e_x0 = sqrt( (e_maj*N.sin(pa_rad))**2 + (e_min*N.cos(pa_rad))**2 ) / d1 + e_y0 = sqrt( (e_maj*N.cos(pa_rad))**2 + (e_min*N.sin(pa_rad))**2 ) / d1 + e_pa=2.0/(d2*dumrr3*pow(dumrr1,0.25)*pow(dumrr2,1.25)) + e_pa=e_pa*180.0/pi + e_tot=pp[0]*sqrt(e_peak*e_peak/(pp[0]*pp[0])+(0.25/dumr/dumr)*(e_maj*e_maj/(size[0]*size[0])+e_min*e_min/(size[1]*size[1]))) + except: + e_peak = 0.0 + e_x0 = 0.0 + e_y0 = 0.0 + e_maj = 0.0 + e_min = 0.0 + e_pa = 0.0 + e_tot = 0.0 + if abs(e_pa) > 180.0: e_pa=180.0 # dont know why i did this + errors = errors + [e_peak, e_x0, e_y0, e_maj, e_min, e_pa, e_tot] return errors @@ -1570,7 +1578,7 @@ def aperture_flux(aperture_pix, posn_pix, aper_im, aper_rms, beamarea): """Returns aperture flux and error""" import numpy as N - dist_mask = generate_aperture(aper_im.shape[1], aper_im.shape[0], posn_pix[1], posn_pix[0], aperture_pix) + dist_mask = generate_aperture(aper_im.shape[0], aper_im.shape[1], posn_pix[1], posn_pix[0], aperture_pix) aper_mask = N.where(dist_mask) if N.size(aper_mask) == 0: return [0.0, 0.0] @@ -1696,3 +1704,33 @@ def send_fits_table(s, private_key, name, file_path): raise RuntimeError("A running SAMP hub was not found.") else: s.samp.hub.notifyAll(private_key, message) + +def send_highlight_row(s, private_key, url, row_id): + """Send a SAMP notification to highlight a row in a table.""" + import os + + message = {} + message['samp.mtype'] = "table.highlight.row" + message['samp.params'] = {} + message['samp.params']['row'] = str(row_id) + message['samp.params']['url'] = url + lockfile = os.path.expanduser('~/.samp') + if not os.path.exists(lockfile): + raise RuntimeError("A running SAMP hub was not found.") + else: + s.samp.hub.notifyAll(private_key, message) + +def send_coords(s, private_key, coords): + """Send a SAMP notification to point at given coordinates.""" + import os + + message = {} + message['samp.mtype'] = "coord.pointAt.sky" + message['samp.params'] = {} + message['samp.params']['ra'] = str(coords[0]) + message['samp.params']['dec'] = str(coords[1]) + lockfile = os.path.expanduser('~/.samp') + if not os.path.exists(lockfile): + raise RuntimeError("A running SAMP hub was not found.") + else: + s.samp.hub.notifyAll(private_key, message) diff --git a/CEP/PyBDSM/src/python/gaul2srl.py b/CEP/PyBDSM/src/python/gaul2srl.py index d8471893bab..317b6b35fd8 100644 --- a/CEP/PyBDSM/src/python/gaul2srl.py +++ b/CEP/PyBDSM/src/python/gaul2srl.py @@ -18,6 +18,7 @@ Also, each island object of img.islands list has the source object island.source from image import * from islands import * from gausfit import Gaussian +from interface import wrap import mylogger import numpy as N N.seterr(divide='raise') @@ -42,9 +43,13 @@ class Op_gaul2srl(Op): img.aperture = None src_index = -1 + dsrc_index = 0 sources = [] + dsources = [] + no_gaus_islands = [] for iisl, isl in enumerate(img.islands): isl_sources = [] + isl_dsources = [] g_list = [] for g in isl.gaul: if g.flag == 0: @@ -59,13 +64,43 @@ class Op_gaul2srl(Op): src_index, source = self.process_CM(img, g_list, isl, src_index) sources.extend(source) isl_sources.extend(source) + else: + if not img.waveletimage: + dg = isl.dgaul[0] + no_gaus_islands.append((isl.island_id, dg.centre_pix[0], dg.centre_pix[1])) + # Put in the dummy Source as the source and use negative IDs + g_list = isl.dgaul + dsrc_index, dsource = self.process_single_gaussian(img, g_list, dsrc_index, code = 'S') + dsources.append(dsource) + isl_dsources.append(dsource) isl.sources = isl_sources - + isl.dsources = isl_dsources img.sources = sources - img.nsrc = src_index+1 + img.dsources = dsources + img.nsrc = src_index + 1 mylogger.userinfo(mylog, "Number of sources formed from Gaussians", str(img.nsrc)) + if not img.waveletimage and not img._pi and len(no_gaus_islands) > 0 and not img.opts.quiet: + message = 'All Gaussians were flagged for the following island' + if len(no_gaus_islands) == 1: + message += ':\n' + else: + message += 's:\n' + for isl_id in no_gaus_islands: + message += ' Island #%i (x=%i, y=%i)\n' % isl_id + if len(no_gaus_islands) == 1: + message += 'Please check this island. If it is a valid island and\n' + else: + message += 'Please check these islands. If they are valid islands and\n' + if img.opts.atrous_do: + message += 'should be fit, try adjusting the flagging options (use\n'\ + 'show_fit with "ch0_flagged=True" to see the flagged Gaussians).' + else: + message += 'should be fit, try adjusting the flagging options (use\n'\ + 'show_fit with "ch0_flagged=True" to see the flagged Gaussians)\n'\ + 'or enabling the wavelet module (with "atrous_do=True").' + mylog.warning(message) img.completed_Ops.append('gaul2srl') @@ -85,14 +120,20 @@ class Op_gaul2srl(Op): bbox = img.islands[g.island_id].bbox ngaus = 1 island_id = g.island_id - gaussians = list([g]) + if g.gaus_num < 0: + gaussians = [] + else: + gaussians = list([g]) aper_flux = func.ch0_aperture_flux(img, g.centre_pix, img.aperture) source_prop = list([code, total_flux, peak_flux_centroid, peak_flux_max, aper_flux, posn_sky_centroid, \ posn_sky_max, size_sky, deconv_size_sky, bbox, ngaus, island_id, gaussians]) source = Source(img, source_prop) - src_index += 1 + if g.gaussian_idx == -1: + src_index -= 1 + else: + src_index += 1 g.source_id = src_index g.code = code source.source_id = src_index diff --git a/CEP/PyBDSM/src/python/gausfit.py b/CEP/PyBDSM/src/python/gausfit.py index 7c65d75d48e..0b27e19dd01 100644 --- a/CEP/PyBDSM/src/python/gausfit.py +++ b/CEP/PyBDSM/src/python/gausfit.py @@ -48,6 +48,8 @@ class Op_gausfit(Op): mylog = mylogger.logging.getLogger("PyBDSM."+img.log+"Gausfit") if len(img.islands) == 0: img.gaussians = [] + img.ngaus = 0 + img.total_flux_gaus = 0.0 img.completed_Ops.append('gausfit') return img @@ -98,22 +100,34 @@ class Op_gausfit(Op): idx = isl.island_id gaul = gaus_list[idx][0] fgaul = gaus_list[idx][1] + dgaul = [] gaul = [Gaussian(img, par, idx, gidx) for (gidx, par) in enumerate(gaul)] if len(gaul) == 0: + # No good Gaussians were fit. In this case, make a dummy + # Gaussian located at the island center so + # that the source may still be included in output catalogs. + # These dummy Gaussians all have an ID of -1. They do not + # appear in any of the source or island Gaussian lists except + # the island dgaul list. + posn = N.unravel_index(N.argmax(isl.image*~isl.mask_active), isl.shape) + N.array(isl.origin) + par = [isl.max_value, posn[0], posn[1], 0.0, 0.0, 0.0] + dgaul = [Gaussian(img, par, idx, -1)] gidx = 0 fgaul= [Gaussian(img, par, idx, gidx + gidx2 + 1, flag) for (gidx2, (flag, par)) in enumerate(fgaul)] isl.gaul = gaul isl.fgaul= fgaul + isl.dgaul = dgaul gaussian_list = [g for isl in img.islands for g in isl.gaul] img.gaussians = gaussian_list ### put in the serial number of the gaussians for the whole image n = 0 + nn = 0 tot_flux = 0.0 if img.waveletimage: # store the wavelet scale for each Gaussian @@ -127,6 +141,10 @@ class Op_gausfit(Op): n += 1; m += 1 g.gaus_num = n - 1 tot_flux += g.total_flux + for dg in isl.dgaul: + nn -= 1 + dg.gaus_num = nn + isl.ngaus = m img.ngaus = n img.total_flux_gaus = tot_flux @@ -157,15 +175,13 @@ class Op_gausfit(Op): return img - def process_island(self, isl, img, opts=None, multi=True): + def process_island(self, isl, img, opts=None): """Processes a single island. - Returns a list best-fit Gaussians and flagged Gaussians. + Returns a list of the best-fit Gaussians and flagged Gaussians. """ import functions as func - if multi == False: - global bar if opts == None: opts = img.opts iter_ngmax = 10 @@ -201,26 +217,18 @@ class Op_gausfit(Op): else: sgaul, sfgaul = self.fit_island(islcp, opts, img) gaul = gaul + sgaul; fgaul = fgaul + sfgaul - if multi == False: - if bar.started: bar.spin() - if multi == False: - if bar.started: bar.increment() else: isl.islmean = 0.0 if opts.peak_fit and size > peak_size: gaul, fgaul = self.fit_island_iteratively(img, isl, iter_ngmax=iter_ngmax, opts=opts) else: gaul, fgaul = self.fit_island(isl, opts, img) - if multi == False: - if bar.started: bar.increment() else: if opts.peak_fit and size > peak_size: gaul, fgaul = self.fit_island_iteratively(img, isl, iter_ngmax=iter_ngmax, opts=opts) else: gaul, fgaul = self.fit_island(isl, opts, img) - if multi == False: - if bar.started: bar.increment() # Return list of Gaussians return [gaul, fgaul] @@ -248,10 +256,13 @@ class Op_gausfit(Op): """ from _cbdsm import MGFunction + import functions as func + if ffimg == None: - fcn = MGFunction(isl.image-isl.islmean, isl.mask_active, 1) + fit_image = isl.image-isl.islmean else: - fcn = MGFunction(isl.image-isl.islmean-ffimg, isl.mask_active, 1) + fit_image = isl.image-isl.islmean-ffimg + fcn = MGFunction(fit_image, isl.mask_active, 1) beam = img.pixel_beam if abs(beam[0]/beam[1]) < 1.1: @@ -308,20 +319,18 @@ class Op_gausfit(Op): break if not fitok: # If normal fitting fails, try to fit 5 or fewer Gaussians to the island - ngmax = 5 + ngmax = 6 while not fitok and ngmax > 1: - fitok = self.fit_iter([], 0, fcn, dof, beam, thr0, 1, 'simple', ngmax, verbose) ngmax -= 1 + fitok = self.fit_iter([], 0, fcn, dof, beam, thr0, 1, 'simple', ngmax, verbose) gaul, fgaul = self.flag_gaussians(fcn.parameters, opts, beam, thr0, peak, shape, isl.mask_active, isl.image, size) + sm_isl = nd.binary_dilation(isl.mask_active) if not fitok and N.sum(~sm_isl) >= img.minpix_isl: - # If all else fails, shrink the island a little and try one last time - if ffimg == None: - fcn = MGFunction(isl.image-isl.islmean, nd.binary_dilation(isl.mask_active), 1) - else: - fcn = MGFunction(isl.image-isl.islmean-ffimg, nd.binary_dilation(isl.mask_active), 1) + # If fitting still fails, shrink the island a little and try again + fcn = MGFunction(fit_image, nd.binary_dilation(isl.mask_active), 1) gaul = [] iter = 0 ng1 = 0 @@ -337,11 +346,8 @@ class Op_gausfit(Op): break lg_isl = nd.binary_erosion(isl.mask_active) if not fitok and N.sum(~lg_isl) >= img.minpix_isl: - # If all else fails, expand the island a little and try one last time - if ffimg == None: - fcn = MGFunction(isl.image-isl.islmean, nd.binary_erosion(isl.mask_active), 1) - else: - fcn = MGFunction(isl.image-isl.islmean-ffimg, nd.binary_erosion(isl.mask_active), 1) + # If fitting still fails, expand the island a little and try again + fcn = MGFunction(fit_image, nd.binary_erosion(isl.mask_active), 1) gaul = [] iter = 0 ng1 = 0 @@ -356,6 +362,29 @@ class Op_gausfit(Op): if fitok and len(fgaul) == 0: break + if not fitok: + # If all else fails, try to use moment analysis + inisl = N.where(~isl.mask_active) + mask_id = N.zeros(isl.image.shape, dtype=int) - 1 + mask_id[inisl] = isl.island_id + try: + mompara = func.momanalmask_gaus(fit_image, mask_id, isl.island_id, img.pixel_beamarea, True) + mompara[5] += 90.0 + if not N.isnan(mompara[1]) and not N.isnan(mompara[2]): + x1 = N.int(N.floor(mompara[1])) + y1 = N.int(N.floor(mompara[2])) + xind = slice(x1, x1+2, 1); yind = slice(y1, y1+2, 1) + t=(mompara[1]-x1)/(x1+1-x1) + u=(mompara[2]-y1)/(y1+1-y1) + s_peak=(1.0-t)*(1.0-u)*fit_image[x1,y1]+t*(1.0-u)*fit_image[x1+1,y1]+ \ + t*u*fit_image[x1+1,y1+1]+(1.0-t)*u*fit_image[x1,y1+1] + mompara[0] = s_peak + par = [mompara.tolist()] + gaul, fgaul = self.flag_gaussians(par, opts, + beam, thr0, peak, shape, isl.mask_active, + isl.image, size) + except: + pass ### return whatever we got isl.mg_fcn = fcn @@ -368,82 +397,6 @@ class Op_gausfit(Op): print 'Number of flagged Gaussians: %i' % (len(fgaul),) return gaul, fgaul - def deblend_and_fit(self, img, isl, opts=None): - """Deblends an island and then fits it""" - import functions as func - sgaul = []; sfgaul = [] - gaul = []; fgaul = [] - if opts == None: - opts = img.opts - thresh_isl = opts.thresh_isl - thresh_pix = opts.thresh_pix - thresh = opts.fittedimage_clip - rms = isl.rms - factor = 1.0 - # Set desired size of sub-island. Don't let it get too small, or fitting - # won't work well. - maxsize = max(opts.peak_maxsize, (~isl.mask_active).sum()/img.pixel_beamarea/2.0) - - if opts.verbose_fitting: - print 'Finding and fitting peaks of island ', isl.island_id - while True: - factor *= 1.2 - if N.max(isl.image-isl.islmean-isl.mean)/thresh_isl/factor <= rms: - if int(factor) == 1: - slices = [] - break - mask_active_orig = isl.mask_active - act_pixels = (isl.image-isl.islmean-isl.mean)/thresh_isl/factor >= rms - N.logical_and(act_pixels, ~mask_active_orig, act_pixels) - rank = len(isl.shape) - # generates matrix for connectivity, in this case, 8-conn - connectivity = nd.generate_binary_structure(rank, rank) - # labels = matrix with value = (initial) island number - sub_labels, count = nd.label(act_pixels, connectivity) - # slices has limits of bounding box of each such island - slices = nd.find_objects(sub_labels) - if len(slices) == 0: - break - size = [] - for idx, s in enumerate(slices): - idx += 1 # nd.labels indices are counted from 1 - size.append((sub_labels[s] == idx).sum()*2.0) - # Check whether we have reduced the size of smallest island to less - # than maxsize; if not, continue with higher threshhold - if min(size) < maxsize*img.pixel_beamarea: - break - gaul = []; fgaul = [] - n_subisl = len(slices) - if opts.verbose_fitting and n_subisl > 1: - print 'SEPARATED ISLAND INTO ',n_subisl,' PEAKS FOR ISLAND ',isl.island_id - for i_sub_isl in range(n_subisl): - islcp = isl.copy(img) - islcp.mask_active = N.where(sub_labels == i_sub_isl+1, False, True) - islcp.mask_noisy = N.where(sub_labels == i_sub_isl+1, False, True) - sgaul, sfgaul = self.fit_island(islcp, opts, img) - gaul = gaul + sgaul; fgaul = fgaul + sfgaul -# if bar.started: bar.spin() - - # Now fit residuals - ffimg_tot = N.zeros(isl.shape) - if len(gaul) > 0: - gaul_obj_list = [Gaussian(img, par, isl.island_id, gidx) for (gidx, par) in enumerate(gaul)] - for g in gaul_obj_list: - g.centre_pix[0] -= isl.origin[0] - g.centre_pix[1] -= isl.origin[1] - C1, C2 = g.centre_pix - shape = isl.shape - b = find_bbox(thresh*isl.rms, g) - bbox = N.s_[max(0, int(C1-b)):min(shape[0], int(C1+b+1)), - max(0, int(C2-b)):min(shape[1], int(C2+b+1))] - x_ax, y_ax = N.mgrid[bbox] - ffimg = func.gaussian_fcn(g, x_ax, y_ax) - ffimg_tot[bbox] += ffimg - if N.max(isl.image-ffimg_tot-isl.islmean-isl.mean)/thresh_pix >= rms: - sgaul, sfgaul = self.fit_island(isl, opts, img, ffimg=ffimg_tot) - gaul = gaul + sgaul; fgaul = fgaul + sfgaul - - return gaul, fgaul def fit_island_iteratively(self, img, isl, iter_ngmax=5, opts=None): """Fits an island iteratively. @@ -639,7 +592,6 @@ class Op_gausfit(Op): verbose: whether to print fitting progress information """ from _cbdsm import lmder_fit, dn2g_fit, dnsg_fit -# global bar fit = lmder_fit beam = list(beam) @@ -658,7 +610,6 @@ class Op_gausfit(Op): ### iteratively add gaussians while there are high peaks ### in the image and fitting converges while fitok: -# if bar.started: bar.spin() peak, coords = fcn.find_peak() if peak < thr: ### no good peaks left break @@ -815,7 +766,6 @@ class Op_gausfit(Op): elif mask[tuple(pt)]: flag += 256 break - return flag def fixup_gaussian(self, isl, gaussian): diff --git a/CEP/PyBDSM/src/python/image.py b/CEP/PyBDSM/src/python/image.py index 88da33456d3..48d4cb48bf4 100644 --- a/CEP/PyBDSM/src/python/image.py +++ b/CEP/PyBDSM/src/python/image.py @@ -41,6 +41,9 @@ class Image(object): basedir = String('DUMMY', doc="Base directory for output files") completed_Ops = List(String(), doc="List of completed operations") _is_interactive_shell = Bool(False, doc="PyBDSM is being used in the interactive shell") + waveletimage = Bool(False, doc="Image is a wavelet transform image") + _pi = Bool(False, doc="Image is a polarized intensity image") + def __init__(self, opts): diff --git a/CEP/PyBDSM/src/python/interface.py b/CEP/PyBDSM/src/python/interface.py index 520b6945867..5bbd5763648 100644 --- a/CEP/PyBDSM/src/python/interface.py +++ b/CEP/PyBDSM/src/python/interface.py @@ -24,6 +24,7 @@ def process(img, **kwargs): # First, reset img to initial state (in case img is being reprocessed) if hasattr(img, 'use_io'): del img.use_io if hasattr(img, 'sources'): del img.sources + if hasattr(img, 'dsources'): del img.dsources if hasattr(img, 'gaussians'): del img.gaussians if hasattr(img, 'atrous_gaussians'): del img.atrous_gaussians if hasattr(img, 'islands'): del img.islands @@ -545,9 +546,11 @@ def export_image(img, outfile=None, img_format='fits', 'gaus_model' - Gaussian model image 'shap_resid' - Shapelet model residual image 'shap_model' - Shapelet model image - 'psf_major' - PSF major axis FWHM image - 'psf_minor' - PSF minor axis FWHM image - 'psf_pa' - PSF position angle image + 'psf_major' - PSF major axis FWHM image (FWHM in arcsec) + 'psf_minor' - PSF minor axis FWHM image (FWHM in arcsec) + 'psf_pa' - PSF position angle image (degrees east of north) + 'psf_ratio' - PSF peak-to-total flux ratio (in units of 1/beam) + 'psf_ratio_aper' - PSF peak-to-aperture flux ratio (in units of 1/beam) """ import os import functions as func @@ -625,6 +628,14 @@ def export_image(img, outfile=None, img_format='fits', func.write_image_to_file(use_io, filename, img.psf_vary_pa, img, bdir, clobber=clobber) + elif img_type == 'psf_ratio': + func.write_image_to_file(use_io, filename, + img.psf_vary_ratio, img, bdir, + clobber=clobber) + elif img_type == 'psf_ratio_aper': + func.write_image_to_file(use_io, filename, + img.psf_vary_ratio_aper, img, bdir, + clobber=clobber) elif img_type == 'gaus_resid': im = img.resid_gaus func.write_image_to_file(use_io, filename, @@ -666,7 +677,8 @@ def export_image(img, outfile=None, img_format='fits', def write_catalog(img, outfile=None, format='bbs', srcroot=None, catalog_type='gaul', - bbs_patches=None, incl_chan=True, clobber=False): + bbs_patches=None, incl_chan=False, incl_empty=False, clobber=False, + force_output=False): """Write the Gaussian, source, or shapelet list to a file. Returns True if successful, False if not. @@ -693,9 +705,11 @@ def write_catalog(img, outfile=None, format='bbs', srcroot=None, catalog_type='g patch "source" - sources are grouped by source into patches incl_chan - Include fluxes for each channel? + incl_empty - Include islands without any valid Gaussians (source list only)? sort_by - Property to sort output list by: "flux" - sort by total integrated flux, largest first "indx" - sort by Gaussian and island or source index, smallest first + force_output - Force the creation of a catalog, even if it is empty clobber - Overwrite existing file? """ import output @@ -728,15 +742,17 @@ def write_catalog(img, outfile=None, format='bbs', srcroot=None, catalog_type='g print '\033[91mERROR\033[0m: catalog_type must be "gaul", '\ '"srl", or "shap"' return False - if img.ngaus == 0: - print 'No Gaussians were fit to image. Output file not written.' - return False + if (len(img.sources) == 0 and not incl_empty) or (len(img.sources) == 0 and len(img.dsources) == 0 and incl_empty): + if not force_output: + print 'No sources were found in the image. Output file not written.' + return False if filename == '': filename = None # Now go format by format and call appropriate function if filename == 'SAMP': import tempfile import functions as func + import os if not hasattr(img,'samp_client'): s, private_key = func.start_samp_proxy() img.samp_client = s @@ -745,14 +761,19 @@ def write_catalog(img, outfile=None, format='bbs', srcroot=None, catalog_type='g # Broadcast fits table to SAMP Hub tfile = tempfile.NamedTemporaryFile(delete=False) filename = output.write_fits_list(img, filename=tfile.name, - incl_chan=incl_chan, - clobber=clobber, objtype=catalog_type) - func.send_fits_table(img.samp_client, img.samp_key, 'PyBDSM table', tfile.name) + incl_chan=incl_chan, incl_empty=incl_empty, + clobber=True, objtype=catalog_type) + table_name = 'PyBDSM '+ catalog_type + ' table' + if catalog_type == 'srl': + img.samp_srl_table_url = 'file://' + os.path.abspath(tfile.name) + if catalog_type == 'gaul': + img.samp_gaul_table_url = 'file://' + os.path.abspath(tfile.name) + func.send_fits_table(img.samp_client, img.samp_key, table_name, tfile.name) print '--> Table sent to SMAP hub' return True if format == 'fits': filename = output.write_fits_list(img, filename=filename, - incl_chan=incl_chan, + incl_chan=incl_chan, incl_empty=incl_empty, clobber=clobber, objtype=catalog_type) if filename == None: print '\033[91mERROR\033[0m: File exists and clobber = False.' @@ -762,7 +783,7 @@ def write_catalog(img, outfile=None, format='bbs', srcroot=None, catalog_type='g return True if format == 'ascii': filename = output.write_ascii_list(img, filename=filename, - incl_chan=incl_chan, + incl_chan=incl_chan, incl_empty=incl_empty, sort_by='index', clobber=clobber, objtype=catalog_type) if filename == None: diff --git a/CEP/PyBDSM/src/python/make_residimage.py b/CEP/PyBDSM/src/python/make_residimage.py index 903657698e7..93a32683869 100644 --- a/CEP/PyBDSM/src/python/make_residimage.py +++ b/CEP/PyBDSM/src/python/make_residimage.py @@ -85,18 +85,7 @@ class Op_make_residimage(Op): ### residual rms and mean per island for isl in img.islands: resid = img.resid_gaus[isl.bbox] - n, m = resid.shape - - ind = N.where(~isl.mask_active) - resid = resid[ind] - isl.gresid_rms = N.std(resid) - isl.gresid_mean = N.mean(resid) - for src in isl.sources: - src.gresid_rms = N.std(resid) - src.gresid_mean = N.mean(resid) - for g in src.gaussians: - g.gresid_rms = N.std(resid) - g.gresid_mean = N.mean(resid) + self.calc_resid_mean_rms(isl, resid, type='gaus') # Calculate some statistics for the Gaussian residual image non_masked = N.where(~N.isnan(img.ch0)) @@ -104,11 +93,12 @@ class Op_make_residimage(Op): std_dev = N.std(img.resid_gaus[non_masked], axis=None) skew = stats.skew(img.resid_gaus[non_masked], axis=None) kurt = stats.kurtosis(img.resid_gaus[non_masked], axis=None) - mylog.info("Statistics of the Gaussian residual image:") - mylog.info(" mean: %.3e (Jy/beam)" % mean) - mylog.info(" std. dev: %.3e (Jy/beam)" % std_dev) - mylog.info(" skew: %.3f" % skew) - mylog.info(" kurtosis: %.3f" % kurt) + stat_msg = "Statistics of the Gaussian residual image:\n" + stat_msg += " mean: %.3e (Jy/beam)\n" % mean + stat_msg += " std. dev: %.3e (Jy/beam)\n" % std_dev + stat_msg += " skew: %.3f\n" % skew + stat_msg += " kurtosis: %.3f" % kurt + mylog.info(stat_msg) # Now residual image for shapelets if img.opts.shapelet_do: @@ -144,17 +134,7 @@ class Op_make_residimage(Op): ### shapelet residual rms and mean per island for isl in img.islands: resid = img.resid_shap[isl.bbox] - n, m = resid.shape - ind = N.where(~isl.mask_active) - resid = resid[ind] - isl.sresid_rms = N.std(resid) - isl.sresid_mean = N.mean(resid) - for src in isl.sources: - src.sresid_rms = N.std(resid) - src.sresid_mean = N.mean(resid) - for g in src.gaussians: - g.sresid_rms = N.std(resid) - g.sresid_mean = N.mean(resid) + self.calc_resid_mean_rms(isl, resid, type='shap') # Calculate some statistics for the Shapelet residual image non_masked = N.where(~N.isnan(img.ch0)) @@ -192,4 +172,44 @@ class Op_make_residimage(Op): return ceil(S*1.5) return ceil(S*sqrt(-2*log(thresh/A))) + def calc_resid_mean_rms(self, isl, resid, type): + """Inserts mean and rms of residual image into isl, src, and gaussians + + type - specifies 'gaus' or 'shap' + """ + if len(isl.gaul) == 0: + resid = N.zeros(isl.shape) + + ind = N.where(~isl.mask_active) + resid = resid[ind] + if type == 'gaus': + isl.gresid_rms = N.std(resid) + isl.gresid_mean = N.mean(resid) + else: + isl.sresid_rms = N.std(resid) + isl.sresid_mean = N.mean(resid) + if hasattr(isl, 'sources'): + for src in isl.sources: + if type == 'gaus': + src.gresid_rms = N.std(resid) + src.gresid_mean = N.mean(resid) + else: + src.sresid_rms = N.std(resid) + src.sresid_mean = N.mean(resid) + for g in src.gaussians: + if type == 'gaus': + g.gresid_rms = N.std(resid) + g.gresid_mean = N.mean(resid) + else: + g.sresid_rms = N.std(resid) + g.sresid_mean = N.mean(resid) + if hasattr(isl, 'dsources'): + for dsrc in isl.dsources: # Handle dummy sources (if any) + if type == 'gaus': + dsrc.gresid_rms = N.std(resid) + dsrc.gresid_mean = N.mean(resid) + else: + dsrc.sresid_rms = N.std(resid) + dsrc.sresid_mean = N.mean(resid) + diff --git a/CEP/PyBDSM/src/python/multi_proc.py b/CEP/PyBDSM/src/python/multi_proc.py index a353b1f8455..27364e2ef7d 100644 --- a/CEP/PyBDSM/src/python/multi_proc.py +++ b/CEP/PyBDSM/src/python/multi_proc.py @@ -58,9 +58,11 @@ def worker(f, ii, chunk, out_q, err_q, lock, bar, bar_state): if bar_state['started']: bar.pos = bar_state['pos'] bar.spin_pos = bar_state['spin_pos'] - bar.increment() - bar_state['pos'] += 1 - bar_state['spin_pos'] += 1 + bar.started = bar_state['started'] + increment = bar.increment() + bar_state['started'] = bar.started + bar_state['pos'] += increment + bar_state['spin_pos'] += increment if bar_state['spin_pos'] >= 4: bar_state['spin_pos'] = 0 @@ -105,11 +107,14 @@ def run_tasks(procs, err_q, out_q, num): results=[None]*num; for i in range(num): idx, result = out_q.get() - results[idx] = numpy.array(result, dtype=object) + results[idx] = result # Remove extra dimension added by array_split - return numpy.concatenate(results).tolist() + result_list = [] + for result in results: + result_list += result + return result_list def parallel_map(function, sequence, numcores=None, bar=None, weights=None): @@ -139,7 +144,11 @@ def parallel_map(function, sequence, numcores=None, bar=None, weights=None): size = len(sequence) if not _multi or size == 1: - return map(function, sequence) + results = map(function, sequence) + if bar != None: + bar.stop() + return results + # Set default number of cores to use. Leave one core free for pyplot. if numcores is None: @@ -183,12 +192,16 @@ def parallel_map(function, sequence, numcores=None, bar=None, weights=None): for indx, weight in enumerate(weights): temp_sum += weight if temp_sum > weight_per_core: - cut_values.append(indx) + cut_values.append(indx+1) temp_sum = weight if len(cut_values) > numcores - 1: cut_values = cut_values[0:numcores-1] sequence = numpy.array_split(sequence, cut_values) + # Make sure there are no empty chunks at the end of the sequence + while len(sequence[-1]) == 0: + sequence.pop() + procs = [multiprocessing.Process(target=worker, args=(function, ii, chunk, out_q, err_q, lock, bar, bar_state)) for ii, chunk in enumerate(sequence)] @@ -197,10 +210,7 @@ def parallel_map(function, sequence, numcores=None, bar=None, weights=None): results = run_tasks(procs, err_q, out_q, len(sequence)) if bar != None: if bar.started: - bar.pos = bar_state['pos'] - bar.spin_pos = bar_state['spin_pos'] - while bar.pos < bar.max: - bar.increment() + bar.stop() return results except KeyboardInterrupt: diff --git a/CEP/PyBDSM/src/python/mylogger.py b/CEP/PyBDSM/src/python/mylogger.py index 94e9530855d..7196c1fdf4d 100644 --- a/CEP/PyBDSM/src/python/mylogger.py +++ b/CEP/PyBDSM/src/python/mylogger.py @@ -1,5 +1,5 @@ """ WARNING, ERROR, and CRITICAL are always output to screen and to log file. -INFO and USERINFO always go to the log file. DEBUG goes to log file if debug is +INFO and USERINFO always go to the log file. DEBUG goes to log file if debug is True. USERINFO goes to screen only if quiet is False. Use as follows: @@ -26,23 +26,23 @@ def init_logger(logfilename, quiet=False, debug=False): # before in this session but the quiet or debug options have changed while len(logger.handlers) > 0: logger.removeHandler(logger.handlers[0]) - + # File handlers fh = ColorStripperHandler(logfilename) if debug: # For log file and debug on, print name and levelname fh.setLevel(logging.DEBUG) - fmt1 = logging.Formatter('%(asctime)s %(name)-20s:: %(levelname)-8s: '\ + fmt1 = MultiLineFormatter('%(asctime)s %(name)-20s:: %(levelname)-8s: '\ '%(message)s', datefmt='%a %d-%m-%Y %H:%M:%S') else: # For log file and debug off, don't print name and levelname as # they have no meaning to the user. fh.setLevel(logging.INFO) - fmt1 = logging.Formatter('%(asctime)s:: %(message)s', + fmt1 = MultiLineFormatter('%(asctime)s:: %(levelname)-8s: %(message)s', datefmt='%a %d-%m-%Y %H:%M:%S') fh.setFormatter(fmt1) - logger.addHandler(fh) + logger.addHandler(fh) # Console handler for warning, error, and critical: format includes levelname # ANSI colors are used @@ -65,14 +65,21 @@ def init_logger(logfilename, quiet=False, debug=False): chi.setLevel(logging.USERINFO) fmt3 = logging.Formatter('%(message)s') chi.setFormatter(fmt3) - logger.addHandler(chi) + logger.addHandler(chi) class InfoFilter(logging.Filter): # Lets only USERINFO through def filter(self, rec): return rec.levelno == logging.USERINFO - - + +class MultiLineFormatter(logging.Formatter): + def format(self, record): + str = logging.Formatter.format(self, record) + header, footer = str.split(record.message) + nocolor_header = strip_color(header) + str = str.replace('\n', '\n' + ' '*len(nocolor_header)) + return str + def userinfo(mylog, desc_str, val_str=''): """Writes a nicely formatted string to the log file and console @@ -101,25 +108,30 @@ def userinfo(mylog, desc_str, val_str=''): desc_str += '.' else: while len(desc_str) < 41: - desc_str += ' ' + desc_str += ' ' mylog.log(logging.USERINFO, desc_str+sep+val_str) class ColorStripperHandler(logging.FileHandler): def emit(self, record): - """Strips ANSI color codes from file stream - - The color codes are hard-coded to those used above - in userinfo() and in WARNING, ERROR, and CRITICAL. - """ + """Strips ANSI color codes from file stream""" myrecord = copy.copy(record) - nocolor_msg = '' - a = myrecord.msg.split('\033[1;34m') - for b in a: - c = b.split('\033[0m') - for d in c: - e = d.split('\033[31;1m') - for f in e: - nocolor_msg += f + nocolor_msg = strip_color(myrecord.msg) myrecord.msg = nocolor_msg - logging.FileHandler.emit(self, myrecord) \ No newline at end of file + logging.FileHandler.emit(self, myrecord) + +def strip_color(msg): + """Strips specific ANSI color codes from an input string + + The color codes are hard-coded to those used above + in userinfo() and in WARNING, ERROR, and CRITICAL. + """ + nocolor_msg = '' + a = msg.split('\033[1;34m') + for b in a: + c = b.split('\033[0m') + for d in c: + e = d.split('\033[31;1m') + for f in e: + nocolor_msg += f + return nocolor_msg diff --git a/CEP/PyBDSM/src/python/opts.py b/CEP/PyBDSM/src/python/opts.py index 3d4e6ec45e1..f201db78607 100644 --- a/CEP/PyBDSM/src/python/opts.py +++ b/CEP/PyBDSM/src/python/opts.py @@ -620,7 +620,7 @@ class Opts(object): "flag_maxsnr times the image value at the peak "\ "is flagged. The flag value is increased by 2.", group = "flagging_opts") - flag_maxsize_isl = Float(1.0, + flag_maxsize_isl = Float(2.0, doc = "Flag Gaussian if x, y bounding box "\ "around sigma-contour is factor times island bbox\n"\ "Any fitted Gaussian whose maximum x-dimension is "\ @@ -879,6 +879,11 @@ class Opts(object): "considered 'unresolved' and are used further to "\ "estimate the PSFs.", group = "psf_vary_do") + psf_smooth = Option(None, Float(), + doc = "Size of Gaussian to use for smoothing of "\ + "interpolated images in arcsec. None => no "\ + "smoothing", + group = "psf_vary_do") psf_snrcut = Float(10.0, doc = "Minimum SNR for statistics\n"\ "Only Gaussians with SNR greater than this are "\ @@ -1039,9 +1044,17 @@ class Opts(object): group = "hidden") outfile = Option(None, String(), doc = "Output file name. None => file is named "\ - "automatically; 'SAMP' => send to SAMP Hub "\ + "automatically; 'SAMP' => send to SAMP hub "\ "(e.g., to TOPCAT, ds9, or Aladin)", group = 'hidden') + broadcast = Bool(False, + doc = "Broadcast Gaussian and source IDs and "\ + "coordinates to SAMP hub when a Gaussian is "\ + "clicked?\nNote that for the "\ + "IDs to be useful, a catalog must have been sent "\ + "to the SAMP hub previously using the write_catalog "\ + "task (with outfile = 'SAMP').", + group = 'hidden') clobber = Bool(False, doc = "Overwrite existing file?", group = 'hidden') @@ -1072,6 +1085,21 @@ class Opts(object): doc = "Include flux densities from each channel "\ "(if any)?", group = 'hidden') + incl_empty = Bool(False, + doc = "Include islands without any valid Gaussians "\ + "(source list only)?\n"\ + "If True, islands for which Gaussian fitting "\ + "failed will be included in the output catalog. "\ + "In these cases, the source IDs "\ + "are negative.", + group = 'hidden') + force_output = Bool(False, + doc = "Force creation of output file, even if the "\ + "catalog is empty?\n"\ + "If True, the output catalog will be created, "\ + "even if there are no sources. In this case, "\ + "the catalog will have a header but no entries.", + group = 'hidden') catalog_type = Enum('gaul', 'shap', 'srl', doc = "Type of catalog to write: 'gaul' - Gaussian "\ "list, 'srl' - source list (formed "\ @@ -1085,7 +1113,7 @@ class Opts(object): group = 'hidden') img_type = Enum('gaus_resid', 'shap_resid', 'rms', 'mean', 'gaus_model', 'shap_model', 'ch0', 'pi', 'psf_major', 'psf_minor', - 'psf_pa', + 'psf_pa', 'psf_ratio', 'psf_ratio_aper', doc = "Type of image to export: 'gaus_resid', "\ "'shap_resid', 'rms', 'mean', 'gaus_model', "\ "'shap_model', 'ch0', 'pi', 'psf_major', "\ @@ -1099,9 +1127,11 @@ class Opts(object): "'gaus_model' - Gaussian model image\n"\ "'shap_resid' - Shapelet model residual image\n"\ "'shap_model' - Shapelet model image\n"\ - "'psf_major' - PSF major axis FWHM (in pixels) image\n"\ - "'psf_minor' - PSF minor axis FWHM (in pixels) image\n"\ - "'psf_pa' - PSF position angle (E from N in degrees) image\n", + "'psf_major' - PSF major axis FWHM image (FWHM in arcsec)\n"\ + "'psf_minor' - PSF minor axis FWHM image (FWHM in arcsec)\n"\ + "'psf_pa' - PSF position angle image (degrees east of north)\n"\ + "'psf_ratio' - PSF peak-to-total flux ratio (in units of 1/beam)\n"\ + "'psf_ratio_aper' - PSF peak-to-aperture flux ratio (in units of 1/beam)", group = 'hidden') ch0_image = Bool(True, doc = "Show the ch0 image. This is the image used for "\ @@ -1146,11 +1176,11 @@ class Opts(object): group = "hidden") psf_major = Bool(False, doc = "Show the PSF major axis variation (values are "\ - "FWHM in pixels)", + "FWHM in arcsec)", group = "hidden") psf_minor = Bool(False, doc = "Show the FWHM of PSF minor axis variation (values are "\ - "FWHM in pixels)", + "FWHM in arcsec)", group = "hidden") psf_pa = Bool(False, doc = "Show the PSF position angle variation (values are "\ @@ -1200,7 +1230,7 @@ class Opts(object): # and then try to parse it if hasattr(self, k): if isinstance(self.__getattribute__(k), bool): - if isinstance(v, bool): + if isinstance(v, bool) or v == None: # just enter the bool into the parameter pass elif isinstance(v, basestring): diff --git a/CEP/PyBDSM/src/python/output.py b/CEP/PyBDSM/src/python/output.py index ca29a577ef9..b7290c3c1ed 100644 --- a/CEP/PyBDSM/src/python/output.py +++ b/CEP/PyBDSM/src/python/output.py @@ -266,7 +266,7 @@ def write_lsm_gaul(img, filename=None, srcroot=None, patch=None, def write_ds9_list(img, filename=None, srcroot=None, deconvolve=False, - clobber=False, objtype='gaul'): + clobber=False, incl_empty=False, objtype='gaul'): """Writes Gaussian list to a ds9 region file""" import numpy as N from const import fwsig @@ -279,10 +279,18 @@ def write_ds9_list(img, filename=None, srcroot=None, deconvolve=False, elif objtype == 'srl': root = img.parentname outl = [img.sources] + if incl_empty: + # Append the dummy sources for islands without any unflagged Gaussians + outl[0] += img.dsources outn = [] for src in img.sources: outn.append(root + '_i' + str(src.island_id) + '_s' + str(src.source_id)) + if incl_empty: + # Append the dummy sources for islands without any unflagged Gaussians + for dsrc in img.dsources: + outn.append(root + '_i' + str(dsrc.island_id) + '_s' + + str(dsrc.source_id)) outn = [outn] outstr_list = make_ds9_str(img, outl, outn, deconvolve=deconvolve) if filename == None: @@ -298,7 +306,7 @@ def write_ds9_list(img, filename=None, srcroot=None, deconvolve=False, def write_ascii_list(img, filename=None, sort_by='indx', - incl_chan=False, clobber=False, objtype='gaul'): + incl_chan=False, incl_empty=False, clobber=False, objtype='gaul'): """Writes Gaussian list to an ASCII file""" import mylogger import os @@ -308,6 +316,9 @@ def write_ascii_list(img, filename=None, sort_by='indx', outl, outn, patl = list_and_sort_gaussians(img, patch=None, sort_by=sort_by) elif objtype == 'srl': outl = [img.sources] + if incl_empty: + # Append the dummy sources for islands without any unflagged Gaussians + outl[0] += img.dsources outstr_list = make_ascii_str(img, outl, objtype=objtype) if filename == None: if objtype == 'gaul': @@ -344,8 +355,8 @@ def write_casa_gaul(img, filename=None, clobber=False): return filename -def write_fits_list(img, filename=None, sort_by='indx', objtype='gaul', - incl_chan=False, clobber=False): +def write_fits_list(img, filename=None, sort_by='index', objtype='gaul', + incl_chan=False, incl_empty=False, clobber=False): """ Write as FITS binary table. """ import mylogger @@ -359,6 +370,9 @@ def write_fits_list(img, filename=None, sort_by='indx', objtype='gaul', outl, outn, patl = list_and_sort_gaussians(img, patch=None, sort_by=sort_by) elif objtype == 'srl': outl = [img.sources] + if incl_empty: + # Append the dummy sources for islands without any unflagged Gaussians + outl[0] += img.dsources elif objtype == 'shap': outl = [img.islands] @@ -374,19 +388,23 @@ def write_fits_list(img, filename=None, sort_by='indx', objtype='gaul', incl_aper = True else: incl_aper = False - cvals, cnames, cformats, cunits = make_output_columns(outl[0][0], fits=True, - objtype=objtype, - incl_spin=img.opts.spectralindex_do, - incl_chan=img.opts.incl_chan, - incl_pol=img.opts.polarisation_do, - incl_aper=incl_aper, - nmax=nmax, nchan=img.nchan) + if len(outl[0]) > 0: + cvals, cnames, cformats, cunits = make_output_columns(outl[0][0], fits=True, + objtype=objtype, + incl_spin=img.opts.spectralindex_do, + incl_chan=img.opts.incl_chan, + incl_pol=img.opts.polarisation_do, + incl_aper=incl_aper, + incl_empty=incl_empty, + nmax=nmax, nchan=img.nchan) out_list = make_fits_list(img, outl, objtype=objtype, nmax=nmax) col_list = [] for ind, col in enumerate(out_list): list1 = pyfits.Column(name=cnames[ind], format=cformats[ind], unit=cunits[ind], array=N.array(out_list[ind])) col_list.append(list1) + if len(col_list) == 0: + col_list = [pyfits.Column(name='Blank', format='1J')] tbhdu = pyfits.new_table(col_list) if objtype == 'gaul': tbhdu.header.add_comment('Gaussian list for '+img.filename) @@ -396,7 +414,7 @@ def write_fits_list(img, filename=None, sort_by='indx', objtype='gaul', tbhdu.header.add_comment('Shapelet list for '+img.filename) tbhdu.header.add_comment('Generated by PyBDSM version %s (LUS revision %s)' % (__version__, __revision__)) - freq = "%.5e" % img.cfreq + freq = "%.5e" % img.frequency tbhdu.header.add_comment('Reference frequency of the detection ("ch0") image: %s Hz' % freq) tbhdu.header.add_comment('Equinox : %s' % img.equinox) tbhdu.header.update('INIMAGE', img.filename, 'Filename of image') @@ -488,8 +506,15 @@ def make_bbs_str(img, glist, gnames, patchnames): import numpy as N outstr_list = [] - freq = "%.5e" % img.cfreq - if patchnames[0] == None: + freq = "%.5e" % img.frequency + + if len(patchnames) == 0: + # Handle empty list: just write default header + outstr_list.append("format = Name, Type, Ra, Dec, I, Q, U, V, "\ + "MajorAxis, MinorAxis, Orientation, "\ + "ReferenceFrequency='"+freq+"', "\ + "SpectralIndex='[]'\n\n") + elif patchnames[0] == None: outstr_list.append("format = Name, Type, Ra, Dec, I, Q, U, V, "\ "MajorAxis, MinorAxis, Orientation, "\ "ReferenceFrequency='"+freq+"', "\ @@ -507,51 +532,54 @@ def make_bbs_str(img, glist, gnames, patchnames): gaussians_in_patch = glist[pindx] names_in_patch = gnames[pindx] for gindx, g in enumerate(gaussians_in_patch): - src_name = names_in_patch[gindx] - ra, dec = g.centre_sky - if img.equinox == 1950: - ra, dec = B1950toJ2000([ra, dec]) - ra = ra2hhmmss(ra) - sra = str(ra[0]).zfill(2)+':'+str(ra[1]).zfill(2)+':'+str("%.3f" % (ra[2])).zfill(6) - dec = dec2ddmmss(dec) - decsign = ('-' if dec[3] < 0 else '+') - sdec = decsign+str(dec[0]).zfill(2)+'.'+str(dec[1]).zfill(2)+'.'+str("%.3f" % (dec[2])).zfill(6) - total = str("%.3e" % (g.total_flux)) - deconv = g.deconv_size_sky - if deconv[0] == 0.0 and deconv[1] == 0.0: - stype = 'POINT' - deconv[2] = 0.0 - else: - stype = 'GAUSSIAN' - deconv1 = str("%.5e" % (deconv[0]*3600.0)) - deconv2 = str("%.5e" % (deconv[1]*3600.0)) - deconv3 = str("%.5e" % (deconv[2])) - deconvstr = deconv1 + ', ' + deconv2 + ', ' + deconv3 - specin = '-0.8' - if hasattr(g, 'spec_indx'): - if g.spec_indx != None and N.isfinite(g.spec_indx): - specin = str("%.3e" % (g.spec_indx)) - sep = ', ' - if img.opts.polarisation_do: - Q_flux = str("%.3e" % (g.total_flux_Q)) - U_flux = str("%.3e" % (g.total_flux_U)) - V_flux = str("%.3e" % (g.total_flux_V)) - else: - Q_flux = '0.0' - U_flux = '0.0' - V_flux = '0.0' - if patch_name == None: - outstr_list.append(src_name + sep + stype + sep + sra + sep + - sdec + sep + total + sep + Q_flux + sep + - U_flux + sep + V_flux + sep + - deconvstr + sep + freq + sep + - '[' + specin + ']\n') + if g.gaus_num >= 0 or (g.gaus_num < 0 and img.opts.incl_empty): + src_name = names_in_patch[gindx] + ra, dec = g.centre_sky + if img.equinox == 1950: + ra, dec = B1950toJ2000([ra, dec]) + ra = ra2hhmmss(ra) + sra = str(ra[0]).zfill(2)+':'+str(ra[1]).zfill(2)+':'+str("%.3f" % (ra[2])).zfill(6) + dec = dec2ddmmss(dec) + decsign = ('-' if dec[3] < 0 else '+') + sdec = decsign+str(dec[0]).zfill(2)+'.'+str(dec[1]).zfill(2)+'.'+str("%.3f" % (dec[2])).zfill(6) + total = str("%.3e" % (g.total_flux)) + deconv = g.deconv_size_sky + if deconv[0] == 0.0 and deconv[1] == 0.0: + stype = 'POINT' + deconv[2] = 0.0 + else: + stype = 'GAUSSIAN' + deconv1 = str("%.5e" % (deconv[0]*3600.0)) + deconv2 = str("%.5e" % (deconv[1]*3600.0)) + deconv3 = str("%.5e" % (deconv[2])) + deconvstr = deconv1 + ', ' + deconv2 + ', ' + deconv3 + specin = '-0.8' + if hasattr(g, 'spec_indx'): + if g.spec_indx != None and N.isfinite(g.spec_indx): + specin = str("%.3e" % (g.spec_indx)) + sep = ', ' + if img.opts.polarisation_do: + Q_flux = str("%.3e" % (g.total_flux_Q)) + U_flux = str("%.3e" % (g.total_flux_U)) + V_flux = str("%.3e" % (g.total_flux_V)) + else: + Q_flux = '0.0' + U_flux = '0.0' + V_flux = '0.0' + if patch_name == None: + outstr_list.append(src_name + sep + stype + sep + sra + sep + + sdec + sep + total + sep + Q_flux + sep + + U_flux + sep + V_flux + sep + + deconvstr + sep + freq + sep + + '[' + specin + ']\n') + else: + outstr_list.append(src_name + sep + stype + sep + patch_name + + sep + sra + sep + sdec + sep + total + sep + + Q_flux + sep + U_flux + sep + V_flux + sep + + deconvstr + sep + freq + sep + + '[' + specin + ']\n') else: - outstr_list.append(src_name + sep + stype + sep + patch_name + - sep + sra + sep + sdec + sep + total + sep + - Q_flux + sep + U_flux + sep + V_flux + sep + - deconvstr + sep + freq + sep + - '[' + specin + ']\n') + outstr_list.pop() return outstr_list def make_lsm_str(img, glist, gnames): @@ -562,56 +590,57 @@ def make_lsm_str(img, glist, gnames): import numpy as N outstr_list = [] - freq = "%.5e" % img.cfreq + freq = "%.5e" % img.frequency outstr_list.append("## LSM file\n### Name | RA (hr,min,sec) | DEC (deg,min,sec) | I | Q | U | V | SI | RM | eX | eY | eP | freq0\n\n") for gindx, g in enumerate(glist[0]): - src_name = gnames[0][gindx] - ra, dec = g.centre_sky - if img.equinox == 1950: - ra, dec = B1950toJ2000([ra, dec]) - ra = ra2hhmmss(ra) - sra = str(ra[0]).zfill(2)+' '+str(ra[1]).zfill(2)+' '+str("%.3f" % (ra[2])).zfill(6) - dec = dec2ddmmss(dec) - decsign = ('-' if dec[3] < 0 else '+') - sdec = decsign+str(dec[0]).zfill(2)+' '+str(dec[1]).zfill(2)+' '+str("%.3f" % (dec[2])).zfill(6) - size = g.size_sky # degrees, in terms of FWHM - src_area = 1.1331*size[0]*size[1]*fwsig*fwsig*3600.0**2 # area of source in arcsec**2 - peak = str("%.3e" % (g.total_flux/src_area)) # peak flux in Jy/arcsec**2 - deconv = g.deconv_size_sky - if deconv[0] == 0.0 and deconv[1] == 0.0: - sname = 'P' + src_name - deconv[2] = 0.0 - else: - sname = 'G' + src_name - deconv1 = str("%.5e" % (deconv[0]*N.pi/180.0/2.0)) - deconv2 = str("%.5e" % (deconv[1]*N.pi/180.0/2.0)) - deconv3 = str("%.5e" % (deconv[2]*N.pi/180.0/2.0)) - deconvstr = deconv1 + ' ' + deconv2 + ' ' + deconv3 - specin = '-0.8' - if hasattr(g, 'spec_indx'): - if g.spec_indx != None and N.isfinite(g.spec_indx): - specin = str("%.3e" % (g.spec_indx)) - sep = ' ' - if img.opts.polarisation_do: - Q_flux = str("%.3e" % (g.total_flux_Q/src_area)) - U_flux = str("%.3e" % (g.total_flux_U/src_area)) - V_flux = str("%.3e" % (g.total_flux_V/src_area)) - else: - Q_flux = '0.0' - U_flux = '0.0' - V_flux = '0.0' - outstr_list.append(sname + sep + sra + sep + - sdec + sep + peak + sep + Q_flux + sep + - U_flux + sep + V_flux + sep + - specin + sep + '0' + sep + deconvstr + sep + - freq + sep + '\n') + if g.gaus_num >= 0 or (g.gaus_num < 0 and img.opts.incl_empty): + src_name = gnames[0][gindx] + ra, dec = g.centre_sky + if img.equinox == 1950: + ra, dec = B1950toJ2000([ra, dec]) + ra = ra2hhmmss(ra) + sra = str(ra[0]).zfill(2)+' '+str(ra[1]).zfill(2)+' '+str("%.3f" % (ra[2])).zfill(6) + dec = dec2ddmmss(dec) + decsign = ('-' if dec[3] < 0 else '+') + sdec = decsign+str(dec[0]).zfill(2)+' '+str(dec[1]).zfill(2)+' '+str("%.3f" % (dec[2])).zfill(6) + size = g.size_sky # degrees, in terms of FWHM + src_area = 1.1331*size[0]*size[1]*fwsig*fwsig*3600.0**2 # area of source in arcsec**2 + peak = str("%.3e" % (g.total_flux/src_area)) # peak flux in Jy/arcsec**2 + deconv = g.deconv_size_sky + if deconv[0] == 0.0 and deconv[1] == 0.0: + sname = 'P' + src_name + deconv[2] = 0.0 + else: + sname = 'G' + src_name + deconv1 = str("%.5e" % (deconv[0]*N.pi/180.0/2.0)) + deconv2 = str("%.5e" % (deconv[1]*N.pi/180.0/2.0)) + deconv3 = str("%.5e" % (deconv[2]*N.pi/180.0/2.0)) + deconvstr = deconv1 + ' ' + deconv2 + ' ' + deconv3 + specin = '-0.8' + if hasattr(g, 'spec_indx'): + if g.spec_indx != None and N.isfinite(g.spec_indx): + specin = str("%.3e" % (g.spec_indx)) + sep = ' ' + if img.opts.polarisation_do: + Q_flux = str("%.3e" % (g.total_flux_Q/src_area)) + U_flux = str("%.3e" % (g.total_flux_U/src_area)) + V_flux = str("%.3e" % (g.total_flux_V/src_area)) + else: + Q_flux = '0.0' + U_flux = '0.0' + V_flux = '0.0' + outstr_list.append(sname + sep + sra + sep + + sdec + sep + peak + sep + Q_flux + sep + + U_flux + sep + V_flux + sep + + specin + sep + '0' + sep + deconvstr + sep + + freq + sep + '\n') return outstr_list def make_ds9_str(img, glist, gnames, deconvolve=False): """Makes a list of string entries for a ds9 region file.""" outstr_list = [] - freq = "%.5e" % img.cfreq + freq = "%.5e" % img.frequency if img.equinox == None: equinox = 'fk5' else: @@ -629,29 +658,30 @@ def make_ds9_str(img, glist, gnames, deconvolve=False): 'move=1 delete=1 include=1 fixed=0 source\n'+equinox+'\n') for gindx, g in enumerate(glist[0]): - src_name = gnames[0][gindx] - try: - ra, dec = g.centre_sky - except AttributeError: - ra, dec = g.posn_sky_centroid - if deconvolve: - deconv = g.deconv_size_sky - else: - deconv = g.size_sky - if deconv[0] == 0.0 and deconv[1] == 0.0: - stype = 'POINT' - deconv[2] = 0.0 - region = 'point(' + str(ra) + ',' + str(dec) + \ - ') # point=cross width=2 text={' + src_name + '}\n' - else: - # ds9 can't handle 1-D Gaussians, so make sure they are 2-D - if deconv[0] < 1.0/3600.0: deconv[0] = 1.0/3600.0 - if deconv[1] < 1.0/3600.0: deconv[1] = 1.0/3600.0 - stype = 'GAUSSIAN' - region = 'ellipse(' + str(ra) + ',' + str(dec) + ',' + \ - str(deconv[0]*3600.0) + '",' + str(deconv[1]*3600.0) + \ - '",' + str(deconv[2]+90.0) + ') # text={' + src_name + '}\n' - outstr_list.append(region) + if g.gaus_num >= 0 or (g.gaus_num < 0 and img.opts.incl_empty): + src_name = gnames[0][gindx] + try: + ra, dec = g.centre_sky + except AttributeError: + ra, dec = g.posn_sky_centroid + if deconvolve: + deconv = g.deconv_size_sky + else: + deconv = g.size_sky + if deconv[0] == 0.0 and deconv[1] == 0.0: + stype = 'POINT' + deconv[2] = 0.0 + region = 'point(' + str(ra) + ',' + str(dec) + \ + ') # point=cross width=2 text={' + src_name + '}\n' + else: + # ds9 can't handle 1-D Gaussians, so make sure they are 2-D + if deconv[0] < 1.0/3600.0: deconv[0] = 1.0/3600.0 + if deconv[1] < 1.0/3600.0: deconv[1] = 1.0/3600.0 + stype = 'GAUSSIAN' + region = 'ellipse(' + str(ra) + ',' + str(dec) + ',' + \ + str(deconv[0]*3600.0) + '",' + str(deconv[1]*3600.0) + \ + '",' + str(deconv[2]+90.0) + ') # text={' + src_name + '}\n' + outstr_list.append(region) return outstr_list @@ -659,7 +689,7 @@ def make_ascii_str(img, glist, objtype='gaul'): """Makes a list of string entries for an ascii region file.""" from _version import __version__, __revision__ outstr_list = [] - freq = "%.5e" % img.cfreq + freq = "%.5e" % img.frequency if objtype == 'gaul': outstr_list.append('# Gaussian list for '+img.filename+'\n') @@ -682,11 +712,13 @@ def make_ascii_str(img, glist, objtype='gaul'): incl_chan=img.opts.incl_chan, incl_pol=img.opts.polarisation_do, incl_aper=incl_aper, + incl_empty = img.opts.incl_empty, nchan=img.nchan) - cformats[-1] += "\n" - if i == 0: - outstr_list.append("# " + " ".join(cnames) + "\n") - outstr_list.append(" ".join(cformats) % tuple(cvals)) + if cvals != None: + cformats[-1] += "\n" + if i == 0: + outstr_list.append("# " + " ".join(cnames) + "\n") + outstr_list.append(" ".join(cformats) % tuple(cvals)) return outstr_list @@ -704,8 +736,10 @@ def make_fits_list(img, glist, objtype='gaul', nmax=30): incl_chan=img.opts.incl_chan, incl_pol=img.opts.polarisation_do, incl_aper=incl_aper, + incl_empty=img.opts.incl_empty, nmax=nmax, nchan=img.nchan) - out_list.append(cvals) + if cvals != None: + out_list.append(cvals) out_list = func.trans_gaul(out_list) return out_list @@ -909,7 +943,7 @@ def list_and_sort_gaussians(img, patch=None, root=None, def make_output_columns(obj, fits=False, objtype='gaul', incl_spin=False, incl_chan=False, incl_pol=False, incl_aper=False, - nmax=30, nchan=1): + incl_empty=False, nmax=30, nchan=1): """Returns a list of column names, formats, and units for Gaussian, Source, or Shapelet""" import numpy as N @@ -950,7 +984,7 @@ def make_output_columns(obj, fits=False, objtype='gaul', incl_spin=False, 'shapelet_beta', 'shapelet_nmax', 'shapelet_cf'] else: print 'Object type unrecongnized.' - return None + return (None, None, None, None) if incl_spin: names += ['spec_indx', 'e_spec_indx'] if incl_chan: @@ -1040,4 +1074,11 @@ def make_output_columns(obj, fits=False, objtype='gaul', incl_spin=False, cformats.append('%10f') if isinstance(v, str): cformats.append('%4s') + + if objtype == 'gaul': + if obj.gaus_num < 0 and not incl_empty: + return (None, cnames, cformats, cunits) + if objtype == 'srl': + if obj.source_id < 0 and not incl_empty: + return (None, cnames, cformats, cunits) return (cvals, cnames, cformats, cunits) diff --git a/CEP/PyBDSM/src/python/plotresults.py b/CEP/PyBDSM/src/python/plotresults.py index 3e6401ae05b..f2956b98f75 100644 --- a/CEP/PyBDSM/src/python/plotresults.py +++ b/CEP/PyBDSM/src/python/plotresults.py @@ -25,17 +25,35 @@ def plotresults(img, ch0_image=True, rms_image=True, mean_image=True, ch0_islands=True, gresid_image=True, sresid_image=False, gmodel_image=True, smodel_image=False, pyramid_srcs=False, source_seds=False, ch0_flagged=False, pi_image=False, - psf_major=False, psf_minor=False, psf_pa=False): + psf_major=False, psf_minor=False, psf_pa=False, broadcast=False): """Show the results of a fit.""" global img_ch0, img_rms, img_mean, img_gaus_mod, img_shap_mod global img_gaus_resid, img_shap_resid, pixels_per_beam, pix2sky global vmin, vmax, vmin_cur, vmax_cur, ch0min, ch0max, img_pi global low, fig, images, src_list, srcid_cur, sky2pix, markers - global img_psf_maj, img_psf_min, img_psf_pa + global img_psf_maj, img_psf_min, img_psf_pa, do_broadcast, samp_client + global samp_key, samp_gaul_table_url, samp_srl_table_url if not has_pl: print "\033[31;1mWARNING\033[0m: Matplotlib not found. Plotting is disabled." return + if hasattr(img, 'samp_client'): + samp_client = img.samp_client + samp_key = img.samp_key + if hasattr(img, 'samp_srl_table_url'): + samp_srl_table_url = img.samp_srl_table_url + else: + samp_srl_table_url = None + if hasattr(img, 'samp_gaul_table_url'): + samp_gaul_table_url = img.samp_gaul_table_url + else: + samp_gaul_table_url = None + else: + samp_clent = None + samp_key = None + samp_srl_table_url = None + samp_gaul_table_url = None + do_broadcast = broadcast # Define the images. The images are used both by imshow and by the # on_press() and coord_format event handlers @@ -282,7 +300,7 @@ def plotresults(img, ch0_image=True, rms_image=True, mean_image=True, valid = g.valid else: valid = True - if g.jlevel == 0 and valid: + if g.jlevel == 0 and valid and g.gaus_num >= 0: gidx = g.gaus_num e = Ellipse(xy=g.centre_pix, width=g.size_pix[0], height=g.size_pix[1], angle=g.size_pix[2]+90.0) @@ -297,6 +315,7 @@ def plotresults(img, ch0_image=True, rms_image=True, mean_image=True, e.isl_id = g.island_id e.tflux = g.total_flux e.pflux = g.peak_flux + e.centre_sky = g.centre_sky if len(img.islands) > 0: island_offsets = zip(N.array(island_offsets_x), N.array(island_offsets_y)) isl_borders = collections.AsteriskPolygonCollection(4, offsets=island_offsets, color=border_color, @@ -305,7 +324,7 @@ def plotresults(img, ch0_image=True, rms_image=True, mean_image=True, if hasattr(img, 'gaussians'): for atrg in img.gaussians: - if atrg.jlevel > 0: + if atrg.jlevel > 0 and atrg.gaus_num >= 0: col = 'r' style = '-' gidx = atrg.gaus_num @@ -322,6 +341,7 @@ def plotresults(img, ch0_image=True, rms_image=True, mean_image=True, e.isl_id = atrg.island_id e.tflux = atrg.total_flux e.pflux = atrg.peak_flux + e.centre_sky = atrg.centre_sky if 'Flagged' in titles[i]: for iisl, isl in enumerate(img.islands): @@ -378,8 +398,7 @@ def plotresults(img, ch0_image=True, rms_image=True, mean_image=True, def on_pick(event): - global images - global srcid_cur + global images, srcid_cur, samp_client, samp_key, do_broadcast, samp_gaul_table_url, samp_srl_table_url g = event.artist if hasattr(g, 'gaus_id'): gaus_id = g.gaus_id @@ -398,6 +417,14 @@ def on_pick(event): '): F_tot = ' + str(round(tflux,3)) + ' Jy, F_peak = ' + \ str(round(pflux,4)) + ' Jy/beam' + # Transmit src_id, gaus_id, and coordinates to SAMP Hub (if we are connected) + if do_broadcast and samp_key != None: + if samp_gaul_table_url != None: + func.send_highlight_row(samp_client, samp_key, samp_gaul_table_url, gaus_id) + if samp_srl_table_url != None: + func.send_highlight_row(samp_client, samp_key, samp_srl_table_url, src_id) + func.send_coords(samp_client, samp_key, g.centre_sky) + # Change source SED # First check that SEDs are being plotted and that the selected Gaussian # is from the zeroth wavelet image @@ -640,14 +667,14 @@ def format_coord_psf_maj(x, y): """Custom coordinate format for PSF major image""" global img_psf_maj im = img_psf_maj - coord_str = make_coord_str(x, y, im, unit='pixels') + coord_str = make_coord_str(x, y, im, unit='arcsec') return coord_str def format_coord_psf_min(x, y): """Custom coordinate format for PSF minor image""" global img_psf_min im = img_psf_min - coord_str = make_coord_str(x, y, im, unit='pixels') + coord_str = make_coord_str(x, y, im, unit='arcsec') return coord_str def format_coord_psf_pa(x, y): diff --git a/CEP/PyBDSM/src/python/polarisation.py b/CEP/PyBDSM/src/python/polarisation.py index a18bf2b1b90..2cca57ead72 100644 --- a/CEP/PyBDSM/src/python/polarisation.py +++ b/CEP/PyBDSM/src/python/polarisation.py @@ -354,6 +354,7 @@ class Op_polarisation(Op): src.lpol_angle_err = lpol_ang_err if bar.started: bar.increment() + bar.stop() img.completed_Ops.append('polarisation') #################################################################################### diff --git a/CEP/PyBDSM/src/python/preprocess.py b/CEP/PyBDSM/src/python/preprocess.py index f804470a10a..650ba4a7d52 100644 --- a/CEP/PyBDSM/src/python/preprocess.py +++ b/CEP/PyBDSM/src/python/preprocess.py @@ -32,7 +32,7 @@ Image.omega = Float(doc="Solid angle covered by the image") confused = String(doc = 'confused image or not') class Op_preprocess(Op): - """Preprocessing -- calculate some basic statistics and set + """Preprocessing -- calculate some basic statistics and set processing parameters. Should assume that pixels outside the universe are blanked in QC ? """ @@ -84,7 +84,7 @@ class Op_preprocess(Op): mylogger.userinfo(mylog, "Determining the pixels outside the universe") noutside_univ = self.outside_univ(img) img.noutside_univ = noutside_univ - + # If any are found, (re)mask the image if noutside_univ > 0: mask = N.isnan(img.ch0) @@ -122,10 +122,10 @@ class Op_preprocess(Op): ### Total flux in ch0 image if 'atrous' in img.filename or hasattr(img, '_pi') or img.log == 'Detection image': - # Don't do this estimate for atrous wavelet images + # Don't do this estimate for atrous wavelet images # or polarized intensity image, # as it doesn't give the correct flux. Also, ignore - # the flux in the detection image, as it's likely + # the flux in the detection image, as it's likely # wrong (e.g., not corrected for the primary beam). img.ch0_sum_jy = 0 else: @@ -133,14 +133,14 @@ class Op_preprocess(Op): img.ch0_sum_jy = im_flux mylogger.userinfo(mylog, 'Flux from sum of (non-blank) pixels', '%.3f Jy' % (im_flux,)) - + ### if image seems confused, then take background mean as zero instead - alpha_sourcecounts = 2.5 # approx diff src count slope. 2.2? + alpha_sourcecounts = 2.5 # approx diff src count slope. 2.2? if opts.bmpersrc_th is None: n = (image >= 5.*crms).sum() - if n <= 0: + if n <= 0: n = 1 - mylog.warning('No pixels in image > 5-sigma.') + mylog.info('No pixels in image > 5-sigma.') mylog.info('Taking number of pixels above 5-sigma as 1.') img.bmpersrc_th = N.product(shape)/((alpha_sourcecounts-1.)*n) mylog.info('%s %6.2f' % ('Estimated bmpersrc_th = ', img.bmpersrc_th)) @@ -154,14 +154,14 @@ class Op_preprocess(Op): confused = True img.confused = confused mylog.info('Parameter confused is '+str(img.confused)) - + img.completed_Ops.append('preprocess') return img def outside_univ(self,img): - """ Checks if a pixel is outside the universe and is not blanked, + """ Checks if a pixel is outside the universe and is not blanked, and blanks it. (fits files written by CASA dont do this). """ - + noutside = 0 n, m = img.ch0.shape for i in range(n): @@ -172,10 +172,10 @@ class Op_preprocess(Op): try: skyc = img.pix2sky(pix1) pix2 = img.sky2pix(skyc) - if abs(pix1[0]-pix2[0]) > 0.5 or abs(pix1[1]-pix2[1]) > 0.5: out=True + if abs(pix1[0]-pix2[0]) > 0.5 or abs(pix1[1]-pix2[1]) > 0.5: out=True except RuntimeError, err: pass - if out or ("8" in str(err)): + if out or ("8" in str(err)): noutside += 1 img.ch0[pix1] = float("NaN") return noutside diff --git a/CEP/PyBDSM/src/python/psf_vary.py b/CEP/PyBDSM/src/python/psf_vary.py index 4fa993ba0fc..252e09f3d02 100644 --- a/CEP/PyBDSM/src/python/psf_vary.py +++ b/CEP/PyBDSM/src/python/psf_vary.py @@ -19,6 +19,9 @@ import nat from math import * import statusbar from const import fwsig +import multi_proc as mp +import itertools + class Op_psf_vary(Op): """Computes variation of psf across the image """ @@ -128,7 +131,6 @@ class Op_psf_vary(Op): tile_prop = self.edit_vorogenlist(vorogenP, frac=0.9) # tesselate the image - #volrank, volrank_tilenum, wts = tesselate(vorogenP, vorogenS, tile_prop, tess_method, tess_sc, tess_fuzzy, \ volrank, vorowts = self.tesselate(vorogenP, vorogenS, tile_prop, tess_method, tess_sc, tess_fuzzy, \ generators, gencode, image.shape) if opts.output_all: @@ -168,6 +170,7 @@ class Op_psf_vary(Op): psf_cf.append(cf) if img.opts.quiet == False: bar.increment() + bar.stop() # transpose the psf image list xt, yt = N.transpose(tile_coord) @@ -191,7 +194,7 @@ class Op_psf_vary(Op): basis, beta, cen, totpsfimage, plot) img.psf_images = aa else: - if ntile < 3: + if ntile < 4: mylog.warning('Insufficient number of tiles to do interpolation of PSF variation') return else: @@ -226,37 +229,82 @@ class Op_psf_vary(Op): if img.opts.quiet == False: bar.increment() + bar.stop() # Interpolate Gaussian parameters - psf_maj_int = self.interp_prop(psf_maj, psfcoords, image.shape) - psf_min_int = self.interp_prop(psf_min, psfcoords, image.shape) - psf_pa_int = self.interp_prop(psf_pa, psfcoords, image.shape) - psf_ratio_int = self.interp_prop(psfratio, psfcoords, image.shape) - psf_ratio_aper_int = self.interp_prop(psfratio_aper, psfcoords, image.shape) + if img.aperture == None: + psf_maps = [psf_maj, psf_min, psf_pa, psfratio] + else: + psf_maps = [psf_maj, psf_min, psf_pa, psfratio, psfratio_aper] + nimgs = len(psf_maps) + bar = statusbar.StatusBar('Interpolating PSF images ................ : ', 0, nimgs) + if img.opts.quiet == False: + bar.start() + map_list = mp.parallel_map(func.eval_func_tuple, + itertools.izip(itertools.repeat(self.interp_prop), + psf_maps, itertools.repeat(psfcoords), + itertools.repeat(image.shape)), numcores=opts.ncores, + bar=bar) + if img.aperture == None: + psf_maj_int, psf_min_int, psf_pa_int, psf_ratio_int = map_list + else: + psf_maj_int, psf_min_int, psf_pa_int, psf_ratio_int, psf_ratio_aper_int = map_list + + # Smooth if desired + if img.opts.psf_smooth != None: + sm_scale = img.opts.psf_smooth / img.pix2beam([1.0, 1.0, 0.0])[0] / 3600.0 # pixels + if img.opts.aperture == None: + psf_maps = [psf_maj_int, psf_min_int, psf_pa_int, psf_ratio_int] + else: + psf_maps = [psf_maj_int, psf_min_int, psf_pa_int, psf_ratio_int, psf_ratio_aper_int] + nimgs = len(psf_maps) + bar = statusbar.StatusBar('Smoothing PSF images .................... : ', 0, nimgs) + if img.opts.quiet == False: + bar.start() + map_list = mp.parallel_map(func.eval_func_tuple, + itertools.izip(itertools.repeat(self.blur_image), + psf_maps, itertools.repeat(sm_scale)), numcores=opts.ncores, + bar=bar) + if img.aperture == None: + psf_maj_int, psf_min_int, psf_pa_int, psf_ratio_int = map_list + else: + psf_maj_int, psf_min_int, psf_pa_int, psf_ratio_int, psf_ratio_aper_int = map_list + + # Make sure all smoothed, interpolated images are ndarrays + psf_maj_int = N.array(psf_maj_int) + psf_min_int = N.array(psf_min_int) + psf_pa_int = N.array(psf_pa_int) + psf_ratio_int = N.array(psf_ratio_int) + if img.aperture == None: + psf_ratio_aper_int = N.zeros(psf_maj_int.shape) + else: + psf_ratio_aper_int = N.array(psf_ratio_aper_int) + + # Store interpolated images. The major and minor axis images are + # the sigma in units of arcsec, the PA image in units of degrees east of + # north, the ratio images in units of 1/beam. + img.psf_vary_maj = psf_maj_int * img.pix2beam([1.0, 1.0, 0.0])[0] * 3600.0 # sigma in arcsec + img.psf_vary_min = psf_min_int * img.pix2beam([1.0, 1.0, 0.0])[0] * 3600.0 # sigma in arcsec + img.psf_vary_pa = psf_pa_int + img.psf_vary_ratio = psf_ratio_int # in 1/beam + img.psf_vary_ratio_aper = psf_ratio_aper_int # in 1/beam # Blank with NaNs if needed mask = img.mask if isinstance(mask, N.ndarray): pix_masked = N.where(mask == True) - psf_maj_int[pix_masked] = N.nan - psf_min_int[pix_masked] = N.nan - psf_pa_int[pix_masked] = N.nan - psf_ratio_int[pix_masked] = N.nan - psf_ratio_aper_int[pix_masked] = N.nan - - # Store interpolated images - img.psf_vary_maj = psf_maj_int - img.psf_vary_min = psf_min_int - img.psf_vary_pa = psf_pa_int - img.psf_vary_ratio = psf_ratio_int - img.psf_vary_ratio_aper = psf_ratio_aper_int + img.psf_vary_maj[pix_masked] = N.nan + img.psf_vary_min[pix_masked] = N.nan + img.psf_vary_pa[pix_masked] = N.nan + img.psf_vary_ratio[pix_masked] = N.nan + img.psf_vary_ratio_aper[pix_masked] = N.nan if opts.output_all: - func.write_image_to_file(img.use_io, img.imagename + '.psf_vary_maj.fits', psf_maj_int*fwsig, img, dir) - func.write_image_to_file(img.use_io, img.imagename + '.psf_vary_min.fits', psf_min_int*fwsig, img, dir) - func.write_image_to_file(img.use_io, img.imagename + '.psf_vary_pa.fits', psf_pa_int, img, dir) - func.write_image_to_file(img.use_io, img.imagename + '.psf_vary_ratio.fits', psf_ratio_int, img, dir) - func.write_image_to_file(img.use_io, img.imagename + '.psf_vary_ratio_aper.fits', psf_ratio_aper_int, img, dir) + func.write_image_to_file(img.use_io, img.imagename + '.psf_vary_maj.fits', img.psf_vary_maj*fwsig, img, dir) + func.write_image_to_file(img.use_io, img.imagename + '.psf_vary_min.fits', img.psf_vary_min*fwsig, img, dir) + func.write_image_to_file(img.use_io, img.imagename + '.psf_vary_pa.fits', img.psf_vary_pa, img, dir) + func.write_image_to_file(img.use_io, img.imagename + '.psf_vary_ratio.fits', img.psf_vary_ratio, img, dir) + func.write_image_to_file(img.use_io, img.imagename + '.psf_vary_ratio_aper.fits', img.psf_vary_ratio_aper, img, dir) # Loop through source and Gaussian lists and deconvolve the sizes using appropriate beam bar2 = statusbar.StatusBar('Correcting deconvolved source sizes ..... : ', 0, img.nsrc) @@ -279,6 +327,7 @@ class Op_psf_vary(Op): bar2.spin() if img.opts.quiet == False: bar2.increment() + bar2.stop() img.completed_Ops.append('psf_vary') ################################################################################################## @@ -297,8 +346,8 @@ class Op_psf_vary(Op): def bindata(self, over,num): #ptpbin,nbin,ptplastbin, same as get_bins in fBDSM. - if num <100: ptpbin=num/5 - if num >100: ptpbin=num/10 + if num <= 100: ptpbin=num/5 + if num > 100: ptpbin=num/10 if num > 1000: ptpbin=num/20 if ptpbin % 2 == 1: ptpbin=ptpbin+1 if num < 10: ptpbin=num @@ -485,43 +534,30 @@ class Op_psf_vary(Op): ################################################################################################## def get_voronoi_generators(self, g_gauls, generators, gencode, snrcut, snrtop, snrbot, snrcutstack): """This gets the list of all voronoi generators. It is either the centres of the brightest - sources, or is imported from metadata (in future). generators=calib implies only one source - per facet, and sources between snrtop and snrmax are primary generators. generators=field - implies all sources between snrbot and snrtop are secondary generators. This is the same as - get_voronoi_generators.f in fBDSM. If calibrators='field' then vorogenS is a list of gen.s else - is None.""" + sources, or is imported from metadata (in future).""" from math import sqrt num=len(g_gauls[0]) snr=N.asarray(g_gauls[1])/N.asarray(g_gauls[8]) index=snr.argsort() - snr = snr[index] -# snr = snr[::-1] + snr_incr = snr[index] + snr = snr_incr[::-1] x = N.asarray(g_gauls[2])[index] y = N.asarray(g_gauls[3])[index] - cutoff = 0; npts = 0 + cutoff = 0 if generators == 'calibrators' or generators == 'field': - if gencode != 'file': gencode = 'list' + if gencode != 'file': + gencode = 'list' if gencode == 'list': cutoff = int(round(num*(snrtop))) - if cutoff == len(snr): - cutoff -= 1 + if cutoff > len(snr): + cutoff = len(snr) # Make sure we don't fall below snrcutstack (SNR cut for stacking of PSFs), since # it makes no sense to make tiles with generators that fall below this cut. - if snr[cutoff] < snrcutstack: cutoff = snr.searchsorted(snrcutstack) - if cutoff < 2: - cutoff = 2 - npts = num - cutoff + 1 - -# if generators == 'field': -# cutoff = int(round(num*(1.0-snrtop))) -# if cutoff < 2: -# cutoff = 2 -# npts = num - cutoff + 1 -# cutoffs = int(round(num*(1.0-snrbot))) -# nptss = cutoff - cutoffs + if snr[cutoff-1] < snrcutstack: + cutoff = num - snr_incr.searchsorted(snrcutstack) if generators == 'calibrators': if gencode == 'file': @@ -531,17 +567,10 @@ class Op_psf_vary(Op): y1 = y.tolist() x1.reverse() y1.reverse() - x=x1 - y=y1 snr1 = snr.tolist() - snr1.reverse() - snr = snr1 - vorogenP = N.asarray([x[0:cutoff-2], y[0:cutoff-2], snr[0:cutoff-2]]) + vorogenP = N.asarray([x1[0:cutoff], y1[0:cutoff], snr1[0:cutoff]]) - # for generator=field vorogenS = None - if generators == 'field': - vorogenS = N.asarray([x[cutoff-2:cutoffs-2:-1], y[cutoff-2:cutoffs-2:-1], snr[cutoff-2:cutoffs-2:-1]]) return vorogenP, vorogenS @@ -551,9 +580,8 @@ class Op_psf_vary(Op): have more than one generator to be averaged. tile_list is a list of arrays, indexed by the tile number and each array is an array of numbers in the ngen list which are the generators in that tile. xtile, ytile and snrtile are arrays of length number_of_tiles - and have x,y,snr of each tile. The list of tiles is modified later - using the secondary list in tesselate. For now though, just group together gen.s - if closer than a fraction of dist to third closest. Same as edit_vorogenlist in fBDSM. """ + and have x,y,snr of each tile. Group together generators + if closer than a fraction of dist to third closest.""" xgen, ygen, snrgen = vorogenP flag = N.zeros(len(xgen)) @@ -781,6 +809,7 @@ class Op_psf_vary(Op): and pass it to stackpsf with a weight for each gaussian, to calculate the average psf per tile. Should define weights inside a tile to include closure errors """ + mylog = mylogger.logging.getLogger("PyBDSM."+img.log+"Psf_Vary") tile_list, tile_coord, tile_snr = tile_prop tr_gaul = self.trans_gaul(g_gauls) @@ -792,10 +821,10 @@ class Op_psf_vary(Op): psfratio_aper = [] # ratio of peak flux to aperture flux srcpertile = N.zeros(ntile) snrpertile = N.zeros(ntile) + xt, yt = N.transpose(tile_coord) if plot: pl.figure(None) - xt, yt = N.transpose(tile_coord) colours=['b','g','r','c','m','y','k']*(len(xt)/7+1) pl.axis([0.0, image.shape[0], 0.0, image.shape[1]]) pl.title('Tesselated image with tile centres and unresolved sources') @@ -807,7 +836,6 @@ class Op_psf_vary(Op): tile_gauls = [n for n in tr if volrank[int(round(n[2])),int(round(n[3]))]-1 \ == itile] t_gauls = self.trans_gaul(tile_gauls) - srcpertile[itile] = len(tile_gauls) if plot: pl.plot(t_gauls[2], t_gauls[3], 'x'+'k', mew=1.3)#colours[itile]) @@ -817,6 +845,8 @@ class Op_psf_vary(Op): pl.plot(xx,yy,'-'+colours[itile]) wts = N.asarray(t_gauls[1])/N.asarray(t_gauls[8]) # wt is SNR snrpertile[itile] = sum(wts) + mylog.info('PSF tile #%i (center = %i, %i): %i unresolved sources, SNR = %.1f' % + (itile, xt[itile], yt[itile], srcpertile[itile], snrpertile[itile])) a = self.stackpsf(image, beam, t_gauls, wts, cdelt, factor) psfimages.append(a) psfcoords.append([sum(N.asarray(t_gauls[2])*wts)/sum(wts), sum(N.asarray(t_gauls[3])*wts)/sum(wts)]) @@ -921,19 +951,6 @@ class Op_psf_vary(Op): yo=N.arange(0.0,round(imshape[1]), round(compress)) rgrid=nat.Natgrid(xi,yi,xo,yo) prop_int = rgrid.rgrd(prop) -# if img.masked: -# unmasked = N.where(~mask) -# stdprop = N.std(prop_int[unmasked]) -# minprop = N.min(prop_int[unmasked]) -# maxprop = N.max(prop_int[unmasked]) -# else: -# stdprop = N.std(prop_int) -# minprop = N.min(prop_int) -# maxprop = N.max(prop_int) -# if (maxprop - minprop) > 3.0*stdprop: -# return prop_int -# else: -# return N.mean(prop_int) return prop_int ################################################################################################## @@ -992,3 +1009,18 @@ class Op_psf_vary(Op): # return blah +################################################################################################## + def blur_image(self, im, n, ny=None) : + """ blurs the image by convolving with a gaussian kernel of typical + size n. The optional keyword argument ny allows for a different + size in the y direction. + """ + from scipy.ndimage import gaussian_filter + + sx = n + if ny != None: + sy = ny + else: + sy = n + improc = gaussian_filter(im, [sy, sx]) + return improc diff --git a/CEP/PyBDSM/src/python/pybdsm.py b/CEP/PyBDSM/src/python/pybdsm.py index cf1a39fd917..a2ca8f2f22c 100644 --- a/CEP/PyBDSM/src/python/pybdsm.py +++ b/CEP/PyBDSM/src/python/pybdsm.py @@ -127,6 +127,12 @@ def tget(filename=None): import os global _img + + # Check whether user has given a task name as input (as done in casapy). + # If so, reset filename to None. + if hasattr(filename, 'arg_list'): + filename = None + if filename == None or filename == '': if os.path.isfile('pybdsm.last'): filename = 'pybdsm.last' @@ -223,12 +229,13 @@ def _set_pars_from_prompt(): # If an opt fails to set, replace its value in the namespace # with its current value in _img. Then print error so user knows. err_msg = str(err) - indx1 = err_msg.find('"') + 1 - indx2 = err_msg.find('"', indx1) - k = err_msg[indx1:indx2] + err_msg_trim = err_msg.split('(')[0] + indx1 = err_msg_trim.find('"') + 1 + indx2 = err_msg_trim.find('"', indx1) + k = err_msg_trim[indx1:indx2] orig_opt_val = opts[k] f_dict[k] = orig_opt_val - print '\033[31;1mERROR\033[0m: ' + str(err) + \ + print '\033[31;1mERROR\033[0m: ' + err_msg_trim + \ '\nResetting to previous value.' return False @@ -385,7 +392,7 @@ def show_fit(**kwargs): Parameters: ch0_image, rms_image, mean_image, ch0_islands, gresid_image, sresid_image, gmodel_image, smodel_image, source_seds, ch0_flagged, pi_image, - psf_major, psf_minor, psf_pa + psf_major, psf_minor, psf_pa, broadcast For more information about a parameter, use help. E.g., > help 'ch0_image' @@ -410,7 +417,7 @@ def show_fit(**kwargs): show_fit.arg_list = ['ch0_image', 'rms_image', 'mean_image', 'ch0_islands', 'gresid_image', 'sresid_image', 'gmodel_image', 'smodel_image', 'source_seds', 'ch0_flagged', 'pi_image', - 'psf_major', 'psf_minor', 'psf_pa'] + 'psf_major', 'psf_minor', 'psf_pa', 'broadcast'] show_fit.use_groups = False @@ -422,7 +429,7 @@ def write_catalog(**kwargs): "help 'format'" for more information. Parameters: outfile, format, srcroot, bbs_patches, incl_wavelet, clobber, - catalog_type + catalog_type, incl_empty For more information about a parameter, use help. E.g., > help 'bbs_patches' @@ -445,7 +452,7 @@ def write_catalog(**kwargs): print "\n\033[31;1mAborted\033[0m" write_catalog.arg_list = ['bbs_patches', 'format', 'outfile', 'srcroot', - 'incl_chan', 'clobber', 'catalog_type'] + 'incl_chan', 'clobber', 'catalog_type', 'incl_empty'] write_catalog.use_groups = False diff --git a/CEP/PyBDSM/src/python/readimage.py b/CEP/PyBDSM/src/python/readimage.py index 5fa6119d635..50f17569e00 100644 --- a/CEP/PyBDSM/src/python/readimage.py +++ b/CEP/PyBDSM/src/python/readimage.py @@ -23,7 +23,7 @@ Image.imagename = String(doc="Identifier name for output files") Image.filename = String(doc="Name of input file without FITS extension") Image.bbspatchnum = Int(doc="To keep track of patch number for bbs file "\ "for seperate patches per source") -Image.cfreq = Float(doc="Frequency in the header") +Image.frequency = Float(doc="Frequency in the header") Image.use_io = String(doc="pyfits or pyrap") Image.j = Int(doc="Wavelet order j, 0 for normal run") Image.freq_pars = Tuple((0.0, 0.0, 0.0), @@ -103,12 +103,15 @@ class Op_readimage(Op): root, ext = os.path.splitext(img.opts.filename) if ext in ['.fits', '.FITS', '.image']: fname = root + elif ext in ['.gz', '.GZ']: + root2, ext2 = os.path.splitext(root) + if ext2 in ['.fits', '.FITS', '.image']: + fname = root2 else: fname = img.opts.filename img.filename = img.opts.filename img.parentname = fname img.imagename = fname + '.pybdsm' - img.waveletimage = False if img.opts.output_all: # Set up directory to write output to basedir = './' + fname + '_pybdsm' @@ -140,9 +143,9 @@ class Op_readimage(Op): Thanks to transpose operation done to image earlier we can use p2s & s2p transforms directly. - + Both WCSLIB (from LOFAR svn) and PyWCS (http://stsdas.stsci.edu/ - astrolib/pywcs/, available from https://trac6.assembla.com/astrolib) + astrolib/pywcs/, available from https://trac6.assembla.com/astrolib) are supported. """ try: @@ -220,7 +223,7 @@ class Op_readimage(Op): img.sky2pix = t.s2p elif img.use_wcs == 'pywcs': # Here we define new p2s and s2p methods to match those of wcslib. - # Note that, due to a bug in pywcs version 1.10-4.7, the + # Note that, due to a bug in pywcs version 1.10-4.7, the # "ra_dec_order" option cannot be used. When the bug is fixed, # this option should probably be re-enabled. def p2s(self, xy): @@ -269,7 +272,7 @@ class Op_readimage(Op): ### define beam conversion routines: def beam2pix(x, location=None): """ Converts beam in deg to pixels. - + location specifies the location in pixels (x, y) for which beam is desired Input beam angle should be degrees CCW from North. The output beam angle is degrees CCW from the +y axis of the image. @@ -290,7 +293,7 @@ class Op_readimage(Op): def pix2beam(x, location=None): """ Converts beam in pixels to deg. - + location specifies the location in pixels (x, y) for which beam is desired Input beam angle should be degrees CCW from the +y axis of the image. The output beam angle is degrees CCW from North. @@ -376,13 +379,13 @@ class Op_readimage(Op): mylog = mylogger.logging.getLogger("PyBDSM.InitFreq") if img.opts.frequency_sp != None and img.image.shape[1] > 1: # If user specifies multiple frequencies, then let - # collapse.py do the initialization - img.cfreq = img.opts.frequency_sp[0] + # collapse.py do the initialization + img.frequency = img.opts.frequency_sp[0] img.freq_pars = (0.0, 0.0, 0.0) mylog.info('Using user-specified frequencies.') elif img.opts.frequency != None and img.image.shape[1] == 1: - img.cfreq = img.opts.frequency - img.freq_pars = (img.cfreq, 0.0, 0.0) + img.frequency = img.opts.frequency + img.freq_pars = (img.frequency, 0.0, 0.0) mylog.info('Using user-specified frequency.') else: found = False @@ -407,9 +410,9 @@ class Op_readimage(Op): ff = crval + cdelt * (1. - crpix) if found: if img.opts.frequency != None: - img.cfreq = img.opts.frequency + img.frequency = img.opts.frequency else: - img.cfreq = ff + img.frequency = ff img.freq_pars = (crval, cdelt, crpix) else: raise RuntimeError('No frequency information found in image header.') @@ -469,7 +472,7 @@ class Op_readimage(Op): def get_rot(self, img, location=None): """Returns CCW rotation angle (in degrees) between N and +y axis of image - + location specifies the location in pixels (x, y) for which beam is desired """ if location == None: diff --git a/CEP/PyBDSM/src/python/rmsimage.py b/CEP/PyBDSM/src/python/rmsimage.py index 3ed75ea7670..fdc3e3f8cb9 100644 --- a/CEP/PyBDSM/src/python/rmsimage.py +++ b/CEP/PyBDSM/src/python/rmsimage.py @@ -172,7 +172,6 @@ class Op_rmsimage(Op): if opts.rms_box is None or (opts.rms_box_bright is None and do_adapt): if do_adapt: bsize = int(max(brightsize, min_size_allowed, max_isl_size_highthresh*2.0)) -# bsize = int(max(brightsize, min_size_allowed, max_isl_size_lowthresh)) else: bsize = int(max(brightsize, min_size_allowed, max_isl_size*2.0)) bsize2 = int(max(min(img.ch0.shape)/10.0, max_isl_size*5.0)) @@ -185,22 +184,25 @@ class Op_rmsimage(Op): bstep = int(round(min(bsize/3., min(shape)/10.))) bstep2 = int(round(min(bsize2/3., min(shape)/10.))) if opts.rms_box_bright is None: - img.rms_box = (bsize, bstep) + img.rms_box_bright = (bsize, bstep) else: - img.rms_box = opts.rms_box_bright + img.rms_box_bright = opts.rms_box_bright if opts.rms_box is None: - img.rms_box2 = (bsize2, bstep2) + img.rms_box = (bsize2, bstep2) else: - img.rms_box2 = opts.rms_box + img.rms_box = opts.rms_box else: if do_adapt: - img.rms_box = opts.rms_box_bright - img.rms_box2 = opts.rms_box + img.rms_box_bright = opts.rms_box_bright + img.rms_box = opts.rms_box else: + img.rms_box_bright = opts.rms_box img.rms_box = opts.rms_box - img.rms_box2 = opts.rms_box + if do_adapt: + map_opts = (opts.kappa_clip, img.rms_box_bright, opts.spline_rank) + else: + map_opts = (opts.kappa_clip, img.rms_box, opts.spline_rank) - map_opts = (opts.kappa_clip, img.rms_box, opts.spline_rank) for ipol, pol in enumerate(pols): data = ch0_images[ipol] mean = N.zeros(data.shape, dtype=N.float32) @@ -211,85 +213,28 @@ class Op_rmsimage(Op): pol_txt = '' ## calculate rms/mean maps if needed - if ((opts.rms_map is not False) or (opts.mean_map not in ['zero', 'const'])) and img.rms_box2[0] > min(img.ch0.shape)/4.0: + if ((opts.rms_map is not False) or (opts.mean_map not in ['zero', 'const'])) and img.rms_box[0] > min(img.ch0.shape)/4.0: # rms box is too large - just use constant rms and mean self.output_rmsbox_size(img) - mylog.warning('Size of rms_box larger than 1/4 of image size') + mylogger.userinfo(mylog, 'Size of rms_box larger than 1/4 of image size') mylogger.userinfo(mylog, 'Using constant background rms and mean') img.use_rms_map = False img.mean_map_type = 'const' else: if (opts.rms_map is not False) or (opts.mean_map not in ['zero', 'const']): if len(data.shape) == 2: ## 2d case - rms_ok = False - while not rms_ok: - self.map_2d(data, mean, rms, mask, *map_opts, do_adapt=do_adapt, - bright_pt_coords=isl_pos, rms_box2=img.rms_box2, + mean, rms = self.calculate_maps(img, data, mean, rms, mask, map_opts, do_adapt=do_adapt, + bright_pt_coords=isl_pos, rms_box2=img.rms_box, logname="PyBDSM."+img.log, ncores=img.opts.ncores) - if N.any(rms < 0.0): - rms_ok = False - if (opts.rms_box_bright is None and do_adapt) or (opts.rms_box is None and not do_adapt): - # Increase box by 20% - new_width = int(img.rms_box[0]*1.2) - if new_width == img.rms_box[0]: - new_width = img.rms_box[0] + 1 - new_step = int(new_width/3.0) - img.rms_box = (new_width, new_step) - if img.rms_box[0] > min(img.ch0.shape)/4.0: - #self.output_rmsbox_size(img) - mylog.warning('Size of rms_box larger than 1/4 of image size') - mylogger.userinfo(mylog, 'Using constant background rms and mean') - img.use_rms_map = False - img.mean_map_type = 'const' - rms_ok = True - else: - map_opts = (opts.kappa_clip, img.rms_box, opts.spline_rank) - else: - # User has specified box size, use order=1 to prevent negatives - if opts.spline_rank > 1: - mylog.warning('Negative values found in rms map interpolated with spline_rank = %i' % opts.spline_rank) - mylog.warning('Using spline_rank = 1 (bilinear interpolation) instead') - map_opts = (opts.kappa_clip, img.rms_box, 1) - else: - rms_ok = True - elif len(data.shape) == 3: ## 3d case if not isinstance(mask, N.ndarray): mask = N.zeros(data.shape[0], dtype=bool) for i in range(data.shape[0]): ## iterate each plane - rms_ok = False - while not rms_ok: - self.map_2d(data[i], mean[i], rms[i], mask[i], *map_opts, + mean, rms = self.calculate_maps(img, data[i], mean[i], rms[i], mask[i], map_opts, do_adapt=do_adapt, bright_pt_coords=isl_pos, - rms_box2=img.rms_box2, logname="PyBDSM."+img.log, + rms_box2=img.rms_box, logname="PyBDSM."+img.log, ncores=img.opts.ncores) - if N.any(rms[i] < 0.0): - rms_ok = False - if (opts.rms_box_bright is None and do_adapt) or (opts.rms_box is None and not do_adapt): - # Increase box by 20% - new_width = int(img.rms_box[0]*1.2) - if new_width == img.rms_box[0]: - new_width = img.rms_box[0] + 1 - new_step = int(new_width/3.0) - img.rms_box = (new_width, new_step) - if img.rms_box[0] > min(img.ch0.shape)/4.0: - #self.output_rmsbox_size(img) - mylog.warning('Size of rms_box larger than 1/4 of image size') - mylogger.userinfo(mylog, 'Using constant background rms and mean') - img.use_rms_map = False - img.mean_map_type = 'const' - rms_ok = True - else: - map_opts = (opts.kappa_clip, img.rms_box, opts.spline_rank) - else: - # User has specified box size, use order=1 to prevent negatives - if opts.spline_rank > 1: - mylog.warning('Negative values found in rms map interpolated with spline_rank = %i' % opts.spline_rank) - mylog.warning('Using spline_rank = 1 (bilinear interpolation) instead') - map_opts = (opts.kappa_clip, img.rms_box, 1) - else: - rms_ok = True else: mylog.critical('Image shape not handleable' + pol_txt) raise RuntimeError("Can't handle array of this shape" + pol_txt) @@ -340,8 +285,10 @@ class Op_rmsimage(Op): '(%.5f, %.5f) Jy/beam' % (rms_min, rms_max)) if img.mean_map_type != 'map': - val = 0.0 - if opts.mean_map == 'const': val = img.clipped_mean + if opts.mean_map == 'zero': + val = 0.0 + else: + val = img.clipped_mean mean[:] = val mylogger.userinfo(mylog, 'Value of background mean' + pol_txt, str(round(val,5))+' Jy/beam') @@ -455,6 +402,67 @@ class Op_rmsimage(Op): return img + + def calculate_maps(self, img, data, mean, rms, mask, map_opts, do_adapt, + bright_pt_coords=[], rms_box2=None, + logname=None, ncores=None): + """Calls map_2d and checks for problems""" + rms_ok = False + mylog = mylogger.logging.getLogger("PyBDSM."+img.log+"Rmsimage.Calcmaps ") + opts = img.opts + while not rms_ok: + self.map_2d(data, mean, rms, mask, *map_opts, do_adapt=do_adapt, + bright_pt_coords=bright_pt_coords, rms_box2=rms_box2, + logname=logname, ncores=ncores) + if N.any(rms < 0.0): + rms_ok = False + if (opts.rms_box_bright is None and do_adapt) or (opts.rms_box is None and not do_adapt): + # Increase box by 20% + if do_adapt: + new_width = int(img.rms_box_bright[0]*1.2) + if new_width == img.rms_box_bright[0]: + new_width = img.rms_box_bright[0] + 1 + new_step = int(new_width/3.0) + img.rms_box_bright = (new_width, new_step) + if img.rms_box_bright[0] > min(img.ch0.shape)/4.0: + mylogger.userinfo(mylog, 'Size of rms_box_bright larger than 1/4 of image size') + mylogger.userinfo(mylog, 'Using constant background rms and mean') + img.use_rms_map = False + img.rms_box = img.rms_box_bright + img.mean_map_type = 'const' + rms_ok = True + else: + map_opts = (opts.kappa_clip, img.rms_box_bright, opts.spline_rank) + else: + new_width = int(img.rms_box[0]*1.2) + if new_width == img.rms_box[0]: + new_width = img.rms_box[0] + 1 + new_step = int(new_width/3.0) + img.rms_box = (new_width, new_step) + if img.rms_box[0] > min(img.ch0.shape)/4.0: + mylogger.userinfo(mylog, 'Size of rms_box larger than 1/4 of image size') + mylogger.userinfo(mylog, 'Using constant background rms and mean') + img.use_rms_map = False + img.mean_map_type = 'const' + rms_ok = True + else: + map_opts = (opts.kappa_clip, img.rms_box, opts.spline_rank) + + else: + # User has specified box size, use order=1 to prevent negatives + if opts.spline_rank > 1: + mylog.warning('Negative values found in rms map interpolated with spline_rank = %i' % opts.spline_rank) + mylog.warning('Using spline_rank = 1 (bilinear interpolation) instead') + if do_adapt: + map_opts = (opts.kappa_clip, img.rms_box_bright, 1) + else: + map_opts = (opts.kappa_clip, img.rms_box, 1) + else: + rms_ok = True + + return mean, rms + + def map_2d(self, arr, out_mean, out_rms, mask=False, kappa=3, box=None, interp=1, do_adapt=False, bright_pt_coords=None, rms_box2=None, logname='', ncores=None): @@ -604,12 +612,8 @@ class Op_rmsimage(Op): if float(BS)/float(imgshape[0]) < 0.1 and \ float(BS)/float(imgshape[1]) < 0.1: use_extrapolation = True - mylog.info('Using simple extrapolation for edges of mean '\ - 'and rms maps') else: use_extrapolation = False - mylog.info('Using padded array for edges of mean '\ - 'and rms maps') if use_extrapolation: boxcount = 1 + (imgshape - BS)/SS @@ -968,26 +972,26 @@ class Op_rmsimage(Op): if do_adapt: if opts.rms_box_bright is None: mylogger.userinfo(mylog, 'Derived rms_box (box size, step size)', - '(' + str(img.rms_box[0]) + ', ' + - str(img.rms_box[1]) + ') pixels (small scale)') + '(' + str(img.rms_box_bright[0]) + ', ' + + str(img.rms_box_bright[1]) + ') pixels (small scale)') else: mylogger.userinfo(mylog, 'Using user-specified rms_box', - '(' + str(img.rms_box[0]) + ', ' + - str(img.rms_box[1]) + ') pixels (small scale)') + '(' + str(img.rms_box_bright[0]) + ', ' + + str(img.rms_box_bright[1]) + ') pixels (small scale)') if opts.rms_box is None: mylogger.userinfo(mylog, 'Derived rms_box (box size, step size)', - '(' + str(img.rms_box2[0]) + ', ' + - str(img.rms_box2[1]) + ') pixels (large scale)') + '(' + str(img.rms_box[0]) + ', ' + + str(img.rms_box[1]) + ') pixels (large scale)') else: mylogger.userinfo(mylog, 'Using user-specified rms_box', - '(' + str(img.rms_box2[0]) + ', ' + - str(img.rms_box2[1]) + ') pixels (large scale)') + '(' + str(img.rms_box[0]) + ', ' + + str(img.rms_box[1]) + ') pixels (large scale)') else: if opts.rms_box is None: mylogger.userinfo(mylog, 'Derived rms_box (box size, step size)', - '(' + str(img.rms_box2[0]) + ', ' + - str(img.rms_box2[1]) + ') pixels') + '(' + str(img.rms_box[0]) + ', ' + + str(img.rms_box[1]) + ') pixels') else: mylogger.userinfo(mylog, 'Using user-specified rms_box', - '(' + str(img.rms_box2[0]) + ', ' + - str(img.rms_box2[1]) + ') pixels') + '(' + str(img.rms_box[0]) + ', ' + + str(img.rms_box[1]) + ') pixels') diff --git a/CEP/PyBDSM/src/python/spectralindex.py b/CEP/PyBDSM/src/python/spectralindex.py index 6e7b80b2dba..9bf81a841d4 100644 --- a/CEP/PyBDSM/src/python/spectralindex.py +++ b/CEP/PyBDSM/src/python/spectralindex.py @@ -1,6 +1,6 @@ """Module Spectral index. - - This module calculates spectral indices for Gaussians and sources for a multichannel cube. + + This module calculates spectral indices for Gaussians and sources for a multichannel cube. """ @@ -10,7 +10,7 @@ import mylogger from gaul2srl import Source from copy import deepcopy as cp import _cbdsm -import collapse +import collapse import sys import functions as func import time @@ -24,34 +24,34 @@ Gaussian.specin_flux = List(Float(), doc = "Total flux density per channel, Jy", Gaussian.specin_fluxE = List(Float(), doc = "Error in total flux density per channel, Jy", colname=['E_Total_flux'], units=['Jy']) Gaussian.specin_freq = List(Float(), doc = "Frequency per channel, Hz", colname=['Freq'], units=['Hz']) Source.spec_indx = Float(doc = "Spectral index", colname='Spec_Indx', units=None) -Source.e_spex_indx = Float(doc = "Error in spectral index", colname='E_Spec_Indx', units=None) +Source.e_spec_indx = Float(doc = "Error in spectral index", colname='E_Spec_Indx', units=None) Source.specin_flux = List(Float(), doc = "Total flux density, Jy", colname=['Total_flux'], units=['Jy']) Source.specin_fluxE = List(Float(), doc = "Error in total flux density per channel, Jy", colname=['E_Total_flux'], units=['Jy']) Source.specin_freq = List(Float(), doc = "Frequency per channel, Hz", colname=['Freq'], units=['Hz']) class Op_spectralindex(Op): """Computes spectral index of every gaussian and every source. - + First do a quick fit to all channels to determine whether averaging over frequency is needed to obtain desired SNR (set by img.opts.specind_snr). - This averaging should be done separately for both Gaussians and + This averaging should be done separately for both Gaussians and sources. For S and C sources, averaging only needs to be done once (as the sources have only one Gaussian). - + For M sources, averaging is needed twice: once to obtain the desired SNR for the faintest Gaussian in the source, and once to obtain the desired SNR for the source as a whole. - + If averaging is needed for a given source, don't let the number of resulting channels fall below 2. If it is not possible to obtain the desired SNR in 2 or more channels, set spec_indx of Gaussian/source to NaN. - + """ def __call__(self, img): global bar1 - + mylog = mylogger.logging.getLogger("PyBDSM."+img.log+"SpectIndex") img.mylog = mylog if img.opts.spectralindex_do: @@ -62,9 +62,9 @@ class Op_spectralindex(Op): self.freq_beamsp_unav(img) sbeam = img.beam_spectrum freqin = img.freq - + # calc initial channel flags if needed - iniflags = self.iniflag(img) + iniflags = self.iniflag(img) img.specind_iniflags = iniflags good_chans = N.where(iniflags == False) unav_image = img.image[0][good_chans] @@ -74,24 +74,24 @@ class Op_spectralindex(Op): mylog.info('After initial flagging of channels by rms, %i good channels remain' % (nchan,)) if nmax_to_avg == 0: nmax_to_avg = nchan - + # calculate the rms map of each unflagged channel bar1 = statusbar.StatusBar('Determing rms for channels in image ..... : ', 0, nchan) if img.opts.quiet == False: bar1.start() rms_spec = self.rms_spectrum(img, unav_image) # bar1 updated here - + bar2 = statusbar.StatusBar('Calculating spectral indices for sources : ', 0, img.nsrc) c_wts = img.opts.collapse_wt snr_desired = img.opts.specind_snr - + if img.opts.quiet == False and img.opts.verbose_fitting == False: bar2.start() for src in img.sources: isl = img.islands[src.island_id] isl_bbox = isl.bbox - - # Fit each channel with ch0 Gaussian(s) of the source, + + # Fit each channel with ch0 Gaussian(s) of the source, # allowing only the normalization to vary. chan_images = unav_image[:, isl_bbox[0], isl_bbox[1]] chan_rms = rms_spec[:, isl_bbox[0], isl_bbox[1]] @@ -102,7 +102,7 @@ class Op_spectralindex(Op): # and is True if measured flux is upper limit. n_good_chan_per_gaus is array of N_gaussians # that gives number of unmasked channels for each Gaussian. gaus_mask, n_good_chan_per_gaus = self.mask_upper_limits(unavg_total_flux, e_unavg_total_flux, snr_desired) - + # Average if needed and fit again # First find flux of faintest Gaussian of source and use it to estimate rms_desired gflux = [] @@ -110,33 +110,33 @@ class Op_spectralindex(Op): gflux.append(g.peak_flux) rms_desired = min(gflux)/snr_desired total_flux = unavg_total_flux - e_total_flux = e_unavg_total_flux - freq_av = unav_freqs + e_total_flux = e_unavg_total_flux + freq_av = unav_freqs nchan = chan_images.shape[0] nchan_prev = nchan while min(n_good_chan_per_gaus) < 2 and nchan > 2: - avimages, beamlist, freq_av, crms_av = self.windowaverage_cube(chan_images, rms_desired, chan_rms, + avimages, beamlist, freq_av, crms_av = self.windowaverage_cube(chan_images, rms_desired, chan_rms, c_wts, sbeam, freqin, nmax_to_avg=nmax_to_avg) - total_flux, e_total_flux = self.fit_channels(img, avimages, crms_av, src, beamlist) + total_flux, e_total_flux = self.fit_channels(img, avimages, crms_av, src, beamlist) gaus_mask, n_good_chan_per_gaus = self.mask_upper_limits(total_flux, e_total_flux, snr_desired) nchan = avimages.shape[0] if nchan == nchan_prev: break nchan_prev = nchan rms_desired *= 0.8 - + # Now fit Gaussian fluxes to obtain spectral indices. - # Only fit if there are detections (at specified sigma threshold) - # in at least two bands. If not, don't fit and set spec_indx + # Only fit if there are detections (at specified sigma threshold) + # in at least two bands. If not, don't fit and set spec_indx # and error to NaN. for ig, gaussian in enumerate(src.gaussians): npos = len(N.where(total_flux[:, ig] > 0.0)[0]) if img.opts.verbose_fitting: if img.opts.flagchan_snr: - print 'Gaussian #%i : averaged to %i channels, of which %i meet SNR criterion' % (gaussian.gaus_num, + print 'Gaussian #%i : averaged to %i channels, of which %i meet SNR criterion' % (gaussian.gaus_num, len(total_flux[:, ig]), n_good_chan_per_gaus[ig]) else: - print 'Gaussian #%i : averaged to %i channels, all of which will be used' % (gaussian.gaus_num, + print 'Gaussian #%i : averaged to %i channels, all of which will be used' % (gaussian.gaus_num, len(total_flux[:, ig])) if (img.opts.flagchan_snr and n_good_chan_per_gaus[ig] < 2) or npos < 2: gaussian.spec_indx = N.NaN @@ -160,7 +160,7 @@ class Op_spectralindex(Op): gaussian.specin_fluxE = e_fluxes_to_fit.tolist() gaussian.specin_freq = freqs_to_fit.tolist() gaussian.specin_freq0 = N.median(freqs_to_fit) - + # Next fit total source fluxes for spectral index. if len(src.gaussians) > 1: # First, check unaveraged SNRs for total source. @@ -169,18 +169,18 @@ class Op_spectralindex(Op): src_total_flux[:,0] = N.sum(unavg_total_flux, 1) # sum over all Gaussians in source to obtain total fluxes in each channel src_e_total_flux[:,0] = N.sqrt(N.sum(N.power(e_unavg_total_flux, 2.0), 1)) src_mask, n_good_chan = self.mask_upper_limits(src_total_flux, src_e_total_flux, snr_desired) - + # Average if needed and fit again rms_desired = src.peak_flux_max/snr_desired total_flux = unavg_total_flux e_total_flux = e_unavg_total_flux - freq_av = unav_freqs + freq_av = unav_freqs nchan = chan_images.shape[0] nchan_prev = nchan while n_good_chan < 2 and nchan > 2: - avimages, beamlist, freq_av, crms_av = self.windowaverage_cube(chan_images, rms_desired, chan_rms, + avimages, beamlist, freq_av, crms_av = self.windowaverage_cube(chan_images, rms_desired, chan_rms, c_wts, sbeam, freqin, nmax_to_avg=nmax_to_avg) - total_flux, e_total_flux = self.fit_channels(img, avimages, crms_av, src, beamlist) + total_flux, e_total_flux = self.fit_channels(img, avimages, crms_av, src, beamlist) src_total_flux = N.sum(total_flux, 1) # sum over all Gaussians in source to obtain total fluxes in each channel src_e_total_flux = N.sqrt(N.sum(N.power(e_total_flux, 2.0), 1)) src_mask, n_good_chan = self.mask_upper_limits(src_total_flux, src_e_total_flux, snr_desired) @@ -189,18 +189,18 @@ class Op_spectralindex(Op): break nchan_prev = nchan rms_desired *= 0.8 - + # Now fit source for spectral index. src_total_flux = src_total_flux.reshape((src_total_flux.shape[0],)) src_e_total_flux = src_e_total_flux.reshape((src_e_total_flux.shape[0],)) src_mask = src_mask.reshape((src_mask.shape[0],)) if img.opts.verbose_fitting: if img.opts.flagchan_snr: - print 'Source #%i : averaged to %i channels, of which %i meet SNR criterion' % (src.source_id, + print 'Source #%i : averaged to %i channels, of which %i meet SNR criterion' % (src.source_id, len(src_total_flux), nchan) else: - print 'Source #%i : averaged to %i channels, all of which will be used' % (src.source_id, - len(src_total_flux)) + print 'Source #%i : averaged to %i channels, all of which will be used' % (src.source_id, + len(src_total_flux)) npos = len(N.where(src_total_flux > 0.0)) if (img.opts.flagchan_snr and n_good_chan < 2) or npos < 2: src.spec_indx = N.NaN @@ -249,11 +249,11 @@ class Op_spectralindex(Op): #################################################################################### def flagchans_rmschan(self, crms, zeroflags, iniflags, cutoff): - """ Calculate clipped rms (r1) of the rms as fn of channel, crms, with zeroflags + """ Calculate clipped rms (r1) of the rms as fn of channel, crms, with zeroflags applied and kappa=cutoff. Then exclude crms=0 (for NaN mages etc) and get ch.s which are more than cutoff*r1 away from median of rms. If this is less than 10 % - of all channels, flag them. - + of all channels, flag them. + """ # crms_rms and median dont include rms=0 channels @@ -263,8 +263,8 @@ class Op_spectralindex(Op): median = N.median(N.delete(crms, zeroind)) badind = N.where(N.abs(N.delete(crms, zeroind) - median)/crms_rms >=cutoff)[0] frac = len(badind)/(nchan - len(zeroind)) - - if frac <= 0.1: + + if frac <= 0.1: badind = N.where(N.abs(crms - median)/crms_rms >=cutoff)[0] iniflags[badind] = True @@ -274,7 +274,7 @@ class Op_spectralindex(Op): def iniflag(self, img): """ Calculate clipped rms of every channel, and then median and clipped rms of this rms distribution. Exclude channels where rms=0 (all pixels 0 or blanked) and of the remaining, if outliers beyond 5 sigma - are less then 10 % of number of channels, flag them. This is done only when flagchan_rms = True. + are less then 10 % of number of channels, flag them. This is done only when flagchan_rms = True. If False, only rms=0 (meaning, entire channel image is zero or blanked) is flagged.""" image = img.image @@ -288,17 +288,17 @@ class Op_spectralindex(Op): iniflags = cp(zeroflags) if img.opts.flagchan_rms: - iniflags = self.flagchans_rmschan(crms, zeroflags, iniflags, 4.0) + iniflags = self.flagchans_rmschan(crms, zeroflags, iniflags, 4.0) return iniflags - + #################################################################################### def freq_beamsp_unav(self, img): """ Defines img.beam_spectrum and img.freq for the unaveraged cube. """ shp = img.image.shape - sbeam = img.opts.beam_spectrum + sbeam = img.opts.beam_spectrum if sbeam != None and len(sbeam) != shp[1]: sbeam = None # sanity check if sbeam == None: sbeam = [img.beam]*shp[1] @@ -353,7 +353,7 @@ class Op_spectralindex(Op): median_rms = rms_spec str1 = " ".join(["%9.4e" % n for n in img.channel_clippedrms]) - if rms_map: + if rms_map: mylog.debug('%s %s ' % ('Median rms of channels : ', str1)) mylog.info('RMS image made for each channel') else: @@ -366,7 +366,7 @@ class Op_spectralindex(Op): #################################################################################### def fit_specindex(self, freqarr, fluxarr, efluxarr, do_log=False): """ Fits spectral index to data. - + do_log is True/False implies you fit spectral index in logFlux vs logFreq space or not.""" import functions as func import math @@ -384,7 +384,7 @@ class Op_spectralindex(Op): else: x = x/f0; y = flux; sig = eflux funct = func.sp_in - + spin, espin = func.fit_mask_1d(x, y, sig, mask, funct, do_err=True, order=1) if do_log: @@ -395,31 +395,31 @@ class Op_spectralindex(Op): ######################################################################################## - - def windowaverage_cube(self, imagein, rms_desired, chanrms, c_wts, sbeam, + + def windowaverage_cube(self, imagein, rms_desired, chanrms, c_wts, sbeam, freqin, n_min=2, nmax_to_avg=10): """Average neighboring channels of cube to obtain desired rms in at least n_min channels - + The clipped rms of each channel is compared to the desired rms. If the clipped rms is too high, the channel is averaged with as many neighboring channels as necessary to obtain at least the desired rms. This is done until the number of OK channels is 2. The averaging is done first at - the frequency extremes, as frequency range the resulting averaged flux array + the frequency extremes, as frequency range the resulting averaged flux array will be maximized. - - For example, if the desired rms is 0.1 and the list of rms's is: - + + For example, if the desired rms is 0.1 and the list of rms's is: + [0.2, 0.2, 0.3, 0.2, 0.2] - + the resulting channels that will be averaged are: - + [[0, 1], [2], [3, 4]] """ from math import sqrt from collapse import avspc_direct, avspc_blanks - + nchan = imagein.shape[0] - + # chan_list is a list of lists of channels to average. E.g., if we have # 5 channels and we want to average only the first 2: # chan_list = [[0,1], [2], [3], [4]] @@ -428,7 +428,7 @@ class Op_spectralindex(Op): else: crms = chanrms chan_list = self.get_avg_chan_list(rms_desired, crms, nmax_to_avg) - + n_new = len(chan_list) beamlist = [] crms_av = N.zeros(n_new) @@ -438,7 +438,7 @@ class Op_spectralindex(Op): hasblanks = blank.any() for ichan, avg_list in enumerate(chan_list): if len(avg_list) > 1: - if not hasblanks: + if not hasblanks: imageout[ichan], dum = avspc_direct(avg_list, imagein, crms, c_wts) else: imageout[ichan], dum = avspc_blanks(avg_list, imagein, crms, c_wts) @@ -451,9 +451,9 @@ class Op_spectralindex(Op): beamlist.append(sbeam[avg_list[0]]) freq_av[ichan] = N.mean(freqin[avg_list[0]]) crms_av[ichan] = 1.0/sqrt(N.sum(1.0/crms[avg_list[0]]**2)) - - return imageout, beamlist, freq_av, crms_av - + + return imageout, beamlist, freq_av, crms_av + def get_avg_chan_list(self, rms_desired, chanrms, nmax_to_avg): """Returns a list of channels to average to obtain given rms_desired @@ -468,7 +468,7 @@ class Op_spectralindex(Op): rms_avg = chanrms[0] while rms_avg > rms_desired: end += 1 - chan_slice = slice(0, end) + chan_slice = slice(0, end) rms_avg = 1.0/N.sqrt(N.sum(1.0/N.array(chanrms)[chan_slice]**2)) if end == nchan or end == nmax_to_avg: break @@ -481,18 +481,18 @@ class Op_spectralindex(Op): # and return. chan_list = [range(0, int(float(nchan)/2.0)), range(int(float(nchan)/2.0), nchan)] return chan_list - + # Average channels at end of list rms_avg = chanrms[-1] end = nchan start = nchan while rms_avg > rms_desired: start -= 1 - chan_slice = slice(start, end) + chan_slice = slice(start, end) rms_avg = 1.0/N.sqrt(N.sum(1.0/chanrms[chan_slice]/chanrms[chan_slice])) if end-start == nmax_to_avg: break - + if start <= max(chan_list[0]): # This means we cannot get two averaged channels with desired rms, # so just average remaining channels @@ -509,27 +509,27 @@ class Op_spectralindex(Op): for i in range(nchan): chan_list.append([i]) return chan_list - + def fit_channels(self, img, chan_images, clip_rms, src, beamlist): """Fits normalizations of Gaussians in source to multiple channels - - If unresolved, the size of the Gaussians are adjusted to match the + + If unresolved, the size of the Gaussians are adjusted to match the channel's beam size (given by beamlist) before fitting. - - Returns array of total fluxes (N_channels x N_Gaussians) and array + + Returns array of total fluxes (N_channels x N_Gaussians) and array of errors (N_channels x N_Gaussians). """ import functions as func from const import fwsig - + isl = img.islands[src.island_id] isl_bbox = isl.bbox nchan = chan_images.shape[0] x, y = N.mgrid[isl_bbox] gg = src.gaussians fitfix = N.ones(len(gg)) # fit only normalization - srcmask = isl.mask_active + srcmask = isl.mask_active total_flux = N.zeros((nchan, len(fitfix))) # array of fluxes: N_channels x N_Gaussians errors = N.zeros((nchan, len(fitfix))) # array of fluxes: N_channels x N_Gaussians @@ -545,7 +545,7 @@ class Op_spectralindex(Op): rms_isl = N.mean(clip_rms[cind]) errors[cind] = func.get_errors(img, p, rms_isl, bm_pix=(bm_pix[0]*fwsig, bm_pix[1]*fwsig, bm_pix[2]))[6] self.reset_size(gg) - + return total_flux, errors def adjust_size_by_freq(self, beam_ch0, beam, gg): @@ -559,12 +559,12 @@ class Op_spectralindex(Op): g.size_pix_adj[1] *= beam[1] / beam_ch0[1] gg_adj.append(g) return gg_adj - + def reset_size(self, gg): """Reset size of unresolved Gaussians to match the ch0 beam size""" for g in gg: if hasattr(g, 'size_pix_adj'): del g.size_pix_adj - + def mask_upper_limits(self, total_flux, e_total_flux, threshold): """Returns mask of upper limits""" mask = N.zeros(total_flux.shape, dtype=bool) @@ -587,15 +587,15 @@ class Op_spectralindex(Op): if meas_flux < threshold * e_meas_flux: # Upper limit if is_src: - mask[ichan] = True + mask[ichan] = True else: mask[ichan, ig] = True else: # Detection if is_src: ndet += 1 - mask[ichan] = False + mask[ichan] = False else: ndet[ig] += 1 mask[ichan, ig] = False - return mask, ndet \ No newline at end of file + return mask, ndet diff --git a/CEP/PyBDSM/src/python/statusbar.py b/CEP/PyBDSM/src/python/statusbar.py index e3183b690a6..6e438fc620a 100644 --- a/CEP/PyBDSM/src/python/statusbar.py +++ b/CEP/PyBDSM/src/python/statusbar.py @@ -73,7 +73,6 @@ class StatusBar(): self.comp = self.columns self.busy_char = '' self.__print() - sys.stdout.write('\n') return 0 else: self.pos += self.inc @@ -87,3 +86,13 @@ class StatusBar(): def start(self): self.started = 1 self.__print() + + def stop(self): + if self.started: + self.pos = self.max + self.comp = self.columns + self.busy_char = '' + self.__print() + sys.stdout.write('\n') + self.started = 0 + return 0 diff --git a/CEP/PyBDSM/src/python/threshold.py b/CEP/PyBDSM/src/python/threshold.py index c688091f5fb..6ef88950e38 100644 --- a/CEP/PyBDSM/src/python/threshold.py +++ b/CEP/PyBDSM/src/python/threshold.py @@ -2,7 +2,7 @@ Defines operation Op_threshold. If the option 'thresh' is defined as 'fdr' then the value of thresh_pix is estimated using the -False Detection Rate algorithm (using the user defined value +False Detection Rate algorithm (using the user defined value of fdr_alpha). If thresh is None, then the false detection probability is first calculated, and if the number of false source pixels is more than fdr_ratio times the estimated number of true source @@ -34,13 +34,13 @@ class Op_threshold(Op): if img.opts.thresh is None: source_p = self.get_srcp(img) - cutoff = 5.0 + cutoff = 5.0 false_p = 0.5*erfc(cutoff/sq2)*size if false_p < opts.fdr_ratio*source_p: img.thresh = 'hard' mylogger.userinfo(mylog, "Expected 5-sigma-clipped false detection rate < fdr_ratio") mylogger.userinfo(mylog, "Using sigma-clipping ('hard') thresholding") - else: + else: img.thresh = 'fdr' mylogger.userinfo(mylog, "Expected 5-sigma-clipped false detection rate > fdr_ratio") mylogger.userinfo(mylog, "Using FDR (False Detection Rate) thresholding") @@ -49,7 +49,7 @@ class Op_threshold(Op): mylog.debug("Threshold for pixels set to : "+str.swapcase(img.thresh)) else: img.thresh = img.opts.thresh - + if img.thresh=='fdr': cdelt = img.wcs_obj.acdelt[:2] bm = (img.beam[0], img.beam[1]) @@ -79,7 +79,7 @@ class Op_threshold(Op): mylogger.userinfo(mylog, "FDR threshold (replaces thresh_pix)", str(round(sigcrit, 4))) else: img.thresh_pix = opts.thresh_pix - + img.completed_Ops.append('threshold') return img @@ -88,7 +88,7 @@ class Op_threshold(Op): fwsig = const.fwsig cutoff = 5.0 spin = -0.80 - freq = img.cfreq + freq = img.frequency bm = (img.beam[0], img.beam[1]) cdelt = img.wcs_obj.acdelt[:2] x = 2.0*pi*N.product(bm)/abs(N.product(cdelt))/(fwsig*fwsig)*img.omega @@ -98,7 +98,7 @@ class Op_threshold(Op): scnum = sc.n index = 0 for i,s in enumerate(scflux): - if s < smin_L: + if s < smin_L: index = i break n1 = scnum[index]; n2 = scnum[-1] diff --git a/CEP/PyBDSM/src/python/wavelet_atrous.py b/CEP/PyBDSM/src/python/wavelet_atrous.py index b8ceb4192e9..ccf22d5d181 100644 --- a/CEP/PyBDSM/src/python/wavelet_atrous.py +++ b/CEP/PyBDSM/src/python/wavelet_atrous.py @@ -51,6 +51,11 @@ class Op_wavelet_atrous(Op): mylog = mylogger.logging.getLogger("PyBDSM." + img.log + "Wavelet") if img.opts.atrous_do: + if img.nisl == 0: + mylog.warning("No islands found. Skipping wavelet decomposition.") + img.completed_Ops.append('wavelet_atrous') + return + mylog.info("Decomposing gaussian residual image into a-trous wavelets") bdir = img.basedir + '/wavelet/' if img.opts.output_all: @@ -158,51 +163,45 @@ class Op_wavelet_atrous(Op): for op in wchain: op(wimg) if isinstance(op, Op_islands): - # Delete islands that do not share any pixels with - # islands in original ch0 image. - good_isl = [] - - # Make original rank image boolean; rank counts from 0, with -1 being - # outside any island - orig_rankim_bool = N.array(img.pyrank + 1, dtype = bool) - - # Multiply rank images - valid_islands = orig_rankim_bool * (wimg.pyrank + 1) - - bar = statusbar.StatusBar('Checking for valid islands .............. : ', 0, wimg.nisl) - if img.opts.quiet == False: - bar.start() - - # Now call the parallel mapping function. Returns True or - # False for each island. - check_list = mp.parallel_map(func.eval_func_tuple, - itertools.izip(itertools.repeat(self.check_island), - wimg.islands, itertools.repeat(valid_islands)), - numcores=img.opts.ncores, bar=bar) - - for idx, wvisl in enumerate(wimg.islands): - if check_list[idx]: - wvisl.valid = True - good_isl.append(wvisl) - else: - wvisl.valid = False - - wimg.islands = good_isl - wimg.nisl = len(good_isl) - mylogger.userinfo(mylog, "Number of vaild islands found", '%i' % - wimg.nisl) - # Renumber islands: - for wvindx, wvisl in enumerate(wimg.islands): - wvisl.island_id = wvindx + if wimg.nisl > 0: + # Delete islands that do not share any pixels with + # islands in original ch0 image. + good_isl = [] + + # Make original rank image boolean; rank counts from 0, with -1 being + # outside any island + orig_rankim_bool = N.array(img.pyrank + 1, dtype = bool) + + # Multiply rank images + valid_islands = orig_rankim_bool * (wimg.pyrank + 1) - 1 + + # Get unique island IDs + valid_ids = set(valid_islands.flatten()) + for idx, wvisl in enumerate(wimg.islands): + if idx in valid_ids: + wvisl.valid = True + good_isl.append(wvisl) + else: + wvisl.valid = False + + wimg.islands = good_isl + wimg.nisl = len(good_isl) + mylogger.userinfo(mylog, "Number of vaild islands found", '%i' % + wimg.nisl) + + # Renumber islands: + for wvindx, wvisl in enumerate(wimg.islands): + wvisl.island_id = wvindx if isinstance(op, Op_gaul2srl): # Restrict Gaussians to original ch0 islands. gaul = wimg.gaussians tot_flux = 0.0 nwvgaus = 0 - - # TODO fix following when img.ngaus == 0! - gaus_id = img.gaussians[-1].gaus_num + if img.ngaus == 0: + gaus_id = -1 + else: + gaus_id = img.gaussians[-1].gaus_num for isl in img.islands: wvgaul = [] for g in gaul: @@ -267,11 +266,10 @@ class Op_wavelet_atrous(Op): break pdir = img.basedir + '/misc/' - #self.morphfilter_pyramid(img, pdir) img.ngaus += ntot_wvgaus img.total_flux_gaus += total_flux - mylogger.userinfo(mylog, "Total flux density in model over all scales" , '%.3f Jy' % img.total_flux_gaus) + mylogger.userinfo(mylog, "Total flux density in model on all scales" , '%.3f Jy' % img.total_flux_gaus) if img.opts.output_all: func.write_image_to_file(img.use_io, img.imagename + '.atrous.cJ.fits', im_new, img, bdir) @@ -365,14 +363,7 @@ class Op_wavelet_atrous(Op): wimg.mask = mask wimg.use_io = img.use_io -####################################################################################################### - def check_island(self, isl, valid_islands): - if isl.island_id in valid_islands - 1: - return True - else: - return False - -####################################################################################################### +###################################################################################################### def subtract_wvgaus(self, opts, residim, gaussians, islands): import functions as func from make_residimage import Op_make_residimage as opp diff --git a/CMake/FindCFITSIO.cmake b/CMake/FindCFITSIO.cmake index 85c26039240..108ab0c1e07 100644 --- a/CMake/FindCFITSIO.cmake +++ b/CMake/FindCFITSIO.cmake @@ -33,7 +33,7 @@ if(NOT CFITSIO_FOUND) find_path(CFITSIO_INCLUDE_DIR fitsio.h - HINTS ${CFITSIO_ROOT_DIR} PATH_SUFFIXES include) + HINTS ${CFITSIO_ROOT_DIR} PATH_SUFFIXES include include/cfitsio include/libcfitsio0) find_library(CFITSIO_LIBRARY cfitsio HINTS ${CFITSIO_ROOT_DIR} PATH_SUFFIXES lib) find_library(M_LIBRARY m) diff --git a/CMake/variants/variants.RS005C b/CMake/variants/variants.RS005C index f546f8acb7d..2fb3ca3b231 100644 --- a/CMake/variants/variants.RS005C +++ b/CMake/variants/variants.RS005C @@ -26,6 +26,7 @@ set(CTEST_CUSTOM_WARNING_EXCEPTION "/boost/date_time/time.hpp:[0-9]+: warning: unused parameter" "/boost/tuple/detail/tuple_basic.hpp:[0-9]+: warning: unused parameter" "/boost/python/object/value_holder.hpp:[0-9]+: warning: unused parameter" + "/boost/dynamic_bitset/dynamic_bitset.hpp:" "/matlab-2008a/extern/include/mclcppclass.h" "/pvss2_v3.7/api/include/(Basics|Datapoint|Manager|Messages)/" "/opt/WinCC_OA/3.10/api/include/(Basics|Datapoint|Manager|Messages)/" diff --git a/JAVA/CEP/jParmFacade/Makefile.am b/JAVA/CEP/jParmFacade/Makefile.am deleted file mode 100644 index 0657d612396..00000000000 --- a/JAVA/CEP/jParmFacade/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -SUBDIRS=src test include - -ACLOCAL_AMFLAGS = -I autoconf_share - -pkgextdir = $(prefix)/config/$(PACKAGE) -pkgext_DATA = pkgext pkgextcppflags pkgextcxxflags pkgextldflags - -DISTCHECK_CONFIGURE_FLAGS=\ - --with-common=$(prefix) - -EXTRA_DIST = \ - Makefile.common \ - jParmFacade.spec \ - autoconf_share/compiletool - -include $(top_srcdir)/Makefile.common diff --git a/JAVA/CEP/jParmFacade/bootstrap b/JAVA/CEP/jParmFacade/bootstrap deleted file mode 100755 index 06f18cde1db..00000000000 --- a/JAVA/CEP/jParmFacade/bootstrap +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -../../../autoconf_share/bootstrap ../../../autoconf_share diff --git a/JAVA/CEP/jParmFacade/build.xml b/JAVA/CEP/jParmFacade/build.xml deleted file mode 100644 index e4f025e1317..00000000000 --- a/JAVA/CEP/jParmFacade/build.xml +++ /dev/null @@ -1,74 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- You may freely edit this file. See commented blocks below for --> -<!-- some examples of how to customize the build. --> -<!-- (If you delete it and reopen the project it will be recreated.) --> -<!-- By default, only the Clean and Build commands use this build script. --> -<!-- Commands such as Run, Debug, and Test only use this build script if --> -<!-- the Compile on Save feature is turned off for the project. --> -<!-- You can turn off the Compile on Save (or Deploy on Save) setting --> -<!-- in the project's Project Properties dialog box.--> -<project name="jParmFacade" default="default" basedir="."> - <description>Builds, tests, and runs the project jParmFacade.</description> - <import file="nbproject/build-impl.xml"/> - <!-- - - There exist several targets which are by default empty and which can be - used for execution of your tasks. These targets are usually executed - before and after some main targets. They are: - - -pre-init: called before initialization of project properties - -post-init: called after initialization of project properties - -pre-compile: called before javac compilation - -post-compile: called after javac compilation - -pre-compile-single: called before javac compilation of single file - -post-compile-single: called after javac compilation of single file - -pre-compile-test: called before javac compilation of JUnit tests - -post-compile-test: called after javac compilation of JUnit tests - -pre-compile-test-single: called before javac compilation of single JUnit test - -post-compile-test-single: called after javac compilation of single JUunit test - -pre-jar: called before JAR building - -post-jar: called after JAR building - -post-clean: called after cleaning build products - - (Targets beginning with '-' are not intended to be called on their own.) - - Example of inserting an obfuscator after compilation could look like this: - - <target name="-post-compile"> - <obfuscate> - <fileset dir="${build.classes.dir}"/> - </obfuscate> - </target> - - For list of available properties check the imported - nbproject/build-impl.xml file. - - - Another way to customize the build is by overriding existing main targets. - The targets of interest are: - - -init-macrodef-javac: defines macro for javac compilation - -init-macrodef-junit: defines macro for junit execution - -init-macrodef-debug: defines macro for class debugging - -init-macrodef-java: defines macro for class execution - -do-jar-with-manifest: JAR building (if you are using a manifest) - -do-jar-without-manifest: JAR building (if you are not using a manifest) - run: execution of project - -javadoc-build: Javadoc generation - test-report: JUnit report generation - - An example of overriding the target for project execution could look like this: - - <target name="run" depends="jParmFacade-impl.jar"> - <exec dir="bin" executable="launcher.exe"> - <arg file="${dist.jar}"/> - </exec> - </target> - - Notice that the overridden target depends on the jar target and not only on - the compile target as the regular run target does. Again, for a list of available - properties which you can use, check the target you are overriding in the - nbproject/build-impl.xml file. - - --> -</project> diff --git a/JAVA/CEP/jParmFacade/configure.in b/JAVA/CEP/jParmFacade/configure.in deleted file mode 100644 index ba5b954fdf2..00000000000 --- a/JAVA/CEP/jParmFacade/configure.in +++ /dev/null @@ -1,87 +0,0 @@ -dnl -dnl Process this file with autoconf to produce a configure script. -dnl -AC_INIT -dnl AC_CONFIG_AUX_DIR(config) -dnl AM_CONFIG_HEADER(config/config.h) -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(jParmFacade, 1.0, no-define) - -dnl Initialize for LOFAR (may set compilers) -lofar_INIT - -dnl Checks for programs. -AC_PROG_AWK -AC_PROG_YACC -AC_PROG_CC -AC_PROG_CXX -AM_PROG_LEX -AC_PROG_INSTALL -AC_PROG_LN_S -dnl AC_DISABLE_SHARED -AC_PROG_LIBTOOL - -dnl Checks for libraries. - -dnl dnl Replace `main' with a function in -lfl: -dnl AC_CHECK_LIB(fl, main) -dnl dnl Replace `main' with a function in -lcosev_r: -dnl AC_CHECK_LIB(cosev_r, main) -dnl dnl Replace `main' with a function in -lcosnm_r: -dnl AC_CHECK_LIB(cosnm_r, main) -dnl dnl Replace `main' with a function in -lorb_r: -dnl AC_CHECK_LIB(orb_r, main) -dnl dnl Replace `main' with a function in -lpthread: -dnl AC_CHECK_LIB(pthread, main) -dnl dnl Replace `main' with a function in -lvport_r: -dnl AC_CHECK_LIB(vport_r, main) - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(unistd.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_SIZE_T - -dnl Checks for library functions. -AC_FUNC_VPRINTF - -dnl -dnl Check for LOFAR specific things -dnl -dnl lofar_BLITZ -dnl lofar_MPI - -#lofar_INTERNAL(CEP/CEPFrame,CEPFrame,,1,CEPFrame/DataManager.h) -#lofar_INTERNAL(CEP/tinyCEP,tinyCEP,,1,tinyCEP/TinyDataManager.h,,) -#lofar_INTERNAL(LCS/ACC/PLC,PLC,,1,PLC/ProcessControl.h,,) -#lofar_INTERNAL(LCS/databases/TransportPostgres,TransportPostgres,,1,TransportPostgres/DH_DB.h,,) -#lofar_EXTERNAL(pq,,libpq-fe.h, pq, /usr/local/pgsql) -#lofar_EXTERNAL(pqxx,2.5.5,pqxx/pqxx, pqxx) - -lofar_GENERAL -lofar_INTERNAL(CEP/BB/ParmDB,ParmDB,,1,ParmDB/ParmDB.h,,) -lofar_INTERNAL(CEP/BB/BBSKernel,BBSKernel,,1,BBSKernel/MNS/MeqParmFunklet.h) -lofar_INTERNAL(CEP/BB/ParmFacade,ParmFacade,,1,ParmFacade/ParmFacade.h,,) -lofar_INTERNAL(CEP/BB/MS,MS,,1,MS/MSDesc.h,bbms) -lofar_INTERNAL(LCS/Transport,Transport,,1,Transport/TransportHolder.h,,) -lofar_INTERNAL(LCS/Blob,Blob,,1,Blob/BlobHeader.h,,) -lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) - -lofar_AIPSPP(1,"-lms -lmeasures -ltables -lscimath -lscimath_f -lcasa") -lofar_LAPACK(1) - -dnl -dnl Output Makefiles -dnl -AC_CONFIG_FILES([test/runctest.sh:autoconf_share/runctest.sh.in], - [chmod +x test/runctest.sh]) -AC_OUTPUT( -include/Makefile -include/jParmFacade/Makefile -src/Makefile -test/Makefile -Makefile -jParmFacade.spec -) diff --git a/JAVA/CEP/jParmFacade/include/jParmFacade/nl_astron_lofar_java_cep_jparmfacade_jParmFacade.h b/JAVA/CEP/jParmFacade/include/jParmFacade/nl_astron_lofar_java_cep_jparmfacade_jParmFacade.h deleted file mode 100644 index 5912c2e16d4..00000000000 --- a/JAVA/CEP/jParmFacade/include/jParmFacade/nl_astron_lofar_java_cep_jparmfacade_jParmFacade.h +++ /dev/null @@ -1,45 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include <jni.h> -/* Header for class nl_astron_lofar_java_cep_jparmfacade_jParmFacade */ - -#ifndef _Included_nl_astron_lofar_java_cep_jparmfacade_jParmFacade -#define _Included_nl_astron_lofar_java_cep_jparmfacade_jParmFacade -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: nl_astron_lofar_java_cep_jparmfacade_jParmFacade - * Method: getRange - * Signature: (Ljava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_java_cep_jparmfacade_jParmFacade_getRange - (JNIEnv *, jobject, jstring); - -/* - * Class: nl_astron_lofar_java_cep_jparmfacade_jParmFacade - * Method: getNames - * Signature: (Ljava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_java_cep_jparmfacade_jParmFacade_getNames - (JNIEnv *, jobject, jstring); - -/* - * Class: nl_astron_lofar_java_cep_jparmfacade_jParmFacade - * Method: getValues - * Signature: (Ljava/lang/String;DDIDDI)Ljava/util/HashMap; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_java_cep_jparmfacade_jParmFacade_getValues - (JNIEnv *, jobject, jstring, jdouble, jdouble, jint, jdouble, jdouble, jint); - -/* - * Class: nl_astron_lofar_java_cep_jparmfacade_jParmFacade - * Method: getHistory - * Signature: (Ljava/lang/String;DDIDDI)Ljava/util/HashMap; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_java_cep_jparmfacade_jParmFacade_getHistory - (JNIEnv *, jobject, jstring, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/JAVA/CEP/jParmFacade/jParmFacade.spec.in b/JAVA/CEP/jParmFacade/jParmFacade.spec.in deleted file mode 100644 index f053bd89130..00000000000 --- a/JAVA/CEP/jParmFacade/jParmFacade.spec.in +++ /dev/null @@ -1,160 +0,0 @@ -# -*- Mode:rpm-spec -*- -# jParmFacade.spec.in -# - -############################################################################## -# -# Preamble -# -############################################################################## - -Summary: jParmFacade is ... brief description ... - -%define release @RPM_RELEASE@ -%define version @VERSION@ -%define pkgname @PACKAGE@ -%define pkgdir %{pkgname}-%{version}-%{release} -%define prefix /opt/lofar -%define configure_args @RPM_CONFIGURE_ARGS@ -##define build_kernel_version @BUILD_KERNEL_VERSION@ - -Name: %{pkgname} -Version: %{version} -Release: %{release} -Copyright: LGPL -Group: Application/System -Source: %{pkgname}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{pkgdir}-root -URL: http://www.astron.nl -Prefix: %{prefix} -BuildArchitectures: i386 # Target platforms, i.e., i586 -##Requires: Common = 1.2 ## define dependent packages here -Packager: %{packager} -Distribution: The LOFAR project -Vendor: ASTRON - -AutoReqProv: no - -%description - -jParmFacade ... more detailed description ... - -############################################################################## -# -# prep -# -############################################################################## -%prep -echo $prefix - -# create the build directory, untar the source -%setup - -############################################################################## -# -# build -# -############################################################################## -%build -./configure %{configure_args} --prefix=%{prefix} && make - -############################################################################## -# -# install -# -############################################################################## -%install -# To make things work with BUILDROOT -if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ] -then - echo - echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - echo @ @ - echo @ RPM_BUILD_ROOT is not what I expected. Please clean it yourself. @ - echo @ @ - echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - echo -else - echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT" - rm -rf "$RPM_BUILD_ROOT" -fi -mkdir -p $RPM_BUILD_ROOT%{prefix} -make DESTDIR="$RPM_BUILD_ROOT" install - -#uninstall - -############################################################################## -# -# verify -# -############################################################################## -#verify - -############################################################################## -# -# clean -# -############################################################################## -%clean -# Call me paranoid, but I do not want to be responsible for nuking -# someone's harddrive! -if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ] -then - echo - echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - echo @ @ - echo @ RPM_BUILD_ROOT is not what I expected. Please clean it yourself. @ - echo @ @ - echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - echo -else - echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT" - rm -rf "$RPM_BUILD_ROOT" -fi - -############################################################################## -# -# files -# -############################################################################## - -# empty 'files' means all distributed files -%files -%defattr(-, root, root) -%{prefix} - -# Your application file list goes here -# %{prefix}/lib/lib*.so* - -# Documentation -# doc COPYING ChangeLog README AUTHORS NEWS -# doc doc/* - -# link the module to the correct path -%post - -# before uninstall -%preun - -# after uninstall -%postun - -############################################################################## -# -# package devel -# -############################################################################## - -#package devel -#Summary: Development files for %{pkgname} -#Group: Applications/System -#description devel -#Development files for %{pkgname}. - -#files devel - -# Your development files go here -# Programmers documentation goes here -#doc doc - -# end of file diff --git a/JAVA/CEP/jParmFacade/manifest.mf b/JAVA/CEP/jParmFacade/manifest.mf deleted file mode 100644 index 328e8e5bc3b..00000000000 --- a/JAVA/CEP/jParmFacade/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/JAVA/CEP/jParmFacade/pom.xml b/JAVA/CEP/jParmFacade/pom.xml deleted file mode 100644 index e702b5eb858..00000000000 --- a/JAVA/CEP/jParmFacade/pom.xml +++ /dev/null @@ -1,90 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<project - xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - <groupId>nl.astron.lofar.cep</groupId> - <artifactId>jParmFacade</artifactId> - <name>jParmFacade</name> - <version>1.0.2</version> - - <organization> - <name>Astron</name> - <url>http://www.astron.nl</url> - </organization> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.test.sourceEncoding>UTF-8</project.test.sourceEncoding> - </properties> - - <build> - - <sourceDirectory>src</sourceDirectory> - <testSourceDirectory>test</testSourceDirectory> - - <resources> - <resource> - <directory>src</directory> - <excludes> - <exclude>**/*.java</exclude> - </excludes> - </resource> - - <resource> - <directory>conf</directory> - <excludes> - <exclude>**/*.java</exclude> - </excludes> - </resource> - - <resource> - <directory>include</directory> - <excludes> - <exclude>**/*.java</exclude> - </excludes> - </resource> - - </resources> - - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.6</source> - <target>1.6</target> - </configuration> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>nl.astron.lofar.sas</groupId> - <artifactId>jOTDB3</artifactId> - <version>1.0.2</version> - </dependency> - - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.16</version> - </dependency> - </dependencies> - - <distributionManagement> - <snapshotRepository> - <id>snapshots</id> - <name>Astron Nexus Repository</name> - <url>https://support.astron.nl/nexus/content/repositories/snapshots/</url> - </snapshotRepository> - </distributionManagement> - -</project> - - diff --git a/JAVA/CEP/jParmFacade/src/Makefile.am b/JAVA/CEP/jParmFacade/src/Makefile.am deleted file mode 100644 index a8064c8658e..00000000000 --- a/JAVA/CEP/jParmFacade/src/Makefile.am +++ /dev/null @@ -1,34 +0,0 @@ -# if HAVE_SHMEM -# SUBDIRS = shmem . -# endif - -lib_LTLIBRARIES = libjparmfacade.la - -libjparmfacade_la_SOURCES = $(DOCHDRS) \ - nl_astron_lofar_java_cep_jparmfacade_jParmFacade.cc - -# AM_YFLAGS = -d -p KeyParse -# AM_LFLAGS = -PKeyTokenize -# LEX_OUTPUT_ROOT = lex.KeyTokenize - -if HAVE_SHMEM -libjparmfacade_la_LIBADD = $(prefix)/lib/libshmem.la -endif - -bin_PROGRAMS = - -# Lines to build a program prg -#prg_SOURCES = prg.cc -#prg_LDADD = libjparmfacade.la -#prg_DEPENDENCIES = libjparmfacade.la $(LOFAR_DEPEND) - -glishdir = $(libexecdir)/glish -dist_glish_SCRIPTS = - -pythondir = $(bindir) -dist_python_SCRIPTS = - -scriptdir = $(bindir) -dist_script_SCRIPTS = - -include $(top_srcdir)/Makefile.common diff --git a/JAVA/CEP/jParmFacade/test/Makefile.am b/JAVA/CEP/jParmFacade/test/Makefile.am deleted file mode 100644 index 22ad8b25407..00000000000 --- a/JAVA/CEP/jParmFacade/test/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -check_PROGRAMS = - -# programs to run through supplied checktools -CHECKTOOLPROGS = -#ENDCHECKTOOLPROGS - -# scripts used to run tests -TESTSCRIPTS = - -# scripts and possible programs to run tests -TESTS = $(TESTSCRIPTS) - -XFAIL_TESTS = - -# all files (.run, .stdout, .in, .log_prop, etc.) needed to run tests -EXTRA_DIST = $(TESTSCRIPTS) - -# Lines to build a test program testprg -#testprg_SOURCES = testprg.cc -#testprg_LDADD = ../src/libjparmfacade.la -#testprg_DEPENDENCIES = ../src/libjparmfacade.la $(LOFAR_DEPEND) - - - -include $(top_srcdir)/Makefile.common diff --git a/JAVA/GUI/MAC/jRSP/build.xml b/JAVA/GUI/MAC/jRSP/build.xml deleted file mode 100644 index 06bdfa758ad..00000000000 --- a/JAVA/GUI/MAC/jRSP/build.xml +++ /dev/null @@ -1,69 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- You may freely edit this file. See commented blocks below for --> -<!-- some examples of how to customize the build. --> -<!-- (If you delete it and reopen the project it will be recreated.) --> -<project name="jRSP" default="default" basedir="."> - <description>Builds, tests, and runs the project jRSP.</description> - <import file="nbproject/build-impl.xml"/> - <!-- - - There exist several targets which are by default empty and which can be - used for execution of your tasks. These targets are usually executed - before and after some main targets. They are: - - -pre-init: called before initialization of project properties - -post-init: called after initialization of project properties - -pre-compile: called before javac compilation - -post-compile: called after javac compilation - -pre-compile-single: called before javac compilation of single file - -post-compile-single: called after javac compilation of single file - -pre-compile-test: called before javac compilation of JUnit tests - -post-compile-test: called after javac compilation of JUnit tests - -pre-compile-test-single: called before javac compilation of single JUnit test - -post-compile-test-single: called after javac compilation of single JUunit test - -pre-jar: called before JAR building - -post-jar: called after JAR building - -post-clean: called after cleaning build products - - (Targets beginning with '-' are not intended to be called on their own.) - - Example of inserting an obfuscator after compilation could look like this: - - <target name="-post-compile"> - <obfuscate> - <fileset dir="${build.classes.dir}"/> - </obfuscate> - </target> - - For list of available properties check the imported - nbproject/build-impl.xml file. - - - Another way to customize the build is by overriding existing main targets. - The targets of interest are: - - -init-macrodef-javac: defines macro for javac compilation - -init-macrodef-junit: defines macro for junit execution - -init-macrodef-debug: defines macro for class debugging - -init-macrodef-java: defines macro for class execution - -do-jar-with-manifest: JAR building (if you are using a manifest) - -do-jar-without-manifest: JAR building (if you are not using a manifest) - run: execution of project - -javadoc-build: Javadoc generation - test-report: JUnit report generation - - An example of overriding the target for project execution could look like this: - - <target name="run" depends="jRSP-impl.jar"> - <exec dir="bin" executable="launcher.exe"> - <arg file="${dist.jar}"/> - </exec> - </target> - - Notice that the overridden target depends on the jar target and not only on - the compile target as the regular run target does. Again, for a list of available - properties which you can use, check the target you are overriding in the - nbproject/build-impl.xml file. - - --> -</project> diff --git a/JAVA/GUI/MAC/jRSP/manifest.mf b/JAVA/GUI/MAC/jRSP/manifest.mf deleted file mode 100644 index 328e8e5bc3b..00000000000 --- a/JAVA/GUI/MAC/jRSP/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/JAVA/GUI/Plotter/pom.xml b/JAVA/GUI/Plotter/pom.xml index 8def45692af..e64802db0d7 100644 --- a/JAVA/GUI/Plotter/pom.xml +++ b/JAVA/GUI/Plotter/pom.xml @@ -1,62 +1,47 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - <groupId>nl.astron.lofar.gui</groupId> - <artifactId>plotter</artifactId> - <name>Java Plotter GUI Lib</name> - <version>1.0.2</version> - - <organization> - <name>Astron</name> - <url>http://www.astron.nl</url> - </organization> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.test.sourceEncoding>UTF-8</project.test.sourceEncoding> - </properties> - - <build> - <sourceDirectory>src</sourceDirectory> - <resources> - <resource> - <directory>src</directory> - <excludes> - <exclude>**/*.java</exclude> - </excludes> - </resource> - - <resource> - <directory>PlotterConfig/src</directory> - <excludes> - <exclude>**/*.java</exclude> - </excludes> - </resource> - </resources> - - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.6</source> - <target>1.6</target> - </configuration> - </plugin> - </plugins> - - </build> - - <distributionManagement> - <snapshotRepository> - <id>snapshots</id> - <name>Astron Nexus Repository</name> - <url>https://support.astron.nl/nexus/content/repositories/snapshots/</url> - </snapshotRepository> - </distributionManagement> - -</project> +<?xml version="1.0" encoding="UTF-8"?> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <name>Lofar Utilities :: Plotter GUI</name> + + <parent> + <groupId>nl.astron.lofar.lib</groupId> + <artifactId>lofar-lib-parent</artifactId> + <version>1.8.2-SNAPSHOT</version> + <relativePath>../../pom.xml</relativePath> + </parent> + + <artifactId>plotter</artifactId> + + + <!-- Specification for the SCM used by the project, such as CVS, Subversion, etc. --> + <scm> + <connection>scm:svn:https://svn.astron.nl/LOFAR/trunk/JAVA/GUI/Plotter</connection> + <developerConnection>scm:svn:https://svn.astron.nl/LOFAR/trunk/JAVA/GUI/Plotter</developerConnection> + </scm> + + + <!-- Information required to build a project. --> + <build> + <sourceDirectory>src</sourceDirectory> + <resources> + <resource> + <directory>src</directory> + <excludes> + <exclude>**/*.java</exclude> + </excludes> + </resource> + + <resource> + <directory>PlotterConfig/src</directory> + <excludes> + <exclude>**/*.java</exclude> + </excludes> + </resource> + </resources> + + </build> + +</project> diff --git a/JAVA/LofarUtils/pom.xml b/JAVA/LofarUtils/pom.xml index dc86fd46678..f60c7c769cb 100644 --- a/JAVA/LofarUtils/pom.xml +++ b/JAVA/LofarUtils/pom.xml @@ -1,65 +1,52 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<project - xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - <groupId>nl.astron.lofar</groupId> - <artifactId>lofarutils</artifactId> - <name>Lofar Utils</name> - <version>1.0.2</version> - - <organization> - <name>Astron</name> - <url>http://www.astron.nl</url> - </organization> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.test.sourceEncoding>UTF-8</project.test.sourceEncoding> - </properties> - - <build> - <sourceDirectory>src</sourceDirectory> - <resources> - <resource> - <directory>src</directory> - <excludes> - <exclude>**/*.java</exclude> - </excludes> - </resource> - </resources> - - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.6</source> - <target>1.6</target> - </configuration> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.16</version> - </dependency> - </dependencies> - - <distributionManagement> - <snapshotRepository> - <id>snapshots</id> - <name>Astron Nexus Repository</name> - <url>https://support.astron.nl/nexus/content/repositories/snapshots/</url> - </snapshotRepository> - </distributionManagement> - - -</project> \ No newline at end of file +<?xml version="1.0" encoding="UTF-8"?> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <name>Lofar Utilities :: LofarUtils</name> + + <parent> + <groupId>nl.astron.lofar.lib</groupId> + <artifactId>lofar-lib-parent</artifactId> + <version>1.8.2-SNAPSHOT</version> + </parent> + + <artifactId>lofarutils</artifactId> + + + <!-- Specification for the SCM used by the project, such as CVS, Subversion, etc. --> + <scm> + <connection>scm:svn:https://svn.astron.nl/LOFAR/trunk/JAVA/LofarUtils</connection> + <developerConnection>scm:svn:https://svn.astron.nl/LOFAR/trunk/JAVA/LofarUtils</developerConnection> + </scm> + + + <!-- Information required to build a project. --> + <build> + <sourceDirectory>src</sourceDirectory> + <resources> + <resource> + <directory>src</directory> + <excludes> + <exclude>**/*.java</exclude> + </excludes> + </resource> + </resources> + </build> + + + <!-- This element describes all of the dependencies associated with a project. + These dependencies are used to construct a classpath for your project during + the build process. They are automatically downloaded from the repositories + defined in this project. See for more information: + http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html --> + <dependencies> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </dependency> + </dependencies> + +</project> + diff --git a/JAVA/MAC/jRSP/Makefile.am b/JAVA/MAC/jRSP/Makefile.am deleted file mode 100644 index 68d785500ca..00000000000 --- a/JAVA/MAC/jRSP/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -SUBDIRS=src test include - -ACLOCAL_AMFLAGS = -I autoconf_share - -pkgextdir = $(prefix)/config/$(PACKAGE) -pkgext_DATA = pkgext pkgextcppflags pkgextcxxflags pkgextldflags - -DISTCHECK_CONFIGURE_FLAGS=\ - --with-common=$(prefix) - -EXTRA_DIST = \ - Makefile.common \ - jRSP.spec \ - autoconf_share/compiletool - -include $(top_srcdir)/Makefile.common diff --git a/JAVA/MAC/jRSP/bootstrap b/JAVA/MAC/jRSP/bootstrap deleted file mode 100755 index 06f18cde1db..00000000000 --- a/JAVA/MAC/jRSP/bootstrap +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -../../../autoconf_share/bootstrap ../../../autoconf_share diff --git a/JAVA/MAC/jRSP/build.xml b/JAVA/MAC/jRSP/build.xml deleted file mode 100644 index 06bdfa758ad..00000000000 --- a/JAVA/MAC/jRSP/build.xml +++ /dev/null @@ -1,69 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- You may freely edit this file. See commented blocks below for --> -<!-- some examples of how to customize the build. --> -<!-- (If you delete it and reopen the project it will be recreated.) --> -<project name="jRSP" default="default" basedir="."> - <description>Builds, tests, and runs the project jRSP.</description> - <import file="nbproject/build-impl.xml"/> - <!-- - - There exist several targets which are by default empty and which can be - used for execution of your tasks. These targets are usually executed - before and after some main targets. They are: - - -pre-init: called before initialization of project properties - -post-init: called after initialization of project properties - -pre-compile: called before javac compilation - -post-compile: called after javac compilation - -pre-compile-single: called before javac compilation of single file - -post-compile-single: called after javac compilation of single file - -pre-compile-test: called before javac compilation of JUnit tests - -post-compile-test: called after javac compilation of JUnit tests - -pre-compile-test-single: called before javac compilation of single JUnit test - -post-compile-test-single: called after javac compilation of single JUunit test - -pre-jar: called before JAR building - -post-jar: called after JAR building - -post-clean: called after cleaning build products - - (Targets beginning with '-' are not intended to be called on their own.) - - Example of inserting an obfuscator after compilation could look like this: - - <target name="-post-compile"> - <obfuscate> - <fileset dir="${build.classes.dir}"/> - </obfuscate> - </target> - - For list of available properties check the imported - nbproject/build-impl.xml file. - - - Another way to customize the build is by overriding existing main targets. - The targets of interest are: - - -init-macrodef-javac: defines macro for javac compilation - -init-macrodef-junit: defines macro for junit execution - -init-macrodef-debug: defines macro for class debugging - -init-macrodef-java: defines macro for class execution - -do-jar-with-manifest: JAR building (if you are using a manifest) - -do-jar-without-manifest: JAR building (if you are not using a manifest) - run: execution of project - -javadoc-build: Javadoc generation - test-report: JUnit report generation - - An example of overriding the target for project execution could look like this: - - <target name="run" depends="jRSP-impl.jar"> - <exec dir="bin" executable="launcher.exe"> - <arg file="${dist.jar}"/> - </exec> - </target> - - Notice that the overridden target depends on the jar target and not only on - the compile target as the regular run target does. Again, for a list of available - properties which you can use, check the target you are overriding in the - nbproject/build-impl.xml file. - - --> -</project> diff --git a/JAVA/MAC/jRSP/configure.in b/JAVA/MAC/jRSP/configure.in deleted file mode 100644 index ba1960f4a30..00000000000 --- a/JAVA/MAC/jRSP/configure.in +++ /dev/null @@ -1,74 +0,0 @@ -dnl -dnl Process this file with autoconf to produce a configure script. -dnl -AC_INIT -dnl AC_CONFIG_AUX_DIR(config) -dnl AM_CONFIG_HEADER(config/config.h) -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(jRSP, 1.0, no-define) - -dnl Initialize for LOFAR (may set compilers) -lofar_INIT - -dnl Checks for programs. -AC_PROG_AWK -AC_PROG_YACC -AC_PROG_CC -AC_PROG_CXX -AM_PROG_LEX -AC_PROG_INSTALL -AC_PROG_LN_S -dnl AC_DISABLE_SHARED -AC_PROG_LIBTOOL - -dnl Checks for libraries. - -dnl dnl Replace `main' with a function in -lfl: -dnl AC_CHECK_LIB(fl, main) -dnl dnl Replace `main' with a function in -lcosev_r: -dnl AC_CHECK_LIB(cosev_r, main) -dnl dnl Replace `main' with a function in -lcosnm_r: -dnl AC_CHECK_LIB(cosnm_r, main) -dnl dnl Replace `main' with a function in -lorb_r: -dnl AC_CHECK_LIB(orb_r, main) -dnl dnl Replace `main' with a function in -lpthread: -dnl AC_CHECK_LIB(pthread, main) -dnl dnl Replace `main' with a function in -lvport_r: -dnl AC_CHECK_LIB(vport_r, main) - -dnl Checks for header files. -AC_HEADER_STDC -AC_CHECK_HEADERS(unistd.h) - -dnl Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_SIZE_T - -dnl Checks for library functions. -AC_FUNC_VPRINTF - -dnl -dnl Check for LOFAR specific things -dnl -lofar_GENERAL -lofar_BLITZ -dnl lofar_MPI -lofar_INTERNAL(LCS/Common,Common,,1,Common/LofarTypedefs.h,,) -lofar_INTERNAL(MAC/GCF/TM, GCFTM,, 1, GCF/TM/GCF_Control.h,,) -lofar_INTERNAL(MAC/GCF/GCFCommon, GCFCommon,, 1, GCF/GCF_Defines.h,,) -lofar_INTERNAL(MAC/APL/PIC/RSP_Protocol, RSP_Protocol,,1, APL/RSP_Protocol/RSP_Protocol.ph,,) -lofar_INTERNAL(MAC/APL/GUI/RSP, RSP,,1, RSP/RSPport.h,,) - -dnl -dnl Output Makefiles -dnl -AC_CONFIG_FILES([test/runctest.sh:autoconf_share/runctest.sh.in], - [chmod +x test/runctest.sh]) -AC_OUTPUT( -include/Makefile -include/jRSP/Makefile -src/Makefile -test/Makefile -Makefile -jRSP.spec -) diff --git a/JAVA/MAC/jRSP/depcomp b/JAVA/MAC/jRSP/depcomp deleted file mode 100644 index ffcd540c336..00000000000 --- a/JAVA/MAC/jRSP/depcomp +++ /dev/null @@ -1,529 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2005-02-09.22 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>. - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to <bug-automake@gnu.org>. -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# Some modes work just like other modes, but use different flags. We -# parameterize here, but still list the modes in the big case below, -# to make depend.m4 easier to write. Note that we *cannot* use a case -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout -fi - -case "$depmode" in -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. - "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -gcc) -## There are various ways to get dependency output from gcc. Here's -## why we pick this rather obscure method: -## - Don't want to use -MD because we'd like the dependencies to end -## up in a subdir. Having to rename by hand is ugly. -## (We might end up doing this anyway to support other compilers.) -## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). -## - Using -M directly means running the compiler twice (even worse -## than renaming). - if test -z "$gccflag"; then - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. - sed -e 's/^[^:]*: / /' \ - -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" -## This next piece of magic avoids the `deleted header file' problem. -## The problem is that when a header file which appears in a .P file -## is deleted, the dependency causes make to die (because there is -## typically no way to rebuild the header). We avoid this by adding -## dummy dependencies for each header file. Too bad gcc doesn't do -## this for us directly. - tr ' ' ' -' < "$tmpdepfile" | -## Some versions of gcc put a space before the `:'. On the theory -## that the space means something, we add a space to the output as -## well. -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # This case exists only to let depend.m4 do its work. It works by - # looking at the text of this script. This case will never be run, - # since it is checked for above. - exit 1 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like `#:fec' to the end of the - # dependency line. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr ' -' ' ' >> $depfile - echo >> $depfile - - # The second pass generates a dummy entry for each header file. - tr ' ' ' -' < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> $depfile - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -aix) - # The C for AIX Compiler uses -M and outputs the dependencies - # in a .u file. In older versions, this file always lives in the - # current directory. Also, the AIX compiler puts `$object:' at the - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" - if test "$libtool" = yes; then - "$@" -Wc,-M - else - "$@" -M - fi - stat=$? - - if test -f "$tmpdepfile"; then : - else - stripped=`echo "$stripped" | sed 's,^.*/,,'` - tmpdepfile="$stripped.u" - fi - - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - - if test -f "$tmpdepfile"; then - outname="$stripped.o" - # Each line is of the form `foo.o: dependent.h'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" - sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" - else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -icc) - # Intel's C compiler understands `-MD -MF file'. However on - # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c - # ICC 7.0 will fill foo.d with something like - # foo.o: sub/foo.c - # foo.o: sub/foo.h - # which is wrong. We want: - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output - # foo.o: sub/foo.c sub/foo.h - # and will wrap long lines using \ : - # foo.o: sub/foo.c ... \ - # sub/foo.h ... \ - # ... - - "$@" -MD -MF "$tmpdepfile" - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" - # Some versions of the HPUX 10.20 sed can't process this invocation - # correctly. Breaking it into two sed invocations is a workaround. - sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | - sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -tru64) - # The Tru64 compiler uses -MD to generate dependencies as a side - # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. - # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put - # dependencies in `foo.d' instead, so we check for that too. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mecanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a tab and a space in the []. - sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; - -#nosideeffect) - # This comment above is used by automake to tell side-effect - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # Require at least two characters before searching for `:' - # in the target name. This is to cope with DOS-style filenames: - # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. - "$@" $dashmflag | - sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tr ' ' ' -' < "$tmpdepfile" | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no - for arg in "$@"; do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - sed '1,2d' "$tmpdepfile" | tr ' ' ' -' | \ -## Some versions of the HPUX 10.20 sed can't process this invocation -## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" "$tmpdepfile".bak - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test $1 != '--mode=compile'; do - shift - done - shift - fi - - # Remove `-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - "$@" -E | - sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - "$@" || exit $? - IFS=" " - for arg - do - case "$arg" in - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; - *) - set fnord "$@" "$arg" - shift - shift - ;; - esac - done - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" - echo " " >> "$depfile" - . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/JAVA/MAC/jRSP/include/jRSP/nl_astron_lofar_java_mac_jrsp_Board.h b/JAVA/MAC/jRSP/include/jRSP/nl_astron_lofar_java_mac_jrsp_Board.h deleted file mode 100644 index dca8ceb9c02..00000000000 --- a/JAVA/MAC/jRSP/include/jRSP/nl_astron_lofar_java_mac_jrsp_Board.h +++ /dev/null @@ -1,125 +0,0 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include <jni.h> -/* Header for class nl_astron_lofar_java_mac_jrsp_Board */ - -#ifndef _Included_nl_astron_lofar_java_mac_jrsp_Board -#define _Included_nl_astron_lofar_java_mac_jrsp_Board -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: nl_astron_lofar_java_mac_jrsp_Board - * Method: init - * Signature: (Ljava/lang/String;)I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_java_mac_jrsp_Board_init - (JNIEnv *, jobject, jstring); - -/* - * Class: nl_astron_lofar_java_mac_jrsp_Board - * Method: delete - * Signature: (I)V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_java_mac_jrsp_Board_delete - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_java_mac_jrsp_Board - * Method: retrieveStatus - * Signature: (II)[Lnl/astron/lofar/java/mac/jrsp/BoardStatus; - */ -JNIEXPORT jobjectArray JNICALL Java_nl_astron_lofar_java_mac_jrsp_Board_retrieveStatus - (JNIEnv *, jobject, jint, jint); - -/* - * Class: nl_astron_lofar_java_mac_jrsp_Board - * Method: setWaveformSettings - * Signature: (IIDSII)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_java_mac_jrsp_Board_setWaveformSettings - (JNIEnv *, jobject, jint, jint, jdouble, jshort, jint, jint); - -/* - * Class: nl_astron_lofar_java_mac_jrsp_Board - * Method: getSubbandStats - * Signature: (II)[D - */ -JNIEXPORT jdoubleArray JNICALL Java_nl_astron_lofar_java_mac_jrsp_Board_getSubbandStats - (JNIEnv *, jobject, jint, jint); - -/* - * Class: nl_astron_lofar_java_mac_jrsp_Board - * Method: getWaveformSettings - * Signature: (II)[Lnl/astron/lofar/java/mac/jrsp/WGRegisterType; - */ -JNIEXPORT jobjectArray JNICALL Java_nl_astron_lofar_java_mac_jrsp_Board_getWaveformSettings - (JNIEnv *, jobject, jint, jint); - -/* - * Class: nl_astron_lofar_java_mac_jrsp_Board - * Method: getNrRCUs - * Signature: (I)I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_java_mac_jrsp_Board_getNrRCUs - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_java_mac_jrsp_Board - * Method: getNrRSPBoards - * Signature: (I)I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_java_mac_jrsp_Board_getNrRSPBoards - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_java_mac_jrsp_Board - * Method: getMaxRSPBoards - * Signature: (I)I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_java_mac_jrsp_Board_getMaxRSPBoards - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_java_mac_jrsp_Board - * Method: setFilter - * Signature: (III)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_java_mac_jrsp_Board_setFilter - (JNIEnv *, jobject, jint, jint, jint); - -/* - * Class: nl_astron_lofar_java_mac_jrsp_Board - * Method: sendClear - * Signature: (II)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_java_mac_jrsp_Board_sendClear - (JNIEnv *, jobject, jint, jint); - -/* - * Class: nl_astron_lofar_java_mac_jrsp_Board - * Method: sendReset - * Signature: (II)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_java_mac_jrsp_Board_sendReset - (JNIEnv *, jobject, jint, jint); - -/* - * Class: nl_astron_lofar_java_mac_jrsp_Board - * Method: sendSync - * Signature: (II)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_java_mac_jrsp_Board_sendSync - (JNIEnv *, jobject, jint, jint); - -/* - * Class: nl_astron_lofar_java_mac_jrsp_Board - * Method: getBeamletStats - * Signature: (II)[D - */ -JNIEXPORT jdoubleArray JNICALL Java_nl_astron_lofar_java_mac_jrsp_Board_getBeamletStats - (JNIEnv *, jobject, jint, jint); - -#ifdef __cplusplus -} -#endif -#endif diff --git a/JAVA/MAC/jRSP/jRSP.spec.in b/JAVA/MAC/jRSP/jRSP.spec.in deleted file mode 100644 index f4c8ce83a3f..00000000000 --- a/JAVA/MAC/jRSP/jRSP.spec.in +++ /dev/null @@ -1,160 +0,0 @@ -# -*- Mode:rpm-spec -*- -# jRSP.spec.in -# - -############################################################################## -# -# Preamble -# -############################################################################## - -Summary: jRSP is ... brief description ... - -%define release @RPM_RELEASE@ -%define version @VERSION@ -%define pkgname @PACKAGE@ -%define pkgdir %{pkgname}-%{version}-%{release} -%define prefix /opt/lofar -%define configure_args @RPM_CONFIGURE_ARGS@ -##define build_kernel_version @BUILD_KERNEL_VERSION@ - -Name: %{pkgname} -Version: %{version} -Release: %{release} -Copyright: LGPL -Group: Application/System -Source: %{pkgname}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{pkgdir}-root -URL: http://www.astron.nl -Prefix: %{prefix} -BuildArchitectures: i386 # Target platforms, i.e., i586 -##Requires: Common = 1.2 ## define dependent packages here -Packager: %{packager} -Distribution: The LOFAR project -Vendor: ASTRON - -AutoReqProv: no - -%description - -jRSP ... more detailed description ... - -############################################################################## -# -# prep -# -############################################################################## -%prep -echo $prefix - -# create the build directory, untar the source -%setup - -############################################################################## -# -# build -# -############################################################################## -%build -./configure %{configure_args} --prefix=%{prefix} && make - -############################################################################## -# -# install -# -############################################################################## -%install -# To make things work with BUILDROOT -if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ] -then - echo - echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - echo @ @ - echo @ RPM_BUILD_ROOT is not what I expected. Please clean it yourself. @ - echo @ @ - echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - echo -else - echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT" - rm -rf "$RPM_BUILD_ROOT" -fi -mkdir -p $RPM_BUILD_ROOT%{prefix} -make DESTDIR="$RPM_BUILD_ROOT" install - -#uninstall - -############################################################################## -# -# verify -# -############################################################################## -#verify - -############################################################################## -# -# clean -# -############################################################################## -%clean -# Call me paranoid, but I do not want to be responsible for nuking -# someone's harddrive! -if [ "$RPM_BUILD_ROOT" != "%{_tmppath}/%{pkgdir}-root" ] -then - echo - echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - echo @ @ - echo @ RPM_BUILD_ROOT is not what I expected. Please clean it yourself. @ - echo @ @ - echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ - echo -else - echo Cleaning RPM_BUILD_ROOT: "$RPM_BUILD_ROOT" - rm -rf "$RPM_BUILD_ROOT" -fi - -############################################################################## -# -# files -# -############################################################################## - -# empty 'files' means all distributed files -%files -%defattr(-, root, root) -%{prefix} - -# Your application file list goes here -# %{prefix}/lib/lib*.so* - -# Documentation -# doc COPYING ChangeLog README AUTHORS NEWS -# doc doc/* - -# link the module to the correct path -%post - -# before uninstall -%preun - -# after uninstall -%postun - -############################################################################## -# -# package devel -# -############################################################################## - -#package devel -#Summary: Development files for %{pkgname} -#Group: Applications/System -#description devel -#Development files for %{pkgname}. - -#files devel - -# Your development files go here -# Programmers documentation goes here -#doc doc - -# end of file diff --git a/JAVA/MAC/jRSP/manifest.mf b/JAVA/MAC/jRSP/manifest.mf deleted file mode 100644 index 328e8e5bc3b..00000000000 --- a/JAVA/MAC/jRSP/manifest.mf +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -X-COMMENT: Main-Class will be added automatically by build - diff --git a/JAVA/MAC/jRSP/pom.xml b/JAVA/MAC/jRSP/pom.xml deleted file mode 100644 index 10e01f64e00..00000000000 --- a/JAVA/MAC/jRSP/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<project> - <modelVersion>4.0.0</modelVersion> - <groupId>nl.astron.lofar.mac</groupId> - <artifactId>jRSP</artifactId> - <name>jRSP</name> - <version>1.0.0</version> - - <organization> - <name>Astron</name> - <url>http://www.astron.nl</url> - </organization> - - <build> - - - <sourceDirectory>src</sourceDirectory> - - <resources> - <resource> - <directory>src</directory> - <excludes> - <exclude>**/*.java</exclude> - </excludes> - </resource> - </resources> - - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.6</source> - <target>1.6</target> - </configuration> - </plugin> - </plugins> - - </build> - - <dependencies> - - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.16</version> - </dependency> - - </dependencies> - -</project> \ No newline at end of file diff --git a/JAVA/MAC/jRSP/src/Makefile.am b/JAVA/MAC/jRSP/src/Makefile.am deleted file mode 100644 index 54490656ef2..00000000000 --- a/JAVA/MAC/jRSP/src/Makefile.am +++ /dev/null @@ -1,24 +0,0 @@ -lib_LTLIBRARIES = libjrsp.la - -libjrsp_la_SOURCES = $(DOCHDRS) nl_astron_lofar_java_mac_jrsp_Board.cc - -# AM_YFLAGS = -d -p KeyParse -# AM_LFLAGS = -PKeyTokenize -# LEX_OUTPUT_ROOT = lex.KeyTokenize - -# if HAVE_SHMEM -# libjotdb2_la_LIBADD = shmem/libshmem.la -# endif - -bin_PROGRAMS = - -glishdir = $(libexecdir)/glish -dist_glish_SCRIPTS = - -pythondir = $(bindir) -dist_python_SCRIPTS = - -scriptdir = $(bindir) -dist_script_SCRIPTS = - -include $(top_srcdir)/Makefile.common diff --git a/JAVA/pom.xml b/JAVA/pom.xml new file mode 100644 index 00000000000..da792280c5d --- /dev/null +++ b/JAVA/pom.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <name>Lofar Utilities :: Parent</name> + + <parent> + <groupId>nl.astron</groupId> + <artifactId>parent</artifactId> + <version>2.0.0</version> + </parent> + + <groupId>nl.astron.lofar.lib</groupId> + <artifactId>lofar-lib-parent</artifactId> + <version>1.8.2-SNAPSHOT</version> + <packaging>pom</packaging> + + + <!-- Specification for the SCM used by the project, such as CVS, Subversion, etc. --> + <scm> + <connection>scm:svn:https://svn.astron.nl/LOFAR/trunk/JAVA</connection> + <developerConnection>scm:svn:https://svn.astron.nl/LOFAR/trunk/JAVA</developerConnection> + </scm> + + + <!-- The modules (sometimes called subprojects) to build as a part of this + project. Each module listed is a relative path to the directory containing + the module. --> + <modules> + <module>LofarUtils</module> + <module>GUI/Plotter</module> + </modules> + + + <!-- Default dependency information for projects that inherit from this + one. The dependencies in this section are not immediately resolved. Instead, + when a POM derived from this one declares a dependency described by a matching + groupId and artifactId, the version and other values from this section are + used for that dependency if they were not already specified. --> + <dependencyManagement> + <dependencies> + + <!-- Child dependencies, childs use the same group-ID and version by default. --> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>lofarutils</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>plotter</artifactId> + <version>${project.version}</version> + </dependency> + + </dependencies> + </dependencyManagement> + +</project> diff --git a/LCS/ApplCommon/include/ApplCommon/Observation.h b/LCS/ApplCommon/include/ApplCommon/Observation.h index 210f15f69fb..4ff478784dc 100644 --- a/LCS/ApplCommon/include/ApplCommon/Observation.h +++ b/LCS/ApplCommon/include/ApplCommon/Observation.h @@ -179,6 +179,7 @@ public: vector<string> stations; int nrSlotsInFrame; int sampleClock; // 160 | 200 + int bitsPerSample; // 4 | 8 | 16 string filter; // LBA_30_80, LBA_10_90, HBA_110_190, etc. string MSNameMask; string realPVSSdatapoint; @@ -198,6 +199,11 @@ public: vector<StreamToStorage> streamsToStorage; + // type of observation + string processType; + string processSubtype; + string strategy; + // couple of values of the virtual instrument as compacted strings string receiverList; string stationList; diff --git a/LCS/ApplCommon/include/ApplCommon/StationDatatypes.h b/LCS/ApplCommon/include/ApplCommon/StationDatatypes.h index cc9ac7860f4..443df01e330 100644 --- a/LCS/ApplCommon/include/ApplCommon/StationDatatypes.h +++ b/LCS/ApplCommon/include/ApplCommon/StationDatatypes.h @@ -40,12 +40,10 @@ namespace LOFAR { typedef bitset<MAX_RCUS> RCUmask_t; typedef bitset<MAX_ANTENNAS> AntennaMask_t; typedef bitset<MAX_SUBBANDS> SubbandMask_t; -typedef bitset<MAX_BEAMLETS> BeamletMask_t; using LOFAR::RCUmask_t; using LOFAR::AntennaMask_t; using LOFAR::SubbandMask_t; -using LOFAR::BeamletMask_t; RCUmask_t Antenna2RCUmask(const AntennaMask_t& am); AntennaMask_t RCU2AntennaMask(const RCUmask_t& rm); diff --git a/LCS/ApplCommon/src/AntennaSets.cc b/LCS/ApplCommon/src/AntennaSets.cc index 14d9d19ac93..15327a090e6 100644 --- a/LCS/ApplCommon/src/AntennaSets.cc +++ b/LCS/ApplCommon/src/AntennaSets.cc @@ -163,17 +163,15 @@ bool AntennaSets::_adoptSelector(const string& selector, const string& antennaFi // next get the pattern string pattern; - uint patLen(0); while (sIdx < strLen && !isdigit(selector[sIdx])) { - pattern[patLen] = selector[sIdx]; - patLen++; + pattern += selector[sIdx]; sIdx++; } - ASSERTSTR(patLen, "Expected a pattern at position " << sIdx << " of selector " << selector); + ASSERTSTR(pattern.length(), "Expected a pattern at position " << sIdx << " of selector " << selector); // now we have both the loopcount and the pattern, apply it to Set. for (uint l = 0; l < loopCnt; l++) { - for (uint p = 0; p < patLen; p++) { + for (uint p = 0; p < pattern.length(); p++) { char input = pattern[p]; ASSERTSTR(input=='l' || input=='h' || input=='H' || input=='.', "character '" << input << diff --git a/LCS/ApplCommon/src/Observation.cc b/LCS/ApplCommon/src/Observation.cc index 4bbd63a1451..3f33ef36bd2 100644 --- a/LCS/ApplCommon/src/Observation.cc +++ b/LCS/ApplCommon/src/Observation.cc @@ -31,6 +31,7 @@ #include <Common/lofar_vector.h> #include <Common/StreamUtil.h> #include <Common/SystemUtil.h> +#include <Common/LofarBitModeInfo.h> #include <ApplCommon/Observation.h> #include <Common/lofar_map.h> @@ -66,6 +67,7 @@ Observation::Observation(const ParameterSet* aParSet, stopTime(0), nyquistZone(0), sampleClock(0), + bitsPerSample(0), splitterOn(false), itsStnHasDualHBA(hasDualHBA) { @@ -73,6 +75,9 @@ Observation::Observation(const ParameterSet* aParSet, string prefix = aParSet->locateModule("Observation") + "Observation."; LOG_TRACE_VAR_STR("'Observation' located at: " << prefix); + string olapprefix = aParSet->locateModule("OLAP") + "OLAP."; + LOG_TRACE_VAR_STR("'OLAP' located at: " << olapprefix); + name = aParSet->getString(prefix+"name", ""); obsID = aParSet->getInt32("_treeID", 0); realPVSSdatapoint = aParSet->getString("_DPname","NOT_THE_REAL_DPNAME"); @@ -101,9 +106,21 @@ Observation::Observation(const ParameterSet* aParSet, } // miscellaneous - sampleClock = aParSet->getUint32(prefix+"sampleClock", 0); - filter = aParSet->getString(prefix+"bandFilter", ""); - antennaArray= aParSet->getString(prefix+"antennaArray", ""); + sampleClock = aParSet->getUint32(prefix+"sampleClock", 0); + filter = aParSet->getString(prefix+"bandFilter", ""); + antennaArray = aParSet->getString(prefix+"antennaArray", ""); + processType = aParSet->getString(prefix+"processType", ""); + processSubtype= aParSet->getString(prefix+"processSubtype", ""); + strategy = aParSet->getString(prefix+"strategy", ""); + + if (aParSet->isDefined(prefix+"nrBitsPerSample")) { + bitsPerSample = aParSet->getUint32(prefix+"nrBitsPerSample", 16); + } else { + // backward compatibility + LOG_WARN("Could not find Observation.nrBitsPerSample, using depricated OLAP.nrBitsPerSample"); + bitsPerSample = aParSet->getUint32(olapprefix+"nrBitsPerSample", 16); + } + nyquistZone = nyquistzoneFromFilter(filter); // new way of specifying the receivers and choosing the antenna array. @@ -133,16 +150,14 @@ Observation::Observation(const ParameterSet* aParSet, storageNodeList = compactedArrayString(aParSet->getString(prefix+"VirtualInstrument.storageNodeList","[]")); // construct array with usable (-1) slots and unusable(999) slots. Unusable slots arise - // when nrSlotsInFrame differs from MAX_BEAMLETS_PER_RSP. - itsSlotTemplate.resize (MAX_BEAMLETS, -1); // assume all are usable. - nrSlotsInFrame = aParSet->getInt(prefix+"nrSlotsInFrame",MAX_BEAMLETS_PER_RSP); - if (nrSlotsInFrame != MAX_BEAMLETS_PER_RSP) { - for (int rsp = 0; rsp < 4; rsp++) { - for (int bl = nrSlotsInFrame; bl < MAX_BEAMLETS_PER_RSP; bl++) { - itsSlotTemplate[rsp*MAX_BEAMLETS_PER_RSP + bl] = 999; - } - } - } + // when nrSlotsInFrame differs from maxBeamletsPerRSP. + itsSlotTemplate.resize (maxBeamlets(bitsPerSample), -1); // assume all are usable. + nrSlotsInFrame = aParSet->getInt(prefix+"nrSlotsInFrame", maxBeamletsPerRSP(bitsPerSample)); + for (int rsp = 0; rsp < 4; rsp++) { + for (int bl = nrSlotsInFrame; bl < maxBeamletsPerRSP(bitsPerSample); bl++) { + itsSlotTemplate[rsp * maxBeamletsPerRSP(bitsPerSample) + bl] = 999; + } + } // determine if DataslotLists are available in this parset itsHasDataslots = _hasDataSlots(aParSet); @@ -302,7 +317,6 @@ Observation::Observation(const ParameterSet* aParSet, } // for all analogue beams // loop over all data products and generate all data flows - string olapprefix = aParSet->locateModule("OLAP") + "OLAP."; if (!olapprefix.empty()) { // offline Pipelines don't have OLAP in the parset. const char *dataProductNames[] = { "Beamformed", "Correlated" }; unsigned dataProductPhases[] = { 3, 2 }; @@ -412,6 +426,12 @@ bool Observation::conflicts(const Observation& other) const return (true); } + // Observation overlap, check bit mode + if (other.bitsPerSample != bitsPerSample) { + LOG_INFO_STR("Bit mode of observation " << obsID << " and " << other.obsID << " conflict"); + return (true); + } + // Observation overlap, check splitters if (other.splitterOn != splitterOn) { LOG_INFO_STR("Splitters of observation " << obsID << " and " << other.obsID << " conflict"); @@ -526,7 +546,7 @@ vector<int> Observation::getBeamAllocation(const string& stationName) const // fill with required information for (int i = RSPboardList.size()-1; i >= 0; --i) { - int idx = RSPboardList[i] * MAX_BEAMLETS_PER_RSP + DataslotList[i]; + int idx = RSPboardList[i] * maxBeamletsPerRSP(bitsPerSample) + DataslotList[i]; if (b2b[idx] != -1) { THROW (Exception, "beamlet " << i << " of beam " << itsBeamSlotList[i] << " clashes with beamlet of other beam(" << b2b[idx] << ")"); } @@ -578,7 +598,7 @@ vector<int> Observation::getBeamlets (uint beamIdx, const string& stationName) c uint nrEntries = itsBeamSlotList.size(); for (uint i = 0; i < nrEntries; ++i) { if (itsBeamSlotList[i] == parsetIdx) { - result.push_back(RSPboardList[i] * MAX_BEAMLETS_PER_RSP + DataslotList[i]); + result.push_back(RSPboardList[i] * maxBeamletsPerRSP(bitsPerSample) + DataslotList[i]); } } return (result); @@ -709,6 +729,7 @@ ostream& Observation::print (ostream& os) const os << "antenna set : " << antennaSet << endl; os << "receiver set : " << RCUset << endl; os << "sampleClock : " << sampleClock << endl; + os << "bits/sample : " << bitsPerSample << endl; os << "filter : " << filter << endl; os << "splitter : " << (splitterOn ? "ON" : "OFF") << endl; os << "nyquistZone : " << nyquistZone << endl << endl; diff --git a/LCS/ApplCommon/src/StationInfo.cc b/LCS/ApplCommon/src/StationInfo.cc index 698a00e9903..f6cbc084553 100644 --- a/LCS/ApplCommon/src/StationInfo.cc +++ b/LCS/ApplCommon/src/StationInfo.cc @@ -147,32 +147,32 @@ string realHostname(const string& someName) // // SAS : LOFAR.PIC.<RING>.<SYSTEM>.xxx // PVSS: <SYSTEM>:LOFAR_PIC_xxx -// ^ ^ ^ -// | | +-- locationPos + locationLen -// | +-- colon -// +-- systemLen // // NOTE: instead of PIC the DPname may contain PermSW or ObsSW_Observation<n> // string PVSS2SASname(const string& PVSSname) { const char* structure_match = "(([A-Z]{2,3}[0-9]{3}[A-Z]?):LOFAR_(PIC|PermSW)_)|" // 1,2,3 - "(([A-Z]{2,3}[0-9]{3}[A-Z]?):LOFAR_(PIC|PermSW)\\.)"; // 4,5,6 + "(([A-Z]{2,3}[0-9]{3}[A-Z]?):LOFAR_(PIC|PermSW)\\.)"; // 4,5,6 const char* location_match = "(RCU[0-9]{3})|" // 1 - "_(CS[0-9]{3}[A-Z]?)_|" // 2 CS999 - "_(RS[0-9]{3}[A-Z]?)_|" // 3 RS999 - "_([ABD-QS-Z][A-Z][0-9]{3}[A-Z]?)_|" // 4 XX999 - "_([A-Z]{3}[0-9]{3}[A-Z]?)_"; // 5 XXX999 + "(LBA[0-9]{3})|" // 2 LBA999 + "(HBA[0-9]{2})|" // 3 HBA99 + "_(CS[0-9]{3}[A-Z]?)_|" // 4 CS999 + "_(RS[0-9]{3}[A-Z]?)_|" // 5 RS999 + "_([ABD-QS-Z][A-Z][0-9]{3}[A-Z]?)_|" // 6 XX999 + "_([A-Z]{3}[0-9]{3}[A-Z]?)_"; // 7 XXX999 const char* separator_match = "(_)|(\\.)"; const char* boundary_match = "(^([^_]+)_)"; const char* structure_repl = "(?1LOFAR_$3_$2_)" // LOFAR_PIC_RS002 "(?4LOFAR_$6.)"; // LOFAR_PIC const char* location_repl = "(?1$&)" // ignore RCU999 - "(?2_Core$&)" - "(?3_Remote$&)" - "(?4_Europe$&)" - "(?5_Control$&)"; + "(?2$&)" + "(?3$&)" + "(?4_Core$&)" + "(?5_Remote$&)" + "(?6_Europe$&)" + "(?7_Control$&)"; const char* separator_repl = "(?1.)(?2_)"; // swap separators const char* boundary_repl = "$2."; // reverse separator on object-field edge diff --git a/LCS/ApplCommon/test/CMakeLists.txt b/LCS/ApplCommon/test/CMakeLists.txt index faab09b58de..d2f57bccdcf 100644 --- a/LCS/ApplCommon/test/CMakeLists.txt +++ b/LCS/ApplCommon/test/CMakeLists.txt @@ -6,3 +6,4 @@ lofar_add_test(tAntField tAntField.cc) lofar_add_test(tAntennaSet tAntennaSet.cc) lofar_add_test(tObservation tObservation.cc) lofar_add_executable(tHasDataslots tHasDataslots.cc) +lofar_add_executable(tStationInfo tStationInfo.cc) diff --git a/LCS/ApplCommon/test/tObservation.cc b/LCS/ApplCommon/test/tObservation.cc index 4903ea8efb1..c333da81378 100644 --- a/LCS/ApplCommon/test/tObservation.cc +++ b/LCS/ApplCommon/test/tObservation.cc @@ -126,6 +126,12 @@ int main (int argc, char* argv[]) Observation conflictObs5(&conflictPS5, false); ASSERTSTR(!obs2.conflicts(conflictObs5), "File 5 should NOT have had a conflict"); cout << "No conflict found in file 5 which is oke." << endl; + + // test conflicts in bit mode + ParameterSet conflictPS6("tObservation.in_conflict6"); + Observation conflictObs6(&conflictPS6, false); + ASSERTSTR(obs2.conflicts(conflictObs6), "File 6 should have had a bit mode conflict"); + cout << "<<<" << endl; // on // basic test on RCU bitsets diff --git a/LCS/ApplCommon/test/tObservation.in_conflict1 b/LCS/ApplCommon/test/tObservation.in_conflict1 index 34afeaf6ccc..07ae577f6da 100644 --- a/LCS/ApplCommon/test/tObservation.in_conflict1 +++ b/LCS/ApplCommon/test/tObservation.in_conflict1 @@ -1,4 +1,5 @@ # Clock is different, while time overlaps on all sides. +OLAP.nrBitsPerSample=16 Clock160.channelWidth=610.3515625 Clock160.samplesPerSecond=155648 Clock160.subbandWidth=156.250 diff --git a/LCS/ApplCommon/test/tObservation.in_conflict2 b/LCS/ApplCommon/test/tObservation.in_conflict2 index 1c3184ecb45..3f8da0d76dc 100644 --- a/LCS/ApplCommon/test/tObservation.in_conflict2 +++ b/LCS/ApplCommon/test/tObservation.in_conflict2 @@ -1,4 +1,5 @@ # Receivers conflict because time overlap and other rcumode +OLAP.nrBitsPerSample=16 Clock160.channelWidth=610.3515625 Clock160.samplesPerSecond=155648 Clock160.subbandWidth=156.250 diff --git a/LCS/ApplCommon/test/tObservation.in_conflict3 b/LCS/ApplCommon/test/tObservation.in_conflict3 index 0f84d04e6c8..ae71c60d203 100644 --- a/LCS/ApplCommon/test/tObservation.in_conflict3 +++ b/LCS/ApplCommon/test/tObservation.in_conflict3 @@ -1,4 +1,5 @@ # beamlets overlap. +OLAP.nrBitsPerSample=16 Clock160.channelWidth=610.3515625 Clock160.samplesPerSecond=155648 Clock160.subbandWidth=156.250 diff --git a/LCS/ApplCommon/test/tObservation.in_conflict4 b/LCS/ApplCommon/test/tObservation.in_conflict4 index 31da254d89c..95ee1dafd1c 100644 --- a/LCS/ApplCommon/test/tObservation.in_conflict4 +++ b/LCS/ApplCommon/test/tObservation.in_conflict4 @@ -1,3 +1,4 @@ +# Conflicts in nrSlotsPerFrame Clock160.channelWidth=610.3515625 Clock160.samplesPerSecond=155648 Clock160.subbandWidth=156.250 diff --git a/LCS/ApplCommon/test/tObservation.in_conflict5 b/LCS/ApplCommon/test/tObservation.in_conflict5 index 0fe1c9debc7..d1bc2a207df 100644 --- a/LCS/ApplCommon/test/tObservation.in_conflict5 +++ b/LCS/ApplCommon/test/tObservation.in_conflict5 @@ -1,4 +1,5 @@ # everything conflicts except for the observation period +OLAP.nrBitsPerSample=8 Clock160.channelWidth=610.3515625 Clock160.samplesPerSecond=155648 Clock160.subbandWidth=156.250 diff --git a/LCS/ApplCommon/test/tObservation.in_conflict6 b/LCS/ApplCommon/test/tObservation.in_conflict6 new file mode 100644 index 00000000000..0d61bdfdfa0 --- /dev/null +++ b/LCS/ApplCommon/test/tObservation.in_conflict6 @@ -0,0 +1,59 @@ +# Conflicts in nrBitsPerSample +OLAP.nrBitsPerSample=8 +Clock160.channelWidth=610.3515625 +Clock160.samplesPerSecond=155648 +Clock160.subbandWidth=156.250 +Clock160.systemClock=160 +Clock200.channelWidth=762.939453125 +Clock200.samplesPerSecond=196608 +Clock200.subbandWidth=195.3125 +Clock200.systemClock=200 +ObsSW.Observation.Beam[0].angle1=6 +ObsSW.Observation.Beam[0].angle2=0.5 +ObsSW.Observation.Beam[0].angleTimes=0 +ObsSW.Observation.Beam[0].beamletList=[40..43] +ObsSW.Observation.Beam[0].directionType=J2000 +ObsSW.Observation.Beam[0].subbandList=[2..5] +ObsSW.Observation.MSNameMask=/data/L${YEAR}_${MSNUMBER}/SB${SUBBAND}.MS +ObsSW.Observation.ObsCtrl.StationCtrl._hostname=[CS016] +ObsSW.Observation.ObsCtrl._hostname=MCU001 +ObsSW.Observation.ObsCtrl.heartbeatInterval=10 +ObsSW.Observation.TBB.TBBsetting.C0=0 +ObsSW.Observation.TBB.TBBsetting.C1=0 +ObsSW.Observation.TBB.TBBsetting.C2=0 +ObsSW.Observation.TBB.TBBsetting.C3=0 +ObsSW.Observation.TBB.TBBsetting.RCUs=[] +ObsSW.Observation.TBB.TBBsetting.baselevel=2048 +ObsSW.Observation.TBB.TBBsetting.filter=128 +ObsSW.Observation.TBB.TBBsetting.operatingMode=1 +ObsSW.Observation.TBB.TBBsetting.startlevel=7 +ObsSW.Observation.TBB.TBBsetting.stoplevel=7 +ObsSW.Observation.TBB.TBBsetting.window=1K +ObsSW.Observation.VirtualInstrument.BGLNodeList=[bgl001,bgl002,bgl003] +ObsSW.Observation.VirtualInstrument.imageNodeList=[lioff005,lioff002,lioff003] +ObsSW.Observation.VirtualInstrument.partitionList=[R001_128_0,R001_128_1,R001_128_2,R001_128_3] +ObsSW.Observation.VirtualInstrument.stationList=[CS016,CS017,CS018] +ObsSW.Observation.VirtualInstrument.storageCapacity=760 +ObsSW.Observation.VirtualInstrument.storageNodeList=[list001,list002] +ObsSW.Observation.antennaArray=HBA +ObsSW.Observation.antennaSet= +ObsSW.Observation.bandFilter=HB_210_240 +ObsSW.Observation.channelWidth=610.3515625 +ObsSW.Observation.channelsPerSubband=256 +ObsSW.Observation.claimPeriod=120 +ObsSW.Observation.clockMode=<<Clock160 +ObsSW.Observation.longBaselines=No +ObsSW.Observation.nrBeamformers=0 +ObsSW.Observation.nrBeams=1 +ObsSW.Observation.nrPolarisations=2 +ObsSW.Observation.nrSlotsInFrame=48 +ObsSW.Observation.preparePeriod=120 +ObsSW.Observation.receiverList=[0..11] +ObsSW.Observation.sampleClock=160 +ObsSW.Observation.samplesPerSecond=155648 +ObsSW.Observation.startTime=2008-Dec-16 15:30:00 +ObsSW.Observation.stopTime=2008-Dec-16 15:34:00 +ObsSW.Observation.subbandWidth=156.250 +_DPname=LOFAR_ObsSW_TempObs0016 +_treeID=5029 +prefix=LOFAR. diff --git a/LCS/ApplCommon/test/tObservation.in_parset1 b/LCS/ApplCommon/test/tObservation.in_parset1 index 971cdc4ade6..018f0d5459f 100644 --- a/LCS/ApplCommon/test/tObservation.in_parset1 +++ b/LCS/ApplCommon/test/tObservation.in_parset1 @@ -1,3 +1,4 @@ +OLAP.nrBitsPerSample=16 Clock160.channelWidth=610.3515625 Clock160.samplesPerSecond=155648 Clock160.subbandWidth=156.250 diff --git a/LCS/ApplCommon/test/tStationInfo.cc b/LCS/ApplCommon/test/tStationInfo.cc index b755f1d4d52..372dc591309 100644 --- a/LCS/ApplCommon/test/tStationInfo.cc +++ b/LCS/ApplCommon/test/tStationInfo.cc @@ -23,17 +23,18 @@ //# Always #include <lofar_config.h> first! #include <lofar_config.h> -#if defined HAVE_BOOST_REGEX - //# Includes #include <Common/LofarLogger.h> + +#if defined HAVE_BOOST_REGEX + #include <Common/SystemUtil.h> #include <ApplCommon/StationInfo.h> #include <boost/regex.hpp> using namespace LOFAR; -int main (int argc, char* argv[]) +int main (int/*argc*/, char* argv[]) { INIT_LOGGER(argv[0]); @@ -59,6 +60,14 @@ int main (int argc, char* argv[]) PVSS2SASname("RS002:LOFAR_ObsSW_Observation5.antennaArray")); LOG_INFO_STR("PVSS==>SAS(RS002:LOFAR_ObsSW_Observation5_BeamControl.status.state) = " << PVSS2SASname("RS002:LOFAR_ObsSW_Observation5_BeamControl.status.state")); + LOG_INFO_STR("PVSS==>SAS(RS005:LOFAR_PIC_HBA05.status.state) = " << + PVSS2SASname("RS005:LOFAR_PIC_HBA05.status.state")); + LOG_INFO_STR("PVSS==>SAS(DE603:LOFAR_PIC_LBA005.status.state) = " << + PVSS2SASname("DE603:LOFAR_PIC_LBA005.status.state")); + LOG_INFO_STR("PVSS==>SAS(CS101:LOFAR_PIC_HBA01.element00.status.state) = " << + PVSS2SASname("CS101:LOFAR_PIC_HBA01.element00.status.state")); + LOG_INFO_STR("PVSS==>SAS(CS101:LOFAR_PIC_HBA02.element12.X.status.state) = " << + PVSS2SASname("CS101:LOFAR_PIC_HBA02.element12.X.status.state")); LOG_INFO_STR("SAS==>PVSS(LOFAR.PIC.Remote.RS002.Cabinet0.Subrack0.status_state) = " << SAS2PVSSname("LOFAR.PIC.Remote.RS002.Cabinet0.Subrack0.status_state")); @@ -68,8 +77,21 @@ int main (int argc, char* argv[]) SAS2PVSSname("LOFAR.PermSW.Control.MCU001.MACScheduler.status_state")); LOG_INFO_STR("SAS==>PVSS(LOFAR.ObsSW.Observation.VirtualInstrument.stationList) = " << SAS2PVSSname("LOFAR.ObsSW.Observation.VirtualInstrument.stationList")); + LOG_INFO_STR("SAS==>PVSS(LOFAR.PIC.Remote.RS005.LBA123.status_state) = " << + SAS2PVSSname("LOFAR.PIC.Remote.RS005.LBA123.status_state")); + LOG_INFO_STR("SAS==>PVSS(LOFAR.PIC.Europe.DE603.HBA23.status_state) = " << + SAS2PVSSname("LOFAR.PIC.Europe.DE603.HBA23.status_state")); return (0); } +#else + +int main (int/*argc*/, char* argv[]) +{ + INIT_LOGGER(argv[0]); + + return 0; +} + #endif diff --git a/LCS/Common/include/Common/CMakeLists.txt b/LCS/Common/include/Common/CMakeLists.txt index 98885fcc004..6ab3bf84263 100644 --- a/LCS/Common/include/Common/CMakeLists.txt +++ b/LCS/Common/include/Common/CMakeLists.txt @@ -27,6 +27,7 @@ install(FILES KVpair.h lofar_algorithm.h lofar_bitset.h + LofarBitModeInfo.h LofarConstants.h lofar_complex.h lofar_datetime.h diff --git a/LCS/Common/include/Common/LofarBitModeInfo.h b/LCS/Common/include/Common/LofarBitModeInfo.h new file mode 100644 index 00000000000..a23db971281 --- /dev/null +++ b/LCS/Common/include/Common/LofarBitModeInfo.h @@ -0,0 +1,67 @@ +//# LofarBitModeInfo.h +//# +//# Copyright (C) 2012 +//# ASTRON (Netherlands Institute for Radio Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands +//# +//# This file is part of the LOFAR software suite. +//# The LOFAR software suite is free software: you can redistribute it and/or +//# modify it under the terms of the GNU General Public License as published +//# by the Free Software Foundation, either version 3 of the License, or +//# (at your option) any later version. +//# +//# The LOFAR software suite is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License along +//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. +//# +//# $Id: LofarBitModeInfo.h 21167 2012-06-08 13:36:34Z mol $ + +#ifndef LOFAR_COMMON_BITMODEINFO_H_ +#define LOFAR_COMMON_BITMODEINFO_H_ + +#include <Common/LofarConstants.h> +#include <cassert> + +namespace LOFAR { + //int maxBeamletsPerRSP(int bitsPerSample); + //int maxBeamlets(int bitsPerSample); + + inline static int maxDataslotsPerRSP(int bitsPerSample) { + assert(bitsPerSample >= MIN_BITS_PER_SAMPLE && bitsPerSample <= MAX_BITS_PER_SAMPLE && bitsPerSample%2==0); + return(61); + } + + + inline static int maxBeamletsPerRSP(int bitsPerSample) { + assert(bitsPerSample >= MIN_BITS_PER_SAMPLE && bitsPerSample <= MAX_BITS_PER_SAMPLE && bitsPerSample%2==0); + switch (bitsPerSample) { + case 4: + return(4*maxDataslotsPerRSP(bitsPerSample)); + case 8: + return(2*maxDataslotsPerRSP(bitsPerSample)); + default: + return(maxDataslotsPerRSP(bitsPerSample)); + } + } + + inline static int maxBeamletsPerBank(int bitsPerSample) { + // 4 output lanes on one station + return(4 * maxDataslotsPerRSP(bitsPerSample)); + } + + inline static int maxBeamletsPerPlane(int bitsPerSample) { + return(maxBeamletsPerBank(bitsPerSample)); + } + + + inline static int maxBeamlets(int bitsPerSample) { + // 4 output lanes on one station + return(4 * maxBeamletsPerRSP(bitsPerSample)); + } +} + +#endif diff --git a/LCS/Common/include/Common/LofarConstants.h b/LCS/Common/include/Common/LofarConstants.h index 0047200fa40..50203b18d8f 100644 --- a/LCS/Common/include/Common/LofarConstants.h +++ b/LCS/Common/include/Common/LofarConstants.h @@ -45,13 +45,14 @@ namespace LOFAR { static const int MAX_ANTENNAS = 96; // Max number antenna's of each type. static const int MAX_RCUS = (MAX_ANTENNAS * N_POL); // Max number of RCU's in one station static const int MAX_SUBBANDS = 512; // Number of subbands that are created - static const int MAX_BEAMLETS_PER_RSP = 61; // Max number of beamlets comming from one RSPboard - static const int MAX_BEAMLETS = (4 * MAX_BEAMLETS_PER_RSP); // Max number of beamlets comming from one station static const int MAX_RSPBOARDS = (MAX_RCUS / NR_RCUS_PER_RSPBOARD); static const int NR_RCU_MODES = 7; static const int NR_SPECTRAL_WINDOWS = 5; + static const int MAX_BITS_PER_SAMPLE = 16; + static const int MIN_BITS_PER_SAMPLE = 4; + static const int MAX_NR_BM_BANKS = (MAX_BITS_PER_SAMPLE / MIN_BITS_PER_SAMPLE); } #endif diff --git a/LCS/Common/include/Common/Thread/Thread.h b/LCS/Common/include/Common/Thread/Thread.h index 2ab828e37a3..aaea0e3abfc 100644 --- a/LCS/Common/include/Common/Thread/Thread.h +++ b/LCS/Common/include/Common/Thread/Thread.h @@ -71,6 +71,7 @@ class Thread void wait(); bool wait(const struct timespec &); + bool isDone(); private: Thread(const Thread&); @@ -189,6 +190,14 @@ inline bool Thread::wait(const struct timespec ×pec) } +inline bool Thread::isDone() +{ + struct timespec deadline = { 0, 0 }; + + return wait(deadline); +} + + template <typename T> inline void Thread::stub(Args<T> *args) { // (un)register WITHIN the thread, since the thread id diff --git a/LCS/Common/include/Common/i4complex.h b/LCS/Common/include/Common/i4complex.h index 6366f47946d..901da26ca6c 100644 --- a/LCS/Common/include/Common/i4complex.h +++ b/LCS/Common/include/Common/i4complex.h @@ -33,15 +33,24 @@ namespace LOFAR { i4complex() {} i4complex(double real, double imag) { - value = ((int) rint(real - .5) & 0xF) | (((int) rint(imag - .5) & 0xF) << 4); + int r = (int) rint(real); + int i = (int) rint(imag); + + // clip to [-7..7] to center dynamic range around 0 + if (r <= -8) r = -7; + if (i <= -8) i = -7; + if (r >= 8) r = 7; + if (i >= 8) i = 7; + + value = (r & 0xF) | ((i & 0xF) << 4); } double real() const { - return ((signed char) (value << 4) >> 4) + .5; // extend sign + return ((signed char) (value << 4) >> 4); // extend sign } double imag() const { - return (value >> 4) + .5; + return (value >> 4); } i4complex conj() const { diff --git a/LCS/Common/src/InputParSet.cc b/LCS/Common/src/InputParSet.cc index 17750b720ac..b4f721b8b29 100644 --- a/LCS/Common/src/InputParSet.cc +++ b/LCS/Common/src/InputParSet.cc @@ -208,7 +208,7 @@ namespace LOFAR { void InputParSet::setVersion (const string& version) { - itsVersion == version; + itsVersion = version; #ifdef HAVE_AIPSPP itsInput->version (version); #endif diff --git a/LCS/Common/test/CMakeLists.txt b/LCS/Common/test/CMakeLists.txt index 34abcc6413e..b6bfef90bbe 100644 --- a/LCS/Common/test/CMakeLists.txt +++ b/LCS/Common/test/CMakeLists.txt @@ -2,6 +2,8 @@ include(LofarCTest) +lofar_add_test(tBoostBitset tBoostBitset.cc) + lofar_add_test(testLogger testLogger.cc) lofar_add_test(tCasaLogSink tCasaLogSink.cc) lofar_add_test(tAllocator tAllocator.cc) diff --git a/LCS/Common/test/tBoostBitset.cc b/LCS/Common/test/tBoostBitset.cc new file mode 100644 index 00000000000..5481fed1f00 --- /dev/null +++ b/LCS/Common/test/tBoostBitset.cc @@ -0,0 +1,64 @@ +#include <lofar_config.h> +#include <iostream> +#include <sstream> +#include <boost/dynamic_bitset.hpp> + +using namespace std; + +int main(int, char*[]) { + boost::dynamic_bitset<> x(25); // all 0's by default + x[0] = 1; + x[1] = 1; + x[22] = 1; + for (boost::dynamic_bitset<>::size_type i = 0; i < x.size(); ++i) + std::cout << x[i]; + std::cout << "\n"; + std::cout << x << "\n"; + std::cout << "size:" << x.size() << "\n"; + std::cout << "count:" << x.count() << "\n"; + std::cout << "num_blocks:" << x.num_blocks() << "\n"; + std::cout << "max_size:" << x.max_size() << "\n"; + std::cout << "bits_per_block:" << x.bits_per_block << "\n"; + std::cout << "sizeof:" << sizeof(x) << "\n"; + + stringstream buf(stringstream::in | stringstream::out); + buf << x; + string s = buf.str(); + cout << "s:" << s << endl; + cout << "len(s):" << s.size() << endl; + + boost::dynamic_bitset<> y(x.size()); + buf >> y; + std::cout << "\nmemcpy to y...\n"; + std::cout << y << "\n"; + std::cout << "size:" << y.size() << "\n"; + std::cout << "count:" << y.count() << "\n"; + std::cout << "num_blocks:" << y.num_blocks() << "\n"; + std::cout << "max_size:" << y.max_size() << "\n"; + std::cout << "bits_per_block:" << y.bits_per_block << "\n"; + std::cout << "sizeof:" << sizeof(y) << "\n"; + + vector<boost::dynamic_bitset<>::block_type> abc; + abc.resize(x.num_blocks()); + vector<boost::dynamic_bitset<>::block_type>::iterator sIter(abc.begin()); + boost::to_block_range(x, sIter); + cout << "AFTER to_block_range" << endl; + + boost::dynamic_bitset<> z(x.size()); + boost::from_block_range(abc.begin(), abc.end(), z); + cout << "AFTER from_block_range" << endl; + + std::cout << "\nblock copy to z...\n"; + std::cout << z << "\n"; + std::cout << "size:" << z.size() << "\n"; + std::cout << "count:" << z.count() << "\n"; + std::cout << "num_blocks:" << z.num_blocks() << "\n"; + std::cout << "max_size:" << z.max_size() << "\n"; + std::cout << "bits_per_block:" << z.bits_per_block << "\n"; + std::cout << "sizeof:" << sizeof(z) << "\n"; + + + + return EXIT_SUCCESS; +} + diff --git a/LCS/MSLofar/include/MSLofar/BeamTables.h b/LCS/MSLofar/include/MSLofar/BeamTables.h index ad0921e859b..902a051b904 100644 --- a/LCS/MSLofar/include/MSLofar/BeamTables.h +++ b/LCS/MSLofar/include/MSLofar/BeamTables.h @@ -59,7 +59,7 @@ namespace LOFAR { bool overwrite = false); // Fill the subtables. They should be empty. - // <src>mustExist</src> tells if the AntennaField and iHBADelta file on + // <src>mustExist</src> tells if the AntennaField and iHBADelta file of // an antenna must exist. static void fill (casa::Table& ms, const string& antennaSet, @@ -68,6 +68,14 @@ namespace LOFAR { const string& iHBADeltaDir, bool mustExist=false); + // Update the beam info subtables for broken elements. + // The 'before' file contains the elements already broken at the beginning + // of the observation. The 'during' file contains elements broken during + // the observation. + /// static void updateBroken (casa::Table& ms, + /// const string& beforeFileName, + /// const string& duringFilename); + // Write an AntennaField entry in the given row. static void writeAntField (MSAntennaFieldColumns& columns, int rownr, int antennaId, const string& stationName, @@ -79,14 +87,15 @@ namespace LOFAR { // Write the possible AntennaField elements. // The elements in the configuration are given in the bitset // starting at the given bit (there is a bit for X and one for Y). - // The number of skipped elements has to be added for HBA1. - static void writeElements (MSAntennaFieldColumns& columns, - int rownr, - const AntField::AFArray& elemOffsets, - const vector<int16>& elemPresent, - bool addSkip, - const AntField::AFArray& stationCenter, - const AntField::AFArray& fieldCenter); + // It returns the diameter of the station calculated from the maximum + // distance of a used element to the center. + static double writeElements (MSAntennaFieldColumns& columns, + int rownr, + const AntField::AFArray& elemOffsets, + const vector<int16>& posIndex, + int addAnt, + const AntField::AFArray& stationCenter, + const AntField::AFArray& fieldCenter); // Write the antenna set name into all rows of the LOFAR_ANTENNA_SET // column of the OBSERVATION table. @@ -104,7 +113,8 @@ namespace LOFAR { // The column is added if not existing. static void writeAntenna (casa::Table& antTable, const casa::Vector<casa::String>& antNames, - const map<string,int>& stationIdMap); + const map<string,int>& stationIdMap, + const vector<double>& diameters); // Convert an AFArray to a casacore Array object. static casa::Array<double> array2Casa (const AntField::AFArray& barray); diff --git a/LCS/MSLofar/include/MSLofar/CMakeLists.txt b/LCS/MSLofar/include/MSLofar/CMakeLists.txt index d83ec1d068f..3416bcffbc7 100644 --- a/LCS/MSLofar/include/MSLofar/CMakeLists.txt +++ b/LCS/MSLofar/include/MSLofar/CMakeLists.txt @@ -21,6 +21,7 @@ set (inst_HEADERS MSStation.h MSStationColumns.h BeamTables.h + FailedTileInfo.h ) # Install header files. diff --git a/LCS/MSLofar/include/MSLofar/FailedTileInfo.h b/LCS/MSLofar/include/MSLofar/FailedTileInfo.h new file mode 100644 index 00000000000..780256bb405 --- /dev/null +++ b/LCS/MSLofar/include/MSLofar/FailedTileInfo.h @@ -0,0 +1,79 @@ +//# FailedTleInfo.cc: Class to write failed tile info into an MS +//# Copyright (C) 2012 +//# ASTRON (Netherlands Institute for Radio Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands +//# +//# This file is part of the LOFAR software suite. +//# The LOFAR software suite is free software: you can redistribute it and/or +//# modify it under the terms of the GNU General Public License as published +//# by the Free Software Foundation, either version 3 of the License, or +//# (at your option) any later version. +//# +//# The LOFAR software suite is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License along +//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. +//# +//# $Id$ + +#ifndef LOFAR_FAILEDTILEINFO_H +#define LOFAR_FAILEDTILEINFO_H + +#include <tables/Tables/Table.h> +#include <casa/Quanta/MVEpoch.h> +#include <casa/Arrays/Matrix.h> + +#include <Common/lofar_vector.h> +#include <Common/lofar_map.h> +#include <Common/lofar_string.h> + +namespace LOFAR { + + class FailedTileInfo + { + public: + // Define a vector of FailedTileInfo objects. + typedef vector<FailedTileInfo> VectorFailed; + + // Construct the object for a failed tile or RCU. + FailedTileInfo (const string& station, const string& time, + const casa::MVEpoch& epoch, const string& type, int seqnr); + + // Read the broken hardware file giving a map of antenna name to a vector + // of pairs of tile/RCU and time. + static map<string, VectorFailed> readFile + (const string& fileName, double startTime, double endTime); + + // Convert the info per station name to info per antennaId. + static vector<VectorFailed> antennaConvert + (const casa::Table& ms, const map<string,VectorFailed>& broken); + + // Find the tile nr from the given seqnr which can be a tile or rcu. + // If a tile for the given station type is given, the element is seqnr/2. + // Otherwise find the matching rcu in the rcuList and return its index. + static int findTile (const FailedTileInfo&, + const casa::Matrix<casa::Int>& rcus); + + // Write the failed tile info. + static void writeFailed (casa::Table& ms, + const vector<VectorFailed>& brokenBefore, + const vector<VectorFailed>& brokenDuring); + + // Read the failed tile info and write into MS as needed. + static void failedTiles2MS (const string& msName, const string& beforeName, + const string& duringName); + + private: + string itsStation; + string itsTime; + casa::MVEpoch itsEpoch; + string itsType; //# RCU, LBA, or HBA + int itsSeqNr; + }; + +} //# end namespace + +#endif diff --git a/LCS/MSLofar/include/MSLofar/MSAntennaFieldColumns.h b/LCS/MSLofar/include/MSLofar/MSAntennaFieldColumns.h index fa04159d4aa..6c77060b432 100644 --- a/LCS/MSLofar/include/MSLofar/MSAntennaFieldColumns.h +++ b/LCS/MSLofar/include/MSLofar/MSAntennaFieldColumns.h @@ -79,6 +79,8 @@ namespace LOFAR { { return elementOffset_p; } const casa::ROArrayQuantColumn<casa::Double>& elementOffsetQuant() const { return elementOffsetQuant_p; } + const casa::ROArrayColumn<casa::Int>& elementRCU() const + { return elementRCU_p; } const casa::ROArrayColumn<casa::Bool>& elementFlag() const { return elementFlag_p; } const casa::ROScalarColumn<casa::Double>& tileRotation() const @@ -116,6 +118,7 @@ namespace LOFAR { casa::ROArrayColumn<casa::Double> position_p; casa::ROArrayColumn<casa::Double> coordinateAxes_p; casa::ROArrayColumn<casa::Double> elementOffset_p; + casa::ROArrayColumn<casa::Int> elementRCU_p; casa::ROArrayColumn<casa::Bool> elementFlag_p; casa::ROScalarColumn<casa::Double> tileRotation_p; casa::ROArrayColumn<casa::Double> tileElementOffset_p; @@ -169,6 +172,8 @@ namespace LOFAR { { return elementOffset_p; } casa::ArrayQuantColumn<casa::Double>& elementOffsetQuant() { return elementOffsetQuant_p; } + casa::ArrayColumn<casa::Int>& elementRCU() + { return elementRCU_p; } casa::ArrayColumn<casa::Bool>& elementFlag() { return elementFlag_p; } casa::ScalarColumn<casa::Double>& tileRotation() @@ -201,6 +206,7 @@ namespace LOFAR { casa::ArrayColumn<casa::Double> position_p; casa::ArrayColumn<casa::Double> coordinateAxes_p; casa::ArrayColumn<casa::Double> elementOffset_p; + casa::ArrayColumn<casa::Int> elementRCU_p; casa::ArrayColumn<casa::Bool> elementFlag_p; casa::ScalarColumn<casa::Double> tileRotation_p; casa::ArrayColumn<casa::Double> tileElementOffset_p; diff --git a/LCS/MSLofar/src/BeamTables.cc b/LCS/MSLofar/src/BeamTables.cc index f50489677d7..db5f07145f2 100644 --- a/LCS/MSLofar/src/BeamTables.cc +++ b/LCS/MSLofar/src/BeamTables.cc @@ -99,6 +99,7 @@ void BeamTables::fill (Table& ms, // Read the station names from the MS ANTENNA subtable. Table antTab (ms.keywordSet().asTable("ANTENNA")); ROScalarColumn<String> antNameCol(antTab, "NAME"); + ScalarColumn<double> diameterCol(antTab, "DISH_DIAMETER"); Vector<String> antNames(antNameCol.getColumn()); // Fill the LOFAR_ANTENNA_FIELD table for each entry in the ANTENNA table. @@ -107,20 +108,25 @@ void BeamTables::fill (Table& ms, int rownr = 0; // Keep a list of station names; keep it in order. // Also keep a map of unique station names and map them to clockId. - vector<string> stationNames; + vector<string> stationNames; map<string,int> stationIdMap; + vector<double> diameters; stationNames.reserve (antNames.size()); + diameters.reserve (antNames.size()); // Now write the info for each entry in the MS ANTENNA table. for (uint i=0; i<antNames.size(); ++i) { - // The MS antenna name consists of antenna field name and type. + // The MS antenna name consists of station name and antenna field name. + // E.g. CS001HBA0 (for dual mode) or CS001HBA (for joined mode). // For test purposes we do not assume that the station name has 5 chars. + // Get station type (core,remote,europe) using StationInfo.h. int stationType = stationTypeValue (antNames[i]); string stationName = antNames[i].substr (0, 5); string antFieldName; if (antNames[i].size() > 5) { antFieldName = antNames[i].substr (5, 4); } + // Antenna field type is first 3 characters of antenna field name. string antFieldType = antFieldName.substr (0, 3); stationNames.push_back (stationName); // possibly non-unique names // Define id for a new station, otherwise get the id. @@ -128,16 +134,13 @@ void BeamTables::fill (Table& ms, int stationId = stationIdMap.size(); stationIdMap[stationName] = stationId; } + // Get the antenna field info of the station. AntField antField(antFieldPath + stationName + "-AntennaField.conf", mustExist); - // Get the station type from the station name (using StationInfo.h). - // Use it to get the bitset telling which elements are present for - // the given antennaSet. // HBA stations have to be treated a bit special. AntField::AFArray hbaOffsets; // offsets of HBA dipoles in a tile bool done = false; - int firstHbaOffset = 0; if (antFieldType == "HBA") { // Get the offsets of HBA dipoles w.r.t. tile center. getHBADeltas (hbaDeltaPath + stationName + "-iHBADeltas.conf", @@ -152,46 +155,62 @@ void BeamTables::fill (Table& ms, antFieldType = "LBA"; antFieldName = "LBA"; } + double diameter = 0; if (antFieldName == "HBA") { - // HBA can be split into HBA0 and HBA1. + // HBA can be split into HBA0 and HBA1 (in e.g. core stations). // They have to be written separately. - if (antFieldName == "HBA") { - uint nelem0 = antField.nrAnts("HBA0"); - uint nelem1 = antField.nrAnts("HBA1"); - if (nelem0 > 0 && nelem1 > 0) { - // An extra row is needed. - antfTab.addRow(); - // The HBA offsets can be the same for HBA0 and HBA1 (16 values) - // or different (32 values). - if (AntField::getShape(hbaOffsets)[0] == 16) { - writeAntField (antfCols, rownr, i, stationName, - antField, "HBA0", hbaOffsets, 0); - writeAntField (antfCols, rownr+1, i, stationName, - antField, "HBA1", hbaOffsets, 0); - } else { - writeAntField (antfCols, rownr, i, stationName, - antField, "HBA0", hbaOffsets, 0); - writeAntField (antfCols, rownr+1, i, stationName, - antField, "HBA1", hbaOffsets, 16); - } - // Write all elements. - writeElements (antfCols, rownr, antField.AntPos("HBA"), - antennaSet.positionIndex ("HBA_ZERO", stationType), - false, - antField.Centre("HBA"), - antField.Centre("HBA0")); - writeElements (antfCols, rownr+1, antField.AntPos("HBA"), - antennaSet.positionIndex ("HBA_ONE", stationType), - true, - antField.Centre("HBA"), - antField.Centre("HBA1")); - rownr += 2; - done = true; + uint nelem0 = antField.nrAnts("HBA0"); + uint nelem1 = antField.nrAnts("HBA1"); + if (nelem0 > 0 && nelem1 > 0) { + // Write separately, so an extra row is needed. + antfTab.addRow(); + // The HBA offsets can be the same for HBA0 and HBA1 (16 values) + // or different (32 values). + if (AntField::getShape(hbaOffsets)[0] == 16) { + writeAntField (antfCols, rownr, i, stationName, + antField, "HBA0", hbaOffsets, 0); + writeAntField (antfCols, rownr+1, i, stationName, + antField, "HBA1", hbaOffsets, 0); + } else { + writeAntField (antfCols, rownr, i, stationName, + antField, "HBA0", hbaOffsets, 0); + writeAntField (antfCols, rownr+1, i, stationName, + antField, "HBA1", hbaOffsets, 16); } + // Write all elements. + // An HBA tile is 5 m wide, so add that to the diameter. + double d1 = writeElements (antfCols, rownr, antField.AntPos("HBA"), + antennaSet.positionIndex ("HBA_ZERO", + stationType), + 0, + antField.Centre("HBA"), + antField.Centre("HBA0")) + 5; + double d2 = writeElements (antfCols, rownr+1, antField.AntPos("HBA"), + antennaSet.positionIndex ("HBA_ONE", + stationType), + 48, + antField.Centre("HBA"), + antField.Centre("HBA1")) + 5; + // Calculate diameter from distance between field centers and + // the diameters of the fields. + AntField::AFArray c0 = antField.Centre("HBA0"); + AntField::AFArray c1 = antField.Centre("HBA1"); + double a0 = (AntField::getData(c0)[0] - AntField::getData(c1)[0]); + double a1 = (AntField::getData(c0)[1] - AntField::getData(c1)[1]); + double a2 = (AntField::getData(c0)[2] - AntField::getData(c1)[2]); + diameter = sqrt(a0*a0 + a1*a1 + a2*a2) + 0.5*(d1 + d2); + rownr += 2; + done = true; } } // In all other cases write a single row. if (!done) { + // For HBA1 48 needs to be added to the posIndex value to get the + // correct antenna number. + // Set diameter of an LBA element or HBA tile. + int firstHbaOffset = 0; + int addAnt = 0; + double elemDiam = (antFieldType=="LBA" ? 2:5); string setName(antennaSetName); if (antFieldName == "HBA0") { setName = "HBA_ZERO"; @@ -199,24 +218,28 @@ void BeamTables::fill (Table& ms, setName = "HBA_ONE"; if (AntField::getShape(hbaOffsets)[0] == 32) { firstHbaOffset = 16; + addAnt = 48; } } writeAntField (antfCols, rownr, i, stationName, antField, antFieldName, hbaOffsets, firstHbaOffset); - writeElements (antfCols, rownr, antField.AntPos(antFieldType), - antennaSet.positionIndex (setName, stationType), - setName == "HBA_ONE", - antField.Centre(antFieldType), - antField.Centre(antFieldName)); + diameter = writeElements (antfCols, rownr, + antField.AntPos(antFieldType), + antennaSet.positionIndex (setName, stationType), + addAnt, + antField.Centre(antFieldType), + antField.Centre(antFieldName)) + elemDiam; rownr++; } - LOG_DEBUG_STR ("Wrote " << rownr << " station field rows"); + // Keep station diameter. + diameters.push_back (diameter); } + LOG_DEBUG_STR ("Wrote " << rownr << " station field rows"); // Write the LOFAR_STATION subtable. writeStation (statTab, statCols, stationNames, stationIdMap.size()); - // Write the STATION_ID in the ANTENNA subtable. - writeAntenna (antTab, antNames, stationIdMap); + // Write the STATION_ID and DISH_DIAMETER into the ANTENNA subtable. + writeAntenna (antTab, antNames, stationIdMap, diameters); // Write the AntennaSet name into the OBSERVATION subtable. if (ms.keywordSet().isDefined ("OBSERVATION")) { Table obsTable (ms.keywordSet().asTable("OBSERVATION")); @@ -251,13 +274,13 @@ void BeamTables::writeAntField (MSAntennaFieldColumns& columns, int rownr, } } -void BeamTables::writeElements (MSAntennaFieldColumns& columns, - int rownr, - const AntField::AFArray& elemOffsets, - const vector<int16>& elemPresent, - bool addSkip, - const AntField::AFArray& stationCenter, - const AntField::AFArray& fieldCenter) +double BeamTables::writeElements (MSAntennaFieldColumns& columns, + int rownr, + const AntField::AFArray& elemOffsets, + const vector<int16>& posIndex, + int addAnt, + const AntField::AFArray& stationCenter, + const AntField::AFArray& fieldCenter) { double off0 = (AntField::getData(stationCenter)[0] - AntField::getData(fieldCenter)[0]); @@ -269,6 +292,7 @@ void BeamTables::writeElements (MSAntennaFieldColumns& columns, int nelem = elemOff.shape()[2]; Matrix<Double> offset(3,nelem); Matrix<Bool> flag(2,nelem, True); + Matrix<Int> rcus(2,nelem, -1); for (int i=0; i<nelem; ++i) { // The element offsets are given as [nelem,npol,xyz]. // Offsets are the same for the X and Y polarisation. @@ -277,30 +301,35 @@ void BeamTables::writeElements (MSAntennaFieldColumns& columns, offset(2,i) = elemOff(2,0,i) + off2; } // Clear the flag for the dipoles that are present. - // Normally the value in the elemPresent vector gives the element index, - // but not for HBA1 in the core stations. For those the skipped number - // of values has to be added. - // Note that elemPresent defines which elements are used for a mode. - // -1 means not used. - // If >=0, the value is normally equal to the vector's index. - // However, for HBA_ONE this is not the case. It has 48 -1 values, and - // thereafter value 0..47. SAS/MAC/BeamServer needs it this way. - // Therefore the code adds the nr of -1 values if value != index to get - // the proper flag index (which is the RCU number). + // The index in the posIndex vector gives the RCU used (if not -1). + // The value in the posIndex vector gives the element number. Bool* flagPtr = flag.data(); - int nskip = 0; - for (uint i=0; i<elemPresent.size(); ++i) { - if (elemPresent[i] < 0) { - nskip++; - } else { - int index = elemPresent[i]; - if (addSkip) index += nskip; - ASSERT (index < int(flag.size())); - flagPtr[index] = False; + Int * rcusPtr = rcus.data(); + for (uint i=0; i<posIndex.size(); ++i) { + if (posIndex[i] >= 0) { + int antNr = posIndex[i] + addAnt; + ASSERT (antNr < int(flag.size())); + flagPtr[antNr] = False; + rcusPtr[antNr] = i; } } columns.elementOffset().put (rownr, offset); + columns.elementRCU().put (rownr, rcus); columns.elementFlag().put (rownr, flag); + // Determine the station radius as the maximum distance of the used elements + // to the field center. Note that their offsets are wrt field center (0,0,0). + double radius = 0; + for (int i=0; i<nelem; ++i) { + if (! flag(0,i)) { + double dist = (offset(0,i) * offset(0,i) + + offset(1,i) * offset(1,i) + + offset(2,i) * offset(2,i)); + if (dist > radius) { + radius = dist; + } + } + } + return 2*sqrt(radius); } void BeamTables::writeObservation (Table& obsTable, @@ -349,18 +378,22 @@ void BeamTables::writeStation (MSStation& tab, MSStationColumns& columns, void BeamTables::writeAntenna (Table& antTable, const Vector<String>& antNames, - const map<string,int>& stationIdMap) + const map<string,int>& stationIdMap, + const vector<double>& diameters) { ASSERT (antTable.nrow() == antNames.size()); + ASSERT (antTable.nrow() == diameters.size()); // Add column if not existing yet. if (! antTable.tableDesc().isColumn ("LOFAR_STATION_ID")) { antTable.addColumn (ScalarColumnDesc<Int> ("LOFAR_STATION_ID")); } - // Write for each antenna the id in the LOFAR_STATION table. - ScalarColumn<Int> idCol (antTable, "LOFAR_STATION_ID"); + // Write for each antenna the id and diameter into the LOFAR_STATION table. + ScalarColumn<Int> idCol (antTable, "LOFAR_STATION_ID"); + ScalarColumn<double> dmCol (antTable, "DISH_DIAMETER"); for (uInt i=0; i<antTable.nrow(); ++i) { string stationName = antNames[i].substr(0,5); idCol.put (i, stationIdMap.find(stationName)->second); + dmCol.put (i, diameters[i]); } } diff --git a/LCS/MSLofar/src/CMakeLists.txt b/LCS/MSLofar/src/CMakeLists.txt index 3a3bd460e53..1d417871b56 100644 --- a/LCS/MSLofar/src/CMakeLists.txt +++ b/LCS/MSLofar/src/CMakeLists.txt @@ -20,8 +20,10 @@ lofar_add_library(mslofar MSLofar.cc # MeasurementSet.cc BeamTables.cc + FailedTileInfo.cc ) lofar_add_bin_program(versionmslofar versionmslofar.cc) lofar_add_bin_program(makebeamtables makebeamtables.cc) +lofar_add_bin_program(addfailedtileinfo addfailedtileinfo.cc) diff --git a/LCS/MSLofar/src/FailedTileInfo.cc b/LCS/MSLofar/src/FailedTileInfo.cc new file mode 100644 index 00000000000..f10cc6e1213 --- /dev/null +++ b/LCS/MSLofar/src/FailedTileInfo.cc @@ -0,0 +1,279 @@ +//# FailedTileInfo.cc: Class to write failed tile info into the MS +//# Copyright (C) 2012 +//# ASTRON (Netherlands Institute for Radio Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands +//# +//# This file is part of the LOFAR software suite. +//# The LOFAR software suite is free software: you can redistribute it and/or +//# modify it under the terms of the GNU General Public License as published +//# by the Free Software Foundation, either version 3 of the License, or +//# (at your option) any later version. +//# +//# The LOFAR software suite is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License along +//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. +//# +//# $Id$ + +#include <lofar_config.h> +#include <MSLofar/FailedTileInfo.h> + +#include <tables/Tables/Table.h> +#include <tables/Tables/TableRecord.h> +#include <tables/Tables/ScalarColumn.h> +#include <tables/Tables/ArrayColumn.h> +#include <measures/TableMeasures/ScalarQuantColumn.h> +#include <measures/TableMeasures/ArrayQuantColumn.h> +#include <casa/Quanta/MVEpoch.h> +#include <casa/Quanta/MVTime.h> + +#include <Common/StringUtil.h> +#include <Common/StreamUtil.h> +#include <Common/LofarLogger.h> +#include <Common/LofarTypes.h> +#include <Common/lofar_vector.h> +#include <Common/lofar_map.h> +#include <Common/lofar_iostream.h> + +using namespace casa; + +namespace LOFAR { + + FailedTileInfo::FailedTileInfo (const string& station, const string& time, + const MVEpoch& epoch, const string& type, + int seqnr) + : itsStation (station), + itsTime (time), + itsEpoch (epoch), + itsType (type), + itsSeqNr (seqnr) + {} + + // Read the broken hardware file giving a map of antenna name to a vector + // of pairs of element and time. + map<string, FailedTileInfo::VectorFailed> FailedTileInfo::readFile + (const string& fileName, double startTime, double endTime) + { + map<string, FailedTileInfo::VectorFailed> brokenHardware; + fstream infile (fileName.c_str()); + ASSERTSTR (infile, "Unable to open file " << fileName); + int linenumber=0; + string station, name, date, time; + Quantity q; + // Read first line. + string line; + getline (infile, line); + while (infile) { + linenumber++; + // Skip leading and trailing whitespace. + uint st = lskipws (line, 0, line.size()); + if (st < line.size() && line[st] != '#') { // skip if only comment + bool valid = false; + istringstream istr(line); + istr >> station >> name >> date >> time; + if (!(station.empty() || name.empty() || + date.empty() || time.empty())) { + if (MVTime::read (q, date+'/'+time)) { + valid = true; + if (name.size() > 3) { + string type = name.substr(0,3); + if (type == "RCU" || type == "LBA" || type == "HBA") { + istringstream istr(name.substr(3)); + int seqnr; + istr >> seqnr; + // Only use the entry if the time is within the limits. + MVEpoch epoch(q); + if (epoch.get() >= startTime && epoch.get() < endTime) { + // Add the the vector for this station. + // Note that the vector is created if not existing yet. + brokenHardware[station].push_back + (FailedTileInfo(station, date+'/'+time.substr(0,8), + epoch, type, seqnr)); + } + } + } + } + } + if (!valid) { + LOG_WARN_STR("line " << linenumber << " in file " << fileName + << " is invalid. Skipping..."); + } + } + // Read next line. + getline (infile, line); + } + return brokenHardware; + } + + // Convert the info per station name to info per antennaId. + // Only keep the RCU entries or entries ith a matching station type + // (LBA or HBA). + vector<FailedTileInfo::VectorFailed> FailedTileInfo::antennaConvert + (const Table& ms, const map<string,FailedTileInfo::VectorFailed>& broken) + { + // Open ANTENNA table columns. + Table antTab (ms.keywordSet().asTable("ANTENNA")); + ROScalarColumn<String> nameCol(antTab, "NAME"); + // Size the vector (which creates empty elements). + vector<FailedTileInfo::VectorFailed> brokenAnt (antTab.nrow()); + for (uInt row=0; row<antTab.nrow(); ++row) { + // Get first 5 and next 3 characters of the station name giving + // proper station name and station type (LBA or HBA). + string name = nameCol(row); + string type = name.substr(5,3); + // Get the entry matching the station name proper. + map<string, FailedTileInfo::VectorFailed>::const_iterator iter = + broken.find(name.substr(0,5)); + if (iter != broken.end()) { + // Take all entries matching station type or RCU. + for (FailedTileInfo::VectorFailed::const_iterator fail = + iter->second.begin(); fail != iter->second.end(); ++fail) { + // Insert the info into the vector at the given row (=antId) + // if it is matching the station type. + if (fail->itsType == "RCU" || fail->itsType == type) { + brokenAnt[row].push_back (*fail); + } + } + } + } + return brokenAnt; + } + + // Write the failed tile info. + void FailedTileInfo::writeFailed + (Table& ms, + const vector<FailedTileInfo::VectorFailed>& brokenBefore, + const vector<FailedTileInfo::VectorFailed>& brokenDuring) + { + ASSERT (brokenBefore.size() == brokenDuring.size()); + // Open ANTENNA_FIELD table. + Table antFieldTab (ms.keywordSet().asTable("LOFAR_ANTENNA_FIELD")); + ROScalarColumn<Int> antIdCol(antFieldTab, "ANTENNA_ID"); + ArrayColumn<Bool> flagCol (antFieldTab, "ELEMENT_FLAG"); + ArrayColumn<Int> rcuCol (antFieldTab, "ELEMENT_RCU"); + // Define the vectors to hold the failures during the observation. + vector<Double> times; + vector<Int> tiles; + vector<Int> antFldIds; + vector<string> stations; + vector<string> timestrs; + // Loop through all rows in the AntennaField table. + for (uInt row=0; row<antFieldTab.nrow(); ++row) { + uInt antId = antIdCol(row); + ASSERT (antId < brokenBefore.size()); + // Process if the matching entry in the antenna info vector is not empty. + if (!brokenBefore[antId].empty() || !brokenDuring[antId].empty()) { + Matrix<Bool> flags (flagCol(row)); + Matrix<Int> rcuList (rcuCol(row)); + bool changed = false; + // Loop through all rcus in the vector. + for (FailedTileInfo::VectorFailed::const_iterator + iter = brokenBefore[antId].begin(); + iter != brokenBefore[antId].end(); ++iter) { + int elem = findTile (*iter, rcuList); + if (elem >= 0 && elem < int(flags.ncolumn()) && !flags(0,elem)) { + // Only set and report if not set yet. + flags(0,elem) = flags(1,elem) = True; + changed = true; + LOG_INFO_STR ("Flagged element " << elem + << " for antenna field " << row + << " (" << iter->itsType << ' ' << iter->itsSeqNr + << " on " << iter->itsStation + << " failed at " << iter->itsTime << ')'); + } + } + if (changed) { + flagCol.put (row, flags); + } + // Now loop through all entries for the tiles broken during the obs. + // Add to the vectors if its flag is not set yet. + for (FailedTileInfo::VectorFailed::const_iterator + iter = brokenDuring[antId].begin(); + iter != brokenDuring[antId].end(); ++iter) { + int elem = findTile (*iter, rcuList); + if (elem >= 0 && elem < int(flags.ncolumn()) && !flags(0,elem)) { + tiles.push_back (elem); + times.push_back (iter->itsEpoch.get()); + antFldIds.push_back (row); + stations.push_back (iter->itsStation); + timestrs.push_back (iter->itsTime); + } + } + } + } + // Now write the elements that failed during the observation. + // First sort the vectors on time, antfldid, index and make unique. + if (! times.empty()) { + Sort sort; + sort.sortKey (&(times[0]), TpDouble); + sort.sortKey (&(antFldIds[0]), TpInt); + sort.sortKey (&(tiles[0]), TpInt); + Vector<uInt> indexs, index; + sort.sort (indexs, times.size()); + sort.unique (index, indexs); + // Now write the sorted data into the ELEMENT_FAILURE table. + Table failedTab (ms.keywordSet().asTable("LOFAR_ELEMENT_FAILURE")); + ScalarColumn<Int> antFldIdCol (failedTab, "ANTENNA_FIELD_ID"); + ScalarColumn<Int> elemIdCol (failedTab, "ELEMENT_INDEX"); + ScalarQuantColumn<Double> timeCol (failedTab, "TIME"); + uInt row = failedTab.nrow(); + failedTab.addRow (index.size()); + for (uInt i=0; i<index.size(); ++i) { + int inx = indexs[index[i]]; + antFldIdCol.put (row, antFldIds[inx]); + elemIdCol.put (row, tiles[inx]); + timeCol.put (row, Quantity(times[inx], "d")); // MVEpoch gives days + LOG_INFO_STR ("Added failure for antenna field " << antFldIds[inx] + << " (tile " << tiles[inx] + << " on " << stations[inx] + << " at " << timestrs[inx] << ')'); + row++; + } + } + } + + int FailedTileInfo::findTile (const FailedTileInfo& fail, + const Matrix<Int>& rcus) + { + if (fail.itsType == "RCU") { + for (uInt i=0; i<rcus.ncolumn(); ++i) { + if (rcus(0,i) == fail.itsSeqNr || rcus(1,i) == fail.itsSeqNr) { + return i; + } + } + } else { + return fail.itsSeqNr/2; + } + return -1; + } + + void FailedTileInfo::failedTiles2MS + (const string& msName, const string& beforeName, const string& duringName) + { + ASSERT (!(msName.empty() || beforeName.empty() || duringName.empty())); + // Open the measurementset table. + Table ms(msName, Table::Update); + // Get the start and end time from the Observation subtable. + Table obsTab (ms.keywordSet().asTable ("OBSERVATION")); + ROArrayQuantColumn<Double> timeCol(obsTab, "TIME_RANGE"); + ASSERT (obsTab.nrow() > 0); + Vector<Quantity> times = timeCol(0); + ASSERT (times.size() > 1); + MVEpoch startTime (times[0]); + MVEpoch endTime (times[1]); + // Read the files containing the elements broken before and during the obs. + // Turn the results into a vector per station. + vector<FailedTileInfo::VectorFailed> before + (antennaConvert(ms, readFile(beforeName, 0., startTime.get()))); + vector<FailedTileInfo::VectorFailed> during + (antennaConvert(ms, readFile(duringName, startTime.get(), + endTime.get()))); + // Write the broken info into the MS. + writeFailed (ms, before, during); + } + +} // end namespace diff --git a/LCS/MSLofar/src/MSAntennaField.cc b/LCS/MSLofar/src/MSAntennaField.cc index 0c9d627e077..0a19d4497dd 100644 --- a/LCS/MSLofar/src/MSAntennaField.cc +++ b/LCS/MSLofar/src/MSAntennaField.cc @@ -77,6 +77,9 @@ namespace LOFAR { addColumn (td, "ELEMENT_OFFSET", TpArrayDouble, "Position offsets of elements w.r.t. center of station field", "m", "POSITION", MPosition::ITRF, 2); + addColumn (td, "ELEMENT_RCU", TpArrayInt, + "RCU used for the elements (for X and Y)", + String(), String(), 0, 2); addColumn (td, "ELEMENT_FLAG", TpArrayBool, "T for inactive element receptors (for X and Y)", String(), String(), 0, 2); diff --git a/LCS/MSLofar/src/MSAntennaFieldColumns.cc b/LCS/MSLofar/src/MSAntennaFieldColumns.cc index 2f7f6e77add..1b55b48cd51 100644 --- a/LCS/MSLofar/src/MSAntennaFieldColumns.cc +++ b/LCS/MSLofar/src/MSAntennaFieldColumns.cc @@ -51,6 +51,7 @@ namespace LOFAR { coordinateAxesQuant_p.attach (msAntennaField, "COORDINATE_AXES"); elementOffset_p.attach (msAntennaField, "ELEMENT_OFFSET"); elementOffsetQuant_p.attach (msAntennaField, "ELEMENT_OFFSET"); + elementRCU_p.attach (msAntennaField, "ELEMENT_RCU"); elementFlag_p.attach (msAntennaField, "ELEMENT_FLAG"); tileRotation_p.attach (msAntennaField, "TILE_ROTATION"); tileRotationQuant_p.attach (msAntennaField, "TILE_ROTATION"); @@ -84,6 +85,7 @@ namespace LOFAR { coordinateAxesQuant_p.attach (msAntennaField, "COORDINATE_AXES"); elementOffset_p.attach (msAntennaField, "ELEMENT_OFFSET"); elementOffsetQuant_p.attach (msAntennaField, "ELEMENT_OFFSET"); + elementRCU_p.attach (msAntennaField, "ELEMENT_RCU"); elementFlag_p.attach (msAntennaField, "ELEMENT_FLAG"); tileRotation_p.attach (msAntennaField, "TILE_ROTATION"); tileRotationQuant_p.attach (msAntennaField, "TILE_ROTATION"); diff --git a/LCS/MSLofar/src/addfailedtileinfo.cc b/LCS/MSLofar/src/addfailedtileinfo.cc new file mode 100644 index 00000000000..935d6485b80 --- /dev/null +++ b/LCS/MSLofar/src/addfailedtileinfo.cc @@ -0,0 +1,66 @@ +//# addfailedtileinfo.cc: Program to add failed tile info to an MS +//# Copyright (C) 2012 +//# ASTRON (Netherlands Institute for Radio Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands +//# +//# This file is part of the LOFAR software suite. +//# The LOFAR software suite is free software: you can redistribute it and/or +//# modify it under the terms of the GNU General Public License as published +//# by the Free Software Foundation, either version 3 of the License, or +//# (at your option) any later version. +//# +//# The LOFAR software suite is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License along +//# with the LOFAR software suite. If not, see <http://www.gnu.org/licenses/>. +//# +//# $Id$ +//# +//# @author Ger van Diepen + +#include <lofar_config.h> +#include <MSLofar/FailedTileInfo.h> +#include <MSLofar/Package__Version.h> +#include <Common/InputParSet.h> +#include <Common/SystemUtil.h> +#include <Common/LofarLogger.h> + +using namespace LOFAR; + +int main (int argc, char* argv[]) +{ + TEST_SHOW_VERSION (argc, argv, MSLofar); + INIT_LOGGER(basename(string(argv[0]))); + try { + InputParSet inputs; + // Define the input parameters. + inputs.setVersion("2012Oct29-GvD"); + inputs.create ("ms", "", + "Name of MeasurementSet", + "string"); + inputs.create ("BrokenTileFile", "brokenTiles.txt", + "File containing tiles broken before the observation", + "string"); + inputs.create ("FailedTileFile", "failedTiles.txt", + "File containing tiles failing during the observation", + "string"); + inputs.readArguments (argc, argv); + string msName = inputs.getString("ms"); + string brokenName = inputs.getString("BrokenTileFile"); + string failedName = inputs.getString("FailedTileFile"); + ASSERT (! msName.empty()); + ASSERT (! brokenName.empty()); + ASSERT (! failedName.empty()); + FailedTileInfo::failedTiles2MS (msName, brokenName, failedName); + } catch (Exception& x) { + cerr << "Unexpected LOFAR exception: " << x << endl; + return 1; + } catch (std::exception& x) { + cerr << "Unexpected exception: " << x.what() << endl; + return 1; + } + return 0; +} diff --git a/LCS/MSLofar/src/makebeamtables.cc b/LCS/MSLofar/src/makebeamtables.cc index 7f44dbb29a1..4f20a3dfca0 100644 --- a/LCS/MSLofar/src/makebeamtables.cc +++ b/LCS/MSLofar/src/makebeamtables.cc @@ -23,7 +23,10 @@ #include <lofar_config.h> #include <MSLofar/BeamTables.h> -#include <casa/Inputs.h> +#include <MSLofar/Package__Version.h> +#include <Common/InputParSet.h> +#include <Common/SystemUtil.h> +#include <Common/LofarLogger.h> #include <tables/Tables/ScalarColumn.h> #include <ms/MeasurementSets/MeasurementSet.h> @@ -32,10 +35,12 @@ using namespace casa; int main (int argc, char* argv[]) { + TEST_SHOW_VERSION (argc, argv, MSLofar); + INIT_LOGGER(basename(string(argv[0]))); try { - Input inputs(1); + InputParSet inputs; // define the input structure - inputs.version("2011Mar31-GvD"); + inputs.setVersion("2012Oct29-GvD"); inputs.create ("ms", "", "Name of MeasurementSet", "string"); @@ -52,7 +57,7 @@ int main (int argc, char* argv[]) "Directory where the iHBADelta.conf files reside", "string"); inputs.create ("overwrite", "false", - "Overwriting existing beam subtables?" + "Overwriting existing beam subtables?", "bool"); inputs.readArguments (argc, argv); String msName = inputs.getString("ms"); @@ -74,7 +79,7 @@ int main (int argc, char* argv[]) } ASSERTSTR (!antSet.empty(), "No LOFAR_ANTENNA_SET found in OBSERVATION" " subtable of " << msName); - BeamTables::create (ms, overwrite); + BeamTables::create (ms, overwrite); BeamTables::fill (ms, antSet, antSetFile, antFieldDir, hbaDeltaDir, true); } catch (Exception& x) { cerr << "Unexpected LOFAR exception: " << x << endl; diff --git a/LCS/MSLofar/test/tBeamTables.cc b/LCS/MSLofar/test/tBeamTables.cc index f26dc18d9f6..9d4088b2d86 100644 --- a/LCS/MSLofar/test/tBeamTables.cc +++ b/LCS/MSLofar/test/tBeamTables.cc @@ -24,12 +24,18 @@ #include <lofar_config.h> #include <MSLofar/BeamTables.h> +#include <MSLofar/FailedTileInfo.h> #include <tables/Tables/SetupNewTab.h> #include <tables/Tables/Table.h> #include <tables/Tables/ScaColDesc.h> #include <tables/Tables/ScalarColumn.h> #include <tables/Tables/TableRow.h> +#include <tables/Tables/ArrayColumn.h> +#include <tables/Tables/ArrColDesc.h> +#include <measures/TableMeasures/TableQuantumDesc.h> +#include <measures/TableMeasures/ArrayQuantColumn.h> +#include <casa/Quanta/MVTime.h> #include <casa/OS/Path.h> using namespace LOFAR; @@ -51,51 +57,86 @@ void testBM (const string& antSet, const String& suffixa1 = String(), bool makeObs = false) { - cout << endl << "Test " << antSet << " ....." << endl; - // Make a simple table tBeamTables_tmp.ms with ANTENNA subtable. - // The ANTENNA table only needs column NAME. - SetupNewTable stab1("tBeamTables_tmp.ms", TableDesc(), Table::New); - Table tab1(stab1); - TableDesc td; - td.addColumn (ScalarColumnDesc<String>("NAME")); - SetupNewTable stab2("tBeamTables_tmp.ms/ANTENNA", td, Table::New); - Table antTab(stab2, 3); - // Write a core, remote, and international station into the table. - // Add a possible suffix (e.g. HBA0). - ScalarColumn<String> nameCol(antTab, "NAME"); - nameCol.put (0, "CS001"+suffix1+suffixa0); - nameCol.put (1, "RS106"+suffix1); - nameCol.put (2, "DE601"+suffix1); - // Write core station more if a second suffix is given. - if (! suffixa1.empty()) { - antTab.addRow (1); - nameCol.put (3, "CS001"+suffix1+suffixa1); - } - antTab.flush(); - tab1.rwKeywordSet().defineTable ("ANTENNA", antTab); - // Optionally add OBSERVATION table. - if (makeObs) { - SetupNewTable stab3("tBeamTables_tmp.ms/OBSERVATION", - TableDesc(), Table::New); - Table obsTab(stab3, 3); - tab1.rwKeywordSet().defineTable ("OBSERVATION", obsTab); - } - - // Get current directory to get absolute path name. - string pwd = Path(".").absoluteName(); - // Now add the beam table info. - BeamTables::create (tab1, false); - BeamTables::fill (tab1, antSet, pwd+"/tBeamTables.in_antset", - pwd+"/tBeamTables.in_af", pwd+"/tBeamTables.in_hd", - true); + { + cout << endl << "Test " << antSet << " ....." << endl; + // Make a simple table tBeamTables_tmp.ms with ANTENNA subtable. + // The ANTENNA table only needs columns NAME and DISH_DIAMETER. + SetupNewTable stab1("tBeamTables_tmp.ms", TableDesc(), Table::New); + Table tab1(stab1); + TableDesc td; + td.addColumn (ScalarColumnDesc<String>("NAME")); + td.addColumn (ScalarColumnDesc<double>("DISH_DIAMETER")); + SetupNewTable stab2("tBeamTables_tmp.ms/ANTENNA", td, Table::New); + Table antTab(stab2, 3); + // Write a core, remote, and international station into the table. + // Add a possible suffix (e.g. HBA0). + ScalarColumn<String> nameCol(antTab, "NAME"); + nameCol.put (0, "CS001"+suffix1+suffixa0); + nameCol.put (1, "RS106"+suffix1); + nameCol.put (2, "DE601"+suffix1); + // Write core station more if a second suffix is given. + if (! suffixa1.empty()) { + antTab.addRow (1); + nameCol.put (3, "CS001"+suffix1+suffixa1); + } + antTab.flush(); + tab1.rwKeywordSet().defineTable ("ANTENNA", antTab); + // Optionally add OBSERVATION table. + if (makeObs) { + TableDesc td; + td.addColumn (ArrayColumnDesc<Double> ("TIME_RANGE", IPosition(1,2))); + TableQuantumDesc tq(td, "TIME_RANGE", Unit("s")); + tq.write (td); + SetupNewTable stab3("tBeamTables_tmp.ms/OBSERVATION", + td, Table::New); + Table obsTab(stab3, 1); + ArrayQuantColumn<double> timeCol (obsTab, "TIME_RANGE"); + Vector<Quantity> times(2); + MVTime::read (times[0], "12-Oct-2012/12:00:00"); + MVTime::read (times[1], "12-Oct-2012/15:00:00"); + timeCol.put (0, times); + tab1.rwKeywordSet().defineTable ("OBSERVATION", obsTab); + } + // Get current directory to get absolute path name. + string pwd = Path(".").absoluteName(); + // Now add the beam table info. + BeamTables::create (tab1, false); + BeamTables::fill (tab1, antSet, pwd+"/tBeamTables.in_antset", + pwd+"/tBeamTables.in_af", pwd+"/tBeamTables.in_hd", + true); + } // Now print all the output (which is checked by assay). + showTab ("tBeamTables_tmp.ms/ANTENNA"); showTab ("tBeamTables_tmp.ms/LOFAR_ANTENNA_FIELD"); showTab ("tBeamTables_tmp.ms/LOFAR_ELEMENT_FAILURE"); showTab ("tBeamTables_tmp.ms/LOFAR_STATION"); if (makeObs) { showTab ("tBeamTables_tmp.ms/OBSERVATION"); } + + // Update for broken/failed tiles if an OBSERVATION table was written + // (because FailedTileInfo needs it). + // First with empty files; thereafter with some broken info. + if (makeObs) { + String name[2]; + name[0] = "_empty"; + name[1] = "_filled"; + for (int i=0; i<2; ++i) { + FailedTileInfo::failedTiles2MS ("tBeamTables_tmp.ms", + "tBeamTables.in_before" + name[i], + "tBeamTables.in_during" + name[i]); + // Show the resulting flags. + Table tab("tBeamTables_tmp.ms/LOFAR_ANTENNA_FIELD"); + cout << endl << "ELEMENT_FLAG after FailedTileInfo " + << name[i] << ':' << endl; + ROArrayColumn<Bool> flagCol (tab, "ELEMENT_FLAG"); + for (uInt i=0; i<tab.nrow(); ++i) { + cout << flagCol(i); + } + showTab ("tBeamTables_tmp.ms/LOFAR_ELEMENT_FAILURE"); + } + } } diff --git a/CEP/Pipeline/recipes/sip/master/deprecated/qcheck/__init__.py b/LCS/MSLofar/test/tBeamTables.in_before_empty similarity index 100% rename from CEP/Pipeline/recipes/sip/master/deprecated/qcheck/__init__.py rename to LCS/MSLofar/test/tBeamTables.in_before_empty diff --git a/LCS/MSLofar/test/tBeamTables.in_before_filled b/LCS/MSLofar/test/tBeamTables.in_before_filled new file mode 100644 index 00000000000..91211003c59 --- /dev/null +++ b/LCS/MSLofar/test/tBeamTables.in_before_filled @@ -0,0 +1,12 @@ +CS101 RCU66 2011-May-20 10:00:05 +CS001 RCU600 2011-May-20 10:00:05 +CS001 RCU76 2012-May-20 10:00:05 +CS001 RCU65 2013-May-20 10:00:05 +CS001 RCU6 2011-May-20 10:00:05 +CS001 LBA3 2011-May-20 10:00:05 +CS001 LBA100 2011-May-20 10:00:05 +CS001 HBA10 2011-May-20 10:00:05 +CS001 HBA10 2011-May-20 10:00:05 +RS106 HBA9 2011-May-20 10:00:05 +RS106 HBA12 2011-May-20 10:00:05 +DE601 HBA23 2011-May-20 10:00:05 diff --git a/MAC/Deployment/data/PVSS/License/test_shield.txt b/LCS/MSLofar/test/tBeamTables.in_during_empty similarity index 100% rename from MAC/Deployment/data/PVSS/License/test_shield.txt rename to LCS/MSLofar/test/tBeamTables.in_during_empty diff --git a/LCS/MSLofar/test/tBeamTables.in_during_filled b/LCS/MSLofar/test/tBeamTables.in_during_filled new file mode 100644 index 00000000000..bbc59d19f0e --- /dev/null +++ b/LCS/MSLofar/test/tBeamTables.in_during_filled @@ -0,0 +1,27 @@ +# Non existing station. +CS101 RCU66 2012-Oct-12 12:00:05 +# Non existing RCU +CS001 RCU600 2012-Oct-12 12:00:05 +# Outside observation times +CS001 RCU80 2012-May-12 12:00:05 +# Outside observation times +CS001 RCU65 2013-May-20 12:00:05 +# Non-HBA entries +CS001 LBA3 2012-Oct-12 12:00:05 +CS001 LBA100 2012-Oct-12 12:00:05 + +# Entries that were already flagged. +CS001 RCU6 2012-Oct-12 12:00:05 +CS001 HBA10 2012-Oct-12 12:00:05 +RS106 HBA9 2012-Oct-12 12:00:05 +RS106 HBA12 2012-Oct-12 12:00:05 +DE601 HBA23 2012-Oct-12 12:00:05 + +# Correct entries. +CS001 RCU3 2012-Oct-12 12:00:05 +CS001 RCU88 2012-Oct-12 12:00:05 +CS001 HBA22 2012-Oct-12 12:00:05 +CS001 HBA22 2012-Oct-12 12:00:05 # duplicate +RS106 HBA24 2012-Oct-12 12:10:05 +RS106 HBA10 2012-Oct-12 12:00:05 +DE601 HBA43 2012-Oct-12 12:00:15 diff --git a/LCS/MSLofar/test/tBeamTables.stdout b/LCS/MSLofar/test/tBeamTables.stdout index 6f02b3a3435..9f898e5afb9 100644 --- a/LCS/MSLofar/test/tBeamTables.stdout +++ b/LCS/MSLofar/test/tBeamTables.stdout @@ -1,6 +1,17 @@ Test LBA_OUTER ..... + Table tBeamTables_tmp.ms/ANTENNA ... + NAME: String "CS001LBA" + DISH_DIAMETER: Double 85.9589 + LOFAR_STATION_ID: Int 0 + NAME: String "RS106LBA" + DISH_DIAMETER: Double 85.9578 + LOFAR_STATION_ID: Int 1 + NAME: String "DE601LBA" + DISH_DIAMETER: Double 68.4069 + LOFAR_STATION_ID: Int 2 + Table tBeamTables_tmp.ms/LOFAR_ANTENNA_FIELD ... ANTENNA_ID: Int 0 NAME: String "LBA" @@ -18,6 +29,11 @@ Axis Lengths: [3, 96] (NB: Matrix in Row/Column order) 0, -0.243, 2.105, 2.363, 0.243, -2.105, -2.363, 5.784, 4.398, 0.954001, -2.937, -5.454, -5.418, -2.848, 1.056, 4.464, 7.669, 9.615, 9.9, 5.379, 2.445, -1.838, -5.348, -8.547, -9.695, -8.074, -4.693, 0.039, 4.57, 12.525, 14.313, 14.115, 11.17, 11.35, 4.35, -0.687999, -5.927, -7.719, -10.726, -13.161, -13.579, -11.373, -10.491, -2.214, 1.757, 7.096, 64.587, 6.207, 11.405, 14.457, 20.337, 13.262, 9.704, -2.401, -13.787, -19.53, -16.092, -12.457, -3.007, 2.275, 14.488, 22.972, 25.092, 26.419, 16.011, 9.587, -3.813, -16.284, -22.799, -24.699, -22.397, -8.27, 2.319, 15.331, 25.967, 30.704, 30.482, 23.593, 13.316, 4.116, -10.203, -25.852, -30.56, -34.573, -31.083, -20.428, -13.823, -15.007, 24.092, 37.912, 41.232, 33.938, -6.839, -24.575, -37.626, -29.4 0, 1.538, 0.814, -0.814, -1.538, -0.814, 0.814, -0.365, -2.516, -3.489, -2.83, -0.846, 1.533, 3.196, 3.362, 1.956, 2.726, 0.756, -2.281, -5.436, -6.063, -5.849, -4.206, -1.125, 1.73, 4.081, 5.096, 5.428, 4.528, 3.442, 1.315, -0.546, -4.834, -6.638, -7.806, -7.823, -8.001, -6.194, -3.815, 0.267, 1.946, 4.73, 7.115, 8.511, 8.185, 7.163, 0.002, -39.233, 7.65, 7.65, -1.312, -9.591, -11.428, -10.77, -6.033, -2.399, 5.811, 9.993, 11.271, 14.719, 11.367, 5.074, 1.408, -3.671, -11.604, -14.057, -15.316, -10.539, -6.182, 0.878, 10.322, 15.921, 20.616, 15.538, 8.922, 4.779, -6.553, -16.166, -19.596, -18.076, -19.002, -11.648, -6.799, 2.703, 6.972, 16.936, 17.224, 20.993, 19.068, 5.309, -6.767, -14.946, -23.973, -14.794, -8.133, 16.827] + ELEMENT_RCU: Int array with shape [2, 96] +Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) +[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95] + ELEMENT_FLAG: Bool array with shape [2, 96] Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -42,6 +58,11 @@ Axis Lengths: [3, 96] (NB: Matrix in Row/Column order) 0, -0.243, 2.105, 2.363, 0.243, -2.105, -2.363, 2.49, -1.45, -4.71, -5.767, -4.125, -0.553001, 3.277, 5.575, 5.264, 8.094, 6.174, 1.789, -5.296, -7.771, -9.698, -9.088, -6.164, -2.503, 1.857, 5.148, 8.125, 9.16, 11.711, 9.473, 6.591, -1.358, -3.958, -9.375, -12.043, -15.057, -13.3, -11.324, -6.506, -4.219, 1.095, 5.12, 11.548, 13.145, 14.419, 17.674, 57.565, 17.408, 19.009, 8.711, -7.364, -11.973, -17.343, -16.244, -13.831, 0.234999, 8.386, 15.254, 23.173, 24.576, 19.631, 15.269, 8.381, -8.928, -15.961, -24.872, -24.282, -21.194, -11.649, 3.662, 19.436, 32.003, 31.247, 26.949, 23.246, 6.208, -11.761, -22.276, -24.833, -33.729, -30.959, -26.187, -14.105, -5.898, 14.571, 18.468, 23.475, 41.115, 27.821, 11.529, -4.511, -39.389, -34.986, -31.887, 9.701 0, 1.538, 0.814, -0.814, -1.538, -0.814, 0.814, -3.287, -3.287, -1.749, 0.607, 2.679, 3.498, 2.68, 0.607, -1.749, -3.227, -4.983, -6.208, -4.851, -3.469, -1.056, 1.439, 4.27, 5.902, 5.845, 4.356, 1.89, -0.901, -5.626, -7.351, -7.898, -7.8, -8.534, -5.122, -2.378, 0.42, 2.034, 4.512, 7.279, 8.099, 7.874, 8.232, 4.205, 1.922, -1.353, 33.182, -13.748, -3.533, -5.2, -11.565, -10.616, -9.321, -2.48, 5.403, 9.818, 10.831, 10.32, 5.609, 3.939, -3.908, -10.756, -13.203, -15.716, -12.826, -10.183, -3.31, 5.18, 10.271, 13.794, 15.861, 10.12, 5.991, -2.9, -11.036, -15.08, -18.949, -18.572, -14.168, -8.611, -1.119, 10.014, 14.291, 19.827, 19.425, 17.115, 13.61, 15.584, -6.441, -18.83, -24.893, -23.79, -4.705, 8.209, 17.679, 21.975] + ELEMENT_RCU: Int array with shape [2, 96] +Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) +[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95] + ELEMENT_FLAG: Bool array with shape [2, 96] Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -66,6 +87,11 @@ Axis Lengths: [3, 96] (NB: Matrix in Row/Column order) -12.31, -5.631, -12.058, -6.449, 19.175, 23.908, 21.431, 25.765, -17.357, -23.938, -26.191, -24.343, 4.375, 2.384, 5.27, 9.094, 5.674, 1.819, 10.084, 7.012, -9.445, -18.025, -13.61, -22.828, -13.503, -16.217, -16.395, -20.226, 6.202, 8.834, -0.605998, 3.514, 13.911, 19.696, 27.355, 22.016, 2.949, 8.433, 4.213, 7.903, -12.226, -2.335, -9.405, 1.091, -3.563, -2.727, -8.349, -6.723, 17.569, -2.772, 28.513, 19.9, -23.675, -6.744, 27.458, 7.756, -19.124, -17.05, -19.827, 13.069, -0.397999, -13.234, -2.025, -0.674, 13.951, -6.971, 13.371, 7.401, -24.018, -25.785, -4.952, -10.591, 0.178001, 15.125, 13.718, 27.602, -9.917, -5.396, -17.64, 6.024, 2.431, 21.652, 9.68, -3.355, -9.262, -0.348999, 22.425, 15.42, -0.99, 11.894, -8.855, -24.628, 13.018, -8.065, -11.836, 12.299 5.535, 8.142, 7.964, 10.284, -5.68, -3.276, -10.88, -9.621, 8.085, 6.985, 9.229, 11.473, -1.331, 2.185, 3.164, 1.104, 5.37, 7.64, 8.765, 11.181, -11.56, -9.361, -16.577, -11.084, 0.767, 2.91, -1.051, -1.674, -12.724, -14.714, -16.087, -19.088, 9.007, 6.705, 10.221, 12.866, -4.217, -3.499, -6.697, -6.741, 14.983, 15.51, 19.548, 19.192, -4.02, -6.557, -3.81, -7.072, -1.331, -12.66, -2.374, 4.486, -4.376, -19.139, 4.194, -1.299, 15.453, -5.966, 4.111, -18.369, -10.689, -6.468, 12.77, 4.372, -4.096, 2.891, -12.73, -9.367, 1.053, 2.96, -0.409, 12.071, -8.172, 3.596, -6.315, 1.905, 0.824, -9.64, 10.507, 14.97, 10.596, -0.663, 6.355, 2.535, -15.07, -3.251, -15.458, -11.122, 6.54, 17.818, 4.849, -6.284, 12.141, -1.191, -3.728, 1.664] + ELEMENT_RCU: Int array with shape [2, 96] +Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191] + ELEMENT_FLAG: Bool array with shape [2, 96] Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -90,6 +116,17 @@ Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) Test LBA_INNER ..... + Table tBeamTables_tmp.ms/ANTENNA ... + NAME: String "CS001LBA" + DISH_DIAMETER: Double 32.2517 + LOFAR_STATION_ID: Int 0 + NAME: String "RS106LBA" + DISH_DIAMETER: Double 32.2538 + LOFAR_STATION_ID: Int 1 + NAME: String "DE601LBA" + DISH_DIAMETER: Double 68.4069 + LOFAR_STATION_ID: Int 2 + Table tBeamTables_tmp.ms/LOFAR_ANTENNA_FIELD ... ANTENNA_ID: Int 0 NAME: String "LBA" @@ -107,6 +144,11 @@ Axis Lengths: [3, 96] (NB: Matrix in Row/Column order) 0, -0.243, 2.105, 2.363, 0.243, -2.105, -2.363, 5.784, 4.398, 0.954001, -2.937, -5.454, -5.418, -2.848, 1.056, 4.464, 7.669, 9.615, 9.9, 5.379, 2.445, -1.838, -5.348, -8.547, -9.695, -8.074, -4.693, 0.039, 4.57, 12.525, 14.313, 14.115, 11.17, 11.35, 4.35, -0.687999, -5.927, -7.719, -10.726, -13.161, -13.579, -11.373, -10.491, -2.214, 1.757, 7.096, 64.587, 6.207, 11.405, 14.457, 20.337, 13.262, 9.704, -2.401, -13.787, -19.53, -16.092, -12.457, -3.007, 2.275, 14.488, 22.972, 25.092, 26.419, 16.011, 9.587, -3.813, -16.284, -22.799, -24.699, -22.397, -8.27, 2.319, 15.331, 25.967, 30.704, 30.482, 23.593, 13.316, 4.116, -10.203, -25.852, -30.56, -34.573, -31.083, -20.428, -13.823, -15.007, 24.092, 37.912, 41.232, 33.938, -6.839, -24.575, -37.626, -29.4 0, 1.538, 0.814, -0.814, -1.538, -0.814, 0.814, -0.365, -2.516, -3.489, -2.83, -0.846, 1.533, 3.196, 3.362, 1.956, 2.726, 0.756, -2.281, -5.436, -6.063, -5.849, -4.206, -1.125, 1.73, 4.081, 5.096, 5.428, 4.528, 3.442, 1.315, -0.546, -4.834, -6.638, -7.806, -7.823, -8.001, -6.194, -3.815, 0.267, 1.946, 4.73, 7.115, 8.511, 8.185, 7.163, 0.002, -39.233, 7.65, 7.65, -1.312, -9.591, -11.428, -10.77, -6.033, -2.399, 5.811, 9.993, 11.271, 14.719, 11.367, 5.074, 1.408, -3.671, -11.604, -14.057, -15.316, -10.539, -6.182, 0.878, 10.322, 15.921, 20.616, 15.538, 8.922, 4.779, -6.553, -16.166, -19.596, -18.076, -19.002, -11.648, -6.799, 2.703, 6.972, 16.936, 17.224, 20.993, 19.068, 5.309, -6.767, -14.946, -23.973, -14.794, -8.133, 16.827] + ELEMENT_RCU: Int array with shape [2, 96] +Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + ELEMENT_FLAG: Bool array with shape [2, 96] Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 @@ -131,6 +173,11 @@ Axis Lengths: [3, 96] (NB: Matrix in Row/Column order) 0, -0.243, 2.105, 2.363, 0.243, -2.105, -2.363, 2.49, -1.45, -4.71, -5.767, -4.125, -0.553001, 3.277, 5.575, 5.264, 8.094, 6.174, 1.789, -5.296, -7.771, -9.698, -9.088, -6.164, -2.503, 1.857, 5.148, 8.125, 9.16, 11.711, 9.473, 6.591, -1.358, -3.958, -9.375, -12.043, -15.057, -13.3, -11.324, -6.506, -4.219, 1.095, 5.12, 11.548, 13.145, 14.419, 17.674, 57.565, 17.408, 19.009, 8.711, -7.364, -11.973, -17.343, -16.244, -13.831, 0.234999, 8.386, 15.254, 23.173, 24.576, 19.631, 15.269, 8.381, -8.928, -15.961, -24.872, -24.282, -21.194, -11.649, 3.662, 19.436, 32.003, 31.247, 26.949, 23.246, 6.208, -11.761, -22.276, -24.833, -33.729, -30.959, -26.187, -14.105, -5.898, 14.571, 18.468, 23.475, 41.115, 27.821, 11.529, -4.511, -39.389, -34.986, -31.887, 9.701 0, 1.538, 0.814, -0.814, -1.538, -0.814, 0.814, -3.287, -3.287, -1.749, 0.607, 2.679, 3.498, 2.68, 0.607, -1.749, -3.227, -4.983, -6.208, -4.851, -3.469, -1.056, 1.439, 4.27, 5.902, 5.845, 4.356, 1.89, -0.901, -5.626, -7.351, -7.898, -7.8, -8.534, -5.122, -2.378, 0.42, 2.034, 4.512, 7.279, 8.099, 7.874, 8.232, 4.205, 1.922, -1.353, 33.182, -13.748, -3.533, -5.2, -11.565, -10.616, -9.321, -2.48, 5.403, 9.818, 10.831, 10.32, 5.609, 3.939, -3.908, -10.756, -13.203, -15.716, -12.826, -10.183, -3.31, 5.18, 10.271, 13.794, 15.861, 10.12, 5.991, -2.9, -11.036, -15.08, -18.949, -18.572, -14.168, -8.611, -1.119, 10.014, 14.291, 19.827, 19.425, 17.115, 13.61, 15.584, -6.441, -18.83, -24.893, -23.79, -4.705, 8.209, 17.679, 21.975] + ELEMENT_RCU: Int array with shape [2, 96] +Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + ELEMENT_FLAG: Bool array with shape [2, 96] Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 @@ -155,6 +202,11 @@ Axis Lengths: [3, 96] (NB: Matrix in Row/Column order) -12.31, -5.631, -12.058, -6.449, 19.175, 23.908, 21.431, 25.765, -17.357, -23.938, -26.191, -24.343, 4.375, 2.384, 5.27, 9.094, 5.674, 1.819, 10.084, 7.012, -9.445, -18.025, -13.61, -22.828, -13.503, -16.217, -16.395, -20.226, 6.202, 8.834, -0.605998, 3.514, 13.911, 19.696, 27.355, 22.016, 2.949, 8.433, 4.213, 7.903, -12.226, -2.335, -9.405, 1.091, -3.563, -2.727, -8.349, -6.723, 17.569, -2.772, 28.513, 19.9, -23.675, -6.744, 27.458, 7.756, -19.124, -17.05, -19.827, 13.069, -0.397999, -13.234, -2.025, -0.674, 13.951, -6.971, 13.371, 7.401, -24.018, -25.785, -4.952, -10.591, 0.178001, 15.125, 13.718, 27.602, -9.917, -5.396, -17.64, 6.024, 2.431, 21.652, 9.68, -3.355, -9.262, -0.348999, 22.425, 15.42, -0.99, 11.894, -8.855, -24.628, 13.018, -8.065, -11.836, 12.299 5.535, 8.142, 7.964, 10.284, -5.68, -3.276, -10.88, -9.621, 8.085, 6.985, 9.229, 11.473, -1.331, 2.185, 3.164, 1.104, 5.37, 7.64, 8.765, 11.181, -11.56, -9.361, -16.577, -11.084, 0.767, 2.91, -1.051, -1.674, -12.724, -14.714, -16.087, -19.088, 9.007, 6.705, 10.221, 12.866, -4.217, -3.499, -6.697, -6.741, 14.983, 15.51, 19.548, 19.192, -4.02, -6.557, -3.81, -7.072, -1.331, -12.66, -2.374, 4.486, -4.376, -19.139, 4.194, -1.299, 15.453, -5.966, 4.111, -18.369, -10.689, -6.468, 12.77, 4.372, -4.096, 2.891, -12.73, -9.367, 1.053, 2.96, -0.409, 12.071, -8.172, 3.596, -6.315, 1.905, 0.824, -9.64, 10.507, 14.97, 10.596, -0.663, 6.355, 2.535, -15.07, -3.251, -15.458, -11.122, 6.54, 17.818, 4.849, -6.284, 12.141, -1.191, -3.728, 1.664] + ELEMENT_RCU: Int array with shape [2, 96] +Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191] + ELEMENT_FLAG: Bool array with shape [2, 96] Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -179,6 +231,17 @@ Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) Test HBA_JOINED ..... + Table tBeamTables_tmp.ms/ANTENNA ... + NAME: String "CS001HBA" + DISH_DIAMETER: Double 160.262 + LOFAR_STATION_ID: Int 0 + NAME: String "RS106HBA" + DISH_DIAMETER: Double 44.2208 + LOFAR_STATION_ID: Int 1 + NAME: String "DE601HBA" + DISH_DIAMETER: Double 65.2905 + LOFAR_STATION_ID: Int 2 + Table tBeamTables_tmp.ms/LOFAR_ANTENNA_FIELD ... ANTENNA_ID: Int 0 NAME: String "HBA0" @@ -196,6 +259,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 1.641, 6.512, -4.86, 0.010999, 4.881, 9.752, -11.363, -6.491, -1.62, 3.251, 8.121, 12.992, -12.993, -8.122, -3.251, 1.62, 6.491, 11.362, -9.753, -4.881, -0.011, 4.86, -6.512, -1.641, -80.217, -75.346, -86.718, -81.847, -76.977, -72.106, -93.22, -88.349, -83.478, -78.607, -73.737, -68.866, -94.85, -89.979, -85.109, -80.238, -75.367, -70.496, -91.61, -86.739, -81.869, -76.998, -88.37, -83.499 7.725, 6.463, 6.151, 4.888, 3.625, 2.362, 4.577, 3.313, 2.051, 0.787, -0.476, -1.739, 1.739, 0.476, -0.787, -2.05, -3.313, -4.576, -2.361, -3.624, -4.887, -6.15, -6.462, -7.725, -47.289, -48.551, -48.863, -50.126, -51.389, -52.652, -50.437, -51.701, -52.963, -54.227, -55.49, -56.753, -53.275, -54.538, -55.801, -57.064, -58.327, -59.59, -57.375, -58.638, -59.901, -61.164, -61.476, -62.739] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 @@ -224,6 +292,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 83.499, 88.37, 76.998, 81.869, 86.739, 91.61, 70.495, 75.367, 80.238, 85.109, 89.979, 94.85, 68.865, 73.736, 78.607, 83.478, 88.349, 93.22, 72.105, 76.977, 81.847, 86.718, 75.346, 80.217, 1.641, 6.512, -4.86, 0.010999, 4.881, 9.752, -11.362, -6.491, -1.62, 3.251, 8.121, 12.992, -12.992, -8.121, -3.251, 1.62, 6.491, 11.362, -9.752, -4.881, -0.011, 4.86, -6.512, -1.641 62.739, 61.477, 61.165, 59.902, 58.639, 57.376, 59.591, 58.327, 57.065, 55.801, 54.538, 53.275, 56.753, 55.49, 54.227, 52.964, 51.701, 50.438, 52.653, 51.39, 50.127, 48.864, 48.552, 47.289, 7.72501, 6.46301, 6.15101, 4.88801, 3.62501, 2.36201, 4.57701, 3.31301, 2.05101, 0.78701, -0.47599, -1.73899, 1.73901, 0.47601, -0.78699, -2.04999, -3.31299, -4.57599, -2.36099, -3.62399, -4.88699, -6.14999, -6.46199, -7.72499] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -252,6 +325,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 2.489, 6.915, 11.34, 15.765, -0.119001, 4.307, 8.732, 13.157, -11.577, -7.151, -2.726, 1.699, 6.125, 10.549, 14.975, 19.4, -14.185, -9.76, -5.334, -0.909, 3.517, 7.942, 12.368, 16.793, -16.793, -12.368, -7.942, -3.517, 0.909, 5.334, 9.76, 14.185, -19.4, -14.975, -10.549, -6.125, -1.699, 2.726, 7.151, 11.577, -13.157, -8.732, -4.307, 0.119001, -15.765, -11.34, -6.915, -2.489 11.533, 9.707, 7.882, 6.057, 9.02, 7.195, 5.37, 3.544, 10.158, 8.333, 6.507, 4.682, 2.856, 1.031, -0.794, -2.62, 7.645, 5.82, 3.995, 2.169, 0.344, -1.482, -3.307, -5.133, 5.133, 3.307, 1.482, -0.344, -2.169, -3.995, -5.82, -7.645, 2.62, 0.794, -1.031, -2.856, -4.682, -6.507, -8.333, -10.158, -3.544, -5.37, -7.195, -9.02, -6.057, -7.882, -9.707, -11.533] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -280,6 +358,11 @@ Axis Lengths: [3, 96] (NB: Matrix in Row/Column order) -14.584, -9.512, -4.44, 0.633001, 5.705, -18.849, -13.777, -8.704, -3.632, 1.44, 6.512, 11.584, -23.114, -18.041, -12.969, -7.897, -2.825, 2.247, 7.319, 12.391, 17.463, -22.306, -17.234, -12.162, -7.09, -2.018, 3.054, 8.126, 13.198, 18.271, -21.499, -16.427, -11.355, -6.283, -1.211, 3.861, 8.934, 14.006, 19.078, -20.692, -15.62, -10.548, -5.476, -0.403, 4.669, 9.741, 14.813, 19.885, -19.885, -14.813, -9.74, -4.668, 0.403999, 5.476, 10.548, 15.62, 20.692, -19.077, -14.005, -8.933, -3.861, 1.211, 6.283, 11.355, 16.427, 21.499, -18.27, -13.198, -8.126, -3.054, 2.018, 7.09, 12.162, 17.235, 22.307, -17.463, -12.391, -7.319, -2.247, 2.825, 7.898, 12.97, 18.042, 23.114, -11.584, -6.512, -1.439, 3.633, 8.705, 13.777, 18.849, -5.704, -0.632002, 4.44, 9.512, 14.584 -15.823, -16.636, -17.448, -18.261, -19.073, -11.838, -12.651, -13.463, -14.276, -15.088, -15.901, -16.714, -7.853, -8.666, -9.478, -10.291, -11.104, -11.916, -12.729, -13.541, -14.354, -4.681, -5.494, -6.306, -7.119, -7.931, -8.744, -9.556, -10.369, -11.181, -1.509, -2.321, -3.134, -3.946, -4.759, -5.571, -6.384, -7.196, -8.009, 1.664, 0.851, 0.039, -0.774, -1.586, -2.399, -3.211, -4.024, -4.836, 4.836, 4.024, 3.211, 2.399, 1.586, 0.774, -0.039, -0.851, -1.664, 8.009, 7.196, 6.384, 5.571, 4.759, 3.946, 3.134, 2.321, 1.509, 11.181, 10.369, 9.556, 8.744, 7.931, 7.119, 6.306, 5.494, 4.681, 14.354, 13.541, 12.729, 11.916, 11.104, 10.291, 9.478, 8.666, 7.853, 16.714, 15.901, 15.088, 14.276, 13.463, 12.651, 11.838, 19.073, 18.261, 17.448, 16.636, 15.823] + ELEMENT_RCU: Int array with shape [2, 96] +Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191] + ELEMENT_FLAG: Bool array with shape [2, 96] Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -308,6 +391,17 @@ Axis Lengths: [3, 16] (NB: Matrix in Row/Column order) Test HBA_JOINED_INNER ..... + Table tBeamTables_tmp.ms/ANTENNA ... + NAME: String "CS001HBA" + DISH_DIAMETER: Double 160.262 + LOFAR_STATION_ID: Int 0 + NAME: String "RS106HBA" + DISH_DIAMETER: Double 31.2612 + LOFAR_STATION_ID: Int 1 + NAME: String "DE601HBA" + DISH_DIAMETER: Double 65.2905 + LOFAR_STATION_ID: Int 2 + Table tBeamTables_tmp.ms/LOFAR_ANTENNA_FIELD ... ANTENNA_ID: Int 0 NAME: String "HBA0" @@ -325,6 +419,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 1.641, 6.512, -4.86, 0.010999, 4.881, 9.752, -11.363, -6.491, -1.62, 3.251, 8.121, 12.992, -12.993, -8.122, -3.251, 1.62, 6.491, 11.362, -9.753, -4.881, -0.011, 4.86, -6.512, -1.641, -80.217, -75.346, -86.718, -81.847, -76.977, -72.106, -93.22, -88.349, -83.478, -78.607, -73.737, -68.866, -94.85, -89.979, -85.109, -80.238, -75.367, -70.496, -91.61, -86.739, -81.869, -76.998, -88.37, -83.499 7.725, 6.463, 6.151, 4.888, 3.625, 2.362, 4.577, 3.313, 2.051, 0.787, -0.476, -1.739, 1.739, 0.476, -0.787, -2.05, -3.313, -4.576, -2.361, -3.624, -4.887, -6.15, -6.462, -7.725, -47.289, -48.551, -48.863, -50.126, -51.389, -52.652, -50.437, -51.701, -52.963, -54.227, -55.49, -56.753, -53.275, -54.538, -55.801, -57.064, -58.327, -59.59, -57.375, -58.638, -59.901, -61.164, -61.476, -62.739] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 @@ -353,6 +452,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 83.499, 88.37, 76.998, 81.869, 86.739, 91.61, 70.495, 75.367, 80.238, 85.109, 89.979, 94.85, 68.865, 73.736, 78.607, 83.478, 88.349, 93.22, 72.105, 76.977, 81.847, 86.718, 75.346, 80.217, 1.641, 6.512, -4.86, 0.010999, 4.881, 9.752, -11.362, -6.491, -1.62, 3.251, 8.121, 12.992, -12.992, -8.121, -3.251, 1.62, 6.491, 11.362, -9.752, -4.881, -0.011, 4.86, -6.512, -1.641 62.739, 61.477, 61.165, 59.902, 58.639, 57.376, 59.591, 58.327, 57.065, 55.801, 54.538, 53.275, 56.753, 55.49, 54.227, 52.964, 51.701, 50.438, 52.653, 51.39, 50.127, 48.864, 48.552, 47.289, 7.72501, 6.46301, 6.15101, 4.88801, 3.62501, 2.36201, 4.57701, 3.31301, 2.05101, 0.78701, -0.47599, -1.73899, 1.73901, 0.47601, -0.78699, -2.04999, -3.31299, -4.57599, -2.36099, -3.62399, -4.88699, -6.14999, -6.46199, -7.72499] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -381,6 +485,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 2.489, 6.915, 11.34, 15.765, -0.119001, 4.307, 8.732, 13.157, -11.577, -7.151, -2.726, 1.699, 6.125, 10.549, 14.975, 19.4, -14.185, -9.76, -5.334, -0.909, 3.517, 7.942, 12.368, 16.793, -16.793, -12.368, -7.942, -3.517, 0.909, 5.334, 9.76, 14.185, -19.4, -14.975, -10.549, -6.125, -1.699, 2.726, 7.151, 11.577, -13.157, -8.732, -4.307, 0.119001, -15.765, -11.34, -6.915, -2.489 11.533, 9.707, 7.882, 6.057, 9.02, 7.195, 5.37, 3.544, 10.158, 8.333, 6.507, 4.682, 2.856, 1.031, -0.794, -2.62, 7.645, 5.82, 3.995, 2.169, 0.344, -1.482, -3.307, -5.133, 5.133, 3.307, 1.482, -0.344, -2.169, -3.995, -5.82, -7.645, 2.62, 0.794, -1.031, -2.856, -4.682, -6.507, -8.333, -10.158, -3.544, -5.37, -7.195, -9.02, -6.057, -7.882, -9.707, -11.533] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[-1, -1, -1, -1, -1, 10, 12, -1, -1, -1, 20, 22, 24, 26, -1, -1, -1, 34, 36, 38, 40, 42, 44, -1, -1, 50, 52, 54, 56, 58, 60, -1, -1, -1, 68, 70, 72, 74, -1, -1, -1, 82, 84, -1, -1, -1, -1, -1 + -1, -1, -1, -1, -1, 11, 13, -1, -1, -1, 21, 23, 25, 27, -1, -1, -1, 35, 37, 39, 41, 43, 45, -1, -1, 51, 53, 55, 57, 59, 61, -1, -1, -1, 69, 71, 73, 75, -1, -1, -1, 83, 85, -1, -1, -1, -1, -1] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1 @@ -409,6 +518,11 @@ Axis Lengths: [3, 96] (NB: Matrix in Row/Column order) -14.584, -9.512, -4.44, 0.633001, 5.705, -18.849, -13.777, -8.704, -3.632, 1.44, 6.512, 11.584, -23.114, -18.041, -12.969, -7.897, -2.825, 2.247, 7.319, 12.391, 17.463, -22.306, -17.234, -12.162, -7.09, -2.018, 3.054, 8.126, 13.198, 18.271, -21.499, -16.427, -11.355, -6.283, -1.211, 3.861, 8.934, 14.006, 19.078, -20.692, -15.62, -10.548, -5.476, -0.403, 4.669, 9.741, 14.813, 19.885, -19.885, -14.813, -9.74, -4.668, 0.403999, 5.476, 10.548, 15.62, 20.692, -19.077, -14.005, -8.933, -3.861, 1.211, 6.283, 11.355, 16.427, 21.499, -18.27, -13.198, -8.126, -3.054, 2.018, 7.09, 12.162, 17.235, 22.307, -17.463, -12.391, -7.319, -2.247, 2.825, 7.898, 12.97, 18.042, 23.114, -11.584, -6.512, -1.439, 3.633, 8.705, 13.777, 18.849, -5.704, -0.632002, 4.44, 9.512, 14.584 -15.823, -16.636, -17.448, -18.261, -19.073, -11.838, -12.651, -13.463, -14.276, -15.088, -15.901, -16.714, -7.853, -8.666, -9.478, -10.291, -11.104, -11.916, -12.729, -13.541, -14.354, -4.681, -5.494, -6.306, -7.119, -7.931, -8.744, -9.556, -10.369, -11.181, -1.509, -2.321, -3.134, -3.946, -4.759, -5.571, -6.384, -7.196, -8.009, 1.664, 0.851, 0.039, -0.774, -1.586, -2.399, -3.211, -4.024, -4.836, 4.836, 4.024, 3.211, 2.399, 1.586, 0.774, -0.039, -0.851, -1.664, 8.009, 7.196, 6.384, 5.571, 4.759, 3.946, 3.134, 2.321, 1.509, 11.181, 10.369, 9.556, 8.744, 7.931, 7.119, 6.306, 5.494, 4.681, 14.354, 13.541, 12.729, 11.916, 11.104, 10.291, 9.478, 8.666, 7.853, 16.714, 15.901, 15.088, 14.276, 13.463, 12.651, 11.838, 19.073, 18.261, 17.448, 16.636, 15.823] + ELEMENT_RCU: Int array with shape [2, 96] +Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191] + ELEMENT_FLAG: Bool array with shape [2, 96] Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -437,6 +551,20 @@ Axis Lengths: [3, 16] (NB: Matrix in Row/Column order) Test HBA_DUAL ..... + Table tBeamTables_tmp.ms/ANTENNA ... + NAME: String "CS001HBA0" + DISH_DIAMETER: Double 31.2625 + LOFAR_STATION_ID: Int 0 + NAME: String "RS106HBA" + DISH_DIAMETER: Double 44.2208 + LOFAR_STATION_ID: Int 1 + NAME: String "DE601HBA" + DISH_DIAMETER: Double 65.2905 + LOFAR_STATION_ID: Int 2 + NAME: String "CS001HBA1" + DISH_DIAMETER: Double 31.2621 + LOFAR_STATION_ID: Int 0 + Table tBeamTables_tmp.ms/LOFAR_ANTENNA_FIELD ... ANTENNA_ID: Int 0 NAME: String "HBA0" @@ -454,6 +582,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 1.641, 6.512, -4.86, 0.010999, 4.881, 9.752, -11.363, -6.491, -1.62, 3.251, 8.121, 12.992, -12.993, -8.122, -3.251, 1.62, 6.491, 11.362, -9.753, -4.881, -0.011, 4.86, -6.512, -1.641, -80.217, -75.346, -86.718, -81.847, -76.977, -72.106, -93.22, -88.349, -83.478, -78.607, -73.737, -68.866, -94.85, -89.979, -85.109, -80.238, -75.367, -70.496, -91.61, -86.739, -81.869, -76.998, -88.37, -83.499 7.725, 6.463, 6.151, 4.888, 3.625, 2.362, 4.577, 3.313, 2.051, 0.787, -0.476, -1.739, 1.739, 0.476, -0.787, -2.05, -3.313, -4.576, -2.361, -3.624, -4.887, -6.15, -6.462, -7.725, -47.289, -48.551, -48.863, -50.126, -51.389, -52.652, -50.437, -51.701, -52.963, -54.227, -55.49, -56.753, -53.275, -54.538, -55.801, -57.064, -58.327, -59.59, -57.375, -58.638, -59.901, -61.164, -61.476, -62.739] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 @@ -482,6 +615,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 2.489, 6.915, 11.34, 15.765, -0.119001, 4.307, 8.732, 13.157, -11.577, -7.151, -2.726, 1.699, 6.125, 10.549, 14.975, 19.4, -14.185, -9.76, -5.334, -0.909, 3.517, 7.942, 12.368, 16.793, -16.793, -12.368, -7.942, -3.517, 0.909, 5.334, 9.76, 14.185, -19.4, -14.975, -10.549, -6.125, -1.699, 2.726, 7.151, 11.577, -13.157, -8.732, -4.307, 0.119001, -15.765, -11.34, -6.915, -2.489 11.533, 9.707, 7.882, 6.057, 9.02, 7.195, 5.37, 3.544, 10.158, 8.333, 6.507, 4.682, 2.856, 1.031, -0.794, -2.62, 7.645, 5.82, 3.995, 2.169, 0.344, -1.482, -3.307, -5.133, 5.133, 3.307, 1.482, -0.344, -2.169, -3.995, -5.82, -7.645, 2.62, 0.794, -1.031, -2.856, -4.682, -6.507, -8.333, -10.158, -3.544, -5.37, -7.195, -9.02, -6.057, -7.882, -9.707, -11.533] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -510,6 +648,11 @@ Axis Lengths: [3, 96] (NB: Matrix in Row/Column order) -14.584, -9.512, -4.44, 0.633001, 5.705, -18.849, -13.777, -8.704, -3.632, 1.44, 6.512, 11.584, -23.114, -18.041, -12.969, -7.897, -2.825, 2.247, 7.319, 12.391, 17.463, -22.306, -17.234, -12.162, -7.09, -2.018, 3.054, 8.126, 13.198, 18.271, -21.499, -16.427, -11.355, -6.283, -1.211, 3.861, 8.934, 14.006, 19.078, -20.692, -15.62, -10.548, -5.476, -0.403, 4.669, 9.741, 14.813, 19.885, -19.885, -14.813, -9.74, -4.668, 0.403999, 5.476, 10.548, 15.62, 20.692, -19.077, -14.005, -8.933, -3.861, 1.211, 6.283, 11.355, 16.427, 21.499, -18.27, -13.198, -8.126, -3.054, 2.018, 7.09, 12.162, 17.235, 22.307, -17.463, -12.391, -7.319, -2.247, 2.825, 7.898, 12.97, 18.042, 23.114, -11.584, -6.512, -1.439, 3.633, 8.705, 13.777, 18.849, -5.704, -0.632002, 4.44, 9.512, 14.584 -15.823, -16.636, -17.448, -18.261, -19.073, -11.838, -12.651, -13.463, -14.276, -15.088, -15.901, -16.714, -7.853, -8.666, -9.478, -10.291, -11.104, -11.916, -12.729, -13.541, -14.354, -4.681, -5.494, -6.306, -7.119, -7.931, -8.744, -9.556, -10.369, -11.181, -1.509, -2.321, -3.134, -3.946, -4.759, -5.571, -6.384, -7.196, -8.009, 1.664, 0.851, 0.039, -0.774, -1.586, -2.399, -3.211, -4.024, -4.836, 4.836, 4.024, 3.211, 2.399, 1.586, 0.774, -0.039, -0.851, -1.664, 8.009, 7.196, 6.384, 5.571, 4.759, 3.946, 3.134, 2.321, 1.509, 11.181, 10.369, 9.556, 8.744, 7.931, 7.119, 6.306, 5.494, 4.681, 14.354, 13.541, 12.729, 11.916, 11.104, 10.291, 9.478, 8.666, 7.853, 16.714, 15.901, 15.088, 14.276, 13.463, 12.651, 11.838, 19.073, 18.261, 17.448, 16.636, 15.823] + ELEMENT_RCU: Int array with shape [2, 96] +Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191] + ELEMENT_FLAG: Bool array with shape [2, 96] Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -538,6 +681,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 83.499, 88.37, 76.998, 81.869, 86.739, 91.61, 70.495, 75.367, 80.238, 85.109, 89.979, 94.85, 68.865, 73.736, 78.607, 83.478, 88.349, 93.22, 72.105, 76.977, 81.847, 86.718, 75.346, 80.217, 1.641, 6.512, -4.86, 0.010999, 4.881, 9.752, -11.362, -6.491, -1.62, 3.251, 8.121, 12.992, -12.992, -8.121, -3.251, 1.62, 6.491, 11.362, -9.752, -4.881, -0.011, 4.86, -6.512, -1.641 62.739, 61.477, 61.165, 59.902, 58.639, 57.376, 59.591, 58.327, 57.065, 55.801, 54.538, 53.275, 56.753, 55.49, 54.227, 52.964, 51.701, 50.438, 52.653, 51.39, 50.127, 48.864, 48.552, 47.289, 7.72501, 6.46301, 6.15101, 4.88801, 3.62501, 2.36201, 4.57701, 3.31301, 2.05101, 0.78701, -0.47599, -1.73899, 1.73901, 0.47601, -0.78699, -2.04999, -3.31299, -4.57599, -2.36099, -3.62399, -4.88699, -6.14999, -6.46199, -7.72499] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -566,6 +714,20 @@ Axis Lengths: [3, 16] (NB: Matrix in Row/Column order) Test HBA_DUAL_INNER ..... + Table tBeamTables_tmp.ms/ANTENNA ... + NAME: String "CS001HBA0" + DISH_DIAMETER: Double 31.2625 + LOFAR_STATION_ID: Int 0 + NAME: String "RS106HBA" + DISH_DIAMETER: Double 31.2612 + LOFAR_STATION_ID: Int 1 + NAME: String "DE601HBA" + DISH_DIAMETER: Double 65.2905 + LOFAR_STATION_ID: Int 2 + NAME: String "CS001HBA1" + DISH_DIAMETER: Double 31.2621 + LOFAR_STATION_ID: Int 0 + Table tBeamTables_tmp.ms/LOFAR_ANTENNA_FIELD ... ANTENNA_ID: Int 0 NAME: String "HBA0" @@ -583,6 +745,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 1.641, 6.512, -4.86, 0.010999, 4.881, 9.752, -11.363, -6.491, -1.62, 3.251, 8.121, 12.992, -12.993, -8.122, -3.251, 1.62, 6.491, 11.362, -9.753, -4.881, -0.011, 4.86, -6.512, -1.641, -80.217, -75.346, -86.718, -81.847, -76.977, -72.106, -93.22, -88.349, -83.478, -78.607, -73.737, -68.866, -94.85, -89.979, -85.109, -80.238, -75.367, -70.496, -91.61, -86.739, -81.869, -76.998, -88.37, -83.499 7.725, 6.463, 6.151, 4.888, 3.625, 2.362, 4.577, 3.313, 2.051, 0.787, -0.476, -1.739, 1.739, 0.476, -0.787, -2.05, -3.313, -4.576, -2.361, -3.624, -4.887, -6.15, -6.462, -7.725, -47.289, -48.551, -48.863, -50.126, -51.389, -52.652, -50.437, -51.701, -52.963, -54.227, -55.49, -56.753, -53.275, -54.538, -55.801, -57.064, -58.327, -59.59, -57.375, -58.638, -59.901, -61.164, -61.476, -62.739] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 @@ -611,6 +778,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 2.489, 6.915, 11.34, 15.765, -0.119001, 4.307, 8.732, 13.157, -11.577, -7.151, -2.726, 1.699, 6.125, 10.549, 14.975, 19.4, -14.185, -9.76, -5.334, -0.909, 3.517, 7.942, 12.368, 16.793, -16.793, -12.368, -7.942, -3.517, 0.909, 5.334, 9.76, 14.185, -19.4, -14.975, -10.549, -6.125, -1.699, 2.726, 7.151, 11.577, -13.157, -8.732, -4.307, 0.119001, -15.765, -11.34, -6.915, -2.489 11.533, 9.707, 7.882, 6.057, 9.02, 7.195, 5.37, 3.544, 10.158, 8.333, 6.507, 4.682, 2.856, 1.031, -0.794, -2.62, 7.645, 5.82, 3.995, 2.169, 0.344, -1.482, -3.307, -5.133, 5.133, 3.307, 1.482, -0.344, -2.169, -3.995, -5.82, -7.645, 2.62, 0.794, -1.031, -2.856, -4.682, -6.507, -8.333, -10.158, -3.544, -5.37, -7.195, -9.02, -6.057, -7.882, -9.707, -11.533] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[-1, -1, -1, -1, -1, 10, 12, -1, -1, -1, 20, 22, 24, 26, -1, -1, -1, 34, 36, 38, 40, 42, 44, -1, -1, 50, 52, 54, 56, 58, 60, -1, -1, -1, 68, 70, 72, 74, -1, -1, -1, 82, 84, -1, -1, -1, -1, -1 + -1, -1, -1, -1, -1, 11, 13, -1, -1, -1, 21, 23, 25, 27, -1, -1, -1, 35, 37, 39, 41, 43, 45, -1, -1, 51, 53, 55, 57, 59, 61, -1, -1, -1, 69, 71, 73, 75, -1, -1, -1, 83, 85, -1, -1, -1, -1, -1] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1 @@ -639,6 +811,11 @@ Axis Lengths: [3, 96] (NB: Matrix in Row/Column order) -14.584, -9.512, -4.44, 0.633001, 5.705, -18.849, -13.777, -8.704, -3.632, 1.44, 6.512, 11.584, -23.114, -18.041, -12.969, -7.897, -2.825, 2.247, 7.319, 12.391, 17.463, -22.306, -17.234, -12.162, -7.09, -2.018, 3.054, 8.126, 13.198, 18.271, -21.499, -16.427, -11.355, -6.283, -1.211, 3.861, 8.934, 14.006, 19.078, -20.692, -15.62, -10.548, -5.476, -0.403, 4.669, 9.741, 14.813, 19.885, -19.885, -14.813, -9.74, -4.668, 0.403999, 5.476, 10.548, 15.62, 20.692, -19.077, -14.005, -8.933, -3.861, 1.211, 6.283, 11.355, 16.427, 21.499, -18.27, -13.198, -8.126, -3.054, 2.018, 7.09, 12.162, 17.235, 22.307, -17.463, -12.391, -7.319, -2.247, 2.825, 7.898, 12.97, 18.042, 23.114, -11.584, -6.512, -1.439, 3.633, 8.705, 13.777, 18.849, -5.704, -0.632002, 4.44, 9.512, 14.584 -15.823, -16.636, -17.448, -18.261, -19.073, -11.838, -12.651, -13.463, -14.276, -15.088, -15.901, -16.714, -7.853, -8.666, -9.478, -10.291, -11.104, -11.916, -12.729, -13.541, -14.354, -4.681, -5.494, -6.306, -7.119, -7.931, -8.744, -9.556, -10.369, -11.181, -1.509, -2.321, -3.134, -3.946, -4.759, -5.571, -6.384, -7.196, -8.009, 1.664, 0.851, 0.039, -0.774, -1.586, -2.399, -3.211, -4.024, -4.836, 4.836, 4.024, 3.211, 2.399, 1.586, 0.774, -0.039, -0.851, -1.664, 8.009, 7.196, 6.384, 5.571, 4.759, 3.946, 3.134, 2.321, 1.509, 11.181, 10.369, 9.556, 8.744, 7.931, 7.119, 6.306, 5.494, 4.681, 14.354, 13.541, 12.729, 11.916, 11.104, 10.291, 9.478, 8.666, 7.853, 16.714, 15.901, 15.088, 14.276, 13.463, 12.651, 11.838, 19.073, 18.261, 17.448, 16.636, 15.823] + ELEMENT_RCU: Int array with shape [2, 96] +Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191] + ELEMENT_FLAG: Bool array with shape [2, 96] Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -667,6 +844,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 83.499, 88.37, 76.998, 81.869, 86.739, 91.61, 70.495, 75.367, 80.238, 85.109, 89.979, 94.85, 68.865, 73.736, 78.607, 83.478, 88.349, 93.22, 72.105, 76.977, 81.847, 86.718, 75.346, 80.217, 1.641, 6.512, -4.86, 0.010999, 4.881, 9.752, -11.362, -6.491, -1.62, 3.251, 8.121, 12.992, -12.992, -8.121, -3.251, 1.62, 6.491, 11.362, -9.752, -4.881, -0.011, 4.86, -6.512, -1.641 62.739, 61.477, 61.165, 59.902, 58.639, 57.376, 59.591, 58.327, 57.065, 55.801, 54.538, 53.275, 56.753, 55.49, 54.227, 52.964, 51.701, 50.438, 52.653, 51.39, 50.127, 48.864, 48.552, 47.289, 7.72501, 6.46301, 6.15101, 4.88801, 3.62501, 2.36201, 4.57701, 3.31301, 2.05101, 0.78701, -0.47599, -1.73899, 1.73901, 0.47601, -0.78699, -2.04999, -3.31299, -4.57599, -2.36099, -3.62399, -4.88699, -6.14999, -6.46199, -7.72499] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -694,12 +876,73 @@ Axis Lengths: [3, 16] (NB: Matrix in Row/Column order) FLAG_ROW: Bool 0 Table tBeamTables_tmp.ms/OBSERVATION ... + TIME_RANGE: Double array with shape [2] +[4.85676e+09, 4.85677e+09] LOFAR_ANTENNA_SET: String "HBA_DUAL_INNER" - LOFAR_ANTENNA_SET: String "HBA_DUAL_INNER" - LOFAR_ANTENNA_SET: String "HBA_DUAL_INNER" + +ELEMENT_FLAG after FailedTileInfo _empty: +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1 + 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0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MENT_FAILURE ... + +ELEMENT_FLAG after FailedTileInfo _filled: +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1 + 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1] +Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) +[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0] + + Table tBeamTables_tmp.ms/LOFAR_ELEMENT_FAILURE ... + ANTENNA_FIELD_ID: Int 0 + ELEMENT_INDEX: Int 1 + TIME: Double 4.85676e+09 + ANTENNA_FIELD_ID: Int 0 + ELEMENT_INDEX: Int 11 + TIME: Double 4.85676e+09 + ANTENNA_FIELD_ID: Int 1 + ELEMENT_INDEX: Int 5 + TIME: Double 4.85676e+09 + ANTENNA_FIELD_ID: Int 3 + ELEMENT_INDEX: Int 44 + TIME: Double 4.85676e+09 + ANTENNA_FIELD_ID: Int 2 + ELEMENT_INDEX: Int 21 + TIME: Double 4.85676e+09 + ANTENNA_FIELD_ID: Int 1 + ELEMENT_INDEX: Int 12 + TIME: Double 4.85676e+09 Test HBA_ZERO ..... + Table tBeamTables_tmp.ms/ANTENNA ... + NAME: String "CS001HBA0" + DISH_DIAMETER: Double 31.2625 + LOFAR_STATION_ID: Int 0 + NAME: String "RS106HBA" + DISH_DIAMETER: Double 44.2208 + LOFAR_STATION_ID: Int 1 + NAME: String "DE601HBA" + DISH_DIAMETER: Double 65.2905 + LOFAR_STATION_ID: Int 2 + Table tBeamTables_tmp.ms/LOFAR_ANTENNA_FIELD ... ANTENNA_ID: Int 0 NAME: String "HBA0" @@ -717,6 +960,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 1.641, 6.512, -4.86, 0.010999, 4.881, 9.752, -11.363, -6.491, -1.62, 3.251, 8.121, 12.992, -12.993, -8.122, -3.251, 1.62, 6.491, 11.362, -9.753, -4.881, -0.011, 4.86, -6.512, -1.641, -80.217, -75.346, -86.718, -81.847, -76.977, -72.106, -93.22, -88.349, -83.478, -78.607, -73.737, -68.866, -94.85, -89.979, -85.109, -80.238, -75.367, -70.496, -91.61, -86.739, -81.869, -76.998, -88.37, -83.499 7.725, 6.463, 6.151, 4.888, 3.625, 2.362, 4.577, 3.313, 2.051, 0.787, -0.476, -1.739, 1.739, 0.476, -0.787, -2.05, -3.313, -4.576, -2.361, -3.624, -4.887, -6.15, -6.462, -7.725, -47.289, -48.551, -48.863, -50.126, -51.389, -52.652, -50.437, -51.701, -52.963, -54.227, -55.49, -56.753, -53.275, -54.538, -55.801, -57.064, -58.327, -59.59, -57.375, -58.638, -59.901, -61.164, -61.476, -62.739] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 @@ -745,6 +993,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 2.489, 6.915, 11.34, 15.765, -0.119001, 4.307, 8.732, 13.157, -11.577, -7.151, -2.726, 1.699, 6.125, 10.549, 14.975, 19.4, -14.185, -9.76, -5.334, -0.909, 3.517, 7.942, 12.368, 16.793, -16.793, -12.368, -7.942, -3.517, 0.909, 5.334, 9.76, 14.185, -19.4, -14.975, -10.549, -6.125, -1.699, 2.726, 7.151, 11.577, -13.157, -8.732, -4.307, 0.119001, -15.765, -11.34, -6.915, -2.489 11.533, 9.707, 7.882, 6.057, 9.02, 7.195, 5.37, 3.544, 10.158, 8.333, 6.507, 4.682, 2.856, 1.031, -0.794, -2.62, 7.645, 5.82, 3.995, 2.169, 0.344, -1.482, -3.307, -5.133, 5.133, 3.307, 1.482, -0.344, -2.169, -3.995, -5.82, -7.645, 2.62, 0.794, -1.031, -2.856, -4.682, -6.507, -8.333, -10.158, -3.544, -5.37, -7.195, -9.02, -6.057, -7.882, -9.707, -11.533] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -773,6 +1026,11 @@ Axis Lengths: [3, 96] (NB: Matrix in Row/Column order) -14.584, -9.512, -4.44, 0.633001, 5.705, -18.849, -13.777, -8.704, -3.632, 1.44, 6.512, 11.584, -23.114, -18.041, -12.969, -7.897, -2.825, 2.247, 7.319, 12.391, 17.463, -22.306, -17.234, -12.162, -7.09, -2.018, 3.054, 8.126, 13.198, 18.271, -21.499, -16.427, -11.355, -6.283, -1.211, 3.861, 8.934, 14.006, 19.078, -20.692, -15.62, -10.548, -5.476, -0.403, 4.669, 9.741, 14.813, 19.885, -19.885, -14.813, -9.74, -4.668, 0.403999, 5.476, 10.548, 15.62, 20.692, -19.077, -14.005, -8.933, -3.861, 1.211, 6.283, 11.355, 16.427, 21.499, -18.27, -13.198, -8.126, -3.054, 2.018, 7.09, 12.162, 17.235, 22.307, -17.463, -12.391, -7.319, -2.247, 2.825, 7.898, 12.97, 18.042, 23.114, -11.584, -6.512, -1.439, 3.633, 8.705, 13.777, 18.849, -5.704, -0.632002, 4.44, 9.512, 14.584 -15.823, -16.636, -17.448, -18.261, -19.073, -11.838, -12.651, -13.463, -14.276, -15.088, -15.901, -16.714, -7.853, -8.666, -9.478, -10.291, -11.104, -11.916, -12.729, -13.541, -14.354, -4.681, -5.494, -6.306, -7.119, -7.931, -8.744, -9.556, -10.369, -11.181, -1.509, -2.321, -3.134, -3.946, -4.759, -5.571, -6.384, -7.196, -8.009, 1.664, 0.851, 0.039, -0.774, -1.586, -2.399, -3.211, -4.024, -4.836, 4.836, 4.024, 3.211, 2.399, 1.586, 0.774, -0.039, -0.851, -1.664, 8.009, 7.196, 6.384, 5.571, 4.759, 3.946, 3.134, 2.321, 1.509, 11.181, 10.369, 9.556, 8.744, 7.931, 7.119, 6.306, 5.494, 4.681, 14.354, 13.541, 12.729, 11.916, 11.104, 10.291, 9.478, 8.666, 7.853, 16.714, 15.901, 15.088, 14.276, 13.463, 12.651, 11.838, 19.073, 18.261, 17.448, 16.636, 15.823] + ELEMENT_RCU: Int array with shape [2, 96] +Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191] + ELEMENT_FLAG: Bool array with shape [2, 96] Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -801,6 +1059,17 @@ Axis Lengths: [3, 16] (NB: Matrix in Row/Column order) Test HBA_ZERO_INNER ..... + Table tBeamTables_tmp.ms/ANTENNA ... + NAME: String "CS001HBA0" + DISH_DIAMETER: Double 31.2625 + LOFAR_STATION_ID: Int 0 + NAME: String "RS106HBA" + DISH_DIAMETER: Double 31.2612 + LOFAR_STATION_ID: Int 1 + NAME: String "DE601HBA" + DISH_DIAMETER: Double 65.2905 + LOFAR_STATION_ID: Int 2 + Table tBeamTables_tmp.ms/LOFAR_ANTENNA_FIELD ... ANTENNA_ID: Int 0 NAME: String "HBA0" @@ -818,6 +1087,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 1.641, 6.512, -4.86, 0.010999, 4.881, 9.752, -11.363, -6.491, -1.62, 3.251, 8.121, 12.992, -12.993, -8.122, -3.251, 1.62, 6.491, 11.362, -9.753, -4.881, -0.011, 4.86, -6.512, -1.641, -80.217, -75.346, -86.718, -81.847, -76.977, -72.106, -93.22, -88.349, -83.478, -78.607, -73.737, -68.866, -94.85, -89.979, -85.109, -80.238, -75.367, -70.496, -91.61, -86.739, -81.869, -76.998, -88.37, -83.499 7.725, 6.463, 6.151, 4.888, 3.625, 2.362, 4.577, 3.313, 2.051, 0.787, -0.476, -1.739, 1.739, 0.476, -0.787, -2.05, -3.313, -4.576, -2.361, -3.624, -4.887, -6.15, -6.462, -7.725, -47.289, -48.551, -48.863, -50.126, -51.389, -52.652, -50.437, -51.701, -52.963, -54.227, -55.49, -56.753, -53.275, -54.538, -55.801, -57.064, -58.327, -59.59, -57.375, -58.638, -59.901, -61.164, -61.476, -62.739] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 @@ -846,6 +1120,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 2.489, 6.915, 11.34, 15.765, -0.119001, 4.307, 8.732, 13.157, -11.577, -7.151, -2.726, 1.699, 6.125, 10.549, 14.975, 19.4, -14.185, -9.76, -5.334, -0.909, 3.517, 7.942, 12.368, 16.793, -16.793, -12.368, -7.942, -3.517, 0.909, 5.334, 9.76, 14.185, -19.4, -14.975, -10.549, -6.125, -1.699, 2.726, 7.151, 11.577, -13.157, -8.732, -4.307, 0.119001, -15.765, -11.34, -6.915, -2.489 11.533, 9.707, 7.882, 6.057, 9.02, 7.195, 5.37, 3.544, 10.158, 8.333, 6.507, 4.682, 2.856, 1.031, -0.794, -2.62, 7.645, 5.82, 3.995, 2.169, 0.344, -1.482, -3.307, -5.133, 5.133, 3.307, 1.482, -0.344, -2.169, -3.995, -5.82, -7.645, 2.62, 0.794, -1.031, -2.856, -4.682, -6.507, -8.333, -10.158, -3.544, -5.37, -7.195, -9.02, -6.057, -7.882, -9.707, -11.533] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[-1, -1, -1, -1, -1, 10, 12, -1, -1, -1, 20, 22, 24, 26, -1, -1, -1, 34, 36, 38, 40, 42, 44, -1, -1, 50, 52, 54, 56, 58, 60, -1, -1, -1, 68, 70, 72, 74, -1, -1, -1, 82, 84, -1, -1, -1, -1, -1 + -1, -1, -1, -1, -1, 11, 13, -1, -1, -1, 21, 23, 25, 27, -1, -1, -1, 35, 37, 39, 41, 43, 45, -1, -1, 51, 53, 55, 57, 59, 61, -1, -1, -1, 69, 71, 73, 75, -1, -1, -1, 83, 85, -1, -1, -1, -1, -1] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1 @@ -874,6 +1153,11 @@ Axis Lengths: [3, 96] (NB: Matrix in Row/Column order) -14.584, -9.512, -4.44, 0.633001, 5.705, -18.849, -13.777, -8.704, -3.632, 1.44, 6.512, 11.584, -23.114, -18.041, -12.969, -7.897, -2.825, 2.247, 7.319, 12.391, 17.463, -22.306, -17.234, -12.162, -7.09, -2.018, 3.054, 8.126, 13.198, 18.271, -21.499, -16.427, -11.355, -6.283, -1.211, 3.861, 8.934, 14.006, 19.078, -20.692, -15.62, -10.548, -5.476, -0.403, 4.669, 9.741, 14.813, 19.885, -19.885, -14.813, -9.74, -4.668, 0.403999, 5.476, 10.548, 15.62, 20.692, -19.077, -14.005, -8.933, -3.861, 1.211, 6.283, 11.355, 16.427, 21.499, -18.27, -13.198, -8.126, -3.054, 2.018, 7.09, 12.162, 17.235, 22.307, -17.463, -12.391, -7.319, -2.247, 2.825, 7.898, 12.97, 18.042, 23.114, -11.584, -6.512, -1.439, 3.633, 8.705, 13.777, 18.849, -5.704, -0.632002, 4.44, 9.512, 14.584 -15.823, -16.636, -17.448, -18.261, -19.073, -11.838, -12.651, -13.463, -14.276, -15.088, -15.901, -16.714, -7.853, -8.666, -9.478, -10.291, -11.104, -11.916, -12.729, -13.541, -14.354, -4.681, -5.494, -6.306, -7.119, -7.931, -8.744, -9.556, -10.369, -11.181, -1.509, -2.321, -3.134, -3.946, -4.759, -5.571, -6.384, -7.196, -8.009, 1.664, 0.851, 0.039, -0.774, -1.586, -2.399, -3.211, -4.024, -4.836, 4.836, 4.024, 3.211, 2.399, 1.586, 0.774, -0.039, -0.851, -1.664, 8.009, 7.196, 6.384, 5.571, 4.759, 3.946, 3.134, 2.321, 1.509, 11.181, 10.369, 9.556, 8.744, 7.931, 7.119, 6.306, 5.494, 4.681, 14.354, 13.541, 12.729, 11.916, 11.104, 10.291, 9.478, 8.666, 7.853, 16.714, 15.901, 15.088, 14.276, 13.463, 12.651, 11.838, 19.073, 18.261, 17.448, 16.636, 15.823] + ELEMENT_RCU: Int array with shape [2, 96] +Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191] + ELEMENT_FLAG: Bool array with shape [2, 96] Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -902,6 +1186,17 @@ Axis Lengths: [3, 16] (NB: Matrix in Row/Column order) Test HBA_ONE ..... + Table tBeamTables_tmp.ms/ANTENNA ... + NAME: String "CS001HBA1" + DISH_DIAMETER: Double 31.2621 + LOFAR_STATION_ID: Int 0 + NAME: String "RS106HBA" + DISH_DIAMETER: Double 44.2208 + LOFAR_STATION_ID: Int 1 + NAME: String "DE601HBA" + DISH_DIAMETER: Double 65.2905 + LOFAR_STATION_ID: Int 2 + Table tBeamTables_tmp.ms/LOFAR_ANTENNA_FIELD ... ANTENNA_ID: Int 0 NAME: String "HBA1" @@ -919,6 +1214,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 83.499, 88.37, 76.998, 81.869, 86.739, 91.61, 70.495, 75.367, 80.238, 85.109, 89.979, 94.85, 68.865, 73.736, 78.607, 83.478, 88.349, 93.22, 72.105, 76.977, 81.847, 86.718, 75.346, 80.217, 1.641, 6.512, -4.86, 0.010999, 4.881, 9.752, -11.362, -6.491, -1.62, 3.251, 8.121, 12.992, -12.992, -8.121, -3.251, 1.62, 6.491, 11.362, -9.752, -4.881, -0.011, 4.86, -6.512, -1.641 62.739, 61.477, 61.165, 59.902, 58.639, 57.376, 59.591, 58.327, 57.065, 55.801, 54.538, 53.275, 56.753, 55.49, 54.227, 52.964, 51.701, 50.438, 52.653, 51.39, 50.127, 48.864, 48.552, 47.289, 7.72501, 6.46301, 6.15101, 4.88801, 3.62501, 2.36201, 4.57701, 3.31301, 2.05101, 0.78701, -0.47599, -1.73899, 1.73901, 0.47601, -0.78699, -2.04999, -3.31299, -4.57599, -2.36099, -3.62399, -4.88699, -6.14999, -6.46199, -7.72499] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -947,6 +1247,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 2.489, 6.915, 11.34, 15.765, -0.119001, 4.307, 8.732, 13.157, -11.577, -7.151, -2.726, 1.699, 6.125, 10.549, 14.975, 19.4, -14.185, -9.76, -5.334, -0.909, 3.517, 7.942, 12.368, 16.793, -16.793, -12.368, -7.942, -3.517, 0.909, 5.334, 9.76, 14.185, -19.4, -14.975, -10.549, -6.125, -1.699, 2.726, 7.151, 11.577, -13.157, -8.732, -4.307, 0.119001, -15.765, -11.34, -6.915, -2.489 11.533, 9.707, 7.882, 6.057, 9.02, 7.195, 5.37, 3.544, 10.158, 8.333, 6.507, 4.682, 2.856, 1.031, -0.794, -2.62, 7.645, 5.82, 3.995, 2.169, 0.344, -1.482, -3.307, -5.133, 5.133, 3.307, 1.482, -0.344, -2.169, -3.995, -5.82, -7.645, 2.62, 0.794, -1.031, -2.856, -4.682, -6.507, -8.333, -10.158, -3.544, -5.37, -7.195, -9.02, -6.057, -7.882, -9.707, -11.533] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -975,6 +1280,11 @@ Axis Lengths: [3, 96] (NB: Matrix in Row/Column order) -14.584, -9.512, -4.44, 0.633001, 5.705, -18.849, -13.777, -8.704, -3.632, 1.44, 6.512, 11.584, -23.114, -18.041, -12.969, -7.897, -2.825, 2.247, 7.319, 12.391, 17.463, -22.306, -17.234, -12.162, -7.09, -2.018, 3.054, 8.126, 13.198, 18.271, -21.499, -16.427, -11.355, -6.283, -1.211, 3.861, 8.934, 14.006, 19.078, -20.692, -15.62, -10.548, -5.476, -0.403, 4.669, 9.741, 14.813, 19.885, -19.885, -14.813, -9.74, -4.668, 0.403999, 5.476, 10.548, 15.62, 20.692, -19.077, -14.005, -8.933, -3.861, 1.211, 6.283, 11.355, 16.427, 21.499, -18.27, -13.198, -8.126, -3.054, 2.018, 7.09, 12.162, 17.235, 22.307, -17.463, -12.391, -7.319, -2.247, 2.825, 7.898, 12.97, 18.042, 23.114, -11.584, -6.512, -1.439, 3.633, 8.705, 13.777, 18.849, -5.704, -0.632002, 4.44, 9.512, 14.584 -15.823, -16.636, -17.448, -18.261, -19.073, -11.838, -12.651, -13.463, -14.276, -15.088, -15.901, -16.714, -7.853, -8.666, -9.478, -10.291, -11.104, -11.916, -12.729, -13.541, -14.354, -4.681, -5.494, -6.306, -7.119, -7.931, -8.744, -9.556, -10.369, -11.181, -1.509, -2.321, -3.134, -3.946, -4.759, -5.571, -6.384, -7.196, -8.009, 1.664, 0.851, 0.039, -0.774, -1.586, -2.399, -3.211, -4.024, -4.836, 4.836, 4.024, 3.211, 2.399, 1.586, 0.774, -0.039, -0.851, -1.664, 8.009, 7.196, 6.384, 5.571, 4.759, 3.946, 3.134, 2.321, 1.509, 11.181, 10.369, 9.556, 8.744, 7.931, 7.119, 6.306, 5.494, 4.681, 14.354, 13.541, 12.729, 11.916, 11.104, 10.291, 9.478, 8.666, 7.853, 16.714, 15.901, 15.088, 14.276, 13.463, 12.651, 11.838, 19.073, 18.261, 17.448, 16.636, 15.823] + ELEMENT_RCU: Int array with shape [2, 96] +Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191] + ELEMENT_FLAG: Bool array with shape [2, 96] Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -1003,6 +1313,17 @@ Axis Lengths: [3, 16] (NB: Matrix in Row/Column order) Test HBA_ONE_INNER ..... + Table tBeamTables_tmp.ms/ANTENNA ... + NAME: String "CS001HBA1" + DISH_DIAMETER: Double 31.2621 + LOFAR_STATION_ID: Int 0 + NAME: String "RS106HBA" + DISH_DIAMETER: Double 31.2612 + LOFAR_STATION_ID: Int 1 + NAME: String "DE601HBA" + DISH_DIAMETER: Double 65.2905 + LOFAR_STATION_ID: Int 2 + Table tBeamTables_tmp.ms/LOFAR_ANTENNA_FIELD ... ANTENNA_ID: Int 0 NAME: String "HBA1" @@ -1020,6 +1341,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 83.499, 88.37, 76.998, 81.869, 86.739, 91.61, 70.495, 75.367, 80.238, 85.109, 89.979, 94.85, 68.865, 73.736, 78.607, 83.478, 88.349, 93.22, 72.105, 76.977, 81.847, 86.718, 75.346, 80.217, 1.641, 6.512, -4.86, 0.010999, 4.881, 9.752, -11.362, -6.491, -1.62, 3.251, 8.121, 12.992, -12.992, -8.121, -3.251, 1.62, 6.491, 11.362, -9.752, -4.881, -0.011, 4.86, -6.512, -1.641 62.739, 61.477, 61.165, 59.902, 58.639, 57.376, 59.591, 58.327, 57.065, 55.801, 54.538, 53.275, 56.753, 55.49, 54.227, 52.964, 51.701, 50.438, 52.653, 51.39, 50.127, 48.864, 48.552, 47.289, 7.72501, 6.46301, 6.15101, 4.88801, 3.62501, 2.36201, 4.57701, 3.31301, 2.05101, 0.78701, -0.47599, -1.73899, 1.73901, 0.47601, -0.78699, -2.04999, -3.31299, -4.57599, -2.36099, -3.62399, -4.88699, -6.14999, -6.46199, -7.72499] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94 + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 @@ -1048,6 +1374,11 @@ Axis Lengths: [3, 48] (NB: Matrix in Row/Column order) 2.489, 6.915, 11.34, 15.765, -0.119001, 4.307, 8.732, 13.157, -11.577, -7.151, -2.726, 1.699, 6.125, 10.549, 14.975, 19.4, -14.185, -9.76, -5.334, -0.909, 3.517, 7.942, 12.368, 16.793, -16.793, -12.368, -7.942, -3.517, 0.909, 5.334, 9.76, 14.185, -19.4, -14.975, -10.549, -6.125, -1.699, 2.726, 7.151, 11.577, -13.157, -8.732, -4.307, 0.119001, -15.765, -11.34, -6.915, -2.489 11.533, 9.707, 7.882, 6.057, 9.02, 7.195, 5.37, 3.544, 10.158, 8.333, 6.507, 4.682, 2.856, 1.031, -0.794, -2.62, 7.645, 5.82, 3.995, 2.169, 0.344, -1.482, -3.307, -5.133, 5.133, 3.307, 1.482, -0.344, -2.169, -3.995, -5.82, -7.645, 2.62, 0.794, -1.031, -2.856, -4.682, -6.507, -8.333, -10.158, -3.544, -5.37, -7.195, -9.02, -6.057, -7.882, -9.707, -11.533] + ELEMENT_RCU: Int array with shape [2, 48] +Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) +[-1, -1, -1, -1, -1, 10, 12, -1, -1, -1, 20, 22, 24, 26, -1, -1, -1, 34, 36, 38, 40, 42, 44, -1, -1, 50, 52, 54, 56, 58, 60, -1, -1, -1, 68, 70, 72, 74, -1, -1, -1, 82, 84, -1, -1, -1, -1, -1 + -1, -1, -1, -1, -1, 11, 13, -1, -1, -1, 21, 23, 25, 27, -1, -1, -1, 35, 37, 39, 41, 43, 45, -1, -1, 51, 53, 55, 57, 59, 61, -1, -1, -1, 69, 71, 73, 75, -1, -1, -1, 83, 85, -1, -1, -1, -1, -1] + ELEMENT_FLAG: Bool array with shape [2, 48] Axis Lengths: [2, 48] (NB: Matrix in Row/Column order) [1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1 @@ -1076,6 +1407,11 @@ Axis Lengths: [3, 96] (NB: Matrix in Row/Column order) -14.584, -9.512, -4.44, 0.633001, 5.705, -18.849, -13.777, -8.704, -3.632, 1.44, 6.512, 11.584, -23.114, -18.041, -12.969, -7.897, -2.825, 2.247, 7.319, 12.391, 17.463, -22.306, -17.234, -12.162, -7.09, -2.018, 3.054, 8.126, 13.198, 18.271, -21.499, -16.427, -11.355, -6.283, -1.211, 3.861, 8.934, 14.006, 19.078, -20.692, -15.62, -10.548, -5.476, -0.403, 4.669, 9.741, 14.813, 19.885, -19.885, -14.813, -9.74, -4.668, 0.403999, 5.476, 10.548, 15.62, 20.692, -19.077, -14.005, -8.933, -3.861, 1.211, 6.283, 11.355, 16.427, 21.499, -18.27, -13.198, -8.126, -3.054, 2.018, 7.09, 12.162, 17.235, 22.307, -17.463, -12.391, -7.319, -2.247, 2.825, 7.898, 12.97, 18.042, 23.114, -11.584, -6.512, -1.439, 3.633, 8.705, 13.777, 18.849, -5.704, -0.632002, 4.44, 9.512, 14.584 -15.823, -16.636, -17.448, -18.261, -19.073, -11.838, -12.651, -13.463, -14.276, -15.088, -15.901, -16.714, -7.853, -8.666, -9.478, -10.291, -11.104, -11.916, -12.729, -13.541, -14.354, -4.681, -5.494, -6.306, -7.119, -7.931, -8.744, -9.556, -10.369, -11.181, -1.509, -2.321, -3.134, -3.946, -4.759, -5.571, -6.384, -7.196, -8.009, 1.664, 0.851, 0.039, -0.774, -1.586, -2.399, -3.211, -4.024, -4.836, 4.836, 4.024, 3.211, 2.399, 1.586, 0.774, -0.039, -0.851, -1.664, 8.009, 7.196, 6.384, 5.571, 4.759, 3.946, 3.134, 2.321, 1.509, 11.181, 10.369, 9.556, 8.744, 7.931, 7.119, 6.306, 5.494, 4.681, 14.354, 13.541, 12.729, 11.916, 11.104, 10.291, 9.478, 8.666, 7.853, 16.714, 15.901, 15.088, 14.276, 13.463, 12.651, 11.838, 19.073, 18.261, 17.448, 16.636, 15.823] + ELEMENT_RCU: Int array with shape [2, 96] +Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) +[0, 2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74, 76, 78, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132, 134, 136, 138, 140, 142, 144, 146, 148, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, 176, 178, 180, 182, 184, 186, 188, 190 + 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133, 135, 137, 139, 141, 143, 145, 147, 149, 151, 153, 155, 157, 159, 161, 163, 165, 167, 169, 171, 173, 175, 177, 179, 181, 183, 185, 187, 189, 191] + ELEMENT_FLAG: Bool array with shape [2, 96] Axis Lengths: [2, 96] (NB: Matrix in Row/Column order) [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 diff --git a/LCS/MSLofar/test/tMSLofarTable.cc b/LCS/MSLofar/test/tMSLofarTable.cc index 0151ce9807b..750045643ed 100644 --- a/LCS/MSLofar/test/tMSLofarTable.cc +++ b/LCS/MSLofar/test/tMSLofarTable.cc @@ -50,6 +50,7 @@ void checkAntennaField() ASSERT (allEQ(afcol.position()(0), Vector<Double>(3, 2.5))); ASSERT (allEQ(afcol.coordinateAxes()(0), Matrix<Double>(3,3, 3.5))); ASSERT (allEQ(afcol.elementOffset()(0), Matrix<Double>(3,24, 5.))); + ASSERT (allEQ(afcol.elementRCU()(0), Matrix<Int>(2,24, 10))); ASSERT (allEQ(afcol.elementFlag()(0), Matrix<Bool>(2,24, False))); ASSERT (afcol.tileRotation()(0) == -2.); ASSERT (! afcol.tileElementOffset().isDefined(0)); @@ -87,6 +88,7 @@ void testAntennaField() afcol.position().put (0, Vector<Double>(3, 2.5)); afcol.coordinateAxes().put (0, Matrix<Double>(3,3, 3.5)); afcol.elementOffset().put (0, Matrix<Double>(3,24, 5.)); + afcol.elementRCU().put (0, Matrix<Int>(2,24, 10)); afcol.elementFlag().put (0, Matrix<Bool>(2,24, False)); afcol.tileRotation().put (0, -2.); af.addRow(); diff --git a/LCS/Stream/include/Stream/PortBroker.h b/LCS/Stream/include/Stream/PortBroker.h index bc09bbc90dd..bb954fc80c7 100644 --- a/LCS/Stream/include/Stream/PortBroker.h +++ b/LCS/Stream/include/Stream/PortBroker.h @@ -60,12 +60,12 @@ class PortBroker: protected SocketStream { class ClientStream: public SocketStream { public: - ClientStream( const std::string &hostname, uint16 port, const std::string &resource ); + ClientStream( const std::string &hostname, uint16 port, const std::string &resource, time_t deadline = 0 ); }; protected: static void requestResource( Stream &stream, const std::string &resource ); - FileDescriptorBasedStream *waitForClient( const std::string &resource, time_t timeout = 0 ); + FileDescriptorBasedStream *waitForClient( const std::string &resource, time_t deadline = 0 ); private: PortBroker( uint16 port ); diff --git a/LCS/Stream/include/Stream/SocketStream.h b/LCS/Stream/include/Stream/SocketStream.h index 6b8c0854aee..37f2d2baa77 100644 --- a/LCS/Stream/include/Stream/SocketStream.h +++ b/LCS/Stream/include/Stream/SocketStream.h @@ -47,12 +47,12 @@ class SocketStream : public FileDescriptorBasedStream Client, Server }; - SocketStream(const std::string &hostname, uint16 _port, Protocol, Mode, time_t timeout = 0, const std::string &nfskey = "", bool doAccept = true); + SocketStream(const std::string &hostname, uint16 _port, Protocol, Mode, time_t deadline = 0, const std::string &nfskey = "", bool doAccept = true); virtual ~SocketStream(); FileDescriptorBasedStream *detach(); - void reaccept(time_t timeout = 0); // only for TCP server socket + void reaccept(time_t deadline = 0); // only for TCP server socket void setReadBufferSize(size_t size); const Protocol protocol; @@ -68,7 +68,7 @@ class SocketStream : public FileDescriptorBasedStream static void syncNFS(); - static std::string readkey(const std::string &nfskey, time_t &timeout); + static std::string readkey(const std::string &nfskey, time_t deadline); static void writekey(const std::string &nfskey, uint16 port); static void deletekey(const std::string &nfskey); }; diff --git a/LCS/Stream/src/PortBroker.cc b/LCS/Stream/src/PortBroker.cc index 0108096a1bf..8a3224f0be4 100644 --- a/LCS/Stream/src/PortBroker.cc +++ b/LCS/Stream/src/PortBroker.cc @@ -165,8 +165,8 @@ bool PortBroker::serverStarted() } -FileDescriptorBasedStream *PortBroker::waitForClient( const string &resource, time_t timeout ) { - struct timespec deadline = { time(0L) + timeout, 0 }; +FileDescriptorBasedStream *PortBroker::waitForClient( const string &resource, time_t deadline ) { + struct timespec deadline_ts = { deadline, 0 }; LOG_DEBUG_STR( "PortBroker server: registering " << resource ); @@ -188,9 +188,9 @@ FileDescriptorBasedStream *PortBroker::waitForClient( const string &resource, ti return serverStream.release(); } - if (timeout > 0) { - if (!itsCondition.wait(itsMutex, deadline)) - throw TimeOutException("port broker client: server did not register", THROW_ARGS); + if (deadline > 0) { + if (!itsCondition.wait(itsMutex, deadline_ts)) + THROW(TimeOutException, "port broker client: server did not register"); } else { itsCondition.wait(itsMutex); } @@ -222,10 +222,10 @@ PortBroker::ServerStream::ServerStream( const string &resource ) } -PortBroker::ClientStream::ClientStream( const string &hostname, uint16 port, const string &resource ) +PortBroker::ClientStream::ClientStream( const string &hostname, uint16 port, const string &resource, time_t deadline ) : // connect to port broker - SocketStream(hostname, port, SocketStream::TCP, SocketStream::Client) + SocketStream(hostname, port, SocketStream::TCP, SocketStream::Client, deadline) { // request service PortBroker::requestResource(*this, resource); diff --git a/LCS/Stream/src/SocketStream.cc b/LCS/Stream/src/SocketStream.cc index d14353da008..e1791ecadc2 100644 --- a/LCS/Stream/src/SocketStream.cc +++ b/LCS/Stream/src/SocketStream.cc @@ -65,7 +65,7 @@ static struct RandomState { } randomState; -SocketStream::SocketStream(const std::string &hostname, uint16 _port, Protocol protocol, Mode mode, time_t timeout, const std::string &nfskey, bool doAccept) +SocketStream::SocketStream(const std::string &hostname, uint16 _port, Protocol protocol, Mode mode, time_t deadline, const std::string &nfskey, bool doAccept) : protocol(protocol), mode(mode), @@ -98,7 +98,7 @@ SocketStream::SocketStream(const std::string &hostname, uint16 _port, Protocol p struct addrinfo *result; if (mode == Client && nfskey != "") - port = boost::lexical_cast<uint16>(readkey(nfskey, timeout)); + port = boost::lexical_cast<uint16>(readkey(nfskey, deadline)); if (mode == Server && autoPort) port = MINPORT + static_cast<unsigned short>((MAXPORT - MINPORT) * erand48(randomState.xsubi)); // erand48() not thread safe, but not a problem. @@ -124,11 +124,9 @@ SocketStream::SocketStream(const std::string &hostname, uint16 _port, Protocol p throw SystemCallException("socket", errno, THROW_ARGS); if (mode == Client) { - time_t latestTime = time(0) + timeout; - while (connect(fd, result->ai_addr, result->ai_addrlen) < 0) if (errno == ECONNREFUSED) { - if (timeout > 0 && time(0) >= latestTime) + if (deadline > 0 && time(0) >= deadline) throw TimeOutException("client socket", THROW_ARGS); if (usleep(999999) < 0) { @@ -156,7 +154,7 @@ SocketStream::SocketStream(const std::string &hostname, uint16 _port, Protocol p throw BindException("listen", errno, THROW_ARGS); if (doAccept) - accept(timeout); + accept(deadline); else break; } @@ -212,18 +210,18 @@ FileDescriptorBasedStream *SocketStream::detach() } -void SocketStream::reaccept( time_t timeout ) +void SocketStream::reaccept(time_t deadline) { ASSERT( mode == Server ); if (fd >= 0 && close(fd) < 0) throw SystemCallException("close", errno, THROW_ARGS); - accept( timeout ); + accept(deadline); } -void SocketStream::accept( time_t timeout ) +void SocketStream::accept(time_t deadline) { if (nfskey != "") writekey(nfskey, port); @@ -246,7 +244,7 @@ void SocketStream::accept( time_t timeout ) } onDestruct = { nfskey }; (void)onDestruct; - if (timeout > 0) { + if (deadline > 0) { fd_set fds; FD_ZERO(&fds); @@ -254,13 +252,18 @@ void SocketStream::accept( time_t timeout ) struct timeval timeval; - timeval.tv_sec = timeout; + time_t now = time(0); + + if (now > deadline) + THROW(TimeOutException, "server socket"); + + timeval.tv_sec = deadline - now; timeval.tv_usec = 0; switch (select(listen_sk + 1, &fds, 0, 0, &timeval)) { case -1 : throw SystemCallException("select", errno, THROW_ARGS); - case 0 : throw TimeOutException("server socket", THROW_ARGS); + case 0 : THROW(TimeOutException, "server socket"); } } @@ -292,7 +295,7 @@ void SocketStream::syncNFS() } -std::string SocketStream::readkey(const std::string &nfskey, time_t &timeout) +std::string SocketStream::readkey(const std::string &nfskey, time_t deadline) { for(;;) { char portStr[16]; @@ -307,8 +310,8 @@ std::string SocketStream::readkey(const std::string &nfskey, time_t &timeout) return std::string(portStr); } - if (timeout == 0) - throw TimeOutException("client socket", THROW_ARGS); + if (deadline > 0 && deadline <= time(0)) + THROW(TimeOutException, "client socket"); if (usleep(999999) > 0) { // interrupted by a signal handler -- abort to allow this thread to @@ -316,8 +319,6 @@ std::string SocketStream::readkey(const std::string &nfskey, time_t &timeout) // system call throw SystemCallException("sleep", errno, THROW_ARGS); } - - timeout--; } } diff --git a/LCU/Firmware/tools/src/flash_images.sh b/LCU/Firmware/tools/src/flash_images.sh index 9c02160d587..a479693557f 100755 --- a/LCU/Firmware/tools/src/flash_images.sh +++ b/LCU/Firmware/tools/src/flash_images.sh @@ -11,7 +11,7 @@ SyntaxError() exit 1 } -if [ ${#argv} == 0 ]; then +if [ $# == 0 ]; then SyntaxError fi diff --git a/LCU/StationTest/stationtest.py b/LCU/StationTest/stationtest.py index 1eda68a2a73..253c81873bb 100755 --- a/LCU/StationTest/stationtest.py +++ b/LCU/StationTest/stationtest.py @@ -3,7 +3,7 @@ # # Run the tests to test a LOFAR station # H. Meulman -# Version 0.14 17-feb-2012 SVN***** +# Version 0.18 2-okt-2012 SVN***** # 24 sep: local log directory aangepast # 27 sept: - Toevoeging delay voor tbbdriver polling @@ -31,7 +31,9 @@ # 27 jan 2012: Store logfiles in /localhome/stationtest/data in "local mode" # 17 feb 2012: Added detection of oscillating tiles. # 9 mar 2012: Devide by 0 error solved in HBAtest -# 13 sept 2012: Added for user0..9 sys.path.append("/opt/stationtest/modules") +# 13 Apr 2012: added LBAdatatest directory. Also directorys need to change permissions to work with USER0. +# 20 Apr 2012: Logging suspicious tiles and elements in HBA modem test +# 13 Sep 2012: Added for user0..9 sys.path.append("/opt/stationtest/modules") # todo: # - Als meer dan 10 elementen geen rf signaal hebben, keur dan hele tile af @@ -69,7 +71,7 @@ factor = 30 # station statistics fault window: Antenna average + and - factor = InternationalStations = ('DE601C','DE602C','DE603C','DE604C','DE605C','FR606C','SE607C','UK608C') RemoteStations = ('CS302C','RS106C','RS205C','RS208C','RS306C','RS307C','RS406C','RS503C') CoreStations = ('CS001C','CS002C','CS003C','CS004C','CS005C','CS006C','CS007C','CS011C','CS013C','CS017C','CS021C','CS024C','CS026C','CS028C','CS030C','CS031','CS032C','CS101C','CS103C','CS201C','CS301C','CS401C','CS501C') -NoHBAelementtestPossible = ('DE601C','DE602C','DE603C','DE605C','FR606C','SE607C','UK608C') +NoHBAelementtestPossible = ('DE601C','DE602C','DE603C','DE605C','FR606C','SE607C','UK608C') # NoHBANaStestPossible = ('') HBASubband = dict( DE601C=155,\ DE602C=155,\ @@ -77,7 +79,7 @@ HBASubband = dict( DE601C=155,\ DE604C=474,\ DE605C=479,\ FR606C=155,\ - SE607C=155,\ + SE607C=287,\ UK608C=155) # Do not change: @@ -340,7 +342,7 @@ def GotoSwlevel2(): time.sleep(120) res = os.popen3('rspctl --datastream=0')[1].readlines() print res - #time.sleep(90) # Tijdelijk toe gevoegd voor nieuwe tbbdriver. Deze loopt vast tijdens pollen +# time.sleep(90) # Tijdelijk toe gevoegd voor nieuwe tbbdriver. Deze loopt vast tijdens pollen # CheckTBB() # Tijdelijk weg gelaten voor nieuwe tbbdriver. Deze loopt vast tijdens pollen #fromprg.close() break @@ -714,10 +716,13 @@ def CheckRSPVersion(): RSPgold = open(RSPgoldfile,'r').readlines() # Read RSP Version gold RSPversion = os.popen3('rspctl --version')[1].readlines() # Get RSP Versions # res = cli.command('./rsp_version.sh') +# debug=1 if debug: + print ('RSPgold = ', RSPgold) for RSPnumber in range(len(RSPgold)): if RSPgold[RSPnumber] == RSPversion[RSPnumber]: print ('RSP OK = ', RSPnumber) else: print ('RSPNOK = ', RSPnumber) +# debug=0 # store subreck testlog for RSPnumber in range(len(RSPgold)): if RSPgold[RSPnumber] != RSPversion[RSPnumber]: @@ -1240,7 +1245,7 @@ def LBAtest(): SeverityOfThisTest=2 PriorityOfThisTest=2 - debug=0 +# debug=1 global Severity global Priority @@ -1249,7 +1254,8 @@ def LBAtest(): sr.setId('LBAmd1>: ') sub_time=[] sub_file=[] - dir_name = './lbadatatest/' #Work directory will be cleaned +# dir_name = './lbadatatest/' #Work directory will be cleaned + dir_name = '/opt/stationtest/test/hbatest/lbadatatest/' #Work directory will be cleaned if not (os.path.exists(dir_name)): os.mkdir(dir_name) rmfile = '*.log' @@ -1561,7 +1567,7 @@ def HBAModemTest(): global Priority global ModemFail - debug=0 +# debug=1 sr.setId('HBAmdt>: ') print ('HBA ModemTest') @@ -1605,6 +1611,61 @@ def HBAModemTest(): count+=1 ModemFail[TileNr]=1 # global variabele om in HBA element test de RF meting over te slaan. +# + if (count > 10 and isodd(RCUNr)): #Als er meer dan 10 fouten in zitten, keur dan hele tile af! + print ('Tile %s - RCU %s; Broken. No modem communication' % (TileNr,RCUNr)) + + # store station testlog + #if debug: print ('ModemFail = ',ModemFail) + if Severity<SeverityOfThisTest: Severity=SeverityOfThisTest + if Priority<PriorityOfThisTest: Priority=PriorityOfThisTest + st_log.write('HBAmdt>: Sv=%s Pr=%s, Tile %s - RCU %s; Suspicious.\n' % (SeverityLevel[SeverityOfThisTest], PriorityLevel[PriorityOfThisTest], TileNr, RCUNr)) + sr.setResult('FAILED') + + else: #Anders keur elementen af als fout. + for ElementNumber in range(4, 20): + if (ModemReply[ElementNumber] != ModemReplyGold[ElementNumber] and isodd(RCUNr)): + print ('Tile %s - RCU %s; Element %s; Suspicious. : (%s, %s)' % (TileNr, RCUNr, ElementNumber-3, ModemReply[ElementNumber], ModemReplyGold[ElementNumber])) + # store station testlog + if Severity<SeverityOfThisTest: Severity=SeverityOfThisTest + if Priority<PriorityOfThisTest: Priority=PriorityOfThisTest + st_log.write('HBAmdt>: Sv=%s Pr=%s, Tile %s - RCU %s; Element %s Suspicious. : (%s, %s)\n' % (SeverityLevel[SeverityOfThisTest], PriorityLevel[PriorityOfThisTest], TileNr, RCUNr, ElementNumber-3, ModemReply[ElementNumber], ModemReplyGold[ElementNumber])) + sr.setResult('FAILED') +# print ('ModemFail = ',ModemFail) + + try: + f=open('/opt/stationtest/test/hbatest/hba_modem3.log','rb') + except: + print ('Import error') + if Severity<SeverityOfThisTest: Severity=SeverityOfThisTest + if Priority<PriorityOfThisTest: Priority=PriorityOfThisTest + st_log.write('HBAmdt>: Sv=%s Pr=%s, No modem-logfile found!\n' % (SeverityLevel[SeverityOfThisTest], PriorityLevel[PriorityOfThisTest])) + return + time.sleep(1) + + for line in f: + ModemReply=line + ModemReplyGold=['HBA', '95', 'real', 'delays=', '253', '253', '253', '253', '253', '253', '253', '253', '253', '253', '253', '253', '253', '253', '253', '253'] + if debug: print ('line = ',line[0]) + if line[0] == 'H': # Check of regel geldig is! + ModemReply=line.replace('[',' ').replace('].',' ').split() + RCUNr=int(ModemReply[1]) + TileNr=RCUNr/2 + if debug: + print ('line = ',line) + print ('ModemReply = ',ModemReply) + print ('ModemReplyGold = ',ModemReplyGold) + print ('RCUNr = ',RCUNr) + print ('TileNr = ',TileNr) + +# Check if HBA modems work! + count=0 + for ElementNumber in range(4, 20): +# print ModemReplyGold[ElementNumber] + if ModemReply[ElementNumber] != ModemReplyGold[ElementNumber]: + count+=1 + ModemFail[TileNr]=1 # global variabele om in HBA element test de RF meting over te slaan. + # if (count > 10 and isodd(RCUNr)): #Als er meer dan 10 fouten in zitten, keur dan hele tile af! print ('Tile %s - RCU %s; Broken. No modem communication' % (TileNr,RCUNr)) @@ -1626,7 +1687,6 @@ def HBAModemTest(): st_log.write('HBAmdt>: Sv=%s Pr=%s, Tile %s - RCU %s; Element %s Broken. No modem communication : (%s, %s)\n' % (SeverityLevel[SeverityOfThisTest], PriorityLevel[PriorityOfThisTest], TileNr, RCUNr, ElementNumber-3, ModemReply[ElementNumber], ModemReplyGold[ElementNumber])) sr.setResult('FAILED') # print ('ModemFail = ',ModemFail) - return diff --git a/LCU/StationTest/tc/no_dc.py b/LCU/StationTest/tc/no_dc.py new file mode 100644 index 00000000000..73c222c18f4 --- /dev/null +++ b/LCU/StationTest/tc/no_dc.py @@ -0,0 +1,37 @@ +"""Testcase for no DC offset + + Note: No specific arguments +""" + +################################################################################ +# Constants + + +################################################################################ +# - Verify options +rspId = tc.rspId +blpId = tc.blpId + +repeat = tc.repeat +tc.setResult('PASSED') # self checking test, so start assuming it will run PASSED + +tc.appendLog(11,'') +tc.appendLog(11,'>>> Set DC blocker for RSP-%s, BLP-%s' % (rspId, blpId)) +tc.appendLog(11,'') + +################################################################################ +# - Testcase initializations + + +#bypass = 0x01 # Enable DC blocker + +# default bypass is 0x01 Disable DC blocker + + +for ri in rspId: + for bi in blpId: + rsp.write_diag_bypass(tc, msg, 4, blpId, rspId) + print rsp.read_diag_bypass(tc,msg,blpId,rspId) + + + \ No newline at end of file diff --git a/MAC/APL/APLCommon/src/ControllerDefines.cc b/MAC/APL/APLCommon/src/ControllerDefines.cc index 5f06e931287..8a321d4f28d 100644 --- a/MAC/APL/APLCommon/src/ControllerDefines.cc +++ b/MAC/APL/APLCommon/src/ControllerDefines.cc @@ -29,7 +29,6 @@ #include <Common/SystemUtil.h> #include <Common/ParameterSet.h> // indexValue #include <APL/APLCommon/ControllerDefines.h> -#include <ApplCommon/LofarDirs.h> #include <ApplCommon/StationInfo.h> #include "Controller_Protocol.ph" @@ -312,7 +311,10 @@ string createPropertySetName(const string& propSetMask, psName.replace(pos, 10, string("Midplane%d")); } if ((pos = psName.find("@ionode@")) != string::npos) { - psName.replace(pos, 8, string("IONode%d")); + psName.replace(pos, 8, string("IONode%02d")); + } + if ((pos = psName.find("@locusnode@")) != string::npos) { + psName.replace(pos, 11, string("LocusNode%03d")); } if ((pos = psName.find("@osrack@")) != string::npos) { psName.replace(pos, 8, string("OSRack%d")); diff --git a/MAC/APL/APLCommon/src/swlevel b/MAC/APL/APLCommon/src/swlevel index a1c1b5145b3..8168875889a 100644 --- a/MAC/APL/APLCommon/src/swlevel +++ b/MAC/APL/APLCommon/src/swlevel @@ -82,7 +82,7 @@ selectImage() # get version number of RSPboard in var. rsu boardHex=`echo $board | awk '{ printf "%02x", $1 }'` rsu=`sudo ${BINDIR}/../sbin/rsuctl3 -m 10:fa:00:00:$boardHex:00 -qV 2>&1 | grep BP | cut -d':' -f2 | sed 's/ //g' | cut -d'.' -f1` - if [ ${rsu} -eq 1 ]; then + if [ $imageForced ] || [ ${rsu} -eq 1 ]; then let version=$rsu # if board has reset itself to image 0, load image 1 again echo "Loading image $image on RSPboard $board ..." @@ -442,6 +442,7 @@ handle_args() show_lofar_version $flag ;; i) + imageForced=true image=$OPTARG # This is needed to be able to retrieve the requested swlevel # when it is not provided with option -l @@ -512,6 +513,7 @@ fi user=`id | cut -d'(' -f2 | cut -d')' -f1` group=`groups | awk '{print $1}'` +imageForced=false handle_args $* diff --git a/MAC/APL/CEPCU/CMakeLists.txt b/MAC/APL/CEPCU/CMakeLists.txt index bbdafe85ae5..01fca5d2dcc 100644 --- a/MAC/APL/CEPCU/CMakeLists.txt +++ b/MAC/APL/CEPCU/CMakeLists.txt @@ -1,7 +1,7 @@ # $Id$ # Do not split the following line, otherwise makeversion will fail! -lofar_package(CEPCU 1.0 DEPENDS Common ALC PLC ApplCommon MACIO GCFTM GCFRTDB APLCommon OTDB) +lofar_package(CEPCU 1.0 DEPENDS Common ALC PLC ApplCommon MACIO GCFTM GCFRTDB APLCommon RTDBCommon OTDB) include(LofarFindPackage) lofar_find_package(Boost REQUIRED COMPONENTS date_time) diff --git a/MAC/APL/CEPCU/src/CEPHardwareMonitor/BlueGeneMonitor.cc b/MAC/APL/CEPCU/src/CEPHardwareMonitor/BlueGeneMonitor.cc new file mode 100644 index 00000000000..350d5f831a1 --- /dev/null +++ b/MAC/APL/CEPCU/src/CEPHardwareMonitor/BlueGeneMonitor.cc @@ -0,0 +1,330 @@ +//# BlueGeneMonitor.cc: Monitors if the BGP hardware is available +//# +//# Copyright (C) 2011 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: BlueGeneMonitor.cc 10505 2007-09-07 17:14:57Z overeem $ +#include <lofar_config.h> +#include <Common/LofarLogger.h> +#include <Common/LofarConstants.h> +#include <Common/LofarLocators.h> +#include <Common/StringUtil.h> +#include <Common/ParameterSet.h> + +#include <GCF/PVSS/GCF_PVTypes.h> +#include <GCF/PVSS/PVSSinfo.h> +#include <MACIO/MACServiceInfo.h> +#include <APL/APLCommon/ControllerDefines.h> +#include <APL/RTDBCommon/RTDButilities.h> +#include <GCF/RTDB/DP_Protocol.ph> +//#include <APL/APLCommon/StationInfo.h> +#include <errno.h> +#include <signal.h> +#include <unistd.h> // usleep +#include <netdb.h> // gethostbyname + +#include "BlueGeneMonitor.h" +#include "PVSSDatapointDefs.h" + +#define IONODES_PER_BGP_PARTITION 64 +#define MAX2(a,b) ((a) > (b)) ? (a) : (b) + +namespace LOFAR { + using namespace APLCommon; + using namespace APL::RTDBCommon; + using namespace GCF::TM; + using namespace GCF::PVSS; + using namespace GCF::RTDB; + namespace CEPCU { + +// +// BlueGeneMonitor() +// +BlueGeneMonitor::BlueGeneMonitor(const string& cntlrName) : + GCFTask ((State)&BlueGeneMonitor::initial_state,cntlrName), + itsOwnPropertySet (0), + itsTimerPort (0), + itsDPservice (0), + itsPollInterval (60), + itsLastBGPState (-1) +{ + LOG_TRACE_OBJ_STR (cntlrName << " construction"); + + // need port for timers. + itsTimerPort = new GCFTimerPort(*this, "BGPTimerPort"); + + itsDPservice = new DPservice(this); + ASSERTSTR(itsDPservice, "Can't allocate DPservice"); + + itsBlueGeneFrontEnd = globalParameterSet()->getString("BlueGeneFrontEnd", ""); + ASSERTSTR(!itsBlueGeneFrontEnd.empty(), "Name of BlueGene FrontEnd node not specified"); + + registerProtocol(DP_PROTOCOL, DP_PROTOCOL_STRINGS); +} + + +// +// ~BlueGeneMonitor() +// +BlueGeneMonitor::~BlueGeneMonitor() +{ + LOG_TRACE_OBJ_STR (getName() << " destruction"); + + if (itsDPservice) delete itsDPservice; + + if (itsTimerPort) delete itsTimerPort; +} + + +// +// initial_state(event, port) +// +// Setup connection with PVSS +// +GCFEvent::TResult BlueGeneMonitor::initial_state(GCFEvent& event, + GCFPortInterface& port) +{ + LOG_DEBUG_STR ("initial:" << eventName(event) << "@" << port.getName()); + + switch (event.signal) { + case F_INIT: + break; + + case F_ENTRY: { + // Get access to my own propertyset. + LOG_DEBUG_STR ("Activating PropertySet " << PSN_CEP_HARDWARE_MONITOR); + itsTimerPort->setTimer(2.0); + itsOwnPropertySet = new RTDBPropertySet(PSN_CEP_HARDWARE_MONITOR, + PST_CEP_HARDWARE_MONITOR, + PSAT_WO, + this); + + } + break; + + case DP_CREATED: { + // NOTE: this function may be called DURING the construction of the PropertySet. + // Always exit this event in a way that GCF can end the construction. + DPCreatedEvent dpEvent(event); + LOG_DEBUG_STR("Result of creating " << dpEvent.DPname << " = " << dpEvent.result); + itsTimerPort->cancelAllTimers(); + itsTimerPort->setTimer(0.0); + } + break; + + case F_TIMER: { + // PropertySet must exist by now + ASSERTSTR(itsOwnPropertySet, "Could not create the PVSS datapoint " << PSN_CEP_HARDWARE_MONITOR); + + // update PVSS. + LOG_TRACE_FLOW ("Updateing state to PVSS"); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION, GCFPVString("BlueGene:initialising")); + itsOwnPropertySet->setValue(PN_CHM_BGP_CONNECTED, GCFPVBool(false)); + + // is name resolvable? + struct hostent* hostinfo = gethostbyname(itsBlueGeneFrontEnd.c_str()); + if (!hostinfo) { + itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("Name of BG frontend node is unresolvable")); + TRAN(BlueGeneMonitor::finish_state); // go to final state. + } + itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("")); + TRAN(BlueGeneMonitor::getBlueGeneState); // do inital check + } + break; + + case DP_SET: + break; + + case F_QUIT: + TRAN (BlueGeneMonitor::finish_state); + break; + + default: + LOG_DEBUG_STR ("initial, DEFAULT: " << eventName(event)); + break; + } + + return (GCFEvent::HANDLED); +} + + + +// +// getBlueGeneState(event, port) +// +// Ask the information of the BlueGene +// +GCFEvent::TResult BlueGeneMonitor::getBlueGeneState(GCFEvent& event, + GCFPortInterface& port) +{ + if (eventName(event) != "DP_SET") { + LOG_DEBUG_STR ("getBlueGeneState:" << eventName(event) << "@" << port.getName()); + } + + switch (event.signal) { + case F_ENTRY: { + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("BlueGene:requesting BlueGene info")); + itsTimerPort->setTimer(15.0); // in case the answer never comes + + string command(formatString("ssh %s 'bgpartstatus R00' 2>&1", itsBlueGeneFrontEnd.c_str())); + FILE* pipe(popen(command.c_str(), "r")); + char line[1024]; + line[0] = '\0'; + if (!pipe || !fgets (line, sizeof (line), pipe)) { + LOG_ERROR_STR ("BlueGene:Unable to read pipe: " << command); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("BlueGene:pipe failure")); + if (pipe) { + LOG_ERROR_STR("Pipe error: " << strerror(errno)); + fclose(pipe); + } + TRAN(BlueGeneMonitor::waitForNextCycle); // go to next state. + break; + } + fclose(pipe); + + // possible answers: + // free - partition is available. + // initializing - partition is booting. + // rebooting - partition is rebooting. + // busy - partition is running a job. + // unavailable - partition is partly used by other processes + // deallocating - partition is cleaning up. + // error - partition is in error state + bool inError(false); + if (!strcmp(line, "error")) { + LOG_ERROR_STR ("BlueGene:Partition R00 in error state: " << line); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("BlueGene:unknown partitionstate")); + inError = true; + } + + int newState(inError ? RTDB_OBJ_STATE_BROKEN : RTDB_OBJ_STATE_OPERATIONAL); + if (newState != itsLastBGPState) { + string pvssDBname(PVSSinfo::getLocalSystemName()); + for (int i = 0; i < IONODES_PER_BGP_PARTITION; i++) { + LOG_INFO_STR("setObjectState(" << getName() << "," << formatString("%s:%s", pvssDBname.c_str(), _IOnodeName(i).c_str()) << "," << newState << ")"); + setObjectState(getName(), formatString("%s:%s", pvssDBname.c_str(), _IOnodeName(i).c_str()), newState); + } + } + itsLastBGPState = newState; + TRAN(BlueGeneMonitor::waitForNextCycle); // go to next state. + break; + } + + case DP_SET: + case F_EXIT: + break; + + case F_QUIT: + TRAN (BlueGeneMonitor::finish_state); + break; + + default: + LOG_DEBUG_STR ("getBlueGeneState, DEFAULT: " << eventName(event)); + break; + } + + return (GCFEvent::HANDLED); +} + +// +// IOnodeName(nodeNr) +// +string BlueGeneMonitor::_IOnodeName(int nodeNr) +{ + string IONodeMask(createPropertySetName(PSN_IO_NODE,"")); + return (formatString(IONodeMask.c_str(), nodeNr/32, nodeNr)); +} + +// +// waitForNextCycle(event, port) +// +// Wait for our next cycle. +// +GCFEvent::TResult BlueGeneMonitor::waitForNextCycle(GCFEvent& event, + GCFPortInterface& port) +{ + if (eventName(event) != "DP_SET") { + LOG_DEBUG_STR ("waitForNextCycle:" << eventName(event) << "@" << port.getName()); + } + + switch (event.signal) { + case F_ENTRY: { + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("BlueGene:wait for next cycle")); + int waitTime = itsPollInterval - (time(0) % itsPollInterval); + if (waitTime == 0) { + waitTime = itsPollInterval; + } + itsTimerPort->cancelAllTimers(); + itsTimerPort->setTimer(double(waitTime)); + LOG_INFO_STR("BlueGene:Waiting " << waitTime << " seconds for next cycle"); + } + break; + + case F_TIMER: { + itsOwnPropertySet->setValue(string(PN_FSM_ERROR),GCFPVString("")); + TRAN(BlueGeneMonitor::getBlueGeneState); + } + break; + + case DP_SET: + case F_EXIT: + break; + + case F_QUIT: + TRAN (BlueGeneMonitor::finish_state); + break; + + default: + LOG_DEBUG_STR ("waitForNextCycle, DEFAULT: " << eventName(event)); + break; + } + + return (GCFEvent::HANDLED); +} + + +// +// finish_state(event, port) +// +// Write controller state to PVSS +// +GCFEvent::TResult BlueGeneMonitor::finish_state(GCFEvent& event, GCFPortInterface& port) +{ + LOG_DEBUG_STR ("finish_state:" << eventName(event) << "@" << port.getName()); + + switch (event.signal) { + case F_ENTRY: { + // update PVSS + itsOwnPropertySet->setValue(string(PN_FSM_CURRENT_ACTION),GCFPVString("BlueGene:finished")); + break; + } + + case DP_SET: + case F_EXIT: + break; + + default: + LOG_DEBUG("finishing_state, DEFAULT"); + break; + } + return (GCFEvent::HANDLED); +} + + +}; // CEPCU +}; // LOFAR diff --git a/MAC/APL/CEPCU/src/CEPHardwareMonitor/BlueGeneMonitor.h b/MAC/APL/CEPCU/src/CEPHardwareMonitor/BlueGeneMonitor.h new file mode 100644 index 00000000000..5567484edea --- /dev/null +++ b/MAC/APL/CEPCU/src/CEPHardwareMonitor/BlueGeneMonitor.h @@ -0,0 +1,85 @@ +//# BlueGeneMonitor.h: Monitors the BlueGene hardware. +//# +//# Copyright (C) 2006 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: BlueGeneMonitor.h 10461 2007-08-23 22:44:03Z overeem $ + +#ifndef CEPCU_BLUEGENE_MONITOR_H +#define CEPCU_BLUEGENE_MONITOR_H + +//# Common Includes +#include <blitz/array.h> +#include <Common/lofar_string.h> +#include <Common/lofar_vector.h> +#include <Common/LofarConstants.h> + +//# GCF Includes +#include <GCF/TM/GCF_Control.h> +#include <GCF/RTDB/RTDB_PropertySet.h> +#include <GCF/RTDB/DPservice.h> + +// forward declaration + +namespace LOFAR { + namespace CEPCU { + +using MACIO::GCFEvent; +using GCF::TM::GCFPortInterface; +using GCF::TM::GCFTimerPort; +using GCF::TM::GCFTCPPort; +using GCF::TM::GCFTask; +using GCF::RTDB::RTDBPropertySet; +using GCF::RTDB::DPservice; + + +class BlueGeneMonitor : public GCFTask +{ +public: + explicit BlueGeneMonitor(const string& cntlrName); + ~BlueGeneMonitor(); + +private: + // During the initial state all connections with the other programs are made. + GCFEvent::TResult initial_state (GCFEvent& e, GCFPortInterface& p); + GCFEvent::TResult getBlueGeneState (GCFEvent& e, GCFPortInterface& p); + GCFEvent::TResult waitForNextCycle (GCFEvent& e, GCFPortInterface& p); + GCFEvent::TResult finish_state (GCFEvent& e, GCFPortInterface& p); + + string _IOnodeName(int nodeNr); + + // avoid defaultconstruction and copying + BlueGeneMonitor(); + BlueGeneMonitor(const BlueGeneMonitor&); + BlueGeneMonitor& operator=(const BlueGeneMonitor&); + + // Data members + RTDBPropertySet* itsOwnPropertySet; + + GCFTimerPort* itsTimerPort; + DPservice* itsDPservice; + + string itsBlueGeneFrontEnd; + uint32 itsPollInterval; + + int itsLastBGPState; +}; + + };//CEPCU +};//LOFAR +#endif diff --git a/MAC/APL/CEPCU/src/CEPHardwareMonitor/CEPHWMonitor.dpl b/MAC/APL/CEPCU/src/CEPHardwareMonitor/CEPHWMonitor.dpl new file mode 100644 index 00000000000..02ffad928cf --- /dev/null +++ b/MAC/APL/CEPCU/src/CEPHardwareMonitor/CEPHWMonitor.dpl @@ -0,0 +1,29 @@ +# DpType +TypeName +CEPHardwareMonitor.CEPHardwareMonitor 1# + status 41#:ObjectStatus + process 41#:ProcessStatus + BGP 1# + connected 23# + Cluster 1# + connected 23# + +DpName TypeName ID +_mp_CEPHardwareMonitor CEPHardwareMonitor 0 +_dt_CEPHardwareMonitor _DynamicDatapoints 0 + +ElementName TypeName _original.._value _original.._status +_dt_CEPHardwareMonitor.Leaf _DynamicDatapoints "_mp_CEPHardwareMonitor.logMsg:_archive" 0x101 +_dt_CEPHardwareMonitor.DynamicAttribute _DynamicDatapoints "_da_none" 0x101 + +StampSec StampMSec ElementName TypeName DetailNr _archive.._type _archive.._archive _archive.._class +0 0 _mp_CEPHardwareMonitor.process.logMsg CEPHardwareMonitor 45 1 +0 0 _mp_CEPHardwareMonitor.process.logMsg CEPHardwareMonitor 1 15 _ValueArchive_2 + +# Modify the default value for the leaf-field +ElementName TypeName _original.._value _original.._status +_mp_CEPHardwareMonitor.status.leaf CEPHardwareMonitor 1 0x101 + +DpName TypeName ID +LOFAR_PermSW_HardwareMonitor CEPHardwareMonitor 2213 + diff --git a/MAC/APL/CEPCU/src/CEPHardwareMonitor/CEPHardwareMonitor.conf b/MAC/APL/CEPCU/src/CEPHardwareMonitor/CEPHardwareMonitor.conf new file mode 100644 index 00000000000..0eeac979916 --- /dev/null +++ b/MAC/APL/CEPCU/src/CEPHardwareMonitor/CEPHardwareMonitor.conf @@ -0,0 +1,12 @@ +# +# CEPHardwareMonitor.conf +# +WatchBlueGene = 1 +WatchCluster = 1 +closingDelay = 2.0 +BlueGeneFrontEnd = bgfen1 + +ClusterNameMask = locus%03d +ClusterNetwork = cep2.lofar +FirstClusterNode = 1 +LastClusterNode = 100 diff --git a/MAC/APL/CEPCU/src/CEPHardwareMonitor/CEPHardwareMonitorMain.cc b/MAC/APL/CEPCU/src/CEPHardwareMonitor/CEPHardwareMonitorMain.cc new file mode 100644 index 00000000000..64b50993a52 --- /dev/null +++ b/MAC/APL/CEPCU/src/CEPHardwareMonitor/CEPHardwareMonitorMain.cc @@ -0,0 +1,84 @@ +//# HardwareMonitor.cc: Main entry for the HardwareMonitor. +//# +//# Copyright (C) 2011 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: HardwareMonitorMain.cc 14858 2010-01-22 09:14:52Z loose $ +//# +#include <lofar_config.h> +#include <Common/LofarLogger.h> +#include <Common/Version.h> + +#include <Common/ParameterSet.h> +#include "BlueGeneMonitor.h" +#include "ClusterMonitor.h" +#include <CEPCU/Package__Version.h> + +using namespace LOFAR; +using namespace LOFAR::GCF; +using namespace LOFAR::GCF::TM; +using namespace LOFAR::CEPCU; + +int main(int argc, char* argv[]) +{ + // args: cntlrname, parentHost, parentService + GCFScheduler::instance()->init(argc, argv, "CEPHardwareMonitor"); + + LOG_INFO("MACProcessScope: LOFAR_PermSW_HardwareMonitor"); + LOG_INFO(Version::getInfo<CEPCUVersion>("CEPHardwareMonitor")); + + // Create tasks and call initial routines + BlueGeneMonitor* bgm(0); + ClusterMonitor* ctm(0); + + // monitor BLUEGENE? + if (globalParameterSet()->getUint32("WatchBlueGene",0)) { + bgm = new BlueGeneMonitor("BlueGeneMonitor"); + bgm->start(); + LOG_INFO("Monitoring the BlueGene"); + } + + // monitor CEP2Cluster? + if (globalParameterSet()->getUint32("WatchCluster",0)) { + ctm = new ClusterMonitor("ClusterMonitor"); + ctm->start(); + LOG_INFO("Monitoring the Cluster"); + } + + // sanity check + if (!bgm && !ctm) { + LOG_FATAL_STR("Non of the monitortask (WatchBlueGene, WatchCluster) " + "was switched on in the configfile, terminating program"); + return (0); + } + + // ok, we have something to do, do it. + GCFScheduler::instance()->setDelayedQuit(true); // we need a clean shutdown + GCFScheduler::instance()->run(); // until stop was called + + if (bgm) { + bgm->quit(); // let task quit nicely + } + if (ctm) { + ctm->quit(); // let task quit nicely + } + double postRunTime = globalParameterSet()->getDouble("closingDelay", 1.5); + GCFScheduler::instance()->run(postRunTime); // let processes die. + + return (0); +} diff --git a/MAC/APL/CEPCU/src/CEPHardwareMonitor/CMakeLists.txt b/MAC/APL/CEPCU/src/CEPHardwareMonitor/CMakeLists.txt new file mode 100644 index 00000000000..95605102d92 --- /dev/null +++ b/MAC/APL/CEPCU/src/CEPHardwareMonitor/CMakeLists.txt @@ -0,0 +1,14 @@ +# $Id: CMakeLists.txt 18492 2011-07-14 21:07:51Z loose $ + +lofar_add_bin_program(CEPHardwareMonitor + CEPHardwareMonitorMain.cc + BlueGeneMonitor.cc + ClusterMonitor.cc) + +install(FILES + CEPHardwareMonitor.conf + DESTINATION etc) + +install(PROGRAMS + zabbix_get + DESTINATION sbin) diff --git a/MAC/APL/CEPCU/src/CEPHardwareMonitor/ClusterMonitor.cc b/MAC/APL/CEPCU/src/CEPHardwareMonitor/ClusterMonitor.cc new file mode 100644 index 00000000000..20fffaa8bea --- /dev/null +++ b/MAC/APL/CEPCU/src/CEPHardwareMonitor/ClusterMonitor.cc @@ -0,0 +1,363 @@ +//# ClusterMonitor.cc: Monitors if the BGP hardware is available +//# +//# Copyright (C) 2011 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: ClusterMonitor.cc 10505 2007-09-07 17:14:57Z overeem $ +#include <lofar_config.h> +#include <Common/LofarLogger.h> +#include <Common/LofarConstants.h> +#include <Common/LofarLocators.h> +#include <Common/lofar_vector.h> +#include <Common/StringUtil.h> +#include <Common/ParameterSet.h> + +#include <GCF/PVSS/GCF_PVTypes.h> +#include <GCF/PVSS/PVSSinfo.h> +#include <MACIO/MACServiceInfo.h> +#include <APL/APLCommon/ControllerDefines.h> +#include <APL/RTDBCommon/RTDButilities.h> +#include <GCF/RTDB/DP_Protocol.ph> +//#include <APL/APLCommon/StationInfo.h> +#include <errno.h> +#include <signal.h> +#include <unistd.h> // usleep +#include <netdb.h> // gethostbyname + +#include "ClusterMonitor.h" +#include "PVSSDatapointDefs.h" + +#define MAX_CLUSTER_NODE 100 +#define MAX2(a,b) ((a) > (b)) ? (a) : (b) + +namespace LOFAR { + using namespace APLCommon; + using namespace APL::RTDBCommon; + using namespace GCF::TM; + using namespace GCF::PVSS; + using namespace GCF::RTDB; + namespace CEPCU { + +// +// ClusterMonitor() +// +ClusterMonitor::ClusterMonitor(const string& cntlrName) : + GCFTask ((State)&ClusterMonitor::initial_state,cntlrName), + itsOwnPropertySet (0), + itsTimerPort (0), + itsDPservice (0), + itsPollInterval (60) +{ + LOG_TRACE_OBJ_STR (cntlrName << " construction"); + + // need port for timers. + itsTimerPort = new GCFTimerPort(*this, "ClusterTimerPort"); + + itsDPservice = new DPservice(this); + ASSERTSTR(itsDPservice, "Can't allocate DPservice"); + + itsClusterNameMask = globalParameterSet()->getString("ClusterNameMask", "locus%03d"); + itsClusterNetwork = globalParameterSet()->getString("ClusterNetwork", "cep2.lofar"); + itsFirstClusterNode = globalParameterSet()->getUint("FirstClusterNode", 1); + itsLastClusterNode = globalParameterSet()->getUint("LastClusterNode", MAX_CLUSTER_NODE); + ASSERTSTR(!itsClusterNameMask.empty(), "NameMask of Cluster not specified"); + ASSERTSTR(!itsClusterNetwork.empty(), "Network name of Cluster not specified"); + ASSERTSTR(itsLastClusterNode <= MAX_CLUSTER_NODE, "Supporting only " << MAX_CLUSTER_NODE << " nodes"); + + itsLastState.resize(itsLastClusterNode+1, -1); +} + + +// +// ~ClusterMonitor() +// +ClusterMonitor::~ClusterMonitor() +{ + LOG_TRACE_OBJ_STR (getName() << " destruction"); + + if (itsDPservice) delete itsDPservice; + + if (itsTimerPort) delete itsTimerPort; +} + + +// +// initial_state(event, port) +// +// Setup connection with PVSS +// +GCFEvent::TResult ClusterMonitor::initial_state(GCFEvent& event, + GCFPortInterface& port) +{ + LOG_DEBUG_STR ("initial:" << eventName(event) << "@" << port.getName()); + + switch (event.signal) { + case F_INIT: + break; + + case F_ENTRY: { + // Get access to my own propertyset. + LOG_DEBUG_STR ("Activating PropertySet " << PSN_CEP_HARDWARE_MONITOR); + itsTimerPort->setTimer(2.0); + itsOwnPropertySet = new RTDBPropertySet(PSN_CEP_HARDWARE_MONITOR, + PST_CEP_HARDWARE_MONITOR, + PSAT_WO, + this); + + } + break; + + case DP_CREATED: { + // NOTE: this function may be called DURING the construction of the PropertySet. + // Always exit this event in a way that GCF can end the construction. + DPCreatedEvent dpEvent(event); + LOG_DEBUG_STR("Result of creating " << dpEvent.DPname << " = " << dpEvent.result); + itsTimerPort->cancelAllTimers(); + itsTimerPort->setTimer(0.0); + } + break; + + case F_TIMER: { + // PropertySet must exist by now + ASSERTSTR(itsOwnPropertySet, "Could not create the PVSS datapoint " << PSN_CEP_HARDWARE_MONITOR); + + // update PVSS. + LOG_TRACE_FLOW ("Updateing state to PVSS"); + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION, GCFPVString("Cluster:initialising")); + itsOwnPropertySet->setValue(PN_CHM_CLUSTER_CONNECTED, GCFPVBool(false)); + + TRAN(ClusterMonitor::getClusterState); // do inital check + } + break; + + case DP_SET: + break; + + case F_QUIT: + TRAN (ClusterMonitor::finish_state); + break; + + default: + LOG_DEBUG_STR ("initial, DEFAULT: " << eventName(event)); + break; + } + + return (GCFEvent::HANDLED); +} + + + +// +// getClusterState(event, port) +// +// Ask the information of the Cluster +// +GCFEvent::TResult ClusterMonitor::getClusterState(GCFEvent& event, + GCFPortInterface& port) +{ + if (eventName(event) != "DP_SET") { + LOG_DEBUG_STR ("getClusterState:" << eventName(event) << "@" << port.getName()); + } + + switch (event.signal) { + case F_ENTRY: { + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("Cluster:requesting Cluster info")); + itsTimerPort->setTimer(15.0); // in case the answer never comes + + string command(formatString("for i in `echo \".\" | awk '{ for (i=%d; i<=%d;i++) { printf \"%s.%s\\n\",i } }'`; do ../sbin/zabbix_get -s $i -k system.hostname ; done", + itsFirstClusterNode, itsLastClusterNode, itsClusterNameMask.c_str(), itsClusterNetwork.c_str())); + FILE* pipe(popen(command.c_str(), "r")); + if (!pipe) { + LOG_ERROR_STR ("Cluster:Unable to read pipe: " << command); + TRAN(ClusterMonitor::waitForNextCycle); + break; + } + + int lineLength((itsLastClusterNode-itsFirstClusterNode)*256); + vector<char> line(lineLength); + line[0] = '\0'; + size_t btsRead = fread(&line[0], 1, lineLength-1, pipe); + if (!btsRead) { + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("Cluster:pipe failure")); + LOG_WARN_STR("Could not determine the state of the clusternodes!"); + } + else { + line[btsRead] = '\0'; + _analyzeClusterResult(line, btsRead); + } + fclose(pipe); + TRAN(ClusterMonitor::waitForNextCycle); // go to next state. + break; + } + + case DP_SET: + case F_EXIT: + break; + + case F_QUIT: + TRAN (ClusterMonitor::finish_state); + break; + + default: + LOG_DEBUG_STR ("getClusterState, DEFAULT: " << eventName(event)); + break; + } + + return (GCFEvent::HANDLED); +} + + +// +// _analyzeClusterResult(result, length); +// +void ClusterMonitor::_analyzeClusterResult(vector<char> result, size_t length) +{ + vector<bool> online(itsLastClusterNode+1, false); + size_t end(length); + size_t begin(end); + while (begin && end) { + while (end && (result[end]=='\0' || result[end]=='\n')) { + result[end--]='\0'; + } + begin = end; + while (begin && result[begin-1]!='\n') { + begin--; + } + + // possible answers: + // locus999 + // zabbix_get [4624]: Get value error: cannot connect to [[locus002.cep2.lofar]:10050]: [113] No route to host + int nodeNr = -1; + if (sscanf(&result[begin], itsClusterNameMask.c_str(), &nodeNr) != 1) { + LOG_INFO_STR("Received error: " << (char*)&result[begin]); + } + else if (nodeNr < itsFirstClusterNode || nodeNr > itsLastClusterNode) { + LOG_WARN_STR("Received info about node " << nodeNr << " which is not in my monitor range!"); + } + else { + online[nodeNr] = true; + } + end = begin - 1; + } + + // Finally update the statusfields of all the nodes + for (int i = itsFirstClusterNode; i <= itsLastClusterNode; i++) { + int newState = online[i] ? RTDB_OBJ_STATE_BROKEN : RTDB_OBJ_STATE_OPERATIONAL; + if (itsLastState[i] != newState) { + LOG_INFO_STR("Node " << _clusterNodeName(i) << ": " << (online[i] ? "ON" : "OFF")); + itsLastState[i] = newState; + } + } +} + +// +// _clusterNodeName(nodeNr) +// +string ClusterMonitor::_clusterNodeName(int nodeNr) +{ + // NOTE: THIS IS INSIDE INFORMATION ABOUT THE SETUP OF THE CLUSTER!!! + int rackMax[] = {12, 24, 36, 48, 52, 64, 76, 88, 100 }; + uint rack; + for (rack = 0; rack < sizeof(rackMax)-1; rack++) { + if (nodeNr <= rackMax[rack]) + break; + } + + string locusNodeMask (createPropertySetName(PSN_LOCUS_NODE, "")); + return (formatString(locusNodeMask.c_str(), rack, nodeNr)); +} + + +// +// waitForNextCycle(event, port) +// +// Wait for our next cycle. +// +GCFEvent::TResult ClusterMonitor::waitForNextCycle(GCFEvent& event, + GCFPortInterface& port) +{ + if (eventName(event) != "DP_SET") { + LOG_DEBUG_STR ("waitForNextCycle:" << eventName(event) << "@" << port.getName()); + } + + switch (event.signal) { + case F_ENTRY: { + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("Cluster:wait for next cycle")); + int waitTime = itsPollInterval - (time(0) % itsPollInterval); + if (waitTime == 0) { + waitTime = itsPollInterval; + } + itsTimerPort->cancelAllTimers(); + itsTimerPort->setTimer(double(waitTime)); + LOG_INFO_STR("Cluster:Waiting " << waitTime << " seconds for next cycle"); + } + break; + + case F_TIMER: { + itsOwnPropertySet->setValue(string(PN_FSM_ERROR),GCFPVString("")); + TRAN(ClusterMonitor::getClusterState); + } + break; + + case DP_SET: + case F_EXIT: + break; + + case F_QUIT: + TRAN (ClusterMonitor::finish_state); + break; + + default: + LOG_DEBUG_STR ("waitForNextCycle, DEFAULT: " << eventName(event)); + break; + } + + return (GCFEvent::HANDLED); +} + + +// +// finish_state(event, port) +// +// Write controller state to PVSS +// +GCFEvent::TResult ClusterMonitor::finish_state(GCFEvent& event, GCFPortInterface& port) +{ + LOG_DEBUG_STR ("finish_state:" << eventName(event) << "@" << port.getName()); + + switch (event.signal) { + case F_ENTRY: { + // update PVSS + itsOwnPropertySet->setValue(string(PN_FSM_CURRENT_ACTION),GCFPVString("Cluster:finished")); + break; + } + + case DP_SET: + case F_EXIT: + break; + + default: + LOG_DEBUG("finishing_state, DEFAULT"); + break; + } + return (GCFEvent::HANDLED); +} + + +}; // CEPCU +}; // LOFAR diff --git a/MAC/APL/CEPCU/src/CEPHardwareMonitor/ClusterMonitor.h b/MAC/APL/CEPCU/src/CEPHardwareMonitor/ClusterMonitor.h new file mode 100644 index 00000000000..f4f91f07af9 --- /dev/null +++ b/MAC/APL/CEPCU/src/CEPHardwareMonitor/ClusterMonitor.h @@ -0,0 +1,89 @@ +//# ClusterMonitor.h: Monitors the Cluster hardware. +//# +//# Copyright (C) 2006 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: ClusterMonitor.h 10461 2007-08-23 22:44:03Z overeem $ + +#ifndef CEPCU_CLUSTER_MONITOR_H +#define CEPCU_CLUSTER_MONITOR_H + +//# Common Includes +#include <blitz/array.h> +#include <Common/lofar_string.h> +#include <Common/lofar_vector.h> +#include <Common/LofarConstants.h> + +//# GCF Includes +#include <GCF/TM/GCF_Control.h> +#include <GCF/RTDB/RTDB_PropertySet.h> +#include <GCF/RTDB/DPservice.h> + +// forward declaration + +namespace LOFAR { + namespace CEPCU { + +using MACIO::GCFEvent; +using GCF::TM::GCFPortInterface; +using GCF::TM::GCFTimerPort; +using GCF::TM::GCFTCPPort; +using GCF::TM::GCFTask; +using GCF::RTDB::RTDBPropertySet; +using GCF::RTDB::DPservice; + + +class ClusterMonitor : public GCFTask +{ +public: + explicit ClusterMonitor(const string& cntlrName); + ~ClusterMonitor(); + +private: + // During the initial state all connections with the other programs are made. + GCFEvent::TResult initial_state (GCFEvent& e, GCFPortInterface& p); + GCFEvent::TResult getClusterState (GCFEvent& e, GCFPortInterface& p); + GCFEvent::TResult waitForNextCycle (GCFEvent& e, GCFPortInterface& p); + GCFEvent::TResult finish_state (GCFEvent& e, GCFPortInterface& p); + + void _analyzeClusterResult(vector<char> result, size_t length); + string _clusterNodeName(int nodeNr); + + // avoid defaultconstruction and copying + ClusterMonitor(); + ClusterMonitor(const ClusterMonitor&); + ClusterMonitor& operator=(const ClusterMonitor&); + + // Data members + RTDBPropertySet* itsOwnPropertySet; + + GCFTimerPort* itsTimerPort; + DPservice* itsDPservice; + + string itsClusterNameMask; + string itsClusterNetwork; + int itsFirstClusterNode; + int itsLastClusterNode; + + uint32 itsPollInterval; + vector<int> itsLastState; +}; + + };//CEPCU +};//LOFAR +#endif diff --git a/MAC/APL/CEPCU/src/CEPHardwareMonitor/PVSSDatapointDefs.h b/MAC/APL/CEPCU/src/CEPHardwareMonitor/PVSSDatapointDefs.h new file mode 100644 index 00000000000..9f83a52dda5 --- /dev/null +++ b/MAC/APL/CEPCU/src/CEPHardwareMonitor/PVSSDatapointDefs.h @@ -0,0 +1,457 @@ +// This file was generated by create_db_files v2.0 on Tue Oct 9 13:22:37 UTC 2012 + +#ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H +#define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H +// process +#define PN_FSM_PROCESSID "process.processID" +#define PN_FSM_START_TIME "process.startTime" +#define PN_FSM_STOP_TIME "process.stopTime" +#define PN_FSM_LOG_MSG "process.logMsg" +#define PN_FSM_ERROR "process.error" +#define PN_FSM_CURRENT_ACTION "process.currentAction" +// object +#define PN_OBJ_STATE "object.state" +#define PN_OBJ_CHILD_STATE "object.childState" +#define PN_OBJ_MESSAGE "object.message" +#define PN_OBJ_LEAF "object.leaf" + +// MACScheduler +#define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" +#define PST_MAC_SCHEDULER "MACScheduler" +#define PN_MS_PLANNED_OBSERVATIONS "plannedObservations" +#define PN_MS_ACTIVE_OBSERVATIONS "activeObservations" +#define PN_MS_FINISHED_OBSERVATIONS "finishedObservations" +#define PN_MS_OTDB_CONNECTED "OTDB.connected" +#define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" +#define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" + +// CRTriggerControl +#define PSN_CR_TRIGGER_CONTROL "LOFAR_PermSW_CRTriggerControl" +#define PST_CR_TRIGGER_CONTROL "CRTriggerControl" + +// Observation +#define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" +#define PST_OBSERVATION "Observation" +#define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" +#define PN_OBS_CLAIM_NAME "claim.name" +#define PN_OBS_CLAIM_PERIOD "claimPeriod" +#define PN_OBS_PREPARE_PERIOD "preparePeriod" +#define PN_OBS_START_TIME "startTime" +#define PN_OBS_STOP_TIME "stopTime" +#define PN_OBS_BAND_FILTER "bandFilter" +#define PN_OBS_NYQUISTZONE "nyquistzone" +#define PN_OBS_ANTENNA_ARRAY "antennaArray" +#define PN_OBS_RECEIVER_LIST "receiverList" +#define PN_OBS_SAMPLE_CLOCK "sampleClock" +#define PN_OBS_RUN_STATE "runState" +#define PN_OBS_MEASUREMENT_SET "measurementSet" +#define PN_OBS_PROCESS_TYPE "processType" +#define PN_OBS_PROCESS_SUBTYPE "processSubtype" +#define PN_OBS_STRATEGY "strategy" +#define PN_OBS_STATION_LIST "stationList" +#define PN_OBS_INPUT_NODE_LIST "inputNodeList" +#define PN_OBS_BGL_NODE_LIST "BGLNodeList" +#define PN_OBS_STORAGE_NODE_LIST "storageNodeList" +#define PN_OBS_BEAMS_ANGLE1 "Beams.angle1" +#define PN_OBS_BEAMS_ANGLE2 "Beams.angle2" +#define PN_OBS_BEAMS_DIRECTION_TYPE "Beams.directionType" +#define PN_OBS_BEAMS_SUBBAND_LIST "Beams.subbandList" +#define PN_OBS_TIED_ARRAY_BEAMS_BEAM_INDEX "TiedArrayBeams.beamIndex" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE1 "TiedArrayBeams.angle1" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE2 "TiedArrayBeams.angle2" +#define PN_OBS_TIED_ARRAY_BEAMS_DIRECTION_TYPE "TiedArrayBeams.directionType" +#define PN_OBS_TIED_ARRAY_BEAMS_DISPERSION "TiedArrayBeams.dispersion" +#define PN_OBS_TIED_ARRAY_BEAMS_COHERENT "TiedArrayBeams.coherent" + +// ObservationControl +#define PSN_OBSERVATION_CONTROL "LOFAR_ObsSW_@observation@_ObservationControl" +#define PST_OBSERVATION_CONTROL "ObservationControl" +#define PN_OBSCTRL_COMMAND "command" + +// InputBuffer +#define PSN_INPUT_BUFFER "LOFAR_PermSW_@psionode@_InputBuffer" +#define PST_INPUT_BUFFER "InputBuffer" +#define PN_IPB_STATION_NAME "stationName" +#define PN_IPB_OBSERVATION_NAME "observationName" +#define PN_IPB_STREAM0_BLOCKS_IN "stream0.blocksIn" +#define PN_IPB_STREAM0_PERC_BAD "stream0.percBad" +#define PN_IPB_STREAM0_REJECTED "stream0.rejected" +#define PN_IPB_STREAM1_BLOCKS_IN "stream1.blocksIn" +#define PN_IPB_STREAM1_PERC_BAD "stream1.percBad" +#define PN_IPB_STREAM1_REJECTED "stream1.rejected" +#define PN_IPB_STREAM2_BLOCKS_IN "stream2.blocksIn" +#define PN_IPB_STREAM2_PERC_BAD "stream2.percBad" +#define PN_IPB_STREAM2_REJECTED "stream2.rejected" +#define PN_IPB_STREAM3_BLOCKS_IN "stream3.blocksIn" +#define PN_IPB_STREAM3_PERC_BAD "stream3.percBad" +#define PN_IPB_STREAM3_REJECTED "stream3.rejected" +#define PN_IPB_LATE "late" +#define PN_IPB_IO_TIME "IOTime" + +// Adder +#define PSN_ADDER "LOFAR_ObsSW_@osionode@_@adder@" +#define PST_ADDER "Adder" +#define PN_ADD_DROPPING "dropping" +#define PN_ADD_DROPPED "dropped" +#define PN_ADD_DATA_PRODUCT_TYPE "dataProductType" +#define PN_ADD_DATA_PRODUCT "dataProduct" +#define PN_ADD_FILE_NAME "fileName" +#define PN_ADD_LOCUS_NODE "locusNode" +#define PN_ADD_WRITER "writer" +#define PN_ADD_DIRECTORY "directory" +#define PN_ADD_OBSERVATION_NAME "observationName" + +// Writer +#define PSN_WRITER "LOFAR_ObsSW_@oslocusnode@_@writer@" +#define PST_WRITER "Writer" +#define PN_WTR_WRITTEN "written" +#define PN_WTR_DROPPED "dropped" +#define PN_WTR_FILE_NAME "fileName" +#define PN_WTR_DATA_RATE "dataRate" +#define PN_WTR_DATA_PRODUCT_TYPE "dataProductType" +#define PN_WTR_OBSERVATION_NAME "observationName" + +// IONode +#define PSN_IO_NODE "LOFAR_PIC_BGP_@midplane@_@ionode@" +#define PST_IO_NODE "IONode" +#define PN_ION_STATION0 "station0" +#define PN_ION_IP0 "IP0" +#define PN_ION_MAC0 "MAC0" +#define PN_ION_STATION1 "station1" +#define PN_ION_IP1 "IP1" +#define PN_ION_MAC1 "MAC1" +#define PN_ION_USE2ND_STATION "use2ndStation" +#define PN_ION_USED_STATION "usedStation" +#define PN_ION_USEDIP "usedIP" +#define PN_ION_USEDMAC "usedMAC" + +// LocusNode +#define PSN_LOCUS_NODE "LOFAR_PIC_@osrack@_@locusnode@" +#define PST_LOCUS_NODE "LocusNode" +#define PN_LCN_FREE "free" +#define PN_LCN_TOTAL "total" +#define PN_LCN_CLAIMED "claimed" + +// CEPHardwareMonitor +#define PSN_CEP_HARDWARE_MONITOR "LOFAR_PermSW_CEPHardwareMonitor" +#define PST_CEP_HARDWARE_MONITOR "CEPHardwareMonitor" +#define PN_CHM_BGP_CONNECTED "BGP.connected" +#define PN_CHM_CLUSTER_CONNECTED "Cluster.connected" + +// Cabinet +#define PSN_CABINET "LOFAR_PIC_@cabinet@" +#define PST_CABINET "Cabinet" +#define PN_CAB_FRONT_DOOR_OPEN "frontDoorOpen" +#define PN_CAB_FRONT_FAN_INNER "frontFanInner" +#define PN_CAB_FRONT_FAN_OUTER "frontFanOuter" +#define PN_CAB_FRONT_AIRFLOW "frontAirflow" +#define PN_CAB_BACK_DOOR_OPEN "backDoorOpen" +#define PN_CAB_BACK_FAN_INNER "backFanInner" +#define PN_CAB_BACK_FAN_OUTER "backFanOuter" +#define PN_CAB_BACK_AIRFLOW "backAirflow" +#define PN_CAB_TEMP_ALARM "tempAlarm" +#define PN_CAB_HUMIDITY_ALARM "humidityAlarm" +#define PN_CAB_TEMPERATURE "temperature" +#define PN_CAB_TEMP_MIN "tempMin" +#define PN_CAB_TEMP_MAX "tempMax" +#define PN_CAB_TEMP_MAX_MAX "tempMaxMax" +#define PN_CAB_HUMIDITY "humidity" +#define PN_CAB_HUMIDITY_MAX "humidityMax" +#define PN_CAB_HUMIDITY_MAX_MAX "humidityMaxMax" +#define PN_CAB_CONTROL_MODE "controlMode" +#define PN_CAB_TEMPERATURE_SENSOR "temperatureSensor" +#define PN_CAB_HUMIDITY_CONTROL "humidityControl" +#define PN_CAB_DOOR_CONTROL "doorControl" + +// SubRack +#define PSN_SUB_RACK "LOFAR_PIC_@cabinet@_@subrack@" +#define PST_SUB_RACK "SubRack" +#define PN_SRCK_SPU_STATUS_STATE "SPU.status.state" +#define PN_SRCK_SPU_STATUS_CHILD_STATE "SPU.status.childState" +#define PN_SRCK_SPU_STATUS_MESSAGE "SPU.status.message" +#define PN_SRCK_SPU_STATUS_LEAF "SPU.status.leaf" +#define PN_SRCK_SPU__VHBA "SPU.Vhba" +#define PN_SRCK_SPU__VLBA "SPU.Vlba" +#define PN_SRCK_SPU__VDIG "SPU.Vdig" +#define PN_SRCK_SPU_TEMPERATURE "SPU.temperature" +#define PN_SRCK_CLOCK_BOARD_STATUS_STATE "clockBoard.status.state" +#define PN_SRCK_CLOCK_BOARD_STATUS_CHILD_STATE "clockBoard.status.childState" +#define PN_SRCK_CLOCK_BOARD_STATUS_MESSAGE "clockBoard.status.message" +#define PN_SRCK_CLOCK_BOARD_STATUS_LEAF "clockBoard.status.leaf" +#define PN_SRCK_CLOCK_BOARD__VFSP "clockBoard.Vfsp" +#define PN_SRCK_CLOCK_BOARD__VCLOCK "clockBoard.Vclock" +#define PN_SRCK_CLOCK_BOARD_VERSION "clockBoard.version" +#define PN_SRCK_CLOCK_BOARD_FREQ "clockBoard.freq" +#define PN_SRCK_CLOCK_BOARD_LOCK160 "clockBoard.lock160" +#define PN_SRCK_CLOCK_BOARD_LOCK200 "clockBoard.lock200" +#define PN_SRCK_CLOCK_BOARD_TEMPERATURE "clockBoard.temperature" + +// RSPBoard +#define PSN_RSP_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@RSPBoard@" +#define PST_RSP_BOARD "RSPBoard" +#define PN_RSP_VOLTAGE12 "voltage12" +#define PN_RSP_VOLTAGE25 "voltage25" +#define PN_RSP_VOLTAGE33 "voltage33" +#define PN_RSP_VERSION "version" +#define PN_RSP_BITMODE "bitmode" +#define PN_RSP_BITMODE_CAPABILITY "bitmodeCapability" +#define PN_RSP_ALERT "alert" +#define PN_RSP_SPLITTER_ON "splitterOn" +#define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" +#define PN_RSP__ETHERNET_STATUS_CHILD_STATE "Ethernet.status.childState" +#define PN_RSP__ETHERNET_STATUS_MESSAGE "Ethernet.status.message" +#define PN_RSP__ETHERNET_STATUS_LEAF "Ethernet.status.leaf" +#define PN_RSP_ETHERNET_PACKETS_RECEIVED "Ethernet.packetsReceived" +#define PN_RSP_ETHERNET_PACKETS_ERROR "Ethernet.packetsError" +#define PN_RSP_ETHERNET_LAST_ERROR "Ethernet.lastError" +#define PN_RSP_MEP_SEQNR "MEP.seqnr" +#define PN_RSP_MEP_ERROR "MEP.error" +#define PN_RSP_BP_STATUS_STATE "BP.status.state" +#define PN_RSP_BP_STATUS_CHILD_STATE "BP.status.childState" +#define PN_RSP_BP_STATUS_MESSAGE "BP.status.message" +#define PN_RSP_BP_STATUS_LEAF "BP.status.leaf" +#define PN_RSP_BP_TEMPERATURE "BP.temperature" +#define PN_RSP_BP_VERSION "BP.version" +#define PN_RSP_AP0_STATUS_STATE "AP0.status.state" +#define PN_RSP_AP0_STATUS_CHILD_STATE "AP0.status.childState" +#define PN_RSP_AP0_STATUS_MESSAGE "AP0.status.message" +#define PN_RSP_AP0_STATUS_LEAF "AP0.status.leaf" +#define PN_RSP_AP0_TEMPERATURE "AP0.temperature" +#define PN_RSP_AP0_VERSION "AP0.version" +#define PN_RSP_AP0_SYNC_SAMPLE_COUNT "AP0.SYNC.sampleCount" +#define PN_RSP_AP0_SYNC_SYNC_COUNT "AP0.SYNC.syncCount" +#define PN_RSP_AP0_SYNC_ERROR_COUNT "AP0.SYNC.errorCount" +#define PN_RSP_AP1_STATUS_STATE "AP1.status.state" +#define PN_RSP_AP1_STATUS_CHILD_STATE "AP1.status.childState" +#define PN_RSP_AP1_STATUS_MESSAGE "AP1.status.message" +#define PN_RSP_AP1_STATUS_LEAF "AP1.status.leaf" +#define PN_RSP_AP1_TEMPERATURE "AP1.temperature" +#define PN_RSP_AP1_VERSION "AP1.version" +#define PN_RSP_AP1_SYNC_SAMPLE_COUNT "AP1.SYNC.sampleCount" +#define PN_RSP_AP1_SYNC_SYNC_COUNT "AP1.SYNC.syncCount" +#define PN_RSP_AP1_SYNC_ERROR_COUNT "AP1.SYNC.errorCount" +#define PN_RSP_AP2_STATUS_STATE "AP2.status.state" +#define PN_RSP_AP2_STATUS_CHILD_STATE "AP2.status.childState" +#define PN_RSP_AP2_STATUS_MESSAGE "AP2.status.message" +#define PN_RSP_AP2_STATUS_LEAF "AP2.status.leaf" +#define PN_RSP_AP2_TEMPERATURE "AP2.temperature" +#define PN_RSP_AP2_VERSION "AP2.version" +#define PN_RSP_AP2_SYNC_SAMPLE_COUNT "AP2.SYNC.sampleCount" +#define PN_RSP_AP2_SYNC_SYNC_COUNT "AP2.SYNC.syncCount" +#define PN_RSP_AP2_SYNC_ERROR_COUNT "AP2.SYNC.errorCount" +#define PN_RSP_AP3_STATUS_STATE "AP3.status.state" +#define PN_RSP_AP3_STATUS_CHILD_STATE "AP3.status.childState" +#define PN_RSP_AP3_STATUS_MESSAGE "AP3.status.message" +#define PN_RSP_AP3_STATUS_LEAF "AP3.status.leaf" +#define PN_RSP_AP3_TEMPERATURE "AP3.temperature" +#define PN_RSP_AP3_VERSION "AP3.version" +#define PN_RSP_AP3_SYNC_SAMPLE_COUNT "AP3.SYNC.sampleCount" +#define PN_RSP_AP3_SYNC_SYNC_COUNT "AP3.SYNC.syncCount" +#define PN_RSP_AP3_SYNC_ERROR_COUNT "AP3.SYNC.errorCount" + +// RCU +#define PSN_RCU "LOFAR_PIC_@cabinet@_@subrack@_@RSPBoard@_@rcu@" +#define PST_RCU "RCU" +#define PN_RCU_DELAY "Delay" +#define PN_RCU_INPUT_ENABLE "InputEnable" +#define PN_RCU_LBL_ENABLE "LBLEnable" +#define PN_RCU_LBH_ENABLE "LBHEnable" +#define PN_RCU_HBA_ENABLE "HBAEnable" +#define PN_RCU_BAND_SEL_LBA_HBA "bandSelLbaHba" +#define PN_RCU_HBA_FILTER_SEL "HBAFilterSel" +#define PN_RCU_VL_ENABLE "VlEnable" +#define PN_RCU_VH_ENABLE "VhEnable" +#define PN_RCU_VDD_VCC_ENABLE "VddVccEnable" +#define PN_RCU_BAND_SEL_LBL_LBH "bandSelLblLbh" +#define PN_RCU_LBA_FILTER_SEL "LBAFilterSel" +#define PN_RCU_ATTENUATION "Attenuation" +#define PN_RCU_NOF_OVERFLOW "nofOverflow" +#define PN_RCU_ADC_STATISTICS_OVERFLOW "ADCStatistics.overflow" +#define PN_RCU_TBB_ERROR "TBB.error" +#define PN_RCU_TBB_MODE "TBB.mode" +#define PN_RCU_TBB_START_ADDR "TBB.startAddr" +#define PN_RCU_TBB_BUF_SIZE "TBB.bufSize" +#define PN_RCU_TRIGGER_STARTLEVEL "Trigger.startlevel" +#define PN_RCU_TRIGGER_BASELEVEL "Trigger.baselevel" +#define PN_RCU_TRIGGER_STOPLEVEL "Trigger.stoplevel" +#define PN_RCU_TRIGGER_FILTER "Trigger.filter" +#define PN_RCU_TRIGGER_WINDOW "Trigger.window" +#define PN_RCU_TRIGGER_OPERATING_MODE "Trigger.operatingMode" +#define PN_RCU_TRIGGER_TRIGGER_MODE "Trigger.triggerMode" +#define PN_RCU_TRIGGER_FILTER0_COEFF0 "Trigger.filter0.coeff0" +#define PN_RCU_TRIGGER_FILTER0_COEFF1 "Trigger.filter0.coeff1" +#define PN_RCU_TRIGGER_FILTER0_COEFF2 "Trigger.filter0.coeff2" +#define PN_RCU_TRIGGER_FILTER0_COEFF3 "Trigger.filter0.coeff3" +#define PN_RCU_TRIGGER_FILTER1_COEFF0 "Trigger.filter1.coeff0" +#define PN_RCU_TRIGGER_FILTER1_COEFF1 "Trigger.filter1.coeff1" +#define PN_RCU_TRIGGER_FILTER1_COEFF2 "Trigger.filter1.coeff2" +#define PN_RCU_TRIGGER_FILTER1_COEFF3 "Trigger.filter1.coeff3" + +// TBBoard +#define PSN_TB_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@" +#define PST_TB_BOARD "TBBoard" +#define PN_TBB_BOARDID "boardID" +#define PN_TBB_RAM_SIZE "RAMSize" +#define PN_TBB_SW_VERSION "SWVersion" +#define PN_TBB_BOARD_VERSION "boardVersion" +#define PN_TBB_TP_VERSION "TPVersion" +#define PN_TBB_MP0_VERSION "MP0Version" +#define PN_TBB_MP1_VERSION "MP1Version" +#define PN_TBB_MP2_VERSION "MP2Version" +#define PN_TBB_MP3_VERSION "MP3Version" +#define PN_TBB_VOLTAGE12 "voltage12" +#define PN_TBB_VOLTAGE25 "voltage25" +#define PN_TBB_VOLTAGE33 "voltage33" +#define PN_TBB_TEMPPCB "tempPCB" +#define PN_TBB_TEMPTP "tempTP" +#define PN_TBB_TEMPMP0 "tempMP0" +#define PN_TBB_TEMPMP1 "tempMP1" +#define PN_TBB_TEMPMP2 "tempMP2" +#define PN_TBB_TEMPMP3 "tempMP3" +#define PN_TBB_IMAGE_INFO_VERSION "imageInfo.version" +#define PN_TBB_IMAGE_INFO_WRITE_DATE "imageInfo.writeDate" +#define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" +#define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" + +// LBAAntenna +#define PSN_LBA_ANTENNA "LOFAR_PIC_@lbaantenna@" +#define PST_LBA_ANTENNA "LBAAntenna" + +// HBAAntenna +#define PSN_HBA_ANTENNA "LOFAR_PIC_@hbaantenna@" +#define PST_HBA_ANTENNA "HBAAntenna" + +// StationInfo +#define PSN_STATION_INFO "LOFAR_PIC_StationInfo" +#define PST_STATION_INFO "StationInfo" +#define PN_STI_STATIONID "stationID" +#define PN_STI_N_RSP_BOARDS "N_RSPBoards" +#define PN_STI_N_TB_BOARDS "N_TBBoards" +#define PN_STI_N_LBAS "N_LBAS" +#define PN_STI_N_HBAS "N_HBAS" +#define PN_STI_HBA__SPLIT "HBA_Split" +#define PN_STI_WIDE_LBAS "wide_LBAS" +#define PN_STI_POWER48_ON "power48On" +#define PN_STI_POWER220_ON "power220On" +#define PN_STI_CABINET_X "Cabinet.X" +#define PN_STI_CABINET_Y "Cabinet.Y" +#define PN_STI_CABINET_Z "Cabinet.Z" +#define PN_STI_HBA_CENTERX "HBA.centerX" +#define PN_STI_HBA_CENTERY "HBA.centerY" +#define PN_STI_HBA_CENTERZ "HBA.centerZ" +#define PN_STI_HBA_HBA0_CENTERX "HBA.HBA0.centerX" +#define PN_STI_HBA_HBA0_CENTERY "HBA.HBA0.centerY" +#define PN_STI_HBA_HBA0_CENTERZ "HBA.HBA0.centerZ" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_X "HBA.HBA0.NormalVector.X" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Y "HBA.HBA0.NormalVector.Y" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Z "HBA.HBA0.NormalVector.Z" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_X "HBA.HBA0.RotationMatrix.X" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Y "HBA.HBA0.RotationMatrix.Y" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Z "HBA.HBA0.RotationMatrix.Z" +#define PN_STI_HBA_HBA0_ROTATION "HBA.HBA0.rotation" +#define PN_STI_HBA_HBA1_CENTERX "HBA.HBA1.centerX" +#define PN_STI_HBA_HBA1_CENTERY "HBA.HBA1.centerY" +#define PN_STI_HBA_HBA1_CENTERZ "HBA.HBA1.centerZ" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_X "HBA.HBA1.NormalVector.X" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Y "HBA.HBA1.NormalVector.Y" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Z "HBA.HBA1.NormalVector.Z" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_X "HBA.HBA1.RotationMatrix.X" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Y "HBA.HBA1.RotationMatrix.Y" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Z "HBA.HBA1.RotationMatrix.Z" +#define PN_STI_HBA_HBA1_ROTATION "HBA.HBA1.rotation" +#define PN_STI_LBA_CENTERX "LBA.centerX" +#define PN_STI_LBA_CENTERY "LBA.centerY" +#define PN_STI_LBA_CENTERZ "LBA.centerZ" +#define PN_STI_LBA__NORMAL_VECTOR_X "LBA.NormalVector.X" +#define PN_STI_LBA__NORMAL_VECTOR_Y "LBA.NormalVector.Y" +#define PN_STI_LBA__NORMAL_VECTOR_Z "LBA.NormalVector.Z" +#define PN_STI_LBA__ROTATION_MATRIX_X "LBA.RotationMatrix.X" +#define PN_STI_LBA__ROTATION_MATRIX_Y "LBA.RotationMatrix.Y" +#define PN_STI_LBA__ROTATION_MATRIX_Z "LBA.RotationMatrix.Z" + +// LogProcessor +#define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" +#define PST_LOG_PROCESSOR "LogProcessor" + +// SASGateway +#define PSN_SAS_GATEWAY "LOFAR_PermSW_Daemons_SASGateway" +#define PST_SAS_GATEWAY "SASGateway" + +// HardwareMonitor +#define PSN_HARDWARE_MONITOR "LOFAR_PermSW_HardwareMonitor" +#define PST_HARDWARE_MONITOR "HardwareMonitor" +#define PN_HWM_RSP_CONNECTED "RSP.connected" +#define PN_HWM_TBB_CONNECTED "TBB.connected" +#define PN_HWM_EC_CONNECTED "EC.connected" + +// SoftwareMonitor +#define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" +#define PST_SOFTWARE_MONITOR "SoftwareMonitor" +#define PN_SWM_SW_LEVEL "SWLevel" + +// SHMInfoServer +#define PSN_SHM_INFO_SERVER "LOFAR_PermSW_SHMInfoServer" +#define PST_SHM_INFO_SERVER "SHMInfoServer" + +// StationControl +#define PSN_STATION_CONTROL "LOFAR_PermSW_StationControl" +#define PST_STATION_CONTROL "StationControl" +#define PN_SC_ACTIVE_OBSERVATIONS "activeObservations" + +// ClockControl +#define PSN_CLOCK_CONTROL "LOFAR_PermSW_ClockControl" +#define PST_CLOCK_CONTROL "ClockControl" +#define PN_CLC_CONNECTED "connected" +#define PN_CLC_REQUESTED_CLOCK "requestedClock" +#define PN_CLC_ACTUAL_CLOCK "actualClock" +#define PN_CLC_REQUESTED_BITMODE "requestedBitmode" +#define PN_CLC_ACTUAL_BITMODE "actualBitmode" + +// StnObservation +#define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" +#define PST_STN_OBSERVATION "StnObservation" +#define PN_OBS_NAME "name" +#define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" +#define PN_OBS_CLAIM_NAME "claim.name" +#define PN_OBS_RECEIVER_BITMAP "receiverBitmap" +#define PN_OBS_HBA_BITMAP "HBABitmap" +#define PN_OBS_LBA_BITMAP "LBABitmap" + +// BeamControl +#define PSN_BEAM_CONTROL "LOFAR_ObsSW_@observation@_BeamControl" +#define PST_BEAM_CONTROL "BeamControl" +#define PN_BC_CONNECTED "connected" +#define PN_BC_SUB_ARRAY "subArray" +#define PN_BC_SUBBAND_LIST "subbandList" +#define PN_BC_BEAMLET_LIST "beamletList" +#define PN_BC_ANGLE1 "angle1" +#define PN_BC_ANGLE2 "angle2" +#define PN_BC_DIRECTION_TYPE "directionType" +#define PN_BC_BEAM_NAME "beamName" + +// CalibrationControl +#define PSN_CALIBRATION_CONTROL "LOFAR_ObsSW_@observation@_CalibrationControl" +#define PST_CALIBRATION_CONTROL "CalibrationControl" +#define PN_CC_CONNECTED "connected" +#define PN_CC_BEAM_NAMES "beamNames" +#define PN_CC_ANTENNA_ARRAY "antennaArray" +#define PN_CC_FILTER "filter" +#define PN_CC_NYQUISTZONE "nyquistzone" +#define PN_CC_RCUS "rcus" + +// TBBControl +#define PSN_TBB_CONTROL "LOFAR_ObsSW_@observation@_TBBControl" +#define PST_TBB_CONTROL "TBBControl" +#define PN_TBC_CONNECTED "connected" +#define PN_TBC_TRIGGER_RCU_NR "trigger.rcuNr" +#define PN_TBC_TRIGGER_SEQUENCE_NR "trigger.sequenceNr" +#define PN_TBC_TRIGGER_TIME "trigger.time" +#define PN_TBC_TRIGGER_SAMPLE_NR "trigger.sampleNr" +#define PN_TBC_TRIGGER_SUM "trigger.sum" +#define PN_TBC_TRIGGER_NR_SAMPLES "trigger.nrSamples" +#define PN_TBC_TRIGGER_PEAK_VALUE "trigger.peakValue" +#define PN_TBC_TRIGGER_FLAGS "trigger.flags" +#define PN_TBC_TRIGGER_TABLE "trigger.table" +#define PN_TBC_TRIGGER_MISSED "trigger.missed" + +#endif diff --git a/MAC/APL/CEPCU/src/CEPHardwareMonitor/README b/MAC/APL/CEPCU/src/CEPHardwareMonitor/README new file mode 100644 index 00000000000..546cc88ca7d --- /dev/null +++ b/MAC/APL/CEPCU/src/CEPHardwareMonitor/README @@ -0,0 +1,10 @@ +HWMonitor via IPMI en bgpartstatus + swlevel.conf + +IPMI -> clustermnachine on/off + +bgpartstatus + swlevel.conf geeft status R00 (busy). +Als busy -> OPER + else als swlevel OFF -> OFF + else ERROR + + diff --git a/MAC/APL/CEPCU/src/CEPHardwareMonitor/zabbix_get b/MAC/APL/CEPCU/src/CEPHardwareMonitor/zabbix_get new file mode 100755 index 0000000000000000000000000000000000000000..d2f8ef579f41c827c9eefc9aaac67f8a703b8a38 GIT binary patch literal 172190 zcmce<3wRVo);HdhOh^X@CO{O_2oZxz1e5?OfuK<tKqZPo5QP{bBqmF4oAdy#1csf- zn%;3Vx~{t37H{wBdP8MnR2CD0AzT*2MGXWo0&0&FAp%0UNdCWHb#*d9-{*V2=l?w4 zXs7ygojP^u)TvXaPE|K6T+^r6Y&OOEMJSO9q1A8O)p1CDiy}nUI3+<*mEp?e%4JF~ zJYn8A4{&ga0w@%PXLekX%mX}b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_fNAmKPJ#SiuG#QlQnvSje-VyC0|yuxhx zcE!|DDtn#m7~ESiDcraN@0~O9eIedVaM*<R64`+_*sPPZfVl@ScT`m2j!D)$B+q9u zUFC;nsCE4-H{kf`+_a(oWz}bFy)QARR1T5ifELOuZQrVoq~OvA=1z)RJoeS@)S2yt zHZDvx=E%+hM2iH+h$L%nYsZI0BJw!yg}a+MIM@#X+B<RMk0nSx4B&ng4oBXu@jP9~ Psd2!mtRvHfPtN`i-6<TS literal 0 HcmV?d00001 diff --git a/MAC/APL/CEPCU/src/CEPlogProcessor/PVSSDatapointDefs.h b/MAC/APL/CEPCU/src/CEPlogProcessor/PVSSDatapointDefs.h index 08712199f11..9f83a52dda5 100644 --- a/MAC/APL/CEPCU/src/CEPlogProcessor/PVSSDatapointDefs.h +++ b/MAC/APL/CEPCU/src/CEPlogProcessor/PVSSDatapointDefs.h @@ -1,4 +1,4 @@ -// This file was generated by create_db_files v2.0 on Thu Jul 23 13:58:12 UTC 2009 +// This file was generated by create_db_files v2.0 on Tue Oct 9 13:22:37 UTC 2012 #ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H #define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H @@ -15,20 +15,6 @@ #define PN_OBJ_MESSAGE "object.message" #define PN_OBJ_LEAF "object.leaf" -// Station -#if 0 -#define PSN_STATION "LOFAR_PIC_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" -#endif - -// Station -#define PSN_STATION "LOFAR_PermSW_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - // MACScheduler #define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" #define PST_MAC_SCHEDULER "MACScheduler" @@ -39,12 +25,15 @@ #define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" #define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" +// CRTriggerControl +#define PSN_CR_TRIGGER_CONTROL "LOFAR_PermSW_CRTriggerControl" +#define PST_CR_TRIGGER_CONTROL "CRTriggerControl" + // Observation #define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" #define PST_OBSERVATION "Observation" #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" -#define PN_OBS_RECEIVER_BITMAP "receiverBitmap" #define PN_OBS_CLAIM_PERIOD "claimPeriod" #define PN_OBS_PREPARE_PERIOD "preparePeriod" #define PN_OBS_START_TIME "startTime" @@ -56,6 +45,9 @@ #define PN_OBS_SAMPLE_CLOCK "sampleClock" #define PN_OBS_RUN_STATE "runState" #define PN_OBS_MEASUREMENT_SET "measurementSet" +#define PN_OBS_PROCESS_TYPE "processType" +#define PN_OBS_PROCESS_SUBTYPE "processSubtype" +#define PN_OBS_STRATEGY "strategy" #define PN_OBS_STATION_LIST "stationList" #define PN_OBS_INPUT_NODE_LIST "inputNodeList" #define PN_OBS_BGL_NODE_LIST "BGLNodeList" @@ -63,24 +55,24 @@ #define PN_OBS_BEAMS_ANGLE1 "Beams.angle1" #define PN_OBS_BEAMS_ANGLE2 "Beams.angle2" #define PN_OBS_BEAMS_DIRECTION_TYPE "Beams.directionType" -#define PN_OBS_BEAMS_BEAMLET_LIST "Beams.beamletList" #define PN_OBS_BEAMS_SUBBAND_LIST "Beams.subbandList" +#define PN_OBS_TIED_ARRAY_BEAMS_BEAM_INDEX "TiedArrayBeams.beamIndex" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE1 "TiedArrayBeams.angle1" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE2 "TiedArrayBeams.angle2" +#define PN_OBS_TIED_ARRAY_BEAMS_DIRECTION_TYPE "TiedArrayBeams.directionType" +#define PN_OBS_TIED_ARRAY_BEAMS_DISPERSION "TiedArrayBeams.dispersion" +#define PN_OBS_TIED_ARRAY_BEAMS_COHERENT "TiedArrayBeams.coherent" // ObservationControl #define PSN_OBSERVATION_CONTROL "LOFAR_ObsSW_@observation@_ObservationControl" #define PST_OBSERVATION_CONTROL "ObservationControl" - -// Adder -#define PSN_ADDER "@adder@" -#define PST_ADDER "Adder" -#define PN_ADD_DROPPING "dropping" -#define PN_ADD_NR_BLOCKS_DROPPED "nrBlocksDropped" -#define PN_ADD_LOG_LINE "process.logMsg" +#define PN_OBSCTRL_COMMAND "command" // InputBuffer -#define PSN_INPUT_BUFFER "@inputbuffer@" +#define PSN_INPUT_BUFFER "LOFAR_PermSW_@psionode@_InputBuffer" #define PST_INPUT_BUFFER "InputBuffer" #define PN_IPB_STATION_NAME "stationName" +#define PN_IPB_OBSERVATION_NAME "observationName" #define PN_IPB_STREAM0_BLOCKS_IN "stream0.blocksIn" #define PN_IPB_STREAM0_PERC_BAD "stream0.percBad" #define PN_IPB_STREAM0_REJECTED "stream0.rejected" @@ -96,13 +88,55 @@ #define PN_IPB_LATE "late" #define PN_IPB_IO_TIME "IOTime" -// Storage -#define PSN_STORAGE "@storage@" -#define PST_STORAGE "Storage" -#define PN_STR_TIME "time" -#define PN_STR_RANK "rank" -#define PN_STR_COUNT "count" -#define PN_STR_DROPPED "dropped" +// Adder +#define PSN_ADDER "LOFAR_ObsSW_@osionode@_@adder@" +#define PST_ADDER "Adder" +#define PN_ADD_DROPPING "dropping" +#define PN_ADD_DROPPED "dropped" +#define PN_ADD_DATA_PRODUCT_TYPE "dataProductType" +#define PN_ADD_DATA_PRODUCT "dataProduct" +#define PN_ADD_FILE_NAME "fileName" +#define PN_ADD_LOCUS_NODE "locusNode" +#define PN_ADD_WRITER "writer" +#define PN_ADD_DIRECTORY "directory" +#define PN_ADD_OBSERVATION_NAME "observationName" + +// Writer +#define PSN_WRITER "LOFAR_ObsSW_@oslocusnode@_@writer@" +#define PST_WRITER "Writer" +#define PN_WTR_WRITTEN "written" +#define PN_WTR_DROPPED "dropped" +#define PN_WTR_FILE_NAME "fileName" +#define PN_WTR_DATA_RATE "dataRate" +#define PN_WTR_DATA_PRODUCT_TYPE "dataProductType" +#define PN_WTR_OBSERVATION_NAME "observationName" + +// IONode +#define PSN_IO_NODE "LOFAR_PIC_BGP_@midplane@_@ionode@" +#define PST_IO_NODE "IONode" +#define PN_ION_STATION0 "station0" +#define PN_ION_IP0 "IP0" +#define PN_ION_MAC0 "MAC0" +#define PN_ION_STATION1 "station1" +#define PN_ION_IP1 "IP1" +#define PN_ION_MAC1 "MAC1" +#define PN_ION_USE2ND_STATION "use2ndStation" +#define PN_ION_USED_STATION "usedStation" +#define PN_ION_USEDIP "usedIP" +#define PN_ION_USEDMAC "usedMAC" + +// LocusNode +#define PSN_LOCUS_NODE "LOFAR_PIC_@osrack@_@locusnode@" +#define PST_LOCUS_NODE "LocusNode" +#define PN_LCN_FREE "free" +#define PN_LCN_TOTAL "total" +#define PN_LCN_CLAIMED "claimed" + +// CEPHardwareMonitor +#define PSN_CEP_HARDWARE_MONITOR "LOFAR_PermSW_CEPHardwareMonitor" +#define PST_CEP_HARDWARE_MONITOR "CEPHardwareMonitor" +#define PN_CHM_BGP_CONNECTED "BGP.connected" +#define PN_CHM_CLUSTER_CONNECTED "Cluster.connected" // Cabinet #define PSN_CABINET "LOFAR_PIC_@cabinet@" @@ -159,6 +193,8 @@ #define PN_RSP_VOLTAGE25 "voltage25" #define PN_RSP_VOLTAGE33 "voltage33" #define PN_RSP_VERSION "version" +#define PN_RSP_BITMODE "bitmode" +#define PN_RSP_BITMODE_CAPABILITY "bitmodeCapability" #define PN_RSP_ALERT "alert" #define PN_RSP_SPLITTER_ON "splitterOn" #define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" @@ -241,10 +277,15 @@ #define PN_RCU_TRIGGER_FILTER "Trigger.filter" #define PN_RCU_TRIGGER_WINDOW "Trigger.window" #define PN_RCU_TRIGGER_OPERATING_MODE "Trigger.operatingMode" -#define PN_RCU_TRIGGER_COEFF0 "Trigger.coeff0" -#define PN_RCU_TRIGGER_COEFF1 "Trigger.coeff1" -#define PN_RCU_TRIGGER_COEFF2 "Trigger.coeff2" -#define PN_RCU_TRIGGER_COEFF3 "Trigger.coeff3" +#define PN_RCU_TRIGGER_TRIGGER_MODE "Trigger.triggerMode" +#define PN_RCU_TRIGGER_FILTER0_COEFF0 "Trigger.filter0.coeff0" +#define PN_RCU_TRIGGER_FILTER0_COEFF1 "Trigger.filter0.coeff1" +#define PN_RCU_TRIGGER_FILTER0_COEFF2 "Trigger.filter0.coeff2" +#define PN_RCU_TRIGGER_FILTER0_COEFF3 "Trigger.filter0.coeff3" +#define PN_RCU_TRIGGER_FILTER1_COEFF0 "Trigger.filter1.coeff0" +#define PN_RCU_TRIGGER_FILTER1_COEFF1 "Trigger.filter1.coeff1" +#define PN_RCU_TRIGGER_FILTER1_COEFF2 "Trigger.filter1.coeff2" +#define PN_RCU_TRIGGER_FILTER1_COEFF3 "Trigger.filter1.coeff3" // TBBoard #define PSN_TB_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@" @@ -272,6 +313,62 @@ #define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" #define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" +// LBAAntenna +#define PSN_LBA_ANTENNA "LOFAR_PIC_@lbaantenna@" +#define PST_LBA_ANTENNA "LBAAntenna" + +// HBAAntenna +#define PSN_HBA_ANTENNA "LOFAR_PIC_@hbaantenna@" +#define PST_HBA_ANTENNA "HBAAntenna" + +// StationInfo +#define PSN_STATION_INFO "LOFAR_PIC_StationInfo" +#define PST_STATION_INFO "StationInfo" +#define PN_STI_STATIONID "stationID" +#define PN_STI_N_RSP_BOARDS "N_RSPBoards" +#define PN_STI_N_TB_BOARDS "N_TBBoards" +#define PN_STI_N_LBAS "N_LBAS" +#define PN_STI_N_HBAS "N_HBAS" +#define PN_STI_HBA__SPLIT "HBA_Split" +#define PN_STI_WIDE_LBAS "wide_LBAS" +#define PN_STI_POWER48_ON "power48On" +#define PN_STI_POWER220_ON "power220On" +#define PN_STI_CABINET_X "Cabinet.X" +#define PN_STI_CABINET_Y "Cabinet.Y" +#define PN_STI_CABINET_Z "Cabinet.Z" +#define PN_STI_HBA_CENTERX "HBA.centerX" +#define PN_STI_HBA_CENTERY "HBA.centerY" +#define PN_STI_HBA_CENTERZ "HBA.centerZ" +#define PN_STI_HBA_HBA0_CENTERX "HBA.HBA0.centerX" +#define PN_STI_HBA_HBA0_CENTERY "HBA.HBA0.centerY" +#define PN_STI_HBA_HBA0_CENTERZ "HBA.HBA0.centerZ" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_X "HBA.HBA0.NormalVector.X" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Y "HBA.HBA0.NormalVector.Y" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Z "HBA.HBA0.NormalVector.Z" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_X "HBA.HBA0.RotationMatrix.X" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Y "HBA.HBA0.RotationMatrix.Y" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Z "HBA.HBA0.RotationMatrix.Z" +#define PN_STI_HBA_HBA0_ROTATION "HBA.HBA0.rotation" +#define PN_STI_HBA_HBA1_CENTERX "HBA.HBA1.centerX" +#define PN_STI_HBA_HBA1_CENTERY "HBA.HBA1.centerY" +#define PN_STI_HBA_HBA1_CENTERZ "HBA.HBA1.centerZ" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_X "HBA.HBA1.NormalVector.X" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Y "HBA.HBA1.NormalVector.Y" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Z "HBA.HBA1.NormalVector.Z" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_X "HBA.HBA1.RotationMatrix.X" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Y "HBA.HBA1.RotationMatrix.Y" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Z "HBA.HBA1.RotationMatrix.Z" +#define PN_STI_HBA_HBA1_ROTATION "HBA.HBA1.rotation" +#define PN_STI_LBA_CENTERX "LBA.centerX" +#define PN_STI_LBA_CENTERY "LBA.centerY" +#define PN_STI_LBA_CENTERZ "LBA.centerZ" +#define PN_STI_LBA__NORMAL_VECTOR_X "LBA.NormalVector.X" +#define PN_STI_LBA__NORMAL_VECTOR_Y "LBA.NormalVector.Y" +#define PN_STI_LBA__NORMAL_VECTOR_Z "LBA.NormalVector.Z" +#define PN_STI_LBA__ROTATION_MATRIX_X "LBA.RotationMatrix.X" +#define PN_STI_LBA__ROTATION_MATRIX_Y "LBA.RotationMatrix.Y" +#define PN_STI_LBA__ROTATION_MATRIX_Z "LBA.RotationMatrix.Z" + // LogProcessor #define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" #define PST_LOG_PROCESSOR "LogProcessor" @@ -290,6 +387,7 @@ // SoftwareMonitor #define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" #define PST_SOFTWARE_MONITOR "SoftwareMonitor" +#define PN_SWM_SW_LEVEL "SWLevel" // SHMInfoServer #define PSN_SHM_INFO_SERVER "LOFAR_PermSW_SHMInfoServer" @@ -306,19 +404,8 @@ #define PN_CLC_CONNECTED "connected" #define PN_CLC_REQUESTED_CLOCK "requestedClock" #define PN_CLC_ACTUAL_CLOCK "actualClock" - -// Antenna -#define PSN_ANTENNA "@antenna@" -#define PST_ANTENNA "Antenna" -#define PN_ANT_STATUS_STATE "status.state" -#define PN_ANT_STATUS_CHILD_STATE "status.childState" -#define PN_ANT_STATUS_MESSAGE "status.message" -#define PN_ANT_STATUS_LEAF "status.leaf" -#define PN_ANT_RCUX "RCUX" -#define PN_ANT_RCUY "RCUY" -#define PN_ANT_DELTAX "deltaX" -#define PN_ANT_DELTAY "deltaY" -#define PN_ANT_DELTAH "deltaH" +#define PN_CLC_REQUESTED_BITMODE "requestedBitmode" +#define PN_CLC_ACTUAL_BITMODE "actualBitmode" // StnObservation #define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" @@ -326,6 +413,9 @@ #define PN_OBS_NAME "name" #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" +#define PN_OBS_RECEIVER_BITMAP "receiverBitmap" +#define PN_OBS_HBA_BITMAP "HBABitmap" +#define PN_OBS_LBA_BITMAP "LBABitmap" // BeamControl #define PSN_BEAM_CONTROL "LOFAR_ObsSW_@observation@_BeamControl" @@ -362,5 +452,6 @@ #define PN_TBC_TRIGGER_PEAK_VALUE "trigger.peakValue" #define PN_TBC_TRIGGER_FLAGS "trigger.flags" #define PN_TBC_TRIGGER_TABLE "trigger.table" +#define PN_TBC_TRIGGER_MISSED "trigger.missed" #endif diff --git a/MAC/APL/CEPCU/src/CMakeLists.txt b/MAC/APL/CEPCU/src/CMakeLists.txt index 7eb79319c10..fcc62f24f91 100644 --- a/MAC/APL/CEPCU/src/CMakeLists.txt +++ b/MAC/APL/CEPCU/src/CMakeLists.txt @@ -13,4 +13,5 @@ lofar_add_bin_program(versioncepcu versioncepcu.cc) add_subdirectory(OnlineControl) add_subdirectory(PythonControl) add_subdirectory(CEPlogProcessor) +add_subdirectory(CEPHardwareMonitor) # add_subdirectory(OfflineControl) diff --git a/MAC/APL/CEPCU/src/OnlineControl/CMakeLists.txt b/MAC/APL/CEPCU/src/OnlineControl/CMakeLists.txt index 78eaac88f09..a97577bda58 100644 --- a/MAC/APL/CEPCU/src/OnlineControl/CMakeLists.txt +++ b/MAC/APL/CEPCU/src/OnlineControl/CMakeLists.txt @@ -9,3 +9,5 @@ lofar_add_bin_program(OnlineControl OnlineControlMain.cc OnlineControl.cc CEPApplMgr.cc) + +lofar_add_executable(tPVSSMapping tPVSSMapping.cc) diff --git a/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc b/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc index 5012f8b4fa4..61e13a626d0 100644 --- a/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc +++ b/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.cc @@ -28,7 +28,9 @@ #include <Common/ParameterSet.h> #include <Common/ParameterRecord.h> #include <Common/Exceptions.h> +#include <Common/SystemUtil.h> #include <ApplCommon/StationInfo.h> +#include <ApplCommon/Observation.h> #include <ApplCommon/LofarDirs.h> #include <MACIO/MACServiceInfo.h> #include <GCF/TM/GCF_Protocols.h> @@ -64,6 +66,7 @@ static OnlineControl* thisOnlineControl = 0; OnlineControl::OnlineControl(const string& cntlrName) : GCFTask ((State)&OnlineControl::initial_state,cntlrName), itsPropertySet (0), + itsBGPApplPropSet (0), itsPropertySetInitialized (false), itsParentControl (0), itsParentPort (0), @@ -304,10 +307,9 @@ void OnlineControl::_databaseEventHandler(GCFEvent& event) // // initial_state(event, port) // -// Setup all connections. +// Create my own propertySet // -GCFEvent::TResult OnlineControl::initial_state(GCFEvent& event, - GCFPortInterface& port) +GCFEvent::TResult OnlineControl::initial_state(GCFEvent& event, GCFPortInterface& port) { LOG_INFO_STR ("initial:" << eventName(event) << "@" << port.getName()); @@ -320,7 +322,8 @@ GCFEvent::TResult OnlineControl::initial_state(GCFEvent& event, case F_INIT: { // Get access to my own propertyset. // uint32 obsID = globalParameterSet()->getUint32("Observation.ObsID"); - string propSetName(createPropertySetName(PSN_ONLINE_CONTROL, getName())); + string obsDPname = globalParameterSet()->getString("_DPname"); + string propSetName(createPropertySetName(PSN_ONLINE_CONTROL, getName(), obsDPname)); LOG_DEBUG_STR ("Activating PropertySet: "<< propSetName); itsPropertySet = new RTDBPropertySet(propSetName, PST_ONLINE_CONTROL, @@ -330,12 +333,12 @@ GCFEvent::TResult OnlineControl::initial_state(GCFEvent& event, break; case DP_CREATED: { - // NOTE: thsi function may be called DURING the construction of the PropertySet. + // NOTE: this function may be called DURING the construction of the PropertySet. // Always exit this event in a way that GCF can end the construction. DPCreatedEvent dpEvent(event); LOG_DEBUG_STR("Result of creating " << dpEvent.DPname << " = " << dpEvent.result); itsTimerPort->cancelAllTimers(); - itsTimerPort->setTimer(0.0); + itsTimerPort->setTimer(0.1); } break; @@ -344,7 +347,63 @@ GCFEvent::TResult OnlineControl::initial_state(GCFEvent& event, LOG_TRACE_FLOW ("Updateing state to PVSS"); itsPropertySet->setValue(PN_FSM_CURRENT_ACTION, GCFPVString("initial")); itsPropertySet->setValue(PN_FSM_ERROR, GCFPVString("")); - + + LOG_DEBUG ("Going to create BGPAppl datapoint"); + TRAN(OnlineControl::propset_state); // go to next state. + } + break; + + case F_CONNECTED: + ASSERTSTR (&port == itsParentPort, "F_CONNECTED event from port " << port.getName()); + break; + + case F_DISCONNECTED: + break; + + default: + LOG_DEBUG_STR ("initial, default"); + status = GCFEvent::NOT_HANDLED; + break; + } + return (status); +} + +// +// propset_state(event, port) +// +// Connect to BGPAppl DP and start rest of tasks +// +GCFEvent::TResult OnlineControl::propset_state(GCFEvent& event, GCFPortInterface& port) +{ + LOG_INFO_STR ("propset:" << eventName(event) << "@" << port.getName()); + + GCFEvent::TResult status = GCFEvent::HANDLED; + + switch (event.signal) { + case F_ENTRY: { + // Get access to my own propertyset. +// uint32 obsID = globalParameterSet()->getUint32("Observation.ObsID"); + string obsDPname = globalParameterSet()->getString("_DPname"); + string propSetName(createPropertySetName(PSN_BGP_APPL, getName(), obsDPname)); + LOG_DEBUG_STR ("Activating PropertySet: "<< propSetName); + itsBGPApplPropSet = new RTDBPropertySet(propSetName, + PST_BGP_APPL, + PSAT_RW, + this); + } + break; + + case DP_CREATED: { + // NOTE: this function may be called DURING the construction of the PropertySet. + // Always exit this event in a way that GCF can end the construction. + DPCreatedEvent dpEvent(event); + LOG_DEBUG_STR("Result of creating " << dpEvent.DPname << " = " << dpEvent.result); + itsTimerPort->cancelAllTimers(); + itsTimerPort->setTimer(0.1); + } + break; + + case F_TIMER: { // must be timer that PropSet is online. // start StopTimer for safety. LOG_INFO_STR("Starting QUIT timer that expires 5 seconds after end of observation"); ptime now(second_clock::universal_time()); @@ -361,15 +420,14 @@ GCFEvent::TResult OnlineControl::initial_state(GCFEvent& event, break; case F_CONNECTED: - ASSERTSTR (&port == itsParentPort, - "F_CONNECTED event from port " << port.getName()); + ASSERTSTR (&port == itsParentPort, "F_CONNECTED event from port " << port.getName()); break; case F_DISCONNECTED: break; default: - LOG_DEBUG_STR ("initial, default"); + LOG_DEBUG_STR ("propset, default"); status = GCFEvent::NOT_HANDLED; break; } @@ -441,6 +499,7 @@ GCFEvent::TResult OnlineControl::active_state(GCFEvent& event, GCFPortInterface& itsLogControlPort->send(announce); // execute this state _setState(CTState::CONNECT); + _setupBGPmappingTables(); _doBoot(); // start ACC's and boot them break; } @@ -573,6 +632,84 @@ GCFEvent::TResult OnlineControl::finishing_state(GCFEvent& event, GCFPortInterfa return (status); } +// +// _setupBGPmappingTables +// +void OnlineControl::_setupBGPmappingTables() +{ + Observation theObs(globalParameterSet(), false); + int nrStreams = theObs.streamsToStorage.size(); + LOG_DEBUG_STR("_setupBGPmapping: " << nrStreams << " streams found."); + + // e.g. CS001 , [0,2,3,6] , [L36000_SAP000_SB000_uv.MS, ...] , [1,3,5,4] + GCFPValueArray ionodeArr; + GCFPValueArray locusArr; + GCFPValueArray adderArr; + GCFPValueArray writerArr; + GCFPValueArray dpArr; + GCFPValueArray dptypeArr; + + uint prevPset = (nrStreams ? theObs.streamsToStorage[0].sourcePset : -1); + vector<string> locusVector; + vector<int> adderVector; + vector<int> writerVector; + vector<string> DPVector; + vector<string> DPtypeVector; + for (int i = 0; i < nrStreams; i++) { + if (theObs.streamsToStorage[i].sourcePset != prevPset) { // other Pset? write current vector to the database. + ionodeArr.push_back(new GCFPVInteger(prevPset)); + { stringstream os; + writeVector(os, locusVector); + locusArr.push_back (new GCFPVString(os.str())); + } + { stringstream os; + writeVector(os, adderVector); + adderArr.push_back (new GCFPVString(os.str())); + } + { stringstream os; + writeVector(os, writerVector); + writerArr.push_back(new GCFPVString(os.str())); + } + { stringstream os; + writeVector(os, DPVector); + dpArr.push_back (new GCFPVString(os.str())); + } + { stringstream os; + writeVector(os, DPtypeVector); + dptypeArr.push_back(new GCFPVString(os.str())); + } + // clear the collecting vectors + locusVector.clear(); + adderVector.clear(); + writerVector.clear(); + DPVector.clear(); + DPtypeVector.clear(); + prevPset = theObs.streamsToStorage[i].sourcePset; + } + // extend vector with info + locusVector.push_back (theObs.streamsToStorage[i].destStorageNode); + adderVector.push_back (theObs.streamsToStorage[i].adderNr); + writerVector.push_back(theObs.streamsToStorage[i].writerNr); + DPVector.push_back (theObs.streamsToStorage[i].filename); + DPtypeVector.push_back(theObs.streamsToStorage[i].dataProduct); + } + itsBGPApplPropSet->setValue(PN_BGPA_IO_NODE_LIST, GCFPVDynArr(LPT_DYNINTEGER, ionodeArr)); + itsBGPApplPropSet->setValue(PN_BGPA_LOCUS_NODE_LIST, GCFPVDynArr(LPT_DYNSTRING, locusArr)); + itsBGPApplPropSet->setValue(PN_BGPA_ADDER_LIST, GCFPVDynArr(LPT_DYNSTRING, adderArr)); + itsBGPApplPropSet->setValue(PN_BGPA_WRITER_LIST, GCFPVDynArr(LPT_DYNSTRING, writerArr)); + itsBGPApplPropSet->setValue(PN_BGPA_DATA_PRODUCT_LIST, GCFPVDynArr(LPT_DYNSTRING, dpArr)); + itsBGPApplPropSet->setValue(PN_BGPA_DATA_PRODUCT_TYPE_LIST, GCFPVDynArr(LPT_DYNSTRING, dptypeArr)); + + // release claimed memory. + for (int i = ionodeArr.size()-1; i>=0; i--) { + delete ionodeArr[i]; + delete locusArr[i]; + delete adderArr[i]; + delete writerArr[i]; + delete dpArr[i]; + delete dptypeArr[i]; + } +} // // _doBoot() diff --git a/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.h b/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.h index 6594ed84a2c..09e695da178 100644 --- a/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.h +++ b/MAC/APL/CEPCU/src/OnlineControl/OnlineControl.h @@ -65,15 +65,14 @@ public: explicit OnlineControl(const string& cntlrName); ~OnlineControl(); - // During the initial state all connections with the other programs are made. - GCFEvent::TResult initial_state (GCFEvent& e, - GCFPortInterface& p); + // Connect to our own propertyset. + GCFEvent::TResult initial_state (GCFEvent& e, GCFPortInterface& p); + // Connect to BGPAppl propset and start remaining tasks. + GCFEvent::TResult propset_state (GCFEvent& e, GCFPortInterface& p); // Normal control mode. - GCFEvent::TResult active_state (GCFEvent& e, - GCFPortInterface& p); + GCFEvent::TResult active_state (GCFEvent& e, GCFPortInterface& p); // Finishing mode. - GCFEvent::TResult finishing_state(GCFEvent& event, - GCFPortInterface& port); + GCFEvent::TResult finishing_state(GCFEvent& event, GCFPortInterface& port); // Interrupthandler for switching to finisingstate when exiting the program static void signalHandler (int signum); @@ -95,6 +94,7 @@ private: OnlineControl(const OnlineControl&); OnlineControl& operator=(const OnlineControl&); + void _setupBGPmappingTables(); void _doBoot(); void _doQuit(); void _finishController (uint16_t result); @@ -122,6 +122,7 @@ private: // ----- datamembers ----- RTDBPropertySet* itsPropertySet; + RTDBPropertySet* itsBGPApplPropSet; bool itsPropertySetInitialized; // pointer to parent control task diff --git a/MAC/APL/CEPCU/src/OnlineControl/PVSSDatapointDefs.h b/MAC/APL/CEPCU/src/OnlineControl/PVSSDatapointDefs.h index cbd965ef734..95cadd7cb63 100644 --- a/MAC/APL/CEPCU/src/OnlineControl/PVSSDatapointDefs.h +++ b/MAC/APL/CEPCU/src/OnlineControl/PVSSDatapointDefs.h @@ -1,4 +1,4 @@ -// This file was generated by create_db_files v1.0 on Thu Mar 19 14:56:58 UTC 2009 +// This file was generated by create_db_files v2.0 on Fri Apr 13 09:04:54 UTC 2012 #ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H #define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H @@ -42,7 +42,6 @@ #define PST_OBSERVATION "Observation" #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" -#define PN_OBS_RECEIVER_BITMAP "receiverBitmap" #define PN_OBS_CLAIM_PERIOD "claimPeriod" #define PN_OBS_PREPARE_PERIOD "preparePeriod" #define PN_OBS_START_TIME "startTime" @@ -63,22 +62,68 @@ #define PN_OBS_BEAMS_DIRECTION_TYPE "Beams.directionType" #define PN_OBS_BEAMS_BEAMLET_LIST "Beams.beamletList" #define PN_OBS_BEAMS_SUBBAND_LIST "Beams.subbandList" +#define PN_OBS_TIED_ARRAY_BEAMS_BEAM_INDEX "TiedArrayBeams.beamIndex" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE1 "TiedArrayBeams.angle1" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE2 "TiedArrayBeams.angle2" +#define PN_OBS_TIED_ARRAY_BEAMS_DIRECTION_TYPE "TiedArrayBeams.directionType" +#define PN_OBS_TIED_ARRAY_BEAMS_DISPERSION "TiedArrayBeams.dispersion" +#define PN_OBS_TIED_ARRAY_BEAMS_COHERENT "TiedArrayBeams.coherent" // ObservationControl #define PSN_OBSERVATION_CONTROL "LOFAR_ObsSW_@observation@_ObservationControl" #define PST_OBSERVATION_CONTROL "ObservationControl" +#define PN_OBSCTRL_COMMAND "command" + +// Adder +#define PSN_ADDER "@adder@" +#define PST_ADDER "Adder" +#define PN_ADD_DROPPING "dropping" +#define PN_ADD_NR_BLOCKS_DROPPED "nrBlocksDropped" +#define PN_ADD_DATA_PRODUCT_TYPE "dataProductType" +#define PN_ADD_FILE_NAME "fileName" +#define PN_ADD_STORAGE_NODE "storageNode" +#define PN_ADD_DIRECTORY "directory" +#define PN_ADD_OBSERVATION_NAME "observationName" + +// InputBuffer +#define PSN_INPUT_BUFFER "@inputbuffer@" +#define PST_INPUT_BUFFER "InputBuffer" +#define PN_IPB_STATION_NAME "stationName" +#define PN_IPB_STREAM0_BLOCKS_IN "stream0.blocksIn" +#define PN_IPB_STREAM0_PERC_BAD "stream0.percBad" +#define PN_IPB_STREAM0_REJECTED "stream0.rejected" +#define PN_IPB_STREAM1_BLOCKS_IN "stream1.blocksIn" +#define PN_IPB_STREAM1_PERC_BAD "stream1.percBad" +#define PN_IPB_STREAM1_REJECTED "stream1.rejected" +#define PN_IPB_STREAM2_BLOCKS_IN "stream2.blocksIn" +#define PN_IPB_STREAM2_PERC_BAD "stream2.percBad" +#define PN_IPB_STREAM2_REJECTED "stream2.rejected" +#define PN_IPB_STREAM3_BLOCKS_IN "stream3.blocksIn" +#define PN_IPB_STREAM3_PERC_BAD "stream3.percBad" +#define PN_IPB_STREAM3_REJECTED "stream3.rejected" +#define PN_IPB_LATE "late" +#define PN_IPB_IO_TIME "IOTime" + +// Storage +#define PSN_STORAGE "@storage@" +#define PST_STORAGE "Storage" +#define PN_STR_TIME "time" +#define PN_STR_COUNT "count" +#define PN_STR_DROPPED "dropped" // OnlineControl #define PSN_ONLINE_CONTROL "LOFAR_ObsSW_@observation@_OnlineControl" #define PST_ONLINE_CONTROL "OnlineControl" -// Correlator -#define PSN_CORRELATOR "LOFAR_ObsSW_@observation@_OnlineControl_Correlator" -#define PST_CORRELATOR "Correlator" - -// StorageAppl -#define PSN_STORAGE_APPL "LOFAR_ObsSW_@observation@_OnlineControl_StorageAppl" -#define PST_STORAGE_APPL "StorageAppl" +// BGPAppl +#define PSN_BGP_APPL "LOFAR_ObsSW_@observation@_OnlineControl_BGPAppl" +#define PST_BGP_APPL "BGPAppl" +#define PN_BGPA_IO_NODE_LIST "ioNodeList" +#define PN_BGPA_LOCUS_NODE_LIST "locusNodeList" +#define PN_BGPA_ADDER_LIST "adderList" +#define PN_BGPA_WRITER_LIST "writerList" +#define PN_BGPA_DATA_PRODUCT_LIST "dataProductList" +#define PN_BGPA_DATA_PRODUCT_TYPE_LIST "dataProductTypeList" // Cabinet #define PSN_CABINET "LOFAR_PIC_@cabinet@" @@ -217,10 +262,15 @@ #define PN_RCU_TRIGGER_FILTER "Trigger.filter" #define PN_RCU_TRIGGER_WINDOW "Trigger.window" #define PN_RCU_TRIGGER_OPERATING_MODE "Trigger.operatingMode" -#define PN_RCU_TRIGGER_COEFF0 "Trigger.coeff0" -#define PN_RCU_TRIGGER_COEFF1 "Trigger.coeff1" -#define PN_RCU_TRIGGER_COEFF2 "Trigger.coeff2" -#define PN_RCU_TRIGGER_COEFF3 "Trigger.coeff3" +#define PN_RCU_TRIGGER_TRIGGER_MODE "Trigger.triggerMode" +#define PN_RCU_TRIGGER_FILTER0_COEFF0 "Trigger.filter0.coeff0" +#define PN_RCU_TRIGGER_FILTER0_COEFF1 "Trigger.filter0.coeff1" +#define PN_RCU_TRIGGER_FILTER0_COEFF2 "Trigger.filter0.coeff2" +#define PN_RCU_TRIGGER_FILTER0_COEFF3 "Trigger.filter0.coeff3" +#define PN_RCU_TRIGGER_FILTER1_COEFF0 "Trigger.filter1.coeff0" +#define PN_RCU_TRIGGER_FILTER1_COEFF1 "Trigger.filter1.coeff1" +#define PN_RCU_TRIGGER_FILTER1_COEFF2 "Trigger.filter1.coeff2" +#define PN_RCU_TRIGGER_FILTER1_COEFF3 "Trigger.filter1.coeff3" // TBBoard #define PSN_TB_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@" @@ -294,7 +344,7 @@ #define PN_ANT_RCUY "RCUY" #define PN_ANT_DELTAX "deltaX" #define PN_ANT_DELTAY "deltaY" -#define PN_ANT_DELTAH "deltaH" +#define PN_ANT_DELTAZ "deltaZ" // StnObservation #define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" @@ -302,6 +352,9 @@ #define PN_OBS_NAME "name" #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" +#define PN_OBS_RECEIVER_BITMAP "receiverBitmap" +#define PN_OBS_HB_ABITMAP "HBAbitmap" +#define PN_OBS_LB_ABITMAP "LBAbitmap" // BeamControl #define PSN_BEAM_CONTROL "LOFAR_ObsSW_@observation@_BeamControl" @@ -338,5 +391,6 @@ #define PN_TBC_TRIGGER_PEAK_VALUE "trigger.peakValue" #define PN_TBC_TRIGGER_FLAGS "trigger.flags" #define PN_TBC_TRIGGER_TABLE "trigger.table" +#define PN_TBC_TRIGGER_MISSED "trigger.missed" #endif diff --git a/MAC/APL/CEPCU/src/OnlineControl/tPVSSMapping.cc b/MAC/APL/CEPCU/src/OnlineControl/tPVSSMapping.cc new file mode 100644 index 00000000000..a1d6039e885 --- /dev/null +++ b/MAC/APL/CEPCU/src/OnlineControl/tPVSSMapping.cc @@ -0,0 +1,87 @@ +//# tPVSSmapping.cc: test StreamToStrorage conversion to PVSS dps. +//# +//# Copyright (C) 2006 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: OnlineControl.cc 18153 2011-05-31 23:03:25Z schoenmakers $ +#include <lofar_config.h> +#include <Common/LofarLogger.h> + +#include <signal.h> +#include <Common/StreamUtil.h> +//#include <Common/lofar_vector.h> +//#include <Common/lofar_string.h> +#include <Common/ParameterSet.h> +#include <Common/Exceptions.h> +#include <Common/SystemUtil.h> +#include <ApplCommon/StationInfo.h> +#include <ApplCommon/Observation.h> + +using namespace std; +using namespace LOFAR; + +int main(int argc, char* argv[]) +{ + if (argc < 2) { + cout << "Syntax: " << argv[0] << " parameterSet" << endl; + return (-1); + } + + ParameterSet thePS(argv[1]); + Observation theObs(&thePS, false); + int nrStreams = theObs.streamsToStorage.size(); + cout << "_setupBGPmapping: " << nrStreams << " streams found." << endl; + cout << "ioNode , locusNodes , adders , writers , dataProducts, dataProductTypes" << endl; + + uint prevPset = (nrStreams ? theObs.streamsToStorage[0].sourcePset : -1); + vector<string> locusVector; + vector<int> adderVector; + vector<int> writerVector; + vector<string> DPVector; + vector<string> DPtypeVector; + for (int i = 0; i < nrStreams; i++) { + if (theObs.streamsToStorage[i].sourcePset != prevPset) { // other Pset? write current vector to the database. + stringstream os; + writeVector(os, locusVector); + os << ","; + writeVector(os, adderVector); + os << ","; + writeVector(os, writerVector); + os << ","; + writeVector(os, DPVector); + os << ","; + writeVector(os, DPtypeVector); + cout << prevPset << "," << os.str() << endl; + // clear the collecting vectors + locusVector.clear(); + adderVector.clear(); + writerVector.clear(); + DPVector.clear(); + DPtypeVector.clear(); + prevPset = theObs.streamsToStorage[i].sourcePset; + } + // extend vector with info + locusVector.push_back (theObs.streamsToStorage[i].destStorageNode); + adderVector.push_back (theObs.streamsToStorage[i].adderNr); + writerVector.push_back(theObs.streamsToStorage[i].writerNr); + DPVector.push_back (theObs.streamsToStorage[i].filename); + DPtypeVector.push_back(theObs.streamsToStorage[i].dataProduct); + } + return (0); +} + diff --git a/MAC/APL/CEPCU/src/PythonControl/PVSSDatapointDefs.h b/MAC/APL/CEPCU/src/PythonControl/PVSSDatapointDefs.h index 19f33ca2d9a..9f83a52dda5 100644 --- a/MAC/APL/CEPCU/src/PythonControl/PVSSDatapointDefs.h +++ b/MAC/APL/CEPCU/src/PythonControl/PVSSDatapointDefs.h @@ -1,4 +1,4 @@ -// This file was generated by create_db_files v2.0 on Tue Mar 9 08:12:06 UTC 2010 +// This file was generated by create_db_files v2.0 on Tue Oct 9 13:22:37 UTC 2012 #ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H #define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H @@ -15,18 +15,6 @@ #define PN_OBJ_MESSAGE "object.message" #define PN_OBJ_LEAF "object.leaf" -// Station -#define PSN_STATION "LOFAR_PIC_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - -// Station -#define PSN_STATION "LOFAR_PermSW_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - // MACScheduler #define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" #define PST_MAC_SCHEDULER "MACScheduler" @@ -37,6 +25,10 @@ #define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" #define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" +// CRTriggerControl +#define PSN_CR_TRIGGER_CONTROL "LOFAR_PermSW_CRTriggerControl" +#define PST_CR_TRIGGER_CONTROL "CRTriggerControl" + // Observation #define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" #define PST_OBSERVATION "Observation" @@ -53,6 +45,9 @@ #define PN_OBS_SAMPLE_CLOCK "sampleClock" #define PN_OBS_RUN_STATE "runState" #define PN_OBS_MEASUREMENT_SET "measurementSet" +#define PN_OBS_PROCESS_TYPE "processType" +#define PN_OBS_PROCESS_SUBTYPE "processSubtype" +#define PN_OBS_STRATEGY "strategy" #define PN_OBS_STATION_LIST "stationList" #define PN_OBS_INPUT_NODE_LIST "inputNodeList" #define PN_OBS_BGL_NODE_LIST "BGLNodeList" @@ -60,25 +55,24 @@ #define PN_OBS_BEAMS_ANGLE1 "Beams.angle1" #define PN_OBS_BEAMS_ANGLE2 "Beams.angle2" #define PN_OBS_BEAMS_DIRECTION_TYPE "Beams.directionType" -#define PN_OBS_BEAMS_BEAMLET_LIST "Beams.beamletList" #define PN_OBS_BEAMS_SUBBAND_LIST "Beams.subbandList" +#define PN_OBS_TIED_ARRAY_BEAMS_BEAM_INDEX "TiedArrayBeams.beamIndex" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE1 "TiedArrayBeams.angle1" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE2 "TiedArrayBeams.angle2" +#define PN_OBS_TIED_ARRAY_BEAMS_DIRECTION_TYPE "TiedArrayBeams.directionType" +#define PN_OBS_TIED_ARRAY_BEAMS_DISPERSION "TiedArrayBeams.dispersion" +#define PN_OBS_TIED_ARRAY_BEAMS_COHERENT "TiedArrayBeams.coherent" // ObservationControl #define PSN_OBSERVATION_CONTROL "LOFAR_ObsSW_@observation@_ObservationControl" #define PST_OBSERVATION_CONTROL "ObservationControl" #define PN_OBSCTRL_COMMAND "command" -// Adder -#define PSN_ADDER "@adder@" -#define PST_ADDER "Adder" -#define PN_ADD_DROPPING "dropping" -#define PN_ADD_NR_BLOCKS_DROPPED "nrBlocksDropped" -#define PN_ADD_LOG_LINE "logLine" - // InputBuffer -#define PSN_INPUT_BUFFER "@inputbuffer@" +#define PSN_INPUT_BUFFER "LOFAR_PermSW_@psionode@_InputBuffer" #define PST_INPUT_BUFFER "InputBuffer" #define PN_IPB_STATION_NAME "stationName" +#define PN_IPB_OBSERVATION_NAME "observationName" #define PN_IPB_STREAM0_BLOCKS_IN "stream0.blocksIn" #define PN_IPB_STREAM0_PERC_BAD "stream0.percBad" #define PN_IPB_STREAM0_REJECTED "stream0.rejected" @@ -94,16 +88,55 @@ #define PN_IPB_LATE "late" #define PN_IPB_IO_TIME "IOTime" -// Storage -#define PSN_STORAGE "@storage@" -#define PST_STORAGE "Storage" -#define PN_STR_TIME "time" -#define PN_STR_COUNT "count" -#define PN_STR_DROPPED "dropped" +// Adder +#define PSN_ADDER "LOFAR_ObsSW_@osionode@_@adder@" +#define PST_ADDER "Adder" +#define PN_ADD_DROPPING "dropping" +#define PN_ADD_DROPPED "dropped" +#define PN_ADD_DATA_PRODUCT_TYPE "dataProductType" +#define PN_ADD_DATA_PRODUCT "dataProduct" +#define PN_ADD_FILE_NAME "fileName" +#define PN_ADD_LOCUS_NODE "locusNode" +#define PN_ADD_WRITER "writer" +#define PN_ADD_DIRECTORY "directory" +#define PN_ADD_OBSERVATION_NAME "observationName" + +// Writer +#define PSN_WRITER "LOFAR_ObsSW_@oslocusnode@_@writer@" +#define PST_WRITER "Writer" +#define PN_WTR_WRITTEN "written" +#define PN_WTR_DROPPED "dropped" +#define PN_WTR_FILE_NAME "fileName" +#define PN_WTR_DATA_RATE "dataRate" +#define PN_WTR_DATA_PRODUCT_TYPE "dataProductType" +#define PN_WTR_OBSERVATION_NAME "observationName" + +// IONode +#define PSN_IO_NODE "LOFAR_PIC_BGP_@midplane@_@ionode@" +#define PST_IO_NODE "IONode" +#define PN_ION_STATION0 "station0" +#define PN_ION_IP0 "IP0" +#define PN_ION_MAC0 "MAC0" +#define PN_ION_STATION1 "station1" +#define PN_ION_IP1 "IP1" +#define PN_ION_MAC1 "MAC1" +#define PN_ION_USE2ND_STATION "use2ndStation" +#define PN_ION_USED_STATION "usedStation" +#define PN_ION_USEDIP "usedIP" +#define PN_ION_USEDMAC "usedMAC" + +// LocusNode +#define PSN_LOCUS_NODE "LOFAR_PIC_@osrack@_@locusnode@" +#define PST_LOCUS_NODE "LocusNode" +#define PN_LCN_FREE "free" +#define PN_LCN_TOTAL "total" +#define PN_LCN_CLAIMED "claimed" -// PythonControl -#define PSN_PYTHON_CONTROL "LOFAR_ObsSW_@observation@_PythonControl" -#define PST_PYTHON_CONTROL "PythonControl" +// CEPHardwareMonitor +#define PSN_CEP_HARDWARE_MONITOR "LOFAR_PermSW_CEPHardwareMonitor" +#define PST_CEP_HARDWARE_MONITOR "CEPHardwareMonitor" +#define PN_CHM_BGP_CONNECTED "BGP.connected" +#define PN_CHM_CLUSTER_CONNECTED "Cluster.connected" // Cabinet #define PSN_CABINET "LOFAR_PIC_@cabinet@" @@ -160,6 +193,8 @@ #define PN_RSP_VOLTAGE25 "voltage25" #define PN_RSP_VOLTAGE33 "voltage33" #define PN_RSP_VERSION "version" +#define PN_RSP_BITMODE "bitmode" +#define PN_RSP_BITMODE_CAPABILITY "bitmodeCapability" #define PN_RSP_ALERT "alert" #define PN_RSP_SPLITTER_ON "splitterOn" #define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" @@ -243,10 +278,14 @@ #define PN_RCU_TRIGGER_WINDOW "Trigger.window" #define PN_RCU_TRIGGER_OPERATING_MODE "Trigger.operatingMode" #define PN_RCU_TRIGGER_TRIGGER_MODE "Trigger.triggerMode" -#define PN_RCU_TRIGGER_COEFF0 "Trigger.coeff0" -#define PN_RCU_TRIGGER_COEFF1 "Trigger.coeff1" -#define PN_RCU_TRIGGER_COEFF2 "Trigger.coeff2" -#define PN_RCU_TRIGGER_COEFF3 "Trigger.coeff3" +#define PN_RCU_TRIGGER_FILTER0_COEFF0 "Trigger.filter0.coeff0" +#define PN_RCU_TRIGGER_FILTER0_COEFF1 "Trigger.filter0.coeff1" +#define PN_RCU_TRIGGER_FILTER0_COEFF2 "Trigger.filter0.coeff2" +#define PN_RCU_TRIGGER_FILTER0_COEFF3 "Trigger.filter0.coeff3" +#define PN_RCU_TRIGGER_FILTER1_COEFF0 "Trigger.filter1.coeff0" +#define PN_RCU_TRIGGER_FILTER1_COEFF1 "Trigger.filter1.coeff1" +#define PN_RCU_TRIGGER_FILTER1_COEFF2 "Trigger.filter1.coeff2" +#define PN_RCU_TRIGGER_FILTER1_COEFF3 "Trigger.filter1.coeff3" // TBBoard #define PSN_TB_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@" @@ -274,6 +313,62 @@ #define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" #define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" +// LBAAntenna +#define PSN_LBA_ANTENNA "LOFAR_PIC_@lbaantenna@" +#define PST_LBA_ANTENNA "LBAAntenna" + +// HBAAntenna +#define PSN_HBA_ANTENNA "LOFAR_PIC_@hbaantenna@" +#define PST_HBA_ANTENNA "HBAAntenna" + +// StationInfo +#define PSN_STATION_INFO "LOFAR_PIC_StationInfo" +#define PST_STATION_INFO "StationInfo" +#define PN_STI_STATIONID "stationID" +#define PN_STI_N_RSP_BOARDS "N_RSPBoards" +#define PN_STI_N_TB_BOARDS "N_TBBoards" +#define PN_STI_N_LBAS "N_LBAS" +#define PN_STI_N_HBAS "N_HBAS" +#define PN_STI_HBA__SPLIT "HBA_Split" +#define PN_STI_WIDE_LBAS "wide_LBAS" +#define PN_STI_POWER48_ON "power48On" +#define PN_STI_POWER220_ON "power220On" +#define PN_STI_CABINET_X "Cabinet.X" +#define PN_STI_CABINET_Y "Cabinet.Y" +#define PN_STI_CABINET_Z "Cabinet.Z" +#define PN_STI_HBA_CENTERX "HBA.centerX" +#define PN_STI_HBA_CENTERY "HBA.centerY" +#define PN_STI_HBA_CENTERZ "HBA.centerZ" +#define PN_STI_HBA_HBA0_CENTERX "HBA.HBA0.centerX" +#define PN_STI_HBA_HBA0_CENTERY "HBA.HBA0.centerY" +#define PN_STI_HBA_HBA0_CENTERZ "HBA.HBA0.centerZ" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_X "HBA.HBA0.NormalVector.X" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Y "HBA.HBA0.NormalVector.Y" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Z "HBA.HBA0.NormalVector.Z" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_X "HBA.HBA0.RotationMatrix.X" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Y "HBA.HBA0.RotationMatrix.Y" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Z "HBA.HBA0.RotationMatrix.Z" +#define PN_STI_HBA_HBA0_ROTATION "HBA.HBA0.rotation" +#define PN_STI_HBA_HBA1_CENTERX "HBA.HBA1.centerX" +#define PN_STI_HBA_HBA1_CENTERY "HBA.HBA1.centerY" +#define PN_STI_HBA_HBA1_CENTERZ "HBA.HBA1.centerZ" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_X "HBA.HBA1.NormalVector.X" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Y "HBA.HBA1.NormalVector.Y" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Z "HBA.HBA1.NormalVector.Z" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_X "HBA.HBA1.RotationMatrix.X" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Y "HBA.HBA1.RotationMatrix.Y" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Z "HBA.HBA1.RotationMatrix.Z" +#define PN_STI_HBA_HBA1_ROTATION "HBA.HBA1.rotation" +#define PN_STI_LBA_CENTERX "LBA.centerX" +#define PN_STI_LBA_CENTERY "LBA.centerY" +#define PN_STI_LBA_CENTERZ "LBA.centerZ" +#define PN_STI_LBA__NORMAL_VECTOR_X "LBA.NormalVector.X" +#define PN_STI_LBA__NORMAL_VECTOR_Y "LBA.NormalVector.Y" +#define PN_STI_LBA__NORMAL_VECTOR_Z "LBA.NormalVector.Z" +#define PN_STI_LBA__ROTATION_MATRIX_X "LBA.RotationMatrix.X" +#define PN_STI_LBA__ROTATION_MATRIX_Y "LBA.RotationMatrix.Y" +#define PN_STI_LBA__ROTATION_MATRIX_Z "LBA.RotationMatrix.Z" + // LogProcessor #define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" #define PST_LOG_PROCESSOR "LogProcessor" @@ -292,6 +387,7 @@ // SoftwareMonitor #define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" #define PST_SOFTWARE_MONITOR "SoftwareMonitor" +#define PN_SWM_SW_LEVEL "SWLevel" // SHMInfoServer #define PSN_SHM_INFO_SERVER "LOFAR_PermSW_SHMInfoServer" @@ -308,19 +404,8 @@ #define PN_CLC_CONNECTED "connected" #define PN_CLC_REQUESTED_CLOCK "requestedClock" #define PN_CLC_ACTUAL_CLOCK "actualClock" - -// Antenna -#define PSN_ANTENNA "@antenna@" -#define PST_ANTENNA "Antenna" -#define PN_ANT_STATUS_STATE "status.state" -#define PN_ANT_STATUS_CHILD_STATE "status.childState" -#define PN_ANT_STATUS_MESSAGE "status.message" -#define PN_ANT_STATUS_LEAF "status.leaf" -#define PN_ANT_RCUX "RCUX" -#define PN_ANT_RCUY "RCUY" -#define PN_ANT_DELTAX "deltaX" -#define PN_ANT_DELTAY "deltaY" -#define PN_ANT_DELTAH "deltaH" +#define PN_CLC_REQUESTED_BITMODE "requestedBitmode" +#define PN_CLC_ACTUAL_BITMODE "actualBitmode" // StnObservation #define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" @@ -329,6 +414,8 @@ #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" #define PN_OBS_RECEIVER_BITMAP "receiverBitmap" +#define PN_OBS_HBA_BITMAP "HBABitmap" +#define PN_OBS_LBA_BITMAP "LBABitmap" // BeamControl #define PSN_BEAM_CONTROL "LOFAR_ObsSW_@observation@_BeamControl" diff --git a/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc b/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc index 6ca68cbe2fd..ac863758473 100644 --- a/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc +++ b/MAC/APL/CEPCU/src/PythonControl/PythonControl.cc @@ -185,6 +185,10 @@ bool PythonControl::_startPython(const string& pythonProg, } } + // Readin parameters from the obsercationfile. + itsFeedbackFile = observationParset(obsID)+"_feedback"; + LOG_INFO_STR ("Expect metadata to be in file " << itsFeedbackFile); + // construct system command string startCmd; string startScript("startPython.sh"); @@ -203,13 +207,23 @@ bool PythonControl::_startPython(const string& pythonProg, myHostname(true).c_str(), parentService.c_str(), itsPythonName.c_str()); } LOG_INFO_STR("About to start: " << startCmd); - - int32 result = system (startCmd.c_str()); - LOG_INFO_STR ("Result of start = " << result); - - // Readin parameters from the obsercationfile. - itsFeedbackFile = observationParset(obsID)+"_feedback"; - LOG_INFO_STR ("Expecting metadata in file " << itsFeedbackFile); +#if 1 + FILE* pipe = popen(startCmd.c_str(), "r"); + if (!pipe) { + LOG_FATAL_STR("Couldn't execute '" << startCmd << ", errno = " << strerror(errno)); + return (false); + } + LOG_INFO("Output of command: ..."); + while (!feof(pipe)) { + char buffer[1024]; + LOG_INFO_STR(fgets(buffer, 1024, pipe)); + } + LOG_INFO("... end of command output"); + int result = pclose(pipe); +#else + int result = system (startCmd.c_str()); +#endif + LOG_INFO_STR ("Result of command = " << result); if (result == -1) { return (false); diff --git a/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRreadRequest.h b/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRreadRequest.h index ce2f2951c9c..4c0888b6c58 100644 --- a/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRreadRequest.h +++ b/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRreadRequest.h @@ -47,9 +47,9 @@ public: //@{ // --- marshalling methods --- - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize(); + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); //@} // --- datamembers --- diff --git a/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRreadVector.h b/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRreadVector.h index b949463c898..0e082b4ea21 100644 --- a/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRreadVector.h +++ b/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRreadVector.h @@ -43,9 +43,9 @@ public: //@{ // --- marshalling methods --- - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize(); + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); //@} // --- datamembers --- diff --git a/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRrecordRequest.h b/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRrecordRequest.h index 1dd2be542cf..dda38815376 100644 --- a/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRrecordRequest.h +++ b/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRrecordRequest.h @@ -44,9 +44,9 @@ public: //@{ // --- marshalling methods --- - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize(); + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); //@} // --- datamembers --- diff --git a/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRrecordVector.h b/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRrecordVector.h index 1d8adefad8f..60b4ac5cb52 100644 --- a/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRrecordVector.h +++ b/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRrecordVector.h @@ -43,9 +43,9 @@ public: //@{ // --- marshalling methods --- - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize(); + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); //@} // --- datamembers --- diff --git a/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRstopRequest.h b/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRstopRequest.h index 5bf9b545ef1..d6bafc1f961 100644 --- a/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRstopRequest.h +++ b/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRstopRequest.h @@ -44,9 +44,9 @@ public: //@{ // --- marshalling methods --- - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize(); + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); //@} // --- datamembers --- diff --git a/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRstopVector.h b/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRstopVector.h index a14ffe5689b..355a4d1e340 100644 --- a/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRstopVector.h +++ b/MAC/APL/CR_Protocol/include/APL/CR_Protocol/CRstopVector.h @@ -43,9 +43,9 @@ public: //@{ // --- marshalling methods --- - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize(); + size_t pack (void* buffer); + size_t unpack(void *buffer); //@} // --- datamembers --- diff --git a/MAC/APL/CR_Protocol/src/CRreadRequest.cc b/MAC/APL/CR_Protocol/src/CRreadRequest.cc index 04c9e919cbd..03a059de2a2 100644 --- a/MAC/APL/CR_Protocol/src/CRreadRequest.cc +++ b/MAC/APL/CR_Protocol/src/CRreadRequest.cc @@ -26,7 +26,7 @@ //# Includes #include <Common/LofarLogger.h> #include <APL/CR_Protocol/CRreadRequest.h> -#include <MACIO/Marshalling.h> +#include <MACIO/Marshalling.tcc> namespace LOFAR { namespace CR_Protocol { @@ -40,27 +40,27 @@ ostream& CRreadRequest::print (ostream& os) const // --- marshalling methods --- -unsigned int CRreadRequest::getSize() +size_t CRreadRequest::getSize() { - return(MSH_STRING_SIZE(stationList) + MSH_STRING_SIZE(rcuList) + readTime.getSize() + timeBefore.getSize() + timeAfter.getSize()); + return(MSH_size(stationList) + MSH_size(rcuList) + readTime.getSize() + timeBefore.getSize() + timeAfter.getSize()); } -unsigned int CRreadRequest::pack (void* buffer) +size_t CRreadRequest::pack (char* buffer) const { - unsigned int offset(0); - MSH_PACK_STRING(buffer, offset, stationList); - MSH_PACK_STRING(buffer, offset, rcuList); + size_t offset = 0; + MSH_pack(buffer, offset, stationList); + MSH_pack(buffer, offset, rcuList); offset += readTime.pack((char*)(buffer)+offset); offset += timeBefore.pack((char*)(buffer)+offset); offset += timeAfter.pack((char*)(buffer)+offset); return (offset); } -unsigned int CRreadRequest::unpack(void *buffer) +size_t CRreadRequest::unpack(const char *buffer) { - unsigned int offset(0); - MSH_UNPACK_STRING(buffer, offset, stationList); - MSH_UNPACK_STRING(buffer, offset, rcuList); + size_t offset = 0; + MSH_unpack(buffer, offset, stationList); + MSH_unpack(buffer, offset, rcuList); offset += readTime.unpack((char*)(buffer)+offset); offset += timeBefore.unpack((char*)(buffer)+offset); offset += timeAfter.unpack((char*)(buffer)+offset); diff --git a/MAC/APL/CR_Protocol/src/CRreadVector.cc b/MAC/APL/CR_Protocol/src/CRreadVector.cc index a51a933d7cc..a06f45e152c 100644 --- a/MAC/APL/CR_Protocol/src/CRreadVector.cc +++ b/MAC/APL/CR_Protocol/src/CRreadVector.cc @@ -43,35 +43,35 @@ ostream& CRreadVector::print (ostream& os) const // --- marshalling methods --- -unsigned int CRreadVector::getSize() +size_t CRreadVector::getSize() { - uint offset(sizeof(uint32)); - uint32 nrElems(requests.size()); + size_t offset(sizeof(uint32)); + uint32 nrElems(requests.size()); for (size_t i = 0; i < nrElems; i++) { offset += requests[i].getSize(); } return (offset); } -unsigned int CRreadVector::pack (void* buffer) +size_t CRreadVector::pack (char* buffer) const { - unsigned int offset(sizeof(uint32)); - uint32 nrElems(requests.size()); + size_t offset(sizeof(uint32)); + uint32 nrElems(requests.size()); memcpy(buffer, &nrElems, sizeof(uint32)); for (size_t i = 0; i < nrElems; i++) { - offset += requests[i].pack((char*)(buffer)+offset); + offset += requests[i].pack(buffer + offset); } return (offset); } -unsigned int CRreadVector::unpack(void *buffer) +size_t CRreadVector::unpack(const char *buffer) { - unsigned int offset(sizeof(uint32)); - uint32 nrElems; + size_t offset(sizeof(uint32)); + uint32 nrElems; memcpy(&nrElems, buffer, sizeof(uint32)); requests.resize(nrElems); for (size_t i = 0; i < nrElems; i++) { - offset += requests[i].unpack((char*)(buffer)+offset); + offset += requests[i].unpack(buffer + offset); } return (offset); } diff --git a/MAC/APL/CR_Protocol/src/CRrecordRequest.cc b/MAC/APL/CR_Protocol/src/CRrecordRequest.cc index d744f5d4bea..5630375bdb7 100644 --- a/MAC/APL/CR_Protocol/src/CRrecordRequest.cc +++ b/MAC/APL/CR_Protocol/src/CRrecordRequest.cc @@ -26,7 +26,7 @@ //# Includes #include <Common/LofarLogger.h> #include <APL/CR_Protocol/CRrecordRequest.h> -#include <MACIO/Marshalling.h> +#include <MACIO/Marshalling.tcc> namespace LOFAR { namespace CR_Protocol { @@ -40,24 +40,24 @@ ostream& CRrecordRequest::print (ostream& os) const // --- marshalling methods --- -unsigned int CRrecordRequest::getSize() +size_t CRrecordRequest::getSize() { - return(MSH_STRING_SIZE(stationList) + MSH_STRING_SIZE(rcuList)); + return(MSH_size(stationList) + MSH_size(rcuList)); } -unsigned int CRrecordRequest::pack (void* buffer) +size_t CRrecordRequest::pack (char* buffer) const { - unsigned int offset(0); - MSH_PACK_STRING(buffer, offset, stationList); - MSH_PACK_STRING(buffer, offset, rcuList); + size_t offset = 0; + MSH_pack(buffer, offset, stationList); + MSH_pack(buffer, offset, rcuList); return (offset); } -unsigned int CRrecordRequest::unpack(void *buffer) +size_t CRrecordRequest::unpack(const char *buffer) { - unsigned int offset(0); - MSH_UNPACK_STRING(buffer, offset, stationList); - MSH_UNPACK_STRING(buffer, offset, rcuList); + size_t offset = 0; + MSH_unpack(buffer, offset, stationList); + MSH_unpack(buffer, offset, rcuList); return (offset); } diff --git a/MAC/APL/CR_Protocol/src/CRrecordVector.cc b/MAC/APL/CR_Protocol/src/CRrecordVector.cc index 15525819696..e9423146f8f 100644 --- a/MAC/APL/CR_Protocol/src/CRrecordVector.cc +++ b/MAC/APL/CR_Protocol/src/CRrecordVector.cc @@ -43,35 +43,35 @@ ostream& CRrecordVector::print (ostream& os) const // --- marshalling methods --- -unsigned int CRrecordVector::getSize() +size_t CRrecordVector::getSize() { - uint offset(sizeof(uint32)); - uint32 nrElems(requests.size()); + size_t offset(sizeof(uint32)); + uint32 nrElems(requests.size()); for (size_t i = 0; i < nrElems; i++) { offset += requests[i].getSize(); } return (offset); } -unsigned int CRrecordVector::pack (void* buffer) +size_t CRrecordVector::pack (char* buffer) const { - unsigned int offset(sizeof(uint32)); - uint32 nrElems(requests.size()); + size_t offset(sizeof(uint32)); + uint32 nrElems(requests.size()); memcpy(buffer, &nrElems, sizeof(uint32)); for (size_t i = 0; i < nrElems; i++) { - offset += requests[i].pack((char*)(buffer)+offset); + offset += requests[i].pack(buffer + offset); } return (offset); } -unsigned int CRrecordVector::unpack(void *buffer) +size_t CRrecordVector::unpack(const char *buffer) { - unsigned int offset(sizeof(uint32)); - uint32 nrElems; + size_t offset(sizeof(uint32)); + uint32 nrElems; memcpy(&nrElems, buffer, sizeof(uint32)); requests.resize(nrElems); for (size_t i = 0; i < nrElems; i++) { - offset += requests[i].unpack((char*)(buffer)+offset); + offset += requests[i].unpack(buffer + offset); } return (offset); } diff --git a/MAC/APL/CR_Protocol/src/CRstopRequest.cc b/MAC/APL/CR_Protocol/src/CRstopRequest.cc index 034bb9dc404..c7197c1a651 100644 --- a/MAC/APL/CR_Protocol/src/CRstopRequest.cc +++ b/MAC/APL/CR_Protocol/src/CRstopRequest.cc @@ -26,7 +26,7 @@ //# Includes #include <Common/LofarLogger.h> #include <APL/CR_Protocol/CRstopRequest.h> -#include <MACIO/Marshalling.h> +#include <MACIO/Marshalling.tcc> namespace LOFAR { namespace CR_Protocol { @@ -40,26 +40,26 @@ ostream& CRstopRequest::print (ostream& os) const // --- marshalling methods --- -unsigned int CRstopRequest::getSize() +size_t CRstopRequest::getSize() { - return(MSH_STRING_SIZE(stationList) + MSH_STRING_SIZE(rcuList) + stopTime.getSize()); + return(MSH_size(stationList) + MSH_size(rcuList) + stopTime.getSize()); } -unsigned int CRstopRequest::pack (void* buffer) +size_t CRstopRequest::pack (char* buffer) const { - unsigned int offset(0); - MSH_PACK_STRING(buffer, offset, stationList); - MSH_PACK_STRING(buffer, offset, rcuList); - offset += stopTime.pack((char*)(buffer)+offset); + size_t offset = 0; + MSH_pack(buffer, offset, stationList); + MSH_pack(buffer, offset, rcuList); + offset += stopTime.pack(buffer + offset); return (offset); } - -unsigned int CRstopRequest::unpack(void *buffer) + +size_t CRstopRequest::unpack(const char *buffer) { - unsigned int offset(0); - MSH_UNPACK_STRING(buffer, offset, stationList); - MSH_UNPACK_STRING(buffer, offset, rcuList); - offset += stopTime.unpack((char*)(buffer)+offset); + size_t offset = 0; + MSH_unpack(buffer, offset, stationList); + MSH_unpack(buffer, offset, rcuList); + offset += stopTime.unpack(buffer + offset); return (offset); } diff --git a/MAC/APL/CR_Protocol/src/CRstopVector.cc b/MAC/APL/CR_Protocol/src/CRstopVector.cc index 7e27687c546..1cd817a7a73 100644 --- a/MAC/APL/CR_Protocol/src/CRstopVector.cc +++ b/MAC/APL/CR_Protocol/src/CRstopVector.cc @@ -43,20 +43,20 @@ ostream& CRstopVector::print (ostream& os) const // --- marshalling methods --- -unsigned int CRstopVector::getSize() +size_t CRstopVector::getSize() { - uint offset(sizeof(uint32)); - uint32 nrElems(requests.size()); + size_t offset(sizeof(uint32)); + uint32 nrElems(requests.size()); for (size_t i = 0; i < nrElems; i++) { offset += requests[i].getSize(); } return (offset); } -unsigned int CRstopVector::pack (void* buffer) +size_t CRstopVector::pack (void* buffer) { - unsigned int offset(sizeof(uint32)); - uint32 nrElems(requests.size()); + size_t offset(sizeof(uint32)); + uint32 nrElems(requests.size()); memcpy(buffer, &nrElems, sizeof(uint32)); for (size_t i = 0; i < nrElems; i++) { offset += requests[i].pack((char*)(buffer)+offset); @@ -64,10 +64,10 @@ unsigned int CRstopVector::pack (void* buffer) return (offset); } -unsigned int CRstopVector::unpack(void *buffer) +size_t CRstopVector::unpack(void *buffer) { - unsigned int offset(sizeof(uint32)); - uint32 nrElems; + size_t offset(sizeof(uint32)); + uint32 nrElems; memcpy(&nrElems, buffer, sizeof(uint32)); requests.resize(nrElems); for (size_t i = 0; i < nrElems; i++) { diff --git a/MAC/APL/CUDaemons/src/CTStartDaemon/startController.sh b/MAC/APL/CUDaemons/src/CTStartDaemon/startController.sh index ec8a9ae0cd0..adf013d325e 100755 --- a/MAC/APL/CUDaemons/src/CTStartDaemon/startController.sh +++ b/MAC/APL/CUDaemons/src/CTStartDaemon/startController.sh @@ -4,7 +4,7 @@ # # start process -($1 $2 $3 $4 1>/dev/null 2>&1 ) & +($1 $2 $3 $4 1>>"/opt/lofar/var/log/$2.stdout" 2>&1 ) & # get its pid # echo $! diff --git a/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/PVSSDatapointDefs.h b/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/PVSSDatapointDefs.h index cbd965ef734..9f83a52dda5 100644 --- a/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/PVSSDatapointDefs.h +++ b/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/PVSSDatapointDefs.h @@ -1,4 +1,4 @@ -// This file was generated by create_db_files v1.0 on Thu Mar 19 14:56:58 UTC 2009 +// This file was generated by create_db_files v2.0 on Tue Oct 9 13:22:37 UTC 2012 #ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H #define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H @@ -15,18 +15,6 @@ #define PN_OBJ_MESSAGE "object.message" #define PN_OBJ_LEAF "object.leaf" -// Station -#define PSN_STATION "LOFAR_PIC_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - -// Station -#define PSN_STATION "LOFAR_PermSW_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - // MACScheduler #define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" #define PST_MAC_SCHEDULER "MACScheduler" @@ -37,12 +25,15 @@ #define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" #define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" +// CRTriggerControl +#define PSN_CR_TRIGGER_CONTROL "LOFAR_PermSW_CRTriggerControl" +#define PST_CR_TRIGGER_CONTROL "CRTriggerControl" + // Observation #define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" #define PST_OBSERVATION "Observation" #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" -#define PN_OBS_RECEIVER_BITMAP "receiverBitmap" #define PN_OBS_CLAIM_PERIOD "claimPeriod" #define PN_OBS_PREPARE_PERIOD "preparePeriod" #define PN_OBS_START_TIME "startTime" @@ -54,6 +45,9 @@ #define PN_OBS_SAMPLE_CLOCK "sampleClock" #define PN_OBS_RUN_STATE "runState" #define PN_OBS_MEASUREMENT_SET "measurementSet" +#define PN_OBS_PROCESS_TYPE "processType" +#define PN_OBS_PROCESS_SUBTYPE "processSubtype" +#define PN_OBS_STRATEGY "strategy" #define PN_OBS_STATION_LIST "stationList" #define PN_OBS_INPUT_NODE_LIST "inputNodeList" #define PN_OBS_BGL_NODE_LIST "BGLNodeList" @@ -61,24 +55,88 @@ #define PN_OBS_BEAMS_ANGLE1 "Beams.angle1" #define PN_OBS_BEAMS_ANGLE2 "Beams.angle2" #define PN_OBS_BEAMS_DIRECTION_TYPE "Beams.directionType" -#define PN_OBS_BEAMS_BEAMLET_LIST "Beams.beamletList" #define PN_OBS_BEAMS_SUBBAND_LIST "Beams.subbandList" +#define PN_OBS_TIED_ARRAY_BEAMS_BEAM_INDEX "TiedArrayBeams.beamIndex" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE1 "TiedArrayBeams.angle1" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE2 "TiedArrayBeams.angle2" +#define PN_OBS_TIED_ARRAY_BEAMS_DIRECTION_TYPE "TiedArrayBeams.directionType" +#define PN_OBS_TIED_ARRAY_BEAMS_DISPERSION "TiedArrayBeams.dispersion" +#define PN_OBS_TIED_ARRAY_BEAMS_COHERENT "TiedArrayBeams.coherent" // ObservationControl #define PSN_OBSERVATION_CONTROL "LOFAR_ObsSW_@observation@_ObservationControl" #define PST_OBSERVATION_CONTROL "ObservationControl" +#define PN_OBSCTRL_COMMAND "command" + +// InputBuffer +#define PSN_INPUT_BUFFER "LOFAR_PermSW_@psionode@_InputBuffer" +#define PST_INPUT_BUFFER "InputBuffer" +#define PN_IPB_STATION_NAME "stationName" +#define PN_IPB_OBSERVATION_NAME "observationName" +#define PN_IPB_STREAM0_BLOCKS_IN "stream0.blocksIn" +#define PN_IPB_STREAM0_PERC_BAD "stream0.percBad" +#define PN_IPB_STREAM0_REJECTED "stream0.rejected" +#define PN_IPB_STREAM1_BLOCKS_IN "stream1.blocksIn" +#define PN_IPB_STREAM1_PERC_BAD "stream1.percBad" +#define PN_IPB_STREAM1_REJECTED "stream1.rejected" +#define PN_IPB_STREAM2_BLOCKS_IN "stream2.blocksIn" +#define PN_IPB_STREAM2_PERC_BAD "stream2.percBad" +#define PN_IPB_STREAM2_REJECTED "stream2.rejected" +#define PN_IPB_STREAM3_BLOCKS_IN "stream3.blocksIn" +#define PN_IPB_STREAM3_PERC_BAD "stream3.percBad" +#define PN_IPB_STREAM3_REJECTED "stream3.rejected" +#define PN_IPB_LATE "late" +#define PN_IPB_IO_TIME "IOTime" + +// Adder +#define PSN_ADDER "LOFAR_ObsSW_@osionode@_@adder@" +#define PST_ADDER "Adder" +#define PN_ADD_DROPPING "dropping" +#define PN_ADD_DROPPED "dropped" +#define PN_ADD_DATA_PRODUCT_TYPE "dataProductType" +#define PN_ADD_DATA_PRODUCT "dataProduct" +#define PN_ADD_FILE_NAME "fileName" +#define PN_ADD_LOCUS_NODE "locusNode" +#define PN_ADD_WRITER "writer" +#define PN_ADD_DIRECTORY "directory" +#define PN_ADD_OBSERVATION_NAME "observationName" -// OnlineControl -#define PSN_ONLINE_CONTROL "LOFAR_ObsSW_@observation@_OnlineControl" -#define PST_ONLINE_CONTROL "OnlineControl" +// Writer +#define PSN_WRITER "LOFAR_ObsSW_@oslocusnode@_@writer@" +#define PST_WRITER "Writer" +#define PN_WTR_WRITTEN "written" +#define PN_WTR_DROPPED "dropped" +#define PN_WTR_FILE_NAME "fileName" +#define PN_WTR_DATA_RATE "dataRate" +#define PN_WTR_DATA_PRODUCT_TYPE "dataProductType" +#define PN_WTR_OBSERVATION_NAME "observationName" -// Correlator -#define PSN_CORRELATOR "LOFAR_ObsSW_@observation@_OnlineControl_Correlator" -#define PST_CORRELATOR "Correlator" +// IONode +#define PSN_IO_NODE "LOFAR_PIC_BGP_@midplane@_@ionode@" +#define PST_IO_NODE "IONode" +#define PN_ION_STATION0 "station0" +#define PN_ION_IP0 "IP0" +#define PN_ION_MAC0 "MAC0" +#define PN_ION_STATION1 "station1" +#define PN_ION_IP1 "IP1" +#define PN_ION_MAC1 "MAC1" +#define PN_ION_USE2ND_STATION "use2ndStation" +#define PN_ION_USED_STATION "usedStation" +#define PN_ION_USEDIP "usedIP" +#define PN_ION_USEDMAC "usedMAC" -// StorageAppl -#define PSN_STORAGE_APPL "LOFAR_ObsSW_@observation@_OnlineControl_StorageAppl" -#define PST_STORAGE_APPL "StorageAppl" +// LocusNode +#define PSN_LOCUS_NODE "LOFAR_PIC_@osrack@_@locusnode@" +#define PST_LOCUS_NODE "LocusNode" +#define PN_LCN_FREE "free" +#define PN_LCN_TOTAL "total" +#define PN_LCN_CLAIMED "claimed" + +// CEPHardwareMonitor +#define PSN_CEP_HARDWARE_MONITOR "LOFAR_PermSW_CEPHardwareMonitor" +#define PST_CEP_HARDWARE_MONITOR "CEPHardwareMonitor" +#define PN_CHM_BGP_CONNECTED "BGP.connected" +#define PN_CHM_CLUSTER_CONNECTED "Cluster.connected" // Cabinet #define PSN_CABINET "LOFAR_PIC_@cabinet@" @@ -135,6 +193,8 @@ #define PN_RSP_VOLTAGE25 "voltage25" #define PN_RSP_VOLTAGE33 "voltage33" #define PN_RSP_VERSION "version" +#define PN_RSP_BITMODE "bitmode" +#define PN_RSP_BITMODE_CAPABILITY "bitmodeCapability" #define PN_RSP_ALERT "alert" #define PN_RSP_SPLITTER_ON "splitterOn" #define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" @@ -217,10 +277,15 @@ #define PN_RCU_TRIGGER_FILTER "Trigger.filter" #define PN_RCU_TRIGGER_WINDOW "Trigger.window" #define PN_RCU_TRIGGER_OPERATING_MODE "Trigger.operatingMode" -#define PN_RCU_TRIGGER_COEFF0 "Trigger.coeff0" -#define PN_RCU_TRIGGER_COEFF1 "Trigger.coeff1" -#define PN_RCU_TRIGGER_COEFF2 "Trigger.coeff2" -#define PN_RCU_TRIGGER_COEFF3 "Trigger.coeff3" +#define PN_RCU_TRIGGER_TRIGGER_MODE "Trigger.triggerMode" +#define PN_RCU_TRIGGER_FILTER0_COEFF0 "Trigger.filter0.coeff0" +#define PN_RCU_TRIGGER_FILTER0_COEFF1 "Trigger.filter0.coeff1" +#define PN_RCU_TRIGGER_FILTER0_COEFF2 "Trigger.filter0.coeff2" +#define PN_RCU_TRIGGER_FILTER0_COEFF3 "Trigger.filter0.coeff3" +#define PN_RCU_TRIGGER_FILTER1_COEFF0 "Trigger.filter1.coeff0" +#define PN_RCU_TRIGGER_FILTER1_COEFF1 "Trigger.filter1.coeff1" +#define PN_RCU_TRIGGER_FILTER1_COEFF2 "Trigger.filter1.coeff2" +#define PN_RCU_TRIGGER_FILTER1_COEFF3 "Trigger.filter1.coeff3" // TBBoard #define PSN_TB_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@" @@ -248,6 +313,62 @@ #define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" #define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" +// LBAAntenna +#define PSN_LBA_ANTENNA "LOFAR_PIC_@lbaantenna@" +#define PST_LBA_ANTENNA "LBAAntenna" + +// HBAAntenna +#define PSN_HBA_ANTENNA "LOFAR_PIC_@hbaantenna@" +#define PST_HBA_ANTENNA "HBAAntenna" + +// StationInfo +#define PSN_STATION_INFO "LOFAR_PIC_StationInfo" +#define PST_STATION_INFO "StationInfo" +#define PN_STI_STATIONID "stationID" +#define PN_STI_N_RSP_BOARDS "N_RSPBoards" +#define PN_STI_N_TB_BOARDS "N_TBBoards" +#define PN_STI_N_LBAS "N_LBAS" +#define PN_STI_N_HBAS "N_HBAS" +#define PN_STI_HBA__SPLIT "HBA_Split" +#define PN_STI_WIDE_LBAS "wide_LBAS" +#define PN_STI_POWER48_ON "power48On" +#define PN_STI_POWER220_ON "power220On" +#define PN_STI_CABINET_X "Cabinet.X" +#define PN_STI_CABINET_Y "Cabinet.Y" +#define PN_STI_CABINET_Z "Cabinet.Z" +#define PN_STI_HBA_CENTERX "HBA.centerX" +#define PN_STI_HBA_CENTERY "HBA.centerY" +#define PN_STI_HBA_CENTERZ "HBA.centerZ" +#define PN_STI_HBA_HBA0_CENTERX "HBA.HBA0.centerX" +#define PN_STI_HBA_HBA0_CENTERY "HBA.HBA0.centerY" +#define PN_STI_HBA_HBA0_CENTERZ "HBA.HBA0.centerZ" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_X "HBA.HBA0.NormalVector.X" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Y "HBA.HBA0.NormalVector.Y" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Z "HBA.HBA0.NormalVector.Z" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_X "HBA.HBA0.RotationMatrix.X" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Y "HBA.HBA0.RotationMatrix.Y" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Z "HBA.HBA0.RotationMatrix.Z" +#define PN_STI_HBA_HBA0_ROTATION "HBA.HBA0.rotation" +#define PN_STI_HBA_HBA1_CENTERX "HBA.HBA1.centerX" +#define PN_STI_HBA_HBA1_CENTERY "HBA.HBA1.centerY" +#define PN_STI_HBA_HBA1_CENTERZ "HBA.HBA1.centerZ" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_X "HBA.HBA1.NormalVector.X" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Y "HBA.HBA1.NormalVector.Y" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Z "HBA.HBA1.NormalVector.Z" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_X "HBA.HBA1.RotationMatrix.X" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Y "HBA.HBA1.RotationMatrix.Y" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Z "HBA.HBA1.RotationMatrix.Z" +#define PN_STI_HBA_HBA1_ROTATION "HBA.HBA1.rotation" +#define PN_STI_LBA_CENTERX "LBA.centerX" +#define PN_STI_LBA_CENTERY "LBA.centerY" +#define PN_STI_LBA_CENTERZ "LBA.centerZ" +#define PN_STI_LBA__NORMAL_VECTOR_X "LBA.NormalVector.X" +#define PN_STI_LBA__NORMAL_VECTOR_Y "LBA.NormalVector.Y" +#define PN_STI_LBA__NORMAL_VECTOR_Z "LBA.NormalVector.Z" +#define PN_STI_LBA__ROTATION_MATRIX_X "LBA.RotationMatrix.X" +#define PN_STI_LBA__ROTATION_MATRIX_Y "LBA.RotationMatrix.Y" +#define PN_STI_LBA__ROTATION_MATRIX_Z "LBA.RotationMatrix.Z" + // LogProcessor #define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" #define PST_LOG_PROCESSOR "LogProcessor" @@ -266,6 +387,7 @@ // SoftwareMonitor #define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" #define PST_SOFTWARE_MONITOR "SoftwareMonitor" +#define PN_SWM_SW_LEVEL "SWLevel" // SHMInfoServer #define PSN_SHM_INFO_SERVER "LOFAR_PermSW_SHMInfoServer" @@ -282,19 +404,8 @@ #define PN_CLC_CONNECTED "connected" #define PN_CLC_REQUESTED_CLOCK "requestedClock" #define PN_CLC_ACTUAL_CLOCK "actualClock" - -// Antenna -#define PSN_ANTENNA "@antenna@" -#define PST_ANTENNA "Antenna" -#define PN_ANT_STATUS_STATE "status.state" -#define PN_ANT_STATUS_CHILD_STATE "status.childState" -#define PN_ANT_STATUS_MESSAGE "status.message" -#define PN_ANT_STATUS_LEAF "status.leaf" -#define PN_ANT_RCUX "RCUX" -#define PN_ANT_RCUY "RCUY" -#define PN_ANT_DELTAX "deltaX" -#define PN_ANT_DELTAY "deltaY" -#define PN_ANT_DELTAH "deltaH" +#define PN_CLC_REQUESTED_BITMODE "requestedBitmode" +#define PN_CLC_ACTUAL_BITMODE "actualBitmode" // StnObservation #define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" @@ -302,6 +413,9 @@ #define PN_OBS_NAME "name" #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" +#define PN_OBS_RECEIVER_BITMAP "receiverBitmap" +#define PN_OBS_HBA_BITMAP "HBABitmap" +#define PN_OBS_LBA_BITMAP "LBABitmap" // BeamControl #define PSN_BEAM_CONTROL "LOFAR_ObsSW_@observation@_BeamControl" @@ -338,5 +452,6 @@ #define PN_TBC_TRIGGER_PEAK_VALUE "trigger.peakValue" #define PN_TBC_TRIGGER_FLAGS "trigger.flags" #define PN_TBC_TRIGGER_TABLE "trigger.table" +#define PN_TBC_TRIGGER_MISSED "trigger.missed" #endif diff --git a/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitor.cc b/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitor.cc index 332515fdc41..cd0b52641bd 100644 --- a/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitor.cc +++ b/MAC/APL/CURTDBDaemons/src/SoftwareMonitor/SoftwareMonitor.cc @@ -286,6 +286,7 @@ GCFEvent::TResult SoftwareMonitor::checkPrograms(GCFEvent& event, GCFPortInterfa int curLevel = system("swlevel >>/dev/null") >> 8; ASSERTSTR(curLevel >= 0, "Program 'swlevel' not in my execution path"); LOG_DEBUG_STR("Current level is " << curLevel); + itsOwnPropertySet->setValue(PN_SWM_SW_LEVEL, GCFPVInteger(curLevel)); // loop over the permanent processes and update their status in PVSS vector<Process>::iterator iter = itsPermProcs.begin(); diff --git a/MAC/APL/MainCU/src/CRTriggerControl/PVSSDatapointDefs.h b/MAC/APL/MainCU/src/CRTriggerControl/PVSSDatapointDefs.h index 5c125589922..9f83a52dda5 100644 --- a/MAC/APL/MainCU/src/CRTriggerControl/PVSSDatapointDefs.h +++ b/MAC/APL/MainCU/src/CRTriggerControl/PVSSDatapointDefs.h @@ -1,4 +1,4 @@ -// This file was generated by create_db_files v2.0 on Mon Jul 25 13:48:26 UTC 2011 +// This file was generated by create_db_files v2.0 on Tue Oct 9 13:22:37 UTC 2012 #ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H #define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H @@ -15,18 +15,6 @@ #define PN_OBJ_MESSAGE "object.message" #define PN_OBJ_LEAF "object.leaf" -// Station -#define PSN_STATION "LOFAR_PIC_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - -// Station -#define PSN_STATION "LOFAR_PermSW_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - // MACScheduler #define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" #define PST_MAC_SCHEDULER "MACScheduler" @@ -57,6 +45,9 @@ #define PN_OBS_SAMPLE_CLOCK "sampleClock" #define PN_OBS_RUN_STATE "runState" #define PN_OBS_MEASUREMENT_SET "measurementSet" +#define PN_OBS_PROCESS_TYPE "processType" +#define PN_OBS_PROCESS_SUBTYPE "processSubtype" +#define PN_OBS_STRATEGY "strategy" #define PN_OBS_STATION_LIST "stationList" #define PN_OBS_INPUT_NODE_LIST "inputNodeList" #define PN_OBS_BGL_NODE_LIST "BGLNodeList" @@ -64,24 +55,24 @@ #define PN_OBS_BEAMS_ANGLE1 "Beams.angle1" #define PN_OBS_BEAMS_ANGLE2 "Beams.angle2" #define PN_OBS_BEAMS_DIRECTION_TYPE "Beams.directionType" -#define PN_OBS_BEAMS_BEAMLET_LIST "Beams.beamletList" #define PN_OBS_BEAMS_SUBBAND_LIST "Beams.subbandList" +#define PN_OBS_TIED_ARRAY_BEAMS_BEAM_INDEX "TiedArrayBeams.beamIndex" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE1 "TiedArrayBeams.angle1" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE2 "TiedArrayBeams.angle2" +#define PN_OBS_TIED_ARRAY_BEAMS_DIRECTION_TYPE "TiedArrayBeams.directionType" +#define PN_OBS_TIED_ARRAY_BEAMS_DISPERSION "TiedArrayBeams.dispersion" +#define PN_OBS_TIED_ARRAY_BEAMS_COHERENT "TiedArrayBeams.coherent" // ObservationControl #define PSN_OBSERVATION_CONTROL "LOFAR_ObsSW_@observation@_ObservationControl" #define PST_OBSERVATION_CONTROL "ObservationControl" - -// Adder -#define PSN_ADDER "@adder@" -#define PST_ADDER "Adder" -#define PN_ADD_DROPPING "dropping" -#define PN_ADD_NR_BLOCKS_DROPPED "nrBlocksDropped" -#define PN_ADD_LOG_LINE "logLine" +#define PN_OBSCTRL_COMMAND "command" // InputBuffer -#define PSN_INPUT_BUFFER "@inputbuffer@" +#define PSN_INPUT_BUFFER "LOFAR_PermSW_@psionode@_InputBuffer" #define PST_INPUT_BUFFER "InputBuffer" #define PN_IPB_STATION_NAME "stationName" +#define PN_IPB_OBSERVATION_NAME "observationName" #define PN_IPB_STREAM0_BLOCKS_IN "stream0.blocksIn" #define PN_IPB_STREAM0_PERC_BAD "stream0.percBad" #define PN_IPB_STREAM0_REJECTED "stream0.rejected" @@ -97,12 +88,55 @@ #define PN_IPB_LATE "late" #define PN_IPB_IO_TIME "IOTime" -// Storage -#define PSN_STORAGE "@storage@" -#define PST_STORAGE "Storage" -#define PN_STR_TIME "time" -#define PN_STR_COUNT "count" -#define PN_STR_DROPPED "dropped" +// Adder +#define PSN_ADDER "LOFAR_ObsSW_@osionode@_@adder@" +#define PST_ADDER "Adder" +#define PN_ADD_DROPPING "dropping" +#define PN_ADD_DROPPED "dropped" +#define PN_ADD_DATA_PRODUCT_TYPE "dataProductType" +#define PN_ADD_DATA_PRODUCT "dataProduct" +#define PN_ADD_FILE_NAME "fileName" +#define PN_ADD_LOCUS_NODE "locusNode" +#define PN_ADD_WRITER "writer" +#define PN_ADD_DIRECTORY "directory" +#define PN_ADD_OBSERVATION_NAME "observationName" + +// Writer +#define PSN_WRITER "LOFAR_ObsSW_@oslocusnode@_@writer@" +#define PST_WRITER "Writer" +#define PN_WTR_WRITTEN "written" +#define PN_WTR_DROPPED "dropped" +#define PN_WTR_FILE_NAME "fileName" +#define PN_WTR_DATA_RATE "dataRate" +#define PN_WTR_DATA_PRODUCT_TYPE "dataProductType" +#define PN_WTR_OBSERVATION_NAME "observationName" + +// IONode +#define PSN_IO_NODE "LOFAR_PIC_BGP_@midplane@_@ionode@" +#define PST_IO_NODE "IONode" +#define PN_ION_STATION0 "station0" +#define PN_ION_IP0 "IP0" +#define PN_ION_MAC0 "MAC0" +#define PN_ION_STATION1 "station1" +#define PN_ION_IP1 "IP1" +#define PN_ION_MAC1 "MAC1" +#define PN_ION_USE2ND_STATION "use2ndStation" +#define PN_ION_USED_STATION "usedStation" +#define PN_ION_USEDIP "usedIP" +#define PN_ION_USEDMAC "usedMAC" + +// LocusNode +#define PSN_LOCUS_NODE "LOFAR_PIC_@osrack@_@locusnode@" +#define PST_LOCUS_NODE "LocusNode" +#define PN_LCN_FREE "free" +#define PN_LCN_TOTAL "total" +#define PN_LCN_CLAIMED "claimed" + +// CEPHardwareMonitor +#define PSN_CEP_HARDWARE_MONITOR "LOFAR_PermSW_CEPHardwareMonitor" +#define PST_CEP_HARDWARE_MONITOR "CEPHardwareMonitor" +#define PN_CHM_BGP_CONNECTED "BGP.connected" +#define PN_CHM_CLUSTER_CONNECTED "Cluster.connected" // Cabinet #define PSN_CABINET "LOFAR_PIC_@cabinet@" @@ -159,6 +193,8 @@ #define PN_RSP_VOLTAGE25 "voltage25" #define PN_RSP_VOLTAGE33 "voltage33" #define PN_RSP_VERSION "version" +#define PN_RSP_BITMODE "bitmode" +#define PN_RSP_BITMODE_CAPABILITY "bitmodeCapability" #define PN_RSP_ALERT "alert" #define PN_RSP_SPLITTER_ON "splitterOn" #define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" @@ -277,6 +313,62 @@ #define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" #define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" +// LBAAntenna +#define PSN_LBA_ANTENNA "LOFAR_PIC_@lbaantenna@" +#define PST_LBA_ANTENNA "LBAAntenna" + +// HBAAntenna +#define PSN_HBA_ANTENNA "LOFAR_PIC_@hbaantenna@" +#define PST_HBA_ANTENNA "HBAAntenna" + +// StationInfo +#define PSN_STATION_INFO "LOFAR_PIC_StationInfo" +#define PST_STATION_INFO "StationInfo" +#define PN_STI_STATIONID "stationID" +#define PN_STI_N_RSP_BOARDS "N_RSPBoards" +#define PN_STI_N_TB_BOARDS "N_TBBoards" +#define PN_STI_N_LBAS "N_LBAS" +#define PN_STI_N_HBAS "N_HBAS" +#define PN_STI_HBA__SPLIT "HBA_Split" +#define PN_STI_WIDE_LBAS "wide_LBAS" +#define PN_STI_POWER48_ON "power48On" +#define PN_STI_POWER220_ON "power220On" +#define PN_STI_CABINET_X "Cabinet.X" +#define PN_STI_CABINET_Y "Cabinet.Y" +#define PN_STI_CABINET_Z "Cabinet.Z" +#define PN_STI_HBA_CENTERX "HBA.centerX" +#define PN_STI_HBA_CENTERY "HBA.centerY" +#define PN_STI_HBA_CENTERZ "HBA.centerZ" +#define PN_STI_HBA_HBA0_CENTERX "HBA.HBA0.centerX" +#define PN_STI_HBA_HBA0_CENTERY "HBA.HBA0.centerY" +#define PN_STI_HBA_HBA0_CENTERZ "HBA.HBA0.centerZ" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_X "HBA.HBA0.NormalVector.X" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Y "HBA.HBA0.NormalVector.Y" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Z "HBA.HBA0.NormalVector.Z" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_X "HBA.HBA0.RotationMatrix.X" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Y "HBA.HBA0.RotationMatrix.Y" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Z "HBA.HBA0.RotationMatrix.Z" +#define PN_STI_HBA_HBA0_ROTATION "HBA.HBA0.rotation" +#define PN_STI_HBA_HBA1_CENTERX "HBA.HBA1.centerX" +#define PN_STI_HBA_HBA1_CENTERY "HBA.HBA1.centerY" +#define PN_STI_HBA_HBA1_CENTERZ "HBA.HBA1.centerZ" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_X "HBA.HBA1.NormalVector.X" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Y "HBA.HBA1.NormalVector.Y" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Z "HBA.HBA1.NormalVector.Z" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_X "HBA.HBA1.RotationMatrix.X" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Y "HBA.HBA1.RotationMatrix.Y" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Z "HBA.HBA1.RotationMatrix.Z" +#define PN_STI_HBA_HBA1_ROTATION "HBA.HBA1.rotation" +#define PN_STI_LBA_CENTERX "LBA.centerX" +#define PN_STI_LBA_CENTERY "LBA.centerY" +#define PN_STI_LBA_CENTERZ "LBA.centerZ" +#define PN_STI_LBA__NORMAL_VECTOR_X "LBA.NormalVector.X" +#define PN_STI_LBA__NORMAL_VECTOR_Y "LBA.NormalVector.Y" +#define PN_STI_LBA__NORMAL_VECTOR_Z "LBA.NormalVector.Z" +#define PN_STI_LBA__ROTATION_MATRIX_X "LBA.RotationMatrix.X" +#define PN_STI_LBA__ROTATION_MATRIX_Y "LBA.RotationMatrix.Y" +#define PN_STI_LBA__ROTATION_MATRIX_Z "LBA.RotationMatrix.Z" + // LogProcessor #define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" #define PST_LOG_PROCESSOR "LogProcessor" @@ -295,6 +387,7 @@ // SoftwareMonitor #define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" #define PST_SOFTWARE_MONITOR "SoftwareMonitor" +#define PN_SWM_SW_LEVEL "SWLevel" // SHMInfoServer #define PSN_SHM_INFO_SERVER "LOFAR_PermSW_SHMInfoServer" @@ -311,19 +404,8 @@ #define PN_CLC_CONNECTED "connected" #define PN_CLC_REQUESTED_CLOCK "requestedClock" #define PN_CLC_ACTUAL_CLOCK "actualClock" - -// Antenna -#define PSN_ANTENNA "@antenna@" -#define PST_ANTENNA "Antenna" -#define PN_ANT_STATUS_STATE "status.state" -#define PN_ANT_STATUS_CHILD_STATE "status.childState" -#define PN_ANT_STATUS_MESSAGE "status.message" -#define PN_ANT_STATUS_LEAF "status.leaf" -#define PN_ANT_RCUX "RCUX" -#define PN_ANT_RCUY "RCUY" -#define PN_ANT_DELTAX "deltaX" -#define PN_ANT_DELTAY "deltaY" -#define PN_ANT_DELTAZ "deltaZ" +#define PN_CLC_REQUESTED_BITMODE "requestedBitmode" +#define PN_CLC_ACTUAL_BITMODE "actualBitmode" // StnObservation #define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" @@ -332,6 +414,8 @@ #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" #define PN_OBS_RECEIVER_BITMAP "receiverBitmap" +#define PN_OBS_HBA_BITMAP "HBABitmap" +#define PN_OBS_LBA_BITMAP "LBABitmap" // BeamControl #define PSN_BEAM_CONTROL "LOFAR_ObsSW_@observation@_BeamControl" diff --git a/MAC/APL/MainCU/src/MACScheduler/ObsClaimer.cc b/MAC/APL/MainCU/src/MACScheduler/ObsClaimer.cc index 15e7649bf3d..04de8f94a76 100644 --- a/MAC/APL/MainCU/src/MACScheduler/ObsClaimer.cc +++ b/MAC/APL/MainCU/src/MACScheduler/ObsClaimer.cc @@ -244,6 +244,11 @@ GCFEvent::TResult ObsClaimer::preparePVSS_state (GCFEvent& event, GCFPortInterfa theObsPS->setValue(PN_OBS_ANTENNA_ARRAY, GCFPVString (theObs.antennaArray), 0.0, false); theObsPS->setValue(PN_OBS_RECEIVER_LIST, GCFPVString (theObs.receiverList), 0.0, false); theObsPS->setValue(PN_OBS_SAMPLE_CLOCK, GCFPVInteger(theObs.sampleClock), 0.0, false); + + theObsPS->setValue(PN_OBS_PROCESS_TYPE, GCFPVString(theObs.processType), 0.0, false); + theObsPS->setValue(PN_OBS_PROCESS_SUBTYPE, GCFPVString(theObs.processSubtype), 0.0, false); + theObsPS->setValue(PN_OBS_STRATEGY, GCFPVString(theObs.strategy), 0.0, false); + stringstream osl; writeVector(osl, theObs.stations); theObsPS->setValue(PN_OBS_STATION_LIST, GCFPVString (osl.str()), 0.0, false); diff --git a/MAC/APL/MainCU/src/MACScheduler/PVSSDatapointDefs.h b/MAC/APL/MainCU/src/MACScheduler/PVSSDatapointDefs.h index ab7de2a6630..9f83a52dda5 100644 --- a/MAC/APL/MainCU/src/MACScheduler/PVSSDatapointDefs.h +++ b/MAC/APL/MainCU/src/MACScheduler/PVSSDatapointDefs.h @@ -1,4 +1,4 @@ -// This file was generated by create_db_files v2.0 on Fri Jan 13 13:20:29 UTC 2012 +// This file was generated by create_db_files v2.0 on Tue Oct 9 13:22:37 UTC 2012 #ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H #define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H @@ -15,18 +15,6 @@ #define PN_OBJ_MESSAGE "object.message" #define PN_OBJ_LEAF "object.leaf" -// Station -#define PSN_STATION "LOFAR_PIC_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - -// Station -#define PSN_STATION "LOFAR_PermSW_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - // MACScheduler #define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" #define PST_MAC_SCHEDULER "MACScheduler" @@ -37,6 +25,10 @@ #define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" #define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" +// CRTriggerControl +#define PSN_CR_TRIGGER_CONTROL "LOFAR_PermSW_CRTriggerControl" +#define PST_CR_TRIGGER_CONTROL "CRTriggerControl" + // Observation #define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" #define PST_OBSERVATION "Observation" @@ -53,6 +45,9 @@ #define PN_OBS_SAMPLE_CLOCK "sampleClock" #define PN_OBS_RUN_STATE "runState" #define PN_OBS_MEASUREMENT_SET "measurementSet" +#define PN_OBS_PROCESS_TYPE "processType" +#define PN_OBS_PROCESS_SUBTYPE "processSubtype" +#define PN_OBS_STRATEGY "strategy" #define PN_OBS_STATION_LIST "stationList" #define PN_OBS_INPUT_NODE_LIST "inputNodeList" #define PN_OBS_BGL_NODE_LIST "BGLNodeList" @@ -60,7 +55,6 @@ #define PN_OBS_BEAMS_ANGLE1 "Beams.angle1" #define PN_OBS_BEAMS_ANGLE2 "Beams.angle2" #define PN_OBS_BEAMS_DIRECTION_TYPE "Beams.directionType" -#define PN_OBS_BEAMS_BEAMLET_LIST "Beams.beamletList" #define PN_OBS_BEAMS_SUBBAND_LIST "Beams.subbandList" #define PN_OBS_TIED_ARRAY_BEAMS_BEAM_INDEX "TiedArrayBeams.beamIndex" #define PN_OBS_TIED_ARRAY_BEAMS_ANGLE1 "TiedArrayBeams.angle1" @@ -72,22 +66,13 @@ // ObservationControl #define PSN_OBSERVATION_CONTROL "LOFAR_ObsSW_@observation@_ObservationControl" #define PST_OBSERVATION_CONTROL "ObservationControl" - -// Adder -#define PSN_ADDER "@adder@" -#define PST_ADDER "Adder" -#define PN_ADD_DROPPING "dropping" -#define PN_ADD_NR_BLOCKS_DROPPED "nrBlocksDropped" -#define PN_ADD_DATA_PRODUCT_TYPE "dataProductType" -#define PN_ADD_FILE_NAME "fileName" -#define PN_ADD_STORAGE_NODE "storageNode" -#define PN_ADD_DIRECTORY "directory" -#define PN_ADD_OBSERVATION_NAME "observationName" +#define PN_OBSCTRL_COMMAND "command" // InputBuffer -#define PSN_INPUT_BUFFER "@inputbuffer@" +#define PSN_INPUT_BUFFER "LOFAR_PermSW_@psionode@_InputBuffer" #define PST_INPUT_BUFFER "InputBuffer" #define PN_IPB_STATION_NAME "stationName" +#define PN_IPB_OBSERVATION_NAME "observationName" #define PN_IPB_STREAM0_BLOCKS_IN "stream0.blocksIn" #define PN_IPB_STREAM0_PERC_BAD "stream0.percBad" #define PN_IPB_STREAM0_REJECTED "stream0.rejected" @@ -103,12 +88,55 @@ #define PN_IPB_LATE "late" #define PN_IPB_IO_TIME "IOTime" -// Storage -#define PSN_STORAGE "@storage@" -#define PST_STORAGE "Storage" -#define PN_STR_TIME "time" -#define PN_STR_COUNT "count" -#define PN_STR_DROPPED "dropped" +// Adder +#define PSN_ADDER "LOFAR_ObsSW_@osionode@_@adder@" +#define PST_ADDER "Adder" +#define PN_ADD_DROPPING "dropping" +#define PN_ADD_DROPPED "dropped" +#define PN_ADD_DATA_PRODUCT_TYPE "dataProductType" +#define PN_ADD_DATA_PRODUCT "dataProduct" +#define PN_ADD_FILE_NAME "fileName" +#define PN_ADD_LOCUS_NODE "locusNode" +#define PN_ADD_WRITER "writer" +#define PN_ADD_DIRECTORY "directory" +#define PN_ADD_OBSERVATION_NAME "observationName" + +// Writer +#define PSN_WRITER "LOFAR_ObsSW_@oslocusnode@_@writer@" +#define PST_WRITER "Writer" +#define PN_WTR_WRITTEN "written" +#define PN_WTR_DROPPED "dropped" +#define PN_WTR_FILE_NAME "fileName" +#define PN_WTR_DATA_RATE "dataRate" +#define PN_WTR_DATA_PRODUCT_TYPE "dataProductType" +#define PN_WTR_OBSERVATION_NAME "observationName" + +// IONode +#define PSN_IO_NODE "LOFAR_PIC_BGP_@midplane@_@ionode@" +#define PST_IO_NODE "IONode" +#define PN_ION_STATION0 "station0" +#define PN_ION_IP0 "IP0" +#define PN_ION_MAC0 "MAC0" +#define PN_ION_STATION1 "station1" +#define PN_ION_IP1 "IP1" +#define PN_ION_MAC1 "MAC1" +#define PN_ION_USE2ND_STATION "use2ndStation" +#define PN_ION_USED_STATION "usedStation" +#define PN_ION_USEDIP "usedIP" +#define PN_ION_USEDMAC "usedMAC" + +// LocusNode +#define PSN_LOCUS_NODE "LOFAR_PIC_@osrack@_@locusnode@" +#define PST_LOCUS_NODE "LocusNode" +#define PN_LCN_FREE "free" +#define PN_LCN_TOTAL "total" +#define PN_LCN_CLAIMED "claimed" + +// CEPHardwareMonitor +#define PSN_CEP_HARDWARE_MONITOR "LOFAR_PermSW_CEPHardwareMonitor" +#define PST_CEP_HARDWARE_MONITOR "CEPHardwareMonitor" +#define PN_CHM_BGP_CONNECTED "BGP.connected" +#define PN_CHM_CLUSTER_CONNECTED "Cluster.connected" // Cabinet #define PSN_CABINET "LOFAR_PIC_@cabinet@" @@ -165,6 +193,8 @@ #define PN_RSP_VOLTAGE25 "voltage25" #define PN_RSP_VOLTAGE33 "voltage33" #define PN_RSP_VERSION "version" +#define PN_RSP_BITMODE "bitmode" +#define PN_RSP_BITMODE_CAPABILITY "bitmodeCapability" #define PN_RSP_ALERT "alert" #define PN_RSP_SPLITTER_ON "splitterOn" #define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" @@ -283,6 +313,62 @@ #define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" #define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" +// LBAAntenna +#define PSN_LBA_ANTENNA "LOFAR_PIC_@lbaantenna@" +#define PST_LBA_ANTENNA "LBAAntenna" + +// HBAAntenna +#define PSN_HBA_ANTENNA "LOFAR_PIC_@hbaantenna@" +#define PST_HBA_ANTENNA "HBAAntenna" + +// StationInfo +#define PSN_STATION_INFO "LOFAR_PIC_StationInfo" +#define PST_STATION_INFO "StationInfo" +#define PN_STI_STATIONID "stationID" +#define PN_STI_N_RSP_BOARDS "N_RSPBoards" +#define PN_STI_N_TB_BOARDS "N_TBBoards" +#define PN_STI_N_LBAS "N_LBAS" +#define PN_STI_N_HBAS "N_HBAS" +#define PN_STI_HBA__SPLIT "HBA_Split" +#define PN_STI_WIDE_LBAS "wide_LBAS" +#define PN_STI_POWER48_ON "power48On" +#define PN_STI_POWER220_ON "power220On" +#define PN_STI_CABINET_X "Cabinet.X" +#define PN_STI_CABINET_Y "Cabinet.Y" +#define PN_STI_CABINET_Z "Cabinet.Z" +#define PN_STI_HBA_CENTERX "HBA.centerX" +#define PN_STI_HBA_CENTERY "HBA.centerY" +#define PN_STI_HBA_CENTERZ "HBA.centerZ" +#define PN_STI_HBA_HBA0_CENTERX "HBA.HBA0.centerX" +#define PN_STI_HBA_HBA0_CENTERY "HBA.HBA0.centerY" +#define PN_STI_HBA_HBA0_CENTERZ "HBA.HBA0.centerZ" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_X "HBA.HBA0.NormalVector.X" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Y "HBA.HBA0.NormalVector.Y" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Z "HBA.HBA0.NormalVector.Z" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_X "HBA.HBA0.RotationMatrix.X" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Y "HBA.HBA0.RotationMatrix.Y" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Z "HBA.HBA0.RotationMatrix.Z" +#define PN_STI_HBA_HBA0_ROTATION "HBA.HBA0.rotation" +#define PN_STI_HBA_HBA1_CENTERX "HBA.HBA1.centerX" +#define PN_STI_HBA_HBA1_CENTERY "HBA.HBA1.centerY" +#define PN_STI_HBA_HBA1_CENTERZ "HBA.HBA1.centerZ" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_X "HBA.HBA1.NormalVector.X" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Y "HBA.HBA1.NormalVector.Y" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Z "HBA.HBA1.NormalVector.Z" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_X "HBA.HBA1.RotationMatrix.X" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Y "HBA.HBA1.RotationMatrix.Y" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Z "HBA.HBA1.RotationMatrix.Z" +#define PN_STI_HBA_HBA1_ROTATION "HBA.HBA1.rotation" +#define PN_STI_LBA_CENTERX "LBA.centerX" +#define PN_STI_LBA_CENTERY "LBA.centerY" +#define PN_STI_LBA_CENTERZ "LBA.centerZ" +#define PN_STI_LBA__NORMAL_VECTOR_X "LBA.NormalVector.X" +#define PN_STI_LBA__NORMAL_VECTOR_Y "LBA.NormalVector.Y" +#define PN_STI_LBA__NORMAL_VECTOR_Z "LBA.NormalVector.Z" +#define PN_STI_LBA__ROTATION_MATRIX_X "LBA.RotationMatrix.X" +#define PN_STI_LBA__ROTATION_MATRIX_Y "LBA.RotationMatrix.Y" +#define PN_STI_LBA__ROTATION_MATRIX_Z "LBA.RotationMatrix.Z" + // LogProcessor #define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" #define PST_LOG_PROCESSOR "LogProcessor" @@ -301,6 +387,7 @@ // SoftwareMonitor #define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" #define PST_SOFTWARE_MONITOR "SoftwareMonitor" +#define PN_SWM_SW_LEVEL "SWLevel" // SHMInfoServer #define PSN_SHM_INFO_SERVER "LOFAR_PermSW_SHMInfoServer" @@ -317,19 +404,8 @@ #define PN_CLC_CONNECTED "connected" #define PN_CLC_REQUESTED_CLOCK "requestedClock" #define PN_CLC_ACTUAL_CLOCK "actualClock" - -// Antenna -#define PSN_ANTENNA "@antenna@" -#define PST_ANTENNA "Antenna" -#define PN_ANT_STATUS_STATE "status.state" -#define PN_ANT_STATUS_CHILD_STATE "status.childState" -#define PN_ANT_STATUS_MESSAGE "status.message" -#define PN_ANT_STATUS_LEAF "status.leaf" -#define PN_ANT_RCUX "RCUX" -#define PN_ANT_RCUY "RCUY" -#define PN_ANT_DELTAX "deltaX" -#define PN_ANT_DELTAY "deltaY" -#define PN_ANT_DELTAZ "deltaZ" +#define PN_CLC_REQUESTED_BITMODE "requestedBitmode" +#define PN_CLC_ACTUAL_BITMODE "actualBitmode" // StnObservation #define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" @@ -338,6 +414,8 @@ #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" #define PN_OBS_RECEIVER_BITMAP "receiverBitmap" +#define PN_OBS_HBA_BITMAP "HBABitmap" +#define PN_OBS_LBA_BITMAP "LBABitmap" // BeamControl #define PSN_BEAM_CONTROL "LOFAR_ObsSW_@observation@_BeamControl" diff --git a/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc b/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc index 01ee0d27d86..2a168081b57 100644 --- a/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc +++ b/MAC/APL/MainCU/src/ObservationControl/ObservationControl.cc @@ -165,7 +165,7 @@ ObservationControl::~ObservationControl() // void ObservationControl::sigintHandler(int signum) { - LOG_DEBUG (formatString("SIGINT signal detected (%d)",signum)); + LOG_WARN (formatString("SIGINT signal detected (%d)",signum)); // Note we can't call TRAN here because the siginthandler does not know our object. if (thisObservationControl) { @@ -479,6 +479,10 @@ GCFEvent::TResult ObservationControl::active_state(GCFEvent& event, GCFPortInter // reschedule forced-quit timer for safety. itsTimerPort->cancelTimer(itsForcedQuitTimer); itsForcedQuitTimer = itsTimerPort->setTimer(1.0 * itsForcedQuitDelay); + // cancel all other timers in case premature quit was requested. + itsTimerPort->cancelTimer(itsStartTimer); + itsTimerPort->cancelTimer(itsPrepareTimer); + itsTimerPort->cancelTimer(itsClaimTimer); } else if (timerEvent.id == itsForcedQuitTimer) { LOG_WARN("QUITING BEFORE ALL CHILDREN DIED."); @@ -596,6 +600,8 @@ GCFEvent::TResult ObservationControl::finishing_state(GCFEvent& event, // first turn off 'old' timers itsTimerPort->cancelTimer(itsForcedQuitTimer); itsTimerPort->cancelTimer(itsStopTimer); + itsStopTimer = 0; + itsForcedQuitTimer = 0; // tell Parent task we like to go down. itsParentControl->nowInState(getName(), CTState::QUIT); @@ -647,8 +653,7 @@ void ObservationControl::setObservationTimers(double minimalDelay) itsTimerPort->cancelTimer(itsStartTimer); itsTimerPort->cancelTimer(itsStopTimer); itsTimerPort->cancelTimer(itsForcedQuitTimer); - itsClaimTimer = itsPrepareTimer = itsStartTimer = - itsStopTimer = itsForcedQuitTimer = 0; + itsClaimTimer = itsPrepareTimer = itsStartTimer = itsStopTimer = itsForcedQuitTimer = 0; // recalc new intervals int32 sec2claim = start - now - itsPreparePeriod - itsClaimPeriod; @@ -745,6 +750,7 @@ void ObservationControl::doHeartBeatTask() if (nrChilds != itsNrControllers) { LOG_WARN_STR("Only " << nrChilds << " out of " << itsNrControllers << " controllers still available."); // if no more children left while we are not in the quit-phase + uint32 nrStations = itsChildControl->countChilds(0, CNTLRTYPE_STATIONCTRL); time_t now = to_time_t(second_clock::universal_time()); time_t stop = to_time_t(itsStopTime); if (now < stop && itsProcessType == "Observation" && itsChildControl->countChilds(0, CNTLRTYPE_STATIONCTRL)==0) { diff --git a/MAC/APL/MainCU/src/ObservationControl/PVSSDatapointDefs.h b/MAC/APL/MainCU/src/ObservationControl/PVSSDatapointDefs.h index 0b0b6d33ec3..9f83a52dda5 100644 --- a/MAC/APL/MainCU/src/ObservationControl/PVSSDatapointDefs.h +++ b/MAC/APL/MainCU/src/ObservationControl/PVSSDatapointDefs.h @@ -1,4 +1,4 @@ -// This file was generated by create_db_files v2.0 on Tue Sep 8 12:34:54 UTC 2009 +// This file was generated by create_db_files v2.0 on Tue Oct 9 13:22:37 UTC 2012 #ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H #define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H @@ -15,18 +15,6 @@ #define PN_OBJ_MESSAGE "object.message" #define PN_OBJ_LEAF "object.leaf" -// Station -#define PSN_STATION "LOFAR_PIC_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - -// Station -#define PSN_STATION "LOFAR_PermSW_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - // MACScheduler #define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" #define PST_MAC_SCHEDULER "MACScheduler" @@ -37,6 +25,10 @@ #define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" #define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" +// CRTriggerControl +#define PSN_CR_TRIGGER_CONTROL "LOFAR_PermSW_CRTriggerControl" +#define PST_CR_TRIGGER_CONTROL "CRTriggerControl" + // Observation #define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" #define PST_OBSERVATION "Observation" @@ -53,6 +45,9 @@ #define PN_OBS_SAMPLE_CLOCK "sampleClock" #define PN_OBS_RUN_STATE "runState" #define PN_OBS_MEASUREMENT_SET "measurementSet" +#define PN_OBS_PROCESS_TYPE "processType" +#define PN_OBS_PROCESS_SUBTYPE "processSubtype" +#define PN_OBS_STRATEGY "strategy" #define PN_OBS_STATION_LIST "stationList" #define PN_OBS_INPUT_NODE_LIST "inputNodeList" #define PN_OBS_BGL_NODE_LIST "BGLNodeList" @@ -60,25 +55,24 @@ #define PN_OBS_BEAMS_ANGLE1 "Beams.angle1" #define PN_OBS_BEAMS_ANGLE2 "Beams.angle2" #define PN_OBS_BEAMS_DIRECTION_TYPE "Beams.directionType" -#define PN_OBS_BEAMS_BEAMLET_LIST "Beams.beamletList" #define PN_OBS_BEAMS_SUBBAND_LIST "Beams.subbandList" +#define PN_OBS_TIED_ARRAY_BEAMS_BEAM_INDEX "TiedArrayBeams.beamIndex" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE1 "TiedArrayBeams.angle1" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE2 "TiedArrayBeams.angle2" +#define PN_OBS_TIED_ARRAY_BEAMS_DIRECTION_TYPE "TiedArrayBeams.directionType" +#define PN_OBS_TIED_ARRAY_BEAMS_DISPERSION "TiedArrayBeams.dispersion" +#define PN_OBS_TIED_ARRAY_BEAMS_COHERENT "TiedArrayBeams.coherent" // ObservationControl #define PSN_OBSERVATION_CONTROL "LOFAR_ObsSW_@observation@_ObservationControl" #define PST_OBSERVATION_CONTROL "ObservationControl" #define PN_OBSCTRL_COMMAND "command" -// Adder -#define PSN_ADDER "@adder@" -#define PST_ADDER "Adder" -#define PN_ADD_DROPPING "dropping" -#define PN_ADD_NR_BLOCKS_DROPPED "nrBlocksDropped" -#define PN_ADD_LOG_LINE "logLine" - // InputBuffer -#define PSN_INPUT_BUFFER "@inputbuffer@" +#define PSN_INPUT_BUFFER "LOFAR_PermSW_@psionode@_InputBuffer" #define PST_INPUT_BUFFER "InputBuffer" #define PN_IPB_STATION_NAME "stationName" +#define PN_IPB_OBSERVATION_NAME "observationName" #define PN_IPB_STREAM0_BLOCKS_IN "stream0.blocksIn" #define PN_IPB_STREAM0_PERC_BAD "stream0.percBad" #define PN_IPB_STREAM0_REJECTED "stream0.rejected" @@ -94,12 +88,55 @@ #define PN_IPB_LATE "late" #define PN_IPB_IO_TIME "IOTime" -// Storage -#define PSN_STORAGE "@storage@" -#define PST_STORAGE "Storage" -#define PN_STR_TIME "time" -#define PN_STR_COUNT "count" -#define PN_STR_DROPPED "dropped" +// Adder +#define PSN_ADDER "LOFAR_ObsSW_@osionode@_@adder@" +#define PST_ADDER "Adder" +#define PN_ADD_DROPPING "dropping" +#define PN_ADD_DROPPED "dropped" +#define PN_ADD_DATA_PRODUCT_TYPE "dataProductType" +#define PN_ADD_DATA_PRODUCT "dataProduct" +#define PN_ADD_FILE_NAME "fileName" +#define PN_ADD_LOCUS_NODE "locusNode" +#define PN_ADD_WRITER "writer" +#define PN_ADD_DIRECTORY "directory" +#define PN_ADD_OBSERVATION_NAME "observationName" + +// Writer +#define PSN_WRITER "LOFAR_ObsSW_@oslocusnode@_@writer@" +#define PST_WRITER "Writer" +#define PN_WTR_WRITTEN "written" +#define PN_WTR_DROPPED "dropped" +#define PN_WTR_FILE_NAME "fileName" +#define PN_WTR_DATA_RATE "dataRate" +#define PN_WTR_DATA_PRODUCT_TYPE "dataProductType" +#define PN_WTR_OBSERVATION_NAME "observationName" + +// IONode +#define PSN_IO_NODE "LOFAR_PIC_BGP_@midplane@_@ionode@" +#define PST_IO_NODE "IONode" +#define PN_ION_STATION0 "station0" +#define PN_ION_IP0 "IP0" +#define PN_ION_MAC0 "MAC0" +#define PN_ION_STATION1 "station1" +#define PN_ION_IP1 "IP1" +#define PN_ION_MAC1 "MAC1" +#define PN_ION_USE2ND_STATION "use2ndStation" +#define PN_ION_USED_STATION "usedStation" +#define PN_ION_USEDIP "usedIP" +#define PN_ION_USEDMAC "usedMAC" + +// LocusNode +#define PSN_LOCUS_NODE "LOFAR_PIC_@osrack@_@locusnode@" +#define PST_LOCUS_NODE "LocusNode" +#define PN_LCN_FREE "free" +#define PN_LCN_TOTAL "total" +#define PN_LCN_CLAIMED "claimed" + +// CEPHardwareMonitor +#define PSN_CEP_HARDWARE_MONITOR "LOFAR_PermSW_CEPHardwareMonitor" +#define PST_CEP_HARDWARE_MONITOR "CEPHardwareMonitor" +#define PN_CHM_BGP_CONNECTED "BGP.connected" +#define PN_CHM_CLUSTER_CONNECTED "Cluster.connected" // Cabinet #define PSN_CABINET "LOFAR_PIC_@cabinet@" @@ -156,6 +193,8 @@ #define PN_RSP_VOLTAGE25 "voltage25" #define PN_RSP_VOLTAGE33 "voltage33" #define PN_RSP_VERSION "version" +#define PN_RSP_BITMODE "bitmode" +#define PN_RSP_BITMODE_CAPABILITY "bitmodeCapability" #define PN_RSP_ALERT "alert" #define PN_RSP_SPLITTER_ON "splitterOn" #define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" @@ -238,10 +277,15 @@ #define PN_RCU_TRIGGER_FILTER "Trigger.filter" #define PN_RCU_TRIGGER_WINDOW "Trigger.window" #define PN_RCU_TRIGGER_OPERATING_MODE "Trigger.operatingMode" -#define PN_RCU_TRIGGER_COEFF0 "Trigger.coeff0" -#define PN_RCU_TRIGGER_COEFF1 "Trigger.coeff1" -#define PN_RCU_TRIGGER_COEFF2 "Trigger.coeff2" -#define PN_RCU_TRIGGER_COEFF3 "Trigger.coeff3" +#define PN_RCU_TRIGGER_TRIGGER_MODE "Trigger.triggerMode" +#define PN_RCU_TRIGGER_FILTER0_COEFF0 "Trigger.filter0.coeff0" +#define PN_RCU_TRIGGER_FILTER0_COEFF1 "Trigger.filter0.coeff1" +#define PN_RCU_TRIGGER_FILTER0_COEFF2 "Trigger.filter0.coeff2" +#define PN_RCU_TRIGGER_FILTER0_COEFF3 "Trigger.filter0.coeff3" +#define PN_RCU_TRIGGER_FILTER1_COEFF0 "Trigger.filter1.coeff0" +#define PN_RCU_TRIGGER_FILTER1_COEFF1 "Trigger.filter1.coeff1" +#define PN_RCU_TRIGGER_FILTER1_COEFF2 "Trigger.filter1.coeff2" +#define PN_RCU_TRIGGER_FILTER1_COEFF3 "Trigger.filter1.coeff3" // TBBoard #define PSN_TB_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@" @@ -269,6 +313,62 @@ #define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" #define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" +// LBAAntenna +#define PSN_LBA_ANTENNA "LOFAR_PIC_@lbaantenna@" +#define PST_LBA_ANTENNA "LBAAntenna" + +// HBAAntenna +#define PSN_HBA_ANTENNA "LOFAR_PIC_@hbaantenna@" +#define PST_HBA_ANTENNA "HBAAntenna" + +// StationInfo +#define PSN_STATION_INFO "LOFAR_PIC_StationInfo" +#define PST_STATION_INFO "StationInfo" +#define PN_STI_STATIONID "stationID" +#define PN_STI_N_RSP_BOARDS "N_RSPBoards" +#define PN_STI_N_TB_BOARDS "N_TBBoards" +#define PN_STI_N_LBAS "N_LBAS" +#define PN_STI_N_HBAS "N_HBAS" +#define PN_STI_HBA__SPLIT "HBA_Split" +#define PN_STI_WIDE_LBAS "wide_LBAS" +#define PN_STI_POWER48_ON "power48On" +#define PN_STI_POWER220_ON "power220On" +#define PN_STI_CABINET_X "Cabinet.X" +#define PN_STI_CABINET_Y "Cabinet.Y" +#define PN_STI_CABINET_Z "Cabinet.Z" +#define PN_STI_HBA_CENTERX "HBA.centerX" +#define PN_STI_HBA_CENTERY "HBA.centerY" +#define PN_STI_HBA_CENTERZ "HBA.centerZ" +#define PN_STI_HBA_HBA0_CENTERX "HBA.HBA0.centerX" +#define PN_STI_HBA_HBA0_CENTERY "HBA.HBA0.centerY" +#define PN_STI_HBA_HBA0_CENTERZ "HBA.HBA0.centerZ" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_X "HBA.HBA0.NormalVector.X" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Y "HBA.HBA0.NormalVector.Y" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Z "HBA.HBA0.NormalVector.Z" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_X "HBA.HBA0.RotationMatrix.X" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Y "HBA.HBA0.RotationMatrix.Y" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Z "HBA.HBA0.RotationMatrix.Z" +#define PN_STI_HBA_HBA0_ROTATION "HBA.HBA0.rotation" +#define PN_STI_HBA_HBA1_CENTERX "HBA.HBA1.centerX" +#define PN_STI_HBA_HBA1_CENTERY "HBA.HBA1.centerY" +#define PN_STI_HBA_HBA1_CENTERZ "HBA.HBA1.centerZ" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_X "HBA.HBA1.NormalVector.X" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Y "HBA.HBA1.NormalVector.Y" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Z "HBA.HBA1.NormalVector.Z" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_X "HBA.HBA1.RotationMatrix.X" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Y "HBA.HBA1.RotationMatrix.Y" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Z "HBA.HBA1.RotationMatrix.Z" +#define PN_STI_HBA_HBA1_ROTATION "HBA.HBA1.rotation" +#define PN_STI_LBA_CENTERX "LBA.centerX" +#define PN_STI_LBA_CENTERY "LBA.centerY" +#define PN_STI_LBA_CENTERZ "LBA.centerZ" +#define PN_STI_LBA__NORMAL_VECTOR_X "LBA.NormalVector.X" +#define PN_STI_LBA__NORMAL_VECTOR_Y "LBA.NormalVector.Y" +#define PN_STI_LBA__NORMAL_VECTOR_Z "LBA.NormalVector.Z" +#define PN_STI_LBA__ROTATION_MATRIX_X "LBA.RotationMatrix.X" +#define PN_STI_LBA__ROTATION_MATRIX_Y "LBA.RotationMatrix.Y" +#define PN_STI_LBA__ROTATION_MATRIX_Z "LBA.RotationMatrix.Z" + // LogProcessor #define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" #define PST_LOG_PROCESSOR "LogProcessor" @@ -287,6 +387,7 @@ // SoftwareMonitor #define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" #define PST_SOFTWARE_MONITOR "SoftwareMonitor" +#define PN_SWM_SW_LEVEL "SWLevel" // SHMInfoServer #define PSN_SHM_INFO_SERVER "LOFAR_PermSW_SHMInfoServer" @@ -303,19 +404,8 @@ #define PN_CLC_CONNECTED "connected" #define PN_CLC_REQUESTED_CLOCK "requestedClock" #define PN_CLC_ACTUAL_CLOCK "actualClock" - -// Antenna -#define PSN_ANTENNA "@antenna@" -#define PST_ANTENNA "Antenna" -#define PN_ANT_STATUS_STATE "status.state" -#define PN_ANT_STATUS_CHILD_STATE "status.childState" -#define PN_ANT_STATUS_MESSAGE "status.message" -#define PN_ANT_STATUS_LEAF "status.leaf" -#define PN_ANT_RCUX "RCUX" -#define PN_ANT_RCUY "RCUY" -#define PN_ANT_DELTAX "deltaX" -#define PN_ANT_DELTAY "deltaY" -#define PN_ANT_DELTAH "deltaH" +#define PN_CLC_REQUESTED_BITMODE "requestedBitmode" +#define PN_CLC_ACTUAL_BITMODE "actualBitmode" // StnObservation #define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" @@ -324,6 +414,8 @@ #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" #define PN_OBS_RECEIVER_BITMAP "receiverBitmap" +#define PN_OBS_HBA_BITMAP "HBABitmap" +#define PN_OBS_LBA_BITMAP "LBABitmap" // BeamControl #define PSN_BEAM_CONTROL "LOFAR_ObsSW_@observation@_BeamControl" @@ -360,5 +452,6 @@ #define PN_TBC_TRIGGER_PEAK_VALUE "trigger.peakValue" #define PN_TBC_TRIGGER_FLAGS "trigger.flags" #define PN_TBC_TRIGGER_TABLE "trigger.table" +#define PN_TBC_TRIGGER_MISSED "trigger.missed" #endif diff --git a/MAC/APL/PAC/CAL_Protocol/include/APL/CAL_Protocol/AntennaGains.h b/MAC/APL/PAC/CAL_Protocol/include/APL/CAL_Protocol/AntennaGains.h index 896bb4d1336..a9d97927fef 100644 --- a/MAC/APL/PAC/CAL_Protocol/include/APL/CAL_Protocol/AntennaGains.h +++ b/MAC/APL/PAC/CAL_Protocol/include/APL/CAL_Protocol/AntennaGains.h @@ -97,9 +97,9 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack (void* buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack (const char* buffer); /*@}*/ private: diff --git a/MAC/APL/PAC/CAL_Protocol/include/APL/CAL_Protocol/SpectralWindow.h b/MAC/APL/PAC/CAL_Protocol/include/APL/CAL_Protocol/SpectralWindow.h index 1d1a2b66c44..4cfc45d905f 100644 --- a/MAC/APL/PAC/CAL_Protocol/include/APL/CAL_Protocol/SpectralWindow.h +++ b/MAC/APL/PAC/CAL_Protocol/include/APL/CAL_Protocol/SpectralWindow.h @@ -85,9 +85,9 @@ namespace LOFAR { public: /*@{*/ // marshalling methods - unsigned int getSize() const; - unsigned int pack (void* buffer) const; - unsigned int unpack (void* buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PAC/CAL_Protocol/include/APL/CAL_Protocol/SubArray.h b/MAC/APL/PAC/CAL_Protocol/include/APL/CAL_Protocol/SubArray.h index d38e4ee246d..6b2c58682ad 100644 --- a/MAC/APL/PAC/CAL_Protocol/include/APL/CAL_Protocol/SubArray.h +++ b/MAC/APL/PAC/CAL_Protocol/include/APL/CAL_Protocol/SubArray.h @@ -108,9 +108,9 @@ public: //@{ // marshalling methods - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack (void* buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); //@} private: @@ -142,9 +142,9 @@ class SubArrayMap : public map<string, SubArray*> public: //@{ // marshalling methods - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack (void* buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); //@} }; diff --git a/MAC/APL/PAC/CAL_Protocol/src/AntennaGains.cc b/MAC/APL/PAC/CAL_Protocol/src/AntennaGains.cc index ab3cb3c3489..6f0f68c10b6 100644 --- a/MAC/APL/PAC/CAL_Protocol/src/AntennaGains.cc +++ b/MAC/APL/PAC/CAL_Protocol/src/AntennaGains.cc @@ -75,21 +75,21 @@ AntennaGains::~AntennaGains() delete m_mutex; } -unsigned int AntennaGains::getSize() +size_t AntennaGains::getSize() const { return - MSH_ARRAY_SIZE(m_gains, complex<double>) - + MSH_ARRAY_SIZE(m_quality, double) + MSH_size(m_gains) + + MSH_size(m_quality) + sizeof(bool); } -unsigned int AntennaGains::pack(void* buffer) +size_t AntennaGains::pack(char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; lock(); - MSH_PACK_ARRAY(buffer, offset, m_gains, complex<double>); - MSH_PACK_ARRAY(buffer, offset, m_quality, double); + MSH_pack(buffer, offset, m_gains); + MSH_pack(buffer, offset, m_quality); memcpy((char*)buffer + offset, &m_done, sizeof(bool)); offset += sizeof(bool); unlock(); @@ -97,13 +97,13 @@ unsigned int AntennaGains::pack(void* buffer) return offset; } -unsigned int AntennaGains::unpack(void* buffer) +size_t AntennaGains::unpack(const char* buffer) { - unsigned int offset = 0; + size_t offset = 0; lock(); - MSH_UNPACK_ARRAY(buffer, offset, m_gains, complex<double>, 3); - MSH_UNPACK_ARRAY(buffer, offset, m_quality, double, 3); + MSH_unpack(buffer, offset, m_gains); + MSH_unpack(buffer, offset, m_quality); memcpy(&m_done, (char*)buffer + offset, sizeof(bool)); offset += sizeof(bool); unlock(); diff --git a/MAC/APL/PAC/CAL_Protocol/src/CAL_Protocol.prot b/MAC/APL/PAC/CAL_Protocol/src/CAL_Protocol.prot index 20252a785bf..4ef0065fe21 100644 --- a/MAC/APL/PAC/CAL_Protocol/src/CAL_Protocol.prot +++ b/MAC/APL/PAC/CAL_Protocol/src/CAL_Protocol.prot @@ -76,7 +76,7 @@ event = { }; param = { // subset of the receivers (2 receivers per antenna) name = "subset"; - type = "LOFAR::bitset<LOFAR::MAX_RCUS>"; + type = "bitset<LOFAR::MAX_RCUS>"; }; param = { // RCU control byte controls the setting of all @@ -88,7 +88,7 @@ event = { // TODO: add this parameter for faster calibration in the future // param = { // set of subbands // name = "subbandset"; -// type = "LOFAR::bitset<LOFAR::MAX_SUBBANDS>"; +// type = "bitset<LOFAR::MAX_SUBBANDS>"; // }; // nyquist_zone is deducted from RCUSettings // sampling_frequency and nyquist_zone determine the spectral window @@ -138,7 +138,7 @@ event = { }; param = { // set of subbands name = "subbandset"; - type = "LOFAR::bitset<LOFAR::MAX_SUBBANDS>"; + type = "bitset<LOFAR::MAX_SUBBANDS>"; }; }; diff --git a/MAC/APL/PAC/CAL_Protocol/src/SpectralWindow.cc b/MAC/APL/PAC/CAL_Protocol/src/SpectralWindow.cc index ebc83e89815..ffa2cb92471 100644 --- a/MAC/APL/PAC/CAL_Protocol/src/SpectralWindow.cc +++ b/MAC/APL/PAC/CAL_Protocol/src/SpectralWindow.cc @@ -30,7 +30,7 @@ #include <blitz/array.h> #include <sstream> -#include <MACIO/Marshalling.h> +#include <MACIO/Marshalling.tcc> #include <APL/RTCCommon/MarshallBlitz.h> #include <math.h> @@ -137,44 +137,44 @@ ostream& SpectralWindow::print(ostream& os) const } -unsigned int SpectralWindow::getSize() const +size_t SpectralWindow::getSize() const { - return MSH_STRING_SIZE(m_name) + + return MSH_size(m_name) + sizeof(m_sampling_freq) + sizeof(m_nyquist_zone) + sizeof(m_numsubbands) + sizeof(m_rcucontrol); } -unsigned int SpectralWindow::pack(void* buffer) const +size_t SpectralWindow::pack(char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_STRING(buffer, offset, m_name); - memcpy(((char*)buffer) + offset, &m_sampling_freq, sizeof(m_sampling_freq)); + MSH_pack(buffer, offset, m_name); + memcpy(buffer + offset, &m_sampling_freq, sizeof(m_sampling_freq)); offset += sizeof(m_sampling_freq); - memcpy(((char*)buffer) + offset, &m_nyquist_zone, sizeof(m_nyquist_zone)); + memcpy(buffer + offset, &m_nyquist_zone, sizeof(m_nyquist_zone)); offset += sizeof(m_nyquist_zone); - memcpy(((char*)buffer) + offset, &m_numsubbands, sizeof(m_numsubbands)); + memcpy(buffer + offset, &m_numsubbands, sizeof(m_numsubbands)); offset += sizeof(m_numsubbands); - memcpy(((char*)buffer) + offset, &m_rcucontrol, sizeof(m_rcucontrol)); + memcpy(buffer + offset, &m_rcucontrol, sizeof(m_rcucontrol)); offset += sizeof(m_rcucontrol); return offset; } -unsigned int SpectralWindow::unpack(void* buffer) +size_t SpectralWindow::unpack(const char* buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_STRING(buffer, offset, m_name); - memcpy(&m_sampling_freq, ((char*)buffer) + offset, sizeof(m_sampling_freq)); + MSH_unpack(buffer, offset, m_name); + memcpy(&m_sampling_freq, buffer + offset, sizeof(m_sampling_freq)); offset += sizeof(m_sampling_freq); - memcpy(&m_nyquist_zone, ((char*)buffer) + offset, sizeof(m_nyquist_zone)); + memcpy(&m_nyquist_zone, buffer + offset, sizeof(m_nyquist_zone)); offset += sizeof(m_nyquist_zone); - memcpy(&m_numsubbands, ((char*)buffer) + offset, sizeof(m_numsubbands)); + memcpy(&m_numsubbands, buffer + offset, sizeof(m_numsubbands)); offset += sizeof(m_numsubbands); - memcpy(&m_rcucontrol, ((char*)buffer) + offset, sizeof(m_rcucontrol)); + memcpy(&m_rcucontrol, buffer + offset, sizeof(m_rcucontrol)); offset += sizeof(m_rcucontrol); return offset; diff --git a/MAC/APL/PAC/CAL_Protocol/src/SubArray.cc b/MAC/APL/PAC/CAL_Protocol/src/SubArray.cc index b96f0d6131f..96a85a7f77c 100644 --- a/MAC/APL/PAC/CAL_Protocol/src/SubArray.cc +++ b/MAC/APL/PAC/CAL_Protocol/src/SubArray.cc @@ -26,7 +26,7 @@ #include <Common/LofarLogger.h> #include <Common/StringUtil.h> #include <Common/hexdump.h> -#include <MACIO/Marshalling.h> +#include <MACIO/Marshalling.tcc> #include <APL/RTCCommon/MarshallBlitz.h> using namespace std; @@ -197,65 +197,63 @@ void SubArray::clearDone() m_result[FRONT]->setDone(false); } -unsigned int SubArray::getSize() +size_t SubArray::getSize() const { return - MSH_STRING_SIZE(m_name) - + MSH_ARRAY_SIZE (m_geoloc, double) - + MSH_ARRAY_SIZE (m_pos, double) - + MSH_ARRAY_SIZE (m_rcuindex, int16) - + MSH_BITSET_SIZE(itsRCUmask) + MSH_size(m_name) + + MSH_size(m_geoloc) + + MSH_size(m_pos) + + MSH_size(m_rcuindex) + + MSH_size(itsRCUmask) + m_spw.getSize(); } -unsigned int SubArray::pack(void* buffer) +size_t SubArray::pack(char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_STRING(buffer, offset, m_name); - MSH_PACK_ARRAY(buffer, offset, m_geoloc, double); - MSH_PACK_ARRAY(buffer, offset, m_pos, double); - MSH_PACK_ARRAY(buffer, offset, m_rcuindex, int16); - MSH_PACK_BITSET(buffer, offset, itsRCUmask); - offset += m_spw.pack(((char*)buffer) + offset); + MSH_pack(buffer, offset, m_name); + MSH_pack(buffer, offset, m_geoloc); + MSH_pack(buffer, offset, m_pos); + MSH_pack(buffer, offset, m_rcuindex); + MSH_pack(buffer, offset, itsRCUmask); + offset += m_spw.pack(buffer + offset); return offset; } -unsigned int SubArray::unpack(void* buffer) +size_t SubArray::unpack(const char* buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_STRING(buffer, offset, m_name); - MSH_UNPACK_ARRAY(buffer, offset, m_geoloc, double, 1); - MSH_UNPACK_ARRAY(buffer, offset, m_pos, double, 3); - MSH_UNPACK_ARRAY(buffer, offset, m_rcuindex, int16, 2); - MSH_UNPACK_BITSET(buffer, offset, itsRCUmask); - offset += m_spw.unpack(((char*)buffer) + offset); + MSH_unpack(buffer, offset, m_name); + MSH_unpack(buffer, offset, m_geoloc); + MSH_unpack(buffer, offset, m_pos); + MSH_unpack(buffer, offset, m_rcuindex); + MSH_unpack(buffer, offset, itsRCUmask); + offset += m_spw.unpack(buffer + offset); return offset; } // -------------------- SubArrayMap -------------------- -unsigned int SubArrayMap::getSize() +size_t SubArrayMap::getSize() const { - unsigned int offset = 0; - MSH_SIZE_MAP_STRING_CLASSPTR(offset, (*this), SubArray); - return (offset); + return (MSH_size(*this)); } -unsigned int SubArrayMap::pack(void* buffer) +size_t SubArrayMap::pack(char* buffer) const { - unsigned int offset = 0; - MSH_PACK_MAP_STRING_CLASSPTR(buffer, offset, (*this), SubArray); + size_t offset = 0; + MSH_pack(buffer, offset, (*this)); return (offset); } -unsigned int SubArrayMap::unpack(void* buffer) +size_t SubArrayMap::unpack(const char* buffer) { - unsigned int offset = 0; - MSH_UNPACK_MAP_STRING_CLASSPTR(buffer, offset, (*this), SubArray); + size_t offset = 0; + MSH_unpack(buffer, offset, (*this)); return (offset); } diff --git a/MAC/APL/PAC/Cal_Server/src/ACMProxy.cc b/MAC/APL/PAC/Cal_Server/src/ACMProxy.cc index a7c79e975a7..8d92554e4c9 100644 --- a/MAC/APL/PAC/Cal_Server/src/ACMProxy.cc +++ b/MAC/APL/PAC/Cal_Server/src/ACMProxy.cc @@ -256,8 +256,8 @@ GCFEvent::TResult ACMProxy::initializing(GCFEvent& e, GCFPortInterface& port) m_update_subband = 0; ss.subbands.setType(SubbandSelection::XLET); - ss.subbands().resize(1, 1); - ss.subbands() = m_request_subband; + ss.subbands.crosslets().resize(1, 1); + ss.subbands.crosslets() = m_request_subband; LOG_DEBUG_STR("REQ: XC subband " << m_request_subband << " @ " << ss.timestamp); m_rspdriver.send(ss); @@ -281,8 +281,8 @@ GCFEvent::TResult ACMProxy::initializing(GCFEvent& e, GCFPortInterface& port) } ss.subbands.setType(SubbandSelection::XLET); - ss.subbands().resize(1, 1); - ss.subbands() = m_request_subband; + ss.subbands.crosslets().resize(1, 1); + ss.subbands.crosslets() = m_request_subband; LOG_DEBUG_STR("REQ: XC subband " << m_request_subband << " @ " << ss.timestamp); port.send(ss); @@ -376,8 +376,8 @@ GCFEvent::TResult ACMProxy::receiving(GCFEvent& e, GCFPortInterface& port) } ss.subbands.setType(SubbandSelection::XLET); - ss.subbands().resize(1, 1); - ss.subbands() = m_request_subband; + ss.subbands.crosslets().resize(1, 1); + ss.subbands.crosslets() = m_request_subband; LOG_DEBUG_STR("REQ: XC subband " << m_request_subband << " @ " << ss.timestamp); port.send(ss); diff --git a/MAC/APL/PAC/IBS_Protocol/include/APL/IBS_Protocol/Beamlet2SubbandMap.h b/MAC/APL/PAC/IBS_Protocol/include/APL/IBS_Protocol/Beamlet2SubbandMap.h index 18483db4a3e..c2a297cc518 100644 --- a/MAC/APL/PAC/IBS_Protocol/include/APL/IBS_Protocol/Beamlet2SubbandMap.h +++ b/MAC/APL/PAC/IBS_Protocol/include/APL/IBS_Protocol/Beamlet2SubbandMap.h @@ -25,13 +25,15 @@ #ifndef BEAMLET2SUBBANDMAP_H_ #define BEAMLET2SUBBANDMAP_H_ -#include <MACIO/Marshalling.h> +#include <MACIO/Marshalling.tcc> #include <APL/RSP_Protocol/EPA_Protocol.ph> +#include <Common/LofarConstants.h> #include <Common/LofarTypes.h> +#include <Common/lofar_bitset.h> #include <Common/lofar_string.h> #include <Common/lofar_map.h> -#include <Common/lofar_bitset.h> +#include <boost/dynamic_bitset.hpp> namespace LOFAR { namespace IBS_Protocol { @@ -52,14 +54,14 @@ public: /*@{*/ // marshalling methods - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ // other methods bitset<MAX_SUBBANDS> getSubbandBitset() const; - bitset<MAX_BEAMLETS> getBeamletBitset() const; + boost::dynamic_bitset<> getBeamletBitset(const int maxBeamlets) const; ostream& print (ostream& os) const; diff --git a/MAC/APL/PAC/IBS_Protocol/include/APL/IBS_Protocol/Pointing.h b/MAC/APL/PAC/IBS_Protocol/include/APL/IBS_Protocol/Pointing.h index 67920bcff74..e27c51ddb64 100644 --- a/MAC/APL/PAC/IBS_Protocol/include/APL/IBS_Protocol/Pointing.h +++ b/MAC/APL/PAC/IBS_Protocol/include/APL/IBS_Protocol/Pointing.h @@ -71,9 +71,9 @@ public: /*@{*/ // marshalling methods - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PAC/IBS_Protocol/src/Beamlet2SubbandMap.cc b/MAC/APL/PAC/IBS_Protocol/src/Beamlet2SubbandMap.cc index b2aa681b1e5..422106d49db 100644 --- a/MAC/APL/PAC/IBS_Protocol/src/Beamlet2SubbandMap.cc +++ b/MAC/APL/PAC/IBS_Protocol/src/Beamlet2SubbandMap.cc @@ -33,43 +33,43 @@ using namespace IBS_Protocol; using namespace std; using namespace blitz; -unsigned int Beamlet2SubbandMap::getSize() +size_t Beamlet2SubbandMap::getSize() const { // 1-dimensional array has 1 int32 for length // map is converted to array of uint16 of 2 * map.size() elements return (sizeof(int32) + (m_beamlet2subband.size() * sizeof(uint16) * 2)); } -unsigned int Beamlet2SubbandMap::pack (void* buffer) +size_t Beamlet2SubbandMap::pack (char* buffer) const { // the map is sent as a blitz array blitz::Array<uint16, 1> maparray; - unsigned int offset = 0; + size_t offset = 0; maparray.resize(m_beamlet2subband.size() * 2); // resize the array maparray = 0; // convert map to Blitz array - map<uint16, uint16>::iterator iter = m_beamlet2subband.begin(); - map<uint16, uint16>::iterator end = m_beamlet2subband.end(); + map<uint16, uint16>::const_iterator iter = m_beamlet2subband.begin(); + map<uint16, uint16>::const_iterator end = m_beamlet2subband.end(); int i = 0; for ( ; iter != end; ++iter, i+=2) { maparray(i) = iter->first; maparray(i+1) = iter->second; } - MSH_PACK_ARRAY(buffer, offset, maparray, uint16); + MSH_pack(buffer, offset, maparray); return offset; } -unsigned int Beamlet2SubbandMap::unpack(void *buffer) +size_t Beamlet2SubbandMap::unpack(const char *buffer) { // the map is received as a blitz array blitz::Array<uint16, 1> maparray; - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, maparray, uint16, 1); + MSH_unpack(buffer, offset, maparray); ASSERT(maparray.extent(firstDim) % 2 == 0); // convert Blitz array to map @@ -92,7 +92,12 @@ bitset<MAX_SUBBANDS> Beamlet2SubbandMap::getSubbandBitset() const map<uint16, uint16>::const_iterator iter = m_beamlet2subband.begin(); map<uint16, uint16>::const_iterator end = m_beamlet2subband.end(); while (iter != end) { - result.set(iter->second); + if (iter->second >= MAX_SUBBANDS) { + LOG_FATAL_STR("Subband " << iter->second << " is not allowed, returning incomplete bitset!"); + } + else { + result.set(iter->second); + } ++iter; } @@ -102,14 +107,20 @@ bitset<MAX_SUBBANDS> Beamlet2SubbandMap::getSubbandBitset() const // // returns a bitset in which the bits represent the used beamlets // -bitset<MAX_BEAMLETS> Beamlet2SubbandMap::getBeamletBitset() const +boost::dynamic_bitset<> Beamlet2SubbandMap::getBeamletBitset(const int maxBeamlets) const { - bitset<MAX_BEAMLETS> result; + boost::dynamic_bitset<> result; + result.resize(maxBeamlets); map<uint16, uint16>::const_iterator iter = m_beamlet2subband.begin(); map<uint16, uint16>::const_iterator end = m_beamlet2subband.end(); while (iter != end) { - result.set(iter->first); + if (iter->first >= maxBeamlets) { + LOG_FATAL_STR("Beamlet " << iter->first << " is not allowed, returning incomplete bitset!"); + } + else { + result.set(iter->first); + } ++iter; } @@ -128,7 +139,7 @@ ostream& Beamlet2SubbandMap::print (ostream& os) const return (os); map<uint16,uint16>::const_iterator iter; map<uint16,uint16>::const_iterator end = m_beamlet2subband.end(); - while (idx < elements && idx < MAX_BEAMLETS) { + while (idx < elements) { if (idx % MAX_ELEMENTS_PER_LINE == 0) { if (idx % (2*MAX_ELEMENTS_PER_LINE) == 0) { os << endl << formatString("[%d]: ", idx / (2*MAX_ELEMENTS_PER_LINE)); diff --git a/MAC/APL/PAC/IBS_Protocol/src/IBS_Protocol.prot b/MAC/APL/PAC/IBS_Protocol/src/IBS_Protocol.prot index 3b53ebb7bcf..75eb3dbaebf 100644 --- a/MAC/APL/PAC/IBS_Protocol/src/IBS_Protocol.prot +++ b/MAC/APL/PAC/IBS_Protocol/src/IBS_Protocol.prot @@ -10,8 +10,8 @@ id = "(LOFAR::MACIO::F_APL_PROTOCOL+10)"; // specify extra include files // e.g. include = '<sys/time.h>'; -include = '<Common/lofar_bitset.h>'; include = '<Common/LofarConstants.h>'; +include = '<Common/lofar_bitset.h>'; include = '<APL/IBS_Protocol/Beamlet2SubbandMap.h>'; include = '<APL/IBS_Protocol/Pointing.h>'; include = '<APL/RTCCommon/Timestamp.h>'; @@ -148,7 +148,7 @@ event = { // NEW: so that BeamServer can check for ring inconsistancies. param = { // subset of the receivers (2 receivers per antenna) name = "rcumask"; - type = "LOFAR::bitset<LOFAR::MAX_RCUS>"; + type = "bitset<LOFAR::MAX_RCUS>"; }; param = { diff --git a/MAC/APL/PAC/IBS_Protocol/src/Pointing.cc b/MAC/APL/PAC/IBS_Protocol/src/Pointing.cc index dad0e744afc..0d5c8f3d5e1 100644 --- a/MAC/APL/PAC/IBS_Protocol/src/Pointing.cc +++ b/MAC/APL/PAC/IBS_Protocol/src/Pointing.cc @@ -24,7 +24,7 @@ #include <Common/LofarLogger.h> #include <Common/LofarTypes.h> #include <APL/IBS_Protocol/Pointing.h> -#include <MACIO/Marshalling.h> +#include <MACIO/Marshalling.tcc> using namespace LOFAR; using namespace IBS_Protocol; @@ -92,26 +92,26 @@ ostream& Pointing::print(ostream& os) const // // getSize() // -unsigned int Pointing::getSize() +size_t Pointing::getSize() const { - return (sizeof(double) * 2) + itsTime.getSize() + + sizeof(uint) + MSH_STRING_SIZE(itsType); + return (sizeof(double) * 2) + itsTime.getSize() + + sizeof(uint) + MSH_size(itsType); } // // pack(buffer) // -unsigned int Pointing::pack (void* buffer) +size_t Pointing::pack (char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - memcpy((char*)buffer + offset, &itsAngle2Pi, sizeof(double)); + memcpy(buffer + offset, &itsAngle2Pi, sizeof(double)); offset += sizeof(double); - memcpy((char*)buffer + offset, &itsAnglePi, sizeof(double)); + memcpy(buffer + offset, &itsAnglePi, sizeof(double)); offset += sizeof(double); - offset += itsTime.pack((char*)buffer + offset); - memcpy((char*)buffer + offset, &itsDuration, sizeof(uint)); + offset += itsTime.pack(buffer + offset); + memcpy(buffer + offset, &itsDuration, sizeof(uint)); offset += sizeof(uint); - MSH_PACK_STRING(buffer, offset, itsType); + MSH_pack(buffer, offset, itsType); return (offset); } @@ -119,18 +119,18 @@ unsigned int Pointing::pack (void* buffer) // // unpack(buffer) // -unsigned int Pointing::unpack(void *buffer) +size_t Pointing::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - memcpy(&itsAngle2Pi, (char*)buffer + offset, sizeof(double)); + memcpy(&itsAngle2Pi, buffer + offset, sizeof(double)); offset += sizeof(double); - memcpy(&itsAnglePi, (char*)buffer + offset, sizeof(double)); + memcpy(&itsAnglePi, buffer + offset, sizeof(double)); offset += sizeof(double); - offset += itsTime.unpack((char*)buffer + offset); - memcpy(&itsDuration, (char*)buffer + offset, sizeof(uint)); + offset += itsTime.unpack(buffer + offset); + memcpy(&itsDuration, buffer + offset, sizeof(uint)); offset += sizeof(uint); - MSH_UNPACK_STRING(buffer , offset, itsType); + MSH_unpack(buffer , offset, itsType); return (offset); } diff --git a/MAC/APL/PAC/ICAL_Protocol/include/APL/ICAL_Protocol/AntennaGains.h b/MAC/APL/PAC/ICAL_Protocol/include/APL/ICAL_Protocol/AntennaGains.h index 676c34a3256..5f549a77941 100644 --- a/MAC/APL/PAC/ICAL_Protocol/include/APL/ICAL_Protocol/AntennaGains.h +++ b/MAC/APL/PAC/ICAL_Protocol/include/APL/ICAL_Protocol/AntennaGains.h @@ -82,9 +82,9 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack (void* buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PAC/ICAL_Protocol/include/APL/ICAL_Protocol/SpectralWindow.h b/MAC/APL/PAC/ICAL_Protocol/include/APL/ICAL_Protocol/SpectralWindow.h index 264a69438c7..8bb6d415e08 100644 --- a/MAC/APL/PAC/ICAL_Protocol/include/APL/ICAL_Protocol/SpectralWindow.h +++ b/MAC/APL/PAC/ICAL_Protocol/include/APL/ICAL_Protocol/SpectralWindow.h @@ -70,9 +70,9 @@ public: /*@{*/ // marshalling methods - unsigned int getSize() const; - unsigned int pack (void* buffer) const; - unsigned int unpack (void* buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ // call for operator<< diff --git a/MAC/APL/PAC/ICAL_Protocol/include/APL/ICAL_Protocol/SubArray.h b/MAC/APL/PAC/ICAL_Protocol/include/APL/ICAL_Protocol/SubArray.h index d18176dadba..6344e2cc600 100644 --- a/MAC/APL/PAC/ICAL_Protocol/include/APL/ICAL_Protocol/SubArray.h +++ b/MAC/APL/PAC/ICAL_Protocol/include/APL/ICAL_Protocol/SubArray.h @@ -106,9 +106,9 @@ public: //@{ // marshalling methods - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack (void* buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); //@} // call for operator<< @@ -144,9 +144,9 @@ class SubArrayMap : public map<string, SubArray*> public: //@{ // marshalling methods - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack (void* buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); //@} }; diff --git a/MAC/APL/PAC/ICAL_Protocol/src/AntennaGains.cc b/MAC/APL/PAC/ICAL_Protocol/src/AntennaGains.cc index 0a3ef242b8a..e9cd9b4c57d 100644 --- a/MAC/APL/PAC/ICAL_Protocol/src/AntennaGains.cc +++ b/MAC/APL/PAC/ICAL_Protocol/src/AntennaGains.cc @@ -68,29 +68,29 @@ AntennaGains* AntennaGains::clone() const return (theClone); } -unsigned int AntennaGains::getSize() +size_t AntennaGains::getSize() const { return - MSH_ARRAY_SIZE(m_gains, complex<double>) - + MSH_ARRAY_SIZE(m_quality, double); + MSH_size(m_gains) + + MSH_size(m_quality); } -unsigned int AntennaGains::pack(void* buffer) +size_t AntennaGains::pack(char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, m_gains, complex<double>); - MSH_PACK_ARRAY(buffer, offset, m_quality, double); + MSH_pack(buffer, offset, m_gains); + MSH_pack(buffer, offset, m_quality); return offset; } -unsigned int AntennaGains::unpack(void* buffer) +size_t AntennaGains::unpack(const char* buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, m_gains, complex<double>, 2); - MSH_UNPACK_ARRAY(buffer, offset, m_quality, double, 2); + MSH_unpack(buffer, offset, m_gains); + MSH_unpack(buffer, offset, m_quality); return offset; } diff --git a/MAC/APL/PAC/ICAL_Protocol/src/SpectralWindow.cc b/MAC/APL/PAC/ICAL_Protocol/src/SpectralWindow.cc index 449e40554bd..3b478a5d197 100644 --- a/MAC/APL/PAC/ICAL_Protocol/src/SpectralWindow.cc +++ b/MAC/APL/PAC/ICAL_Protocol/src/SpectralWindow.cc @@ -27,7 +27,7 @@ #include <APL/ICAL_Protocol/SpectralWindow.h> -#include <MACIO/Marshalling.h> +#include <MACIO/Marshalling.tcc> #include <APL/RTCCommon/MarshallBlitz.h> namespace LOFAR { @@ -104,39 +104,39 @@ ostream& SpectralWindow::print(ostream& os) const // // ---------- pack and unpack functions ---------- // -unsigned int SpectralWindow::getSize() const +size_t SpectralWindow::getSize() const { - return MSH_STRING_SIZE(itsName) + + return MSH_size(itsName) + sizeof(itsSamplingFreq) + sizeof(itsNyquistZone) + sizeof(itsLBAfilterOn); } -unsigned int SpectralWindow::pack(void* buffer) const +size_t SpectralWindow::pack(char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_STRING(buffer, offset, itsName); - memcpy(((char*)buffer) + offset, &itsSamplingFreq, sizeof(itsSamplingFreq)); + MSH_pack(buffer, offset, itsName); + memcpy(buffer + offset, &itsSamplingFreq, sizeof(itsSamplingFreq)); offset += sizeof(itsSamplingFreq); - memcpy(((char*)buffer) + offset, &itsNyquistZone, sizeof(itsNyquistZone)); + memcpy(buffer + offset, &itsNyquistZone, sizeof(itsNyquistZone)); offset += sizeof(itsNyquistZone); - memcpy(((char*)buffer) + offset, &itsLBAfilterOn, sizeof(itsLBAfilterOn)); + memcpy(buffer + offset, &itsLBAfilterOn, sizeof(itsLBAfilterOn)); offset += sizeof(itsLBAfilterOn); return offset; } -unsigned int SpectralWindow::unpack(void* buffer) +size_t SpectralWindow::unpack(const char* buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_STRING(buffer, offset, itsName); - memcpy(&itsSamplingFreq, ((char*)buffer) + offset, sizeof(itsSamplingFreq)); + MSH_unpack(buffer, offset, itsName); + memcpy(&itsSamplingFreq, buffer + offset, sizeof(itsSamplingFreq)); offset += sizeof(itsSamplingFreq); - memcpy(&itsNyquistZone, ((char*)buffer) + offset, sizeof(itsNyquistZone)); + memcpy(&itsNyquistZone, buffer + offset, sizeof(itsNyquistZone)); offset += sizeof(itsNyquistZone); - memcpy(&itsLBAfilterOn, ((char*)buffer) + offset, sizeof(itsLBAfilterOn)); + memcpy(&itsLBAfilterOn, buffer + offset, sizeof(itsLBAfilterOn)); offset += sizeof(itsLBAfilterOn); return offset; diff --git a/MAC/APL/PAC/ICAL_Protocol/src/SubArray.cc b/MAC/APL/PAC/ICAL_Protocol/src/SubArray.cc index a87d30d824e..1c9646bd246 100644 --- a/MAC/APL/PAC/ICAL_Protocol/src/SubArray.cc +++ b/MAC/APL/PAC/ICAL_Protocol/src/SubArray.cc @@ -27,7 +27,7 @@ #include <Common/hexdump.h> #include <ApplCommon/AntennaSets.h> -#include <MACIO/Marshalling.h> +#include <MACIO/Marshalling.tcc> #include <APL/RTCCommon/MarshallBlitz.h> #include <APL/ICAL_Protocol/SubArray.h> @@ -188,59 +188,57 @@ ostream& SubArray::print (ostream& os) const // // ---------- pack and unpack routines ---------- // -unsigned int SubArray::getSize() +size_t SubArray::getSize() const { return - MSH_STRING_SIZE(itsName) - + MSH_STRING_SIZE(itsAntennaSet) - + MSH_BITSET_SIZE(itsRCUmask) + MSH_size(itsName) + + MSH_size(itsAntennaSet) + + MSH_size(itsRCUmask) + itsSPW.getSize(); } -unsigned int SubArray::pack(void* buffer) +size_t SubArray::pack(char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_STRING(buffer, offset, itsName); - MSH_PACK_STRING(buffer, offset, itsAntennaSet); - MSH_PACK_BITSET(buffer, offset, itsRCUmask); - offset += itsSPW.pack(((char*)buffer) + offset); + MSH_pack(buffer, offset, itsName); + MSH_pack(buffer, offset, itsAntennaSet); + MSH_pack(buffer, offset, itsRCUmask); + offset += itsSPW.pack(buffer + offset); return offset; } -unsigned int SubArray::unpack(void* buffer) +size_t SubArray::unpack(const char* buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_STRING(buffer, offset, itsName); - MSH_UNPACK_STRING(buffer, offset, itsAntennaSet); - MSH_UNPACK_BITSET(buffer, offset, itsRCUmask); - offset += itsSPW.unpack(((char*)buffer) + offset); + MSH_unpack(buffer, offset, itsName); + MSH_unpack(buffer, offset, itsAntennaSet); + MSH_unpack(buffer, offset, itsRCUmask); + offset += itsSPW.unpack(buffer + offset); return offset; } // -------------------- SubArrayMap -------------------- -unsigned int SubArrayMap::getSize() +size_t SubArrayMap::getSize() const { - unsigned int offset = 0; - MSH_SIZE_MAP_STRING_CLASSPTR(offset, (*this), SubArray); - return (offset); + return MSH_size(*this); } -unsigned int SubArrayMap::pack(void* buffer) +size_t SubArrayMap::pack(char* buffer) const { - unsigned int offset = 0; - MSH_PACK_MAP_STRING_CLASSPTR(buffer, offset, (*this), SubArray); + size_t offset = 0; + MSH_pack(buffer, offset, (*this)); return (offset); } -unsigned int SubArrayMap::unpack(void* buffer) +size_t SubArrayMap::unpack(const char* buffer) { - unsigned int offset = 0; - MSH_UNPACK_MAP_STRING_CLASSPTR(buffer, offset, (*this), SubArray); + size_t offset = 0; + MSH_unpack(buffer, offset, (*this)); return (offset); } diff --git a/MAC/APL/PAC/ITRFBeamServer/src/AnaBeamMgr.h b/MAC/APL/PAC/ITRFBeamServer/src/AnaBeamMgr.h index dc471c6d7e2..441936e8e95 100644 --- a/MAC/APL/PAC/ITRFBeamServer/src/AnaBeamMgr.h +++ b/MAC/APL/PAC/ITRFBeamServer/src/AnaBeamMgr.h @@ -24,9 +24,10 @@ #define ANABEAMMGR_H_ #include <lofar_config.h> -#include <Common/lofar_string.h> +#include <Common/lofar_bitset.h> #include <Common/lofar_list.h> #include <Common/lofar_map.h> +#include <Common/lofar_string.h> #include <ApplCommon/StationConfig.h> #include <GCF/TM/GCF_PortInterface.h> #include <APL/RTCCommon/Timestamp.h> @@ -125,7 +126,7 @@ private: RTC::Timestamp itsTargetTime; // RCUs participating in the active beams - bitset<MAX_RCUS> itsActiveRCUs; + bitset<MAX_RCUS> itsActiveRCUs; // queue of future pointings as delivered by the user. map<string, AnalogueBeam> itsBeams; diff --git a/MAC/APL/PAC/ITRFBeamServer/src/AnalogueBeam.cc b/MAC/APL/PAC/ITRFBeamServer/src/AnalogueBeam.cc index 9e34d0a7b56..240ccf0fc51 100644 --- a/MAC/APL/PAC/ITRFBeamServer/src/AnalogueBeam.cc +++ b/MAC/APL/PAC/ITRFBeamServer/src/AnalogueBeam.cc @@ -46,10 +46,10 @@ using namespace RTC; // // AnalogueBeam(name, subarray, nrSubbands) // -AnalogueBeam::AnalogueBeam(const string& name, - const string& antennaSet, - const bitset<MAX_RCUS>& rcuMask, - uint rankNr) : +AnalogueBeam::AnalogueBeam(const string& name, + const string& antennaSet, + const bitset<MAX_RCUS>& rcuMask, + uint rankNr) : Beam (name, antennaSet, rcuMask), itsRankNr (rankNr) {} diff --git a/MAC/APL/PAC/ITRFBeamServer/src/AnalogueBeam.h b/MAC/APL/PAC/ITRFBeamServer/src/AnalogueBeam.h index 7352ae423b9..456c2ede321 100644 --- a/MAC/APL/PAC/ITRFBeamServer/src/AnalogueBeam.h +++ b/MAC/APL/PAC/ITRFBeamServer/src/AnalogueBeam.h @@ -24,6 +24,7 @@ #define ANALOGUE_BEAM_H_ #include <lofar_config.h> +#include <Common/lofar_bitset.h> #include "Beam.h" #include <blitz/array.h> diff --git a/MAC/APL/PAC/ITRFBeamServer/src/Beam.h b/MAC/APL/PAC/ITRFBeamServer/src/Beam.h index 51af32d53ce..a425e676e50 100644 --- a/MAC/APL/PAC/ITRFBeamServer/src/Beam.h +++ b/MAC/APL/PAC/ITRFBeamServer/src/Beam.h @@ -24,10 +24,10 @@ #define BEAM_H_ #include <lofar_config.h> -#include <Common/lofar_vector.h> -#include <Common/lofar_string.h> #include <Common/lofar_bitset.h> #include <Common/lofar_list.h> +#include <Common/lofar_string.h> +#include <Common/lofar_vector.h> #include <Common/LofarConstants.h> #include <APL/RTCCommon/Timestamp.h> #include <APL/IBS_Protocol/Pointing.h> diff --git a/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.cc b/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.cc index f0a9d3c5285..c9312cdeee4 100644 --- a/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.cc +++ b/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.cc @@ -24,6 +24,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> #include <Common/LofarLocators.h> +#include <Common/LofarBitModeInfo.h> #include <Common/lofar_complex.h> #include <Common/Version.h> #include <Common/ParameterSet.h> @@ -47,11 +48,13 @@ #include <sstream> #include <time.h> #include <fstream> +#include <bitset> #include <netinet/in.h> #include <blitz/array.h> using namespace blitz; +using namespace std; namespace LOFAR { using namespace RTC; using namespace IBS_Protocol; @@ -66,6 +69,8 @@ int gBeamformerGain = 0; // BeamServer::BeamServer(const string& name, long timestamp) : GCFTask((State)&BeamServer::con2rspdriver, name), + itsCurrentBitsPerSample (MAX_BITS_PER_SAMPLE), + itsCurrentMaxBeamlets (maxBeamlets(itsCurrentBitsPerSample)), itsNrLBAbeams (0), itsNrHBAbeams (0), itsListener (0), @@ -230,7 +235,7 @@ GCFEvent::TResult BeamServer::con2rspdriver(GCFEvent& event, GCFPortInterface& p // // askConfiguration(event, port) // -// Ask the RSPdriver what ahrdware is available +// Ask the RSPdriver what hardware is available // GCFEvent::TResult BeamServer::askConfiguration(GCFEvent& event, GCFPortInterface& port) { @@ -250,14 +255,9 @@ GCFEvent::TResult BeamServer::askConfiguration(GCFEvent& event, GCFPortInterface RSPGetconfigackEvent ack(event); // resize our array to the amount of current RCUs - itsMaxRCUs = ack.n_rcus; - LOG_INFO_STR("Station has " << itsMaxRCUs << " RCU's"); - - // initialize matrices - itsWeights.resize (itsMaxRCUs, MAX_BEAMLETS); - itsWeights16.resize (itsMaxRCUs, MAX_BEAMLETS); - itsWeights = complex<double>(0,0); - itsWeights16 = complex<int16_t>(0,0); + itsMaxRCUs = ack.n_rcus; + itsMaxRSPboards = ack.max_rspboards; + LOG_INFO_STR("Station has " << itsMaxRCUs << " RCU's and " << itsMaxRSPboards << " RSPBoards"); itsConnectTimer->cancelAllTimers(); TRAN(BeamServer::subscribeSplitter); @@ -301,10 +301,24 @@ GCFEvent::TResult BeamServer::subscribeSplitter(GCFEvent& event, GCFPortInterfac RSPSubsplitterEvent subSplitter; subSplitter.period = 1; itsRSPDriver->send(subSplitter); + itsConnectTimer->setTimer(5.0); + // wait for ack message + } + break; + + case RSP_SUBSPLITTERACK: { + itsConnectTimer->cancelAllTimers(); + RSPSubsplitterackEvent ack(event); + if (ack.status != RSP_SUCCESS) { + LOG_INFO("Could not get a subscription on the splitter, retry in 5 seconds"); + } + itsConnectTimer->setTimer(5.0); + // wait for update message. } break; case RSP_UPDSPLITTER: { + itsConnectTimer->cancelAllTimers(); RSPUpdsplitterEvent answer(event); if (answer.status != RSP_SUCCESS) { LOG_INFO("Could not get a subscription on the splitter, retry in 5 seconds"); @@ -316,8 +330,8 @@ GCFEvent::TResult BeamServer::subscribeSplitter(GCFEvent& event, GCFPortInterfac LOG_INFO_STR("The ringsplitter is " << (itsSplitterOn ? "ON" : "OFF")); _createBeamPool(); // (re)allocate memory for the beamlet mapping - itsConnectTimer->cancelAllTimers(); - TRAN(BeamServer::con2calserver); + TRAN(BeamServer::subscribeBitmode); +// TRAN(BeamServer::con2calserver); } break; @@ -348,6 +362,92 @@ GCFEvent::TResult BeamServer::subscribeSplitter(GCFEvent& event, GCFPortInterfac return (status); } +#if 1 +// +// subscribeBitmode(event, port) +// +// Take subscription on changes in the bitmode +// +GCFEvent::TResult BeamServer::subscribeBitmode(GCFEvent& event, GCFPortInterface& port) +{ + LOG_DEBUG_STR("subscribeBitmode:" << eventName(event) << "@" << port.getName()); + + GCFEvent::TResult status = GCFEvent::HANDLED; + + switch(event.signal) { + case F_ENTRY: { + // send request for splitter info + LOG_INFO("Requesting a subscription on the bitmode"); + RSPSubbitmodeEvent subBitmode; + subBitmode.period = 1; + itsRSPDriver->send(subBitmode); + itsConnectTimer->setTimer(5.0); + // wait for update event. + } + break; + + case RSP_SUBBITMODEACK: { + itsConnectTimer->cancelAllTimers(); + RSPSubbitmodeackEvent ack(event); + if (ack.status != RSP_SUCCESS) { + LOG_INFO("Could not get a subscription on the bitmode, retry in 5 seconds"); + break; + } + itsConnectTimer->setTimer(5.0); + // wait for update event. + } + break; + + case RSP_UPDBITMODE: { + itsConnectTimer->cancelAllTimers(); + RSPUpdbitmodeEvent answer(event); + if (answer.status != RSP_SUCCESS) { + LOG_INFO("Could not get a subscription on the bitmode, retry in 5 seconds"); + itsConnectTimer->setTimer(5.0); + break; + } + + itsCurrentBitsPerSample = MIN_BITS_PER_SAMPLE; + for (uint i = 0; i < itsMaxRSPboards; i++) { + itsCurrentBitsPerSample = (answer.bits_per_sample[i] > itsCurrentBitsPerSample) ? answer.bits_per_sample[i] : itsCurrentBitsPerSample; + } + itsCurrentMaxBeamlets = maxBeamlets(itsCurrentBitsPerSample); + LOG_INFO_STR("The bitmode is " << itsCurrentBitsPerSample << " bits"); + + _createBeamPool(); // (re)allocate memory for the beamlet mapping + + TRAN(BeamServer::con2calserver); + } + break; + + case F_TIMER: { + LOG_INFO("Requesting a subscription on the bitmode again."); + RSPSubbitmodeEvent subBitmode; + subBitmode.period = 1; + itsRSPDriver->send(subBitmode); + } + break; + + case F_DISCONNECTED: { + port.close(); + if (&port == itsRSPDriver) { + LOG_WARN("Lost connection with the RSPDriver, going back to the reconnect state"); + itsConnectTimer->cancelAllTimers(); + TRAN(BeamServer::con2rspdriver); + } + } + break; + + default: + LOG_DEBUG("subscribeBitmode:default"); + status = GCFEvent::NOT_HANDLED; + break; + } + + return (status); +} +#endif + // // con2calserver(event, port) // @@ -571,6 +671,19 @@ GCFEvent::TResult BeamServer::enabled(GCFEvent& event, GCFPortInterface& port) } break; + case RSP_UPDBITMODE: { + RSPUpdbitmodeEvent answer(event); + // TODO: don't ignore status field! + itsCurrentBitsPerSample = MIN_BITS_PER_SAMPLE; + for (uint i = 0; i < itsMaxRSPboards; i++) { + itsCurrentBitsPerSample = (answer.bits_per_sample[i] > itsCurrentBitsPerSample) ? answer.bits_per_sample[i] : itsCurrentBitsPerSample; + } + itsCurrentMaxBeamlets = maxBeamlets(itsCurrentBitsPerSample); + LOG_INFO_STR("The bitmode changed to " << itsCurrentBitsPerSample << " bits"); + _createBeamPool(); + } + break; + // ---------- connection administration ---------- case F_DISCONNECTED: { if (&port == itsListener || &port == itsRSPDriver || &port == itsCalServer) { @@ -1051,7 +1164,7 @@ void BeamServer::_createBeamPool() itsBeamPool.clear(); // make a new one based on the current value of the splitter. - int nrBeamlets = (itsSplitterOn ? 2 : 1 ) * MAX_BEAMLETS; + int nrBeamlets = (itsSplitterOn ? 2 : 1 ) * itsCurrentMaxBeamlets; LOG_INFO_STR("Initializing space for " << nrBeamlets << " beamlets"); itsBeamletAllocation.clear(); itsBeamletAllocation.resize(nrBeamlets, BeamletAlloc_t(0,0.0)); @@ -1059,6 +1172,15 @@ void BeamServer::_createBeamPool() delete itsAnaBeamMgr; itsAnaBeamMgr = new AnaBeamMgr(itsMaxRCUs, (itsSplitterOn ? 2 : 1 )); ASSERTSTR(itsAnaBeamMgr, "Failed to create an Manager for the analogue beams."); + + // initialize matrices + int nPlanes = MAX_BITS_PER_SAMPLE / itsCurrentBitsPerSample; + int beamletsPerPlane = maxBeamletsPerPlane(itsCurrentBitsPerSample); + LOG_DEBUG(formatString("Size weights arrays set to %d x %d x %d", itsMaxRCUs, nPlanes, beamletsPerPlane)); + itsWeights.resize (itsMaxRCUs, nPlanes, beamletsPerPlane); + itsWeights16.resize (itsMaxRCUs, nPlanes, beamletsPerPlane); + itsWeights = complex<double>(0,0); + itsWeights16 = complex<int16_t>(0,0); } // @@ -1100,7 +1222,7 @@ DigitalBeam* BeamServer::checkBeam(GCFPortInterface* port, std::string name, std::string antennaSetName, IBS_Protocol::Beamlet2SubbandMap allocation, - LOFAR::bitset<LOFAR::MAX_RCUS> rcumask, + bitset<LOFAR::MAX_RCUS> rcumask, uint ringNr, uint rcuMode, int* beamError) @@ -1148,6 +1270,13 @@ DigitalBeam* BeamServer::checkBeam(GCFPortInterface* port, return (0); } + // nr of subbands should fit in the beamlet space. + if (allocation.getSubbandBitset().count() > itsCurrentMaxBeamlets) { + LOG_ERROR_STR("Too many subbands specified (" << allocation.getSubbandBitset().count() << ") only " + << itsCurrentMaxBeamlets << " allowed"); + return (0); + } + if (!_checkBeamlets(allocation, ringNr)) { LOG_ERROR_STR("Beamlets of beam " << name << " overlap with beamlets of other beams"); *beamError = IBS_BEAMALLOC_ERR; @@ -1218,7 +1347,7 @@ bool BeamServer::_checkBeamlets(IBS_Protocol::Beamlet2SubbandMap& allocation, // first check if the allocation is valid for ( ; iter != end; iter++) { // v--- beamletnumber - int index(ringNr * LOFAR::MAX_BEAMLETS + iter->first); + int index(ringNr * itsCurrentMaxBeamlets + iter->first); if (itsBeamletAllocation[index].subbandNr) { LOG_ERROR_STR("Beamlet " << iter->first << "(" << index << ") is already assigned to subband " << iter->second); @@ -1240,11 +1369,11 @@ void BeamServer::_allocBeamlets(IBS_Protocol::Beamlet2SubbandMap& allocation, map<uint16,uint16>::const_iterator iter = allocation().begin(); map<uint16,uint16>::const_iterator end = allocation().end(); for ( ; iter != end; iter++) { - itsBeamletAllocation[ringNr * LOFAR::MAX_BEAMLETS + iter->first].subbandNr = iter->second; + itsBeamletAllocation[ringNr * itsCurrentMaxBeamlets + iter->first].subbandNr = iter->second; // NOTE: we like to set the scaling for each beamlets here also but we need // the spectral window of the antenneSet for that. We will receive that info // from the CalServer in a later state and calc the scalings than. - itsBeamletAllocation[ringNr * LOFAR::MAX_BEAMLETS + iter->first].scaling = complex<double>(0.0, 0.0); + itsBeamletAllocation[ringNr * itsCurrentMaxBeamlets + iter->first].scaling = complex<double>(0.0, 0.0); } LOG_INFO_STR("Assignment of subbands to beamlets succesfull."); @@ -1267,7 +1396,7 @@ void BeamServer::_scaleBeamlets(IBS_Protocol::Beamlet2SubbandMap& allocation, for ( ; iter != end; iter++) { // first: beamletIndex, second: subbandnr double freq = spw.getSubbandFreq(iter->second); - int index = ringNr * LOFAR::MAX_BEAMLETS + iter->first; + int index = ringNr * itsCurrentMaxBeamlets + iter->first; itsBeamletAllocation[index].scaling = -2.0 * M_PI * freq * complex<double>(0.0,1.0) / speedOfLight; LOG_TRACE_OBJ_STR("scaling subband[" << itsBeamletAllocation[index].subbandNr << "]@beamlet[" << index << "] = " << itsBeamletAllocation[index].scaling << @@ -1287,8 +1416,8 @@ void BeamServer::_releaseBeamlets(IBS_Protocol::Beamlet2SubbandMap& allocation, map<uint16,uint16>::iterator iter = allocation().begin(); map<uint16,uint16>::iterator end = allocation().end(); for ( ; iter != end; iter++) { - itsBeamletAllocation[ringNr * LOFAR::MAX_BEAMLETS + iter->first].subbandNr = 0; - itsBeamletAllocation[ringNr * LOFAR::MAX_BEAMLETS + iter->first].scaling = complex<double>(0.0, 0.0); + itsBeamletAllocation[ringNr * itsCurrentMaxBeamlets + iter->first].subbandNr = 0; + itsBeamletAllocation[ringNr * itsCurrentMaxBeamlets + iter->first].scaling = complex<double>(0.0, 0.0); } LOG_INFO_STR("Assigned beamlets released succesfully."); @@ -1475,12 +1604,14 @@ void BeamServer::compute_weights(Timestamp weightTime) LOG_INFO_STR("Calculating weights for time " << weightTime); // reset all weights - LOG_DEBUG_STR("Weights array has size: " << itsWeights.extent(firstDim) << "x" << itsWeights.extent(secondDim)); - itsWeights(Range::all(), Range::all()) = 0.0; + LOG_DEBUG_STR("Weights array has size: " << itsWeights.extent(firstDim) << "x" << + itsWeights.extent(secondDim) << "x" << itsWeights.extent(thirdDim)); + itsWeights = 0.0; // get ptr to antennafield information AntennaField *gAntField = globalAntennaField(); + int beamletsPerPlane = maxBeamletsPerPlane(itsCurrentBitsPerSample); // Check both LBA and HBA antennas for (uint fieldNr = 0; fieldNr < 4; fieldNr++) { string fieldName; @@ -1552,7 +1683,7 @@ void BeamServer::compute_weights(Timestamp weightTime) sourceJ2000xyz(0,0), sourceJ2000xyz(0,1), sourceJ2000xyz(0,2))); // Note: Beamlet numbers depend on the ring. - int firstBeamlet(gAntField->ringNr(fieldName) * LOFAR::MAX_BEAMLETS); + int firstBeamlet(gAntField->ringNr(fieldName) * itsCurrentMaxBeamlets); LOG_DEBUG_STR("first beamlet of field " << fieldName << "=" << firstBeamlet); // Note: RCUallocation is stationbased, rest info is fieldbased, bitset<MAX_RCUS> RCUallocation(beamIter->second->rcuMask()); @@ -1566,7 +1697,9 @@ void BeamServer::compute_weights(Timestamp weightTime) // Note: weight is in-procduct for RCUpos and source Pos and depends on // the frequency of the subband. // - bitset<MAX_BEAMLETS> beamletAllocation = beamIter->second->allocation().getBeamletBitset(); + boost::dynamic_bitset<> beamletAllocation; + beamletAllocation.resize(itsCurrentMaxBeamlets); + beamletAllocation = beamIter->second->allocation().getBeamletBitset(itsCurrentMaxBeamlets); int nrBeamlets = beamletAllocation.size(); for (int beamlet = 0; beamlet < nrBeamlets; beamlet++) { if (!beamletAllocation.test(beamlet)) { @@ -1575,14 +1708,17 @@ void BeamServer::compute_weights(Timestamp weightTime) complex<double> CalFactor = _getCalFactor(beamIter->second->rcuMode(), rcu, itsBeamletAllocation[beamlet+firstBeamlet].subbandNr); - itsWeights(rcu, beamlet) = CalFactor * exp(itsBeamletAllocation[beamlet+firstBeamlet].scaling * - (rcuJ2000Pos((int)posIndex[rcu], 0) * sourceJ2000xyz(0,0) + - rcuJ2000Pos((int)posIndex[rcu], 1) * sourceJ2000xyz(0,1) + - rcuJ2000Pos((int)posIndex[rcu], 2) * sourceJ2000xyz(0,2))); + int bitPlane = beamlet / beamletsPerPlane; + itsWeights(rcu, bitPlane, beamlet % beamletsPerPlane) = + CalFactor * exp(itsBeamletAllocation[beamlet+firstBeamlet].scaling * + (rcuJ2000Pos((int)posIndex[rcu], 0) * sourceJ2000xyz(0,0) + + rcuJ2000Pos((int)posIndex[rcu], 1) * sourceJ2000xyz(0,1) + + rcuJ2000Pos((int)posIndex[rcu], 2) * sourceJ2000xyz(0,2))); // some debugging if (beamlet%100==0) { - LOG_DEBUG_STR("itsWeights(" << rcu << "," << beamlet << ")=" << itsWeights(rcu, beamlet) + LOG_DEBUG_STR("itsWeights(" << rcu << "," << bitPlane << "," << beamlet << ")=" + << itsWeights(rcu, bitPlane, beamlet) << " : rcuPos[" << posIndex[rcu] << "]=" << rcuJ2000Pos((int)posIndex[rcu],0) << " : CalFactor=" << CalFactor); } @@ -1616,8 +1752,9 @@ void BeamServer::send_weights(Timestamp time) sw.rcumask.set(i); } - sw.weights().resize(1, itsMaxRCUs, MAX_BEAMLETS); - sw.weights()(0, Range::all(), Range::all()) = itsWeights16; + int nPlanes = MAX_BITS_PER_SAMPLE / itsCurrentBitsPerSample; + sw.weights().resize(1, itsMaxRCUs, nPlanes, itsCurrentMaxBeamlets / nPlanes); + sw.weights()(0, Range::all(), Range::all(), Range::all()) = itsWeights16; LOG_INFO_STR("sending weights for interval " << time << " : " << time + (long)(itsComputeInterval-1)); @@ -1659,9 +1796,10 @@ void BeamServer::send_sbselection() // beam 1, then beam 0 is deallocated, thus there is a hole // of 64 beamlets before the beamlets of beam 1. // + int beamletsPerPlane = maxBeamletsPerPlane(itsCurrentBitsPerSample); ss.subbands.setType(SubbandSelection::BEAMLET); - ss.subbands().resize(1, MAX_BEAMLETS); - ss.subbands() = 0; + ss.subbands.beamlets().resize(1, MAX_BITS_PER_SAMPLE/itsCurrentBitsPerSample, beamletsPerPlane); + ss.subbands.beamlets() = 0; // reconstruct the selection Beamlet2SubbandMap selection; @@ -1682,23 +1820,23 @@ void BeamServer::send_sbselection() for ( ; iter != end; ++iter) { LOG_DEBUG(formatString("(%d,%d)", iter->first, iter->second)); - if (iter->first >= MAX_BEAMLETS) { - LOG_ERROR(formatString("SBSELECTION: invalid src index %d", iter->first)); + if (iter->first >= itsCurrentMaxBeamlets) { + LOG_ERROR(formatString("SBSELECTION: invalid src index %d (max=%d)", iter->first, itsCurrentMaxBeamlets)); continue; } if (iter->second >= MAX_SUBBANDS) { - LOG_ERROR(formatString("SBSELECTION: invalid tgt index %d", iter->second)); + LOG_ERROR(formatString("SBSELECTION: invalid tgt index %d (max=%d)", iter->second, MAX_SUBBANDS)); continue; } // same selection for x and y polarization - ss.subbands()(0, (int)iter->first) = iter->second; + ss.subbands.beamlets()(0, iter->first/beamletsPerPlane, iter->first%beamletsPerPlane) = iter->second; } if (selection().size()) { LOG_DEBUG_STR("Sending subbandselection for ring segment " << ringNr); - LOG_DEBUG_STR(ss.subbands()); + LOG_DEBUG_STR(ss.subbands.beamlets()); itsRSPDriver->send(ss); } else { diff --git a/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.h b/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.h index e164fd849ad..589bedbcea0 100644 --- a/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.h +++ b/MAC/APL/PAC/ITRFBeamServer/src/BeamServer.h @@ -23,10 +23,11 @@ #ifndef BEAMSERVER_H_ #define BEAMSERVER_H_ -#include <Common/lofar_string.h> -#include <Common/lofar_set.h> -#include <Common/lofar_map.h> +#include <Common/lofar_bitset.h> #include <Common/lofar_list.h> +#include <Common/lofar_map.h> +#include <Common/lofar_set.h> +#include <Common/lofar_string.h> #include <GCF/TM/GCF_Control.h> #include <APL/IBS_Protocol/IBS_Protocol.ph> #include <CASATools/CasaConverter.h> @@ -90,7 +91,7 @@ private: string name, string subarrayname, IBS_Protocol::Beamlet2SubbandMap allocation, - LOFAR::bitset<LOFAR::MAX_RCUS> rcumask, + bitset<LOFAR::MAX_RCUS> rcumask, uint ringNr, uint rcuMode, int* beamError); @@ -108,6 +109,9 @@ private: // Take a subscription on the splitter state. GCFEvent::TResult subscribeSplitter(GCFEvent& e, GCFPortInterface& p); + // Take a subscription on the bitmode + GCFEvent::TResult subscribeBitmode(GCFEvent& event, GCFPortInterface& port); + // Try to connect to the CalServer GCFEvent::TResult con2calserver(GCFEvent& e, GCFPortInterface& p); @@ -179,6 +183,13 @@ private: // ### data members ### + // 'constant' containing the current number of bits each datasample has. + // This value determines how many beamlets a RSPBoard produces (and how large some of + // our arrays become). The function maxBeamletsPerRSP in Common/LofarBitModeInfo.h calculates + // the maxBeamlets 'constant' we are used to work with before bitsperSample was a variable value. + int itsCurrentBitsPerSample; + int itsCurrentMaxBeamlets; + // BeamletAllocation typedef struct BeamletAllocation { int subbandNr; @@ -188,8 +199,8 @@ private: vector<BeamletAlloc_t> itsBeamletAllocation; // Weights array [MAX_RCUS, MAX_BEAMLETS] - blitz::Array<std::complex<double>, 2> itsWeights; - blitz::Array<std::complex<int16_t>, 2> itsWeights16; + blitz::Array<std::complex<double>, 3> itsWeights; + blitz::Array<std::complex<int16_t>, 3> itsWeights16; // RCU Allocations in the AntennaArrays. Remember that each RCU can participate // in more than one beam. @@ -229,6 +240,7 @@ private: // constants uint itsMaxRCUs; // + uint itsMaxRSPboards; // bool itsSetHBAEnabled; // bool itsSetWeightsEnabled; // bool itsSetSubbandsEnabled; // diff --git a/MAC/APL/PAC/ITRFBeamServer/src/DigitalBeam.cc b/MAC/APL/PAC/ITRFBeamServer/src/DigitalBeam.cc index 1926b2e6aa7..e65040d7a87 100644 --- a/MAC/APL/PAC/ITRFBeamServer/src/DigitalBeam.cc +++ b/MAC/APL/PAC/ITRFBeamServer/src/DigitalBeam.cc @@ -48,12 +48,12 @@ using namespace RTC; // // DigitalBeam(name, subarray, nrSubbands) // -DigitalBeam::DigitalBeam(const string& name, - const string& antennaSet, - const Beamlet2SubbandMap& allocation, - const bitset<MAX_RCUS>& rcuMask, - uint ringNr, - uint rcuMode) : +DigitalBeam::DigitalBeam(const string& name, + const string& antennaSet, + const Beamlet2SubbandMap& allocation, + const bitset<MAX_RCUS>& rcuMask, + uint ringNr, + uint rcuMode) : Beam (name, antennaSet, rcuMask), itsBeamletAllocation(allocation), itsRingNr (ringNr), diff --git a/MAC/APL/PAC/ITRFBeamServer/src/DigitalBeam.h b/MAC/APL/PAC/ITRFBeamServer/src/DigitalBeam.h index 9d446ee4c3b..0aba04f8cee 100644 --- a/MAC/APL/PAC/ITRFBeamServer/src/DigitalBeam.h +++ b/MAC/APL/PAC/ITRFBeamServer/src/DigitalBeam.h @@ -24,6 +24,7 @@ #define DIGITALBEAM_H_ #include <lofar_config.h> +#include <Common/lofar_bitset.h> #include <Common/lofar_string.h> #include <APL/RTCCommon/Timestamp.h> #include <APL/IBS_Protocol/Beamlet2SubbandMap.h> diff --git a/MAC/APL/PAC/ITRFBeamServer/src/beamctl.cc b/MAC/APL/PAC/ITRFBeamServer/src/beamctl.cc index 6a1ec202399..1783817e5e6 100644 --- a/MAC/APL/PAC/ITRFBeamServer/src/beamctl.cc +++ b/MAC/APL/PAC/ITRFBeamServer/src/beamctl.cc @@ -25,7 +25,7 @@ #include <Common/LofarLogger.h> #include <Common/Exception.h> #include <Common/ParameterSet.h> -#include <Common/lofar_bitset.h> +#include <Common/LofarBitModeInfo.h> #include <Common/lofar_string.h> #include <Common/lofar_list.h> #include <ApplCommon/AntennaSets.h> @@ -50,6 +50,7 @@ #define BEAMLET_RING_OFFSET 1000 using namespace blitz; +using namespace std; namespace LOFAR { using namespace RTC; using namespace CAL_Protocol; @@ -767,13 +768,14 @@ bool beamctl::parseOptions(int myArgc, char** myArgv) break; case 's': { - itsSubbands = strtolist(optarg, LOFAR::MAX_SUBBANDS); + itsSubbands = strtolist(optarg, MAX_SUBBANDS); cout << "subbands : "; printList(itsSubbands); } break; case 'b': { - itsBeamlets = strtolist(optarg, BEAMLET_RING_OFFSET + LOFAR::MAX_BEAMLETS); + // assume lowest bitmode, if this is not the case the BeamServer will complain... + itsBeamlets = strtolist(optarg, BEAMLET_RING_OFFSET + maxBeamlets(MIN_BITS_PER_SAMPLE)); cout << "beamlets : "; printList(itsBeamlets); } break; @@ -818,6 +820,10 @@ int main(int argc, char** argv) { GCFScheduler::instance()->init(argc, argv, "beamctl"); + ASSERTSTR(BEAMLET_RING_OFFSET > maxBeamlets(MIN_BITS_PER_SAMPLE), + formatString("(%d>%d) beamctl is not suitable for handling %d bit mode. Revise program.", + BEAMLET_RING_OFFSET, maxBeamlets(MIN_BITS_PER_SAMPLE), MIN_BITS_PER_SAMPLE)); + try { beamctl beamctlTask("beamctl"); beamctlTask.start(); diff --git a/MAC/APL/PAC/ITRFBeamServer/src/beamctl.h b/MAC/APL/PAC/ITRFBeamServer/src/beamctl.h index 490ce1ff4d9..279cd8a14b1 100644 --- a/MAC/APL/PAC/ITRFBeamServer/src/beamctl.h +++ b/MAC/APL/PAC/ITRFBeamServer/src/beamctl.h @@ -62,12 +62,12 @@ public: private: // Return the seleted rcus as bitset<MAX_N_RCUS> - bool parseOptions(int myArgc, char** myArgv); - bool checkOptions(); - bitset<LOFAR::MAX_RCUS> getRCUMask() const; - list<int> strtolist(const char* str, int max) const; - void printList(list<int>& theList) const; - void usage() const; + bool parseOptions(int myArgc, char** myArgv); + bool checkOptions(); + bitset<MAX_RCUS> getRCUMask() const; + list<int> strtolist(const char* str, int max) const; + void printList(list<int>& theList) const; + void usage() const; void send_direction(double longitude, double latitude, const string& dirType, bool isAnalogue); // ports diff --git a/MAC/APL/PAC/SHMInfo_Server/src/RspStatus.cc b/MAC/APL/PAC/SHMInfo_Server/src/RspStatus.cc index 7171e754600..9d6fa2cbb56 100644 --- a/MAC/APL/PAC/SHMInfo_Server/src/RspStatus.cc +++ b/MAC/APL/PAC/SHMInfo_Server/src/RspStatus.cc @@ -39,25 +39,25 @@ using namespace EPA_Protocol; namespace LOFAR { namespace SHM_Protocol { - unsigned int RspStatus::getSize() + size_t RspStatus::getSize() const { - return MSH_ARRAY_SIZE(m_board_status, EPA_Protocol::BoardStatus); + return MSH_size(m_board_status); } - unsigned int RspStatus::pack (void* buffer) + size_t RspStatus::pack (char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, m_board_status, EPA_Protocol::BoardStatus); + MSH_pack(buffer, offset, m_board_status); return offset; } - unsigned int RspStatus::unpack(void *buffer) + size_t RspStatus::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, m_board_status, EPA_Protocol::BoardStatus, 1); + MSH_unpack(buffer, offset, m_board_status); return offset; } diff --git a/MAC/APL/PAC/SHMInfo_Server/src/RspStatus.h b/MAC/APL/PAC/SHMInfo_Server/src/RspStatus.h index 41ee4d8f5e1..fb0a1c3fcc2 100644 --- a/MAC/APL/PAC/SHMInfo_Server/src/RspStatus.h +++ b/MAC/APL/PAC/SHMInfo_Server/src/RspStatus.h @@ -58,9 +58,9 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PAC/SHMInfo_Server/src/SHMSession.cc b/MAC/APL/PAC/SHMInfo_Server/src/SHMSession.cc index 824fa7a6b1c..8b8e2339c43 100644 --- a/MAC/APL/PAC/SHMInfo_Server/src/SHMSession.cc +++ b/MAC/APL/PAC/SHMInfo_Server/src/SHMSession.cc @@ -962,8 +962,7 @@ GCFEvent::TResult SHMSession::getAntennaCorrelation_state(GCFEvent& e, GCFPortIn //MAXMOD the constant SubbandSelection::XLET is defined in LOFAR/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SubbandSelection.h //LOG_DEBUG(formatString("MAXMOD SubbandSelection::XLET is %d",SubbandSelection::XLET)); setsubbands.subbands.setType(SubbandSelection::XLET); - - setsubbands.subbands().resize(1,1); + setsubbands.subbands.crosslets().resize(1,1); list<int> subbandlist; for (int rcu = 0; rcu < _nrOfRCUs / N_POL; rcu++){ //for (int rcu = 0; rcu < _nrOfRCUs ; rcu++){ @@ -971,12 +970,12 @@ GCFEvent::TResult SHMSession::getAntennaCorrelation_state(GCFEvent& e, GCFPortIn LOG_DEBUG(formatString("MAXMOD rcu = %d", rcu)); } LOG_DEBUG(formatString("MAXMOD subbands - type %d ",setsubbands.subbands.getType())); - LOG_DEBUG(formatString("MAXMOD subbands - first dim %d ",setsubbands.subbands().extent(firstDim))); - LOG_DEBUG(formatString("MAXMOD subbands - second dim %d ",setsubbands.subbands().extent(secondDim))); + LOG_DEBUG(formatString("MAXMOD subbands - first dim %d ",setsubbands.subbands.crosslets().extent(firstDim))); + LOG_DEBUG(formatString("MAXMOD subbands - second dim %d ",setsubbands.subbands.crosslets().extent(secondDim))); LOG_DEBUG_STR("itsRCU:" << string(setsubbands.rcumask.to_string<char,char_traits<char>,allocator<char> >())); std::list<int>::iterator it = subbandlist.begin(); - setsubbands.subbands() = (*it); + setsubbands.subbands.crosslets() = (*it); if (!_rspDriverPort.send(setsubbands)) { SEND_RESP_MSG((*pIn), AntennaCorrelationMatrixResponse, "NAK (lost connection to rsp driver)"); diff --git a/MAC/APL/PAC/SHMInfo_Server/src/XCStatistics.cc b/MAC/APL/PAC/SHMInfo_Server/src/XCStatistics.cc index 244a6824d77..d044dc6853a 100644 --- a/MAC/APL/PAC/SHMInfo_Server/src/XCStatistics.cc +++ b/MAC/APL/PAC/SHMInfo_Server/src/XCStatistics.cc @@ -32,25 +32,25 @@ using namespace blitz; namespace LOFAR { namespace SHM_Protocol { - unsigned int XCStatistics::getSize() + size_t XCStatistics::getSize() const { - return MSH_ARRAY_SIZE(m_xstatistics, complex<double>); + return MSH_size(m_xstatistics); } - unsigned int XCStatistics::pack (void* buffer) + size_t XCStatistics::pack (char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, m_xstatistics, complex<double>); + MSH_pack(buffer, offset, m_xstatistics); return offset; } - unsigned int XCStatistics::unpack(void *buffer) + size_t XCStatistics::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, m_xstatistics, complex<double>, 4); + MSH_unpack(buffer, offset, m_xstatistics); return offset; } diff --git a/MAC/APL/PAC/SHMInfo_Server/src/XCStatistics.h b/MAC/APL/PAC/SHMInfo_Server/src/XCStatistics.h index a572979255c..c6ec991ed51 100644 --- a/MAC/APL/PAC/SHMInfo_Server/src/XCStatistics.h +++ b/MAC/APL/PAC/SHMInfo_Server/src/XCStatistics.h @@ -54,9 +54,9 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PIC/RSP_Driver/src/BMRead.cc b/MAC/APL/PIC/RSP_Driver/src/BMRead.cc new file mode 100644 index 00000000000..1f562604615 --- /dev/null +++ b/MAC/APL/PIC/RSP_Driver/src/BMRead.cc @@ -0,0 +1,108 @@ +//# BMRead.cc: implementation of the BMRead class +//# +//# Copyright (C) 2002-2004 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: BMRead.cc 18124 2011-05-29 19:54:09Z schoenmakers $ + +#include <lofar_config.h> +#include <Common/LofarLogger.h> + +#include <APL/RSP_Protocol/RSP_Protocol.ph> +#include <APL/RSP_Protocol/EPA_Protocol.ph> +#include <APL/RTCCommon/PSAccess.h> +#include <blitz/array.h> + +#include "StationSettings.h" +#include "BMRead.h" +#include "Cache.h" + +using namespace blitz; +using namespace LOFAR; +using namespace RSP; +using namespace RTC; + +BMRead::BMRead(GCFPortInterface& board_port, int board_id) + : SyncAction(board_port, board_id, 1) +{ + memset(&itsHdr, 0, sizeof(MEPHeader)); +} + +BMRead::~BMRead() +{ +} + +void BMRead::sendrequest() +{ + if ((( Cache::getInstance().getBack().getVersions().bp()(getBoardId()).fpga_maj * 10) + + Cache::getInstance().getBack().getVersions().bp()(getBoardId()).fpga_min) < 74) { + LOG_DEBUG_STR(formatString("BMRead:: Firmware on board[%d], has NO bitmode support", getBoardId())); + Cache::getInstance().getState().bmState().unmodified(getBoardId()); + setContinue(true); // continue with next action + setFinished(); + } + else { + EPAReadEvent bmread; + bmread.hdr.set(MEPHeader::RSR_BEAMMODE_HDR, + MEPHeader::DST_RSP, + MEPHeader::READ ); + + itsHdr = bmread.hdr; + getBoardPort().send(bmread); + LOG_DEBUG_STR("BMRead::sendrequest() done"); + } +} + +void BMRead::sendrequest_status() +{ + /* intentionally left empty */ +} + +GCFEvent::TResult BMRead::handleack(GCFEvent& event, GCFPortInterface& /*port*/) +{ + if (EPA_RSR_BEAMMODE != event.signal) + { + LOG_WARN("BMRead::handleack: unexpected ack"); + return GCFEvent::NOT_HANDLED; + } + + // unpack bm message + EPARsrBeammodeEvent bm(event); + + LOG_DEBUG_STR(formatString("BM supported = %d", bm.beammode.bm_max)); + LOG_DEBUG_STR(formatString("BM selected = %d", bm.beammode.bm_select)); + + if (!bm.hdr.isValidAck(itsHdr)) + { + Cache::getInstance().getState().bmState().read_error(getBoardId()); + LOG_ERROR("BMRead::handleack: invalid ack"); + return GCFEvent::NOT_HANDLED; + } + + LOG_DEBUG("handleack"); + + LOG_DEBUG(formatString(">>>> BMRead(%s)", getBoardPort().getName().c_str())); + + Cache::getInstance().getBack().getBitModeInfo()()(getBoardId()).bm_select = bm.beammode.bm_select; + Cache::getInstance().getBack().getBitModeInfo()()(getBoardId()).bm_max = bm.beammode.bm_max; + + Cache::getInstance().getState().bmState().read_ack(getBoardId()); + + LOG_DEBUG_STR("BMRead::handleack() done"); + return GCFEvent::HANDLED; +} diff --git a/MAC/APL/PIC/RSP_Driver/src/BMRead.h b/MAC/APL/PIC/RSP_Driver/src/BMRead.h new file mode 100644 index 00000000000..959910abd3d --- /dev/null +++ b/MAC/APL/PIC/RSP_Driver/src/BMRead.h @@ -0,0 +1,68 @@ +//# -*- mode: c++ -*- +//# +//# BMRead.h: Synchronize subbands selection settings with RSP hardware. +//# +//# Copyright (C) 2002-2004 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: BMRead.h 6853 2005-10-21 10:55:56Z wierenga $ + +#ifndef BMREAD_H_ +#define BMREAD_H_ + +#include <Common/LofarTypes.h> +#include <APL/RSP_Protocol/MEPHeader.h> + +#include "SyncAction.h" + +namespace LOFAR { + namespace RSP { + + class BMRead : public SyncAction + { + public: + /** + * Constructors for a BMRead object. + */ + BMRead(GCFPortInterface& board_port, int board_id); + + /* Destructor for BMRead. */ + virtual ~BMRead(); + + /** + * Read subband selection info. + */ + virtual void sendrequest(); + + /** + * Read the board status. + */ + virtual void sendrequest_status(); + + /** + * Handle the READRES message. + */ + virtual GCFEvent::TResult handleack(GCFEvent& event, GCFPortInterface& port); + + private: + EPA_Protocol::MEPHeader itsHdr; + }; + }; +}; + +#endif /* BMREAD_H_ */ diff --git a/MAC/APL/PIC/RSP_Driver/src/BMWrite.cc b/MAC/APL/PIC/RSP_Driver/src/BMWrite.cc new file mode 100644 index 00000000000..e884df65895 --- /dev/null +++ b/MAC/APL/PIC/RSP_Driver/src/BMWrite.cc @@ -0,0 +1,114 @@ +//# BMWrite.cc: implementation of the BMWrite class +//# +//# Copyright (C) 2002-2004 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: BMWrite.cc 18124 2011-05-29 19:54:09Z schoenmakers $ + +#include <lofar_config.h> +#include <Common/LofarLogger.h> + +#include <APL/RSP_Protocol/RSP_Protocol.ph> +#include <APL/RSP_Protocol/EPA_Protocol.ph> +#include <APL/RTCCommon/PSAccess.h> +#include <blitz/array.h> + +#include "StationSettings.h" +#include "BMWrite.h" +#include "Cache.h" + +#define N_RETRIES 3 + +using namespace blitz; +using namespace LOFAR; +using namespace RSP; +using namespace RTC; + +BMWrite::BMWrite(GCFPortInterface& board_port, int board_id) + : SyncAction(board_port, board_id, 1) +{ + memset(&itsHdr, 0, sizeof(MEPHeader)); +} + +BMWrite::~BMWrite() +{ + /* TODO: delete event? */ +} + +void BMWrite::sendrequest() +{ + if ((( Cache::getInstance().getBack().getVersions().bp()(getBoardId()).fpga_maj * 10) + + Cache::getInstance().getBack().getVersions().bp()(getBoardId()).fpga_min) < 74) { + LOG_DEBUG_STR(formatString("BMWrite:: Firmware on board[%d], has NO bitmode support", getBoardId())); + Cache::getInstance().getState().bmState().read_ack(getBoardId()); + setContinue(true); // continue with next action + setFinished(); + } + else { + + LOG_DEBUG(formatString(">>>> BMWrite(%s) boardId=%d", + getBoardPort().getName().c_str(), + getBoardId())); + + // skip update if the neither of the RCU's settings have been modified + if (RTC::RegisterState::WRITE != Cache::getInstance().getState().bmState().get(getBoardId())) { + Cache::getInstance().getState().bmState().unmodified(getBoardId()); + setContinue(true); + setFinished(); + return; + } + + // send subband select message + EPARsrBeammodeEvent bm; + bm.hdr.set(MEPHeader::RSR_BEAMMODE_HDR, + MEPHeader::DST_ALL); + + bm.beammode.bm_select = Cache::getInstance().getBack().getBitModeInfo()()(getBoardId()).bm_select; + + itsHdr = bm.hdr; +LOG_INFO_STR(bm); + getBoardPort().send(bm); + } +} + +void BMWrite::sendrequest_status() +{ + // intentionally left empty +} + +GCFEvent::TResult BMWrite::handleack(GCFEvent& event, GCFPortInterface& /*port*/) +{ + if (EPA_WRITEACK != event.signal) + { + LOG_WARN("BMWrite::handleack: unexpected ack"); + return GCFEvent::NOT_HANDLED; + } + + EPAWriteackEvent bm(event); + + if (!bm.hdr.isValidAck(itsHdr)) + { + Cache::getInstance().getState().bmState().write_error(getBoardId()); + LOG_ERROR("BMWrite::handleack: invalid ack"); + return GCFEvent::NOT_HANDLED; + } + + Cache::getInstance().getState().bmState().write_ack(getBoardId()); + + return GCFEvent::HANDLED; +} diff --git a/MAC/APL/PIC/RSP_Driver/src/BMWrite.h b/MAC/APL/PIC/RSP_Driver/src/BMWrite.h new file mode 100644 index 00000000000..cff5d3910ce --- /dev/null +++ b/MAC/APL/PIC/RSP_Driver/src/BMWrite.h @@ -0,0 +1,68 @@ +//# -*- mode: c++ -*- +//# +//# BMWrite.h: Synchronize Bitmode settings with RSP hardware. +//# +//# Copyright (C) 2002-2004 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: BMWrite.h 6853 2005-10-21 10:55:56Z wierenga $ + +#ifndef BMWRITE_H_ +#define BMWRITE_H_ + +#include <Common/LofarTypes.h> +#include <APL/RSP_Protocol/MEPHeader.h> + +#include "SyncAction.h" + +namespace LOFAR { + namespace RSP { + + class BMWrite : public SyncAction + { + public: + /** + * Constructors for a BMWrite object. + */ + BMWrite(GCFPortInterface& board_port, int board_id); + + /* Destructor for BMWrite. */ + virtual ~BMWrite(); + + /** + * Write subband selection info. + */ + virtual void sendrequest(); + + /** + * Read the board status. + */ + virtual void sendrequest_status(); + + /** + * Handle the READRES message. + */ + virtual GCFEvent::TResult handleack(GCFEvent& event, GCFPortInterface& port); + + private: + EPA_Protocol::MEPHeader itsHdr; + }; + }; +}; + +#endif /* BMWRITE_H_ */ diff --git a/MAC/APL/PIC/RSP_Driver/src/BWRead.cc b/MAC/APL/PIC/RSP_Driver/src/BWRead.cc index a59fae3a8d2..a8d2f4266f0 100644 --- a/MAC/APL/PIC/RSP_Driver/src/BWRead.cc +++ b/MAC/APL/PIC/RSP_Driver/src/BWRead.cc @@ -42,8 +42,8 @@ using namespace RSP; using namespace EPA_Protocol; BWRead::BWRead(GCFPortInterface& board_port, int board_id, int blp, int regid) - : SyncAction(board_port, board_id, MEPHeader::BF_N_FRAGMENTS), - m_blp(blp), m_regid(regid), m_remaining(0), m_offset(0) + : SyncAction(board_port, board_id, MEPHeader::BF_N_FRAGMENTS*(MAX_BITS_PER_SAMPLE/MIN_BITS_PER_SAMPLE)), + m_blp(blp), m_regid(regid), itsBank(0), m_remaining(0), m_offset(0) { memset(&m_hdr, 0, sizeof(MEPHeader)); } @@ -54,8 +54,13 @@ BWRead::~BWRead() void BWRead::sendrequest() { + int activeBanks = (MAX_BITS_PER_SAMPLE / Cache::getInstance().getBack().getBitsPerSample()); + if (getCurrentIndex() >= (activeBanks*MEPHeader::BF_N_FRAGMENTS)) { + setContinue(true); + } uint8 global_blp = (getBoardId() * NR_BLPS_PER_RSPBOARD) + m_blp; - + itsBank = (getCurrentIndex() / MEPHeader::BF_N_FRAGMENTS) ; + if (m_regid < MEPHeader::BF_XROUT || m_regid > MEPHeader::BF_YIOUT) { LOG_FATAL("invalid regid"); @@ -63,37 +68,53 @@ void BWRead::sendrequest() } // reset m_offset and m_remaining for each register - if (0 == getCurrentIndex()) { + if (0 == (getCurrentIndex()%MEPHeader::BF_N_FRAGMENTS)) { m_remaining = MEPHeader::BF_XROUT_SIZE; // representative for XR, XI, YR, YI size m_offset = 0; } - LOG_DEBUG(formatString(">>>> BWRead(%s) global_blp=%d, regid=%d", + LOG_DEBUG(formatString(">>>> BWRead(%s) global_blp=%d, regid=%d, plane=%d", getBoardPort().getName().c_str(), global_blp, - m_regid)); + m_regid, + itsBank)); // send next BF configure message EPAReadEvent bfcoefs; size_t size = MIN(MEPHeader::FRAGMENT_SIZE, m_remaining); - switch (m_regid) - { + switch (m_regid) { case MEPHeader::BF_XROUT: - bfcoefs.hdr.set(MEPHeader::BF_XROUT_HDR, 1 << m_blp, - MEPHeader::READ, size, m_offset); + bfcoefs.hdr.set( MEPHeader::READ, + 1 << m_blp, + MEPHeader::BF, + MEPHeader::BF_XROUT+(itsBank*4), + size, + m_offset); break; case MEPHeader::BF_XIOUT: - bfcoefs.hdr.set(MEPHeader::BF_XIOUT_HDR, 1 << m_blp, - MEPHeader::READ, size, m_offset); + bfcoefs.hdr.set( MEPHeader::READ, + 1 << m_blp, + MEPHeader::BF, + MEPHeader::BF_XIOUT+(itsBank*4), + size, + m_offset); break; case MEPHeader::BF_YROUT: - bfcoefs.hdr.set(MEPHeader::BF_YROUT_HDR, 1 << m_blp, - MEPHeader::READ, size, m_offset); + bfcoefs.hdr.set( MEPHeader::READ, + 1 << m_blp, + MEPHeader::BF, + MEPHeader::BF_YROUT+(itsBank*4), + size, + m_offset); break; case MEPHeader::BF_YIOUT: - bfcoefs.hdr.set(MEPHeader::BF_YIOUT_HDR, 1 << m_blp, - MEPHeader::READ, size, m_offset); + bfcoefs.hdr.set( MEPHeader::READ, + 1 << m_blp, + MEPHeader::BF, + MEPHeader::BF_YIOUT+(itsBank*4), + size, + m_offset); break; } @@ -108,7 +129,7 @@ void BWRead::sendrequest_status() GCFEvent::TResult BWRead::handleack(GCFEvent& event, GCFPortInterface& /*port*/) { - if (EPA_BF_COEFS_READ != event.signal) + if ((event.signal < EPA_BF_COEFS_READ) || (event.signal > (EPA_BF_COEFS_READ+15))) { LOG_WARN("BWRead::handleack: unexpected ack"); return GCFEvent::NOT_HANDLED; @@ -144,7 +165,7 @@ GCFEvent::TResult BWRead::handleack(GCFEvent& event, GCFPortInterface& /*port*/) // substract cache contents from weights // if there is a difference, log a warning // - weights -= Cache::getInstance().getBack().getBeamletWeights()()(0, Range(global_blp * 2, global_blp * 2 + 1), target_range); + weights -= Cache::getInstance().getBack().getBeamletWeights()()(0, Range(global_blp * 2, global_blp * 2 + 1), itsBank, target_range); complex<int16> errorsum(sum(weights)); if (complex<int16>(0) != errorsum) @@ -156,11 +177,11 @@ GCFEvent::TResult BWRead::handleack(GCFEvent& event, GCFPortInterface& /*port*/) else { // X - Cache::getInstance().getBack().getBeamletWeights()()(0, global_blp * 2, target_range) + Cache::getInstance().getBack().getBeamletWeights()()(0, global_blp * 2, itsBank, target_range) = weights(Range::all(), 0); // Y - Cache::getInstance().getBack().getBeamletWeights()()(0, global_blp * 2 + 1, target_range) + Cache::getInstance().getBack().getBeamletWeights()()(0, global_blp * 2 + 1, itsBank, target_range) = weights(Range::all(), 1); } diff --git a/MAC/APL/PIC/RSP_Driver/src/BWRead.h b/MAC/APL/PIC/RSP_Driver/src/BWRead.h index 01077de2f40..a72c381ade4 100644 --- a/MAC/APL/PIC/RSP_Driver/src/BWRead.h +++ b/MAC/APL/PIC/RSP_Driver/src/BWRead.h @@ -61,6 +61,7 @@ namespace LOFAR { private: int m_blp; int m_regid; + int itsBank; size_t m_remaining; // how much to read size_t m_offset; // where to read diff --git a/MAC/APL/PIC/RSP_Driver/src/BWWrite.cc b/MAC/APL/PIC/RSP_Driver/src/BWWrite.cc index 1976c5a068e..d04fd573c35 100644 --- a/MAC/APL/PIC/RSP_Driver/src/BWWrite.cc +++ b/MAC/APL/PIC/RSP_Driver/src/BWWrite.cc @@ -45,9 +45,10 @@ using namespace RSP; using namespace EPA_Protocol; BWWrite::BWWrite(GCFPortInterface& board_port, int board_id, int blp, int regid) - : SyncAction(board_port, board_id, MEPHeader::BF_N_FRAGMENTS), - m_blp(blp), m_regid(regid), m_remaining(0), m_offset(0) + : SyncAction(board_port, board_id, MEPHeader::BF_N_FRAGMENTS*MAX_NR_BM_BANKS), + m_blp(blp), m_regid(regid), itsBank(0), itsActiveBanks(1), m_remaining(0), m_offset(0) { + memset(&m_hdr, 0, sizeof(MEPHeader)); } @@ -57,12 +58,23 @@ BWWrite::~BWWrite() void BWWrite::sendrequest() { - uint8 global_blp = (getBoardId() * NR_BLPS_PER_RSPBOARD) + m_blp; - + itsActiveBanks = (MAX_BITS_PER_SAMPLE / Cache::getInstance().getBack().getBitsPerSample()); + uint8 global_blp = (getBoardId() * NR_BLPS_PER_RSPBOARD) + m_blp; + if (getCurrentIndex() >= (itsActiveBanks*MEPHeader::BF_N_FRAGMENTS)) { + if (getCurrentIndex() == (MEPHeader::BF_N_FRAGMENTS*MAX_NR_BM_BANKS - 1)) { + Cache::getInstance().getState().bf().write_ack(global_blp * MEPHeader::N_PHASEPOL + m_regid); + } + setContinue(true); + return; + } + + + itsBank = (getCurrentIndex() / MEPHeader::BF_N_FRAGMENTS) ; + // no conditional, update every second // reset m_offset and m_remaining for each register - if (0 == getCurrentIndex()) { + if (0 == (getCurrentIndex()%MEPHeader::BF_N_FRAGMENTS)) { m_offset = MEPHeader::N_LOCAL_XLETS * MEPHeader::WEIGHT_SIZE; m_remaining = MEPHeader::BF_XROUT_SIZE - m_offset; // representative for XR, XI, YR, YI size } @@ -72,9 +84,6 @@ void BWWrite::sendrequest() exit(EXIT_FAILURE); } - LOG_DEBUG(formatString(">>>> BWWrite(%s) global_blp=%d, blp=%d, regid=%d, m_offset=%d, m_remaining=%d", - getBoardPort().getName().c_str(), global_blp, m_blp, m_regid, m_offset, m_remaining)); - // send next BF configure message EPABfCoefsWriteEvent bfcoefs; @@ -86,19 +95,46 @@ void BWWrite::sendrequest() switch (m_regid) { case MEPHeader::BF_XROUT: - bfcoefs.hdr.set(MEPHeader::BF_XROUT_HDR, 1 << m_blp, MEPHeader::WRITE, size, m_offset); + bfcoefs.hdr.set( MEPHeader::WRITE, + 1 << m_blp, + MEPHeader::BF, + MEPHeader::BF_XROUT+(itsBank*4), + size, + m_offset); break; case MEPHeader::BF_XIOUT: - bfcoefs.hdr.set(MEPHeader::BF_XIOUT_HDR, 1 << m_blp, MEPHeader::WRITE, size, m_offset); + bfcoefs.hdr.set( MEPHeader::WRITE, + 1 << m_blp, + MEPHeader::BF, + MEPHeader::BF_XIOUT+(itsBank*4), + size, + m_offset); break; case MEPHeader::BF_YROUT: - bfcoefs.hdr.set(MEPHeader::BF_YROUT_HDR, 1 << m_blp, MEPHeader::WRITE, size, m_offset); + bfcoefs.hdr.set( MEPHeader::WRITE, + 1 << m_blp, + MEPHeader::BF, + MEPHeader::BF_YROUT+(itsBank*4), + size, + m_offset); break; case MEPHeader::BF_YIOUT: - bfcoefs.hdr.set(MEPHeader::BF_YIOUT_HDR, 1 << m_blp, MEPHeader::WRITE, size, m_offset); + bfcoefs.hdr.set( MEPHeader::WRITE, + 1 << m_blp, + MEPHeader::BF, + MEPHeader::BF_YIOUT+(itsBank*4), + size, + m_offset); break; } - + +#if 0 + if (getBoardId() == 11) { + LOG_INFO_STR("BWWrite:board:" << getBoardId() << ",global_blp=" << (int)global_blp << ",bank=" << itsBank + << "," << bfcoefs.hdr); + } +#endif + // create blitz view om the weights in the bfcoefs message to be sent to the RSP hardware int nbeamlets_per_fragment = MEPHeader::N_BEAMLETS / MEPHeader::BF_N_FRAGMENTS; Array<complex<int16>, 2> weights(nbeamlets_per_fragment, N_POL); @@ -120,22 +156,23 @@ void BWWrite::sendrequest() ASSERT(MEPHeader::N_BEAMLETS % MEPHeader::BF_N_FRAGMENTS == 0); for (int lane = 0; lane < MEPHeader::N_SERDES_LANES; lane++) { - int hw_offset = lane; - int cache_offset = lane * (MEPHeader::N_BEAMLETS / MEPHeader::N_SERDES_LANES) + (getCurrentIndex() * nbeamlets_per_fragment / MEPHeader::N_SERDES_LANES); + int cache_offset = lane * (MEPHeader::N_BEAMLETS / MEPHeader::N_SERDES_LANES) + ((getCurrentIndex() % MEPHeader::BF_N_FRAGMENTS) * nbeamlets_per_fragment / MEPHeader::N_SERDES_LANES); Range hw_range(hw_offset, hw_offset + nbeamlets_per_fragment - MEPHeader::N_BLPS, MEPHeader::N_BLPS); Range cache_range(cache_offset, cache_offset + (nbeamlets_per_fragment / MEPHeader::N_SERDES_LANES) - 1, 1); - - LOG_DEBUG_STR("lane=" << lane); - LOG_DEBUG_STR("hw_range=" << hw_range); - LOG_DEBUG_STR("cache_range=" << cache_range); - +#if 0 + if (getBoardId() == 11) { + LOG_INFO_STR("board=" << getBoardId() << ",bank=" << itsBank << ",lane=" << lane + << (m_regid / 2 ? ",Y" : ",X") << (m_regid % 2 ? "I" : "R") + << ", hw_range=" << hw_range << ", cache_range=" << cache_range); + } +#endif // X = normal 0 - weights(hw_range, 0) = Cache::getInstance().getBack().getBeamletWeights()()(0, global_blp * 2, cache_range); + weights(hw_range, 0) = Cache::getInstance().getBack().getBeamletWeights()()(0, global_blp * 2, itsBank, cache_range); // Y = normal 1 - weights(hw_range, 1) = Cache::getInstance().getBack().getBeamletWeights()()(0, global_blp * 2 + 1, cache_range); + weights(hw_range, 1) = Cache::getInstance().getBack().getBeamletWeights()()(0, global_blp * 2 + 1, itsBank, cache_range); #if 0 mapped_index(hw_range, 0) = index(cache_range, 0); @@ -245,6 +282,7 @@ void BWWrite::sendrequest_status() GCFEvent::TResult BWWrite::handleack(GCFEvent& event, GCFPortInterface& /*port*/) { if (EPA_WRITEACK != event.signal) { + LOG_INFO_STR(formatString("event.signal=%d", event.signal)); LOG_WARN("BWWrite::handleack: unexpected ack"); return GCFEvent::NOT_HANDLED; } @@ -264,7 +302,7 @@ GCFEvent::TResult BWWrite::handleack(GCFEvent& event, GCFPortInterface& /*port*/ // // Last fragment signals completion // - if (MEPHeader::MEPHeader::BF_N_FRAGMENTS - 1 == getCurrentIndex()) { + if ((MEPHeader::BF_N_FRAGMENTS*itsActiveBanks-1) == getCurrentIndex()) { Cache::getInstance().getState().bf().write_ack(global_blp * MEPHeader::N_PHASEPOL + m_regid); } } diff --git a/MAC/APL/PIC/RSP_Driver/src/BWWrite.h b/MAC/APL/PIC/RSP_Driver/src/BWWrite.h index a1f8b450a52..bc8a9c8dc72 100644 --- a/MAC/APL/PIC/RSP_Driver/src/BWWrite.h +++ b/MAC/APL/PIC/RSP_Driver/src/BWWrite.h @@ -62,6 +62,8 @@ public: private: int m_blp; int m_regid; + int itsBank; + int itsActiveBanks; size_t m_remaining; // how much to write size_t m_offset; // where to write diff --git a/MAC/APL/PIC/RSP_Driver/src/BstRead.cc b/MAC/APL/PIC/RSP_Driver/src/BstRead.cc index 18ae05daff8..7f59eb6bb18 100644 --- a/MAC/APL/PIC/RSP_Driver/src/BstRead.cc +++ b/MAC/APL/PIC/RSP_Driver/src/BstRead.cc @@ -22,6 +22,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> +#include <Common/hexdump.h> #include <APL/RSP_Protocol/Statistics.h> #include <APL/RSP_Protocol/EPA_Protocol.ph> @@ -37,10 +38,12 @@ using namespace RSP; using namespace EPA_Protocol; using namespace RSP_Protocol; -BstRead::BstRead(GCFPortInterface& board_port, int board_id) - : SyncAction(board_port, board_id, MEPHeader::N_SERDES_LANES) +BstRead::BstRead(GCFPortInterface& board_port, int board_id, int lane_id) + : SyncAction(board_port, board_id, MEPHeader::N_SERDES_LANES) // MEPHeader::MAX_N_BANKS in new firmware { - memset(&m_hdr, 0, sizeof(MEPHeader)); + itsLaneId = lane_id; + itsRealLaneId = (lane_id < 10)?lane_id:(lane_id-10); + memset(&m_hdr, 0, sizeof(MEPHeader)); } BstRead::~BstRead() @@ -49,23 +52,48 @@ BstRead::~BstRead() void BstRead::sendrequest() { - EPAReadEvent bstread; - - Cache::getInstance().getState().bst().read(getBoardId()); - - bstread.hdr.set(MEPHeader::READ, - MEPHeader::DST_RSP, - MEPHeader::BST, - getCurrentIndex(), - MEPHeader::BST_POWER_SIZE); - - m_hdr = bstread.hdr; - getBoardPort().send(bstread); + if ((itsLaneId >= 10) && !Cache::getInstance().getBack().isSplitterActive()) { + setContinue(true); + return; + } + + if ((( Cache::getInstance().getBack().getVersions().bp()(getBoardId()).fpga_maj * 10) + + Cache::getInstance().getBack().getVersions().bp()(getBoardId()).fpga_min ) < 74) { + // if old firmware version do + if (getCurrentIndex() != itsRealLaneId) { + setContinue(true); + return; + } + } + else { + // if new firmware version do + if (getCurrentIndex() >= (MAX_BITS_PER_SAMPLE / Cache::getInstance().getBack().getBitsPerSample())) { + setContinue(true); + return; + } + } + + EPAReadEvent bstread; + + bstread.hdr.set(MEPHeader::READ, MEPHeader::DST_RSP, MEPHeader::BST, getCurrentIndex(), MEPHeader::BST_POWER_SIZE); + m_hdr = bstread.hdr; + getBoardPort().send(bstread); + +#if 0 +string s; +hexdump(s, (void*)&bstread, sizeof(bstread)); +LOG_INFO_STR("BSTREADREQUEST=" << s); +LOG_INFO(formatString("BSTREAD:board=%d,dstid=%d,pid=%d,regid=%d,offset=%d,payload=%d,seqnr=%d", getBoardId(), bstread.hdr.m_fields.addr.dstid, bstread.hdr.m_fields.addr.pid, bstread.hdr.m_fields.addr.regid, bstread.hdr.m_fields.offset, bstread.hdr.m_fields.payload_length, bstread.hdr.m_fields.seqnr)); + +if (getBoardId() == 11) { + LOG_INFO(formatString("BSTREAD:board=%d,dstid=%d,pid=%d,regid=%d,offset=%d,payload=%d,seqnr=%d", getBoardId(), bstread.hdr.m_fields.addr.dstid, bstread.hdr.m_fields.addr.pid, bstread.hdr.m_fields.addr.regid, bstread.hdr.m_fields.offset, bstread.hdr.m_fields.payload_length, bstread.hdr.m_fields.seqnr)); +} +#endif } void BstRead::sendrequest_status() { - // intentionally left empty + // intentionally left empty } /** @@ -75,65 +103,85 @@ void BstRead::sendrequest_status() BZ_DECLARE_FUNCTION_RET(convert_uint32_to_double, double) inline double convert_uint32_to_double(uint32 val) { - int64 val64; - - uint32 e = val & (1<<31); - uint32 s = val & (1<<30); - int32 m = val & ((1<<30)-1); - - if (s) m = m - (1<<30); - if (e) { - val64 = (int64)m << 23; - } else { - val64 = m; - } - - return (double)(val64); + int64 val64; + // check if extent bit(bit31) is high + if (val & (1 << 31)) { + // if extent = high, multiply mantissa(bit30..0) by 2^23 + val64 = (int64)(val & ~(1 << 31)) << 23; + } + else { + val64 = (int64)val; + } + +/* + uint32 e = val & (1<<31); + uint32 s = val & (1<<30); + int32 m = val & ((1<<30)-1); + + if (s) m = m - (1<<30); + if (e) { + val64 = (int64)m << 23); + } else { + val64 = m; + } +*/ + return (double)(val64); } GCFEvent::TResult BstRead::handleack(GCFEvent& event, GCFPortInterface& /*port*/) { - if (EPA_BST_STATS != event.signal) { - LOG_WARN("BstRead::handleack: unexpected ack"); - return GCFEvent::NOT_HANDLED; - } - - EPABstStatsEvent ack(event); - - if (!ack.hdr.isValidAck(m_hdr)) { - Cache::getInstance().getState().bst().read_error(getBoardId()); - LOG_ERROR("BstRead::handleack: invalid ack"); - return GCFEvent::NOT_HANDLED; - } - - LOG_DEBUG(formatString("BstRead::handleack: boardid=%d", getBoardId())); - - Range fragment_range(0, MEPHeader::N_DATA_SLOTS - 1); - fragment_range = fragment_range + (getCurrentIndex() * MEPHeader::N_DATA_SLOTS); - -// LOG_INFO_STR("fragment_range[" << getBoardId() << "," << getCurrentIndex() << "]=" << fragment_range); + if (EPA_BST_STATS != event.signal) { + LOG_WARN("BstRead::handleack: unexpected ack"); + return GCFEvent::NOT_HANDLED; + } + + EPABstStatsEvent ack(event); + + if (!ack.hdr.isValidAck(m_hdr)) { + Cache::getInstance().getState().bst().read_error(itsRealLaneId); + LOG_ERROR("BstRead::handleack: invalid ack"); + return GCFEvent::NOT_HANDLED; + } + + LOG_DEBUG(formatString("BstRead::handleack: boardid=%d lane=%d", getBoardId(), itsLaneId)); + + int swstart; + // In new firmware versions BST registers are used in a different way + if ((( Cache::getInstance().getBack().getVersions().bp()(getBoardId()).fpga_maj * 10) + + Cache::getInstance().getBack().getVersions().bp()(getBoardId()).fpga_min ) < 74) { + swstart = (itsRealLaneId * MEPHeader::N_BEAMLETS); + } + else { + swstart = (itsRealLaneId * MEPHeader::N_BEAMLETS) + (getCurrentIndex() * MEPHeader::N_DATA_SLOTS); + } + + Range fragment_range(swstart, swstart+MEPHeader::N_DATA_SLOTS-1); + + // normal set 0/1, if splitter active also 2/3 + int beamletsSet = (itsLaneId < 10)?0:2; - if (getCurrentIndex() != ack.hdr.m_fields.addr.regid) { - LOG_ERROR("invalid bst ack"); - return GCFEvent::HANDLED; - } + LOG_DEBUG_STR("fragment_range[" << getBoardId() << "," << getCurrentIndex() << "]=" << fragment_range); - Array<uint32, 2> stats((uint32*)&ack.stat, - shape((MEPHeader::BST_POWER_SIZE / sizeof(uint32)) / N_POL, N_POL), neverDeleteData); + if (getCurrentIndex() != ack.hdr.m_fields.addr.regid) { + LOG_ERROR("invalid bst ack"); + return GCFEvent::HANDLED; + } - Array<double, 2>& cache(Cache::getInstance().getBack().getBeamletStats()()); + Array<uint32, 2> stats((uint32*)&ack.stat, + shape((MEPHeader::BST_POWER_SIZE / sizeof(uint32)) / N_POL, N_POL), neverDeleteData); + LOG_DEBUG(formatString("real_lane=%d, beamletsSet=%d, swstart=%d", itsRealLaneId, beamletsSet, swstart)); + LOG_DEBUG_STR("stats:" << stats); + Array<double, 2>& cache(Cache::getInstance().getBack().getBeamletStats()()); - // x-pol beamlet statistics: copy and convert to double - cache(getBoardId() * 2, fragment_range) = - convert_uint32_to_double(stats(Range::all(), 0)); + // x-pol beamlet statistics: copy and convert to double + cache(beamletsSet, fragment_range) = + convert_uint32_to_double(stats(Range::all(), 0)); - // y-pol beamlet statistics: copy and convert to double - cache(getBoardId() * 2 + 1, fragment_range) = - convert_uint32_to_double(stats(Range::all(), 1)); + // y-pol beamlet statistics: copy and convert to double + cache(beamletsSet + 1, fragment_range) = + convert_uint32_to_double(stats(Range::all(), 1)); - if (getCurrentIndex() == MEPHeader::N_SERDES_LANES - 1) { - Cache::getInstance().getState().bst().read_ack(getBoardId()); - } + Cache::getInstance().getState().bst().read_ack(itsRealLaneId); - return GCFEvent::HANDLED; + return GCFEvent::HANDLED; } diff --git a/MAC/APL/PIC/RSP_Driver/src/BstRead.h b/MAC/APL/PIC/RSP_Driver/src/BstRead.h index 5f3f220c201..efbeb5d320e 100644 --- a/MAC/APL/PIC/RSP_Driver/src/BstRead.h +++ b/MAC/APL/PIC/RSP_Driver/src/BstRead.h @@ -38,7 +38,7 @@ namespace LOFAR { /** * Constructors for a BstRead object. */ - BstRead(GCFPortInterface& board_port, int board_id); + BstRead(GCFPortInterface& board_port, int board_id, int lane_id); /* Destructor for BstRead. */ virtual ~BstRead(); @@ -59,6 +59,9 @@ namespace LOFAR { virtual GCFEvent::TResult handleack(GCFEvent& event, GCFPortInterface& port); private: + int itsLaneId; + int itsRealLaneId; + EPA_Protocol::MEPHeader m_hdr; }; }; diff --git a/MAC/APL/PIC/RSP_Driver/src/CDOWrite.cc b/MAC/APL/PIC/RSP_Driver/src/CDOWrite.cc index e5f59990f3c..3eb7db5bed8 100644 --- a/MAC/APL/PIC/RSP_Driver/src/CDOWrite.cc +++ b/MAC/APL/PIC/RSP_Driver/src/CDOWrite.cc @@ -22,6 +22,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> +#include <Common/LofarBitModeInfo.h> #include <APL/RSP_Protocol/RSP_Protocol.ph> #include <APL/RSP_Protocol/EPA_Protocol.ph> @@ -79,7 +80,7 @@ void CDOWrite::setup_udpip_header(uint32 l_srcip, uint32 l_dstip) { uint32 payload_size = EPA_CEP_OUTPUT_HEADER_SIZE + (GET_CONFIG("RSPDriver.CDO_N_BLOCKS", i) - * (MEPHeader::N_PHASEPOL * GET_CONFIG("RSPDriver.CDO_N_BEAMLETS", i)) + * (MEPHeader::N_PHASEPOL * maxDataslotsPerRSP(Cache::getInstance().getBack().getBitsPerSample())) * EPA_CEP_BEAMLET_SIZE); // @@ -192,7 +193,9 @@ void CDOWrite::sendrequest() cdo.ffi = 0xDDCC; cdo.nof_blocks = GET_CONFIG("RSPDriver.CDO_N_BLOCKS", i); - cdo.nof_beamlets = GET_CONFIG("RSPDriver.CDO_N_BEAMLETS", i); + + //GET_CONFIG("RSPDriver.CDO_N_BEAMLETS", i); + cdo.nof_beamlets = maxDataslotsPerRSP(Cache::getInstance().getBack().getBitsPerSample()); if (output_lane >= 0) { diff --git a/MAC/APL/PIC/RSP_Driver/src/CMakeLists.txt b/MAC/APL/PIC/RSP_Driver/src/CMakeLists.txt index e6040942970..a1a34da995f 100644 --- a/MAC/APL/PIC/RSP_Driver/src/CMakeLists.txt +++ b/MAC/APL/PIC/RSP_Driver/src/CMakeLists.txt @@ -70,6 +70,9 @@ lofar_add_bin_program(RSPDriver GetDatastreamCmd.cc SetSwapxyCmd.cc GetSwapxyCmd.cc + SetBitModeCmd.cc + GetBitModeCmd.cc + UpdBitModeCmd.cc SyncAction.cc WriteReg.cc ReadReg.cc @@ -111,12 +114,7 @@ lofar_add_bin_program(RSPDriver SerdesRead.cc UpdSplitterCmd.cc LatencyRead.cc - CRSyncWrite.cc) + CRSyncWrite.cc + BMWrite.cc + BMRead.cc) -configure_file( - ${CMAKE_CURRENT_SOURCE_DIR}/rspctl.conf.in - ${CMAKE_CURRENT_BINARY_DIR}/rspctl.conf) - -install(FILES - ${CMAKE_CURRENT_BINARY_DIR}/rspctl.conf - DESTINATION etc) diff --git a/MAC/APL/PIC/RSP_Driver/src/Cache.cc b/MAC/APL/PIC/RSP_Driver/src/Cache.cc index a695219cd1e..52e72fef4d9 100644 --- a/MAC/APL/PIC/RSP_Driver/src/Cache.cc +++ b/MAC/APL/PIC/RSP_Driver/src/Cache.cc @@ -24,6 +24,7 @@ #include <Common/LofarLogger.h> #include <Common/LofarConstants.h> #include <Common/lofar_bitset.h> +#include <Common/LofarBitModeInfo.h> #include "StationSettings.h" #include "Cache.h" @@ -60,31 +61,36 @@ CacheBuffer::CacheBuffer(Cache* cache) : m_cache(cache) m_clock = GET_CONFIG("RSPDriver.DEFAULT_SAMPLING_FREQUENCY", i); // print sizes of the cache - LOG_DEBUG_STR("m_beamletweights().size() =" << m_beamletweights().size() * sizeof(complex<int16>)); - LOG_DEBUG_STR("m_subbandselection().size() =" << m_subbandselection().size() * sizeof(uint16)); - LOG_DEBUG_STR("m_rcusettings().size() =" << m_rcusettings().size() * sizeof(uint8)); - LOG_DEBUG_STR("m_hbasettings().size() =" << m_hbasettings().size() * sizeof(uint8)); - LOG_DEBUG_STR("m_hbareadings().size() =" << m_hbareadings().size() * sizeof(uint8)); - LOG_DEBUG_STR("m_rsusettings().size() =" << m_rsusettings().size() * sizeof(uint8)); - LOG_DEBUG_STR("m_wgsettings().size() =" << m_wgsettings().size() * sizeof(WGSettings::WGRegisterType)); - LOG_DEBUG_STR("m_subbandstats().size() =" << m_subbandstats().size() * sizeof(uint16)); - LOG_DEBUG_STR("m_beamletstats().size() =" << m_beamletstats().size() * sizeof(double)); - LOG_DEBUG_STR("m_xcstats().size() =" << m_xcstats().size() * sizeof(complex<double>)); - LOG_DEBUG_STR("m_systemstatus.board().size() =" << m_systemstatus.board().size() * sizeof(EPA_Protocol::BoardStatus)); - LOG_DEBUG_STR("m_versions.bp().size() =" << m_versions.bp().size() * sizeof(EPA_Protocol::RSRVersion)); - LOG_DEBUG_STR("m_versions.ap().size() =" << m_versions.ap().size() * sizeof(EPA_Protocol::RSRVersion)); - LOG_DEBUG_STR("m_tdstatus.board().size() =" << m_tdstatus.board().size() * sizeof(EPA_Protocol::TDBoardStatus)); - LOG_DEBUG_STR("m_spustatus.subrack().size() =" << m_spustatus.subrack().size() * sizeof(EPA_Protocol::SPUBoardStatus)); - LOG_DEBUG_STR("m_tbbsettings().size() =" << m_tbbsettings().size() * sizeof(bitset<MEPHeader::N_SUBBANDS>)); - LOG_DEBUG_STR("m_bypasssettings().size() =" << m_bypasssettings().size() * sizeof(EPA_Protocol::DIAGBypass)); - LOG_DEBUG_STR("m_rawDataBlock.size() =" << ETH_DATA_LEN + sizeof (uint16)); - LOG_DEBUG_STR("m_SdsWriteBuffer.size() =" << sizeof(itsSdsWriteBuffer)); - LOG_DEBUG_STR("m_SdsReadBuffer.size() =" << sizeof(itsSdsReadBuffer)); - LOG_DEBUG_STR("m_latencys.size() =" << itsLatencys().size() * sizeof(EPA_Protocol::RADLatency)); + LOG_DEBUG_STR("m_beamletweights().size() =" << m_beamletweights().size() * sizeof(complex<int16>)); + LOG_DEBUG_STR("m_subbandselection.crosslets().size()=" << m_subbandselection.crosslets().size() * sizeof(uint16)); + LOG_DEBUG_STR("m_subbandselection.beamlets().size() =" << m_subbandselection.beamlets().size() * sizeof(uint16)); + LOG_DEBUG_STR("m_rcusettings().size() =" << m_rcusettings().size() * sizeof(uint8)); + LOG_DEBUG_STR("m_hbasettings().size() =" << m_hbasettings().size() * sizeof(uint8)); + LOG_DEBUG_STR("m_hbareadings().size() =" << m_hbareadings().size() * sizeof(uint8)); + LOG_DEBUG_STR("m_rsusettings().size() =" << m_rsusettings().size() * sizeof(uint8)); + LOG_DEBUG_STR("m_wgsettings().size() =" << m_wgsettings().size() * sizeof(WGSettings::WGRegisterType)); + LOG_DEBUG_STR("m_subbandstats().size() =" << m_subbandstats().size() * sizeof(uint16)); + LOG_DEBUG_STR("m_beamletstats().size() =" << m_beamletstats().size() * sizeof(double)); + LOG_DEBUG_STR("m_xcstats().size() =" << m_xcstats().size() * sizeof(complex<double>)); + LOG_DEBUG_STR("m_systemstatus.board().size() =" << m_systemstatus.board().size() * sizeof(EPA_Protocol::BoardStatus)); + LOG_DEBUG_STR("m_versions.bp().size() =" << m_versions.bp().size() * sizeof(EPA_Protocol::RSRVersion)); + LOG_DEBUG_STR("m_versions.ap().size() =" << m_versions.ap().size() * sizeof(EPA_Protocol::RSRVersion)); + LOG_DEBUG_STR("m_tdstatus.board().size() =" << m_tdstatus.board().size() * sizeof(EPA_Protocol::TDBoardStatus)); + LOG_DEBUG_STR("m_spustatus.subrack().size() =" << m_spustatus.subrack().size() * sizeof(EPA_Protocol::SPUBoardStatus)); + LOG_DEBUG_STR("m_tbbsettings().size() =" << m_tbbsettings().size() * sizeof(bitset<MEPHeader::N_SUBBANDS>)); + LOG_DEBUG_STR("m_bypasssettings().size() =" << m_bypasssettings().size() * sizeof(EPA_Protocol::DIAGBypass)); + LOG_DEBUG_STR("m_rawDataBlock.size() =" << ETH_DATA_LEN + sizeof (uint16)); + LOG_DEBUG_STR("m_SdsWriteBuffer.size() =" << sizeof(itsSdsWriteBuffer)); + LOG_DEBUG_STR("m_SdsReadBuffer.size() =" << sizeof(itsSdsReadBuffer)); + LOG_DEBUG_STR("m_latencys.size() =" << itsLatencys().size() * sizeof(EPA_Protocol::RADLatency)); + LOG_DEBUG_STR("itsSwappedXY.size() =" << itsSwappedXY.size()); + LOG_DEBUG_STR("itsBitsModeInfo.size() =" << itsBitModeInfo().size() * sizeof(EPA_Protocol::RSRBeamMode)); + LOG_DEBUG_STR("itsBitsPerSample.size() =" << sizeof(itsBitsPerSample)); LOG_INFO_STR(formatString("CacheBuffer size = %d bytes", m_beamletweights().size() - + m_subbandselection().size() + + m_subbandselection.crosslets().size() + + m_subbandselection.beamlets().size() + m_rcusettings().size() + m_hbasettings().size() + m_hbareadings().size() @@ -109,7 +115,8 @@ CacheBuffer::CacheBuffer(Cache* cache) : m_cache(cache) CacheBuffer::~CacheBuffer() { m_beamletweights().free(); - m_subbandselection().free(); + m_subbandselection.crosslets().free(); + m_subbandselection.beamlets().free(); m_rcusettings().free(); m_hbasettings().free(); m_hbareadings().free(); @@ -127,6 +134,7 @@ CacheBuffer::~CacheBuffer() m_tbbsettings().free(); m_bypasssettings().free(); itsLatencys().free(); + itsBitModeInfo().free(); } void CacheBuffer::reset(void) @@ -138,32 +146,55 @@ void CacheBuffer::reset(void) tv.tv_sec = 0; tv.tv_usec = 0; m_timestamp.set(tv); - m_beamletweights().resize(BeamletWeights::SINGLE_TIMESTEP, StationSettings::instance()->nrRcus(), MEPHeader::N_BEAMLETS); - m_beamletweights() = complex<int16>(0,0); - - m_subbandselection().resize(StationSettings::instance()->nrRcus(), MEPHeader::N_LOCAL_XLETS + MEPHeader::N_BEAMLETS); - m_subbandselection() = 0; - + itsBitsPerSample = MAX_BITS_PER_SAMPLE; + + m_beamletweights().resize( BeamletWeights::SINGLE_TIMESTEP, + StationSettings::instance()->nrRcus(), + MAX_NR_BM_BANKS, + MEPHeader::N_BEAMLETS); + m_beamletweights() = complex<int16>(25,36); +// TODO remove this code!!! + for (int rcu = 0 ; rcu < StationSettings::instance()->nrRcus(); rcu++) { + int16 value=0; + for (int bank = 0; bank < (MAX_BITS_PER_SAMPLE/MIN_BITS_PER_SAMPLE); bank++) { + for (int beamlet = 0; beamlet < MEPHeader::N_BEAMLETS; beamlet++) { + m_beamletweights()(0,rcu,bank,beamlet)=complex<int16>(value++,bank+10); + } + } + } +//TODO + + m_subbandselection.crosslets().resize(StationSettings::instance()->nrRcus(), + (MAX_BITS_PER_SAMPLE/MIN_BITS_PER_SAMPLE), + MEPHeader::N_LOCAL_XLETS ); + m_subbandselection.crosslets() = 0; + m_subbandselection.beamlets().resize(StationSettings::instance()->nrRcus(), + (MAX_BITS_PER_SAMPLE/MIN_BITS_PER_SAMPLE), + MEPHeader::N_BEAMLETS ); + m_subbandselection.beamlets() = 0; + if (GET_CONFIG("RSPDriver.IDENTITY_WEIGHTS", i)) { // these weights ensure that the beamlet statistics // exactly match the subband statistics - m_beamletweights()(Range::all(), Range::all(), Range::all()) = complex<int16>(GET_CONFIG("RSPDriver.BF_GAIN", i), 0); + m_beamletweights() = complex<int16>(GET_CONFIG("RSPDriver.BF_GAIN", i), 0); // // Set default subband selection starting at RSPDriver.FIRST_SUBBAND // int firstSubband = GET_CONFIG("RSPDriver.FIRST_SUBBAND", i); - for (int rcu = 0; rcu < m_subbandselection().extent(firstDim); rcu++) { - for (int rsp = 0; rsp < 4; rsp++) { - int start(rsp*(MEPHeader::N_BEAMLETS/4)); - int stop (start+MAX_BEAMLETS_PER_RSP); - if (rcu==0) LOG_DEBUG_STR("start=" << start << ", stop=" << stop); - for (int sb = start; sb < stop; sb++) { - m_subbandselection()(rcu, sb + MEPHeader::N_LOCAL_XLETS) = (rcu%N_POL) + (sb*N_POL) + (firstSubband*2); - } // for sb - } // for rsp + for (int rcu = 0; rcu < m_subbandselection.beamlets().extent(firstDim); rcu++) { + for (int bank = 0; bank < (MAX_BITS_PER_SAMPLE/MIN_BITS_PER_SAMPLE); bank++) { + for (int lane = 0; lane < MEPHeader::N_SERDES_LANES; lane++) { + int start(lane*(MEPHeader::N_BEAMLETS/MEPHeader::N_SERDES_LANES)); + int stop (start + maxBeamletsPerRSP(itsBitsPerSample)); + if (rcu==0) LOG_DEBUG_STR("start=" << start << ", stop=" << stop); + for (int sb = start; sb < stop; sb++) { + m_subbandselection.beamlets()(rcu, bank, sb) = (rcu%N_POL) + (sb*N_POL) + (firstSubband*2); + } // for sb + } // for lane + } // for bank } // for rcu - LOG_DEBUG_STR("m_subbandsel(0): " << m_subbandselection()(0, Range::all())); + LOG_DEBUG_STR("m_subbandsel(0): " << m_subbandselection.beamlets()(0, Range::all(), Range::all())); } // if identity_weights // initialize RCU settings @@ -200,8 +231,11 @@ void CacheBuffer::reset(void) m_subbandstats().resize(StationSettings::instance()->nrRcus(), MEPHeader::N_SUBBANDS); m_subbandstats() = 0; - - m_beamletstats().resize(StationSettings::instance()->nrRspBoards() * N_POL, MEPHeader::N_BEAMLETS); + + // Number of cep streams -> in normal mode 4, in splitmode 8. + int maxStreams = 8; + m_beamletstats().resize((maxStreams/MEPHeader::N_SERDES_LANES) * N_POL, + (MAX_BITS_PER_SAMPLE/MIN_BITS_PER_SAMPLE) * MEPHeader::N_BEAMLETS); m_beamletstats() = 0; m_xcstats().resize(N_POL, N_POL, StationSettings::instance()->nrBlps(), StationSettings::instance()->nrBlps()); @@ -274,6 +308,14 @@ void CacheBuffer::reset(void) memset(&radlatencyinit, 0, sizeof(RADLatency)); itsLatencys() = radlatencyinit; itsSwappedXY.reset(); + + // BitMode + itsBitModeInfo().resize(StationSettings::instance()->nrRspBoards()); + RSRBeamMode bitmodeinfo; + bitmodeinfo.bm_select = 0; + bitmodeinfo.bm_max = 0; + itsBitModeInfo() = bitmodeinfo; + } diff --git a/MAC/APL/PIC/RSP_Driver/src/Cache.h b/MAC/APL/PIC/RSP_Driver/src/Cache.h index db3d826d0fc..836c32930fa 100644 --- a/MAC/APL/PIC/RSP_Driver/src/Cache.h +++ b/MAC/APL/PIC/RSP_Driver/src/Cache.h @@ -28,6 +28,7 @@ #include <Common/LofarTypes.h> #include <Common/LofarConstants.h> #include <Common/lofar_bitset.h> + #include <blitz/array.h> #include <APL/RSP_Protocol/AllRegisterState.h> #include <APL/RSP_Protocol/RSP_Protocol.ph> @@ -89,6 +90,7 @@ public: SerdesBuffer& getSdsWriteBuffer() { return (itsSdsWriteBuffer); } SerdesBuffer& getSdsReadBuffer(int rspBoardNr); Latency& getLatencys() { return (itsLatencys); } + BitmodeInfo& getBitModeInfo() { return (itsBitModeInfo); } bool isSplitterActive() { return(itsSplitterActive); } void setSplitterActive(bool active) { itsSplitterActive = active; } @@ -99,11 +101,15 @@ public: bool isSwappedXY(int antenna){ return (itsSwappedXY.test(antenna)); } void setSwappedXY(bitset<MAX_ANTENNAS> antennamask) { itsSwappedXY = antennamask; } bitset<MAX_ANTENNAS> getSwappedXY() { return(itsSwappedXY); } - + I2Cuser getI2Cuser() { return (itsI2Cuser); } void setI2Cuser(I2Cuser user) { itsI2Cuser = user; } + + int getBitsPerSample() { return itsBitsPerSample; } + void setBitsPerSample(int bits) { itsBitsPerSample = bits; } /*@}*/ - + + // update timestamp void setTimestamp(const RTC::Timestamp& timestamp); @@ -152,7 +158,9 @@ private: bool itsCepEnabled1; RSP_Protocol::Latency itsLatencys; bitset<MAX_ANTENNAS> itsSwappedXY; - + RSP_Protocol::BitmodeInfo itsBitModeInfo; + int itsBitsPerSample; + Cache* m_cache; // pointer to container }; diff --git a/MAC/APL/PIC/RSP_Driver/src/Command.h b/MAC/APL/PIC/RSP_Driver/src/Command.h index d6664cbb89d..d0b8708a03d 100644 --- a/MAC/APL/PIC/RSP_Driver/src/Command.h +++ b/MAC/APL/PIC/RSP_Driver/src/Command.h @@ -49,10 +49,10 @@ public: // Currently the tv_usec part is always set to 0 irrespective // of the value passed in. Command() : - m_period(0), m_port(0), m_operation(READ), itsIsDelayed(false), itsIsPostponed(false), itsName("???") { } + m_period(0), m_port(0), m_operation(READ), itsIsDelayed(false), itsIsPostponed(false), itsName("???"), itsOrder(0) { } Command(const string& name, GCFPortInterface& port, Operation oper) : - m_period(0), m_port(&port), m_operation(oper), itsIsDelayed(false), itsIsPostponed(false), itsName(name) { } + m_period(0), m_port(&port), m_operation(oper), itsIsDelayed(false), itsIsPostponed(false), itsName(name), itsOrder(0) { } // Destructor for Command. virtual ~Command() { } @@ -124,6 +124,12 @@ public: const string& name() const { return (itsName); } /*@}*/ + /*@{*/ + // Accessor methods order + int order() const { return (itsOrder); } + void order(int anOrder) { itsOrder = anOrder; } + /*@}*/ + private: uint16 m_period; GCFEvent* m_event; @@ -132,6 +138,7 @@ private: bool itsIsDelayed; bool itsIsPostponed; string itsName; + int itsOrder; }; // Comparison function to order a priority_queue of Ptr<Command>* pointers @@ -141,6 +148,13 @@ struct Command_greater { { return x->getTimestamp() > y->getTimestamp(); } }; +// Comparison function to order a priority_queue of Ptr<Command>* pointers +// as it is used in the Scheduler class. +struct Command_order { + bool operator() (Ptr<Command>& x, Ptr<Command>& y) const + { return x->order() > y->order(); } +}; + }; // namespace RSP }; // namespace LOFAR diff --git a/MAC/APL/PIC/RSP_Driver/src/GetBitModeCmd.cc b/MAC/APL/PIC/RSP_Driver/src/GetBitModeCmd.cc new file mode 100644 index 00000000000..c44108c38e4 --- /dev/null +++ b/MAC/APL/PIC/RSP_Driver/src/GetBitModeCmd.cc @@ -0,0 +1,102 @@ +//# GetBitModeCmd.cc: implementation of the GetBitModeCmd class +//# +//# Copyright (C) 2002-2004 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: GetBitModeCmd.cc 13440 2009-06-22 13:26:54Z donker $ + +#include <lofar_config.h> +#include <Common/LofarLogger.h> + +#include <APL/RSP_Protocol/RSP_Protocol.ph> + +#include <APL/RTCCommon/PSAccess.h> +#include <blitz/array.h> + +#include "StationSettings.h" +#include "GetBitModeCmd.h" + +using namespace blitz; +using namespace LOFAR; +using namespace RSP; +using namespace RSP_Protocol; +using namespace RTC; + +GetBitModeCmd::GetBitModeCmd(GCFEvent& event, GCFPortInterface& port, Operation oper) : + Command("GetBitMode", port, oper) +{ + itsEvent = new RSPGetbitmodeEvent(event); +} + +GetBitModeCmd::~GetBitModeCmd() +{ + delete itsEvent; +} + +void GetBitModeCmd::ack(CacheBuffer& cache) +{ + RSPGetbitmodeackEvent ack; + + ack.timestamp = getTimestamp(); + ack.status = RSP_SUCCESS; + for (int i = 0; i < StationSettings::instance()->nrRspBoards(); ++i) { + ack.bitmode_version[i] = cache.getBitModeInfo()()(i).bm_max; + + uint8 select = cache.getBitModeInfo()()(i).bm_select; + if (select == 0) { + ack.bits_per_sample[i] = 16; + } + else if (select == 1) { + ack.bits_per_sample[i] = 8; + } + else if (select == 2) { + ack.bits_per_sample[i] = 4; + } + } + getPort()->send(ack); +} + +void GetBitModeCmd::apply(CacheBuffer& /*cache*/, bool /*setModFlag*/) +{ + /* intentionally left empty */ +} + +void GetBitModeCmd::complete(CacheBuffer& cache) +{ + ack(cache); +} + +const RTC::Timestamp& GetBitModeCmd::getTimestamp() const +{ + return itsEvent->timestamp; +} + +void GetBitModeCmd::setTimestamp(const RTC::Timestamp& timestamp) +{ + itsEvent->timestamp = timestamp; +} + +bool GetBitModeCmd::validate() const +{ + return (true); +} + +bool GetBitModeCmd::readFromCache() const +{ + return itsEvent->cache; +} diff --git a/MAC/APL/PIC/RSP_Driver/src/GetBitModeCmd.h b/MAC/APL/PIC/RSP_Driver/src/GetBitModeCmd.h new file mode 100644 index 00000000000..3f9c21e5909 --- /dev/null +++ b/MAC/APL/PIC/RSP_Driver/src/GetBitModeCmd.h @@ -0,0 +1,92 @@ +//# -*- mode: c++ -*- +//# +//# GetBitModeCmd.h: Beamformer Weights settings command. +//# +//# Copyright (C) 2002-2004 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: GetBitModeCmd.h 13440 2009-06-22 13:26:54Z overeem $ + +#ifndef GETBITMODECMD_H_ +#define GETBITMODECMD_H_ + +#include "Command.h" +#include <APL/RSP_Protocol/RSP_Protocol.ph> + +#include <Common/LofarTypes.h> +#include <GCF/TM/GCF_Control.h> + +namespace LOFAR { + namespace RSP { + + class GetBitModeCmd : public Command + { + public: + /** + * Constructors for a GetBitModeCmd object. + */ + GetBitModeCmd(GCFEvent& event, GCFPortInterface& port, Operation oper); + + /* Destructor for GetBitModeCmd. */ + virtual ~GetBitModeCmd(); + + /** + * Acknowledge the command by sending the appropriate + * response on m_port. + */ + virtual void ack(CacheBuffer& cache); + + /** + * Make necessary changes to the cache for the next synchronization. + * Any changes will be sent to the RSP boards. + */ + virtual void apply(CacheBuffer& cache, bool setModFlag = true); + + /** + * Complete the command by sending the appropriate response on + * the m_answerport; + */ + virtual void complete(CacheBuffer& cache); + + /*@{*/ + /** + * get timestamp of the event + */ + virtual const RTC::Timestamp& getTimestamp() const; + virtual void setTimestamp(const RTC::Timestamp& timestamp); + /*@}*/ + + /** + * Validate the event that underlies the command. + */ + virtual bool validate() const; + + /** + * Return true if value should be read from cache. + */ + virtual bool readFromCache() const; + + private: + GetBitModeCmd(); + + RSPGetbitmodeEvent* itsEvent; + }; + }; +}; + +#endif /* GETBITMODECMD_H_ */ diff --git a/MAC/APL/PIC/RSP_Driver/src/GetStatsCmd.cc b/MAC/APL/PIC/RSP_Driver/src/GetStatsCmd.cc index 50655724626..09258d77b96 100644 --- a/MAC/APL/PIC/RSP_Driver/src/GetStatsCmd.cc +++ b/MAC/APL/PIC/RSP_Driver/src/GetStatsCmd.cc @@ -22,6 +22,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> +#include <Common/LofarBitModeInfo.h> #include <APL/RSP_Protocol/RSP_Protocol.ph> #include <APL/RTCCommon/PSAccess.h> @@ -61,9 +62,11 @@ void GetStatsCmd::ack(CacheBuffer& cache) ack.stats().resize(m_event->rcumask.count(), cache.getSubbandStats()().extent(secondDim)); } else { - ack.stats().resize(m_event->rcumask.count(), MAX_BEAMLETS); + ack.stats().resize(m_event->rcumask.count(), maxBeamlets(cache.getBitsPerSample())); } + int activePlanes = (MAX_BITS_PER_SAMPLE / cache.getBitsPerSample()); + unsigned int result_device = 0; for (unsigned int cache_device = 0; cache_device < m_n_devices; cache_device++) { if (m_event->rcumask[cache_device]) { @@ -75,20 +78,24 @@ void GetStatsCmd::ack(CacheBuffer& cache) case Statistics::BEAMLET_POWER: // NOTE: MEPHeader::N_BEAMLETS = 4x62 but userside MAX_BEAMLETS may be different // In other words: getBeamletWeights can contain more data than ack.weights - if (MEPHeader::N_BEAMLETS == MAX_BEAMLETS) { + if (MEPHeader::N_BEAMLETS == maxBeamlets(cache.getBitsPerSample())) { ack.stats()(result_device, Range::all()) = cache.getBeamletStats()()(cache_device, Range::all()); } else { - for (int rsp = 0; rsp < 4; rsp++) { - int swstart(rsp*MAX_BEAMLETS_PER_RSP); - int hwstart(rsp*MEPHeader::N_BEAMLETS/4); - ack.stats()(result_device, Range(swstart,swstart+MAX_BEAMLETS_PER_RSP-1)) = - cache.getBeamletStats()()(cache_device, Range(hwstart, hwstart+MAX_BEAMLETS_PER_RSP-1)); - if (cache_device == 0) { - LOG_DEBUG_STR("Getstats:move(" << hwstart << ".." << hwstart+MAX_BEAMLETS_PER_RSP << ") to (" - << swstart << ".." << swstart+MAX_BEAMLETS_PER_RSP << ")"); - } - } + for (int lane = 0; lane < MEPHeader::N_SERDES_LANES; lane++) { + for (int plane = 0; plane < activePlanes; plane++) { + int swstart(lane*maxBeamletsPerRSP(cache.getBitsPerSample()) + plane*maxDataslotsPerRSP(cache.getBitsPerSample())); + int hwstart(lane*MEPHeader::N_BEAMLETS + plane*MEPHeader::N_BEAMLETS/4); + + ack.stats()(result_device, Range(swstart,swstart+maxDataslotsPerRSP(cache.getBitsPerSample())-1)) = + cache.getBeamletStats()()(cache_device, Range(hwstart, hwstart+maxDataslotsPerRSP(cache.getBitsPerSample())-1)); + + if (cache_device == 0) { + LOG_DEBUG_STR("Getstats:move(" << hwstart << ".." << hwstart+maxDataslotsPerRSP(cache.getBitsPerSample()-1) << ") to (" + << swstart << ".." << swstart+maxDataslotsPerRSP(cache.getBitsPerSample()-1) << ")"); + } + } + } } LOG_DEBUG_STR("GetStats(cache[0]): " << cache.getBeamletStats()()(0,Range::all())); diff --git a/MAC/APL/PIC/RSP_Driver/src/GetSubbandsCmd.cc b/MAC/APL/PIC/RSP_Driver/src/GetSubbandsCmd.cc index faf275eb329..7d9a87db638 100644 --- a/MAC/APL/PIC/RSP_Driver/src/GetSubbandsCmd.cc +++ b/MAC/APL/PIC/RSP_Driver/src/GetSubbandsCmd.cc @@ -22,6 +22,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> +#include <Common/LofarBitModeInfo.h> #include <APL/RSP_Protocol/RSP_Protocol.ph> #include <APL/RTCCommon/PSAccess.h> @@ -55,15 +56,68 @@ void GetSubbandsCmd::ack(CacheBuffer& cache) ack.status = RSP_SUCCESS; Range src_range; + Range dst_range; + int input_rcu; + int nBanks = (MAX_BITS_PER_SAMPLE / cache.getBitsPerSample()); + switch (m_event->type) { case SubbandSelection::BEAMLET: - ack.subbands().resize(m_event->rcumask.count(), MAX_BEAMLETS); - src_range = Range(MEPHeader::N_LOCAL_XLETS, MEPHeader::N_LOCAL_XLETS + MAX_BEAMLETS - 1); + ack.subbands.beamlets().resize(m_event->rcumask.count(), nBanks, maxBeamletsPerPlane(cache.getBitsPerSample())); + + input_rcu = 0; + for (int cache_rcu = 0; cache_rcu < StationSettings::instance()->nrRcus(); cache_rcu++) { + if (m_event->rcumask[cache_rcu]) { + // NOTE: MEPHeader::N_BEAMLETS = 4x62 but userside MAX_BEAMLETS may be different + // In other words: getSubbandSelection can contain more data than ack.weights + int nrSubbands = ack.subbands.beamlets().extent(thirdDim); + int nrBlocks = MEPHeader::N_SERDES_LANES * nBanks; + + for (int block = 0; block < nrBlocks; block++) { + int swbank = block / MEPHeader::N_SERDES_LANES; + int swlane = block % MEPHeader::N_SERDES_LANES; + int hwbank = block % nBanks; + int hwlane = block / nBanks; + int swstart(swlane * maxDataslotsPerRSP(cache.getBitsPerSample())); + int hwstart(hwlane * (MEPHeader::N_BEAMLETS/MEPHeader::N_SERDES_LANES)); + int nrSubbands2move(MIN(nrSubbands-swstart, maxDataslotsPerRSP(cache.getBitsPerSample()))); + if (nrSubbands2move > 0) { + src_range = Range(hwstart, hwstart+nrSubbands2move-1); + dst_range = Range(swstart, swstart+nrSubbands2move-1); + //cache.getSubbandSelection().beamlets()(cache_rcu, hwbank, dst_range) = 0; + + ack.subbands.beamlets()(input_rcu, swbank, dst_range) = + cache.getSubbandSelection().beamlets()(cache_rcu, hwbank, src_range); //* (int)N_POL + (cache_rcu % N_POL) + + if (cache_rcu == 0) { + LOG_DEBUG_STR("SS:block=" << block << " move(" << hwstart << ".." << hwstart+nrSubbands2move << ") to (" + << swstart << ".." << swstart+nrSubbands2move << ")" + << " swbank:" << swbank << " swlane:" << swlane + << " hwbank:" << hwbank << " hwlane:" << hwlane); + } + } // subbands left + } // for each block + + LOG_DEBUG_STR("GetSubbands:beamlet(cache[0]): " << cache.getSubbandSelection().beamlets()(0, Range::all(), Range::all())); + input_rcu++; + } // if rcu selected + } // for each rcu break; case SubbandSelection::XLET: - ack.subbands().resize(m_event->rcumask.count(), MEPHeader::N_LOCAL_XLETS); - src_range = Range(0, MEPHeader::N_LOCAL_XLETS - 1); + ack.subbands.crosslets().resize(m_event->rcumask.count(), nBanks, MEPHeader::N_LOCAL_XLETS); + + input_rcu = 0; + for (int cache_rcu = 0; cache_rcu < StationSettings::instance()->nrRcus(); cache_rcu++) { + if (m_event->rcumask[cache_rcu]) { + if (m_event->type == SubbandSelection::XLET) { + for (int bank = 0; bank < nBanks; bank++) { + ack.subbands.crosslets()(input_rcu, bank, Range::all()) = cache.getSubbandSelection().crosslets()(cache_rcu, bank, Range::all()); + } + } + LOG_DEBUG_STR("GetSubbands:crosslets(cache[0]): " << cache.getSubbandSelection().crosslets()(0, Range::all(), Range::all())); + input_rcu++; + } // if rcu selected + } // for each rcu break; default: @@ -71,32 +125,6 @@ void GetSubbandsCmd::ack(CacheBuffer& cache) exit(EXIT_FAILURE); break; } - - int result_rcu = 0; - for (int cache_rcu = 0; cache_rcu < StationSettings::instance()->nrRcus(); cache_rcu++) { - if (m_event->rcumask[cache_rcu]) { - // NOTE: MEPHeader::N_BEAMLETS = 4x62 but userside MAX_BEAMLETS may be different - // In other words: getSubbandSelection can contain more data than ack.weights - if (MEPHeader::N_BEAMLETS == MAX_BEAMLETS || m_event->type == SubbandSelection::XLET) { - ack.subbands()(result_rcu, Range::all()) = cache.getSubbandSelection()()(cache_rcu, src_range); - } - else { - for (int rsp = 0; rsp < 4; rsp++) { - int swstart(rsp*MAX_BEAMLETS_PER_RSP); - int hwstart(MEPHeader::N_LOCAL_XLETS + rsp * (MEPHeader::N_BEAMLETS/4)); - ack.subbands()(result_rcu, Range(swstart,swstart+MAX_BEAMLETS_PER_RSP-1)) = - cache.getSubbandSelection()()(cache_rcu, Range(hwstart, hwstart+MAX_BEAMLETS_PER_RSP-1)); - if (cache_rcu == 0) { - LOG_DEBUG_STR("GetSubbands:move(" << hwstart << ".." << hwstart+MAX_BEAMLETS_PER_RSP << ") to (" - << swstart << ".." << swstart+MAX_BEAMLETS_PER_RSP << ")"); - } - } - } - LOG_DEBUG_STR("GetSubbands(cache[0]): " << cache.getSubbandSelection()()(0,Range::all())); - result_rcu++; - } // if rcu selected - } // for each rcu - getPort()->send(ack); } diff --git a/MAC/APL/PIC/RSP_Driver/src/GetWeightsCmd.cc b/MAC/APL/PIC/RSP_Driver/src/GetWeightsCmd.cc index efa415a078d..aad83b39e09 100644 --- a/MAC/APL/PIC/RSP_Driver/src/GetWeightsCmd.cc +++ b/MAC/APL/PIC/RSP_Driver/src/GetWeightsCmd.cc @@ -22,6 +22,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> +#include <Common/LofarBitModeInfo.h> #include <APL/RSP_Protocol/RSP_Protocol.ph> #include <APL/RTCCommon/PSAccess.h> @@ -50,33 +51,51 @@ GetWeightsCmd::~GetWeightsCmd() void GetWeightsCmd::ack(CacheBuffer& cache) { RSPGetweightsackEvent ack; - + int nPlanes = (MAX_BITS_PER_SAMPLE / cache.getBitsPerSample()); + ack.timestamp = getTimestamp(); ack.status = RSP_SUCCESS; - ack.weights().resize(BeamletWeights::SINGLE_TIMESTEP, m_event->rcumask.count(), MAX_BEAMLETS); // 4 x 61 + ack.weights().resize(BeamletWeights::SINGLE_TIMESTEP, m_event->rcumask.count(), nPlanes, maxBeamletsPerPlane(cache.getBitsPerSample())); // 4 x 61 + + Range dst_range; + Range src_range; + int nBanks = (MAX_BITS_PER_SAMPLE / cache.getBitsPerSample()); - int result_rcu = 0; + int input_rcu = 0; + for (int cache_rcu = 0; cache_rcu < StationSettings::instance()->nrRcus(); cache_rcu++) { if (m_event->rcumask[cache_rcu]) { // NOTE: MEPHeader::N_BEAMLETS = 4x62 but userside MAX_BEAMLETS may be different // In other words: getBeamletWeights can contain more data than ack.weights - if (MEPHeader::N_BEAMLETS == MAX_BEAMLETS) { - ack.weights()(0, result_rcu, Range::all()) = cache.getBeamletWeights()()(0, cache_rcu, Range::all()); - } - else { - for (int rsp = 0; rsp < 4; rsp++) { - int swstart(rsp*MAX_BEAMLETS_PER_RSP); - int hwstart(rsp*MEPHeader::N_BEAMLETS/4); - ack.weights()(0, result_rcu, Range(swstart,swstart+MAX_BEAMLETS_PER_RSP-1)) = cache.getBeamletWeights()()(0, cache_rcu, Range(hwstart, hwstart+MAX_BEAMLETS_PER_RSP-1)); - } - } - result_rcu++; + int nrBlocks = MEPHeader::N_SERDES_LANES * nBanks; + int dataslotsPerRSP = maxDataslotsPerRSP(cache.getBitsPerSample()); + for (int block = 0; block < nrBlocks; block++) { + int swbank = block / MEPHeader::N_SERDES_LANES; + int swlane = block % MEPHeader::N_SERDES_LANES; + int hwbank = block % nBanks; + int hwlane = block / nBanks; + int swstart(swlane * dataslotsPerRSP); + int hwstart(hwlane * (MEPHeader::N_BEAMLETS/MEPHeader::N_SERDES_LANES)); + src_range = Range(hwstart, hwstart+dataslotsPerRSP-1); + dst_range = Range(swstart, swstart+dataslotsPerRSP-1); + for (int lane = 0; lane < MEPHeader::N_SERDES_LANES; lane++) { + ack.weights()(0, input_rcu, swbank, dst_range) = + cache.getBeamletWeights()()(0, cache_rcu, hwbank, src_range); + if (lane == 0) { + LOG_DEBUG_STR("BF:block=" << block << " move(" << src_range << ") to (" << dst_range << ")" + << " swbank=" << swbank << " swlane=" << swlane + << " hwbank=" << hwbank << " hwlane=" << hwlane); + } + } // lanes + } // blocks + + + input_rcu++; if (cache_rcu ==0) { - LOG_DEBUG_STR("GetWeights(ack[0]): " << ack.weights()(0,0,Range::all())); + LOG_DEBUG_STR("GetWeights(ack[0]): " << ack.weights()(0,0,Range::all(),Range::all())); } } } - getPort()->send(ack); } diff --git a/MAC/APL/PIC/RSP_Driver/src/RSPDriver.cc b/MAC/APL/PIC/RSP_Driver/src/RSPDriver.cc index cae3ce16d28..dec6e27bafc 100644 --- a/MAC/APL/PIC/RSP_Driver/src/RSPDriver.cc +++ b/MAC/APL/PIC/RSP_Driver/src/RSPDriver.cc @@ -27,6 +27,7 @@ #include <Common/ParameterSet.h> #include <Common/Exception.h> #include <Common/Version.h> +#include <Common/LofarBitModeInfo.h> #include <ApplCommon/StationConfig.h> @@ -96,6 +97,9 @@ #include "GetDatastreamCmd.h" #include "SetSwapxyCmd.h" #include "GetSwapxyCmd.h" +#include "SetBitModeCmd.h" +#include "GetBitModeCmd.h" +#include "UpdBitModeCmd.h" #include "RSUWrite.h" #include "BSWrite.h" @@ -137,9 +141,12 @@ #include "RawBlockWrite.h" #include "LatencyRead.h" #include "TimestampWrite.h" +#include "BMWrite.h" +#include "BMRead.h" #include "RawEvent.h" #include "Sequencer.h" +#include "Cache.h" #include <RSP_Driver/Package__Version.h> #ifdef HAVE_UNISTD_H @@ -369,6 +376,7 @@ bool RSPDriver::isBoardPort(GCFPortInterface& port) * Order is: * - STATUS (RSP Status): read RSP status info // StatusRead * - VERSION (RSP Status): read RSP version info // VersionRead + * - BITMODE (RSP Status): read RSP nofbeam info // BMRead * - TDS: write TDS control settings // TDSResultWrite/TDSProtocolWrite * - TDSSTATUS: read TDS status // TDSStatusWrite/TDSStatusRead * - RSU: write RSU settings // RSUWrite @@ -408,6 +416,14 @@ void RSPDriver::addAllSyncActions() ASSERT(versionread); m_scheduler.addSyncAction(versionread); } + if (GET_CONFIG("RSPDriver.READ_BITMODE", i)) { + BMWrite* bitmodewrite = new BMWrite(m_boardPorts[boardid], boardid); + ASSERT(bitmodewrite); + m_scheduler.addSyncAction(bitmodewrite); + BMRead* bitmoderead = new BMRead(m_boardPorts[boardid], boardid); + ASSERT(bitmoderead); + m_scheduler.addSyncAction(bitmoderead); + } // Schedule register writes for soft PPS if configured. // @@ -483,10 +499,26 @@ void RSPDriver::addAllSyncActions() } if (GET_CONFIG("RSPDriver.READ_BST", i)) { - BstRead* bstread = 0; - bstread = new BstRead(m_boardPorts[boardid], boardid); - ASSERT(bstread); - m_scheduler.addSyncAction(bstread); + // check if board is used, and set lane + for (int lane = 0; lane < MEPHeader::N_SERDES_LANES; lane++) { + // read only BST from boards who output too CEP + // for Ring-0 + if (boardid == GET_CONFIG(formatString("RSPDriver.LANE_%02d_BLET_OUT", lane).c_str(), i)) { + LOG_DEBUG(formatString("add bstread for board %d, lane %d", boardid, lane)); + BstRead* bstread = 0; + bstread = new BstRead(m_boardPorts[boardid], boardid, lane); + ASSERT(bstread); + m_scheduler.addSyncAction(bstread); + } + // for Ring-1 + if (boardid == GET_CONFIG(formatString("RSPDriver.LANE_%02d_BLET_OUT", (10+lane)).c_str(), i)) { + LOG_DEBUG(formatString("add bstread for board %d, lane %d", boardid, (10+lane))); + BstRead* bstread = 0; + bstread = new BstRead(m_boardPorts[boardid], boardid, (10+lane)); + ASSERT(bstread); + m_scheduler.addSyncAction(bstread); + } + } } if (GET_CONFIG("RSPDriver.READ_XST", i)) { @@ -1036,6 +1068,10 @@ GCFEvent::TResult RSPDriver::enabled(GCFEvent& event, GCFPortInterface& port) case RSP_GETDATASTREAM: rsp_getDatastream(event,port); break; case RSP_SETSWAPXY: rsp_setswapxy(event,port); break; case RSP_GETSWAPXY: rsp_getswapxy(event,port); break; + case RSP_SETBITMODE: rsp_setBitMode(event,port); break; + case RSP_GETBITMODE: rsp_getBitMode(event,port); break; + case RSP_SUBBITMODE: rsp_subBitMode(event,port); break; + case RSP_UNSUBBITMODE: rsp_unsubBitMode(event,port); break; case F_TIMER: { if (&port == &m_boardPorts[0]) { @@ -1217,11 +1253,13 @@ void RSPDriver::rsp_setweights(GCFEvent& event, GCFPortInterface& port) if ((sw_event->weights().dimensions() != BeamletWeights::NDIM) || (sw_event->weights().extent(firstDim) < 1) || (sw_event->weights().extent(secondDim) > StationSettings::instance()->nrRcus()) - || (sw_event->weights().extent(thirdDim) != MAX_BEAMLETS)) { - LOG_ERROR(formatString("SETWEIGHTS: invalid parameter,weighs-size=(%d,%d,%d)", + || (sw_event->weights().extent(thirdDim) > (MAX_BITS_PER_SAMPLE/MIN_BITS_PER_SAMPLE)) + || (sw_event->weights().extent(fourthDim) != maxBeamletsPerBank(Cache::getInstance().getBack().getBitsPerSample()))) { + LOG_ERROR(formatString("SETWEIGHTS: invalid parameter,weighs-size=(%d,%d,%d,%d)", sw_event->weights().extent(firstDim), sw_event->weights().extent(secondDim), - sw_event->weights().extent(thirdDim))); + sw_event->weights().extent(thirdDim), + sw_event->weights().extent(fourthDim))); delete sw_event; @@ -1236,7 +1274,7 @@ void RSPDriver::rsp_setweights(GCFEvent& event, GCFPortInterface& port) Ptr<SetWeightsCmd> command = new SetWeightsCmd(*sw_event, port, Command::WRITE, timestep); //PD add base correction here - command->setWeights(sw_event->weights()(Range(timestep, timestep), Range::all(), Range::all())); + command->setWeights(sw_event->weights()(Range(timestep, timestep), Range::all(), Range::all(), Range::all())); // if weights for only one timestep are given (and the timestamp == Timestamp(0,0)) // then the weights may be applied immediately @@ -1301,8 +1339,10 @@ void RSPDriver::rsp_getsubbands(GCFEvent& event, GCFPortInterface& port) LOG_ERROR("GETSUBBANDS: invalid parameter"); RSPGetsubbandsackEvent ack; - ack.subbands().resize(1,1); - ack.subbands() = 0; + ack.subbands.crosslets().resize(1,1); + ack.subbands.crosslets() = 0; + ack.subbands.beamlets().resize(1,1); + ack.subbands.beamlets() = 0; ack.timestamp = Timestamp(0,0); ack.status = RSP_FAILURE; port.send(ack); @@ -1456,8 +1496,7 @@ void RSPDriver::rsp_subrcu(GCFEvent& event, GCFPortInterface& port) ack.handle = (memptr_t)&(*command); port.send(ack); - m_scheduler.enter(Ptr<Command>(&(*command)), - Scheduler::PERIODIC); + m_scheduler.enter(Ptr<Command>(&(*command)), Scheduler::PERIODIC); } // @@ -2482,6 +2521,98 @@ void RSPDriver::rsp_getDatastream(GCFEvent& event, GCFPortInterface& port) m_scheduler.enter(Ptr<Command>(&(*command))); } +// +// rsp_setBitMode(event, port) +// +void RSPDriver::rsp_setBitMode(GCFEvent& event, GCFPortInterface& port) +{ + Ptr<SetBitModeCmd> command = new SetBitModeCmd(event, port, Command::WRITE); + + if (!command->validate()) { + LOG_ERROR("SetBitMode: invalid parameter"); + + RSPSetbitmodeackEvent ack; + ack.timestamp = Timestamp(0,0); + ack.status = RSP_FAILURE; + port.send(ack); + return; + } + // command is ok, schedule it. + m_scheduler.enter(Ptr<Command>(&(*command))); +} + +// +// rsp_getDatastream(event, port) +// +void RSPDriver::rsp_getBitMode(GCFEvent& event, GCFPortInterface& port) +{ + Ptr<GetBitModeCmd> command = new GetBitModeCmd(event, port, Command::READ); + + if (!command->validate()) { + LOG_ERROR("GetBitMode: invalid parameter"); + + RSPGetbitmodeackEvent ack; + ack.timestamp = Timestamp(0,0); + ack.status = RSP_FAILURE; + port.send(ack); + return; + } + // command is ok, schedule it. + m_scheduler.enter(Ptr<Command>(&(*command))); +} + +// +// rsp_subBitMode(event, port) +// +void RSPDriver::rsp_subBitMode(GCFEvent& event, GCFPortInterface& port) +{ + // subscription is done by entering a UpdSplitterCmd in the periodic queue + Ptr<UpdBitModeCmd> command = new UpdBitModeCmd(event, port, Command::READ); + RSPSubbitmodeackEvent ack; + + if (!command->validate()) { + LOG_ERROR("SUBBITMODE: invalid parameter"); + + ack.timestamp = m_scheduler.getCurrentTime(); + ack.status = RSP_FAILURE; + ack.handle = 0; + + port.send(ack); + return; + } + else { + ack.timestamp = m_scheduler.getCurrentTime(); + ack.status = RSP_SUCCESS; + ack.handle = (memptr_t)&(*command); + port.send(ack); + } + + m_scheduler.enter(Ptr<Command>(&(*command)), Scheduler::PERIODIC); +} + +// +// rsp_unsubBitMode(event, port) +// +void RSPDriver::rsp_unsubBitMode(GCFEvent& event, GCFPortInterface& port) +{ + RSPUnsubbitmodeEvent unsub(event); + + RSPUnsubbitmodeackEvent ack; + ack.timestamp = m_scheduler.getCurrentTime(); + ack.status = RSP_FAILURE; + ack.handle = unsub.handle; + + if (m_scheduler.remove_subscription(port, unsub.handle) > 0) { + ack.status = RSP_SUCCESS; + } + else { + LOG_ERROR("UNSUBBITMODE: failed to remove subscription"); + } + + port.send(ack); +} + + } // namespace RSP } // namespace LOFAR diff --git a/MAC/APL/PIC/RSP_Driver/src/RSPDriver.conf.in b/MAC/APL/PIC/RSP_Driver/src/RSPDriver.conf.in index 09c27c49e65..f892324b9d9 100644 --- a/MAC/APL/PIC/RSP_Driver/src/RSPDriver.conf.in +++ b/MAC/APL/PIC/RSP_Driver/src/RSPDriver.conf.in @@ -231,6 +231,8 @@ RSPDriver.READWRITE_TDSSTATUS=1 RSPDriver.WRITE_TBB=1 RSPDriver.WRITE_SI=1 RSPDriver.READ_SI=1 +RSPDriver.READ_BITMODE=1 + # # TDS_CONTROL diff --git a/MAC/APL/PIC/RSP_Driver/src/RSPDriver.h b/MAC/APL/PIC/RSP_Driver/src/RSPDriver.h index d11ce8ea054..c1d3ff91a41 100644 --- a/MAC/APL/PIC/RSP_Driver/src/RSPDriver.h +++ b/MAC/APL/PIC/RSP_Driver/src/RSPDriver.h @@ -170,6 +170,11 @@ public: void rsp_setswapxy(GCFEvent& event, GCFPortInterface& port); void rsp_getswapxy(GCFEvent& event, GCFPortInterface& port); + + void rsp_setBitMode(GCFEvent& event, GCFPortInterface &port); + void rsp_getBitMode(GCFEvent& event, GCFPortInterface &port); + void rsp_subBitMode(GCFEvent& event, GCFPortInterface &port); + void rsp_unsubBitMode(GCFEvent& event, GCFPortInterface &port); /*@}*/ private: diff --git a/MAC/APL/PIC/RSP_Driver/src/RawEvent.cc b/MAC/APL/PIC/RSP_Driver/src/RawEvent.cc index f481b69fb66..e8cd511db72 100644 --- a/MAC/APL/PIC/RSP_Driver/src/RawEvent.cc +++ b/MAC/APL/PIC/RSP_Driver/src/RawEvent.cc @@ -67,11 +67,11 @@ static unsigned short signal_lut[MEPHeader::MAX_PID + 1][MEPHeader::MAX_REGID + EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x03 (RSR_NOFBEAM new in 8/4bit mode) */ + /* reg = 0x03 (RSR_BEAMMODE) */ { 0, EPA_READ, /* READ */ - EPA_WRITE, /* WRITE */ - EPA_READACK, /* READACK */ + EPA_RSR_BEAMMODE, /* WRITE */ + EPA_RSR_BEAMMODE, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, }, @@ -183,25 +183,25 @@ static unsigned short signal_lut[MEPHeader::MAX_PID + 1][MEPHeader::MAX_REGID + EPA_SS_SELECT, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x01 (Subband 1 Select parameters, new in 8/4bit mode) */ + /* reg = 0x01 (Subband Select parameters) */ { 0, EPA_READ, /* READ */ - EPA_SS_SELECT, /* WRITE */ - EPA_SS_SELECT, /* READACK */ + EPA_SS_SELECT+1, /* WRITE */ + EPA_SS_SELECT+1, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x02 (Subband 2 Select parameters, new in 8/4bit mode) */ + /* reg = 0x02 (Subband Select parameters) */ { 0, EPA_READ, /* READ */ - EPA_SS_SELECT, /* WRITE */ - EPA_SS_SELECT, /* READACK */ + EPA_SS_SELECT+2, /* WRITE */ + EPA_SS_SELECT+2, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x03 (Subband 3 Select parameters, new in 8/4bit mode) */ + /* reg = 0x03 (Subband Select parameters) */ { 0, EPA_READ, /* READ */ - EPA_SS_SELECT, /* WRITE */ - EPA_SS_SELECT, /* READACK */ + EPA_SS_SELECT+3, /* WRITE */ + EPA_SS_SELECT+3, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, }, @@ -218,106 +218,106 @@ static unsigned short signal_lut[MEPHeader::MAX_PID + 1][MEPHeader::MAX_REGID + /* reg = 0x01 (BF_XIOUT subband 0) */ { 0, EPA_READ, /* READ */ - EPA_BF_COEFS_WRITE, /* WRITE */ - EPA_BF_COEFS_READ, /* READACK */ + EPA_BF_COEFS_WRITE+1, /* WRITE */ + EPA_BF_COEFS_READ+1, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, /* reg = 0x02 (BF_YROUT subband 0) */ { 0, EPA_READ, /* READ */ - EPA_BF_COEFS_WRITE, /* WRITE */ - EPA_BF_COEFS_READ, /* READACK */ + EPA_BF_COEFS_WRITE+2, /* WRITE */ + EPA_BF_COEFS_READ+2, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, /* reg = 0x03 (BF_YIOUT subband 0) */ { 0, EPA_READ, /* READ */ - EPA_BF_COEFS_WRITE, /* WRITE */ - EPA_BF_COEFS_READ, /* READACK */ + EPA_BF_COEFS_WRITE+3, /* WRITE */ + EPA_BF_COEFS_READ+3, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x04 (BF_XROUT subband 1 new in 8/4bit mode) */ + /* reg = 0x04 (BF_XROUT) */ { 0, EPA_READ, /* READ */ - EPA_BF_COEFS_WRITE, /* WRITE */ - EPA_BF_COEFS_READ, /* READACK */ + EPA_BF_COEFS_WRITE+4, /* WRITE */ + EPA_BF_COEFS_READ+4, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x05 (BF_XIOUT subband 1 new in 8/4bit mode) */ + /* reg = 0x05 (BF_XIOUT) */ { 0, EPA_READ, /* READ */ - EPA_BF_COEFS_WRITE, /* WRITE */ - EPA_BF_COEFS_READ, /* READACK */ + EPA_BF_COEFS_WRITE+5, /* WRITE */ + EPA_BF_COEFS_READ+5, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x06 (BF_YROUT subband 1 new in 8/4bit mode) */ + /* reg = 0x06 (BF_YROUT) */ { 0, EPA_READ, /* READ */ - EPA_BF_COEFS_WRITE, /* WRITE */ - EPA_BF_COEFS_READ, /* READACK */ + EPA_BF_COEFS_WRITE+6, /* WRITE */ + EPA_BF_COEFS_READ+6, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x07 (BF_YIOUT subband 1 new in 8/4bit mode) */ + /* reg = 0x07 (BF_YIOUT) */ { 0, EPA_READ, /* READ */ - EPA_BF_COEFS_WRITE, /* WRITE */ - EPA_BF_COEFS_READ, /* READACK */ + EPA_BF_COEFS_WRITE+7, /* WRITE */ + EPA_BF_COEFS_READ+7, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x08 (BF_XROUT subband 2 new in 8/4bit mode) */ + /* reg = 0x08 (BF_XROUT) */ { 0, EPA_READ, /* READ */ - EPA_BF_COEFS_WRITE, /* WRITE */ - EPA_BF_COEFS_READ, /* READACK */ + EPA_BF_COEFS_WRITE+8, /* WRITE */ + EPA_BF_COEFS_READ+8, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x09 (BF_XIOUT subband 2 new in 8/4bit mode) */ + /* reg = 0x09 (BF_XIOUT) */ { 0, EPA_READ, /* READ */ - EPA_BF_COEFS_WRITE, /* WRITE */ - EPA_BF_COEFS_READ, /* READACK */ + EPA_BF_COEFS_WRITE+9, /* WRITE */ + EPA_BF_COEFS_READ+9, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x0A (BF_YROUT subband 2 new in 8/4bit mode) */ + /* reg = 0x0A (BF_YROUT) */ { 0, EPA_READ, /* READ */ - EPA_BF_COEFS_WRITE, /* WRITE */ - EPA_BF_COEFS_READ, /* READACK */ + EPA_BF_COEFS_WRITE+10, /* WRITE */ + EPA_BF_COEFS_READ+10, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x0B (BF_YIOUT subband 2 new in 8/4bit mode) */ + /* reg = 0x0B (BF_YIOUT) */ { 0, EPA_READ, /* READ */ - EPA_BF_COEFS_WRITE, /* WRITE */ - EPA_BF_COEFS_READ, /* READACK */ + EPA_BF_COEFS_WRITE+11, /* WRITE */ + EPA_BF_COEFS_READ+11, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x0C (BF_XROUT subband 3 new in 8/4bit mode) */ + /* reg = 0x0C (BF_XROUT) */ { 0, EPA_READ, /* READ */ - EPA_BF_COEFS_WRITE, /* WRITE */ - EPA_BF_COEFS_READ, /* READACK */ + EPA_BF_COEFS_READ+12, /* WRITE */ + EPA_BF_COEFS_READ+12, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x0D (BF_XIOUT subband 3 new in 8/4bit mode) */ + /* reg = 0x0D (BF_XIOUT) */ { 0, EPA_READ, /* READ */ - EPA_BF_COEFS_WRITE, /* WRITE */ - EPA_BF_COEFS_READ, /* READACK */ + EPA_BF_COEFS_WRITE+13, /* WRITE */ + EPA_BF_COEFS_READ+13, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x0E (BF_YROUT subband 3 new in 8/4bit mode) */ + /* reg = 0x0E (BF_YROUT) */ { 0, EPA_READ, /* READ */ - EPA_BF_COEFS_WRITE, /* WRITE */ - EPA_BF_COEFS_READ, /* READACK */ + EPA_BF_COEFS_WRITE+14, /* WRITE */ + EPA_BF_COEFS_READ+14, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, - /* reg = 0x0F (BF_YIOUT subband 3 new in 8/4bit mode) */ + /* reg = 0x0F (BF_YIOUT) */ { 0, EPA_READ, /* READ */ - EPA_BF_COEFS_WRITE, /* WRITE */ - EPA_BF_COEFS_READ, /* READACK */ + EPA_BF_COEFS_WRITE+15, /* WRITE */ + EPA_BF_COEFS_READ+15, /* READACK */ EPA_WRITEACK, /* WRITEACK */ }, }, diff --git a/MAC/APL/PIC/RSP_Driver/src/SSRead.cc b/MAC/APL/PIC/RSP_Driver/src/SSRead.cc index 7edd1156afe..5ec208b33f0 100644 --- a/MAC/APL/PIC/RSP_Driver/src/SSRead.cc +++ b/MAC/APL/PIC/RSP_Driver/src/SSRead.cc @@ -22,6 +22,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> +#include <Common/LofarBitModeInfo.h> #include <APL/RSP_Protocol/RSP_Protocol.ph> #include <APL/RSP_Protocol/EPA_Protocol.ph> @@ -38,9 +39,9 @@ using namespace RSP; using namespace RTC; SSRead::SSRead(GCFPortInterface& board_port, int board_id) - : SyncAction(board_port, board_id, NR_BLPS_PER_RSPBOARD) + : SyncAction(board_port, board_id, NR_BLPS_PER_RSPBOARD*(MAX_BITS_PER_SAMPLE/MIN_BITS_PER_SAMPLE)) { - memset(&m_hdr, 0, sizeof(MEPHeader)); + memset(&m_hdr, 0, sizeof(MEPHeader)); } SSRead::~SSRead() @@ -49,70 +50,96 @@ SSRead::~SSRead() void SSRead::sendrequest() { - EPAReadEvent ssread; - ssread.hdr.set(MEPHeader::SS_SELECT_HDR, 1 << getCurrentIndex(), - MEPHeader::READ); - - m_hdr = ssread.hdr; - getBoardPort().send(ssread); + EPAReadEvent ssread; + itsActivePlanes = (MAX_BITS_PER_SAMPLE / Cache::getInstance().getBack().getBitsPerSample()); + if (getCurrentIndex() >= (itsActivePlanes*NR_BLPS_PER_RSPBOARD)) { + setContinue(true); + return; + } + + int dstid = 1 << (getCurrentIndex() / itsActivePlanes); + int plane = getCurrentIndex() % itsActivePlanes; + + ssread.hdr.set(MEPHeader::READ, + dstid, + MEPHeader::SS, + MEPHeader::SS_SELECT+plane, + MEPHeader::SS_SELECT_SIZE); + + m_hdr = ssread.hdr; + getBoardPort().send(ssread); } void SSRead::sendrequest_status() { - /* intentionally left empty */ + /* intentionally left empty */ } GCFEvent::TResult SSRead::handleack(GCFEvent& event, GCFPortInterface& /*port*/) { - if (EPA_SS_SELECT != event.signal) - { - LOG_WARN("SSRead::handleack: unexpected ack"); - return GCFEvent::NOT_HANDLED; - } - - // unpack ss message - EPASsSelectEvent ss(event); - - uint8 global_blp = (getBoardId() * NR_BLPS_PER_RSPBOARD) + getCurrentIndex(); - if (!ss.hdr.isValidAck(m_hdr)) - { - Cache::getInstance().getState().ss().read_error(global_blp); - LOG_ERROR("SSRead::handleack: invalid ack"); - return GCFEvent::NOT_HANDLED; - } - - LOG_DEBUG("handleack"); - - LOG_DEBUG(formatString(">>>> SSRead(%s) global_blp=%d", - getBoardPort().getName().c_str(), global_blp)); - - // create array point to data in the response event - Array<uint16, 2> subbands((uint16*)&ss.subbands, - shape(MEPHeader::N_LOCAL_XLETS + MEPHeader::N_BEAMLETS, N_POL), - neverDeleteData); - - if (0 == GET_CONFIG("RSPDriver.LOOPBACK_MODE", i)) - { - subbands(Range::all(), 0) -= Cache::getInstance().getBack().getSubbandSelection()()(global_blp * 2, Range::all()); - subbands(Range::all(), 1) -= Cache::getInstance().getBack().getSubbandSelection()()(global_blp * 2 + 1, Range::all()); - uint16 ssum = sum(subbands); - - if (0 != ssum) - { - LOG_WARN(formatString("LOOPBACK CHECK FAILED: SSRead mismatch (blp=%d, error=%d)", - global_blp, ssum)); - } - } - else - { - // copy into the cache - Cache::getInstance().getBack().getSubbandSelection()()(global_blp * 2, Range::all()) - = subbands(Range::all(), 0); // x - Cache::getInstance().getBack().getSubbandSelection()()(global_blp * 2 + 1, Range::all()) - = subbands(Range::all(), 1); // y - } - - Cache::getInstance().getState().ss().read_ack(global_blp); - - return GCFEvent::HANDLED; + if ((event.signal < EPA_SS_SELECT) || (event.signal > (EPA_SS_SELECT+3))) { + LOG_WARN("SSRead::handleack: unexpected ack"); + return GCFEvent::NOT_HANDLED; + } + + // unpack ss message + EPASsSelectEvent ss(event); + + uint8 global_blp = (getBoardId() * NR_BLPS_PER_RSPBOARD) + (getCurrentIndex()/itsActivePlanes); + if (!ss.hdr.isValidAck(m_hdr)) { + Cache::getInstance().getState().ss().read_error(global_blp); + LOG_ERROR("SSRead::handleack: invalid ack"); + return GCFEvent::NOT_HANDLED; + } + + LOG_DEBUG("handleack"); + + LOG_DEBUG(formatString(">>>> SSRead(%s) global_blp=%d", + getBoardPort().getName().c_str(), global_blp)); + + // create array point to data in the response event (format in 2 dims) + Array<uint16, 2> subbands((uint16*)&ss.subbands, + shape(MEPHeader::N_LOCAL_XLETS + MEPHeader::N_BEAMLETS, N_POL), + neverDeleteData); + + Range hw_range; + // used plane + int plane = getCurrentIndex()%itsActivePlanes; + if (0 == GET_CONFIG("RSPDriver.LOOPBACK_MODE", i)) { + hw_range = Range(0, MEPHeader::N_LOCAL_XLETS - 1); + subbands(hw_range, 0) -= + Cache::getInstance().getBack().getSubbandSelection().crosslets()(global_blp * 2, plane, Range::all()); + subbands(hw_range, 1) -= + Cache::getInstance().getBack().getSubbandSelection().crosslets()(global_blp * 2 + 1, plane, Range::all()); + + hw_range = Range(MEPHeader::N_LOCAL_XLETS, MEPHeader::N_LOCAL_XLETS + MEPHeader::N_BEAMLETS); + subbands(hw_range, 0) -= + Cache::getInstance().getBack().getSubbandSelection().beamlets()(global_blp * 2, plane, Range::all()); + subbands(hw_range, 1) -= + Cache::getInstance().getBack().getSubbandSelection().beamlets()(global_blp * 2 + 1, plane, Range::all()); + + uint16 ssum = sum(subbands); + + if (0 != ssum) { + LOG_WARN(formatString("LOOPBACK CHECK FAILED: SSRead mismatch (blp=%d, error=%d)", global_blp, ssum)); + } + } + else { + // copy into the cache + hw_range = Range(0, MEPHeader::N_LOCAL_XLETS - 1); + Cache::getInstance().getBack().getSubbandSelection().crosslets()(global_blp * 2, plane, Range::all()) + = subbands(hw_range, 0); // x + Cache::getInstance().getBack().getSubbandSelection().crosslets()(global_blp * 2 + 1, plane, Range::all()) + = subbands(hw_range, 1); // y + + hw_range = Range(MEPHeader::N_LOCAL_XLETS, MEPHeader::N_LOCAL_XLETS + MEPHeader::N_BEAMLETS); + Cache::getInstance().getBack().getSubbandSelection().beamlets()(global_blp * 2, plane, Range::all()) + = subbands(hw_range, 0); // x + Cache::getInstance().getBack().getSubbandSelection().beamlets()(global_blp * 2 + 1, plane, Range::all()) + = subbands(hw_range, 1); // y + } + + Cache::getInstance().getState().ss().read_ack(global_blp); + + return GCFEvent::HANDLED; } diff --git a/MAC/APL/PIC/RSP_Driver/src/SSRead.h b/MAC/APL/PIC/RSP_Driver/src/SSRead.h index 2bbcf6fcd7c..e7f86498942 100644 --- a/MAC/APL/PIC/RSP_Driver/src/SSRead.h +++ b/MAC/APL/PIC/RSP_Driver/src/SSRead.h @@ -61,6 +61,7 @@ namespace LOFAR { private: EPA_Protocol::MEPHeader m_hdr; + int itsActivePlanes; }; }; }; diff --git a/MAC/APL/PIC/RSP_Driver/src/SSWrite.cc b/MAC/APL/PIC/RSP_Driver/src/SSWrite.cc index b27295fc2d7..e7c8aa3ca6a 100644 --- a/MAC/APL/PIC/RSP_Driver/src/SSWrite.cc +++ b/MAC/APL/PIC/RSP_Driver/src/SSWrite.cc @@ -40,111 +40,106 @@ using namespace RSP; using namespace RTC; SSWrite::SSWrite(GCFPortInterface& board_port, int board_id) - : SyncAction(board_port, board_id, NR_BLPS_PER_RSPBOARD) + : SyncAction(board_port, board_id, NR_BLPS_PER_RSPBOARD * (MAX_BITS_PER_SAMPLE / MIN_BITS_PER_SAMPLE)), + itsActiveBanks(1) + { - memset(&m_hdr, 0, sizeof(MEPHeader)); + memset(&m_hdr, 0, sizeof(MEPHeader)); } SSWrite::~SSWrite() { - /* TODO: delete event? */ + /* TODO: delete event? */ } void SSWrite::sendrequest() { - uint8 global_blp = (getBoardId() * NR_BLPS_PER_RSPBOARD) + getCurrentIndex(); - LOG_DEBUG(formatString(">>>> SSWrite(%s) global_blp=%d", - getBoardPort().getName().c_str(), - global_blp)); - - // mark modified - //Cache::getInstance().getState().ss().write_now(global_blp); - - // send subband select message - EPASsSelectEvent ss; - ss.hdr.set(MEPHeader::SS_SELECT_HDR, 1 << getCurrentIndex()); - - // create array to contain the subband selection - Array<uint16, 2> subbands((uint16*)&ss.subbands, - shape(MEPHeader::N_LOCAL_XLETS + MEPHeader::N_BEAMLETS, N_POL), - neverDeleteData); - -#if 0 - Array<int, 2> index(MEPHeader::N_LOCAL_XLETS + MEPHeader::N_BEAMLETS, N_POL); - Array<int, 2> mapped_index(MEPHeader::N_LOCAL_XLETS + MEPHeader::N_BEAMLETS, N_POL); - - for (int beamlet = MEPHeader::N_LOCAL_XLETS; beamlet < MEPHeader::N_LOCAL_XLETS + MEPHeader::N_BEAMLETS; beamlet++) { - for (int pol = 0; pol < N_POL; pol++) { - index(beamlet, pol) = beamlet * N_POL + pol; - } - } - mapped_index = 0; -#endif - - // copy crosslet selection - Range xlet_range(0, MEPHeader::N_LOCAL_XLETS-1); - subbands(xlet_range, 0) = Cache::getInstance().getBack().getSubbandSelection()()(global_blp * 2, xlet_range); // x - subbands(xlet_range, 1) = Cache::getInstance().getBack().getSubbandSelection()()(global_blp * 2 + 1, xlet_range); // y - - // - // copy the actual values from the cache - // Explain this in more detail - for (int lane = 0; lane < MEPHeader::N_SERDES_LANES; lane++) { - - int hw_offset = lane + MEPHeader::N_LOCAL_XLETS; - int cache_offset = (lane * (MEPHeader::N_BEAMLETS / MEPHeader::N_SERDES_LANES)) + MEPHeader::N_LOCAL_XLETS; - - // strided source range, stride = NR_BLPS_PER_RSPBOARD - Range hw_range(hw_offset, hw_offset + MEPHeader::N_BEAMLETS - MEPHeader::N_BLPS, MEPHeader::N_BLPS); - Range cache_range(cache_offset, cache_offset + (MEPHeader::N_BEAMLETS / MEPHeader::N_SERDES_LANES) - 1, 1); - - LOG_DEBUG_STR("lane=" << lane); - LOG_DEBUG_STR("hw_range=" << hw_range); - LOG_DEBUG_STR("cache_range=" << cache_range); - - subbands(hw_range, 0) = Cache::getInstance().getBack().getSubbandSelection()()(global_blp * 2, cache_range); // x - subbands(hw_range, 1) = Cache::getInstance().getBack().getSubbandSelection()()(global_blp * 2 + 1, cache_range); // y - -#if 0 - mapped_index(hw_range, 0) = index(cache_range, 0); - mapped_index(hw_range, 1) = index(cache_range, 1); -#endif - } - -#if 0 - LOG_DEBUG_STR("mapped_index=" << mapped_index); -#endif - - m_hdr = ss.hdr; - getBoardPort().send(ss); + itsActiveBanks = (MAX_BITS_PER_SAMPLE / Cache::getInstance().getBack().getBitsPerSample()); + if (getCurrentIndex() >= (itsActiveBanks*NR_BLPS_PER_RSPBOARD)) { + setContinue(true); + return; + } + + uint8 global_blp = (getBoardId() * NR_BLPS_PER_RSPBOARD) + (getCurrentIndex()/itsActiveBanks); + LOG_DEBUG(formatString(">>>> SSWrite(%s) global_blp=%d", getBoardPort().getName().c_str(), global_blp)); + + // mark modified + //Cache::getInstance().getState().ss().write_now(global_blp); + + // send subband select message + EPASsSelectEvent ss; + + int dstid = 1 << (getCurrentIndex() / itsActiveBanks); + // used bank + int bank = getCurrentIndex() % itsActiveBanks; + LOG_DEBUG(formatString("SSWRITE:board=%d, index=%d, globalblp=%d, dstID=%d, bank=%d, regid=%d", + getBoardId(), getCurrentIndex(), global_blp, dstid, bank, MEPHeader::SS_SELECT+bank)); + + ss.hdr.set( MEPHeader::WRITE, + dstid, + MEPHeader::SS, + MEPHeader::SS_SELECT+bank, + MEPHeader::SS_SELECT_SIZE); + + // create array to contain the subband selection + Array<uint16, 2> subbands((uint16*)&ss.subbands, + shape(MEPHeader::N_LOCAL_XLETS + MEPHeader::N_BEAMLETS, N_POL), + neverDeleteData); + + // copy crosslet selection + Range xlet_range(0, MEPHeader::N_LOCAL_XLETS-1); + subbands(xlet_range, 0) = Cache::getInstance().getBack().getSubbandSelection().crosslets()(global_blp * 2, bank, xlet_range); // x + subbands(xlet_range, 1) = Cache::getInstance().getBack().getSubbandSelection().crosslets()(global_blp * 2 + 1, bank, xlet_range); // y + + // + // copy the actual values from the cache + // Explain this in more detail + for (int lane = 0; lane < MEPHeader::N_SERDES_LANES; lane++) { + + int hw_offset = lane + MEPHeader::N_LOCAL_XLETS; + int cache_offset = (lane * (MEPHeader::N_BEAMLETS / MEPHeader::N_SERDES_LANES)); + + // strided source range, stride = NR_BLPS_PER_RSPBOARD + Range hw_range(hw_offset, hw_offset + MEPHeader::N_BEAMLETS - MEPHeader::N_BLPS, MEPHeader::N_BLPS); + Range cache_range(cache_offset, cache_offset + (MEPHeader::N_BEAMLETS / MEPHeader::N_SERDES_LANES) - 1, 1); + + LOG_DEBUG_STR("lane=" << lane << ",hw_range=" << hw_range << ",cache_range=" << cache_range); + + subbands(hw_range, 0) = Cache::getInstance().getBack().getSubbandSelection().beamlets()(global_blp * 2, bank, cache_range); // x + subbands(hw_range, 1) = Cache::getInstance().getBack().getSubbandSelection().beamlets()(global_blp * 2 + 1, bank, cache_range); // y + } + + m_hdr = ss.hdr; +// LOG_INFO_STR("SUBBANDSELECT=" << subbands); + getBoardPort().send(ss); } void SSWrite::sendrequest_status() { - // intentionally left empty + // intentionally left empty } GCFEvent::TResult SSWrite::handleack(GCFEvent& event, GCFPortInterface& /*port*/) { - if (EPA_WRITEACK != event.signal) - { - LOG_WARN("SSWrite::handleack: unexpected ack"); - return GCFEvent::NOT_HANDLED; - } + if (EPA_WRITEACK != event.signal) { + LOG_WARN("SSWrite::handleack: unexpected ack"); + return GCFEvent::NOT_HANDLED; + } - EPAWriteackEvent ack(event); + EPAWriteackEvent ack(event); - uint8 global_blp = (getBoardId() * NR_BLPS_PER_RSPBOARD) + getCurrentIndex(); + uint8 global_blp = (getBoardId() * NR_BLPS_PER_RSPBOARD) + (getCurrentIndex()/itsActiveBanks); - if (!ack.hdr.isValidAck(m_hdr)) - { - Cache::getInstance().getState().ss().write_error(global_blp); + if (!ack.hdr.isValidAck(m_hdr)) { + Cache::getInstance().getState().ss().write_error(global_blp); - LOG_ERROR("SSWrite::handleack: invalid ack"); - return GCFEvent::NOT_HANDLED; - } + LOG_ERROR("SSWrite::handleack: invalid ack"); + return GCFEvent::NOT_HANDLED; + } + + if ((getCurrentIndex() % itsActiveBanks) == 0) { + Cache::getInstance().getState().ss().write_ack(global_blp); + } - Cache::getInstance().getState().ss().write_ack(global_blp); - - return GCFEvent::HANDLED; + return GCFEvent::HANDLED; } diff --git a/MAC/APL/PIC/RSP_Driver/src/SSWrite.h b/MAC/APL/PIC/RSP_Driver/src/SSWrite.h index 80defcc08ba..4d14c3b14d7 100644 --- a/MAC/APL/PIC/RSP_Driver/src/SSWrite.h +++ b/MAC/APL/PIC/RSP_Driver/src/SSWrite.h @@ -60,6 +60,8 @@ namespace LOFAR { virtual GCFEvent::TResult handleack(GCFEvent& event, GCFPortInterface& port); private: + int itsActiveBanks; + EPA_Protocol::MEPHeader m_hdr; }; }; diff --git a/MAC/APL/PIC/RSP_Driver/src/Scheduler.cc b/MAC/APL/PIC/RSP_Driver/src/Scheduler.cc index 68c866408a2..bfbf09d3e69 100644 --- a/MAC/APL/PIC/RSP_Driver/src/Scheduler.cc +++ b/MAC/APL/PIC/RSP_Driver/src/Scheduler.cc @@ -235,6 +235,42 @@ int Scheduler::pqueue_remove_commands(pqueue& pq, return count; } +// +// oqueue_remove_commands(pqueue, port, memptr) +// +int Scheduler::oqueue_remove_commands(oqueue& oq, + GCFPortInterface& port, + memptr_t handle) +{ + int count = 0; + + // copy oq + oqueue tmp(oq); + + // clear pq, it will be filled again in the next loop + while (!oq.empty()) { + oq.pop(); + } + + while (!tmp.empty()) { + // pop item from the queue + Ptr<Command> c = tmp.top(); + tmp.pop(); + + // if port matches, delete c, else push back onto pq + if ((c->getPort() == &port) && (0 == handle || &(*c) == (Command*)handle)) { + count++; + // don't push back on pq, c will be deleted when it goes out of scope + LOG_DEBUG_STR("Removing command '" << c->name() << "' from the queue"); + } + else { + oq.push(c); + } + } + + return count; +} + // // cancel(port) // @@ -246,7 +282,7 @@ int Scheduler::cancel(GCFPortInterface& port) count += pqueue_remove_commands(m_later_queue, port); count += pqueue_remove_commands(m_now_queue, port); count += pqueue_remove_commands(m_periodic_queue, port); - count += pqueue_remove_commands(m_done_queue, port); + count += oqueue_remove_commands(m_done_queue, port); return count; } @@ -260,7 +296,7 @@ int Scheduler::remove_subscription(GCFPortInterface& port, memptr_t handle) count += pqueue_remove_commands(m_later_queue, port, handle); count += pqueue_remove_commands(m_now_queue, port, handle); count += pqueue_remove_commands(m_periodic_queue, port, handle); - count += pqueue_remove_commands(m_done_queue, port, handle); + count += oqueue_remove_commands(m_done_queue, port, handle); return count; } @@ -407,6 +443,7 @@ void Scheduler::scheduleCommands() /* copy periodic commands to the now queue */ pqueue pq = m_periodic_queue; + int orderNr(0); while (!pq.empty()) { Ptr<Command> command = pq.top(); @@ -425,6 +462,7 @@ void Scheduler::scheduleCommands() if (command->getTimestamp() <= m_current_time + (long)scheduling_offset) { LOG_DEBUG_STR("scheduling periodic command '" << command->name() << "' with time=" << command->getTimestamp()); + command->order(orderNr++); m_now_queue.push(command); } diff --git a/MAC/APL/PIC/RSP_Driver/src/Scheduler.h b/MAC/APL/PIC/RSP_Driver/src/Scheduler.h index 614067ba26e..7035f13812a 100644 --- a/MAC/APL/PIC/RSP_Driver/src/Scheduler.h +++ b/MAC/APL/PIC/RSP_Driver/src/Scheduler.h @@ -89,9 +89,11 @@ public: private: // Private types. typedef std::priority_queue<Ptr<Command>, std::vector<Ptr<Command> >, RSP::Command_greater> pqueue; + typedef std::priority_queue<Ptr<Command>, std::vector<Ptr<Command> >, RSP::Command_order> oqueue; // Private helper methods. int pqueue_remove_commands(pqueue& p, GCFPortInterface& port, memptr_t handle = 0); + int oqueue_remove_commands(oqueue& p, GCFPortInterface& port, memptr_t handle = 0); // Constants from the config file converted to the correct type. static int SYNC_INTERVAL_INT; @@ -110,7 +112,7 @@ private: pqueue m_later_queue; // commands to be exec later pqueue m_periodic_queue; // commands to be executed peiodically pqueue m_now_queue; // filled every second from later and periodic queue - pqueue m_done_queue; // commands that wait for cache switching + oqueue m_done_queue; // commands that wait for cache switching pqueue itsDelayedResponseQueue; // commands that wait for two cache switchings std::map< GCFPortInterface*, std::vector<SyncAction*> > m_syncactions; diff --git a/MAC/APL/PIC/RSP_Driver/src/SetBitModeCmd.cc b/MAC/APL/PIC/RSP_Driver/src/SetBitModeCmd.cc new file mode 100644 index 00000000000..69a22a63963 --- /dev/null +++ b/MAC/APL/PIC/RSP_Driver/src/SetBitModeCmd.cc @@ -0,0 +1,124 @@ +//# SetBitModeCmd.cc: implementation of the SetBitModeCmd class +//# +//# Copyright (C) 2002-2004 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: SetBitModeCmd.cc 18124 2011-05-29 19:54:09Z donker $ + +#include <lofar_config.h> +#include <Common/LofarLogger.h> + +#include <APL/RSP_Protocol/RSP_Protocol.ph> +#include <APL/RTCCommon/PSAccess.h> +#include <blitz/array.h> + +#include "StationSettings.h" +#include "SetBitModeCmd.h" +#include "Sequencer.h" +#include "Cache.h" + +using namespace blitz; +using namespace LOFAR; +using namespace RSP; +using namespace RSP_Protocol; +using namespace RTC; + +SetBitModeCmd::SetBitModeCmd(GCFEvent& event, GCFPortInterface& port, Operation oper) : + Command("SetBitMode", port, oper) +{ + itsEvent = new RSPSetbitmodeEvent(event); +} + +SetBitModeCmd::~SetBitModeCmd() +{ + delete itsEvent; +} + +void SetBitModeCmd::ack(CacheBuffer& /*cache*/) +{ + RSPSetbitmodeackEvent ack; + + ack.timestamp = getTimestamp(); + ack.status = RSP_SUCCESS; + + getPort()->send(ack); +} + +void SetBitModeCmd::apply(CacheBuffer& cache, bool setModFlag) +{ + int select; + + LOG_INFO_STR(formatString("Setting bitmode to %d bits @ ", itsEvent->bits_per_sample) << getTimestamp()); + + switch (itsEvent->bits_per_sample) { + case 16: + select = 0; + break; + case 8: + select = 1; + break; + case 4: + select = 2; + break; + default: + return; + break; + } + + cache.setBitsPerSample(itsEvent->bits_per_sample); + + for (int i = 0; i < StationSettings::instance()->nrRspBoards(); ++i) { + if (itsEvent->rspmask.test(i)) { + cache.getBitModeInfo()()(i).bm_select = (uint8)select; + if (setModFlag) { + cache.getCache().getState().bmState().write(i); + cache.getCache().getState().cdo().write(2*i); + cache.getCache().getState().cdo().write(2*i+1); + } + } + } +} + +void SetBitModeCmd::complete(CacheBuffer& /*cache*/) +{ +} + +const Timestamp& SetBitModeCmd::getTimestamp() const +{ + return itsEvent->timestamp; +} + +void SetBitModeCmd::setTimestamp(const Timestamp& timestamp) +{ + itsEvent->timestamp = timestamp; +} + +bool SetBitModeCmd::validate() const +{ + // check if BP version of all boards >= 7.4 + for (int i = 0; i < StationSettings::instance()->nrRspBoards(); ++i) { + if (((Cache::getInstance().getBack().getVersions().bp()(i).fpga_maj * 10) + + Cache::getInstance().getBack().getVersions().bp()(i).fpga_min) < 74) { + LOG_WARN_STR(formatString("Wrong firmware version on board[%d], NO bitmode support", i)); + return(false); + } + } + return (16 == itsEvent->bits_per_sample || + 8 == itsEvent->bits_per_sample || + 4 == itsEvent->bits_per_sample); +} diff --git a/MAC/APL/PIC/RSP_Driver/src/SetBitModeCmd.h b/MAC/APL/PIC/RSP_Driver/src/SetBitModeCmd.h new file mode 100644 index 00000000000..a4b322ac73a --- /dev/null +++ b/MAC/APL/PIC/RSP_Driver/src/SetBitModeCmd.h @@ -0,0 +1,87 @@ +//# -*- mode: c++ -*- +//# +//# SetBitModeCmd.h: Set bits per sample of RSP boards to 16, 8 or 4bit. +//# +//# Copyright (C) 2002-2004 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: SetBitModeCmd.h 8231 2006-04-28 08:53:22Z donker $ + +#ifndef SETBITMODECMD_H_ +#define SETBITMODECMD_H_ + +#include "Command.h" +#include <APL/RSP_Protocol/RSP_Protocol.ph> + +#include <Common/LofarTypes.h> +#include <GCF/TM/GCF_Control.h> + +namespace LOFAR { + namespace RSP { + + class SetBitModeCmd : public Command + { + public: + /** + * Constructors for a SetBitModeCmd object. + */ + SetBitModeCmd(GCFEvent& event, GCFPortInterface& port, Operation oper); + + /* Destructor for SetBitModeCmd. */ + virtual ~SetBitModeCmd(); + + /** + * Acknowledge the command by sending the appropriate + * response on m_port. + */ + virtual void ack(CacheBuffer& cache); + + /** + * Make necessary changes to the cache for the next synchronization. + * Any changes will be sent to the RSP boards. + */ + virtual void apply(CacheBuffer& cache, bool setModFlag = true); + + /** + * Complete the command by sending the appropriate response on + * the m_answerport; + */ + virtual void complete(CacheBuffer& cache); + + /*@{*/ + /** + * get timestamp of the event + */ + virtual const RTC::Timestamp& getTimestamp() const; + virtual void setTimestamp(const RTC::Timestamp& timestamp); + /*@}*/ + + /** + * Validate the event that underlies the command. + */ + virtual bool validate() const; + + private: + SetBitModeCmd(); + + RSPSetbitmodeEvent* itsEvent; + }; + }; +}; + +#endif /* SETBITMODECMD_H_ */ diff --git a/MAC/APL/PIC/RSP_Driver/src/SetSubbandsCmd.cc b/MAC/APL/PIC/RSP_Driver/src/SetSubbandsCmd.cc index fe0b2ddf27c..51e3c9bf711 100644 --- a/MAC/APL/PIC/RSP_Driver/src/SetSubbandsCmd.cc +++ b/MAC/APL/PIC/RSP_Driver/src/SetSubbandsCmd.cc @@ -22,6 +22,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> +#include <Common/LofarBitModeInfo.h> #include <APL/RSP_Protocol/RSP_Protocol.ph> #include <APL/RTCCommon/PSAccess.h> @@ -36,6 +37,29 @@ using namespace RSP; using namespace RSP_Protocol; using namespace RTC; +// BITMODE 16 +// bank 0: +// lane 0 lane 1 lane 2 lane 3 +// 0,1 122,123 244,245 366,367 +// 2,3 124,125 246,247 368,369 +// .. .. .. .. +// 120,121 242,243 364,365, 486,487 +// +// BITMODE 8 +// bank 0: +// lane 0 lane 1 lane 2 lane 3 +// 0,1 244,245 488,489 732,733 +// 2,3 246,247 490,491 734,735 +// .. .. .. .. +// 120,121 364,365 608,609, 852,853 +// +// bank 1: +// lane 0 lane 1 lane 2 lane 3 +// 122,123 366,367 610,611 854,855 +// 124,125 368,369 612,613 856,857 +// .. .. .. .. +// 242,243 486,487 730,731 974,975 + SetSubbandsCmd::SetSubbandsCmd(GCFEvent& event, GCFPortInterface& port, Operation oper) : Command("SetSubbands", port, oper) { @@ -64,42 +88,46 @@ void SetSubbandsCmd::apply(CacheBuffer& cache, bool /*setModFlag*/) Range dst_range; Range src_range; + int nBanks = (MAX_BITS_PER_SAMPLE / cache.getBitsPerSample()); switch (m_event->subbands.getType()) { case SubbandSelection::BEAMLET: { //dst_range = Range(MEPHeader::N_LOCAL_XLETS, MEPHeader::N_LOCAL_XLETS + MEPHeader::N_BEAMLETS - 1); - dst_range = Range(MEPHeader::N_LOCAL_XLETS, MEPHeader::N_LOCAL_XLETS + m_event->subbands().extent(secondDim) - 1); + dst_range = Range(0, m_event->subbands.beamlets().extent(thirdDim) - 1); for (int cache_rcu = 0; cache_rcu < StationSettings::instance()->nrRcus(); cache_rcu++) { if (m_event->rcumask[cache_rcu]) { // NOTE: MEPHeader::N_BEAMLETS = 4x62 but userside MAX_BEAMLETS may be different // In other words: getSubbandSelection can contain more data than m_event->subbands - if (MEPHeader::N_BEAMLETS == MAX_BEAMLETS) { - cache.getSubbandSelection()()(cache_rcu, dst_range) = 0; - cache.getSubbandSelection()()(cache_rcu, dst_range) = m_event->subbands()(0, Range::all()) * (int)N_POL + (cache_rcu % N_POL); - } - else { - int nr_subbands = m_event->subbands().extent(secondDim); - for (int rsp = 0; rsp < 4; rsp++) { - int swstart(rsp*MAX_BEAMLETS_PER_RSP); - int hwstart(MEPHeader::N_LOCAL_XLETS + rsp * (MEPHeader::N_BEAMLETS/4)); - int nrSubbands2move(MIN(nr_subbands-swstart, MAX_BEAMLETS_PER_RSP)); - if (nrSubbands2move > 0) { - dst_range = Range(hwstart, hwstart+nrSubbands2move-1); - src_range = Range(swstart, swstart+nrSubbands2move-1); - cache.getSubbandSelection()()(cache_rcu, dst_range) = 0; - cache.getSubbandSelection()()(cache_rcu, dst_range) = m_event->subbands()(0, src_range) * (int)N_POL + (cache_rcu % N_POL); - if (cache_rcu == 0) { - LOG_DEBUG_STR("Setsubbands:move(" << swstart << ".." << swstart+nrSubbands2move << ") to (" - << hwstart << ".." << hwstart+nrSubbands2move << ")"); - } - } // subbands left - } // for each rsp-slice - } // difference in max'en + + int nrSubbands = m_event->subbands.beamlets().extent(thirdDim); + int nrBlocks = MEPHeader::N_SERDES_LANES * nBanks; + for (int block = 0; block < nrBlocks; block++) { + int swbank = block / MEPHeader::N_SERDES_LANES; + int swlane = block % MEPHeader::N_SERDES_LANES; + int hwbank = block % nBanks; + int hwlane = block / nBanks; + int swstart(swlane * maxDataslotsPerRSP(cache.getBitsPerSample())); + int hwstart(hwlane * (MEPHeader::N_BEAMLETS/MEPHeader::N_SERDES_LANES)); + int nrSubbands2move(MIN(nrSubbands-swstart, maxDataslotsPerRSP(cache.getBitsPerSample()))); + if (nrSubbands2move > 0) { + dst_range = Range(hwstart, hwstart+nrSubbands2move-1); + src_range = Range(swstart, swstart+nrSubbands2move-1); + cache.getSubbandSelection().beamlets()(cache_rcu, hwbank, dst_range) = 0; + cache.getSubbandSelection().beamlets()(cache_rcu, hwbank, dst_range) = + m_event->subbands.beamlets()(0, swbank, src_range) * (int)N_POL + (cache_rcu % N_POL); + if (cache_rcu == 0) { + LOG_DEBUG_STR("SS:block=" << block << " move(" << swstart << ".." << swstart+nrSubbands2move << ") to (" + << hwstart << ".." << hwstart+nrSubbands2move << ")" + << " swbank:" << swbank << " swlane:" << swlane + << " hwbank:" << hwbank << " hwlane:" << hwlane); + } + } // subbands left + } // for each block if (cache_rcu == 0) { - LOG_DEBUG_STR("m_event->subbands() = " << m_event->subbands()); - LOG_DEBUG_STR("cache->subbands(0) = " << cache.getSubbandSelection()()(0,Range::all())); + LOG_DEBUG_STR("m_event->subbands.beamlets() = " << m_event->subbands.beamlets()); + LOG_DEBUG_STR("cache->subbands.beamlets(0) = " << cache.getSubbandSelection().beamlets()(0, Range::all(), Range::all())); } } // if rcu selected } // for each rcu @@ -110,10 +138,11 @@ void SetSubbandsCmd::apply(CacheBuffer& cache, bool /*setModFlag*/) dst_range = Range(0, MEPHeader::N_LOCAL_XLETS - 1); for (int cache_rcu = 0; cache_rcu < StationSettings::instance()->nrRcus(); cache_rcu++) { if (m_event->rcumask[cache_rcu]) { - cache.getSubbandSelection()()(cache_rcu, dst_range) = 0; - cache.getSubbandSelection()()(cache_rcu, dst_range) = m_event->subbands()(0,0) * N_POL + (cache_rcu % N_POL); - - LOG_DEBUG_STR("m_event->subbands() = " << m_event->subbands()); + for (int bank = 0; bank < nBanks; bank++) { + cache.getSubbandSelection().crosslets()(cache_rcu, bank, dst_range) = 0; + cache.getSubbandSelection().crosslets()(cache_rcu, bank, dst_range) = m_event->subbands.crosslets()(0,0,0) * N_POL + (cache_rcu % N_POL); + } + LOG_DEBUG_STR("m_event->subbands.crosslets() = " << m_event->subbands.crosslets()); } } } @@ -148,30 +177,41 @@ bool SetSubbandsCmd::validate() const switch (m_event->subbands.getType()) { case SubbandSelection::BEAMLET: - if (m_event->subbands().extent(secondDim) <= MEPHeader::N_BEAMLETS) valid = true; + if ( (m_event->subbands.beamlets().extent(thirdDim) <= MEPHeader::N_BEAMLETS) + && (3 == m_event->subbands.beamlets().dimensions()) + && (1 == m_event->subbands.beamlets().extent(firstDim))) { + valid = true; + } break; case SubbandSelection::XLET: - if (1 == m_event->subbands().extent(secondDim)) valid = true; + if ( (1 == m_event->subbands.crosslets().extent(thirdDim)) + && (3 == m_event->subbands.crosslets().dimensions()) + && (1 == m_event->subbands.crosslets().extent(firstDim))) { + valid = true; + } break; default: - LOG_WARN("invalid SubbandSelection type"); + LOG_WARN("invalid SubbandSelection type or dimensions"); break; } // return true when everything is right - if ((m_event->rcumask.count() <= (unsigned int)StationSettings::instance()->nrRcus()) - && (2 == m_event->subbands().dimensions()) - && (1 == m_event->subbands().extent(firstDim)) && valid) { + if ( (m_event->rcumask.count() <= (unsigned int)StationSettings::instance()->nrRcus()) + && valid) { return (true); } // show our validation values. - LOG_DEBUG(formatString("cmd rcumask.count = %d",m_event->rcumask.count())); - LOG_DEBUG(formatString("nr Rcus = %d",StationSettings::instance()->nrRcus())); - LOG_DEBUG(formatString("first dim = %d",m_event->subbands().extent(firstDim))); - LOG_DEBUG(formatString("second dim = %d",m_event->subbands().extent(secondDim))); + LOG_DEBUG(formatString("cmd rcumask.count = %d",m_event->rcumask.count())); + LOG_DEBUG(formatString("nr Rcus = %d",StationSettings::instance()->nrRcus())); + LOG_DEBUG(formatString("first dim crosslets = %d",m_event->subbands.crosslets().extent(firstDim))); + LOG_DEBUG(formatString("second dim crosslets = %d",m_event->subbands.crosslets().extent(secondDim))); + LOG_DEBUG(formatString("thirth dim crosslets = %d",m_event->subbands.crosslets().extent(thirdDim))); + LOG_DEBUG(formatString("first dim beamlets = %d",m_event->subbands.beamlets().extent(firstDim))); + LOG_DEBUG(formatString("second dim beamlets = %d",m_event->subbands.beamlets().extent(secondDim))); + LOG_DEBUG(formatString("thirth dim beamlets = %d",m_event->subbands.beamlets().extent(thirdDim))); return (false); } diff --git a/MAC/APL/PIC/RSP_Driver/src/SetWeightsCmd.cc b/MAC/APL/PIC/RSP_Driver/src/SetWeightsCmd.cc index 46403926c11..86a5466ebc1 100644 --- a/MAC/APL/PIC/RSP_Driver/src/SetWeightsCmd.cc +++ b/MAC/APL/PIC/RSP_Driver/src/SetWeightsCmd.cc @@ -22,6 +22,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> +#include <Common/LofarBitModeInfo.h> #include <APL/RSP_Protocol/RSP_Protocol.ph> #include <APL/RTCCommon/PSAccess.h> @@ -56,7 +57,7 @@ void SetWeightsCmd::setWeights(Array<complex<int16>, BeamletWeights::NDIM> weigh { RSPSetweightsEvent* event = static_cast<RSPSetweightsEvent*>(m_event); - event->weights().resize(BeamletWeights::SINGLE_TIMESTEP, event->rcumask.count(), weights.extent(thirdDim)); + event->weights().resize(BeamletWeights::SINGLE_TIMESTEP, event->rcumask.count(), weights.extent(thirdDim) ,weights.extent(fourthDim)); event->weights() = weights; } @@ -73,27 +74,42 @@ void SetWeightsCmd::ack(CacheBuffer& /*cache*/) void SetWeightsCmd::apply(CacheBuffer& cache, bool setModFlag) { int input_rcu = 0; + int nBanks = (MAX_BITS_PER_SAMPLE / cache.getBitsPerSample()); + + Range src_range; + Range dst_range; + for (int cache_rcu = 0; cache_rcu < StationSettings::instance()->nrRcus(); cache_rcu++) { if (m_event->rcumask[cache_rcu]) { // NOTE: MEPHeader::N_BEAMLETS = 4x62 but userside MAX_BEAMLETS may be different // In other words: getBeamletWeights can contain more data than ack.weights - if (MEPHeader::N_BEAMLETS == MAX_BEAMLETS) { - cache.getBeamletWeights()()(0, cache_rcu, Range::all()) = m_event->weights()(0, input_rcu, Range::all()); - } - else { - for (int rsp = 0; rsp < 4; rsp++) { - int swstart(rsp*MAX_BEAMLETS_PER_RSP); - int hwstart(rsp*MEPHeader::N_BEAMLETS/4); - cache.getBeamletWeights()()(0, cache_rcu, Range(hwstart, hwstart+MAX_BEAMLETS_PER_RSP-1)) = - m_event->weights()(0, input_rcu, Range(swstart,swstart+MAX_BEAMLETS_PER_RSP-1)); - } - } + int nrBlocks = MEPHeader::N_SERDES_LANES * nBanks; + int dataslotsPerRSP = maxDataslotsPerRSP(cache.getBitsPerSample()); + for (int block = 0; block < nrBlocks; block++) { + int swbank = block / MEPHeader::N_SERDES_LANES; + int swlane = block % MEPHeader::N_SERDES_LANES; + int hwbank = block % nBanks; + int hwlane = block / nBanks; + int swstart(swlane * dataslotsPerRSP); + int hwstart(hwlane * (MEPHeader::N_BEAMLETS/MEPHeader::N_SERDES_LANES)); + dst_range = Range(hwstart, hwstart+dataslotsPerRSP-1); + src_range = Range(swstart, swstart+dataslotsPerRSP-1); + for (int lane = 0; lane < MEPHeader::N_SERDES_LANES; lane++) { + cache.getBeamletWeights()()(0, cache_rcu, hwbank, dst_range) = + m_event->weights()(0, input_rcu, swbank, src_range); + if (lane == 0) { + LOG_DEBUG_STR("BF:block=" << block << " move(" << src_range << ") to (" << dst_range << ")" + << " swbank=" << swbank << " swlane=" << swlane + << " hwbank=" << hwbank << " hwlane=" << hwlane); + } + } // lanes + } // blocks if (setModFlag) { cache.getCache().getState().bf().write(cache_rcu * MEPHeader::N_PHASE); cache.getCache().getState().bf().write(cache_rcu * MEPHeader::N_PHASE + 1); if (cache_rcu == 0) { - LOG_DEBUG_STR("SetWeights(cache[0]): " << cache.getBeamletWeights()()(0,0,Range::all())); + LOG_DEBUG_STR("SetWeights(cache[0]): " << cache.getBeamletWeights()()(0,0,Range::all(),Range::all())); } } diff --git a/MAC/APL/PIC/RSP_Driver/src/SyncAction.h b/MAC/APL/PIC/RSP_Driver/src/SyncAction.h index 5be5271ae2d..c8f97d8c4ba 100644 --- a/MAC/APL/PIC/RSP_Driver/src/SyncAction.h +++ b/MAC/APL/PIC/RSP_Driver/src/SyncAction.h @@ -86,9 +86,10 @@ namespace LOFAR { /*@}*/ /** - * Get index of current local index + * Set/Get index of current local index */ int getCurrentIndex() const { return m_current_index; } + void setNumIndices(int n_indices) { m_n_indices = n_indices; } int getNumIndices() const { return m_n_indices; } /** diff --git a/MAC/APL/PIC/RSP_Driver/src/UpdBitModeCmd.cc b/MAC/APL/PIC/RSP_Driver/src/UpdBitModeCmd.cc new file mode 100644 index 00000000000..ce7ba2295ef --- /dev/null +++ b/MAC/APL/PIC/RSP_Driver/src/UpdBitModeCmd.cc @@ -0,0 +1,107 @@ +//# UpdBitModeCmd.cc: implementation of the UpdBitModeCmd class +//# +//# Copyright (C) 2002-2004 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: UpdBitModeCmd.cc 13440 2009-06-22 13:26:54Z overeem $ + +#include <lofar_config.h> +#include <Common/LofarLogger.h> + +#include <APL/RSP_Protocol/RSP_Protocol.ph> +#include <APL/RTCCommon/PSAccess.h> +#include <blitz/array.h> + +#include "StationSettings.h" +#include "UpdBitModeCmd.h" + +using namespace blitz; +using namespace LOFAR; +using namespace RSP; +using namespace RSP_Protocol; +using namespace RTC; + +UpdBitModeCmd::UpdBitModeCmd(GCFEvent& event, GCFPortInterface& port, Operation oper) : + Command("SubBitMode", port, oper), + itsEvent(0), + itsCurrentBitsPerSample(0) +{ + itsEvent = new RSPSubbitmodeEvent(event); + + setPeriod(itsEvent->period); +} + +UpdBitModeCmd::~UpdBitModeCmd() +{ + delete itsEvent; +} + +void UpdBitModeCmd::ack(CacheBuffer& /*cache*/) +{ + // intentionally left empty +} + +void UpdBitModeCmd::apply(CacheBuffer& /*cache*/, bool /*setModFlag*/) +{ + // no-op +} + +void UpdBitModeCmd::complete(CacheBuffer& cache) +{ + if (cache.getBitsPerSample() != itsCurrentBitsPerSample) { + + RSPUpdbitmodeEvent ack; + + ack.timestamp = getTimestamp(); + ack.status = RSP_SUCCESS; + ack.handle = (memptr_t)this; // opaque pointer used to refer to the subscription + + for (int i = 0; i < StationSettings::instance()->nrRspBoards(); ++i) { + ack.bitmode_version[i] = cache.getBitModeInfo()()(i).bm_max; + + uint8 select = cache.getBitModeInfo()()(i).bm_select; + if (select == 0) { + ack.bits_per_sample[i] = 16; + } + else if (select == 1) { + ack.bits_per_sample[i] = 8; + } + else if (select == 2) { + ack.bits_per_sample[i] = 4; + } + } + getPort()->send(ack); + } + + itsCurrentBitsPerSample = cache.getBitsPerSample(); +} + +const Timestamp& UpdBitModeCmd::getTimestamp() const +{ + return itsEvent->timestamp; +} + +void UpdBitModeCmd::setTimestamp(const Timestamp& timestamp) +{ + itsEvent->timestamp = timestamp; +} + +bool UpdBitModeCmd::validate() const +{ + return (true); +} diff --git a/MAC/APL/PIC/RSP_Driver/src/UpdBitModeCmd.h b/MAC/APL/PIC/RSP_Driver/src/UpdBitModeCmd.h new file mode 100644 index 00000000000..99ef4331301 --- /dev/null +++ b/MAC/APL/PIC/RSP_Driver/src/UpdBitModeCmd.h @@ -0,0 +1,88 @@ +//# -*- mode: c++ -*- +//# +//# UpdBitModeCmd.h: +//# +//# Copyright (C) 2002-2004 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: UpdBitModeCmd.h 9379 2006-10-04 15:00:52Z donker $ + +#ifndef UPDBITMODECMD_H_ +#define UPDBITMODECMD_H_ + +#include "Command.h" +#include <APL/RSP_Protocol/RSP_Protocol.ph> + +#include <Common/LofarTypes.h> +#include <GCF/TM/GCF_Control.h> + +namespace LOFAR { + namespace RSP { + + class UpdBitModeCmd : public Command + { + public: + /** + * Constructors for a UpdBitModeCmd object. + */ + UpdBitModeCmd(GCFEvent& event, GCFPortInterface& port, Operation oper); + + /* Destructor for UpdBitModeCmd. */ + virtual ~UpdBitModeCmd(); + + /** + * Acknowledge the command by sending the appropriate + * response on m_port. + */ + virtual void ack(CacheBuffer& cache); + + /** + * Make necessary changes to the cache for the next synchronization. + * Any changes will be sent to the RSP boards. + */ + virtual void apply(CacheBuffer& cache, bool setModFlag = true); + + /** + * Complete the command by sending the appropriate response on + * the m_answerport; + */ + virtual void complete(CacheBuffer& cache); + + /*@{*/ + /** + * get timestamp of the event + */ + virtual const RTC::Timestamp& getTimestamp() const; + virtual void setTimestamp(const RTC::Timestamp& timestamp); + /*@}*/ + + /** + * Range check the parameters of the event. + */ + virtual bool validate() const; + + private: + UpdBitModeCmd(); + + RSPSubbitmodeEvent* itsEvent; + uint16 itsCurrentBitsPerSample; + }; + }; +}; + +#endif /* UPDBITMODECMD_H_ */ diff --git a/MAC/APL/PIC/RSP_Driver/src/UpdStatsCmd.cc b/MAC/APL/PIC/RSP_Driver/src/UpdStatsCmd.cc index 6794cb55d48..a4043280e49 100644 --- a/MAC/APL/PIC/RSP_Driver/src/UpdStatsCmd.cc +++ b/MAC/APL/PIC/RSP_Driver/src/UpdStatsCmd.cc @@ -22,6 +22,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> +#include <Common/LofarBitModeInfo.h> #include <APL/RSP_Protocol/RSP_Protocol.ph> #include <APL/RTCCommon/PSAccess.h> @@ -40,8 +41,12 @@ UpdStatsCmd::UpdStatsCmd(GCFEvent& event, GCFPortInterface& port, Operation oper Command("SubStats", port, oper) { m_event = new RSPSubstatsEvent(event); - m_n_devices = ((m_event->type <= Statistics::SUBBAND_POWER) ? NR_BLPS_PER_RSPBOARD : 1) - * StationSettings::instance()->nrRspBoards() * N_POL; + if (m_event->type == Statistics::SUBBAND_POWER) { + m_n_devices = NR_BLPS_PER_RSPBOARD * StationSettings::instance()->nrRspBoards() * N_POL; + } + else { + m_n_devices = 2 * N_POL; + } setPeriod(m_event->period); } @@ -74,12 +79,14 @@ void UpdStatsCmd::complete(CacheBuffer& cache) ack.stats().resize(m_event->rcumask.count(), cache.getSubbandStats()().extent(secondDim)); } else { - ack.stats().resize(m_event->rcumask.count(), MAX_BEAMLETS); + ack.stats().resize(m_event->rcumask.count(), maxBeamlets(cache.getBitsPerSample())); } - + + int activePlanes = (MAX_BITS_PER_SAMPLE / cache.getBitsPerSample()); + unsigned int result_device = 0; for (unsigned int cache_device = 0; cache_device < m_n_devices; cache_device++) { - if (m_event->rcumask[cache_device]) { + if (m_event->rcumask.test(cache_device)) { switch (m_event->type) { case Statistics::SUBBAND_POWER: ack.stats()(result_device, Range::all()) = cache.getSubbandStats()()(cache_device, Range::all()); @@ -88,22 +95,26 @@ void UpdStatsCmd::complete(CacheBuffer& cache) case Statistics::BEAMLET_POWER: // NOTE: MEPHeader::N_BEAMLETS = 4x62 but userside MAX_BEAMLETS may be different // In other words: getBeamletWeights can contain more data than ack.weights - if (MEPHeader::N_BEAMLETS == MAX_BEAMLETS) { + if (MEPHeader::N_BEAMLETS == maxBeamlets(cache.getBitsPerSample())) { ack.stats()(result_device, Range::all()) = cache.getBeamletStats()()(cache_device, Range::all()); } else { - for (int rsp = 0; rsp < 4; rsp++) { - int swstart(rsp*MAX_BEAMLETS_PER_RSP); - int hwstart(rsp*MEPHeader::N_BEAMLETS/4); - ack.stats()(result_device, Range(swstart,swstart+MAX_BEAMLETS_PER_RSP-1)) = - cache.getBeamletStats()()(cache_device, Range(hwstart, hwstart+MAX_BEAMLETS_PER_RSP-1)); - if (cache_device == 0) { - LOG_DEBUG_STR("Getstats:move(" << hwstart << ".." << hwstart+MAX_BEAMLETS_PER_RSP << ") to (" - << swstart << ".." << swstart+MAX_BEAMLETS_PER_RSP << ")"); - } - } + for (int lane = 0; lane < MEPHeader::N_SERDES_LANES; lane++) { + for (int plane = 0; plane < activePlanes; plane++) { + int swstart((lane*maxBeamletsPerRSP(cache.getBitsPerSample())) + (plane*maxDataslotsPerRSP(cache.getBitsPerSample()))); + int hwstart((lane*MEPHeader::N_BEAMLETS) + (plane*MEPHeader::N_BEAMLETS/4)); + ack.stats()(result_device, Range(swstart,swstart+maxDataslotsPerRSP(cache.getBitsPerSample())-1)) = + cache.getBeamletStats()()(cache_device, Range(hwstart, hwstart+maxDataslotsPerRSP(cache.getBitsPerSample())-1)); + if (cache_device == 0) { + LOG_DEBUG_STR("Getstats:move(" << hwstart << ".." << hwstart+maxDataslotsPerRSP(cache.getBitsPerSample())-1 << ") to (" + << swstart << ".." << swstart+maxDataslotsPerRSP(cache.getBitsPerSample())-1 << ")"); + } + } + } + } + if (cache_device == 0) { + LOG_DEBUG_STR("GetStats(cache[0]): " << cache.getBeamletStats()()(0,Range::all())); } - LOG_DEBUG_STR("GetStats(cache[0]): " << cache.getBeamletStats()()(0,Range::all())); break; diff --git a/MAC/APL/PIC/RSP_Driver/src/UpdSubbandsCmd.cc b/MAC/APL/PIC/RSP_Driver/src/UpdSubbandsCmd.cc index 0604f6f51c0..712b455b5b6 100644 --- a/MAC/APL/PIC/RSP_Driver/src/UpdSubbandsCmd.cc +++ b/MAC/APL/PIC/RSP_Driver/src/UpdSubbandsCmd.cc @@ -22,6 +22,7 @@ #include <lofar_config.h> #include <Common/LofarLogger.h> +#include <Common/LofarBitModeInfo.h> #include <APL/RSP_Protocol/RSP_Protocol.ph> #include <APL/RTCCommon/PSAccess.h> @@ -89,15 +90,70 @@ void UpdSubbandsCmd::complete(CacheBuffer& cache) // Note: XLETS are allocated at the first 8 registers in the subbands // area. The beamlets are located behind it. Range src_range; + int result_rcu; + int nPlanes = (MAX_BITS_PER_SAMPLE / cache.getBitsPerSample()); + switch (m_event->type) { case SubbandSelection::BEAMLET: - ack.subbands().resize(m_event->rcumask.count(), MAX_BEAMLETS); - src_range = Range(MEPHeader::N_LOCAL_XLETS, MEPHeader::N_LOCAL_XLETS + MAX_BEAMLETS - 1); + ack.subbands.crosslets().resize(1,1); + ack.subbands.crosslets() = 0; + ack.subbands.setType(SubbandSelection::BEAMLET); + ack.subbands.beamlets().resize(m_event->rcumask.count(), LOFAR::maxBeamlets(cache.getBitsPerSample())); + src_range = Range(0, LOFAR::maxBeamlets(cache.getBitsPerSample()) - 1); + // loop over RCU's to get the results. + result_rcu = 0; + for (int cache_rcu = 0; cache_rcu < StationSettings::instance()->nrRcus(); cache_rcu++) { + if (m_event->rcumask[cache_rcu]) { + // NOTE: MEPHeader::N_BEAMLETS = 4x62 but userside MAX_BEAMLETS may be different + // In other words: getSubbandSelection can contain more data than ack.weights + if (MEPHeader::N_BEAMLETS == LOFAR::maxBeamlets(cache.getBitsPerSample())) { + ack.subbands.beamlets()(result_rcu, 0, Range::all()) = cache.getSubbandSelection().beamlets()(cache_rcu, 0, src_range); + } + else { + for (int plane = 0; plane < nPlanes; plane++) { + for (int rsp = 0; rsp < MEPHeader::N_SERDES_LANES; rsp++) { + int swstart(rsp * LOFAR::maxDataslotsPerRSP(cache.getBitsPerSample())); + int hwstart(rsp * (MEPHeader::N_BEAMLETS/MEPHeader::N_SERDES_LANES)); + ack.subbands.beamlets()(result_rcu, plane, Range(swstart,swstart+LOFAR::maxDataslotsPerRSP(cache.getBitsPerSample())-1)) = + cache.getSubbandSelection().beamlets()(cache_rcu, plane, Range(hwstart, hwstart+LOFAR::maxDataslotsPerRSP(cache.getBitsPerSample())-1)); + if (cache_rcu == 0) { + LOG_DEBUG_STR("UpdSubbands:beamlet:move(" << hwstart << ".." << hwstart+LOFAR::maxDataslotsPerRSP(cache.getBitsPerSample()) << ") to (" + << swstart << ".." << swstart+LOFAR::maxDataslotsPerRSP(cache.getBitsPerSample()) << ")"); + } + } + } + } + result_rcu++; + + if (cache_rcu == 0) { + LOG_DEBUG_STR("m_event->subbands.beamlets() = " << ack.subbands.beamlets()); + LOG_DEBUG_STR("cache->subbands().beamlets() = " << cache.getSubbandSelection().beamlets()); + } + } + } break; case SubbandSelection::XLET: - ack.subbands().resize(m_event->rcumask.count(), MEPHeader::N_LOCAL_XLETS); + ack.subbands.beamlets().resize(1,1); + ack.subbands.beamlets() = 0; + ack.subbands.setType(SubbandSelection::XLET); + ack.subbands.crosslets().resize(m_event->rcumask.count(), MEPHeader::N_LOCAL_XLETS); src_range = Range(0, MEPHeader::N_LOCAL_XLETS - 1); + // loop over RCU's to get the results. + result_rcu = 0; + for (int cache_rcu = 0; cache_rcu < StationSettings::instance()->nrRcus(); cache_rcu++) { + if (m_event->rcumask[cache_rcu]) { + if (m_event->type == SubbandSelection::XLET) { + ack.subbands.crosslets()(result_rcu, Range::all()) = cache.getSubbandSelection().crosslets()(cache_rcu, src_range); + } + result_rcu++; + + if (cache_rcu == 0) { + LOG_DEBUG_STR("m_event->subbands.crosslets() = " << ack.subbands.crosslets()); + LOG_DEBUG_STR("cache->subbands().crosslets() = " << cache.getSubbandSelection().crosslets()); + } + } + } break; default: @@ -105,7 +161,7 @@ void UpdSubbandsCmd::complete(CacheBuffer& cache) exit(EXIT_FAILURE); break; } - +/* // loop over RCU's to get the results. int result_rcu = 0; for (int cache_rcu = 0; cache_rcu < StationSettings::instance()->nrRcus(); cache_rcu++) { @@ -113,18 +169,18 @@ void UpdSubbandsCmd::complete(CacheBuffer& cache) if (m_event->rcumask[cache_rcu]) { // NOTE: MEPHeader::N_BEAMLETS = 4x62 but userside MAX_BEAMLETS may be different // In other words: getSubbandSelection can contain more data than ack.weights - if (MEPHeader::N_BEAMLETS == MAX_BEAMLETS || m_event->type == SubbandSelection::XLET) { + if (MEPHeader::N_BEAMLETS == LOFAR::maxBeamlets(cache.getBitsPerSample()) || m_event->type == SubbandSelection::XLET) { ack.subbands()(result_rcu, Range::all()) = cache.getSubbandSelection()()(cache_rcu, src_range); } else { for (int rsp = 0; rsp < 4; rsp++) { - int swstart(rsp*MAX_BEAMLETS_PER_RSP); + int swstart(rsp*LOFAR::maxBeamletsPerRSP(cache.getBitsPerSample())); int hwstart(MEPHeader::N_LOCAL_XLETS + rsp * (MEPHeader::N_BEAMLETS/4)); - ack.subbands()(result_rcu, Range(swstart,swstart+MAX_BEAMLETS_PER_RSP-1)) = - cache.getSubbandSelection()()(cache_rcu, Range(hwstart, hwstart+MAX_BEAMLETS_PER_RSP-1)); + ack.subbands()(result_rcu, Range(swstart,swstart+LOFAR::maxBeamletsPerRSP(cache.getBitsPerSample())-1)) = + cache.getSubbandSelection()()(cache_rcu, Range(hwstart, hwstart+LOFAR::maxBeamletsPerRSP(cache.getBitsPerSample())-1)); if (cache_rcu == 0) { - LOG_DEBUG_STR("UpdSubbands:move(" << hwstart << ".." << hwstart+MAX_BEAMLETS_PER_RSP << ") to (" - << swstart << ".." << swstart+MAX_BEAMLETS_PER_RSP << ")"); + LOG_DEBUG_STR("UpdSubbands:move(" << hwstart << ".." << hwstart+LOFAR::maxBeamletsPerRSP(cache.getBitsPerSample()) << ") to (" + << swstart << ".." << swstart+LOFAR::maxBeamletsPerRSP(cache.getBitsPerSample()) << ")"); } } } @@ -136,7 +192,7 @@ void UpdSubbandsCmd::complete(CacheBuffer& cache) } } } - +*/ // Finally send the answer getPort()->send(ack); } diff --git a/MAC/APL/PIC/RSP_Driver/src/XWWrite.cc b/MAC/APL/PIC/RSP_Driver/src/XWWrite.cc index 1c400f0917a..020885f58f0 100644 --- a/MAC/APL/PIC/RSP_Driver/src/XWWrite.cc +++ b/MAC/APL/PIC/RSP_Driver/src/XWWrite.cc @@ -44,8 +44,8 @@ using namespace RSP; using namespace EPA_Protocol; XWWrite::XWWrite(GCFPortInterface& board_port, int board_id, int blp, int regid) - : SyncAction(board_port, board_id, 1), - m_blp(blp), m_regid(regid), m_remaining(0), m_offset(0) + : SyncAction(board_port, board_id, (MAX_BITS_PER_SAMPLE/MIN_BITS_PER_SAMPLE)), + m_blp(blp), m_regid(regid), itsPlane(0), m_remaining(0), m_offset(0) { memset(&m_hdr, 0, sizeof(MEPHeader)); } @@ -56,7 +56,14 @@ XWWrite::~XWWrite() void XWWrite::sendrequest() { + int activePlanes = (MAX_BITS_PER_SAMPLE / Cache::getInstance().getBack().getBitsPerSample()); + if (getCurrentIndex() >= activePlanes) { + setContinue(true); + return; + } + uint8 global_blp = (getBoardId() * NR_BLPS_PER_RSPBOARD) + m_blp; + itsPlane = getCurrentIndex(); if (m_regid < MEPHeader::BF_XROUT || m_regid > MEPHeader::BF_YIOUT) { @@ -76,20 +83,36 @@ void XWWrite::sendrequest() switch (m_regid) { case MEPHeader::BF_XROUT: - bfcoefs.hdr.set(MEPHeader::BF_XROUT_HDR, 1 << m_blp, - MEPHeader::WRITE, size, m_offset); + bfcoefs.hdr.set( MEPHeader::WRITE, + 1 << m_blp, + MEPHeader::BF, + MEPHeader::BF_XROUT+(itsPlane*4), + size, + m_offset); break; case MEPHeader::BF_XIOUT: - bfcoefs.hdr.set(MEPHeader::BF_XIOUT_HDR, 1 << m_blp, - MEPHeader::WRITE, size, m_offset); + bfcoefs.hdr.set( MEPHeader::WRITE, + 1 << m_blp, + MEPHeader::BF, + MEPHeader::BF_XIOUT+(itsPlane*4), + size, + m_offset); break; case MEPHeader::BF_YROUT: - bfcoefs.hdr.set(MEPHeader::BF_YROUT_HDR, 1 << m_blp, - MEPHeader::WRITE, size, m_offset); + bfcoefs.hdr.set( MEPHeader::WRITE, + 1 << m_blp, + MEPHeader::BF, + MEPHeader::BF_YROUT+(itsPlane*4), + size, + m_offset); break; case MEPHeader::BF_YIOUT: - bfcoefs.hdr.set(MEPHeader::BF_YIOUT_HDR, 1 << m_blp, - MEPHeader::WRITE, size, m_offset); + bfcoefs.hdr.set( MEPHeader::WRITE, + 1 << m_blp, + MEPHeader::BF, + MEPHeader::BF_YIOUT+(itsPlane*4), + size, + m_offset); break; } diff --git a/MAC/APL/PIC/RSP_Driver/src/XWWrite.h b/MAC/APL/PIC/RSP_Driver/src/XWWrite.h index 51c657a49f3..605b96a2772 100644 --- a/MAC/APL/PIC/RSP_Driver/src/XWWrite.h +++ b/MAC/APL/PIC/RSP_Driver/src/XWWrite.h @@ -61,6 +61,7 @@ namespace LOFAR { private: int m_blp; int m_regid; + int itsPlane; size_t m_remaining; // how much to write size_t m_offset; // where to write diff --git a/MAC/APL/PIC/RSP_Driver/src/rspctl.cc b/MAC/APL/PIC/RSP_Driver/src/rspctl.cc index a03a0698706..f4e3f512853 100644 --- a/MAC/APL/PIC/RSP_Driver/src/rspctl.cc +++ b/MAC/APL/PIC/RSP_Driver/src/rspctl.cc @@ -104,9 +104,11 @@ do { \ #define DEFAULT_SAMPLE_FREQUENCY 160.0e6 double gSampleFrequency = DEFAULT_SAMPLE_FREQUENCY; bool g_getclock = false; -bool gSplitterOn = false; +bool gSplitterOn = false; bool gHasSplitter = false; bool gClockChanged = false; +bool gBitmodeChanged = false; +bool gSplitterChanged = false; #define PAIR 2 @@ -167,8 +169,11 @@ inline double blitz_angle(complex<double> val) return atan(val.imag() / val.real()) * 180.0 / M_PI; } -WeightsCommand::WeightsCommand(GCFPortInterface& port) : Command(port), m_type(WeightsCommand::COMPLEX), - itsStage(0) +WeightsCommand::WeightsCommand(GCFPortInterface& port, const int bitsPerSample) : + Command (port), + m_type (WeightsCommand::COMPLEX), + itsStage (0), + itsBitsPerSample(bitsPerSample) { } @@ -194,28 +199,33 @@ void WeightsCommand::send() RSPSetweightsEvent setweights; setweights.timestamp = Timestamp(0,0); setweights.rcumask = getRCUMask(); - logMessage(cerr,formatString("rcumask.count()=%d",setweights.rcumask.count())); - setweights.weights().resize(1, setweights.rcumask.count(), MAX_BEAMLETS); + + int nBanks = (MAX_BITS_PER_SAMPLE / itsBitsPerSample); + setweights.weights().resize(1, setweights.rcumask.count(), nBanks, maxBeamletsPerBank(itsBitsPerSample)); - bitset<MAX_BEAMLETS> beamlet_mask = getBEAMLETSMask(); + //bitset<maxBeamlets(bitsPerSample)> beamlet_mask = getBEAMLETSMask(); + boost::dynamic_bitset<> beamlet_mask = getBEAMLETSMask(itsBitsPerSample); // -1 < m_value <= 1 complex<double> value = m_value; value *= (1<<14); // -.99999 should become -16383 and 1 should become 16384 setweights.weights() = itsWeights; int rcunr = 0; + int max_beamlets = maxBeamlets(itsBitsPerSample); for (int rcu = 0; rcu < MAX_RCUS; rcu++) { if (setweights.rcumask.test(rcu)) { - for (int beamlet = 0; beamlet < MAX_BEAMLETS; beamlet++) { + for (int beamlet = 0; beamlet < max_beamlets; beamlet++) { if (beamlet_mask.test(beamlet)) { - setweights.weights()(0,rcunr,beamlet) = complex<int16>((int16)value.real(), (int16)value.imag()); // complex<int16>((int16)value,0); + int plane = beamlet / maxBeamletsPerBank(itsBitsPerSample); + int beamletnr = beamlet % maxBeamletsPerBank(itsBitsPerSample); + setweights.weights()(0,rcunr,plane,beamletnr) = complex<int16>((int16)value.real(), (int16)value.imag()); + //setweights.weights()(0,rcunr,plane,beamletnr) = complex<int16>(10+plane, beamletnr); // for testing } - } + } // beamlet rcunr++; } - - } + } // rcu m_rspport.send(setweights); } break; @@ -232,7 +242,8 @@ GCFEvent::TResult WeightsCommand::ack(GCFEvent& e) case RSP_GETWEIGHTSACK: { RSPGetweightsackEvent ack(e); bitset<MAX_RCUS> mask = getRCUMask(); - itsWeights.resize(1, mask.count(), MAX_BEAMLETS); + int nPlanes = (MAX_BITS_PER_SAMPLE / itsBitsPerSample); + itsWeights.resize(1, mask.count(), nPlanes, maxBeamletsPerBank(itsBitsPerSample)); itsWeights = complex<int16>(0,0); itsWeights = ack.weights(); @@ -249,12 +260,12 @@ GCFEvent::TResult WeightsCommand::ack(GCFEvent& e) for (int rcuout = 0; rcuout < get_ndevices(); rcuout++) { if (mask[rcuout]) { std::ostringstream logStream; - logStream << ack.weights()(0, rcuin++, Range::all()); + logStream << ack.weights()(0, rcuin++, Range::all(), Range::all()); logMessage(cout,formatString("RCU[%2d].weights=%s", rcuout,logStream.str().c_str())); } } } else { - blitz::Array<complex<double>, 3> ackweights; + blitz::Array<complex<double>, 4> ackweights; ackweights.resize(ack.weights().shape()); // convert to amplitude and angle @@ -264,7 +275,7 @@ GCFEvent::TResult WeightsCommand::ack(GCFEvent& e) for (int rcuout = 0; rcuout < get_ndevices(); rcuout++) { if (mask[rcuout]) { std::ostringstream logStream; - logStream << ackweights(0, rcuin++, Range::all()); + logStream << ackweights(0, rcuin++, Range::all(), Range::all()); logMessage(cout,formatString("RCU[%2d].weights=%s", rcuout,logStream.str().c_str())); } } @@ -299,7 +310,10 @@ GCFEvent::TResult WeightsCommand::ack(GCFEvent& e) } -SubbandsCommand::SubbandsCommand(GCFPortInterface& port) : Command(port), m_type(0) +SubbandsCommand::SubbandsCommand(GCFPortInterface& port, const int bitsPerSample) : + Command (port), + m_type (0), + itsBitsPerSample(bitsPerSample) { } @@ -323,40 +337,49 @@ void SubbandsCommand::send() setsubbands.rcumask = getRCUMask(); setsubbands.subbands.setType(m_type); - logMessage(cerr,formatString("rcumask.count()=%d",setsubbands.rcumask.count())); - + logMessage(cerr,formatString("rcumask.count()=%d",setsubbands.rcumask.count())); + + if (m_subbandlist.size() > maxBeamlets(itsBitsPerSample)) { + logMessage(cerr,"Error: too many subbands selected"); + exit(EXIT_FAILURE); + } + + int nPlanes = (MAX_BITS_PER_SAMPLE / itsBitsPerSample); + // if only 1 subband selected, apply selection to all switch (m_type) { - - case SubbandSelection::BEAMLET: - { - if (1 == m_subbandlist.size()) { - setsubbands.subbands().resize(1, MAX_BEAMLETS); - std::list<int>::iterator it = m_subbandlist.begin(); - setsubbands.subbands() = (*it); - } else { - setsubbands.subbands().resize(1, m_subbandlist.size()); - - int i = 0; - std::list<int>::iterator it; - for (it = m_subbandlist.begin(); it != m_subbandlist.end(); it++, i++) - { - if (i >= MAX_BEAMLETS) break; - setsubbands.subbands()(0, i) = (*it); - } + case SubbandSelection::BEAMLET: { + if (1 == m_subbandlist.size()) { + setsubbands.subbands.beamlets().resize(1, nPlanes, maxBeamletsPerBank(itsBitsPerSample)); + std::list<int>::iterator it = m_subbandlist.begin(); + setsubbands.subbands.beamlets() = (*it); + } else { + setsubbands.subbands.beamlets().resize(1, nPlanes, maxBeamletsPerBank(itsBitsPerSample)); + setsubbands.subbands.beamlets() = 0; + int i = 0; + int max_beamlets = maxBeamlets(itsBitsPerSample); + std::list<int>::iterator it; + for (it = m_subbandlist.begin(); it != m_subbandlist.end(); it++, i++) { + if (i >= max_beamlets) { + break; + } + int plane = i / maxBeamletsPerBank(itsBitsPerSample); + int subbandnr = i % maxBeamletsPerBank(itsBitsPerSample); + setsubbands.subbands.beamlets()(0, plane, subbandnr) = (*it); + } #if 0 - for (; i < MAX_BEAMLETS; i++) { - setsubbands.subbands()(0, i) = 0; + for (; i < maxBeamlets(bitsPerSample); i++) { + setsubbands.subbands.beamlets()(0, Range::all(), i) = 0; } #endif - } + } } break; - case SubbandSelection::XLET: { - setsubbands.subbands().resize(1,1); - std::list<int>::iterator it = m_subbandlist.begin(); - setsubbands.subbands() = (*it); + case SubbandSelection::XLET: { + setsubbands.subbands.crosslets().resize(1, 1, 1); + std::list<int>::iterator it = m_subbandlist.begin(); + setsubbands.subbands.crosslets() = (*it); } break; @@ -386,15 +409,15 @@ GCFEvent::TResult SubbandsCommand::ack(GCFEvent& e) if (RSP_SUCCESS == ack.status) { int rcuin = 0; for (int rcuout = 0; rcuout < get_ndevices(); rcuout++) { - if (mask[rcuout]) { std::ostringstream logStream; - logStream << ack.subbands()(rcuin++, Range::all()); - if (SubbandSelection::BEAMLET == m_type) { - logMessage(cout,formatString("RCU[%2d].subbands=%s", rcuout,logStream.str().c_str())); - } else { - logMessage(cout,formatString("RCU[%2d].xcsubbands=%s", rcuout,logStream.str().c_str())); - } + if (SubbandSelection::BEAMLET == m_type) { + logStream << ack.subbands.beamlets()(rcuin++, Range::all(), Range::all()); + logMessage(cout,formatString("RCU[%2d].subbands=%s", rcuout,logStream.str().c_str())); + } else { + logStream << ack.subbands.crosslets()(rcuin++, Range::all(), Range::all()); + logMessage(cout,formatString("RCU[%2d].xcsubbands=%s", rcuout,logStream.str().c_str())); + } } } } @@ -504,7 +527,6 @@ GCFEvent::TResult RCUCommand::ack(GCFEvent& e) // Swap X Y on RCU - SWAPXYCommand::SWAPXYCommand(GCFPortInterface& port) : Command(port) { } @@ -589,6 +611,93 @@ GCFEvent::TResult SWAPXYCommand::ack(GCFEvent& e) return status; } +// Swap X Y on RCU +BitmodeCommand::BitmodeCommand(GCFPortInterface& port) : Command(port) +{ +} + +void BitmodeCommand::send() +{ + if (getMode()) { + // GET + RSPGetbitmodeEvent getbitmode; + getbitmode.timestamp = Timestamp(0,0); + getbitmode.cache = true; + + m_rspport.send(getbitmode); + } + else { + // SET + RSPSetbitmodeEvent setbitmode; + setbitmode.timestamp = Timestamp(0,0); + setbitmode.rspmask = getRSPMask(); + setbitmode.bits_per_sample = bitmode(); + m_rspport.send(setbitmode); + } +} + +GCFEvent::TResult BitmodeCommand::ack(GCFEvent& e) +{ + GCFEvent::TResult status = GCFEvent::HANDLED; + + switch (e.signal) { + case RSP_GETBITMODEACK: { + RSPGetbitmodeackEvent ack(e); + + std::ostringstream msg; + msg << "setbitmodeack.timestamp=" << ack.timestamp; + logMessage(cout, msg.str()); + msg.seekp(0); + + if (ack.status != RSP_SUCCESS) { + logMessage(cerr, "Error: RSP_GETBitMode command failed."); + break; + } + + // print bitmode settings + cout << "board :version :mode\n"; + for (int rsp = 0; rsp < get_ndevices(); rsp++) { + if (getRSPMask().test(rsp)) { + switch (ack.bitmode_version[rsp]) { + case 0: + cout << formatString("RSP[%02u]: 16 : %2d\n", rsp, ack.bits_per_sample[rsp]); + break; + case 1: + cout << formatString("RSP[%02u]: 16/8 : %2d\n", rsp, ack.bits_per_sample[rsp]); + break; + case 2: + cout << formatString("RSP[%02u]: 16/8/4 : %2d\n", rsp, ack.bits_per_sample[rsp]); + break; + default: break; + } + } + } + } + break; + + case RSP_SETBITMODEACK: { + RSPSetbitmodeackEvent ack(e); + + std::ostringstream msg; + msg << "setbitmodeack.timestamp=" << ack.timestamp; + logMessage(cout, msg.str()); + + if (RSP_SUCCESS != ack.status) { + logMessage(cerr, "Error: RSP_SETBitMode command failed."); + } + } + break; + + default: + status = GCFEvent::NOT_HANDLED; + break; + } + + GCFScheduler::instance()->stop(); + + return status; +} + HBACommand::HBACommand(GCFPortInterface& port) : Command(port) { @@ -1917,9 +2026,10 @@ StatisticsBaseCommand::StatisticsBaseCommand(GCFPortInterface& port) : Command(p { } -StatisticsCommand::StatisticsCommand(GCFPortInterface& port) : StatisticsBaseCommand(port), - m_type(Statistics::SUBBAND_POWER), - m_stats() +StatisticsCommand::StatisticsCommand(GCFPortInterface& port, const int bitsPerSample) : StatisticsBaseCommand(port), + m_type (Statistics::SUBBAND_POWER), + m_stats (), + itsBitsPerSample(bitsPerSample) { } @@ -1963,7 +2073,15 @@ void StatisticsCommand::stop() void StatisticsCommand::capture_statistics(Array<double, 2>& stats, const Timestamp& timestamp) { - if (0 == m_nseconds) { + if (sum(m_stats.shape()) != sum(stats.shape())) { + gBitmodeChanged = true; + } + + if (gBitmodeChanged) { // force start at new cycle + m_nseconds = 0; + } + + if (m_nseconds == 0) { // initialize values array m_stats.resize(stats.shape()); m_stats = 0.0; @@ -1988,8 +2106,9 @@ void StatisticsCommand::capture_statistics(Array<double, 2>& stats, const Timest } LOG_DEBUG_STR("statistics update at " << timestamp); - - if(m_duration == 0) { + + if (m_duration == 0) { + //cout << m_stats << endl; plot_statistics(m_stats, timestamp); } else { @@ -2013,10 +2132,9 @@ void StatisticsCommand::plot_statistics(Array<double, 2>& stats, const Timestamp static gnuplot_ctrl* handle = 0; static gnuplot_ctrl* handle2 = 0; - int n_freqbands = stats.extent(secondDim); + int x_range = stats.extent(secondDim); int n_firstIndex = stats.extent(firstDim); bitset<MAX_RCUS> mask = getRCUMask(); - char plotcmd[256]; int startrcu; int stoprcu; @@ -2035,7 +2153,7 @@ void StatisticsCommand::plot_statistics(Array<double, 2>& stats, const Timestamp gClockChanged = false; } #endif - + if (!handle) { handle = gnuplot_init(); if (!handle) return; @@ -2051,7 +2169,7 @@ void StatisticsCommand::plot_statistics(Array<double, 2>& stats, const Timestamp break; case Statistics::BEAMLET_POWER: gnuplot_cmd(handle, "set xlabel \"Beamlet index\"\n"); - gnuplot_cmd(handle, "set xrange [0:%d]\n", MAX_BEAMLETS); + gnuplot_cmd(handle, "set xrange [0:%d]\n", x_range); break; } } @@ -2070,6 +2188,11 @@ void StatisticsCommand::plot_statistics(Array<double, 2>& stats, const Timestamp gnuplot_cmd(handle, "set xrange [0:%f]\n", gSampleFrequency / 2.0); } + // Redefine xrange when bitmode changed. + if (gBitmodeChanged && (m_type == Statistics::BEAMLET_POWER)) { + gnuplot_cmd(handle, "set xrange [0:%d]\n", x_range); + } + gnuplot_cmd(handle, plotcmd); gnuplot_cmd(handle, "plot "); @@ -2077,12 +2200,17 @@ void StatisticsCommand::plot_statistics(Array<double, 2>& stats, const Timestamp int count = 0; startrcu = 0; - if (gSplitterOn) { - stoprcu = get_ndevices() / 2; - } - else { - stoprcu = get_ndevices(); - } + if (m_type == Statistics::SUBBAND_POWER) { + if (gSplitterOn) { + stoprcu = get_ndevices() / 2; + } + else { + stoprcu = get_ndevices(); + } + } + else { + stoprcu = get_ndevices() / 2; + } for (int rcuout = startrcu; rcuout < stoprcu; rcuout++) { if (mask[rcuout]) { @@ -2093,11 +2221,11 @@ void StatisticsCommand::plot_statistics(Array<double, 2>& stats, const Timestamp switch (m_type) { case Statistics::SUBBAND_POWER: gnuplot_cmd(handle, "\"-\" using (%.1f/%.1f*$1):(10*log10($2)) title \"(RCU=%d)\" with steps ", - gSampleFrequency, n_freqbands*2.0, rcuout); + gSampleFrequency, x_range*2.0, rcuout); break; case Statistics::BEAMLET_POWER: - gnuplot_cmd(handle, "\"-\" using (1.0*$1):(10*log10($2)) title \"Beamlet Power (RSP board %d, %c)\" with steps ", - (rcuout/2), (rcuout%2?'Y':'X')); + gnuplot_cmd(handle, "\"-\" using (1.0*$1):(10*log10($2)) title \"Beamlet Power (%c)\" with steps ", + (rcuout%2?'Y':'X')); break; default: logMessage(cerr,"Error: invalid m_type"); @@ -2106,14 +2234,9 @@ void StatisticsCommand::plot_statistics(Array<double, 2>& stats, const Timestamp } } } + //stats = stats + 1; // too show zeros in log10() gnuplot_cmd(handle, "\n"); - - if (gSplitterOn) { - gnuplot_write_matrix(handle, stats(Range(0,(n_firstIndex/2)-1), Range::all())); - } - else { - gnuplot_write_matrix(handle, stats); - } + gnuplot_write_matrix(handle, stats(Range(0, count-1), Range::all())); // if splitter is now OFF but the second screen is still shown, remove this window if (handle2 && !gSplitterOn) { @@ -2123,68 +2246,82 @@ void StatisticsCommand::plot_statistics(Array<double, 2>& stats, const Timestamp // if Splitter is active plot another graphics if (gSplitterOn) { - if (!handle2) { - handle2 = gnuplot_init(); - if (!handle2) return; - - gnuplot_cmd(handle2, "set grid x y\n"); - gnuplot_cmd(handle2, "set ylabel \"dB\"\n"); - gnuplot_cmd(handle2, "set yrange [0:160]\n"); - - switch (m_type) { - case Statistics::SUBBAND_POWER: - gnuplot_cmd(handle2, "set xlabel \"Frequency (Hz)\"\n"); - gnuplot_cmd(handle2, "set xrange [0:%f]\n", gSampleFrequency / 2.0); - break; - case Statistics::BEAMLET_POWER: - gnuplot_cmd(handle2, "set xlabel \"Beamlet index\"\n"); - gnuplot_cmd(handle2, "set xrange [0:%d]\n", MAX_BEAMLETS); - break; - } - } - - time_t seconds = timestamp.sec(); - strftime(plotcmd, 255, "set title \"Ring 1 %s - %a, %d %b %Y %H:%M:%S %z\"\n", gmtime(&seconds)); - - // Redefine xrange when clock changed. - if (gClockChanged && (m_type == Statistics::SUBBAND_POWER)) { - gnuplot_cmd(handle2, "set xrange [0:%f]\n", gSampleFrequency / 2.0); - } - - gnuplot_cmd(handle2, plotcmd); - - gnuplot_cmd(handle2, "plot "); - // splot devices - int count = 0; - startrcu = get_ndevices() / 2; stoprcu = get_ndevices(); - + int rcuCount = 0; for (int rcuout = startrcu; rcuout < stoprcu; rcuout++) { if (mask[rcuout]) { - if (count > 0) - gnuplot_cmd(handle2, ","); - count++; - - switch (m_type) { - case Statistics::SUBBAND_POWER: - gnuplot_cmd(handle2, "\"-\" using (%.1f/%.1f*$1):(10*log10($2)) title \"(RCU=%d)\" with steps ", - gSampleFrequency, n_freqbands*2.0, rcuout); - break; - case Statistics::BEAMLET_POWER: - gnuplot_cmd(handle2, "\"-\" using (1.0*$1):(10*log10($2)) title \"Beamlet Power (RSP board %d, %c)\" with steps ", - (rcuout/2), (rcuout%2?'Y':'X')); - break; - default: - logMessage(cerr,"Error: invalid m_type"); - exit(EXIT_FAILURE); - break; - } + rcuCount++; } } - gnuplot_cmd(handle2, "\n"); - - gnuplot_write_matrix(handle2, stats(Range((n_firstIndex/2),n_firstIndex-1), Range::all())); + if (rcuCount > 0) { + if (!handle2) { + handle2 = gnuplot_init(); + if (!handle2) return; + + gnuplot_cmd(handle2, "set grid x y\n"); + gnuplot_cmd(handle2, "set ylabel \"dB\"\n"); + gnuplot_cmd(handle2, "set yrange [0:160]\n"); + + switch (m_type) { + case Statistics::SUBBAND_POWER: + gnuplot_cmd(handle2, "set xlabel \"Frequency (Hz)\"\n"); + gnuplot_cmd(handle2, "set xrange [0:%f]\n", gSampleFrequency / 2.0); + break; + case Statistics::BEAMLET_POWER: + gnuplot_cmd(handle2, "set xlabel \"Beamlet index\"\n"); + gnuplot_cmd(handle2, "set xrange [0:%d]\n", x_range); + break; + } + } + + time_t seconds = timestamp.sec(); + strftime(plotcmd, 255, "set title \"Ring 1 %s - %a, %d %b %Y %H:%M:%S %z\"\n", gmtime(&seconds)); + + // Redefine xrange when clock changed. + if (gClockChanged && (m_type == Statistics::SUBBAND_POWER)) { + gnuplot_cmd(handle2, "set xrange [0:%f]\n", gSampleFrequency / 2.0); + } + + // Redefine xrange when bitmode changed. + if (gBitmodeChanged && (m_type == Statistics::BEAMLET_POWER)) { + gnuplot_cmd(handle2, "set xrange [0:%d]\n", x_range); + } + + gnuplot_cmd(handle2, plotcmd); + + gnuplot_cmd(handle2, "plot "); + // splot devices + int count = 0; + + startrcu = get_ndevices() / 2; + stoprcu = get_ndevices(); + + for (int rcuout = startrcu; rcuout < stoprcu; rcuout++) { + if (mask[rcuout]) { + if (count > 0) + gnuplot_cmd(handle2, ","); + count++; + + switch (m_type) { + case Statistics::SUBBAND_POWER: + gnuplot_cmd(handle2, "\"-\" using (%.1f/%.1f*$1):(10*log10($2)) title \"(RCU=%d)\" with steps ", + gSampleFrequency, x_range*2.0, rcuout); + break; + case Statistics::BEAMLET_POWER: + gnuplot_cmd(handle2, "\"-\" using (1.0*$1):(10*log10($2)) title \"Beamlet Power (%c)\" with steps ", + (rcuout%2?'Y':'X')); + break; + default: + logMessage(cerr,"Error: invalid m_type"); + exit(EXIT_FAILURE); + break; + } + } + } + gnuplot_cmd(handle2, "\n"); + gnuplot_write_matrix(handle2, stats(Range((n_firstIndex/2),(n_firstIndex/2)+count-1), Range::all())); + } } } @@ -2552,17 +2689,18 @@ GCFEvent::TResult LatencyCommand::ack(GCFEvent& e) // RSPCtl::RSPCtl(string name, int argc, char** argv) : GCFTask((State)&RSPCtl::initial, name), - itsCommand (0), - m_nrcus (0), - m_nrspboards (0), - itsNantennas (0), - m_argc (argc), - m_argv (argv), - m_instancenr (-1), - itsNeedClockOnce(false), - itsNeedClock (false), - itsNeedSplitter (false), - m_subclock (*itsRSPDriver) + itsCommand (0), + m_nrcus (0), + m_nrspboards (0), + itsNantennas (0), + itsNbitsPerSample(MAX_BITS_PER_SAMPLE), + m_argc (argc), + m_argv (argv), + m_instancenr (-1), + itsNeedClockOnce (false), + itsNeedClock (false), + itsNeedSplitter (false), + m_subclock (*itsRSPDriver) { registerProtocol(RSP_PROTOCOL, RSP_PROTOCOL_STRINGS); @@ -2585,13 +2723,17 @@ RSPCtl::~RSPCtl() GCFEvent::TResult RSPCtl::initial(GCFEvent& e, GCFPortInterface& port) { LOG_DEBUG_STR ("initial:" << eventName(e) << "@" << port.getName()); - GCFEvent::TResult status = GCFEvent::HANDLED; switch(e.signal) { case F_INIT: break; case F_ENTRY: { + if (m_argc == 1) { + usage(false); + exit(EXIT_FAILURE); + } + // setup a connection with the RSPDriver if (!itsRSPDriver->isConnected()) { itsRSPDriver->autoOpen(3,0,1); // try 3 times at 1 second interval @@ -2621,8 +2763,22 @@ GCFEvent::TResult RSPCtl::initial(GCFEvent& e, GCFPortInterface& port) m_nrspboards = ack.n_rspboards; m_maxrspboards = ack.max_rspboards; gHasSplitter = ack.hasSplitter; - LOG_DEBUG_STR(formatString("n_rcus =%d",m_nrcus)); + LOG_DEBUG_STR(formatString("n_rcus =%d",m_nrcus)); LOG_DEBUG_STR(formatString("n_rspboards=%d of %d", m_nrspboards, m_maxrspboards)); + RSPGetbitmodeEvent getBitmode; + itsRSPDriver->send(getBitmode); + } + break; + + case RSP_GETBITMODEACK: { + RSPGetbitmodeackEvent ack(e); + // bitmode can be configured per RSPboard (although never used). Use highest value of the boards + // because that is supported by all. + itsNbitsPerSample = MIN_BITS_PER_SAMPLE; + for (int i = 0; i < m_nrspboards; i++) { + itsNbitsPerSample = (ack.bits_per_sample[i] > itsNbitsPerSample) ? ack.bits_per_sample[i] : itsNbitsPerSample; + } + LOG_DEBUG_STR(formatString("bits/sample=%d", itsNbitsPerSample)); // connected to RSPDriver, parse the arguments if (!(itsCommand = parse_options(m_argc, m_argv))) { @@ -2645,11 +2801,10 @@ GCFEvent::TResult RSPCtl::initial(GCFEvent& e, GCFPortInterface& port) break; default: - status = GCFEvent::NOT_HANDLED; - break; + return(GCFEvent::NOT_HANDLED); } - return status; + return (GCFEvent::HANDLED); } // @@ -2682,6 +2837,9 @@ GCFEvent::TResult RSPCtl::getClock(GCFEvent& e, GCFPortInterface& port) if (itsNeedSplitter) { TRAN(RSPCtl::sub2Splitter); } + else if (itsNeedBitmode) { + TRAN(RSPCtl::sub2Bitmode); + } else { TRAN(RSPCtl::doCommand); } @@ -2741,6 +2899,9 @@ GCFEvent::TResult RSPCtl::sub2Clock(GCFEvent& e, GCFPortInterface& port) if (itsNeedSplitter) { TRAN(RSPCtl::sub2Splitter); } + else if (itsNeedBitmode) { + TRAN(RSPCtl::sub2Bitmode); + } else { TRAN(RSPCtl::doCommand); } @@ -2795,6 +2956,67 @@ GCFEvent::TResult RSPCtl::sub2Splitter(GCFEvent& e, GCFPortInterface& port) RSPUpdsplitterEvent updateEvent(e); gSplitterOn = updateEvent.splitter[0]; logMessage(cerr, formatString("The splitter is currently %s", gSplitterOn ? "ON" : "OFF")); + if (itsNeedBitmode) { + TRAN(RSPCtl::sub2Bitmode); + } + else { + TRAN(RSPCtl::doCommand); + } + } + break; + + case F_DISCONNECTED: { + port.close(); + logMessage(cerr,formatString("Error: port '%s' disconnected.",port.getName().c_str())); + exit(EXIT_FAILURE); + } + break; + + default: + status = GCFEvent::NOT_HANDLED; + break; + } + + return status; +} + +// +// sub2Bitmode(event, port) +// +GCFEvent::TResult RSPCtl::sub2Bitmode(GCFEvent& e, GCFPortInterface& port) +{ + LOG_DEBUG_STR ("sub2Bitmode:" << eventName(e) << "@" << port.getName()); + + GCFEvent::TResult status = GCFEvent::HANDLED; + + switch (e.signal) { + case F_ENTRY: { + logMessage(cerr, "Taking subscription on the bitmode"); + RSPSubbitmodeEvent subEvent; + subEvent.timestamp = Timestamp(0,0); + subEvent.period = 1; // check for change every second + itsRSPDriver->send(subEvent); + } + break; + + case RSP_SUBBITMODEACK: { + RSPSubbitmodeackEvent answer(e); + if (answer.status != RSP_SUCCESS) { + logMessage(cerr, "Subscription on the bitmode failed."); + exit(EXIT_FAILURE); + } + // wait for update event + } + break; + + case RSP_UPDBITMODE: { + RSPUpdbitmodeEvent update(e); + itsNbitsPerSample = MIN_BITS_PER_SAMPLE; + for (int i = 0; i < m_nrspboards; i++) { + itsNbitsPerSample = (update.bits_per_sample[i] > itsNbitsPerSample) ? + update.bits_per_sample[i] : itsNbitsPerSample; + } + logMessage(cerr, formatString("The bitmode is currently %d", itsNbitsPerSample)); TRAN(RSPCtl::doCommand); } break; @@ -2874,9 +3096,13 @@ GCFEvent::TResult RSPCtl::doCommand(GCFEvent& e, GCFPortInterface& port) case RSP_GETDATASTREAMACK: case RSP_SETSWAPXYACK: case RSP_GETSWAPXYACK: + case RSP_SETBITMODEACK: + case RSP_GETBITMODEACK: status = itsCommand->ack(e); // handle the acknowledgement gClockChanged = false; + gBitmodeChanged = false; + gSplitterChanged = false; break; case RSP_UPDCLOCK: { @@ -2890,10 +3116,23 @@ GCFEvent::TResult RSPCtl::doCommand(GCFEvent& e, GCFPortInterface& port) case RSP_UPDSPLITTER: { RSPUpdsplitterEvent updateEvent(e); gSplitterOn = updateEvent.splitter[0]; + gSplitterChanged = true; logMessage(cerr, formatString("NOTE: The splitter switched to %s", gSplitterOn ? "ON" : "OFF")); } break; + case RSP_UPDBITMODE: { + RSPUpdbitmodeEvent update(e); + itsNbitsPerSample = MIN_BITS_PER_SAMPLE; + for (int i = 0; i < m_nrspboards; i++) { + itsNbitsPerSample = (update.bits_per_sample[i] > itsNbitsPerSample) ? + update.bits_per_sample[i] : itsNbitsPerSample; + } + gBitmodeChanged = true; + logMessage(cerr, formatString("NOTE: The bitmode switched to %d", itsNbitsPerSample)); + } + break; + default: logMessage(cerr,formatString("Error: unhandled event %s.", eventName(e).c_str())); GCFScheduler::instance()->stop(); @@ -3015,6 +3254,7 @@ static void usage(bool exportMode) cout << "rspctl --splitter[=0|1] # set or get the status of the Serdes splitter" << endl; cout << "rspctl --datastream[=0|1|2|3] # set or get the status of data stream to cep" << endl; cout << "rspctl --swapxy[=0|1] [--select=<set>] # set or get the status of xy swap, 0=normal, 1=swapped" << endl; + cout << "rspctl --bitmode[=4|8|16] # set or get the number of bits per sample" << endl; if (exportMode) { cout << endl; cout << "--- Raw register control -------------------------------------------------------------------------------------" << endl; @@ -3050,7 +3290,8 @@ Command* RSPCtl::parse_options(int argc, char** argv) select.push_back(i); beamlets.clear(); - for (int i = 0; i < MAX_BEAMLETS; ++i) + int max_beamlets = maxBeamlets(itsNbitsPerSample); + for (int i = 0; i < max_beamlets; ++i) beamlets.push_back(i); optind = 0; // reset option parsing @@ -3087,6 +3328,7 @@ Command* RSPCtl::parse_options(int argc, char** argv) { "wgmode", required_argument, 0, 'G' }, { "hbadelays", optional_argument, 0, 'H' }, { "specinv", optional_argument, 0, 'I' }, + { "bitmode", optional_argument, 0, 'K' }, { "latency", no_argument, 0, 'L' }, { "phase", required_argument, 0, 'P' }, { "tdstatus", no_argument, 0, 'Q' }, @@ -3107,7 +3349,7 @@ Command* RSPCtl::parse_options(int argc, char** argv) realDelays = false; while (1) { int option_index = 0; - int c = getopt_long(argc, argv, "a::b:c::d:e::f:g::hi:l:m:n:p::qr::s::t::vw::xy:z::A:BC::D:E::G:H::I::LP:QR::ST::VX1:2:", long_options, &option_index); + int c = getopt_long(argc, argv, "a::b:c::d:e::g::hi:l:m:n:p::qr::s::t::vw::xy:z::A:BC::D:E::G:H::I::K::LP:QR::ST::VXY::Z::1:2:", long_options, &option_index); if (c == -1) // end of argument list reached? break; @@ -3136,7 +3378,7 @@ Command* RSPCtl::parse_options(int argc, char** argv) logMessage(cerr,"Error: 'command' argument should come before --beamlets argument"); exit(EXIT_FAILURE); } - beamlets = strtolist(optarg, MAX_BEAMLETS); + beamlets = strtolist(optarg, maxBeamlets(itsNbitsPerSample)); if (beamlets.empty()) { logMessage(cerr,"Error: invalid or missing '--beamlets' option"); exit(EXIT_FAILURE); @@ -3151,7 +3393,7 @@ Command* RSPCtl::parse_options(int argc, char** argv) { if (command) delete command; - WeightsCommand* weightscommand = new WeightsCommand(*itsRSPDriver); + WeightsCommand* weightscommand = new WeightsCommand(*itsRSPDriver, itsNbitsPerSample); weightscommand->setType(WeightsCommand::COMPLEX); command = weightscommand; @@ -3175,7 +3417,7 @@ Command* RSPCtl::parse_options(int argc, char** argv) { if (command) delete command; - WeightsCommand* weightscommand = new WeightsCommand(*itsRSPDriver); + WeightsCommand* weightscommand = new WeightsCommand(*itsRSPDriver, itsNbitsPerSample); weightscommand->setType(WeightsCommand::ANGLE); command = weightscommand; @@ -3206,10 +3448,10 @@ Command* RSPCtl::parse_options(int argc, char** argv) { if (command) delete command; - SubbandsCommand* subbandscommand = new SubbandsCommand(*itsRSPDriver); + SubbandsCommand* subbandscommand = new SubbandsCommand(*itsRSPDriver, itsNbitsPerSample); subbandscommand->setType(SubbandSelection::BEAMLET); - command = subbandscommand; + command->set_ndevices(m_nrcus); if (optarg) { @@ -3472,22 +3714,48 @@ Command* RSPCtl::parse_options(int argc, char** argv) } break; + case 'K': // bitmode + { + if (command) + delete command; + BitmodeCommand* bitmodecommand = new BitmodeCommand(*itsRSPDriver); + command = bitmodecommand; + + command->set_ndevices(m_nrspboards); + select.clear(); + for (int i = 0; i < m_nrspboards; ++i) { + select.push_back(i); + } + + if (optarg) { + bitmodecommand->setMode(false); + unsigned long bitmode = strtoul(optarg, 0, 0); + if (bitmode != 4 && bitmode != 8 && bitmode != 16) { + logMessage(cerr, formatString("Error: bitmode value can only be 4, 8 or 16, not %ld", bitmode)); + } + bitmodecommand->bitmode(bitmode); + } + } break; + case 't': // --statistics { if (command) delete command; - StatisticsCommand* statscommand = new StatisticsCommand(*itsRSPDriver); + StatisticsCommand* statscommand = new StatisticsCommand(*itsRSPDriver, itsNbitsPerSample); command = statscommand; command->set_ndevices(m_nrcus); - + + itsNeedSplitter = true; + if (optarg) { if (!strcmp(optarg, "subband")) { statscommand->setType(Statistics::SUBBAND_POWER); } else if (!strcmp(optarg, "beamlet")) { - command->set_ndevices(m_nrspboards * N_POL); + // 2 = number of cep streams, normal 1, in splitted mode 2 + command->set_ndevices(2 * N_POL); statscommand->setType(Statistics::BEAMLET_POWER); - itsNeedSplitter = true; + itsNeedBitmode = true; } else { logMessage(cerr, formatString("Error: invalid statistics type %s", optarg)); exit(EXIT_FAILURE); @@ -3518,7 +3786,7 @@ Command* RSPCtl::parse_options(int argc, char** argv) { if (command) delete command; - SubbandsCommand* subbandscommand = new SubbandsCommand(*itsRSPDriver); + SubbandsCommand* subbandscommand = new SubbandsCommand(*itsRSPDriver, itsNbitsPerSample); subbandscommand->setType(SubbandSelection::XLET); command = subbandscommand; diff --git a/MAC/APL/PIC/RSP_Driver/src/rspctl.conf.in b/MAC/APL/PIC/RSP_Driver/src/rspctl.conf.in deleted file mode 100644 index f568ebf4c38..00000000000 --- a/MAC/APL/PIC/RSP_Driver/src/rspctl.conf.in +++ /dev/null @@ -1,5 +0,0 @@ -# -# Configuration of the RSPCtl communication ports. -# -mac.ns.RSPCtl.server.type=TCP -mac.top.RSPCtl.server.remoteservice=RSPDriver:acceptor_v3 diff --git a/MAC/APL/PIC/RSP_Driver/src/rspctl.h b/MAC/APL/PIC/RSP_Driver/src/rspctl.h index 4e3d4ec5f69..76f28e4b78e 100644 --- a/MAC/APL/PIC/RSP_Driver/src/rspctl.h +++ b/MAC/APL/PIC/RSP_Driver/src/rspctl.h @@ -28,6 +28,7 @@ #include <Common/lofar_bitset.h> #include <Common/lofar_list.h> #include <Common/LofarConstants.h> +#include <Common/LofarBitModeInfo.h> #include <APL/RSP_Protocol/RSP_Protocol.ph> #include <APL/RSP_Protocol/EPA_Protocol.ph> @@ -39,6 +40,7 @@ #include <complex> #include <blitz/array.h> +#include <boost/dynamic_bitset.hpp> namespace LOFAR { using GCF::TM::GCFTask; @@ -106,14 +108,15 @@ public: } // Get the mask (N_BEAMLETS bits). - bitset<MAX_BEAMLETS> getBEAMLETSMask() const { - bitset<MAX_BEAMLETS> mask; - + boost::dynamic_bitset<> getBEAMLETSMask(int bitsPerSample) const { + int max_beamlets = maxBeamlets(bitsPerSample); + boost::dynamic_bitset<> mask(max_beamlets); mask.reset(); std::list<int>::const_iterator it; for (it = m_beamlets.begin(); it != m_beamlets.end(); ++it) { - if (*it < MAX_BEAMLETS) + if (*it < max_beamlets) { mask.set(*it); + } } return mask; } @@ -207,7 +210,7 @@ public: COMPLEX = 1, ANGLE, }; - WeightsCommand(GCFPortInterface& port); + WeightsCommand(GCFPortInterface& port, int bitsPerSample); virtual ~WeightsCommand() {} virtual void send(); virtual GCFEvent::TResult ack(GCFEvent& e); @@ -219,7 +222,8 @@ private: std::complex<double> m_value; int m_type; int itsStage; - blitz::Array<std::complex<int16>, 3> itsWeights; + blitz::Array<std::complex<int16>, 4> itsWeights; + int itsBitsPerSample; }; // @@ -228,7 +232,7 @@ private: class SubbandsCommand : public Command { public: - SubbandsCommand(GCFPortInterface& port); + SubbandsCommand(GCFPortInterface& port, int bitsPerSample); virtual ~SubbandsCommand() {} virtual void send(); virtual GCFEvent::TResult ack(GCFEvent& e); @@ -241,6 +245,7 @@ public: private: std::list<int> m_subbandlist; int m_type; + int itsBitsPerSample; }; // @@ -305,8 +310,6 @@ private: }; - - // // class RSUCommand // @@ -441,7 +444,7 @@ protected: class StatisticsCommand : public StatisticsBaseCommand { public: - StatisticsCommand(GCFPortInterface& port); + StatisticsCommand(GCFPortInterface& port, const int bitsPerSample); virtual ~StatisticsCommand() {} virtual void send(); virtual void stop(); @@ -456,6 +459,7 @@ public: private: uint8 m_type; blitz::Array<double, 2> m_stats; + int itsBitsPerSample; }; // @@ -611,6 +615,27 @@ private: bool itsStream1On; }; +// +// class BitmodeCommand +// +class BitmodeCommand : public Command +{ +public: + BitmodeCommand(GCFPortInterface& port); + virtual ~BitmodeCommand() {} + virtual void send(); + virtual GCFEvent::TResult ack(GCFEvent& e); + void bitmode(const int bitmode) { itsBitmode = bitmode; } + uint bitmode() const { return itsBitmode; } + vector<uint> getBitmode() const { return(itsBitmodeArray); } + vector<uint> getBitVersion() const { return(itsBitVersionArray); } +private: + uint itsBitmode; + vector<uint> itsBitmodeArray; + vector<uint> itsBitVersionArray; +}; + + // // class RegisterStateCommand // @@ -734,6 +759,9 @@ public: // Get a subscription on the splitter state. GCFEvent::TResult sub2Splitter(GCFEvent& e, GCFPortInterface &p); + // Get a subscription on the bitmode state. + GCFEvent::TResult sub2Bitmode(GCFEvent& e, GCFPortInterface &p); + // In this state the command is sent and the acknowledge handled. Any relevant output is printed. GCFEvent::TResult doCommand(GCFEvent& e, GCFPortInterface &p); @@ -757,6 +785,7 @@ private: int m_nrspboards; int m_maxrspboards; int itsNantennas; + int itsNbitsPerSample; // commandline parameters int m_argc; @@ -768,6 +797,7 @@ private: bool itsNeedClockOnce; // getClock bool itsNeedClock; // subClock bool itsNeedSplitter; // subSplitter + bool itsNeedBitmode; // subBitmode SubClockCommand m_subclock; // always subscribe to clock updates }; diff --git a/MAC/APL/PIC/RSP_Driver/test/RSPTest.cc b/MAC/APL/PIC/RSP_Driver/test/RSPTest.cc index 9c9326e1448..4cadff8edd9 100644 --- a/MAC/APL/PIC/RSP_Driver/test/RSPTest.cc +++ b/MAC/APL/PIC/RSP_Driver/test/RSPTest.cc @@ -365,12 +365,12 @@ GCFEvent::TResult RSPTest::test005(GCFEvent& e, GCFPortInterface& port) ss.subbands.setType(SubbandSelection::BEAMLET); - ss.subbands().resize(1, 10); // 10 subbands selected + ss.subbands.beamlets().resize(1, 10); // 10 subbands selected - LOG_INFO_STR("dim subbands=" << ss.subbands().dimensions()); + LOG_INFO_STR("dim subbands=" << ss.subbands.beamlets().dimensions()); // set all values to 0x77 - ss.subbands() = 0x77; + ss.subbands.beamlets() = 0x77; TESTC_ABORT(m_server.send(ss), RSPTest::final); } @@ -495,7 +495,8 @@ GCFEvent::TResult RSPTest::test007(GCFEvent& e, GCFPortInterface& port) TESTC_ABORT(ack.status == RSP_SUCCESS, RSPTest::final); LOG_INFO_STR("ack.time=" << ack.timestamp); - LOG_INFO_STR("subbands=" << ack.subbands()); + LOG_INFO_STR("subbands.crosslets=" << ack.subbands.crosslets()); + LOG_INFO_STR("subbands.beamlets =" << ack.subbands.beamlets()); TRAN(RSPTest::test008); } @@ -1031,7 +1032,8 @@ GCFEvent::TResult RSPTest::test013(GCFEvent& e, GCFPortInterface& port) TESTC_ABORT(upd.status == RSP_SUCCESS, RSPTest::final); LOG_INFO_STR("upd.time=" << upd.timestamp); LOG_INFO_STR("upd.handle=" << upd.handle); - LOG_INFO_STR("upd.subbands=" << upd.subbands()); + LOG_INFO_STR("upd.subbands.crosslets=" << upd.subbands.crosslets()); + LOG_INFO_STR("upd.subbands.beamlets =" << upd.subbands.beamlets()); if (updcount++ > 2) // two seconds { diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/AllRegisterState.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/AllRegisterState.h index e8a5e94e32b..a3334af0aff 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/AllRegisterState.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/AllRegisterState.h @@ -67,7 +67,7 @@ public: rsuclear_state.resize(nrRspBoards); diagwgsettings_state.resize(nrRcus * EPA_Protocol::MEPHeader::N_DIAG_WG_REGISTERS); sst_state.resize(nrBlps * EPA_Protocol::MEPHeader::SST_N_FRAGMENTS); - bst_state.resize(nrRspBoards); + bst_state.resize(EPA_Protocol::MEPHeader::N_SERDES_LANES); xst_state.resize(nrRspBoards * EPA_Protocol::MEPHeader::XST_NR_STATS); cdo_state.resize(nrRspBoards * EPA_Protocol::MEPHeader::N_CDO_REGISTERS); bs_state.resize(nrBlps); @@ -85,6 +85,7 @@ public: rawdataread_state.resize(nrRspBoards); itsSerdesWriteState.resize(nrRspBoards); itsSerdesReadState.resize(nrRspBoards); + itsBitModeWriteState.resize(nrRspBoards); ts_state.resize(nrRspBoards); } @@ -123,8 +124,9 @@ public: rawdataread_state.reset(); itsSerdesWriteState.reset(); itsSerdesReadState.reset(); - ts_state.reset(); - + itsBitModeWriteState.reset(); + ts_state.reset(); + sys_state.read(); bf_state.write(); ss_state.write(); @@ -153,6 +155,7 @@ public: rawdataread_state.check(); itsSerdesWriteState.check(); itsSerdesReadState.check(); + itsBitModeWriteState.check(); ts_state.write(); } @@ -188,6 +191,7 @@ public: rawdataread_state.check(); itsSerdesWriteState.check(); itsSerdesReadState.check(); + itsBitModeWriteState.check(); ts_state.write(); // always write timestamp } @@ -223,7 +227,9 @@ public: rawdataread_state.clear(); itsSerdesWriteState.clear(); itsSerdesReadState.clear(); + itsBitModeWriteState.clear(); ts_state.clear(); + } // @@ -263,15 +269,16 @@ public: out << "SerdesRead "; itsSerdesReadState.print(out); out << "RawDataBlock(write) "; rawdatawrite_state.print(out); out << "RawDataBlock(read) "; rawdataread_state.print(out); + out << "Bitmode Status (w) "; itsBitModeWriteState.print(out); out << "Timestamp "; ts_state.print(out); out << endl; } /*@{*/ // marshalling methods - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ public: @@ -306,6 +313,8 @@ public: RTC::RegisterState& rawdataread() { return rawdataread_state; } RTC::RegisterState& sbwState() { return itsSerdesWriteState; } RTC::RegisterState& sbrState() { return itsSerdesReadState; } + RTC::RegisterState& bmState() { return itsBitModeWriteState; } + /*@}*/ @@ -339,6 +348,7 @@ private: RTC::RegisterState rawdataread_state; // Read userdefined datablock RTC::RegisterState itsSerdesWriteState; // Writing Serdes registers RTC::RegisterState itsSerdesReadState; // Reading Serdes registers + RTC::RegisterState itsBitModeWriteState; // RSR Bitmode register state RTC::RegisterState ts_state; // RSR Timestamp register state int m_nrcus; diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/BeamletWeights.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/BeamletWeights.h index 667572c5acb..ead025fed00 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/BeamletWeights.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/BeamletWeights.h @@ -49,7 +49,7 @@ namespace LOFAR { /* Destructor for BeamletWeights. */ virtual ~BeamletWeights() {} - static const int NDIM = 3; // dimension (N_POL) REMOVED, now using rcumask + static const int NDIM = 4; // dimension (N_POL) REMOVED, now using rcumask /* get reference to the weights array */ blitz::Array<std::complex<int16>, NDIM>& operator()(); @@ -59,9 +59,9 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: @@ -69,8 +69,8 @@ namespace LOFAR { * The beamlet weights. * Dimension 1: nr_timesteps (>1) * Dimension 2: count(rcumask) - * Dimension 3: N_BEAMLETS - * REMOVED Dimension 4, now using rcumask... + * Dimension 3: number of banks + * Dimension 4: N_BEAMLETS */ blitz::Array<std::complex<int16>, NDIM> m_weights; }; diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Bitmode.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Bitmode.h new file mode 100644 index 00000000000..3540baf31be --- /dev/null +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Bitmode.h @@ -0,0 +1,83 @@ +//# -*- mode: c++ -*- +//# +//# Bitmode.h: FPGA firmware version information from the RSP board. +//# +//# Copyright (C) 2002-2004 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: Bitmode.h 21314 2012-06-26 14:01:44Z overeem $ + +#ifndef BITMODE_H_ +#define BITMODE_H_ + +#include <APL/RTCCommon/MarshallBlitz.h> +#include <APL/RSP_Protocol/EPA_Protocol.ph> + +#include <complex> +#include <string> +#include <blitz/array.h> +#include <Common/LofarTypes.h> + +namespace LOFAR { + namespace RSP_Protocol { + + class BitmodeInfo + { + public: + /** + * Constructors for a Bitmode object. + */ + BitmodeInfo() { } + + /* Destructor for Bitmode. */ + virtual ~BitmodeInfo() {} + + /*@{*/ + /** + * Member accessor functions. + */ + blitz::Array<EPA_Protocol::RSRBeamMode, 1>& operator()(); + /*@}*/ + + public: + /*@{*/ + /** + * marshalling methods + */ + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); + /*@}*/ + + private: + /** + * Bitmode + * + * Dimensions of the arrays are: + * - itsBitmodeInfo [N_RSPBOARDS] + */ + blitz::Array<EPA_Protocol::RSRBeamMode, 1> itsBitmodeInfo; + }; + + inline blitz::Array<EPA_Protocol::RSRBeamMode, 1>& BitmodeInfo::operator()() { + return (itsBitmodeInfo); + } + }; +}; // namespace LOFAR + +#endif /* BITMODE_H_ */ diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/BypassSettings.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/BypassSettings.h index 4de4e92aac5..c8811409b9b 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/BypassSettings.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/BypassSettings.h @@ -70,9 +70,9 @@ public: // // marshalling methods // - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); //@} private: diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/CMakeLists.txt b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/CMakeLists.txt index 5bed0c46996..7234b233123 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/CMakeLists.txt +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/CMakeLists.txt @@ -19,7 +19,8 @@ set(inst_HEADERS Versions.h WGSettings.h XCStatistics.h - Latency.h) + Latency.h + Bitmode.h) # Add definition of include path suffix definition, because the header files # reside in a non-standard location. diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/EPADefinitions.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/EPADefinitions.h index 8b80d72ebd0..76339fff778 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/EPADefinitions.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/EPADefinitions.h @@ -157,6 +157,16 @@ typedef struct RSRVersion // total size 2 bytes uint8 fpga_maj :4; // FPGA firmware version (major) }; +// +// RSR(0x01) 0x03: get nofbeam +// +typedef struct RSRNofbeam // total size 1 byte +{ + uint8 select :4; // select mode, 0=16bit 1=8bit 2=4bit + uint8 bitmode :3; // firmware version, 1=16bit 2=16/8bit 4=16/8/4bit + uint8 rounding :1; // rounding(not used yet) +}; + // // RSU(0x02) 0x01: read/write flash // @@ -260,7 +270,7 @@ typedef struct DIAGSelftest // total size 1 byte }; // -// SS(0x04) 0x00: Subband selection +// SS(0x04) 0x00(0x01-0x03): Subband selection // typedef struct SubbandSelect // total size (4+54) * 4 for FTS2 test (232) // total size (4+210) * 4 final (856) @@ -274,7 +284,7 @@ typedef struct SubbandSelect // total size (4+54) * 4 for FTS2 test (232) }; // -// BF(0x05) 0x00-0x03: Coefficients for XR,XI,YR,YI output +// BF(0x05) 0x00-0x03(0x04-0x0f): Coefficients for XR,XI,YR,YI output // typedef struct BeamletWeights // total size 8 x 128 - 1024 { diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/HBASettings.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/HBASettings.h index 0de7b401ac9..df19c5d1bde 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/HBASettings.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/HBASettings.h @@ -51,9 +51,9 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Latency.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Latency.h index 9b867dbcf92..3016483f69f 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Latency.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Latency.h @@ -58,9 +58,9 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/MEPData.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/MEPData.h index 04201c6fb1d..1eb9afe7d33 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/MEPData.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/MEPData.h @@ -44,9 +44,9 @@ public: /*@{*/ // marshalling methods - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/MEPHeader.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/MEPHeader.h index f11db5c0e43..7f361bdcc79 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/MEPHeader.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/MEPHeader.h @@ -124,6 +124,7 @@ public: static const uint8 RSR_STATUS = 0x00; static const uint8 RSR_VERSION = 0x01; static const uint8 RSR_TIMESTAMP = 0x02; + static const uint8 RSR_BEAMMODE = 0x03; static const uint8 RSU_FLASHRW = 0x01; static const uint8 RSU_FLASHERASE = 0x02; @@ -139,11 +140,31 @@ public: static const uint8 DIAG_SELFTEST = 0x06; static const uint8 SS_SELECT = 0x00; + //static const uint8 SS_SELECT_0 = 0x00; + //static const uint8 SS_SELECT_1 = 0x01; + //static const uint8 SS_SELECT_2 = 0x02; + //static const uint8 SS_SELECT_3 = 0x03; static const uint8 BF_XROUT = 0x00; static const uint8 BF_XIOUT = 0x01; static const uint8 BF_YROUT = 0x02; static const uint8 BF_YIOUT = 0x03; + //static const uint8 BF_XROUT_0 = 0x00; + //static const uint8 BF_XIOUT_0 = 0x01; + //static const uint8 BF_YROUT_0 = 0x02; + //static const uint8 BF_YIOUT_0 = 0x03; + //static const uint8 BF_XROUT_1 = 0x04; + //static const uint8 BF_XIOUT_1 = 0x05; + //static const uint8 BF_YROUT_1 = 0x06; + //static const uint8 BF_YIOUT_1 = 0x07; + //static const uint8 BF_XROUT_2 = 0x08; + //static const uint8 BF_XIOUT_2 = 0x09; + //static const uint8 BF_YROUT_2 = 0x0a; + //static const uint8 BF_YIOUT_2 = 0x0b; + //static const uint8 BF_XROUT_3 = 0x0c; + //static const uint8 BF_XIOUT_3 = 0x0d; + //static const uint8 BF_YROUT_3 = 0x0e; + //static const uint8 BF_YIOUT_3 = 0x0f; static const uint8 BST_POWER_LANE_0 = 0x00; static const uint8 BST_POWER_LANE_1 = 0x01; @@ -226,6 +247,7 @@ public: static const uint16 N_BEAMLETS = N_SERDES_LANES * N_DATA_SLOTS; static const uint16 XLET_SIZE = N_POL * sizeof(std::complex<uint32>); static const uint16 WEIGHT_SIZE = N_POL * sizeof(std::complex<uint16>); + static const uint16 MAX_N_BANKS = 4; // TBB related constants static const uint16 TBB_MAXPAYLOADSIZE = 1948; // available TBB payload bytes @@ -239,6 +261,7 @@ public: static const uint16 RSR_STATUS_SIZE = 252; static const uint16 RSR_VERSION_SIZE = 2; static const uint16 RSR_TIMESTAMP_SIZE = 4; + static const uint16 RSR_BEAMMODE_SIZE = 2; static const uint16 RSU_FLASHRW_SIZE = 1024; static const uint16 RSU_FLASHERASE_SIZE = 1; @@ -253,7 +276,7 @@ public: static const uint16 DIAG_RESULTS_SIZE = 4096; // also 8192 ? static const uint16 DIAG_SELFTEST_SIZE = 4; - static const uint16 SS_SELECT_SIZE = (N_LOCAL_XLETS + N_BEAMLETS) * N_POL * sizeof(uint16); // = 960? + static const uint16 SS_SELECT_SIZE = (N_LOCAL_XLETS + N_BEAMLETS) * N_POL * sizeof(uint16); // = 1008 static const uint16 BF_XROUT_SIZE = (N_LOCAL_XLETS + N_BEAMLETS) * WEIGHT_SIZE; static const uint16 BF_XIOUT_SIZE = (N_LOCAL_XLETS + N_BEAMLETS) * WEIGHT_SIZE; @@ -311,9 +334,9 @@ public: /*@{*/ // marshalling methods - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ // MEP 4.x header fields @@ -363,6 +386,7 @@ public: static const FieldsType RSR_STATUS_HDR; static const FieldsType RSR_VERSION_HDR; static const FieldsType RSR_TIMESTAMP_HDR; + static const FieldsType RSR_BEAMMODE_HDR; static const FieldsType RSU_FLASHRW_HDR; static const FieldsType RSU_FLASHERASE_HDR; @@ -378,12 +402,32 @@ public: static const FieldsType DIAG_SELFTEST_HDR; static const FieldsType SS_SELECT_HDR; + //static const FieldsType SS_SELECT_HDR_0; + //static const FieldsType SS_SELECT_HDR_1; + //static const FieldsType SS_SELECT_HDR_2; + //static const FieldsType SS_SELECT_HDR_3; static const FieldsType BF_XROUT_HDR; static const FieldsType BF_XIOUT_HDR; static const FieldsType BF_YROUT_HDR; static const FieldsType BF_YIOUT_HDR; - + //static const FieldsType BF_XROUT_HDR_0; + //static const FieldsType BF_XIOUT_HDR_0; + //static const FieldsType BF_YROUT_HDR_0; + //static const FieldsType BF_YIOUT_HDR_0; + //static const FieldsType BF_XROUT_HDR_1; + //static const FieldsType BF_XIOUT_HDR_1; + //static const FieldsType BF_YROUT_HDR_1; + //static const FieldsType BF_YIOUT_HDR_1; + //static const FieldsType BF_XROUT_HDR_2; + //static const FieldsType BF_XIOUT_HDR_2; + //static const FieldsType BF_YROUT_HDR_2; + //static const FieldsType BF_YIOUT_HDR_2; + //static const FieldsType BF_XROUT_HDR_3; + //static const FieldsType BF_XIOUT_HDR_3; + //static const FieldsType BF_YROUT_HDR_3; + //static const FieldsType BF_YIOUT_HDR_3; + static const FieldsType BST_POWER_HDR; static const FieldsType SST_POWER_HDR; @@ -424,8 +468,19 @@ public: static const FieldsType RSP_RAWDATA_READ; /*@}*/ + // Output function for operator << + ostream& print (ostream& os) const; + }; +// +// operator << +// +inline ostream& operator<< (ostream& os, const MEPHeader& hdr) +{ + return (hdr.print(os)); +} + }; // namespace EPA_PROTOCOL }; // namespace LOFAR diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RCUSettings.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RCUSettings.h index 67886f22ea8..5c882fddec7 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RCUSettings.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RCUSettings.h @@ -282,9 +282,9 @@ public: public: /*@{*/ // marshalling methods - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RSUSettings.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RSUSettings.h index ef158b9c613..e2c9905fd70 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RSUSettings.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/RSUSettings.h @@ -99,9 +99,9 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SPUStatus.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SPUStatus.h index 226ffd93de1..172762c4df3 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SPUStatus.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SPUStatus.h @@ -46,9 +46,9 @@ public: blitz::Array<EPA_Protocol::SPUBoardStatus, 1>& subrack(); // marshalling methods - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); private: // SPU status fields. (note there is only 1 SPU per subrack) diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Statistics.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Statistics.h index a37223cb95d..f4769f42bee 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Statistics.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Statistics.h @@ -72,9 +72,9 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: @@ -82,7 +82,7 @@ namespace LOFAR { * Statistics * Dimensions are: (N_DEVICES, N_SUBBANDS); * - * N_DEVICES == N_RSPBOARDS * N_POL for beamlet statistics + * N_DEVICES == 2 * N_POL for beamlet statistics (2 *) for splitter * N_DEVICES == N_RSPBOARDS * N_BLPS * N_POL for subband statistics * */ diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SubbandSelection.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SubbandSelection.h index 7a2c0039728..d06d32fddbe 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SubbandSelection.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SubbandSelection.h @@ -66,9 +66,11 @@ namespace LOFAR { virtual ~SubbandSelection() {} /** - * Return the subbands array. + * Return the crosslet or beamlet array. */ - blitz::Array<uint16, 2>& operator()(); + blitz::Array<uint16, 3>& crosslets(); + blitz::Array<uint16, 3>& beamlets(); + /** * Return type of selection. @@ -87,22 +89,27 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: /** * Subband selection array. * dim 1 = n_rcus (== 1 on SETSUBBANDS, == count(rcumask) on GETSUBBANDS_ACK) - * dim 2 = n_beamlets (if type == BEAMLET) - * dim 2 = 1 (if type == XLET) + * dim 2 = number of planes (16bit = 1plane, 8bit=2planes, 4bit=4planes) + * dim 3 = n_beamlets (if type == BEAMLET) + * dim 3 = 1 (if type == XLET) */ - blitz::Array<uint16, 2> m_subbands; + blitz::Array<uint16, 3> itsCrosslets; + blitz::Array<uint16, 3> itsBeamlets; uint16 m_type; // type of subband selection (BEAMLET or XLET) }; + + inline blitz::Array<uint16, 3>& SubbandSelection::crosslets() { return itsCrosslets; } + inline blitz::Array<uint16, 3>& SubbandSelection::beamlets() { return itsBeamlets; } }; }; // namespace LOFAR diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SystemStatus.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SystemStatus.h index f447cce637f..33881a17897 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SystemStatus.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/SystemStatus.h @@ -58,9 +58,9 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TBBSettings.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TBBSettings.h index 0d28e4280ab..26f64ec8f72 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TBBSettings.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TBBSettings.h @@ -50,9 +50,9 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TDStatus.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TDStatus.h index 5cd703b275a..2b8c60504a5 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TDStatus.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/TDStatus.h @@ -58,9 +58,9 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Versions.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Versions.h index fbcfc7092c6..63c1210ba1c 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Versions.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/Versions.h @@ -58,9 +58,9 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/WGSettings.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/WGSettings.h index e00593210c1..06fbc6f7611 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/WGSettings.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/WGSettings.h @@ -89,9 +89,9 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/XCStatistics.h b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/XCStatistics.h index 25020cadc69..dfc99064882 100644 --- a/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/XCStatistics.h +++ b/MAC/APL/PIC/RSP_Protocol/include/APL/RSP_Protocol/XCStatistics.h @@ -54,9 +54,9 @@ namespace LOFAR { /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: diff --git a/MAC/APL/PIC/RSP_Protocol/src/AllRegisterState.cc b/MAC/APL/PIC/RSP_Protocol/src/AllRegisterState.cc index ad3a1959a3a..ca8af3e4356 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/AllRegisterState.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/AllRegisterState.cc @@ -31,7 +31,7 @@ using namespace blitz; using namespace LOFAR; using namespace RSP_Protocol; -unsigned int AllRegisterState::getSize() +size_t AllRegisterState::getSize() const { return sys_state.getSize() @@ -62,79 +62,82 @@ unsigned int AllRegisterState::getSize() + rawdatawrite_state.getSize() + rawdataread_state.getSize() + itsSerdesWriteState.getSize() - + itsSerdesReadState.getSize(); + + itsSerdesReadState.getSize() + + itsBitModeWriteState.getSize(); } -unsigned int AllRegisterState::pack (void* buffer) +size_t AllRegisterState::pack (char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - offset += sys_state.pack((char*)buffer + offset); - offset += bf_state.pack((char*)buffer + offset); - offset += ss_state.pack((char*)buffer + offset); - offset += rcusettings_state.pack((char*)buffer + offset); - offset += rcuprotocol_state.pack((char*)buffer + offset); - offset += itsRcuReadState.pack((char*)buffer + offset); - offset += hbaprotocol_state.pack((char*)buffer + offset); - offset += rsuclear_state.pack((char*)buffer + offset); - offset += diagwgsettings_state.pack((char*)buffer + offset); - offset += sst_state.pack((char*)buffer + offset); - offset += bst_state.pack((char*)buffer + offset); - offset += xst_state.pack((char*)buffer + offset); - offset += cdo_state.pack((char*)buffer + offset); - offset += bs_state.pack((char*)buffer + offset); - offset += tdclear_state.pack((char*)buffer + offset); - offset += tdwrite_state.pack((char*)buffer + offset); - offset += tdread_state.pack((char*)buffer + offset); - offset += rad_state.pack((char*)buffer + offset); - offset += itsCRstate.pack((char*)buffer + offset); - offset += ts_state.pack((char*)buffer + offset); - offset += tdstatuswrite_state.pack((char*)buffer + offset); - offset += tdstatusread_state.pack((char*)buffer + offset); - offset += tbbsettings_state.pack((char*)buffer + offset); - offset += tbbbandsel_state.pack((char*)buffer + offset); - offset += bypasssettings_state.pack((char*)buffer + offset); - offset += rawdatawrite_state.pack((char*)buffer + offset); - offset += rawdataread_state.pack((char*)buffer + offset); - offset += itsSerdesWriteState.pack((char*)buffer + offset); - offset += itsSerdesReadState.pack((char*)buffer + offset); + offset += sys_state.pack(buffer + offset); + offset += bf_state.pack(buffer + offset); + offset += ss_state.pack(buffer + offset); + offset += rcusettings_state.pack(buffer + offset); + offset += rcuprotocol_state.pack(buffer + offset); + offset += itsRcuReadState.pack(buffer + offset); + offset += hbaprotocol_state.pack(buffer + offset); + offset += rsuclear_state.pack(buffer + offset); + offset += diagwgsettings_state.pack(buffer + offset); + offset += sst_state.pack(buffer + offset); + offset += bst_state.pack(buffer + offset); + offset += xst_state.pack(buffer + offset); + offset += cdo_state.pack(buffer + offset); + offset += bs_state.pack(buffer + offset); + offset += tdclear_state.pack(buffer + offset); + offset += tdwrite_state.pack(buffer + offset); + offset += tdread_state.pack(buffer + offset); + offset += rad_state.pack(buffer + offset); + offset += itsCRstate.pack(buffer + offset); + offset += ts_state.pack(buffer + offset); + offset += tdstatuswrite_state.pack(buffer + offset); + offset += tdstatusread_state.pack(buffer + offset); + offset += tbbsettings_state.pack(buffer + offset); + offset += tbbbandsel_state.pack(buffer + offset); + offset += bypasssettings_state.pack(buffer + offset); + offset += rawdatawrite_state.pack(buffer + offset); + offset += rawdataread_state.pack(buffer + offset); + offset += itsSerdesWriteState.pack(buffer + offset); + offset += itsSerdesReadState.pack(buffer + offset); + offset += itsBitModeWriteState.pack(buffer + offset); return (offset); } -unsigned int AllRegisterState::unpack(void *buffer) +size_t AllRegisterState::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - offset += sys_state.unpack((char*)buffer + offset); - offset += bf_state.unpack((char*)buffer + offset); - offset += ss_state.unpack((char*)buffer + offset); - offset += rcusettings_state.unpack((char*)buffer + offset); - offset += rcuprotocol_state.unpack((char*)buffer + offset); - offset += itsRcuReadState.unpack((char*)buffer + offset); - offset += hbaprotocol_state.unpack((char*)buffer + offset); - offset += rsuclear_state.unpack((char*)buffer + offset); - offset += diagwgsettings_state.unpack((char*)buffer + offset); - offset += sst_state.unpack((char*)buffer + offset); - offset += bst_state.unpack((char*)buffer + offset); - offset += xst_state.unpack((char*)buffer + offset); - offset += cdo_state.unpack((char*)buffer + offset); - offset += bs_state.unpack((char*)buffer + offset); - offset += tdclear_state.unpack((char*)buffer + offset); - offset += tdwrite_state.unpack((char*)buffer + offset); - offset += tdread_state.unpack((char*)buffer + offset); - offset += rad_state.unpack((char*)buffer + offset); - offset += itsCRstate.unpack((char*)buffer + offset); - offset += ts_state.unpack((char*)buffer + offset); - offset += tdstatuswrite_state.unpack((char*)buffer + offset); - offset += tdstatusread_state.unpack((char*)buffer + offset); - offset += tbbsettings_state.unpack((char*)buffer + offset); - offset += tbbbandsel_state.unpack((char*)buffer + offset); - offset += bypasssettings_state.unpack((char*)buffer + offset); - offset += rawdatawrite_state.unpack((char*)buffer + offset); - offset += rawdataread_state.unpack((char*)buffer + offset); - offset += itsSerdesWriteState.unpack((char*)buffer + offset); - offset += itsSerdesReadState.unpack((char*)buffer + offset); + offset += sys_state.unpack(buffer + offset); + offset += bf_state.unpack(buffer + offset); + offset += ss_state.unpack(buffer + offset); + offset += rcusettings_state.unpack(buffer + offset); + offset += rcuprotocol_state.unpack(buffer + offset); + offset += itsRcuReadState.unpack(buffer + offset); + offset += hbaprotocol_state.unpack(buffer + offset); + offset += rsuclear_state.unpack(buffer + offset); + offset += diagwgsettings_state.unpack(buffer + offset); + offset += sst_state.unpack(buffer + offset); + offset += bst_state.unpack(buffer + offset); + offset += xst_state.unpack(buffer + offset); + offset += cdo_state.unpack(buffer + offset); + offset += bs_state.unpack(buffer + offset); + offset += tdclear_state.unpack(buffer + offset); + offset += tdwrite_state.unpack(buffer + offset); + offset += tdread_state.unpack(buffer + offset); + offset += rad_state.unpack(buffer + offset); + offset += itsCRstate.unpack(buffer + offset); + offset += ts_state.unpack(buffer + offset); + offset += tdstatuswrite_state.unpack(buffer + offset); + offset += tdstatusread_state.unpack(buffer + offset); + offset += tbbsettings_state.unpack(buffer + offset); + offset += tbbbandsel_state.unpack(buffer + offset); + offset += bypasssettings_state.unpack(buffer + offset); + offset += rawdatawrite_state.unpack(buffer + offset); + offset += rawdataread_state.unpack(buffer + offset); + offset += itsSerdesWriteState.unpack(buffer + offset); + offset += itsSerdesReadState.unpack(buffer + offset); + offset += itsBitModeWriteState.unpack(buffer + offset); return (offset); } diff --git a/MAC/APL/PIC/RSP_Protocol/src/BeamletWeights.cc b/MAC/APL/PIC/RSP_Protocol/src/BeamletWeights.cc index 3dc8eff081d..6353876de2f 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/BeamletWeights.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/BeamletWeights.cc @@ -31,25 +31,21 @@ using namespace blitz; using namespace LOFAR; using namespace RSP_Protocol; -unsigned int BeamletWeights::getSize() +size_t BeamletWeights::getSize() const { - return MSH_ARRAY_SIZE(m_weights, complex<int16>); + return MSH_size(m_weights); } -unsigned int BeamletWeights::pack (void* buffer) +size_t BeamletWeights::pack (char* buffer) const { - unsigned int offset = 0; - - MSH_PACK_ARRAY(buffer, offset, m_weights, complex<int16>); - + size_t offset = 0; + MSH_pack(buffer, offset, m_weights); return offset; } -unsigned int BeamletWeights::unpack(void *buffer) +size_t BeamletWeights::unpack(const char *buffer) { - unsigned int offset = 0; - - MSH_UNPACK_ARRAY(buffer, offset, m_weights, complex<int16>, NDIM); - + size_t offset = 0; + MSH_unpack(buffer, offset, m_weights); return offset; } diff --git a/JAVA/CEP/jParmFacade/include/jParmFacade/nl_astron_lofar_java_cep_jparmfacade_jCommon.h b/MAC/APL/PIC/RSP_Protocol/src/Bitmode.cc similarity index 54% rename from JAVA/CEP/jParmFacade/include/jParmFacade/nl_astron_lofar_java_cep_jparmfacade_jCommon.h rename to MAC/APL/PIC/RSP_Protocol/src/Bitmode.cc index 06f4db63f23..df959cbbbc5 100644 --- a/JAVA/CEP/jParmFacade/include/jParmFacade/nl_astron_lofar_java_cep_jparmfacade_jCommon.h +++ b/MAC/APL/PIC/RSP_Protocol/src/Bitmode.cc @@ -1,7 +1,6 @@ -//# jCommon.h: Holds common objects, methods that aren't auto -//# generated by javah +//# Bitmode.h: implementation of the Bitmode class //# -//# Copyright (C) 2002-2005 +//# Copyright (C) 2002-2004 //# ASTRON (Netherlands Foundation for Research in Astronomy) //# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl //# @@ -19,16 +18,38 @@ //# along with this program; if not, write to the Free Software //# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //# +//# $Id: Bitmode.cc 21314 2012-06-26 14:01:44Z overeem $ -#ifndef LOFAR_JPARMFACADE_COMMON_H -#define LOFAR_JPARMFACADE_COMMON_H +#include <lofar_config.h> +#include <Common/LofarLogger.h> -// \file -// Holds common objects, methods that aren't autogenerated by javah -// -//# Never #include <config.h> or #include <lofar_config.h> in a header file! -//# Includes -#include <jni.h> -void setParmDBConnection(JNIEnv *env, jobject callerObject); +#include <APL/RSP_Protocol/Bitmode.h> +#include <APL/RTCCommon/MarshallBlitz.h> -#endif +using namespace std; +using namespace blitz; +using namespace LOFAR; +using namespace RSP_Protocol; + +size_t BitmodeInfo::getSize() const +{ + return MSH_size(itsBitmodeInfo); +} + +size_t BitmodeInfo::pack (char* buffer) const +{ + size_t offset = 0; + + MSH_pack(buffer, offset, itsBitmodeInfo); + + return offset; +} + +size_t BitmodeInfo::unpack(const char *buffer) +{ + size_t offset = 0; + + MSH_unpack(buffer, offset, itsBitmodeInfo); + + return offset; +} diff --git a/MAC/APL/PIC/RSP_Protocol/src/BypassSettings.cc b/MAC/APL/PIC/RSP_Protocol/src/BypassSettings.cc index 6d2422a964e..c541468c006 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/BypassSettings.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/BypassSettings.cc @@ -32,26 +32,22 @@ namespace LOFAR { namespace RSP_Protocol { -unsigned int BypassSettings::getSize() +size_t BypassSettings::getSize() const { - return MSH_ARRAY_SIZE(m_registers, BypassSettings::Control); + return MSH_size(m_registers); } -unsigned int BypassSettings::pack (void* buffer) +size_t BypassSettings::pack (char* buffer) const { - unsigned int offset = 0; - - MSH_PACK_ARRAY(buffer, offset, m_registers, BypassSettings::Control); - + size_t offset = 0; + MSH_pack(buffer, offset, m_registers); return offset; } -unsigned int BypassSettings::unpack(void *buffer) +size_t BypassSettings::unpack(const char *buffer) { - unsigned int offset = 0; - - MSH_UNPACK_ARRAY(buffer, offset, m_registers, BypassSettings::Control, 1); - + size_t offset = 0; + MSH_unpack(buffer, offset, m_registers); return offset; } diff --git a/MAC/APL/PIC/RSP_Protocol/src/CMakeLists.txt b/MAC/APL/PIC/RSP_Protocol/src/CMakeLists.txt index c86ea01c1cd..766054399d5 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/CMakeLists.txt +++ b/MAC/APL/PIC/RSP_Protocol/src/CMakeLists.txt @@ -31,7 +31,8 @@ lofar_add_library(rsp_protocol TDStatus.cc Versions.cc WGSettings.cc - XCStatistics.cc) + XCStatistics.cc + Bitmode.cc) add_dependencies(rsp_protocol RSP_Protocol-EPA_Protocol diff --git a/MAC/APL/PIC/RSP_Protocol/src/EPA_Protocol.prot b/MAC/APL/PIC/RSP_Protocol/src/EPA_Protocol.prot index ae04565179b..ba578862d12 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/EPA_Protocol.prot +++ b/MAC/APL/PIC/RSP_Protocol/src/EPA_Protocol.prot @@ -188,6 +188,12 @@ prelude = << PRELUDE_END uint8 fpga_maj :4; // FPGA firmware version (major) }; + struct RSRBeamMode + { + uint8 bm_max; // bitmode supported by hardware 0=16bit 1=8bit 2=4bit (read only!) + uint8 bm_select; // select bitmode, 0=16bit 1=8bit 2=4bit + }; + struct RSUReconfig { uint8 page :3; // page selection @@ -501,6 +507,22 @@ event = { }; }; +event = { + noheader; + signal = RSR_BEAMMODE; + dir = INOUT; // read-write register + param = { + name = "hdr"; + type = "MEPHeader"; + userdefined; + }; + param = { + name = "beammode"; + type = "struct RSRBeamMode"; + }; +}; + + event = { noheader; signal = RSU_FLASHRW; diff --git a/MAC/APL/PIC/RSP_Protocol/src/HBASettings.cc b/MAC/APL/PIC/RSP_Protocol/src/HBASettings.cc index aa191f78bb5..15711809913 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/HBASettings.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/HBASettings.cc @@ -31,25 +31,25 @@ using namespace blitz; using namespace LOFAR; using namespace RSP_Protocol; -unsigned int HBASettings::getSize() +size_t HBASettings::getSize() const { - return MSH_ARRAY_SIZE(m_delay, uint8); + return MSH_size(m_delay); } -unsigned int HBASettings::pack (void* buffer) +size_t HBASettings::pack (char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, m_delay, uint8); + MSH_pack(buffer, offset, m_delay); return offset; } -unsigned int HBASettings::unpack(void *buffer) +size_t HBASettings::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, m_delay, uint8, 2); + MSH_unpack(buffer, offset, m_delay); return offset; } diff --git a/MAC/APL/PIC/RSP_Protocol/src/Latency.cc b/MAC/APL/PIC/RSP_Protocol/src/Latency.cc index a8c39ac1a27..ff17619d5c9 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/Latency.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/Latency.cc @@ -36,25 +36,25 @@ using namespace LOFAR; using namespace RSP_Protocol; using namespace EPA_Protocol; -unsigned int Latency::getSize() +size_t Latency::getSize() const { - return MSH_ARRAY_SIZE(itsLatency, EPA_Protocol::RADLatency); + return MSH_size(itsLatency); } -unsigned int Latency::pack (void* buffer) +size_t Latency::pack (char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, itsLatency, EPA_Protocol::RADLatency); + MSH_pack(buffer, offset, itsLatency); return offset; } -unsigned int Latency::unpack(void *buffer) +size_t Latency::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, itsLatency, EPA_Protocol::RADLatency, 1); + MSH_unpack(buffer, offset, itsLatency); return offset; } diff --git a/MAC/APL/PIC/RSP_Protocol/src/MEPData.cc b/MAC/APL/PIC/RSP_Protocol/src/MEPData.cc index 2bf7cb2bb17..d472a08c6f3 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/MEPData.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/MEPData.cc @@ -31,21 +31,20 @@ using namespace LOFAR; using namespace EPA_Protocol; using namespace std; -unsigned int MEPData::getSize() +size_t MEPData::getSize() const { return m_count; } -unsigned int MEPData::pack (void* buffer) +size_t MEPData::pack (char* buffer) const { memcpy(buffer, m_dataptr, m_count); return m_count; } -unsigned int MEPData::unpack(void* buffer) +size_t MEPData::unpack(const char* buffer) { - if (m_count && m_dataptr) - { + if (m_count && m_dataptr) { memcpy(m_dataptr, buffer, m_count); } return m_count; diff --git a/MAC/APL/PIC/RSP_Protocol/src/MEPHeader.cc b/MAC/APL/PIC/RSP_Protocol/src/MEPHeader.cc index a06058ec8a2..b4df565b198 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/MEPHeader.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/MEPHeader.cc @@ -37,6 +37,7 @@ using namespace std; const MEPHeader::FieldsType MEPHeader::RSR_STATUS_HDR = { READ, 0, 0, { DST_RSP, RSR, RSR_STATUS }, 0, RSR_STATUS_SIZE, 0, 0 }; const MEPHeader::FieldsType MEPHeader::RSR_VERSION_HDR = { READ, 0, 0, { DST_RSP, RSR, RSR_VERSION }, 0, RSR_VERSION_SIZE, 0, 0 }; const MEPHeader::FieldsType MEPHeader::RSR_TIMESTAMP_HDR = { WRITE, 0, 0, { DST_RSP, RSR, RSR_TIMESTAMP }, 0, RSR_TIMESTAMP_SIZE, 0, 0 }; +const MEPHeader::FieldsType MEPHeader::RSR_BEAMMODE_HDR = { WRITE, 0, 0, { DST_RSP, RSR, RSR_BEAMMODE }, 0, RSR_BEAMMODE_SIZE, 0, 0 }; const MEPHeader::FieldsType MEPHeader::RSU_FLASHRW_HDR = { WRITE, 0, 0, { DST_RSP, RSU, RSU_FLASHRW }, 0, RSU_FLASHRW_SIZE, 0, 0 }; const MEPHeader::FieldsType MEPHeader::RSU_FLASHERASE_HDR = { WRITE, 0, 0, { DST_RSP, RSU, RSU_FLASHERASE }, 0, RSU_FLASHERASE_SIZE, 0, 0 }; @@ -51,12 +52,32 @@ const MEPHeader::FieldsType MEPHeader::DIAG_BYPASS_HDR = { WRITE, 0, 0, { const MEPHeader::FieldsType MEPHeader::DIAG_RESULTS_HDR = { READ, 0, 0, { DST_BLP0, DIAG, DIAG_RESULTS }, 0, DIAG_RESULTS_SIZE, 0, 0 }; const MEPHeader::FieldsType MEPHeader::DIAG_SELFTEST_HDR = { WRITE, 0, 0, { DST_RSP , DIAG, DIAG_SELFTEST }, 0, DIAG_SELFTEST_SIZE, 0, 0 }; -const MEPHeader::FieldsType MEPHeader::SS_SELECT_HDR = { WRITE, 0, 0, { DST_BLP0, SS, SS_SELECT }, 0, SS_SELECT_SIZE, 0, 0 }; - -const MEPHeader::FieldsType MEPHeader::BF_XROUT_HDR = { WRITE, 0, 0, { DST_BLP0, BF, BF_XROUT }, 0, BF_XROUT_SIZE, 0, 0 }; -const MEPHeader::FieldsType MEPHeader::BF_XIOUT_HDR = { WRITE, 0, 0, { DST_BLP0, BF, BF_XIOUT }, 0, BF_XIOUT_SIZE, 0, 0 }; -const MEPHeader::FieldsType MEPHeader::BF_YROUT_HDR = { WRITE, 0, 0, { DST_BLP0, BF, BF_YROUT }, 0, BF_YROUT_SIZE, 0, 0 }; -const MEPHeader::FieldsType MEPHeader::BF_YIOUT_HDR = { WRITE, 0, 0, { DST_BLP0, BF, BF_YIOUT }, 0, BF_YIOUT_SIZE, 0, 0 }; +const MEPHeader::FieldsType MEPHeader::SS_SELECT_HDR = { WRITE, 0, 0, { DST_BLP0, SS, SS_SELECT } , 0, SS_SELECT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::SS_SELECT_HDR_0 = { WRITE, 0, 0, { DST_BLP0, SS, SS_SELECT_0 }, 0, SS_SELECT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::SS_SELECT_HDR_1 = { WRITE, 0, 0, { DST_BLP0, SS, SS_SELECT_1 }, 0, SS_SELECT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::SS_SELECT_HDR_2 = { WRITE, 0, 0, { DST_BLP0, SS, SS_SELECT_2 }, 0, SS_SELECT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::SS_SELECT_HDR_3 = { WRITE, 0, 0, { DST_BLP0, SS, SS_SELECT_3 }, 0, SS_SELECT_SIZE, 0, 0 }; + +const MEPHeader::FieldsType MEPHeader::BF_XROUT_HDR = { WRITE, 0, 0, { DST_BLP0, BF, BF_XROUT }, 0, BF_XROUT_SIZE, 0, 0 }; +const MEPHeader::FieldsType MEPHeader::BF_XIOUT_HDR = { WRITE, 0, 0, { DST_BLP0, BF, BF_XIOUT }, 0, BF_XIOUT_SIZE, 0, 0 }; +const MEPHeader::FieldsType MEPHeader::BF_YROUT_HDR = { WRITE, 0, 0, { DST_BLP0, BF, BF_YROUT }, 0, BF_YROUT_SIZE, 0, 0 }; +const MEPHeader::FieldsType MEPHeader::BF_YIOUT_HDR = { WRITE, 0, 0, { DST_BLP0, BF, BF_YIOUT }, 0, BF_YIOUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_XROUT_HDR_0 = { WRITE, 0, 0, { DST_BLP0, BF, BF_XROUT_0 }, 0, BF_XROUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_XIOUT_HDR_0 = { WRITE, 0, 0, { DST_BLP0, BF, BF_XIOUT_0 }, 0, BF_XIOUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_YROUT_HDR_0 = { WRITE, 0, 0, { DST_BLP0, BF, BF_YROUT_0 }, 0, BF_YROUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_YIOUT_HDR_0 = { WRITE, 0, 0, { DST_BLP0, BF, BF_YIOUT_0 }, 0, BF_YIOUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_XROUT_HDR_1 = { WRITE, 0, 0, { DST_BLP0, BF, BF_XROUT_1 }, 0, BF_XROUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_XIOUT_HDR_1 = { WRITE, 0, 0, { DST_BLP0, BF, BF_XIOUT_1 }, 0, BF_XIOUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_YROUT_HDR_1 = { WRITE, 0, 0, { DST_BLP0, BF, BF_YROUT_1 }, 0, BF_YROUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_YIOUT_HDR_1 = { WRITE, 0, 0, { DST_BLP0, BF, BF_YIOUT_1 }, 0, BF_YIOUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_XROUT_HDR_2 = { WRITE, 0, 0, { DST_BLP0, BF, BF_XROUT_2 }, 0, BF_XROUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_XIOUT_HDR_2 = { WRITE, 0, 0, { DST_BLP0, BF, BF_XIOUT_2 }, 0, BF_XIOUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_YROUT_HDR_2 = { WRITE, 0, 0, { DST_BLP0, BF, BF_YROUT_2 }, 0, BF_YROUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_YIOUT_HDR_2 = { WRITE, 0, 0, { DST_BLP0, BF, BF_YIOUT_2 }, 0, BF_YIOUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_XROUT_HDR_3 = { WRITE, 0, 0, { DST_BLP0, BF, BF_XROUT_3 }, 0, BF_XROUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_XIOUT_HDR_3 = { WRITE, 0, 0, { DST_BLP0, BF, BF_XIOUT_3 }, 0, BF_XIOUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_YROUT_HDR_3 = { WRITE, 0, 0, { DST_BLP0, BF, BF_YROUT_3 }, 0, BF_YROUT_SIZE, 0, 0 }; +//const MEPHeader::FieldsType MEPHeader::BF_YIOUT_HDR_3 = { WRITE, 0, 0, { DST_BLP0, BF, BF_YIOUT_3 }, 0, BF_YIOUT_SIZE, 0, 0 }; const MEPHeader::FieldsType MEPHeader::BST_POWER_HDR = { READ, 0, 0, { DST_RSP, BST, BST_POWER_LANE_0 }, 0, BST_POWER_SIZE, 0, 0 }; @@ -97,18 +118,18 @@ const MEPHeader::FieldsType MEPHeader::RAD_LATENCY_HDR = { READ , 0, 0, { const MEPHeader::FieldsType MEPHeader::RSP_RAWDATA_WRITE = { WRITE, 0, 0, { 0xABBA, 0xBB, 0xAA }, 0xEFFE, 0xEBBE, 0x3412, 0 }; const MEPHeader::FieldsType MEPHeader::RSP_RAWDATA_READ = { READ , 0, 0, { 0xABBA, 0xBB, 0xAA }, 0xEFFE, 0xEBBE, 0x3412, 0 }; -unsigned int MEPHeader::getSize() +size_t MEPHeader::getSize() const { return MEPHeader::SIZE; } -unsigned int MEPHeader::pack (void* buffer) +size_t MEPHeader::pack (char* buffer) const { memcpy(buffer, &(this->m_fields), MEPHeader::SIZE); return MEPHeader::SIZE; } -unsigned int MEPHeader::unpack(void *buffer) +size_t MEPHeader::unpack(const char *buffer) { memcpy(&(this->m_fields), buffer, MEPHeader::SIZE); return MEPHeader::SIZE; @@ -183,7 +204,7 @@ bool MEPHeader::isValidAck(const MEPHeader& reqhdr) * if it is a WRITEACK, or SIZE + payload_length if it is a * READACK. */ - return ( + if ( ( (READACK == this->m_fields.type && reqhdr.m_fields.type == READ) || (WRITEACK == this->m_fields.type && reqhdr.m_fields.type == WRITE) ) && (0 == this->m_fields.status) && @@ -195,6 +216,20 @@ bool MEPHeader::isValidAck(const MEPHeader& reqhdr) (this->m_fields.addr.regid == reqhdr.m_fields.addr.regid) && (this->m_fields.offset == reqhdr.m_fields.offset) && (this->m_fields.payload_length == reqhdr.m_fields.payload_length) - ); + ) { + return (true); + } + LOG_ERROR_STR("this:" << *this << "\nthat:" << reqhdr); + return (false); } +// +// print (os) +// +ostream& MEPHeader::print(ostream& os) const +{ + os << "hdr[type=" << (int)m_fields.type << ",status=" << (int)m_fields.status << ",framelen=" << m_fields.frame_length; + os << ",dstid=" << m_fields.addr.dstid << ",pid=" << (int)m_fields.addr.pid << ",regid=" << (int)m_fields.addr.regid; + os << ",offset=" << m_fields.offset << ",payloadlen=" << m_fields.payload_length << ",seqnr=" << m_fields.seqnr << "]"; + return (os); +} diff --git a/MAC/APL/PIC/RSP_Protocol/src/RCUSettings.cc b/MAC/APL/PIC/RSP_Protocol/src/RCUSettings.cc index 0f3fdd882cc..b3aa0a8eaba 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/RCUSettings.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/RCUSettings.cc @@ -75,25 +75,25 @@ int RCUSettings::Control::getNyquistZone() const return retval; } -unsigned int RCUSettings::getSize() +size_t RCUSettings::getSize() const { - return MSH_ARRAY_SIZE(m_registers, RCUSettings::Control); + return MSH_size(m_registers); } -unsigned int RCUSettings::pack (void* buffer) +size_t RCUSettings::pack (char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, m_registers, RCUSettings::Control); + MSH_pack(buffer, offset, m_registers); return offset; } -unsigned int RCUSettings::unpack(void *buffer) +size_t RCUSettings::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, m_registers, RCUSettings::Control, 1); + MSH_unpack(buffer, offset, m_registers); return offset; } diff --git a/MAC/APL/PIC/RSP_Protocol/src/RSP_Protocol.prot b/MAC/APL/PIC/RSP_Protocol/src/RSP_Protocol.prot index 61defafcaf5..75092c73c78 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/RSP_Protocol.prot +++ b/MAC/APL/PIC/RSP_Protocol/src/RSP_Protocol.prot @@ -33,6 +33,7 @@ include = '<APL/RSP_Protocol/Versions.h>'; include = '<APL/RSP_Protocol/WGSettings.h>'; include = '<APL/RSP_Protocol/XCStatistics.h>'; include = '<APL/RSP_Protocol/Latency.h>'; +include = '<APL/RSP_Protocol/Bitmode.h>'; prelude = << PRELUDE_END @@ -187,7 +188,17 @@ static const int RSP_RAW_BLOCK_SIZE = 1480; // GETDATASTREAM (timestamp, cache) // GETDATASTREAMACK (timestamp, status, switch_on) -// 120 commands +// SETBITMODE (timestamp, bitmode); +// SETBITMODEACK (timestamp, status); +// GETBITMODE (timestamp); +// GETBITMODEACK (timestamp, status, bitmode); +// SUBBITMODE (timestamp, period) +// SUBBITMODEACK (timestamp, status, handle) +// UPDBITMODE (timestamp, status, handle, bitmode) +// UNSUBBITMODE (handle) +// UNSUBBITMODEACK (timestamp, status, handle) + +// 129 commands PRELUDE_END; @@ -2089,7 +2100,7 @@ event = { }; }; -// GETSPLITTER(timestamp, rspmask, cache); +// GETSPLITTER(timestamp, cache); event = { signal = GETSPLITTER; dir = IN; @@ -2104,7 +2115,7 @@ event = { }; }; -// GETSPLITTERACK(timestamp, status, splitters) +// GETSPLITTERACK(timestamp, status, splitter) event = { signal = GETSPLITTERACK; dir = OUT; @@ -2311,3 +2322,171 @@ event = { }; }; + +// bitmode info +// 16 = 16bit +// 8 = 8bit +// 4 = 4bit +// SETBITMODE (timestamp, bits_per_sample); +event = { + signal = SETBITMODE; + dir = IN; + param = { + name = "timestamp"; + type = "RTC::Timestamp"; + userdefined; + }; + param = { + name = "rspmask"; + type = "bitset<MAX_N_RSPBOARDS>"; + }; + param = { + name = "bits_per_sample"; + type = "uint16"; + }; +}; + +// SETBITMODEACK(timestamp, status); +event = { + signal = SETBITMODEACK; + dir = OUT; + param = { + name = "timestamp"; + type = "RTC::Timestamp"; + userdefined; + }; + param = { + name = "status"; + type = "int16"; + }; +}; + +// GETBITMODE(timestamp, cache); +event = { + signal = GETBITMODE; + dir = IN; + param = { + name = "timestamp"; + type = "RTC::Timestamp"; + userdefined; + }; + param = { + name = "cache"; + type = "uint8"; + }; +}; + +// GETBITMODEACK(timestamp, status, bitmode_version, bits_per_sample) +event = { + signal = GETBITMODEACK; + dir = OUT; + param = { + name = "timestamp"; + type = "RTC::Timestamp"; + userdefined; + }; + param = { + name = "status"; + type = "int16"; + }; + param = { + name = "bitmode_version"; + type = "uint16[MAX_N_RSPBOARDS]"; + }; + param = { + name = "bits_per_sample"; + type = "uint16[MAX_N_RSPBOARDS]"; + }; +}; + +// SUBBITMODE(timestamp, period) +event = { + signal = SUBBITMODE; + dir = IN; + param = { + name = "timestamp"; + type = "RTC::Timestamp"; + userdefined; + }; + param = { + name = "period"; + type = "uint16"; + }; +}; + +// SUBBITMODEACK(timestamp, status, handle) +event = { + signal = SUBBITMODEACK; + dir = OUT; + param = { + name = "timestamp"; + type = "RTC::Timestamp"; + userdefined; + }; + param = { + name = "status"; + type = "int16"; + }; + param = { + name = "handle"; + type = "memptr_t"; + }; +}; + +// UPDBITMODE(timestamp, status, handle, bitmode_version, bits_per_sample) +event = { + signal = UPDBITMODE; + dir = OUT; + param = { + name = "timestamp"; + type = "RTC::Timestamp"; + userdefined; + }; + param = { + name = "status"; + type = "int16"; + }; + param = { + name = "handle"; + type = "memptr_t"; + }; + param = { + name = "bitmode_version"; + type = "uint16[MAX_N_RSPBOARDS]"; + }; + param = { + name = "bits_per_sample"; + type = "uint16[MAX_N_RSPBOARDS]"; + }; +}; + +// UNSUBBITMODE(handle) +event = { + signal = UNSUBBITMODE; + dir = IN; + param = { + name = "handle"; + type = "memptr_t"; + }; +}; + +// UNSUBBITMODEACK (timestamp, status, handle) +event = { + signal = UNSUBBITMODEACK; + dir = OUT; + param = { + name = "timestamp"; + type = "RTC::Timestamp"; + userdefined; + }; + param = { + name = "status"; + type = "int16"; + }; + param = { + name = "handle"; + type = "memptr_t"; + }; +}; + + diff --git a/MAC/APL/PIC/RSP_Protocol/src/RSUSettings.cc b/MAC/APL/PIC/RSP_Protocol/src/RSUSettings.cc index 8e253f44207..e8073f662bc 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/RSUSettings.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/RSUSettings.cc @@ -32,25 +32,25 @@ using namespace LOFAR; using namespace RSP_Protocol; -unsigned int RSUSettings::getSize() +size_t RSUSettings::getSize() const { - return MSH_ARRAY_SIZE(m_registers, RSUSettings::ResetControl); + return MSH_size(m_registers); } -unsigned int RSUSettings::pack (void* buffer) +size_t RSUSettings::pack (char * buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, m_registers, RSUSettings::ResetControl); + MSH_pack(buffer, offset, m_registers); return offset; } -unsigned int RSUSettings::unpack(void *buffer) +size_t RSUSettings::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, m_registers, RSUSettings::ResetControl, 1); + MSH_unpack(buffer, offset, m_registers); return offset; } diff --git a/MAC/APL/PIC/RSP_Protocol/src/SPUStatus.cc b/MAC/APL/PIC/RSP_Protocol/src/SPUStatus.cc index a34fa83874e..4bc185ba6e4 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/SPUStatus.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/SPUStatus.cc @@ -36,25 +36,25 @@ using namespace LOFAR; using namespace RSP_Protocol; using namespace EPA_Protocol; -unsigned int SPUStatus::getSize() +size_t SPUStatus::getSize() const { - return MSH_ARRAY_SIZE(itsSPUStatus, EPA_Protocol::SPUBoardStatus); + return MSH_size(itsSPUStatus); } -unsigned int SPUStatus::pack (void* buffer) +size_t SPUStatus::pack (char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, itsSPUStatus, EPA_Protocol::SPUBoardStatus); + MSH_pack(buffer, offset, itsSPUStatus); return offset; } -unsigned int SPUStatus::unpack(void *buffer) +size_t SPUStatus::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, itsSPUStatus, EPA_Protocol::SPUBoardStatus, 1); + MSH_unpack(buffer, offset, itsSPUStatus); return offset; } diff --git a/MAC/APL/PIC/RSP_Protocol/src/Statistics.cc b/MAC/APL/PIC/RSP_Protocol/src/Statistics.cc index ca6fb71dbff..91b0b9d48b9 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/Statistics.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/Statistics.cc @@ -31,25 +31,25 @@ using namespace blitz; using namespace LOFAR; using namespace RSP_Protocol; -unsigned int Statistics::getSize() +size_t Statistics::getSize() const { - return MSH_ARRAY_SIZE(m_statistics, double); + return MSH_size(m_statistics); } -unsigned int Statistics::pack (void* buffer) +size_t Statistics::pack (char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, m_statistics, double); + MSH_pack(buffer, offset, m_statistics); return offset; } -unsigned int Statistics::unpack(void *buffer) +size_t Statistics::unpack(const char*buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, m_statistics, double, 2); + MSH_unpack(buffer, offset, m_statistics); return offset; } diff --git a/MAC/APL/PIC/RSP_Protocol/src/SubbandSelection.cc b/MAC/APL/PIC/RSP_Protocol/src/SubbandSelection.cc index 9ff35ef7658..e5b11c6dfe8 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/SubbandSelection.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/SubbandSelection.cc @@ -33,36 +33,39 @@ using namespace blitz; using namespace LOFAR; using namespace RSP_Protocol; -unsigned int SubbandSelection::getSize() +size_t SubbandSelection::getSize() const { - return MSH_ARRAY_SIZE(m_subbands, uint16) + sizeof(uint16); + cout << itsCrosslets.dimensions() << "; " << itsCrosslets.size() << endl; + cout << itsBeamlets.dimensions() << "; " << itsBeamlets.size() << endl; + + return MSH_size(itsCrosslets) + + MSH_size(itsBeamlets) + + sizeof(uint16); } -unsigned int SubbandSelection::pack(void* buffer) +size_t SubbandSelection::pack(char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, m_subbands, uint16); - memcpy((char*)buffer + offset, &m_type, sizeof(uint16)); + MSH_pack(buffer, offset, itsCrosslets); + MSH_pack(buffer, offset, itsBeamlets); + memcpy(buffer + offset, &m_type, sizeof(uint16)); offset += sizeof(uint16); return offset; } -unsigned int SubbandSelection::unpack(void *buffer) +size_t SubbandSelection::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, m_subbands, uint16, 2); - memcpy(&m_type, (char*)buffer + offset, sizeof(uint16)); + MSH_unpack(buffer, offset, itsCrosslets); + MSH_unpack(buffer, offset, itsBeamlets); + memcpy(&m_type, buffer + offset, sizeof(uint16)); offset += sizeof(uint16); return offset; } -Array<uint16,2>& SubbandSelection::operator()() -{ - return m_subbands; -} diff --git a/MAC/APL/PIC/RSP_Protocol/src/SystemStatus.cc b/MAC/APL/PIC/RSP_Protocol/src/SystemStatus.cc index 4a951af2c23..a68bd1f8ed5 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/SystemStatus.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/SystemStatus.cc @@ -36,25 +36,25 @@ using namespace LOFAR; using namespace RSP_Protocol; using namespace EPA_Protocol; -unsigned int SystemStatus::getSize() +size_t SystemStatus::getSize() const { - return MSH_ARRAY_SIZE(m_board_status, EPA_Protocol::BoardStatus); + return MSH_size(m_board_status); } -unsigned int SystemStatus::pack (void* buffer) +size_t SystemStatus::pack (char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, m_board_status, EPA_Protocol::BoardStatus); + MSH_pack(buffer, offset, m_board_status); return offset; } -unsigned int SystemStatus::unpack(void *buffer) +size_t SystemStatus::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, m_board_status, EPA_Protocol::BoardStatus, 1); + MSH_unpack(buffer, offset, m_board_status); return offset; } diff --git a/MAC/APL/PIC/RSP_Protocol/src/TBBSettings.cc b/MAC/APL/PIC/RSP_Protocol/src/TBBSettings.cc index 0041fcc55be..0ce0dad1061 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/TBBSettings.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/TBBSettings.cc @@ -31,25 +31,25 @@ using namespace blitz; using namespace LOFAR; using namespace RSP_Protocol; -unsigned int TBBSettings::getSize() +size_t TBBSettings::getSize() const { - return MSH_ARRAY_SIZE(m_bandsel, bitset<MEPHeader::N_SUBBANDS>); + return MSH_size(m_bandsel); } -unsigned int TBBSettings::pack (void* buffer) +size_t TBBSettings::pack (char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, m_bandsel, bitset<MEPHeader::N_SUBBANDS>); + MSH_pack(buffer, offset, m_bandsel); return offset; } -unsigned int TBBSettings::unpack(void *buffer) +size_t TBBSettings::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, m_bandsel, bitset<MEPHeader::N_SUBBANDS>, 1); + MSH_unpack(buffer, offset, m_bandsel); return offset; } diff --git a/MAC/APL/PIC/RSP_Protocol/src/TDStatus.cc b/MAC/APL/PIC/RSP_Protocol/src/TDStatus.cc index ea425cd3b0d..6fe844f89bc 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/TDStatus.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/TDStatus.cc @@ -36,25 +36,25 @@ using namespace LOFAR; using namespace RSP_Protocol; using namespace EPA_Protocol; -unsigned int TDStatus::getSize() +size_t TDStatus::getSize() const { - return MSH_ARRAY_SIZE(m_board_status, EPA_Protocol::TDBoardStatus); + return MSH_size(m_board_status); } -unsigned int TDStatus::pack (void* buffer) +size_t TDStatus::pack (char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, m_board_status, EPA_Protocol::TDBoardStatus); + MSH_pack(buffer, offset, m_board_status); return offset; } -unsigned int TDStatus::unpack(void *buffer) +size_t TDStatus::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, m_board_status, EPA_Protocol::TDBoardStatus, 1); + MSH_unpack(buffer, offset, m_board_status); return offset; } diff --git a/MAC/APL/PIC/RSP_Protocol/src/Versions.cc b/MAC/APL/PIC/RSP_Protocol/src/Versions.cc index e8b1f126ffe..0a022b0d76a 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/Versions.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/Versions.cc @@ -31,29 +31,29 @@ using namespace blitz; using namespace LOFAR; using namespace RSP_Protocol; -unsigned int Versions::getSize() +size_t Versions::getSize() const { return - MSH_ARRAY_SIZE(m_bp_versions, EPA_Protocol::RSRVersion) - + MSH_ARRAY_SIZE(m_ap_versions, EPA_Protocol::RSRVersion); + MSH_size(m_bp_versions) + + MSH_size(m_ap_versions); } -unsigned int Versions::pack (void* buffer) +size_t Versions::pack (char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, m_bp_versions, EPA_Protocol::RSRVersion); - MSH_PACK_ARRAY(buffer, offset, m_ap_versions, EPA_Protocol::RSRVersion); + MSH_pack(buffer, offset, m_bp_versions); + MSH_pack(buffer, offset, m_ap_versions); return offset; } -unsigned int Versions::unpack(void *buffer) +size_t Versions::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, m_bp_versions, EPA_Protocol::RSRVersion, 1); - MSH_UNPACK_ARRAY(buffer, offset, m_ap_versions, EPA_Protocol::RSRVersion, 1); + MSH_unpack(buffer, offset, m_bp_versions); + MSH_unpack(buffer, offset, m_ap_versions); return offset; } diff --git a/MAC/APL/PIC/RSP_Protocol/src/WGSettings.cc b/MAC/APL/PIC/RSP_Protocol/src/WGSettings.cc index db7cfa62497..4336bc9a1d8 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/WGSettings.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/WGSettings.cc @@ -97,25 +97,25 @@ void WGSettings::initWaveformPresets() LOG_DEBUG_STR("ramp=" << WGSettings::m_presets(PRESET_RAMP, Range::all())); } -unsigned int WGSettings::getSize() +size_t WGSettings::getSize() const { - return MSH_ARRAY_SIZE(m_registers, WGRegisterType); + return MSH_size(m_registers); } -unsigned int WGSettings::pack (void* buffer) +size_t WGSettings::pack (char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, m_registers, WGRegisterType); + MSH_pack(buffer, offset, m_registers); return offset; } -unsigned int WGSettings::unpack(void *buffer) +size_t WGSettings::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, m_registers, WGRegisterType, 1); + MSH_unpack(buffer, offset, m_registers); return offset; } diff --git a/MAC/APL/PIC/RSP_Protocol/src/XCStatistics.cc b/MAC/APL/PIC/RSP_Protocol/src/XCStatistics.cc index 84ffde42146..fa75352da97 100644 --- a/MAC/APL/PIC/RSP_Protocol/src/XCStatistics.cc +++ b/MAC/APL/PIC/RSP_Protocol/src/XCStatistics.cc @@ -31,25 +31,25 @@ using namespace blitz; using namespace LOFAR; using namespace RSP_Protocol; -unsigned int XCStatistics::getSize() +size_t XCStatistics::getSize() const { - return MSH_ARRAY_SIZE(m_xstatistics, complex<double>); + return MSH_size(m_xstatistics); } -unsigned int XCStatistics::pack (void* buffer) +size_t XCStatistics::pack (char* buffer) const { - unsigned int offset = 0; + size_t offset = 0; - MSH_PACK_ARRAY(buffer, offset, m_xstatistics, complex<double>); + MSH_pack(buffer, offset, m_xstatistics); return offset; } -unsigned int XCStatistics::unpack(void *buffer) +size_t XCStatistics::unpack(const char *buffer) { - unsigned int offset = 0; + size_t offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, m_xstatistics, complex<double>, 4); + MSH_unpack(buffer, offset, m_xstatistics); return offset; } diff --git a/MAC/APL/RTCCommon/include/APL/RTCCommon/MarshallBlitz.h b/MAC/APL/RTCCommon/include/APL/RTCCommon/MarshallBlitz.h index 383b3201fc3..257d885b605 100644 --- a/MAC/APL/RTCCommon/include/APL/RTCCommon/MarshallBlitz.h +++ b/MAC/APL/RTCCommon/include/APL/RTCCommon/MarshallBlitz.h @@ -30,48 +30,50 @@ #include <cstring> // SIZE blitz::array<...> -#define MSH_ARRAY_SIZE(array, datatype) \ - (((array).dimensions()*sizeof(int32)) + ((array).size() * sizeof(datatype))) +template<typename T, int N> size_t MSH_size( const blitz::Array<T,N> &array ) +{ + return array.dimensions() * sizeof(LOFAR::int32) + array.size() * sizeof(T); +} // PACK blitz::array<...> // first copy the dimensions of the array, then the array itself. -#define MSH_PACK_ARRAY(bufptr, offset, array, datatype) \ -do { \ - for (int dim = blitz::firstDim; dim < blitz::firstDim + (array).dimensions(); dim++) { \ - int32 extent = (array).extent(dim); \ - memcpy(((char*)(bufptr)) + (offset), &extent, sizeof(int32)); \ - offset += sizeof(int32); \ - } \ - \ - if ((array).numElements() > 0) { \ - if ((array).isStorageContiguous()) { \ - memcpy(((char*)(bufptr)) + (offset), (array).data(), (array).size() * sizeof(datatype)); \ - offset += (array).size() * sizeof(datatype); \ - } \ - else { \ - LOG_FATAL("array must be contiguous"); \ - exit(EXIT_FAILURE); \ - } \ - } \ -} while (0) +template<typename T, int N> void MSH_pack( char *bufptr, size_t &offset, const blitz::Array<T,N> &array ) +{ + for (int dim = blitz::firstDim; dim < blitz::firstDim + N; dim++) { + LOFAR::int32 extent = array.extent(dim); + memcpy(bufptr + offset, &extent, sizeof(LOFAR::int32)); + offset += sizeof(LOFAR::int32); + } + + if ((array).numElements() > 0) { + if ((array).isStorageContiguous()) { + memcpy(bufptr + offset, array.data(), array.size() * sizeof(T)); + offset += array.size() * sizeof(T); + } + else { + LOG_FATAL("array must be contiguous"); + exit(EXIT_FAILURE); + } + } +} // UNPACK blitz::array<...> -#define MSH_UNPACK_ARRAY(bufptr, offset, array, datatype, dims) \ -do { \ - blitz::TinyVector<int, (dims)> extent; \ - \ - for (int dim = blitz::firstDim; dim < blitz::firstDim + (dims); dim++) { \ - int32 extenttmp = array.extent(dim); \ - memcpy(&extenttmp, ((char*)(bufptr)) + (offset), sizeof(int32)); \ - offset += sizeof(int32); \ - extent(dim - blitz::firstDim) = extenttmp; \ - } \ - \ - /* resize the array to the correct size */ \ - array.resize(extent); \ - \ - memcpy(array.data(), ((char*)(bufptr)) + (offset), array.size() * sizeof(datatype)); \ - offset += array.size() * sizeof(datatype); \ -} while (0) +template<typename T, int N> void MSH_unpack( const char *bufptr, size_t &offset, blitz::Array<T,N> &array ) +{ + blitz::TinyVector<int, N> extent; -#endif /* MARSHALLING_H_ */ + for (int dim = blitz::firstDim; dim < blitz::firstDim + N; dim++) { + LOFAR::int32 extenttmp = array.extent(dim); + memcpy(&extenttmp, bufptr + offset, sizeof(LOFAR::int32)); + offset += sizeof(LOFAR::int32); + extent(dim - blitz::firstDim) = extenttmp; + } + + /* resize the array to the correct size */ + array.resize(extent); + + memcpy(array.data(), bufptr + offset, array.size() * sizeof(T)); + offset += array.size() * sizeof(T); +} + +#endif /* MARSHALLBLITZ_H_ */ diff --git a/MAC/APL/RTCCommon/include/APL/RTCCommon/NsTimestamp.h b/MAC/APL/RTCCommon/include/APL/RTCCommon/NsTimestamp.h index a0a3e6effcd..97cea6c185b 100644 --- a/MAC/APL/RTCCommon/include/APL/RTCCommon/NsTimestamp.h +++ b/MAC/APL/RTCCommon/include/APL/RTCCommon/NsTimestamp.h @@ -96,9 +96,9 @@ public: /*@{*/ // marshalling methods - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize(); + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: @@ -194,24 +194,24 @@ inline bool NsTimestamp::operator!=(const NsTimestamp& rhs) const inline long NsTimestamp::sec() const { return itsSec; } inline long NsTimestamp::nsec() const { return itsNsec; } -inline unsigned int NsTimestamp::getSize() +inline size_t NsTimestamp::getSize() { return (2 * sizeof(int64)); } -inline unsigned int NsTimestamp::pack (void* __buffer) +inline size_t NsTimestamp::pack (char* __buffer) const { - uint32 __valSize(sizeof(int64)); + size_t __valSize(sizeof(int64)); memcpy(__buffer, &itsSec, __valSize); memcpy((char*)__buffer+__valSize, &itsNsec, __valSize); return (2*__valSize); } -inline unsigned int NsTimestamp::unpack(void *__buffer) +inline size_t NsTimestamp::unpack(const char *__buffer) { - uint32 __valSize(sizeof(int64)); + size_t __valSize(sizeof(int64)); memcpy(&itsSec, __buffer, __valSize); - memcpy(&itsNsec, (char*)__buffer+__valSize, __valSize); + memcpy(&itsNsec, __buffer + __valSize, __valSize); return (2*__valSize); } diff --git a/MAC/APL/RTCCommon/include/APL/RTCCommon/RegisterState.h b/MAC/APL/RTCCommon/include/APL/RTCCommon/RegisterState.h index 296bbd0c626..90078e734a9 100644 --- a/MAC/APL/RTCCommon/include/APL/RTCCommon/RegisterState.h +++ b/MAC/APL/RTCCommon/include/APL/RTCCommon/RegisterState.h @@ -129,19 +129,19 @@ public: RegisterState& operator=(const RegisterState& state); /* marshalling methods */ - unsigned int getSize() { - return MSH_ARRAY_SIZE(m_state, State); + size_t getSize() const { + return MSH_size(m_state); } - unsigned int pack(void* buffer) { - unsigned int offset = 0; - MSH_PACK_ARRAY(buffer, offset, m_state, State); + size_t pack(char* buffer) const { + size_t offset = 0; + MSH_pack(buffer, offset, m_state); return offset; } - unsigned int unpack(void* buffer) { - unsigned int offset = 0; - MSH_UNPACK_ARRAY(buffer, offset, m_state, State, 1); + size_t unpack(const char* buffer) { + size_t offset = 0; + MSH_unpack(buffer, offset, m_state); return offset; } diff --git a/MAC/APL/RTCCommon/include/APL/RTCCommon/Timestamp.h b/MAC/APL/RTCCommon/include/APL/RTCCommon/Timestamp.h index c0caca1d0e8..c4be06cd248 100644 --- a/MAC/APL/RTCCommon/include/APL/RTCCommon/Timestamp.h +++ b/MAC/APL/RTCCommon/include/APL/RTCCommon/Timestamp.h @@ -131,9 +131,9 @@ public: /** * marshalling methods */ - unsigned int getSize(); - unsigned int pack (void* buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); /*@}*/ private: @@ -156,18 +156,18 @@ private: } inline void Timestamp::get(struct timeval *tv) const { if (tv) *tv = m_tv; } - inline unsigned int Timestamp::getSize() + inline size_t Timestamp::getSize() const { return sizeof(struct timeval); } - inline unsigned int Timestamp::pack (void* buffer) + inline size_t Timestamp::pack (char* buffer) const { memcpy(buffer, &m_tv, sizeof(struct timeval)); return sizeof(struct timeval); } - inline unsigned int Timestamp::unpack(void *buffer) + inline size_t Timestamp::unpack(const char *buffer) { memcpy(&m_tv, buffer, sizeof(struct timeval)); return sizeof(struct timeval); diff --git a/MAC/APL/RTCCommon/test/tMarshallBlitz.cc b/MAC/APL/RTCCommon/test/tMarshallBlitz.cc index 3896de521cc..9ed18a6ccce 100644 --- a/MAC/APL/RTCCommon/test/tMarshallBlitz.cc +++ b/MAC/APL/RTCCommon/test/tMarshallBlitz.cc @@ -37,7 +37,7 @@ int main (int, char* argv[]) INIT_LOGGER(argv[0]); char buf[4096]; - int offset(0); + size_t offset(0); // blitz array <double> blitz::Array<double, 2> ba1(2,4); @@ -47,34 +47,34 @@ int main (int, char* argv[]) 40, 41; cout << "Testing blitz::Array<double, 2>" << ba1 << endl; - cout << "size = " << MSH_ARRAY_SIZE(ba1, double) << endl; + cout << "size = " << MSH_size(ba1) << endl; bzero(buf, 4096); offset = 0; - MSH_PACK_ARRAY(buf, offset, ba1, double); + MSH_pack(buf, offset, ba1); cout << "packed:" << endl; hexdump(buf, offset); blitz::Array<double, 2> ba2(2,4); offset = 0; - MSH_UNPACK_ARRAY(buf, offset, ba2, double, 2); + MSH_unpack(buf, offset, ba2); cout << "unpacked: " << ba2 << endl; // blitz array <int> blitz::Array<int, 2> emptyArr; cout << "Testing EMPTY blitz::Array<int, 2>" << emptyArr << endl; - cout << "size = " << MSH_ARRAY_SIZE(emptyArr, int) << endl; + cout << "size = " << MSH_size(emptyArr) << endl; bzero(buf, 4096); offset = 0; - MSH_PACK_ARRAY(buf, offset, emptyArr, int); + MSH_pack(buf, offset, emptyArr); cout << "packed:" << endl; hexdump(buf, offset); blitz::Array<int, 2> empty2; offset = 0; - MSH_UNPACK_ARRAY(buf, offset, empty2, int, 2); + MSH_unpack(buf, offset, empty2); cout << "unpacked: " << empty2 << endl; return (0); diff --git a/MAC/APL/StationCU/src/BeamControl/PVSSDatapointDefs.h b/MAC/APL/StationCU/src/BeamControl/PVSSDatapointDefs.h index 3ddc45b8e81..9f83a52dda5 100644 --- a/MAC/APL/StationCU/src/BeamControl/PVSSDatapointDefs.h +++ b/MAC/APL/StationCU/src/BeamControl/PVSSDatapointDefs.h @@ -1,4 +1,4 @@ -// This file was generated by create_db_files v1.0 on Wed Feb 4 15:00:05 UTC 2009 +// This file was generated by create_db_files v2.0 on Tue Oct 9 13:22:37 UTC 2012 #ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H #define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H @@ -15,18 +15,6 @@ #define PN_OBJ_MESSAGE "object.message" #define PN_OBJ_LEAF "object.leaf" -// Station -#define PSN_STATION "LOFAR_PIC_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - -// Station -#define PSN_STATION "LOFAR_PermSW_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - // MACScheduler #define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" #define PST_MAC_SCHEDULER "MACScheduler" @@ -37,12 +25,15 @@ #define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" #define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" +// CRTriggerControl +#define PSN_CR_TRIGGER_CONTROL "LOFAR_PermSW_CRTriggerControl" +#define PST_CR_TRIGGER_CONTROL "CRTriggerControl" + // Observation #define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" #define PST_OBSERVATION "Observation" #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" -#define PN_OBS_RECEIVER_BITMAP "receiverBitmap" #define PN_OBS_CLAIM_PERIOD "claimPeriod" #define PN_OBS_PREPARE_PERIOD "preparePeriod" #define PN_OBS_START_TIME "startTime" @@ -54,6 +45,9 @@ #define PN_OBS_SAMPLE_CLOCK "sampleClock" #define PN_OBS_RUN_STATE "runState" #define PN_OBS_MEASUREMENT_SET "measurementSet" +#define PN_OBS_PROCESS_TYPE "processType" +#define PN_OBS_PROCESS_SUBTYPE "processSubtype" +#define PN_OBS_STRATEGY "strategy" #define PN_OBS_STATION_LIST "stationList" #define PN_OBS_INPUT_NODE_LIST "inputNodeList" #define PN_OBS_BGL_NODE_LIST "BGLNodeList" @@ -61,24 +55,88 @@ #define PN_OBS_BEAMS_ANGLE1 "Beams.angle1" #define PN_OBS_BEAMS_ANGLE2 "Beams.angle2" #define PN_OBS_BEAMS_DIRECTION_TYPE "Beams.directionType" -#define PN_OBS_BEAMS_BEAMLET_LIST "Beams.beamletList" #define PN_OBS_BEAMS_SUBBAND_LIST "Beams.subbandList" +#define PN_OBS_TIED_ARRAY_BEAMS_BEAM_INDEX "TiedArrayBeams.beamIndex" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE1 "TiedArrayBeams.angle1" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE2 "TiedArrayBeams.angle2" +#define PN_OBS_TIED_ARRAY_BEAMS_DIRECTION_TYPE "TiedArrayBeams.directionType" +#define PN_OBS_TIED_ARRAY_BEAMS_DISPERSION "TiedArrayBeams.dispersion" +#define PN_OBS_TIED_ARRAY_BEAMS_COHERENT "TiedArrayBeams.coherent" // ObservationControl #define PSN_OBSERVATION_CONTROL "LOFAR_ObsSW_@observation@_ObservationControl" #define PST_OBSERVATION_CONTROL "ObservationControl" +#define PN_OBSCTRL_COMMAND "command" + +// InputBuffer +#define PSN_INPUT_BUFFER "LOFAR_PermSW_@psionode@_InputBuffer" +#define PST_INPUT_BUFFER "InputBuffer" +#define PN_IPB_STATION_NAME "stationName" +#define PN_IPB_OBSERVATION_NAME "observationName" +#define PN_IPB_STREAM0_BLOCKS_IN "stream0.blocksIn" +#define PN_IPB_STREAM0_PERC_BAD "stream0.percBad" +#define PN_IPB_STREAM0_REJECTED "stream0.rejected" +#define PN_IPB_STREAM1_BLOCKS_IN "stream1.blocksIn" +#define PN_IPB_STREAM1_PERC_BAD "stream1.percBad" +#define PN_IPB_STREAM1_REJECTED "stream1.rejected" +#define PN_IPB_STREAM2_BLOCKS_IN "stream2.blocksIn" +#define PN_IPB_STREAM2_PERC_BAD "stream2.percBad" +#define PN_IPB_STREAM2_REJECTED "stream2.rejected" +#define PN_IPB_STREAM3_BLOCKS_IN "stream3.blocksIn" +#define PN_IPB_STREAM3_PERC_BAD "stream3.percBad" +#define PN_IPB_STREAM3_REJECTED "stream3.rejected" +#define PN_IPB_LATE "late" +#define PN_IPB_IO_TIME "IOTime" + +// Adder +#define PSN_ADDER "LOFAR_ObsSW_@osionode@_@adder@" +#define PST_ADDER "Adder" +#define PN_ADD_DROPPING "dropping" +#define PN_ADD_DROPPED "dropped" +#define PN_ADD_DATA_PRODUCT_TYPE "dataProductType" +#define PN_ADD_DATA_PRODUCT "dataProduct" +#define PN_ADD_FILE_NAME "fileName" +#define PN_ADD_LOCUS_NODE "locusNode" +#define PN_ADD_WRITER "writer" +#define PN_ADD_DIRECTORY "directory" +#define PN_ADD_OBSERVATION_NAME "observationName" -// OnlineControl -#define PSN_ONLINE_CONTROL "LOFAR_ObsSW_@observation@_OnlineControl" -#define PST_ONLINE_CONTROL "OnlineControl" +// Writer +#define PSN_WRITER "LOFAR_ObsSW_@oslocusnode@_@writer@" +#define PST_WRITER "Writer" +#define PN_WTR_WRITTEN "written" +#define PN_WTR_DROPPED "dropped" +#define PN_WTR_FILE_NAME "fileName" +#define PN_WTR_DATA_RATE "dataRate" +#define PN_WTR_DATA_PRODUCT_TYPE "dataProductType" +#define PN_WTR_OBSERVATION_NAME "observationName" -// Correlator -#define PSN_CORRELATOR "LOFAR_ObsSW_@observation@_OnlineControl_Correlator" -#define PST_CORRELATOR "Correlator" +// IONode +#define PSN_IO_NODE "LOFAR_PIC_BGP_@midplane@_@ionode@" +#define PST_IO_NODE "IONode" +#define PN_ION_STATION0 "station0" +#define PN_ION_IP0 "IP0" +#define PN_ION_MAC0 "MAC0" +#define PN_ION_STATION1 "station1" +#define PN_ION_IP1 "IP1" +#define PN_ION_MAC1 "MAC1" +#define PN_ION_USE2ND_STATION "use2ndStation" +#define PN_ION_USED_STATION "usedStation" +#define PN_ION_USEDIP "usedIP" +#define PN_ION_USEDMAC "usedMAC" -// StorageAppl -#define PSN_STORAGE_APPL "LOFAR_ObsSW_@observation@_OnlineControl_StorageAppl" -#define PST_STORAGE_APPL "StorageAppl" +// LocusNode +#define PSN_LOCUS_NODE "LOFAR_PIC_@osrack@_@locusnode@" +#define PST_LOCUS_NODE "LocusNode" +#define PN_LCN_FREE "free" +#define PN_LCN_TOTAL "total" +#define PN_LCN_CLAIMED "claimed" + +// CEPHardwareMonitor +#define PSN_CEP_HARDWARE_MONITOR "LOFAR_PermSW_CEPHardwareMonitor" +#define PST_CEP_HARDWARE_MONITOR "CEPHardwareMonitor" +#define PN_CHM_BGP_CONNECTED "BGP.connected" +#define PN_CHM_CLUSTER_CONNECTED "Cluster.connected" // Cabinet #define PSN_CABINET "LOFAR_PIC_@cabinet@" @@ -88,8 +146,8 @@ #define PN_CAB_FRONT_FAN_OUTER "frontFanOuter" #define PN_CAB_FRONT_AIRFLOW "frontAirflow" #define PN_CAB_BACK_DOOR_OPEN "backDoorOpen" -#define PN_CAB_BACKT_FAN_INNER "backtFanInner" -#define PN_CAB_BACKT_FAN_OUTER "backtFanOuter" +#define PN_CAB_BACK_FAN_INNER "backFanInner" +#define PN_CAB_BACK_FAN_OUTER "backFanOuter" #define PN_CAB_BACK_AIRFLOW "backAirflow" #define PN_CAB_TEMP_ALARM "tempAlarm" #define PN_CAB_HUMIDITY_ALARM "humidityAlarm" @@ -135,7 +193,10 @@ #define PN_RSP_VOLTAGE25 "voltage25" #define PN_RSP_VOLTAGE33 "voltage33" #define PN_RSP_VERSION "version" +#define PN_RSP_BITMODE "bitmode" +#define PN_RSP_BITMODE_CAPABILITY "bitmodeCapability" #define PN_RSP_ALERT "alert" +#define PN_RSP_SPLITTER_ON "splitterOn" #define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" #define PN_RSP__ETHERNET_STATUS_CHILD_STATE "Ethernet.status.childState" #define PN_RSP__ETHERNET_STATUS_MESSAGE "Ethernet.status.message" @@ -216,10 +277,15 @@ #define PN_RCU_TRIGGER_FILTER "Trigger.filter" #define PN_RCU_TRIGGER_WINDOW "Trigger.window" #define PN_RCU_TRIGGER_OPERATING_MODE "Trigger.operatingMode" -#define PN_RCU_TRIGGER_COEFF0 "Trigger.coeff0" -#define PN_RCU_TRIGGER_COEFF1 "Trigger.coeff1" -#define PN_RCU_TRIGGER_COEFF2 "Trigger.coeff2" -#define PN_RCU_TRIGGER_COEFF3 "Trigger.coeff3" +#define PN_RCU_TRIGGER_TRIGGER_MODE "Trigger.triggerMode" +#define PN_RCU_TRIGGER_FILTER0_COEFF0 "Trigger.filter0.coeff0" +#define PN_RCU_TRIGGER_FILTER0_COEFF1 "Trigger.filter0.coeff1" +#define PN_RCU_TRIGGER_FILTER0_COEFF2 "Trigger.filter0.coeff2" +#define PN_RCU_TRIGGER_FILTER0_COEFF3 "Trigger.filter0.coeff3" +#define PN_RCU_TRIGGER_FILTER1_COEFF0 "Trigger.filter1.coeff0" +#define PN_RCU_TRIGGER_FILTER1_COEFF1 "Trigger.filter1.coeff1" +#define PN_RCU_TRIGGER_FILTER1_COEFF2 "Trigger.filter1.coeff2" +#define PN_RCU_TRIGGER_FILTER1_COEFF3 "Trigger.filter1.coeff3" // TBBoard #define PSN_TB_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@" @@ -247,6 +313,62 @@ #define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" #define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" +// LBAAntenna +#define PSN_LBA_ANTENNA "LOFAR_PIC_@lbaantenna@" +#define PST_LBA_ANTENNA "LBAAntenna" + +// HBAAntenna +#define PSN_HBA_ANTENNA "LOFAR_PIC_@hbaantenna@" +#define PST_HBA_ANTENNA "HBAAntenna" + +// StationInfo +#define PSN_STATION_INFO "LOFAR_PIC_StationInfo" +#define PST_STATION_INFO "StationInfo" +#define PN_STI_STATIONID "stationID" +#define PN_STI_N_RSP_BOARDS "N_RSPBoards" +#define PN_STI_N_TB_BOARDS "N_TBBoards" +#define PN_STI_N_LBAS "N_LBAS" +#define PN_STI_N_HBAS "N_HBAS" +#define PN_STI_HBA__SPLIT "HBA_Split" +#define PN_STI_WIDE_LBAS "wide_LBAS" +#define PN_STI_POWER48_ON "power48On" +#define PN_STI_POWER220_ON "power220On" +#define PN_STI_CABINET_X "Cabinet.X" +#define PN_STI_CABINET_Y "Cabinet.Y" +#define PN_STI_CABINET_Z "Cabinet.Z" +#define PN_STI_HBA_CENTERX "HBA.centerX" +#define PN_STI_HBA_CENTERY "HBA.centerY" +#define PN_STI_HBA_CENTERZ "HBA.centerZ" +#define PN_STI_HBA_HBA0_CENTERX "HBA.HBA0.centerX" +#define PN_STI_HBA_HBA0_CENTERY "HBA.HBA0.centerY" +#define PN_STI_HBA_HBA0_CENTERZ "HBA.HBA0.centerZ" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_X "HBA.HBA0.NormalVector.X" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Y "HBA.HBA0.NormalVector.Y" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Z "HBA.HBA0.NormalVector.Z" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_X "HBA.HBA0.RotationMatrix.X" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Y "HBA.HBA0.RotationMatrix.Y" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Z "HBA.HBA0.RotationMatrix.Z" +#define PN_STI_HBA_HBA0_ROTATION "HBA.HBA0.rotation" +#define PN_STI_HBA_HBA1_CENTERX "HBA.HBA1.centerX" +#define PN_STI_HBA_HBA1_CENTERY "HBA.HBA1.centerY" +#define PN_STI_HBA_HBA1_CENTERZ "HBA.HBA1.centerZ" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_X "HBA.HBA1.NormalVector.X" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Y "HBA.HBA1.NormalVector.Y" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Z "HBA.HBA1.NormalVector.Z" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_X "HBA.HBA1.RotationMatrix.X" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Y "HBA.HBA1.RotationMatrix.Y" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Z "HBA.HBA1.RotationMatrix.Z" +#define PN_STI_HBA_HBA1_ROTATION "HBA.HBA1.rotation" +#define PN_STI_LBA_CENTERX "LBA.centerX" +#define PN_STI_LBA_CENTERY "LBA.centerY" +#define PN_STI_LBA_CENTERZ "LBA.centerZ" +#define PN_STI_LBA__NORMAL_VECTOR_X "LBA.NormalVector.X" +#define PN_STI_LBA__NORMAL_VECTOR_Y "LBA.NormalVector.Y" +#define PN_STI_LBA__NORMAL_VECTOR_Z "LBA.NormalVector.Z" +#define PN_STI_LBA__ROTATION_MATRIX_X "LBA.RotationMatrix.X" +#define PN_STI_LBA__ROTATION_MATRIX_Y "LBA.RotationMatrix.Y" +#define PN_STI_LBA__ROTATION_MATRIX_Z "LBA.RotationMatrix.Z" + // LogProcessor #define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" #define PST_LOG_PROCESSOR "LogProcessor" @@ -260,10 +382,12 @@ #define PST_HARDWARE_MONITOR "HardwareMonitor" #define PN_HWM_RSP_CONNECTED "RSP.connected" #define PN_HWM_TBB_CONNECTED "TBB.connected" +#define PN_HWM_EC_CONNECTED "EC.connected" // SoftwareMonitor #define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" #define PST_SOFTWARE_MONITOR "SoftwareMonitor" +#define PN_SWM_SW_LEVEL "SWLevel" // SHMInfoServer #define PSN_SHM_INFO_SERVER "LOFAR_PermSW_SHMInfoServer" @@ -280,19 +404,8 @@ #define PN_CLC_CONNECTED "connected" #define PN_CLC_REQUESTED_CLOCK "requestedClock" #define PN_CLC_ACTUAL_CLOCK "actualClock" - -// Antenna -#define PSN_ANTENNA "@antenna@" -#define PST_ANTENNA "Antenna" -#define PN_ANT_STATUS_STATE "status.state" -#define PN_ANT_STATUS_CHILD_STATE "status.childState" -#define PN_ANT_STATUS_MESSAGE "status.message" -#define PN_ANT_STATUS_LEAF "status.leaf" -#define PN_ANT_RCUX "RCUX" -#define PN_ANT_RCUY "RCUY" -#define PN_ANT_DELTAX "deltaX" -#define PN_ANT_DELTAY "deltaY" -#define PN_ANT_DELTAH "deltaH" +#define PN_CLC_REQUESTED_BITMODE "requestedBitmode" +#define PN_CLC_ACTUAL_BITMODE "actualBitmode" // StnObservation #define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" @@ -300,6 +413,9 @@ #define PN_OBS_NAME "name" #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" +#define PN_OBS_RECEIVER_BITMAP "receiverBitmap" +#define PN_OBS_HBA_BITMAP "HBABitmap" +#define PN_OBS_LBA_BITMAP "LBABitmap" // BeamControl #define PSN_BEAM_CONTROL "LOFAR_ObsSW_@observation@_BeamControl" @@ -336,5 +452,6 @@ #define PN_TBC_TRIGGER_PEAK_VALUE "trigger.peakValue" #define PN_TBC_TRIGGER_FLAGS "trigger.flags" #define PN_TBC_TRIGGER_TABLE "trigger.table" +#define PN_TBC_TRIGGER_MISSED "trigger.missed" #endif diff --git a/MAC/APL/StationCU/src/CalibrationControl/PVSSDatapointDefs.h b/MAC/APL/StationCU/src/CalibrationControl/PVSSDatapointDefs.h index 3ddc45b8e81..9f83a52dda5 100644 --- a/MAC/APL/StationCU/src/CalibrationControl/PVSSDatapointDefs.h +++ b/MAC/APL/StationCU/src/CalibrationControl/PVSSDatapointDefs.h @@ -1,4 +1,4 @@ -// This file was generated by create_db_files v1.0 on Wed Feb 4 15:00:05 UTC 2009 +// This file was generated by create_db_files v2.0 on Tue Oct 9 13:22:37 UTC 2012 #ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H #define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H @@ -15,18 +15,6 @@ #define PN_OBJ_MESSAGE "object.message" #define PN_OBJ_LEAF "object.leaf" -// Station -#define PSN_STATION "LOFAR_PIC_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - -// Station -#define PSN_STATION "LOFAR_PermSW_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - // MACScheduler #define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" #define PST_MAC_SCHEDULER "MACScheduler" @@ -37,12 +25,15 @@ #define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" #define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" +// CRTriggerControl +#define PSN_CR_TRIGGER_CONTROL "LOFAR_PermSW_CRTriggerControl" +#define PST_CR_TRIGGER_CONTROL "CRTriggerControl" + // Observation #define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" #define PST_OBSERVATION "Observation" #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" -#define PN_OBS_RECEIVER_BITMAP "receiverBitmap" #define PN_OBS_CLAIM_PERIOD "claimPeriod" #define PN_OBS_PREPARE_PERIOD "preparePeriod" #define PN_OBS_START_TIME "startTime" @@ -54,6 +45,9 @@ #define PN_OBS_SAMPLE_CLOCK "sampleClock" #define PN_OBS_RUN_STATE "runState" #define PN_OBS_MEASUREMENT_SET "measurementSet" +#define PN_OBS_PROCESS_TYPE "processType" +#define PN_OBS_PROCESS_SUBTYPE "processSubtype" +#define PN_OBS_STRATEGY "strategy" #define PN_OBS_STATION_LIST "stationList" #define PN_OBS_INPUT_NODE_LIST "inputNodeList" #define PN_OBS_BGL_NODE_LIST "BGLNodeList" @@ -61,24 +55,88 @@ #define PN_OBS_BEAMS_ANGLE1 "Beams.angle1" #define PN_OBS_BEAMS_ANGLE2 "Beams.angle2" #define PN_OBS_BEAMS_DIRECTION_TYPE "Beams.directionType" -#define PN_OBS_BEAMS_BEAMLET_LIST "Beams.beamletList" #define PN_OBS_BEAMS_SUBBAND_LIST "Beams.subbandList" +#define PN_OBS_TIED_ARRAY_BEAMS_BEAM_INDEX "TiedArrayBeams.beamIndex" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE1 "TiedArrayBeams.angle1" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE2 "TiedArrayBeams.angle2" +#define PN_OBS_TIED_ARRAY_BEAMS_DIRECTION_TYPE "TiedArrayBeams.directionType" +#define PN_OBS_TIED_ARRAY_BEAMS_DISPERSION "TiedArrayBeams.dispersion" +#define PN_OBS_TIED_ARRAY_BEAMS_COHERENT "TiedArrayBeams.coherent" // ObservationControl #define PSN_OBSERVATION_CONTROL "LOFAR_ObsSW_@observation@_ObservationControl" #define PST_OBSERVATION_CONTROL "ObservationControl" +#define PN_OBSCTRL_COMMAND "command" + +// InputBuffer +#define PSN_INPUT_BUFFER "LOFAR_PermSW_@psionode@_InputBuffer" +#define PST_INPUT_BUFFER "InputBuffer" +#define PN_IPB_STATION_NAME "stationName" +#define PN_IPB_OBSERVATION_NAME "observationName" +#define PN_IPB_STREAM0_BLOCKS_IN "stream0.blocksIn" +#define PN_IPB_STREAM0_PERC_BAD "stream0.percBad" +#define PN_IPB_STREAM0_REJECTED "stream0.rejected" +#define PN_IPB_STREAM1_BLOCKS_IN "stream1.blocksIn" +#define PN_IPB_STREAM1_PERC_BAD "stream1.percBad" +#define PN_IPB_STREAM1_REJECTED "stream1.rejected" +#define PN_IPB_STREAM2_BLOCKS_IN "stream2.blocksIn" +#define PN_IPB_STREAM2_PERC_BAD "stream2.percBad" +#define PN_IPB_STREAM2_REJECTED "stream2.rejected" +#define PN_IPB_STREAM3_BLOCKS_IN "stream3.blocksIn" +#define PN_IPB_STREAM3_PERC_BAD "stream3.percBad" +#define PN_IPB_STREAM3_REJECTED "stream3.rejected" +#define PN_IPB_LATE "late" +#define PN_IPB_IO_TIME "IOTime" + +// Adder +#define PSN_ADDER "LOFAR_ObsSW_@osionode@_@adder@" +#define PST_ADDER "Adder" +#define PN_ADD_DROPPING "dropping" +#define PN_ADD_DROPPED "dropped" +#define PN_ADD_DATA_PRODUCT_TYPE "dataProductType" +#define PN_ADD_DATA_PRODUCT "dataProduct" +#define PN_ADD_FILE_NAME "fileName" +#define PN_ADD_LOCUS_NODE "locusNode" +#define PN_ADD_WRITER "writer" +#define PN_ADD_DIRECTORY "directory" +#define PN_ADD_OBSERVATION_NAME "observationName" -// OnlineControl -#define PSN_ONLINE_CONTROL "LOFAR_ObsSW_@observation@_OnlineControl" -#define PST_ONLINE_CONTROL "OnlineControl" +// Writer +#define PSN_WRITER "LOFAR_ObsSW_@oslocusnode@_@writer@" +#define PST_WRITER "Writer" +#define PN_WTR_WRITTEN "written" +#define PN_WTR_DROPPED "dropped" +#define PN_WTR_FILE_NAME "fileName" +#define PN_WTR_DATA_RATE "dataRate" +#define PN_WTR_DATA_PRODUCT_TYPE "dataProductType" +#define PN_WTR_OBSERVATION_NAME "observationName" -// Correlator -#define PSN_CORRELATOR "LOFAR_ObsSW_@observation@_OnlineControl_Correlator" -#define PST_CORRELATOR "Correlator" +// IONode +#define PSN_IO_NODE "LOFAR_PIC_BGP_@midplane@_@ionode@" +#define PST_IO_NODE "IONode" +#define PN_ION_STATION0 "station0" +#define PN_ION_IP0 "IP0" +#define PN_ION_MAC0 "MAC0" +#define PN_ION_STATION1 "station1" +#define PN_ION_IP1 "IP1" +#define PN_ION_MAC1 "MAC1" +#define PN_ION_USE2ND_STATION "use2ndStation" +#define PN_ION_USED_STATION "usedStation" +#define PN_ION_USEDIP "usedIP" +#define PN_ION_USEDMAC "usedMAC" -// StorageAppl -#define PSN_STORAGE_APPL "LOFAR_ObsSW_@observation@_OnlineControl_StorageAppl" -#define PST_STORAGE_APPL "StorageAppl" +// LocusNode +#define PSN_LOCUS_NODE "LOFAR_PIC_@osrack@_@locusnode@" +#define PST_LOCUS_NODE "LocusNode" +#define PN_LCN_FREE "free" +#define PN_LCN_TOTAL "total" +#define PN_LCN_CLAIMED "claimed" + +// CEPHardwareMonitor +#define PSN_CEP_HARDWARE_MONITOR "LOFAR_PermSW_CEPHardwareMonitor" +#define PST_CEP_HARDWARE_MONITOR "CEPHardwareMonitor" +#define PN_CHM_BGP_CONNECTED "BGP.connected" +#define PN_CHM_CLUSTER_CONNECTED "Cluster.connected" // Cabinet #define PSN_CABINET "LOFAR_PIC_@cabinet@" @@ -88,8 +146,8 @@ #define PN_CAB_FRONT_FAN_OUTER "frontFanOuter" #define PN_CAB_FRONT_AIRFLOW "frontAirflow" #define PN_CAB_BACK_DOOR_OPEN "backDoorOpen" -#define PN_CAB_BACKT_FAN_INNER "backtFanInner" -#define PN_CAB_BACKT_FAN_OUTER "backtFanOuter" +#define PN_CAB_BACK_FAN_INNER "backFanInner" +#define PN_CAB_BACK_FAN_OUTER "backFanOuter" #define PN_CAB_BACK_AIRFLOW "backAirflow" #define PN_CAB_TEMP_ALARM "tempAlarm" #define PN_CAB_HUMIDITY_ALARM "humidityAlarm" @@ -135,7 +193,10 @@ #define PN_RSP_VOLTAGE25 "voltage25" #define PN_RSP_VOLTAGE33 "voltage33" #define PN_RSP_VERSION "version" +#define PN_RSP_BITMODE "bitmode" +#define PN_RSP_BITMODE_CAPABILITY "bitmodeCapability" #define PN_RSP_ALERT "alert" +#define PN_RSP_SPLITTER_ON "splitterOn" #define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" #define PN_RSP__ETHERNET_STATUS_CHILD_STATE "Ethernet.status.childState" #define PN_RSP__ETHERNET_STATUS_MESSAGE "Ethernet.status.message" @@ -216,10 +277,15 @@ #define PN_RCU_TRIGGER_FILTER "Trigger.filter" #define PN_RCU_TRIGGER_WINDOW "Trigger.window" #define PN_RCU_TRIGGER_OPERATING_MODE "Trigger.operatingMode" -#define PN_RCU_TRIGGER_COEFF0 "Trigger.coeff0" -#define PN_RCU_TRIGGER_COEFF1 "Trigger.coeff1" -#define PN_RCU_TRIGGER_COEFF2 "Trigger.coeff2" -#define PN_RCU_TRIGGER_COEFF3 "Trigger.coeff3" +#define PN_RCU_TRIGGER_TRIGGER_MODE "Trigger.triggerMode" +#define PN_RCU_TRIGGER_FILTER0_COEFF0 "Trigger.filter0.coeff0" +#define PN_RCU_TRIGGER_FILTER0_COEFF1 "Trigger.filter0.coeff1" +#define PN_RCU_TRIGGER_FILTER0_COEFF2 "Trigger.filter0.coeff2" +#define PN_RCU_TRIGGER_FILTER0_COEFF3 "Trigger.filter0.coeff3" +#define PN_RCU_TRIGGER_FILTER1_COEFF0 "Trigger.filter1.coeff0" +#define PN_RCU_TRIGGER_FILTER1_COEFF1 "Trigger.filter1.coeff1" +#define PN_RCU_TRIGGER_FILTER1_COEFF2 "Trigger.filter1.coeff2" +#define PN_RCU_TRIGGER_FILTER1_COEFF3 "Trigger.filter1.coeff3" // TBBoard #define PSN_TB_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@" @@ -247,6 +313,62 @@ #define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" #define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" +// LBAAntenna +#define PSN_LBA_ANTENNA "LOFAR_PIC_@lbaantenna@" +#define PST_LBA_ANTENNA "LBAAntenna" + +// HBAAntenna +#define PSN_HBA_ANTENNA "LOFAR_PIC_@hbaantenna@" +#define PST_HBA_ANTENNA "HBAAntenna" + +// StationInfo +#define PSN_STATION_INFO "LOFAR_PIC_StationInfo" +#define PST_STATION_INFO "StationInfo" +#define PN_STI_STATIONID "stationID" +#define PN_STI_N_RSP_BOARDS "N_RSPBoards" +#define PN_STI_N_TB_BOARDS "N_TBBoards" +#define PN_STI_N_LBAS "N_LBAS" +#define PN_STI_N_HBAS "N_HBAS" +#define PN_STI_HBA__SPLIT "HBA_Split" +#define PN_STI_WIDE_LBAS "wide_LBAS" +#define PN_STI_POWER48_ON "power48On" +#define PN_STI_POWER220_ON "power220On" +#define PN_STI_CABINET_X "Cabinet.X" +#define PN_STI_CABINET_Y "Cabinet.Y" +#define PN_STI_CABINET_Z "Cabinet.Z" +#define PN_STI_HBA_CENTERX "HBA.centerX" +#define PN_STI_HBA_CENTERY "HBA.centerY" +#define PN_STI_HBA_CENTERZ "HBA.centerZ" +#define PN_STI_HBA_HBA0_CENTERX "HBA.HBA0.centerX" +#define PN_STI_HBA_HBA0_CENTERY "HBA.HBA0.centerY" +#define PN_STI_HBA_HBA0_CENTERZ "HBA.HBA0.centerZ" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_X "HBA.HBA0.NormalVector.X" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Y "HBA.HBA0.NormalVector.Y" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Z "HBA.HBA0.NormalVector.Z" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_X "HBA.HBA0.RotationMatrix.X" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Y "HBA.HBA0.RotationMatrix.Y" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Z "HBA.HBA0.RotationMatrix.Z" +#define PN_STI_HBA_HBA0_ROTATION "HBA.HBA0.rotation" +#define PN_STI_HBA_HBA1_CENTERX "HBA.HBA1.centerX" +#define PN_STI_HBA_HBA1_CENTERY "HBA.HBA1.centerY" +#define PN_STI_HBA_HBA1_CENTERZ "HBA.HBA1.centerZ" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_X "HBA.HBA1.NormalVector.X" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Y "HBA.HBA1.NormalVector.Y" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Z "HBA.HBA1.NormalVector.Z" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_X "HBA.HBA1.RotationMatrix.X" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Y "HBA.HBA1.RotationMatrix.Y" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Z "HBA.HBA1.RotationMatrix.Z" +#define PN_STI_HBA_HBA1_ROTATION "HBA.HBA1.rotation" +#define PN_STI_LBA_CENTERX "LBA.centerX" +#define PN_STI_LBA_CENTERY "LBA.centerY" +#define PN_STI_LBA_CENTERZ "LBA.centerZ" +#define PN_STI_LBA__NORMAL_VECTOR_X "LBA.NormalVector.X" +#define PN_STI_LBA__NORMAL_VECTOR_Y "LBA.NormalVector.Y" +#define PN_STI_LBA__NORMAL_VECTOR_Z "LBA.NormalVector.Z" +#define PN_STI_LBA__ROTATION_MATRIX_X "LBA.RotationMatrix.X" +#define PN_STI_LBA__ROTATION_MATRIX_Y "LBA.RotationMatrix.Y" +#define PN_STI_LBA__ROTATION_MATRIX_Z "LBA.RotationMatrix.Z" + // LogProcessor #define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" #define PST_LOG_PROCESSOR "LogProcessor" @@ -260,10 +382,12 @@ #define PST_HARDWARE_MONITOR "HardwareMonitor" #define PN_HWM_RSP_CONNECTED "RSP.connected" #define PN_HWM_TBB_CONNECTED "TBB.connected" +#define PN_HWM_EC_CONNECTED "EC.connected" // SoftwareMonitor #define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" #define PST_SOFTWARE_MONITOR "SoftwareMonitor" +#define PN_SWM_SW_LEVEL "SWLevel" // SHMInfoServer #define PSN_SHM_INFO_SERVER "LOFAR_PermSW_SHMInfoServer" @@ -280,19 +404,8 @@ #define PN_CLC_CONNECTED "connected" #define PN_CLC_REQUESTED_CLOCK "requestedClock" #define PN_CLC_ACTUAL_CLOCK "actualClock" - -// Antenna -#define PSN_ANTENNA "@antenna@" -#define PST_ANTENNA "Antenna" -#define PN_ANT_STATUS_STATE "status.state" -#define PN_ANT_STATUS_CHILD_STATE "status.childState" -#define PN_ANT_STATUS_MESSAGE "status.message" -#define PN_ANT_STATUS_LEAF "status.leaf" -#define PN_ANT_RCUX "RCUX" -#define PN_ANT_RCUY "RCUY" -#define PN_ANT_DELTAX "deltaX" -#define PN_ANT_DELTAY "deltaY" -#define PN_ANT_DELTAH "deltaH" +#define PN_CLC_REQUESTED_BITMODE "requestedBitmode" +#define PN_CLC_ACTUAL_BITMODE "actualBitmode" // StnObservation #define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" @@ -300,6 +413,9 @@ #define PN_OBS_NAME "name" #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" +#define PN_OBS_RECEIVER_BITMAP "receiverBitmap" +#define PN_OBS_HBA_BITMAP "HBABitmap" +#define PN_OBS_LBA_BITMAP "LBABitmap" // BeamControl #define PSN_BEAM_CONTROL "LOFAR_ObsSW_@observation@_BeamControl" @@ -336,5 +452,6 @@ #define PN_TBC_TRIGGER_PEAK_VALUE "trigger.peakValue" #define PN_TBC_TRIGGER_FLAGS "trigger.flags" #define PN_TBC_TRIGGER_TABLE "trigger.table" +#define PN_TBC_TRIGGER_MISSED "trigger.missed" #endif diff --git a/MAC/APL/StationCU/src/ClockControl/ClockControl.cc b/MAC/APL/StationCU/src/ClockControl/ClockControl.cc index 248b860a697..65423c1a981 100644 --- a/MAC/APL/StationCU/src/ClockControl/ClockControl.cc +++ b/MAC/APL/StationCU/src/ClockControl/ClockControl.cc @@ -49,6 +49,31 @@ namespace LOFAR { using namespace APLCommon; namespace StationCU { + +static string bitmodeVersionString(uint16 version) +{ + switch(version) { + case 0: return "16"; + case 1: return "16/8"; + case 2: return "16/8/4"; + default: return "??"; + } +} + +static bool bitmodeSupported(unsigned bitmode, uint16 version) +{ + if (bitmode == 16) + return true; + + if (bitmode == 8) + return version >= 1; + + if (bitmode == 4) + return version >= 2; + + return false; +} + // static pointer to this object for signal handler static ClockControl* thisClockControl = 0; @@ -63,7 +88,12 @@ ClockControl::ClockControl(const string& cntlrName) : itsTimerPort (0), itsRSPDriver (0), itsCommandPort (0), - itsClock (0) + itsNrRSPs (0), + + // we need default values to push in case the boards are set to 0 + itsClock (200), + itsBitmode (16), + itsBitmodeVersion (0) { LOG_TRACE_OBJ_STR (cntlrName << " construction"); LOG_INFO(Version::getInfo<StationCUVersion>("ClockControl")); @@ -92,6 +122,10 @@ ClockControl::ClockControl(const string& cntlrName) : registerProtocol (DP_PROTOCOL, DP_PROTOCOL_STRINGS); registerProtocol (RSP_PROTOCOL, RSP_PROTOCOL_STRINGS); registerProtocol (CLOCK_PROTOCOL, CLOCK_PROTOCOL_STRINGS); + + StationConfig sc; + + itsNrRSPs = sc.nrRSPs; } @@ -103,6 +137,7 @@ ClockControl::~ClockControl() LOG_TRACE_OBJ_STR (getName() << " destruction"); cancelClockSubscription(); // tell RSPdriver to stop sending updates. + cancelBitmodeSubscription(); // tell RSPdriver to stop sending updates. cancelSplitterSubscription(); // tell RSPdriver to stop sending updates. if (itsCommandPort) { @@ -161,7 +196,7 @@ void ClockControl::_databaseEventHandler(GCFEvent& event) if (strstr(dpEvent.DPname.c_str(), PN_CLC_REQUESTED_CLOCK) != 0) { GCFPVInteger* clockObj = (GCFPVInteger*)dpEvent.value._pValue; - int32 newClock = clockObj->getValue(); + uint32 newClock = clockObj->getValue(); if (newClock != itsClock) { itsClock = newClock; LOG_DEBUG_STR("Received clock change from PVSS, clock is now " << itsClock); @@ -170,6 +205,18 @@ void ClockControl::_databaseEventHandler(GCFEvent& event) } break; } + + if (strstr(dpEvent.DPname.c_str(), PN_CLC_REQUESTED_BITMODE) != 0) { + GCFPVInteger* bitmodeObj = (GCFPVInteger*)dpEvent.value._pValue; + int32 newBitmode = bitmodeObj->getValue(); + if (newBitmode != itsBitmode) { + itsBitmode = newBitmode; + LOG_DEBUG_STR("Received bitmode change from PVSS, bitmode is now " << itsBitmode); + TRAN(ClockControl::setBitmode_state); + // sendBitmodeSetting(); + } + break; + } LOG_WARN_STR("Got VCHANGEMSG signal from unknown property " << dpEvent.DPname); } @@ -240,16 +287,24 @@ GCFEvent::TResult ClockControl::initial_state(GCFEvent& event, case DP_SUBSCRIBED: { DPSubscribedEvent dpEvent(event); string propSetName(createPropertySetName(PSN_CLOCK_CONTROL, getName())); - propSetName += "." PN_CLC_REQUESTED_CLOCK; - if (dpEvent.DPname.find(propSetName) != string::npos) { + + if (dpEvent.DPname.find(propSetName + "." PN_CLC_REQUESTED_CLOCK) != string::npos) { GCFPVInteger clockVal; itsOwnPropertySet->getValue(PN_CLC_REQUESTED_CLOCK, clockVal); itsClock = clockVal.getValue(); LOG_INFO_STR("Requested clock is " << itsClock); + } - LOG_DEBUG ("Going to connect2RSP state"); - TRAN(ClockControl::connect2RSP_state); // go to next state. + if (dpEvent.DPname.find(propSetName + "." PN_CLC_REQUESTED_BITMODE) != string::npos) { + GCFPVInteger bitmodeVal; + itsOwnPropertySet->getValue(PN_CLC_REQUESTED_BITMODE, bitmodeVal); + itsBitmode = bitmodeVal.getValue(); + LOG_INFO_STR("Requested bitmode is " << itsBitmode); } + + LOG_DEBUG ("Going to connect2RSP state"); + TRAN(ClockControl::connect2RSP_state); // go to next state. + break; } break; @@ -325,6 +380,45 @@ GCFEvent::TResult ClockControl::connect2RSP_state(GCFEvent& event, // the stationController is the owner of this value. itsOwnPropertySet->setValue(PN_CLC_REQUESTED_CLOCK,GCFPVInteger(itsClock)); } + + requestBitmodeSetting(); // ask value of bitmode: will result in RSP_GETBITMODEACK + } + break; + + case RSP_GETBITMODEACK: { + RSPGetbitmodeackEvent ack(event); + if (ack.status != RSP_SUCCESS) { + LOG_ERROR ("Bitmode could not be get. Ignoring that for now."); + } + else { + bool success = true; + + for (unsigned i = 0; i < itsNrRSPs; i++) { + if (ack.bits_per_sample[i] != ack.bits_per_sample[0]) { + LOG_ERROR_STR("Mixed bit modes not supported: RSP board " << i << " is in " << ack.bits_per_sample[i] << " bit mode, but board 0 is in " << ack.bits_per_sample[0] << " bit mode"); + success = false; + break; + } + + if (ack.bitmode_version[i] != ack.bitmode_version[0]) { + LOG_ERROR_STR("Mixed bit mode support not supported: RSP board " << i << " supports modes " << bitmodeVersionString(ack.bitmode_version[i]) << ", but board 0 supports modes " << bitmodeVersionString(ack.bitmode_version[0])); + success = false; + break; + } + } + + if (success) { + itsBitmode = ack.bits_per_sample[0]; + itsBitmodeVersion = ack.bitmode_version[0]; + + LOG_INFO_STR("RSP says bitmode is " << itsBitmode << " bits, and supports modes " << bitmodeVersionString(itsBitmodeVersion) << ". Adopting those values."); + itsOwnPropertySet->setValue(PN_CLC_ACTUAL_BITMODE,GCFPVInteger(itsBitmode)); + // Note: only here I am allowed to change the value of the requested bitmode. Normally + // the stationController is the owner of this value. + itsOwnPropertySet->setValue(PN_CLC_REQUESTED_BITMODE,GCFPVInteger(itsBitmode)); + } + } + TRAN(ClockControl::startListener_state); // go to next state. } break; @@ -476,6 +570,8 @@ GCFEvent::TResult ClockControl::subscribeSplitter_state(GCFEvent& event, case CLKCTRL_GET_CLOCK: case CLKCTRL_SET_CLOCK: + case CLKCTRL_GET_BITMODE: + case CLKCTRL_SET_BITMODE: case CLKCTRL_GET_SPLITTERS: case CLKCTRL_SET_SPLITTERS: LOG_INFO_STR("Postponing event " << eventName(event) << " till next state"); @@ -531,7 +627,7 @@ GCFEvent::TResult ClockControl::subscribeClock_state(GCFEvent& event, itsClockSubscription = ack.handle; LOG_INFO("Subscription on the clock successful. going to operational mode"); itsOwnPropertySet->setValue(PN_CLC_ACTUAL_CLOCK,GCFPVInteger(itsClock)); - TRAN(ClockControl::active_state); // go to next state. + TRAN(ClockControl::subscribeBitmode_state); // go to next state. } break; @@ -541,6 +637,8 @@ GCFEvent::TResult ClockControl::subscribeClock_state(GCFEvent& event, case CLKCTRL_GET_CLOCK: case CLKCTRL_SET_CLOCK: + case CLKCTRL_GET_BITMODE: + case CLKCTRL_SET_BITMODE: case CLKCTRL_GET_SPLITTERS: case CLKCTRL_SET_SPLITTERS: case RSP_UPDSPLITTER: @@ -606,6 +704,8 @@ GCFEvent::TResult ClockControl::setClock_state(GCFEvent& event, case CLKCTRL_GET_CLOCK: case CLKCTRL_SET_CLOCK: + case CLKCTRL_GET_BITMODE: + case CLKCTRL_SET_BITMODE: case CLKCTRL_GET_SPLITTERS: case CLKCTRL_SET_SPLITTERS: case RSP_UPDCLOCK: @@ -621,6 +721,142 @@ GCFEvent::TResult ClockControl::setClock_state(GCFEvent& event, return (status); } +// +// subscribeBitmode_state(event, port) +// +// Take subscription on bitmode modifications +// +GCFEvent::TResult ClockControl::subscribeBitmode_state(GCFEvent& event, + GCFPortInterface& port) +{ + LOG_DEBUG_STR ("subscribeBitmode:" << eventName(event) << "@" << port.getName()); + + GCFEvent::TResult status = GCFEvent::HANDLED; + + switch (event.signal) { + case F_EXIT: + break; + + case F_ENTRY: + case F_TIMER: + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("Subscribe to bitmode")); + requestBitmodeSubscription(); // will result in RSP_SUBBITMODEACK; + break; + + case F_DISCONNECTED: + _disconnectedHandler(port); // might result in transition to connect_state + break; + + case F_ACCEPT_REQ: + _acceptRequestHandler(port); + break; + + case RSP_SUBBITMODEACK: { + RSPSubbitmodeackEvent ack(event); + if (ack.status != RSP_SUCCESS) { + LOG_WARN ("Could not get subscription on bitmode, retry in 2 seconds."); + itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("subscribe failed")); + itsTimerPort->setTimer(2.0); + break; + } + itsBitmodeSubscription = ack.handle; + LOG_INFO("Subscription on the bitmode successful. going to operational mode"); + itsOwnPropertySet->setValue(PN_CLC_ACTUAL_BITMODE,GCFPVInteger(itsBitmode)); + TRAN(ClockControl::active_state); // go to next state. + } + break; + + case DP_CHANGED: + _databaseEventHandler(event); + break; + + case CLKCTRL_GET_CLOCK: + case CLKCTRL_SET_CLOCK: + case CLKCTRL_GET_BITMODE: + case CLKCTRL_SET_BITMODE: + case CLKCTRL_GET_SPLITTERS: + case CLKCTRL_SET_SPLITTERS: + case RSP_UPDSPLITTER: + case RSP_UPDBITMODE: + LOG_INFO_STR("Postponing event " << eventName(event) << " till next state"); + return (GCFEvent::NEXT_STATE); + + default: + LOG_DEBUG_STR ("subscribeBitmode, default"); + status = defaultMessageHandling(event, port); + break; + } + + return (status); +} + + +// +// setBitmode_state(event, port) +// +// Set samplebitmode from RSP driver +// +GCFEvent::TResult ClockControl::setBitmode_state(GCFEvent& event, + GCFPortInterface& port) +{ + LOG_DEBUG_STR ("setBitmode:" << eventName(event) << "@" << port.getName()); + + GCFEvent::TResult status = GCFEvent::HANDLED; + + switch (event.signal) { + case F_ENTRY: + case F_TIMER: + itsOwnPropertySet->setValue(PN_FSM_CURRENT_ACTION,GCFPVString("Set bitmode")); + sendBitmodeSetting(); // will result in RSP_SETBITMODEACK; + break; + + case F_DISCONNECTED: + _disconnectedHandler(port); // might result in transition to connect_state + break; + + case F_ACCEPT_REQ: + _acceptRequestHandler(port); + break; + + case RSP_SETBITMODEACK: { + RSPSetbitmodeackEvent ack(event); + if (ack.status != RSP_SUCCESS) { + LOG_ERROR_STR ("Bitmode could not be set to " << itsBitmode << ", retry in 5 seconds."); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("bitmodeset error")); + itsTimerPort->setTimer(5.0); + break; + } + LOG_INFO_STR ("StationBitmode is set to " << itsBitmode << ", going to operational state"); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); + itsOwnPropertySet->setValue(PN_CLC_ACTUAL_BITMODE,GCFPVInteger(itsBitmode)); + TRAN(ClockControl::active_state); // go to next state. + break; + } + + case DP_CHANGED: + _databaseEventHandler(event); + break; + + case CLKCTRL_GET_CLOCK: + case CLKCTRL_SET_CLOCK: + case CLKCTRL_GET_BITMODE: + case CLKCTRL_SET_BITMODE: + case CLKCTRL_GET_SPLITTERS: + case CLKCTRL_SET_SPLITTERS: + case RSP_UPDBITMODE: + case RSP_UPDSPLITTER: + LOG_INFO_STR("Postponing event " << eventName(event) << " till next state"); + return (GCFEvent::NEXT_STATE); + + default: + LOG_DEBUG_STR ("setBitmode, default"); + status = defaultMessageHandling(event, port); + break; + } + + return (status); +} + // @@ -667,8 +903,7 @@ GCFEvent::TResult ClockControl::setSplitters_state(GCFEvent& event, // update our admin itsSplitters.reset(); if (itsSplitterRequest) { - StationConfig sc; - for (int i = 0; i < sc.nrRSPs; i++) { + for (unsigned i = 0; i < itsNrRSPs; i++) { itsSplitters.set(i); } } @@ -682,6 +917,8 @@ GCFEvent::TResult ClockControl::setSplitters_state(GCFEvent& event, case CLKCTRL_GET_CLOCK: case CLKCTRL_SET_CLOCK: + case CLKCTRL_GET_BITMODE: + case CLKCTRL_SET_BITMODE: case CLKCTRL_GET_SPLITTERS: case CLKCTRL_SET_SPLITTERS: case RSP_UPDCLOCK: @@ -750,7 +987,7 @@ GCFEvent::TResult ClockControl::active_state(GCFEvent& event, GCFPortInterface& break; } - if ((int32) updateEvent.clock != itsClock) { + if (updateEvent.clock != itsClock) { LOG_ERROR_STR ("CLOCK WAS CHANGED TO " << updateEvent.clock << " BY SOMEONE WHILE CLOCK SHOULD BE " << itsClock << ". CHANGING CLOCK BACK."); itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("Clock unallowed changed")); @@ -763,6 +1000,63 @@ GCFEvent::TResult ClockControl::active_state(GCFEvent& event, GCFPortInterface& } break; + case RSP_UPDBITMODE: { + RSPUpdbitmodeEvent updateEvent(event); + + // was the update even succesful? + if (updateEvent.status != RSP_SUCCESS) { + LOG_WARN ("Received an INVALID bitmode update, WHAT IS THE BITMODE?"); + itsOwnPropertySet->setValue(PN_FSM_ERROR, GCFPVString("getbitmode failed")); + break; + } + + bool retry = false; + for (unsigned i = 0; i < itsNrRSPs; i++) { + // 0 bits indicates the bit mode could not be set + if (updateEvent.bits_per_sample[i] == 0) { + LOG_ERROR_STR ("StationBitmode has stopped on board " << i << " (and possibly others)! Going to setBitmode state to try to solve the problem"); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("Bitmode stopped")); + + retry = true; + break; + } + + // we don't allow a mix of bit modes from the boards + if (updateEvent.bits_per_sample[i] != updateEvent.bits_per_sample[0]) { + LOG_ERROR_STR("Mixed bit modes not supported: RSP board " << i << " is in " << updateEvent.bits_per_sample[i] << " bit mode, but board 0 is in " << updateEvent.bits_per_sample[0] << " bit mode, going to setBitmode state to try to solve the problem"); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("boards report mixed bit modes")); + + retry = true; + break; + } + } + + if (retry) { + TRAN(ClockControl::setBitmode_state); + break; + } + + // because we don't allow mixed bit modes, we can simply use the first one + uint16 bitmode = updateEvent.bits_per_sample[0]; + + if (itsBitmode == 0) { // my bitmode still uninitialized? + LOG_INFO_STR("My bitmode is still not initialized. StationBitmode is " << bitmode << " adopting this value"); + itsBitmode = bitmode; + break; + } else if (bitmode != itsBitmode) { + LOG_ERROR_STR ("BITMODE WAS CHANGED TO " << bitmode << + " BY SOMEONE WHILE BITMODE SHOULD BE " << itsBitmode << ". CHANGING BITMODE BACK."); + itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("Bitmode unallowed changed")); + + TRAN (ClockControl::setBitmode_state); + break; + } else { + // when update.bits_per_sample==itsBitmode ignore it, we probable caused it ourselves. + LOG_DEBUG_STR("Event.bits_per_sample[0..n] = " << bitmode << ", myBitmode = " << itsBitmode); + } + } + break; + case RSP_UPDSPLITTER: { RSPUpdsplitterEvent update(event); itsOwnPropertySet->setValue(PN_FSM_ERROR,GCFPVString("")); @@ -793,17 +1087,59 @@ GCFEvent::TResult ClockControl::active_state(GCFEvent& event, GCFPortInterface& case CLKCTRL_SET_CLOCK: { CLKCTRLSetClockEvent request(event); CLKCTRLSetClockAckEvent response; + if (request.clock != 160 && request.clock != 200) { - LOG_DEBUG_STR("Received request to change the clock to invalid value " << request.clock); + LOG_ERROR_STR("Received request to change the clock to invalid value " << request.clock); response.status = CLKCTRL_CLOCKFREQ_ERR; - port.send(response); - break; - } - response.status = CLKCTRL_NO_ERR; - LOG_INFO_STR("Received request to change the clock to " << request.clock << " MHz."); - itsOwnPropertySet->setValue(PN_CLC_REQUESTED_CLOCK,GCFPVInteger(request.clock)); - itsClock = request.clock; - TRAN(ClockControl::setClock_state); + } else { + LOG_INFO_STR("Received request to change the clock to " << request.clock << " MHz."); + response.status = CLKCTRL_NO_ERR; + + itsOwnPropertySet->setValue(PN_CLC_REQUESTED_CLOCK,GCFPVInteger(request.clock)); + + if (itsClock == request.clock) { + LOG_INFO_STR("Clock was already set to " << itsClock << "."); + } else { + itsClock = request.clock; + TRAN(ClockControl::setClock_state); + } + } + + port.send(response); + } + break; + + case CLKCTRL_GET_BITMODE: { + CLKCTRLGetBitmodeAckEvent answer; + answer.bits_per_sample = itsBitmode; + port.send(answer); + } + break; + + case CLKCTRL_SET_BITMODE: { + CLKCTRLSetBitmodeEvent request(event); + CLKCTRLSetBitmodeAckEvent response; + + if (request.bits_per_sample != 16 && request.bits_per_sample != 8 && request.bits_per_sample != 4) { + LOG_ERROR_STR("Received request to change the bitmode to invalid value " << request.bits_per_sample); + response.status = CLKCTRL_INVALIDBITMODE_ERR; + } else if (!bitmodeSupported(request.bits_per_sample, itsBitmodeVersion)) { + LOG_ERROR_STR("Received request to change the bitmode to unsupported value " << request.bits_per_sample << " (supported is " << bitmodeVersionString(itsBitmodeVersion) << ")"); + response.status = CLKCTRL_INVALIDBITMODE_ERR; + } else { + LOG_INFO_STR("Received request to change the bitmode to " << request.bits_per_sample << " bit."); + response.status = CLKCTRL_NO_ERR; + + itsOwnPropertySet->setValue(PN_CLC_REQUESTED_BITMODE,GCFPVInteger(request.bits_per_sample)); + + if (itsBitmode == request.bits_per_sample) { + LOG_INFO_STR("Bitmode was already set to " << itsBitmode << "."); + } else { + itsBitmode = request.bits_per_sample; + TRAN(ClockControl::setBitmode_state); + } + } + port.send(response); } break; @@ -820,6 +1156,7 @@ GCFEvent::TResult ClockControl::active_state(GCFEvent& event, GCFPortInterface& LOG_INFO_STR("Received request to switch the splitters " << (request.splittersOn ? "ON" : "OFF")); itsSplitterRequest = request.splittersOn; TRAN (ClockControl::setSplitters_state); + CLKCTRLSetSplittersAckEvent response; response.status = CLKCTRL_NO_ERR; port.send(response); @@ -921,6 +1258,67 @@ void ClockControl::sendClockSetting() itsRSPDriver->send(msg); } + +// +// requestBitmodeSubscription() +// +void ClockControl::requestBitmodeSubscription() +{ + LOG_INFO ("Taking subscription on bitmode settings"); + + RSPSubbitmodeEvent msg; +// msg.timestamp = 0; + msg.period = 1; // let RSPdriver check every second + itsRSPDriver->send(msg); +} + +// +// cancelBitmodeSubscription() +// +void ClockControl::cancelBitmodeSubscription() +{ + LOG_INFO ("Canceling subscription on bitmode settings"); + + RSPUnsubbitmodeEvent msg; + msg.handle = itsBitmodeSubscription; + itsBitmodeSubscription = 0; + itsRSPDriver->send(msg); +} + +// +// requestBitmodeSetting() +// +void ClockControl::requestBitmodeSetting() +{ + LOG_INFO ("Asking RSPdriver current bitmode setting"); + + RSPGetbitmodeEvent msg; + msg.timestamp = RTC::Timestamp(0,0); + msg.cache = 1; + itsRSPDriver->send(msg); +} + + +// +// sendBitmodeSetting() +// +void ClockControl::sendBitmodeSetting() +{ + LOG_INFO_STR ("Setting stationBitmode to " << itsBitmode << " bit"); + + RSPSetbitmodeEvent msg; + bitset<MAX_N_RSPBOARDS> mask; + + // select all RSP boards + for (unsigned i = 0; i < itsNrRSPs; i++) + mask.set(i); + + msg.timestamp = RTC::Timestamp(0,0); + msg.rspmask = mask; + msg.bits_per_sample = itsBitmode; + itsRSPDriver->send(msg); +} + // // requestSplitterSubscription() // diff --git a/MAC/APL/StationCU/src/ClockControl/ClockControl.h b/MAC/APL/StationCU/src/ClockControl/ClockControl.h index 05da958f69d..7ea9e075bf0 100644 --- a/MAC/APL/StationCU/src/ClockControl/ClockControl.h +++ b/MAC/APL/StationCU/src/ClockControl/ClockControl.h @@ -73,10 +73,12 @@ private: GCFEvent::TResult connect2RSP_state (GCFEvent& e, GCFPortInterface& p); GCFEvent::TResult startListener_state (GCFEvent& e, GCFPortInterface& p); GCFEvent::TResult subscribeClock_state (GCFEvent& e, GCFPortInterface& p); + GCFEvent::TResult subscribeBitmode_state (GCFEvent& e, GCFPortInterface& p); GCFEvent::TResult subscribeSplitter_state (GCFEvent& e, GCFPortInterface& p); GCFEvent::TResult active_state (GCFEvent& e, GCFPortInterface& p); GCFEvent::TResult defaultMessageHandling (GCFEvent& e, GCFPortInterface& p); GCFEvent::TResult setClock_state (GCFEvent& e, GCFPortInterface& p); + GCFEvent::TResult setBitmode_state (GCFEvent& e, GCFPortInterface& p); GCFEvent::TResult setSplitters_state (GCFEvent& e, GCFPortInterface& p); GCFEvent::TResult finishing_state (GCFEvent& e, GCFPortInterface& p); @@ -92,6 +94,10 @@ private: void cancelClockSubscription(); void requestClockSetting(); void sendClockSetting(); + void requestBitmodeSubscription(); + void cancelBitmodeSubscription(); + void requestBitmodeSetting(); + void sendBitmodeSetting(); void requestSplitterSubscription(); void cancelSplitterSubscription(); void requestSplitterSetting(); @@ -117,8 +123,14 @@ private: uint32 itsInstanceNr; time_t itsStartTime; // timestamp the controller was started + unsigned itsNrRSPs; + void* itsClockSubscription; - int32 itsClock; + uint32 itsClock; // 200 or 160 + + void* itsBitmodeSubscription; + uint16 itsBitmode; // 16 or 8 or 4 + uint16 itsBitmodeVersion; // supported bitmode: 0 = 16, 1 = 16/8, 2 = 16/8/4 bool itsSplitterRequest; bitset<MAX_RSPBOARDS> itsSplitters; diff --git a/MAC/APL/StationCU/src/ClockControl/PVSSDatapointDefs.h b/MAC/APL/StationCU/src/ClockControl/PVSSDatapointDefs.h index 3ddc45b8e81..9f83a52dda5 100644 --- a/MAC/APL/StationCU/src/ClockControl/PVSSDatapointDefs.h +++ b/MAC/APL/StationCU/src/ClockControl/PVSSDatapointDefs.h @@ -1,4 +1,4 @@ -// This file was generated by create_db_files v1.0 on Wed Feb 4 15:00:05 UTC 2009 +// This file was generated by create_db_files v2.0 on Tue Oct 9 13:22:37 UTC 2012 #ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H #define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H @@ -15,18 +15,6 @@ #define PN_OBJ_MESSAGE "object.message" #define PN_OBJ_LEAF "object.leaf" -// Station -#define PSN_STATION "LOFAR_PIC_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - -// Station -#define PSN_STATION "LOFAR_PermSW_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - // MACScheduler #define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" #define PST_MAC_SCHEDULER "MACScheduler" @@ -37,12 +25,15 @@ #define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" #define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" +// CRTriggerControl +#define PSN_CR_TRIGGER_CONTROL "LOFAR_PermSW_CRTriggerControl" +#define PST_CR_TRIGGER_CONTROL "CRTriggerControl" + // Observation #define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" #define PST_OBSERVATION "Observation" #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" -#define PN_OBS_RECEIVER_BITMAP "receiverBitmap" #define PN_OBS_CLAIM_PERIOD "claimPeriod" #define PN_OBS_PREPARE_PERIOD "preparePeriod" #define PN_OBS_START_TIME "startTime" @@ -54,6 +45,9 @@ #define PN_OBS_SAMPLE_CLOCK "sampleClock" #define PN_OBS_RUN_STATE "runState" #define PN_OBS_MEASUREMENT_SET "measurementSet" +#define PN_OBS_PROCESS_TYPE "processType" +#define PN_OBS_PROCESS_SUBTYPE "processSubtype" +#define PN_OBS_STRATEGY "strategy" #define PN_OBS_STATION_LIST "stationList" #define PN_OBS_INPUT_NODE_LIST "inputNodeList" #define PN_OBS_BGL_NODE_LIST "BGLNodeList" @@ -61,24 +55,88 @@ #define PN_OBS_BEAMS_ANGLE1 "Beams.angle1" #define PN_OBS_BEAMS_ANGLE2 "Beams.angle2" #define PN_OBS_BEAMS_DIRECTION_TYPE "Beams.directionType" -#define PN_OBS_BEAMS_BEAMLET_LIST "Beams.beamletList" #define PN_OBS_BEAMS_SUBBAND_LIST "Beams.subbandList" +#define PN_OBS_TIED_ARRAY_BEAMS_BEAM_INDEX "TiedArrayBeams.beamIndex" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE1 "TiedArrayBeams.angle1" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE2 "TiedArrayBeams.angle2" +#define PN_OBS_TIED_ARRAY_BEAMS_DIRECTION_TYPE "TiedArrayBeams.directionType" +#define PN_OBS_TIED_ARRAY_BEAMS_DISPERSION "TiedArrayBeams.dispersion" +#define PN_OBS_TIED_ARRAY_BEAMS_COHERENT "TiedArrayBeams.coherent" // ObservationControl #define PSN_OBSERVATION_CONTROL "LOFAR_ObsSW_@observation@_ObservationControl" #define PST_OBSERVATION_CONTROL "ObservationControl" +#define PN_OBSCTRL_COMMAND "command" + +// InputBuffer +#define PSN_INPUT_BUFFER "LOFAR_PermSW_@psionode@_InputBuffer" +#define PST_INPUT_BUFFER "InputBuffer" +#define PN_IPB_STATION_NAME "stationName" +#define PN_IPB_OBSERVATION_NAME "observationName" +#define PN_IPB_STREAM0_BLOCKS_IN "stream0.blocksIn" +#define PN_IPB_STREAM0_PERC_BAD "stream0.percBad" +#define PN_IPB_STREAM0_REJECTED "stream0.rejected" +#define PN_IPB_STREAM1_BLOCKS_IN "stream1.blocksIn" +#define PN_IPB_STREAM1_PERC_BAD "stream1.percBad" +#define PN_IPB_STREAM1_REJECTED "stream1.rejected" +#define PN_IPB_STREAM2_BLOCKS_IN "stream2.blocksIn" +#define PN_IPB_STREAM2_PERC_BAD "stream2.percBad" +#define PN_IPB_STREAM2_REJECTED "stream2.rejected" +#define PN_IPB_STREAM3_BLOCKS_IN "stream3.blocksIn" +#define PN_IPB_STREAM3_PERC_BAD "stream3.percBad" +#define PN_IPB_STREAM3_REJECTED "stream3.rejected" +#define PN_IPB_LATE "late" +#define PN_IPB_IO_TIME "IOTime" + +// Adder +#define PSN_ADDER "LOFAR_ObsSW_@osionode@_@adder@" +#define PST_ADDER "Adder" +#define PN_ADD_DROPPING "dropping" +#define PN_ADD_DROPPED "dropped" +#define PN_ADD_DATA_PRODUCT_TYPE "dataProductType" +#define PN_ADD_DATA_PRODUCT "dataProduct" +#define PN_ADD_FILE_NAME "fileName" +#define PN_ADD_LOCUS_NODE "locusNode" +#define PN_ADD_WRITER "writer" +#define PN_ADD_DIRECTORY "directory" +#define PN_ADD_OBSERVATION_NAME "observationName" -// OnlineControl -#define PSN_ONLINE_CONTROL "LOFAR_ObsSW_@observation@_OnlineControl" -#define PST_ONLINE_CONTROL "OnlineControl" +// Writer +#define PSN_WRITER "LOFAR_ObsSW_@oslocusnode@_@writer@" +#define PST_WRITER "Writer" +#define PN_WTR_WRITTEN "written" +#define PN_WTR_DROPPED "dropped" +#define PN_WTR_FILE_NAME "fileName" +#define PN_WTR_DATA_RATE "dataRate" +#define PN_WTR_DATA_PRODUCT_TYPE "dataProductType" +#define PN_WTR_OBSERVATION_NAME "observationName" -// Correlator -#define PSN_CORRELATOR "LOFAR_ObsSW_@observation@_OnlineControl_Correlator" -#define PST_CORRELATOR "Correlator" +// IONode +#define PSN_IO_NODE "LOFAR_PIC_BGP_@midplane@_@ionode@" +#define PST_IO_NODE "IONode" +#define PN_ION_STATION0 "station0" +#define PN_ION_IP0 "IP0" +#define PN_ION_MAC0 "MAC0" +#define PN_ION_STATION1 "station1" +#define PN_ION_IP1 "IP1" +#define PN_ION_MAC1 "MAC1" +#define PN_ION_USE2ND_STATION "use2ndStation" +#define PN_ION_USED_STATION "usedStation" +#define PN_ION_USEDIP "usedIP" +#define PN_ION_USEDMAC "usedMAC" -// StorageAppl -#define PSN_STORAGE_APPL "LOFAR_ObsSW_@observation@_OnlineControl_StorageAppl" -#define PST_STORAGE_APPL "StorageAppl" +// LocusNode +#define PSN_LOCUS_NODE "LOFAR_PIC_@osrack@_@locusnode@" +#define PST_LOCUS_NODE "LocusNode" +#define PN_LCN_FREE "free" +#define PN_LCN_TOTAL "total" +#define PN_LCN_CLAIMED "claimed" + +// CEPHardwareMonitor +#define PSN_CEP_HARDWARE_MONITOR "LOFAR_PermSW_CEPHardwareMonitor" +#define PST_CEP_HARDWARE_MONITOR "CEPHardwareMonitor" +#define PN_CHM_BGP_CONNECTED "BGP.connected" +#define PN_CHM_CLUSTER_CONNECTED "Cluster.connected" // Cabinet #define PSN_CABINET "LOFAR_PIC_@cabinet@" @@ -88,8 +146,8 @@ #define PN_CAB_FRONT_FAN_OUTER "frontFanOuter" #define PN_CAB_FRONT_AIRFLOW "frontAirflow" #define PN_CAB_BACK_DOOR_OPEN "backDoorOpen" -#define PN_CAB_BACKT_FAN_INNER "backtFanInner" -#define PN_CAB_BACKT_FAN_OUTER "backtFanOuter" +#define PN_CAB_BACK_FAN_INNER "backFanInner" +#define PN_CAB_BACK_FAN_OUTER "backFanOuter" #define PN_CAB_BACK_AIRFLOW "backAirflow" #define PN_CAB_TEMP_ALARM "tempAlarm" #define PN_CAB_HUMIDITY_ALARM "humidityAlarm" @@ -135,7 +193,10 @@ #define PN_RSP_VOLTAGE25 "voltage25" #define PN_RSP_VOLTAGE33 "voltage33" #define PN_RSP_VERSION "version" +#define PN_RSP_BITMODE "bitmode" +#define PN_RSP_BITMODE_CAPABILITY "bitmodeCapability" #define PN_RSP_ALERT "alert" +#define PN_RSP_SPLITTER_ON "splitterOn" #define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" #define PN_RSP__ETHERNET_STATUS_CHILD_STATE "Ethernet.status.childState" #define PN_RSP__ETHERNET_STATUS_MESSAGE "Ethernet.status.message" @@ -216,10 +277,15 @@ #define PN_RCU_TRIGGER_FILTER "Trigger.filter" #define PN_RCU_TRIGGER_WINDOW "Trigger.window" #define PN_RCU_TRIGGER_OPERATING_MODE "Trigger.operatingMode" -#define PN_RCU_TRIGGER_COEFF0 "Trigger.coeff0" -#define PN_RCU_TRIGGER_COEFF1 "Trigger.coeff1" -#define PN_RCU_TRIGGER_COEFF2 "Trigger.coeff2" -#define PN_RCU_TRIGGER_COEFF3 "Trigger.coeff3" +#define PN_RCU_TRIGGER_TRIGGER_MODE "Trigger.triggerMode" +#define PN_RCU_TRIGGER_FILTER0_COEFF0 "Trigger.filter0.coeff0" +#define PN_RCU_TRIGGER_FILTER0_COEFF1 "Trigger.filter0.coeff1" +#define PN_RCU_TRIGGER_FILTER0_COEFF2 "Trigger.filter0.coeff2" +#define PN_RCU_TRIGGER_FILTER0_COEFF3 "Trigger.filter0.coeff3" +#define PN_RCU_TRIGGER_FILTER1_COEFF0 "Trigger.filter1.coeff0" +#define PN_RCU_TRIGGER_FILTER1_COEFF1 "Trigger.filter1.coeff1" +#define PN_RCU_TRIGGER_FILTER1_COEFF2 "Trigger.filter1.coeff2" +#define PN_RCU_TRIGGER_FILTER1_COEFF3 "Trigger.filter1.coeff3" // TBBoard #define PSN_TB_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@" @@ -247,6 +313,62 @@ #define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" #define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" +// LBAAntenna +#define PSN_LBA_ANTENNA "LOFAR_PIC_@lbaantenna@" +#define PST_LBA_ANTENNA "LBAAntenna" + +// HBAAntenna +#define PSN_HBA_ANTENNA "LOFAR_PIC_@hbaantenna@" +#define PST_HBA_ANTENNA "HBAAntenna" + +// StationInfo +#define PSN_STATION_INFO "LOFAR_PIC_StationInfo" +#define PST_STATION_INFO "StationInfo" +#define PN_STI_STATIONID "stationID" +#define PN_STI_N_RSP_BOARDS "N_RSPBoards" +#define PN_STI_N_TB_BOARDS "N_TBBoards" +#define PN_STI_N_LBAS "N_LBAS" +#define PN_STI_N_HBAS "N_HBAS" +#define PN_STI_HBA__SPLIT "HBA_Split" +#define PN_STI_WIDE_LBAS "wide_LBAS" +#define PN_STI_POWER48_ON "power48On" +#define PN_STI_POWER220_ON "power220On" +#define PN_STI_CABINET_X "Cabinet.X" +#define PN_STI_CABINET_Y "Cabinet.Y" +#define PN_STI_CABINET_Z "Cabinet.Z" +#define PN_STI_HBA_CENTERX "HBA.centerX" +#define PN_STI_HBA_CENTERY "HBA.centerY" +#define PN_STI_HBA_CENTERZ "HBA.centerZ" +#define PN_STI_HBA_HBA0_CENTERX "HBA.HBA0.centerX" +#define PN_STI_HBA_HBA0_CENTERY "HBA.HBA0.centerY" +#define PN_STI_HBA_HBA0_CENTERZ "HBA.HBA0.centerZ" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_X "HBA.HBA0.NormalVector.X" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Y "HBA.HBA0.NormalVector.Y" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Z "HBA.HBA0.NormalVector.Z" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_X "HBA.HBA0.RotationMatrix.X" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Y "HBA.HBA0.RotationMatrix.Y" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Z "HBA.HBA0.RotationMatrix.Z" +#define PN_STI_HBA_HBA0_ROTATION "HBA.HBA0.rotation" +#define PN_STI_HBA_HBA1_CENTERX "HBA.HBA1.centerX" +#define PN_STI_HBA_HBA1_CENTERY "HBA.HBA1.centerY" +#define PN_STI_HBA_HBA1_CENTERZ "HBA.HBA1.centerZ" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_X "HBA.HBA1.NormalVector.X" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Y "HBA.HBA1.NormalVector.Y" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Z "HBA.HBA1.NormalVector.Z" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_X "HBA.HBA1.RotationMatrix.X" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Y "HBA.HBA1.RotationMatrix.Y" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Z "HBA.HBA1.RotationMatrix.Z" +#define PN_STI_HBA_HBA1_ROTATION "HBA.HBA1.rotation" +#define PN_STI_LBA_CENTERX "LBA.centerX" +#define PN_STI_LBA_CENTERY "LBA.centerY" +#define PN_STI_LBA_CENTERZ "LBA.centerZ" +#define PN_STI_LBA__NORMAL_VECTOR_X "LBA.NormalVector.X" +#define PN_STI_LBA__NORMAL_VECTOR_Y "LBA.NormalVector.Y" +#define PN_STI_LBA__NORMAL_VECTOR_Z "LBA.NormalVector.Z" +#define PN_STI_LBA__ROTATION_MATRIX_X "LBA.RotationMatrix.X" +#define PN_STI_LBA__ROTATION_MATRIX_Y "LBA.RotationMatrix.Y" +#define PN_STI_LBA__ROTATION_MATRIX_Z "LBA.RotationMatrix.Z" + // LogProcessor #define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" #define PST_LOG_PROCESSOR "LogProcessor" @@ -260,10 +382,12 @@ #define PST_HARDWARE_MONITOR "HardwareMonitor" #define PN_HWM_RSP_CONNECTED "RSP.connected" #define PN_HWM_TBB_CONNECTED "TBB.connected" +#define PN_HWM_EC_CONNECTED "EC.connected" // SoftwareMonitor #define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" #define PST_SOFTWARE_MONITOR "SoftwareMonitor" +#define PN_SWM_SW_LEVEL "SWLevel" // SHMInfoServer #define PSN_SHM_INFO_SERVER "LOFAR_PermSW_SHMInfoServer" @@ -280,19 +404,8 @@ #define PN_CLC_CONNECTED "connected" #define PN_CLC_REQUESTED_CLOCK "requestedClock" #define PN_CLC_ACTUAL_CLOCK "actualClock" - -// Antenna -#define PSN_ANTENNA "@antenna@" -#define PST_ANTENNA "Antenna" -#define PN_ANT_STATUS_STATE "status.state" -#define PN_ANT_STATUS_CHILD_STATE "status.childState" -#define PN_ANT_STATUS_MESSAGE "status.message" -#define PN_ANT_STATUS_LEAF "status.leaf" -#define PN_ANT_RCUX "RCUX" -#define PN_ANT_RCUY "RCUY" -#define PN_ANT_DELTAX "deltaX" -#define PN_ANT_DELTAY "deltaY" -#define PN_ANT_DELTAH "deltaH" +#define PN_CLC_REQUESTED_BITMODE "requestedBitmode" +#define PN_CLC_ACTUAL_BITMODE "actualBitmode" // StnObservation #define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" @@ -300,6 +413,9 @@ #define PN_OBS_NAME "name" #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" +#define PN_OBS_RECEIVER_BITMAP "receiverBitmap" +#define PN_OBS_HBA_BITMAP "HBABitmap" +#define PN_OBS_LBA_BITMAP "LBABitmap" // BeamControl #define PSN_BEAM_CONTROL "LOFAR_ObsSW_@observation@_BeamControl" @@ -336,5 +452,6 @@ #define PN_TBC_TRIGGER_PEAK_VALUE "trigger.peakValue" #define PN_TBC_TRIGGER_FLAGS "trigger.flags" #define PN_TBC_TRIGGER_TABLE "trigger.table" +#define PN_TBC_TRIGGER_MISSED "trigger.missed" #endif diff --git a/MAC/APL/StationCU/src/ClockControl/clkctl.cc b/MAC/APL/StationCU/src/ClockControl/clkctl.cc index 8b01db1c409..a325cf7c1f7 100644 --- a/MAC/APL/StationCU/src/ClockControl/clkctl.cc +++ b/MAC/APL/StationCU/src/ClockControl/clkctl.cc @@ -72,7 +72,7 @@ GCFEvent::TResult ClkCtl::doCommand(GCFEvent& event, GCFPortInterface& port) case CLKCTRL_GET_CLOCK_ACK: { CLKCTRLGetClockAckEvent ack(event); - cout << "Clock is set to " << ack.clock << "MHz" << endl; + cout << "Clock is set to " << ack.clock << " MHz" << endl; GCFScheduler::instance()->stop(); } break; @@ -83,6 +83,20 @@ GCFEvent::TResult ClkCtl::doCommand(GCFEvent& event, GCFPortInterface& port) GCFScheduler::instance()->stop(); } break; + + case CLKCTRL_GET_BITMODE_ACK: { + CLKCTRLGetBitmodeAckEvent ack(event); + cout << "Bitmode is set to " << ack.bits_per_sample << " bit" << endl; + GCFScheduler::instance()->stop(); + } + break; + + case CLKCTRL_SET_BITMODE_ACK: { + CLKCTRLSetBitmodeAckEvent ack(event); + cout << "Setting the bitmode was " << ((ack.status == CLKCTRL_NO_ERR) ? "" : "NOT ") << "succesful" << endl; + GCFScheduler::instance()->stop(); + } + break; case CLKCTRL_GET_SPLITTERS_ACK: { CLKCTRLGetSplittersAckEvent ack(event); @@ -109,6 +123,8 @@ GCFEvent* ClkCtl::parseOptions(int argc, char** argv) static struct option long_options[] = { { "getclock", no_argument, 0, 'c' }, { "setclock", required_argument, 0, 'C' }, + { "getbitmode", no_argument, 0, 'b' }, + { "setbitmode", required_argument, 0, 'B' }, { "getsplitters", no_argument, 0, 's' }, { "setsplitters", required_argument, 0, 'S' }, { "help", no_argument, 0, 'h' }, @@ -117,7 +133,7 @@ GCFEvent* ClkCtl::parseOptions(int argc, char** argv) optind = 0; int option_index = 0; - int c = getopt_long(argc, argv, "cC:sS:h", long_options, &option_index); + int c = getopt_long(argc, argv, "cC:bB:sS:h", long_options, &option_index); if (c == -1) { return(0); } @@ -134,6 +150,17 @@ GCFEvent* ClkCtl::parseOptions(int argc, char** argv) } break; + case 'b': + return(new CLKCTRLGetBitmodeEvent()); + break; + + case 'B': { + CLKCTRLSetBitmodeEvent* event = new CLKCTRLSetBitmodeEvent(); + event->bits_per_sample = atoi(optarg); + return(event); + } + break; + case 's': return (new CLKCTRLGetSplittersEvent()); break; @@ -161,6 +188,8 @@ void ClkCtl::doHelp() cout << "clkctl syntax:" << endl; cout << "clkctl --getclock" << endl; cout << "clkctl --setclock=160|200" << endl; + cout << "clkctl --getbitmode" << endl; + cout << "clkctl --setbitmode=4|8|16" << endl; cout << "clkctl --getsplitters" << endl; cout << "clkctl --setsplitters=0|1" << endl; cout << endl; diff --git a/MAC/APL/StationCU/src/ClockProtocol/Clock_Protocol.prot b/MAC/APL/StationCU/src/ClockProtocol/Clock_Protocol.prot index 050a2ad4902..711f6ae7f17 100644 --- a/MAC/APL/StationCU/src/ClockProtocol/Clock_Protocol.prot +++ b/MAC/APL/StationCU/src/ClockProtocol/Clock_Protocol.prot @@ -43,6 +43,11 @@ prelude = << PRELUDE_END // SET_CLOCK (int clock) // SET_CLOCK_ACK (int status) // +// GET_BITMODE () +// GET_BITMODE_ACK (int bitmode) +// SET_BITMODE (int bitmode) +// SET_BITMODE_ACK (int status) +// // GET_SPLITTERS () // GET_SPLITTERS_ACK (bitset splitters) // SET_SPLITTERS (bool splittersOn) @@ -59,6 +64,10 @@ error = { id = CLOCKFREQ; msg = "Invalid clock frequency specified, only 160 and 200 MHz are allowed"; }; +error = { + id = INVALIDBITMODE; + msg = "Invalid bit mode specified, only 4, 8 and 16 are allowed"; +}; error = { id = SPLITTERS; msg = "Trouble setting the splitters"; @@ -115,6 +124,50 @@ event = { }; }; +// +// GET_BITMODE +// +event = { + signal = GET_BITMODE; + dir = IN; // from client to server +}; + +// +// GET_BITMODE_ACK +// +event = { + signal = GET_BITMODE_ACK; + dir = OUT; + param = { + name = "bits_per_sample"; + type = "uint32"; + }; +}; + +// +// SET_BITMODE +// +event = { + signal = SET_BITMODE; + dir = IN; + param = { + name = "bits_per_sample"; + type = "uint32"; + }; +}; + +// +// SET_BITMODE_ACK +// +event = { + signal = SET_BITMODE_ACK; + dir = OUT; + param = { + name = "status"; + type = "uint32"; + }; +}; + // // GET_SPLITTERS // diff --git a/MAC/APL/StationCU/src/HardwareMonitor/ECMonitor.cc b/MAC/APL/StationCU/src/HardwareMonitor/ECMonitor.cc index ce344654eff..f2934a228ad 100644 --- a/MAC/APL/StationCU/src/HardwareMonitor/ECMonitor.cc +++ b/MAC/APL/StationCU/src/HardwareMonitor/ECMonitor.cc @@ -255,12 +255,8 @@ GCFEvent::TResult ECMonitor::createPropertySets(GCFEvent& event, GCFPortInterfac // resize vectors. itsCabs.resize (itsNrCabs, 0); - string mainDB(PVSSinfo::getMainDBName()+":"); - string stationNameMask(mainDB+createPropertySetName(PSN_STATION, getName())); -// LOG_DEBUG_STR("stationNameMask=" << stationNameMask); - string PSname(formatString(stationNameMask.c_str(), 0)); -// LOG_DEBUG_STR("PSname=" << PSname); - itsStation = new RTDBPropertySet(PSname, PST_STATION, PSAT_WO | PSAT_CW, this); + string PSname(createPropertySetName(PSN_STATION_INFO, getName())); + itsStation = new RTDBPropertySet(PSname, PST_STATION_INFO, PSAT_WO | PSAT_CW, this); itsStation->setConfirmation(false); string cabNameMask(createPropertySetName(PSN_CABINET, getName())); @@ -526,10 +522,10 @@ GCFEvent::TResult ECMonitor::askStatus(GCFEvent& event, GCFPortInterface& port) } bState = (sts_stat.power & STS_POWER48_ON); - itsStation->setValue(PN_STS_POWER48_ON, GCFPVBool(bState), 0.0, false); + itsStation->setValue(PN_STI_POWER48_ON, GCFPVBool(bState), 0.0, false); bState = (sts_stat.power & STS_POWER220_ON); - itsStation->setValue(PN_STS_POWER220_ON, GCFPVBool(bState), 0.0, false); + itsStation->setValue(PN_STI_POWER220_ON, GCFPVBool(bState), 0.0, false); //bState = (sts_stat.lightning & STS_LIGHTNING); //itsStation->setValue(PN_STS_LIGHTNING, GCFPVBool(bState), 0.0, false); diff --git a/MAC/APL/StationCU/src/HardwareMonitor/PVSSDatapointDefs.h b/MAC/APL/StationCU/src/HardwareMonitor/PVSSDatapointDefs.h index 6cb9a56637b..9f83a52dda5 100644 --- a/MAC/APL/StationCU/src/HardwareMonitor/PVSSDatapointDefs.h +++ b/MAC/APL/StationCU/src/HardwareMonitor/PVSSDatapointDefs.h @@ -1,4 +1,4 @@ -// This file was generated by create_db_files v2.0 on Mon Apr 26 01:38:02 UTC 2010 +// This file was generated by create_db_files v2.0 on Tue Oct 9 13:22:37 UTC 2012 #ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H #define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H @@ -15,18 +15,6 @@ #define PN_OBJ_MESSAGE "object.message" #define PN_OBJ_LEAF "object.leaf" -// Station -#define PSN_STATION "LOFAR_PIC_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - -// Station -#define PSN_STATION "LOFAR_PermSW_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - // MACScheduler #define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" #define PST_MAC_SCHEDULER "MACScheduler" @@ -37,6 +25,10 @@ #define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" #define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" +// CRTriggerControl +#define PSN_CR_TRIGGER_CONTROL "LOFAR_PermSW_CRTriggerControl" +#define PST_CR_TRIGGER_CONTROL "CRTriggerControl" + // Observation #define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" #define PST_OBSERVATION "Observation" @@ -53,6 +45,9 @@ #define PN_OBS_SAMPLE_CLOCK "sampleClock" #define PN_OBS_RUN_STATE "runState" #define PN_OBS_MEASUREMENT_SET "measurementSet" +#define PN_OBS_PROCESS_TYPE "processType" +#define PN_OBS_PROCESS_SUBTYPE "processSubtype" +#define PN_OBS_STRATEGY "strategy" #define PN_OBS_STATION_LIST "stationList" #define PN_OBS_INPUT_NODE_LIST "inputNodeList" #define PN_OBS_BGL_NODE_LIST "BGLNodeList" @@ -60,24 +55,24 @@ #define PN_OBS_BEAMS_ANGLE1 "Beams.angle1" #define PN_OBS_BEAMS_ANGLE2 "Beams.angle2" #define PN_OBS_BEAMS_DIRECTION_TYPE "Beams.directionType" -#define PN_OBS_BEAMS_BEAMLET_LIST "Beams.beamletList" #define PN_OBS_BEAMS_SUBBAND_LIST "Beams.subbandList" +#define PN_OBS_TIED_ARRAY_BEAMS_BEAM_INDEX "TiedArrayBeams.beamIndex" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE1 "TiedArrayBeams.angle1" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE2 "TiedArrayBeams.angle2" +#define PN_OBS_TIED_ARRAY_BEAMS_DIRECTION_TYPE "TiedArrayBeams.directionType" +#define PN_OBS_TIED_ARRAY_BEAMS_DISPERSION "TiedArrayBeams.dispersion" +#define PN_OBS_TIED_ARRAY_BEAMS_COHERENT "TiedArrayBeams.coherent" // ObservationControl #define PSN_OBSERVATION_CONTROL "LOFAR_ObsSW_@observation@_ObservationControl" #define PST_OBSERVATION_CONTROL "ObservationControl" - -// Adder -#define PSN_ADDER "@adder@" -#define PST_ADDER "Adder" -#define PN_ADD_DROPPING "dropping" -#define PN_ADD_NR_BLOCKS_DROPPED "nrBlocksDropped" -#define PN_ADD_LOG_LINE "logLine" +#define PN_OBSCTRL_COMMAND "command" // InputBuffer -#define PSN_INPUT_BUFFER "@inputbuffer@" +#define PSN_INPUT_BUFFER "LOFAR_PermSW_@psionode@_InputBuffer" #define PST_INPUT_BUFFER "InputBuffer" #define PN_IPB_STATION_NAME "stationName" +#define PN_IPB_OBSERVATION_NAME "observationName" #define PN_IPB_STREAM0_BLOCKS_IN "stream0.blocksIn" #define PN_IPB_STREAM0_PERC_BAD "stream0.percBad" #define PN_IPB_STREAM0_REJECTED "stream0.rejected" @@ -93,12 +88,55 @@ #define PN_IPB_LATE "late" #define PN_IPB_IO_TIME "IOTime" -// Storage -#define PSN_STORAGE "@storage@" -#define PST_STORAGE "Storage" -#define PN_STR_TIME "time" -#define PN_STR_COUNT "count" -#define PN_STR_DROPPED "dropped" +// Adder +#define PSN_ADDER "LOFAR_ObsSW_@osionode@_@adder@" +#define PST_ADDER "Adder" +#define PN_ADD_DROPPING "dropping" +#define PN_ADD_DROPPED "dropped" +#define PN_ADD_DATA_PRODUCT_TYPE "dataProductType" +#define PN_ADD_DATA_PRODUCT "dataProduct" +#define PN_ADD_FILE_NAME "fileName" +#define PN_ADD_LOCUS_NODE "locusNode" +#define PN_ADD_WRITER "writer" +#define PN_ADD_DIRECTORY "directory" +#define PN_ADD_OBSERVATION_NAME "observationName" + +// Writer +#define PSN_WRITER "LOFAR_ObsSW_@oslocusnode@_@writer@" +#define PST_WRITER "Writer" +#define PN_WTR_WRITTEN "written" +#define PN_WTR_DROPPED "dropped" +#define PN_WTR_FILE_NAME "fileName" +#define PN_WTR_DATA_RATE "dataRate" +#define PN_WTR_DATA_PRODUCT_TYPE "dataProductType" +#define PN_WTR_OBSERVATION_NAME "observationName" + +// IONode +#define PSN_IO_NODE "LOFAR_PIC_BGP_@midplane@_@ionode@" +#define PST_IO_NODE "IONode" +#define PN_ION_STATION0 "station0" +#define PN_ION_IP0 "IP0" +#define PN_ION_MAC0 "MAC0" +#define PN_ION_STATION1 "station1" +#define PN_ION_IP1 "IP1" +#define PN_ION_MAC1 "MAC1" +#define PN_ION_USE2ND_STATION "use2ndStation" +#define PN_ION_USED_STATION "usedStation" +#define PN_ION_USEDIP "usedIP" +#define PN_ION_USEDMAC "usedMAC" + +// LocusNode +#define PSN_LOCUS_NODE "LOFAR_PIC_@osrack@_@locusnode@" +#define PST_LOCUS_NODE "LocusNode" +#define PN_LCN_FREE "free" +#define PN_LCN_TOTAL "total" +#define PN_LCN_CLAIMED "claimed" + +// CEPHardwareMonitor +#define PSN_CEP_HARDWARE_MONITOR "LOFAR_PermSW_CEPHardwareMonitor" +#define PST_CEP_HARDWARE_MONITOR "CEPHardwareMonitor" +#define PN_CHM_BGP_CONNECTED "BGP.connected" +#define PN_CHM_CLUSTER_CONNECTED "Cluster.connected" // Cabinet #define PSN_CABINET "LOFAR_PIC_@cabinet@" @@ -155,6 +193,8 @@ #define PN_RSP_VOLTAGE25 "voltage25" #define PN_RSP_VOLTAGE33 "voltage33" #define PN_RSP_VERSION "version" +#define PN_RSP_BITMODE "bitmode" +#define PN_RSP_BITMODE_CAPABILITY "bitmodeCapability" #define PN_RSP_ALERT "alert" #define PN_RSP_SPLITTER_ON "splitterOn" #define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" @@ -273,6 +313,62 @@ #define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" #define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" +// LBAAntenna +#define PSN_LBA_ANTENNA "LOFAR_PIC_@lbaantenna@" +#define PST_LBA_ANTENNA "LBAAntenna" + +// HBAAntenna +#define PSN_HBA_ANTENNA "LOFAR_PIC_@hbaantenna@" +#define PST_HBA_ANTENNA "HBAAntenna" + +// StationInfo +#define PSN_STATION_INFO "LOFAR_PIC_StationInfo" +#define PST_STATION_INFO "StationInfo" +#define PN_STI_STATIONID "stationID" +#define PN_STI_N_RSP_BOARDS "N_RSPBoards" +#define PN_STI_N_TB_BOARDS "N_TBBoards" +#define PN_STI_N_LBAS "N_LBAS" +#define PN_STI_N_HBAS "N_HBAS" +#define PN_STI_HBA__SPLIT "HBA_Split" +#define PN_STI_WIDE_LBAS "wide_LBAS" +#define PN_STI_POWER48_ON "power48On" +#define PN_STI_POWER220_ON "power220On" +#define PN_STI_CABINET_X "Cabinet.X" +#define PN_STI_CABINET_Y "Cabinet.Y" +#define PN_STI_CABINET_Z "Cabinet.Z" +#define PN_STI_HBA_CENTERX "HBA.centerX" +#define PN_STI_HBA_CENTERY "HBA.centerY" +#define PN_STI_HBA_CENTERZ "HBA.centerZ" +#define PN_STI_HBA_HBA0_CENTERX "HBA.HBA0.centerX" +#define PN_STI_HBA_HBA0_CENTERY "HBA.HBA0.centerY" +#define PN_STI_HBA_HBA0_CENTERZ "HBA.HBA0.centerZ" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_X "HBA.HBA0.NormalVector.X" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Y "HBA.HBA0.NormalVector.Y" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Z "HBA.HBA0.NormalVector.Z" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_X "HBA.HBA0.RotationMatrix.X" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Y "HBA.HBA0.RotationMatrix.Y" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Z "HBA.HBA0.RotationMatrix.Z" +#define PN_STI_HBA_HBA0_ROTATION "HBA.HBA0.rotation" +#define PN_STI_HBA_HBA1_CENTERX "HBA.HBA1.centerX" +#define PN_STI_HBA_HBA1_CENTERY "HBA.HBA1.centerY" +#define PN_STI_HBA_HBA1_CENTERZ "HBA.HBA1.centerZ" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_X "HBA.HBA1.NormalVector.X" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Y "HBA.HBA1.NormalVector.Y" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Z "HBA.HBA1.NormalVector.Z" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_X "HBA.HBA1.RotationMatrix.X" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Y "HBA.HBA1.RotationMatrix.Y" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Z "HBA.HBA1.RotationMatrix.Z" +#define PN_STI_HBA_HBA1_ROTATION "HBA.HBA1.rotation" +#define PN_STI_LBA_CENTERX "LBA.centerX" +#define PN_STI_LBA_CENTERY "LBA.centerY" +#define PN_STI_LBA_CENTERZ "LBA.centerZ" +#define PN_STI_LBA__NORMAL_VECTOR_X "LBA.NormalVector.X" +#define PN_STI_LBA__NORMAL_VECTOR_Y "LBA.NormalVector.Y" +#define PN_STI_LBA__NORMAL_VECTOR_Z "LBA.NormalVector.Z" +#define PN_STI_LBA__ROTATION_MATRIX_X "LBA.RotationMatrix.X" +#define PN_STI_LBA__ROTATION_MATRIX_Y "LBA.RotationMatrix.Y" +#define PN_STI_LBA__ROTATION_MATRIX_Z "LBA.RotationMatrix.Z" + // LogProcessor #define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" #define PST_LOG_PROCESSOR "LogProcessor" @@ -291,6 +387,7 @@ // SoftwareMonitor #define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" #define PST_SOFTWARE_MONITOR "SoftwareMonitor" +#define PN_SWM_SW_LEVEL "SWLevel" // SHMInfoServer #define PSN_SHM_INFO_SERVER "LOFAR_PermSW_SHMInfoServer" @@ -307,19 +404,8 @@ #define PN_CLC_CONNECTED "connected" #define PN_CLC_REQUESTED_CLOCK "requestedClock" #define PN_CLC_ACTUAL_CLOCK "actualClock" - -// Antenna -#define PSN_ANTENNA "@antenna@" -#define PST_ANTENNA "Antenna" -#define PN_ANT_STATUS_STATE "status.state" -#define PN_ANT_STATUS_CHILD_STATE "status.childState" -#define PN_ANT_STATUS_MESSAGE "status.message" -#define PN_ANT_STATUS_LEAF "status.leaf" -#define PN_ANT_RCUX "RCUX" -#define PN_ANT_RCUY "RCUY" -#define PN_ANT_DELTAX "deltaX" -#define PN_ANT_DELTAY "deltaY" -#define PN_ANT_DELTAH "deltaH" +#define PN_CLC_REQUESTED_BITMODE "requestedBitmode" +#define PN_CLC_ACTUAL_BITMODE "actualBitmode" // StnObservation #define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" @@ -328,6 +414,8 @@ #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" #define PN_OBS_RECEIVER_BITMAP "receiverBitmap" +#define PN_OBS_HBA_BITMAP "HBABitmap" +#define PN_OBS_LBA_BITMAP "LBABitmap" // BeamControl #define PSN_BEAM_CONTROL "LOFAR_ObsSW_@observation@_BeamControl" diff --git a/MAC/APL/StationCU/src/StationControl/ActiveObs.cc b/MAC/APL/StationCU/src/StationControl/ActiveObs.cc index 1952c85252e..524673d378e 100644 --- a/MAC/APL/StationCU/src/StationControl/ActiveObs.cc +++ b/MAC/APL/StationCU/src/StationControl/ActiveObs.cc @@ -55,11 +55,14 @@ namespace LOFAR { ActiveObs::ActiveObs(const string& name, State initial, ParameterSet* thePS, + const string& LBAbitmapString, + const string& HBAbitmapString, bool hasSplitters, GCFTask& task) : GCFTask (initial, string("ActiveObs:") + name), itsStopTimerID (0), - itsPropSetTimer (new GCFTimerPort(task, name)), + itsPropSetTimer (new GCFTimerPort(task, name)), // must use 'name' because F_TIMER events receive + itsGuardTimer (new GCFTimerPort(task, name)), // in StationControl task. Needed for routing. itsName (name), itsTask (&task), itsInstanceNr (getInstanceNr(name)), @@ -76,7 +79,9 @@ ActiveObs::ActiveObs(const string& name, itsInstanceNr, itsObsPar.obsID)), itsReadyFlag (false), itsReqState (CTState::NOSTATE), - itsCurState (CTState::NOSTATE) + itsCurState (CTState::NOSTATE), + itsLBAs (LBAbitmapString), + itsHBAs (HBAbitmapString) { if (thePS->isDefined("Observation.TBB.TBBsetting[0].filter0_coeff0")) { LOG_INFO("Observation also uses the TB boards"); @@ -105,7 +110,7 @@ ActiveObs::~ActiveObs() GCFEvent::TResult ActiveObs::initial(GCFEvent& event, GCFPortInterface& /*port*/) { - LOG_DEBUG(formatString("%s:initial - %04X", itsName.c_str(), event.signal)); + LOG_DEBUG(formatString("%s:initial - %s", itsName.c_str(), eventName(event).c_str())); GCFEvent::TResult status = GCFEvent::HANDLED; @@ -152,7 +157,7 @@ GCFEvent::TResult ActiveObs::initial(GCFEvent& event, break; default: - LOG_DEBUG_STR ("initial, default"); + LOG_DEBUG_STR(itsName << ":inital default: " << eventName(event)); status = GCFEvent::NOT_HANDLED; break; } @@ -166,16 +171,16 @@ GCFEvent::TResult ActiveObs::initial(GCFEvent& event, // GCFEvent::TResult ActiveObs::starting(GCFEvent& event, GCFPortInterface& port) { - LOG_DEBUG(formatString("%s:starting - %04X", itsName.c_str(), event.signal)); + LOG_DEBUG(formatString("%s:starting - %s", itsName.c_str(), eventName(event).c_str())); switch (event.signal) { case F_ENTRY: { - // first make a mapping of the receivers that are used. - // the StationController already modified the set to reflect the available receivers - // So askfor this 'core' set by passed zeros. - // the receiver bitmap can be derived from the RCUset. + // First make a mapping of the receivers that are used. + // The StationController already modified the set to reflect the available receivers + // So askfor this 'core' set by passing zeros in the getRCUbitset function. StationConfig config; bitset<MAX_RCUS> theRCUs(itsObsPar.getRCUbitset(0, 0, "")); + // The receiver bitmap can be derived from the RCUset. string rbm; rbm.resize(MAX_RCUS, '0'); for (int i = 0; i < MAX_RCUS; i++) { @@ -185,6 +190,8 @@ GCFEvent::TResult ActiveObs::starting(GCFEvent& event, GCFPortInterface& port) } LOG_INFO_STR("Setting receiverBitMap of DP:" << itsObsPar.realPVSSdatapoint << "." << PN_OBS_RECEIVER_BITMAP << "to " << theRCUs); itsPropertySet->setValue(PN_OBS_RECEIVER_BITMAP,GCFPVString (rbm)); + itsPropertySet->setValue(PN_OBS_LBA_BITMAP,GCFPVString (itsLBAs)); + itsPropertySet->setValue(PN_OBS_HBA_BITMAP,GCFPVString (itsHBAs)); itsPropertySet->setValue(PN_OBS_CLAIM_NAME, GCFPVString(formatString("LOFAR_ObsSW_Observation%d", itsObsPar.obsID))); @@ -214,6 +221,7 @@ GCFEvent::TResult ActiveObs::starting(GCFEvent& event, GCFPortInterface& port) } itsCurState = CTState::CONNECT; + itsGuardTimer->setTimer(10.0); // max wait 10 seconds for connections. } break; @@ -237,11 +245,18 @@ GCFEvent::TResult ActiveObs::starting(GCFEvent& event, GCFPortInterface& port) if (itsBeamCntlrReady && itsCalCntlrReady && (itsUsesTBB == itsTBBCntlrReady)) { LOG_INFO_STR("Connected to all controllers, going to connected state"); itsCurState = CTState::CONNECTED; + itsGuardTimer->cancelAllTimers(); TRAN(ActiveObs::connected); } } break; + case F_TIMER: + LOG_FATAL_STR((!itsCalCntlrReady ? "Calibration" : (!itsBeamCntlrReady ? "Beam" : "TBB")) << "Controller did not start, aborting observation"); + TRAN(ActiveObs::stopping); + break; + + case CONTROL_QUIT: TRAN(ActiveObs::stopping); break; @@ -254,8 +269,12 @@ GCFEvent::TResult ActiveObs::starting(GCFEvent& event, GCFPortInterface& port) } break; + case F_EXIT: + itsGuardTimer->cancelAllTimers(); + break; + default: - LOG_DEBUG_STR(itsName << ":default(" << F_EVT_PROTOCOL(event) << "," << F_EVT_SIGNAL(event) << ")"); + LOG_DEBUG_STR(itsName << ":starting default: " << eventName(event) << "@" << port.getName()); return(GCFEvent::NOT_HANDLED); break; } @@ -269,7 +288,7 @@ GCFEvent::TResult ActiveObs::starting(GCFEvent& event, GCFPortInterface& port) // GCFEvent::TResult ActiveObs::connected(GCFEvent& event, GCFPortInterface& port) { - LOG_DEBUG_STR(itsName << ":connected"); + LOG_DEBUG_STR(itsName << ":connected - " << eventName(event) << "@" << port.getName()); switch (event.signal) { case F_ENTRY: @@ -303,6 +322,7 @@ GCFEvent::TResult ActiveObs::connected(GCFEvent& event, GCFPortInterface& port) ChildControl::instance()-> requestState(CTState::CLAIMED, itsTBBCntlrName, 0, CNTLRTYPE_NO_TYPE); } // will result in CONTROL_CLAIMED + itsGuardTimer->setTimer(10.0); // max wait 10 seconds for answers. } break; @@ -326,11 +346,17 @@ GCFEvent::TResult ActiveObs::connected(GCFEvent& event, GCFPortInterface& port) if (itsBeamCntlrReady && itsCalCntlrReady && (itsUsesTBB == itsTBBCntlrReady)) { LOG_INFO("All controllers are ready, going to standby mode"); itsCurState = CTState::CLAIMED; + itsGuardTimer->cancelAllTimers(); TRAN(ActiveObs::standby); } } break; + case F_TIMER: + LOG_FATAL_STR((!itsCalCntlrReady ? "Calibration" : (!itsBeamCntlrReady ? "Beam" : "TBB")) << "Controller did not reached claim state, aborting observation"); + TRAN(ActiveObs::stopping); + break; + case CONTROL_QUIT: TRAN(ActiveObs::stopping); break; @@ -343,8 +369,12 @@ GCFEvent::TResult ActiveObs::connected(GCFEvent& event, GCFPortInterface& port) } break; + case F_EXIT: + itsGuardTimer->cancelAllTimers(); + break; + default: - LOG_DEBUG_STR(itsName << ":default(" << F_EVT_PROTOCOL(event) << "," << F_EVT_SIGNAL(event) << ")"); + LOG_DEBUG_STR(itsName << ":connected default: " << eventName(event) << "@" << port.getName()); return(GCFEvent::NOT_HANDLED); break; } @@ -358,7 +388,7 @@ GCFEvent::TResult ActiveObs::connected(GCFEvent& event, GCFPortInterface& port) // GCFEvent::TResult ActiveObs::standby(GCFEvent& event, GCFPortInterface& port) { - LOG_DEBUG_STR(itsName << ":standby"); + LOG_DEBUG_STR(itsName << ":standby - " << eventName(event) << "@" << port.getName()); switch (event.signal) { case F_ENTRY: @@ -374,11 +404,13 @@ GCFEvent::TResult ActiveObs::standby(GCFEvent& event, GCFPortInterface& port) LOG_INFO_STR("Asking " << itsCalCntlrName << " to calibrate the subarray"); ChildControl::instance()->requestState(CTState::PREPARED, itsCalCntlrName, 0, CNTLRTYPE_NO_TYPE); // will result in CONTROL_PREPARED + itsGuardTimer->setTimer(10.0); // max wait 10 seconds answer } break; case CONTROL_PREPARED: { CONTROLPreparedEvent msg(event); + itsGuardTimer->cancelAllTimers(); if (msg.cntlrName == itsCalCntlrName) { if (msg.result != CT_RESULT_NO_ERROR) { LOG_ERROR_STR("Calibration of subarray FAILED with error " << msg.result); @@ -388,6 +420,7 @@ GCFEvent::TResult ActiveObs::standby(GCFEvent& event, GCFPortInterface& port) itsCalCntlrReady = true; ChildControl::instance()->requestState(CTState::PREPARED, itsBeamCntlrName, 0, CNTLRTYPE_NO_TYPE); // will result in another CONTROL_PREPARED + itsGuardTimer->setTimer(10.0); // max wait 10 seconds answer } else if (msg.cntlrName == itsBeamCntlrName) { if (msg.result != CT_RESULT_NO_ERROR) { @@ -397,16 +430,18 @@ GCFEvent::TResult ActiveObs::standby(GCFEvent& event, GCFPortInterface& port) LOG_INFO_STR("BeamController has started the beam, asking TBBCtlr to prepare TBBs"); itsBeamCntlrReady = true; ChildControl::instance()->requestState(CTState::PREPARED, itsTBBCntlrName, 0, CNTLRTYPE_NO_TYPE); + itsGuardTimer->setTimer(10.0); // max wait 10 seconds answer } else if (msg.cntlrName == itsTBBCntlrName) { if (msg.result != CT_RESULT_NO_ERROR) { LOG_ERROR_STR("Start of TBB failed with error, " << msg.result << ". CONTINUING OBSERVATION WITHOUT TBB."); itsUsesTBB = false; - break; } - LOG_INFO_STR("TBBController has started the beam"); - itsTBBCntlrReady = true; + else { + LOG_INFO_STR("TBBController has started the beam"); + itsTBBCntlrReady = true; + } } else { ASSERTSTR(false, "Received claimed event of unknown controller: " << msg.cntlrName); @@ -415,11 +450,17 @@ GCFEvent::TResult ActiveObs::standby(GCFEvent& event, GCFPortInterface& port) if (itsBeamCntlrReady && itsCalCntlrReady && (itsUsesTBB == itsTBBCntlrReady)) { LOG_INFO("Both controllers are ready, going to operational mode"); itsCurState = CTState::PREPARED; + itsGuardTimer->cancelAllTimers(); TRAN(ActiveObs::operational); } } break; + case F_TIMER: + LOG_FATAL_STR((!itsCalCntlrReady ? "Calibration" : (!itsBeamCntlrReady ? "Beam" : "TBB")) << "Controller did not reach prepared state, aborting observation"); + TRAN(ActiveObs::stopping); + break; + case CONTROL_QUIT: TRAN(ActiveObs::stopping); break; @@ -432,8 +473,12 @@ GCFEvent::TResult ActiveObs::standby(GCFEvent& event, GCFPortInterface& port) } break; + case F_EXIT: + itsGuardTimer->cancelAllTimers(); + break; + default: - LOG_DEBUG_STR(itsName << ":default(" << F_EVT_PROTOCOL(event) << "," << F_EVT_SIGNAL(event) << ")"); + LOG_DEBUG_STR(itsName << ":standby default: " << eventName(event) << "@" << port.getName()); return(GCFEvent::NOT_HANDLED); break; } @@ -447,7 +492,7 @@ GCFEvent::TResult ActiveObs::standby(GCFEvent& event, GCFPortInterface& port) // GCFEvent::TResult ActiveObs::operational(GCFEvent& event, GCFPortInterface& port) { - LOG_DEBUG_STR(itsName << ":operational"); + LOG_DEBUG_STR(itsName << ":operational - " << eventName(event) << "@" << port.getName()); switch (event.signal) { case F_ENTRY: @@ -558,7 +603,7 @@ GCFEvent::TResult ActiveObs::operational(GCFEvent& event, GCFPortInterface& port break; default: - LOG_DEBUG_STR(itsName << ":default(" << eventName(event) << ")"); + LOG_DEBUG_STR(itsName << ":operational default: " << eventName(event) << "@" << port.getName()); return(GCFEvent::NOT_HANDLED); break; } @@ -572,7 +617,7 @@ GCFEvent::TResult ActiveObs::operational(GCFEvent& event, GCFPortInterface& port // GCFEvent::TResult ActiveObs::stopping(GCFEvent& event, GCFPortInterface& /*port*/) { - LOG_DEBUG_STR(itsName << ":stopping"); + LOG_DEBUG(formatString("%s:stopping - %s", itsName.c_str(), eventName(event).c_str())); switch (event.signal) { case F_ENTRY: { @@ -597,9 +642,16 @@ GCFEvent::TResult ActiveObs::stopping(GCFEvent& event, GCFPortInterface& /*port* } LOG_INFO_STR(itsName << ": in 'stopping-mode' until controllers are down"); + itsGuardTimer->setTimer(10.0); } break; + case F_TIMER: + LOG_ERROR_STR("Aborting while not all controllers reported successful shutdown!"); + itsCurState = CTState::QUITED; + itsReadyFlag = true; + break; + case CONTROL_QUITED: { CONTROLQuitedEvent msg(event); if (msg.cntlrName == itsCalCntlrName) { @@ -621,12 +673,13 @@ GCFEvent::TResult ActiveObs::stopping(GCFEvent& event, GCFPortInterface& /*port* LOG_INFO_STR("All controllers are down, informing stationControl task"); itsCurState = CTState::QUITED; itsReadyFlag = true; + itsGuardTimer->cancelAllTimers(); } } break; default: - LOG_DEBUG_STR(itsName << ":default(" << F_EVT_PROTOCOL(event) << "," << F_EVT_SIGNAL(event) << ")"); + LOG_DEBUG_STR(itsName << ":stopping default: " << eventName(event)); return(GCFEvent::NOT_HANDLED); break; } diff --git a/MAC/APL/StationCU/src/StationControl/ActiveObs.h b/MAC/APL/StationCU/src/StationControl/ActiveObs.h index 318da49f4f4..3363d6c49e9 100644 --- a/MAC/APL/StationCU/src/StationControl/ActiveObs.h +++ b/MAC/APL/StationCU/src/StationControl/ActiveObs.h @@ -63,6 +63,8 @@ public: ActiveObs (const string& name, State initial, ParameterSet* aPS, + const string& LBAbitmap, + const string& HBAbitmap, bool hasSplitters, GCFTask& task); virtual ~ActiveObs(); @@ -95,6 +97,8 @@ private: RTDBPropertySet* itsPropertySet; GCFTimerPort* itsPropSetTimer; + GCFTimerPort* itsGuardTimer; + string itsName; GCFTask* itsTask; int32 itsInstanceNr; @@ -109,6 +113,8 @@ private: bool itsReadyFlag; CTState::CTstateNr itsReqState; CTState::CTstateNr itsCurState; + string itsLBAs; + string itsHBAs; }; //# diff --git a/MAC/APL/StationCU/src/StationControl/PVSSDatapointDefs.h b/MAC/APL/StationCU/src/StationControl/PVSSDatapointDefs.h index cbd965ef734..9f83a52dda5 100644 --- a/MAC/APL/StationCU/src/StationControl/PVSSDatapointDefs.h +++ b/MAC/APL/StationCU/src/StationControl/PVSSDatapointDefs.h @@ -1,4 +1,4 @@ -// This file was generated by create_db_files v1.0 on Thu Mar 19 14:56:58 UTC 2009 +// This file was generated by create_db_files v2.0 on Tue Oct 9 13:22:37 UTC 2012 #ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H #define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H @@ -15,18 +15,6 @@ #define PN_OBJ_MESSAGE "object.message" #define PN_OBJ_LEAF "object.leaf" -// Station -#define PSN_STATION "LOFAR_PIC_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - -// Station -#define PSN_STATION "LOFAR_PermSW_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - // MACScheduler #define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" #define PST_MAC_SCHEDULER "MACScheduler" @@ -37,12 +25,15 @@ #define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" #define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" +// CRTriggerControl +#define PSN_CR_TRIGGER_CONTROL "LOFAR_PermSW_CRTriggerControl" +#define PST_CR_TRIGGER_CONTROL "CRTriggerControl" + // Observation #define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" #define PST_OBSERVATION "Observation" #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" -#define PN_OBS_RECEIVER_BITMAP "receiverBitmap" #define PN_OBS_CLAIM_PERIOD "claimPeriod" #define PN_OBS_PREPARE_PERIOD "preparePeriod" #define PN_OBS_START_TIME "startTime" @@ -54,6 +45,9 @@ #define PN_OBS_SAMPLE_CLOCK "sampleClock" #define PN_OBS_RUN_STATE "runState" #define PN_OBS_MEASUREMENT_SET "measurementSet" +#define PN_OBS_PROCESS_TYPE "processType" +#define PN_OBS_PROCESS_SUBTYPE "processSubtype" +#define PN_OBS_STRATEGY "strategy" #define PN_OBS_STATION_LIST "stationList" #define PN_OBS_INPUT_NODE_LIST "inputNodeList" #define PN_OBS_BGL_NODE_LIST "BGLNodeList" @@ -61,24 +55,88 @@ #define PN_OBS_BEAMS_ANGLE1 "Beams.angle1" #define PN_OBS_BEAMS_ANGLE2 "Beams.angle2" #define PN_OBS_BEAMS_DIRECTION_TYPE "Beams.directionType" -#define PN_OBS_BEAMS_BEAMLET_LIST "Beams.beamletList" #define PN_OBS_BEAMS_SUBBAND_LIST "Beams.subbandList" +#define PN_OBS_TIED_ARRAY_BEAMS_BEAM_INDEX "TiedArrayBeams.beamIndex" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE1 "TiedArrayBeams.angle1" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE2 "TiedArrayBeams.angle2" +#define PN_OBS_TIED_ARRAY_BEAMS_DIRECTION_TYPE "TiedArrayBeams.directionType" +#define PN_OBS_TIED_ARRAY_BEAMS_DISPERSION "TiedArrayBeams.dispersion" +#define PN_OBS_TIED_ARRAY_BEAMS_COHERENT "TiedArrayBeams.coherent" // ObservationControl #define PSN_OBSERVATION_CONTROL "LOFAR_ObsSW_@observation@_ObservationControl" #define PST_OBSERVATION_CONTROL "ObservationControl" +#define PN_OBSCTRL_COMMAND "command" + +// InputBuffer +#define PSN_INPUT_BUFFER "LOFAR_PermSW_@psionode@_InputBuffer" +#define PST_INPUT_BUFFER "InputBuffer" +#define PN_IPB_STATION_NAME "stationName" +#define PN_IPB_OBSERVATION_NAME "observationName" +#define PN_IPB_STREAM0_BLOCKS_IN "stream0.blocksIn" +#define PN_IPB_STREAM0_PERC_BAD "stream0.percBad" +#define PN_IPB_STREAM0_REJECTED "stream0.rejected" +#define PN_IPB_STREAM1_BLOCKS_IN "stream1.blocksIn" +#define PN_IPB_STREAM1_PERC_BAD "stream1.percBad" +#define PN_IPB_STREAM1_REJECTED "stream1.rejected" +#define PN_IPB_STREAM2_BLOCKS_IN "stream2.blocksIn" +#define PN_IPB_STREAM2_PERC_BAD "stream2.percBad" +#define PN_IPB_STREAM2_REJECTED "stream2.rejected" +#define PN_IPB_STREAM3_BLOCKS_IN "stream3.blocksIn" +#define PN_IPB_STREAM3_PERC_BAD "stream3.percBad" +#define PN_IPB_STREAM3_REJECTED "stream3.rejected" +#define PN_IPB_LATE "late" +#define PN_IPB_IO_TIME "IOTime" + +// Adder +#define PSN_ADDER "LOFAR_ObsSW_@osionode@_@adder@" +#define PST_ADDER "Adder" +#define PN_ADD_DROPPING "dropping" +#define PN_ADD_DROPPED "dropped" +#define PN_ADD_DATA_PRODUCT_TYPE "dataProductType" +#define PN_ADD_DATA_PRODUCT "dataProduct" +#define PN_ADD_FILE_NAME "fileName" +#define PN_ADD_LOCUS_NODE "locusNode" +#define PN_ADD_WRITER "writer" +#define PN_ADD_DIRECTORY "directory" +#define PN_ADD_OBSERVATION_NAME "observationName" -// OnlineControl -#define PSN_ONLINE_CONTROL "LOFAR_ObsSW_@observation@_OnlineControl" -#define PST_ONLINE_CONTROL "OnlineControl" +// Writer +#define PSN_WRITER "LOFAR_ObsSW_@oslocusnode@_@writer@" +#define PST_WRITER "Writer" +#define PN_WTR_WRITTEN "written" +#define PN_WTR_DROPPED "dropped" +#define PN_WTR_FILE_NAME "fileName" +#define PN_WTR_DATA_RATE "dataRate" +#define PN_WTR_DATA_PRODUCT_TYPE "dataProductType" +#define PN_WTR_OBSERVATION_NAME "observationName" -// Correlator -#define PSN_CORRELATOR "LOFAR_ObsSW_@observation@_OnlineControl_Correlator" -#define PST_CORRELATOR "Correlator" +// IONode +#define PSN_IO_NODE "LOFAR_PIC_BGP_@midplane@_@ionode@" +#define PST_IO_NODE "IONode" +#define PN_ION_STATION0 "station0" +#define PN_ION_IP0 "IP0" +#define PN_ION_MAC0 "MAC0" +#define PN_ION_STATION1 "station1" +#define PN_ION_IP1 "IP1" +#define PN_ION_MAC1 "MAC1" +#define PN_ION_USE2ND_STATION "use2ndStation" +#define PN_ION_USED_STATION "usedStation" +#define PN_ION_USEDIP "usedIP" +#define PN_ION_USEDMAC "usedMAC" -// StorageAppl -#define PSN_STORAGE_APPL "LOFAR_ObsSW_@observation@_OnlineControl_StorageAppl" -#define PST_STORAGE_APPL "StorageAppl" +// LocusNode +#define PSN_LOCUS_NODE "LOFAR_PIC_@osrack@_@locusnode@" +#define PST_LOCUS_NODE "LocusNode" +#define PN_LCN_FREE "free" +#define PN_LCN_TOTAL "total" +#define PN_LCN_CLAIMED "claimed" + +// CEPHardwareMonitor +#define PSN_CEP_HARDWARE_MONITOR "LOFAR_PermSW_CEPHardwareMonitor" +#define PST_CEP_HARDWARE_MONITOR "CEPHardwareMonitor" +#define PN_CHM_BGP_CONNECTED "BGP.connected" +#define PN_CHM_CLUSTER_CONNECTED "Cluster.connected" // Cabinet #define PSN_CABINET "LOFAR_PIC_@cabinet@" @@ -135,6 +193,8 @@ #define PN_RSP_VOLTAGE25 "voltage25" #define PN_RSP_VOLTAGE33 "voltage33" #define PN_RSP_VERSION "version" +#define PN_RSP_BITMODE "bitmode" +#define PN_RSP_BITMODE_CAPABILITY "bitmodeCapability" #define PN_RSP_ALERT "alert" #define PN_RSP_SPLITTER_ON "splitterOn" #define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" @@ -217,10 +277,15 @@ #define PN_RCU_TRIGGER_FILTER "Trigger.filter" #define PN_RCU_TRIGGER_WINDOW "Trigger.window" #define PN_RCU_TRIGGER_OPERATING_MODE "Trigger.operatingMode" -#define PN_RCU_TRIGGER_COEFF0 "Trigger.coeff0" -#define PN_RCU_TRIGGER_COEFF1 "Trigger.coeff1" -#define PN_RCU_TRIGGER_COEFF2 "Trigger.coeff2" -#define PN_RCU_TRIGGER_COEFF3 "Trigger.coeff3" +#define PN_RCU_TRIGGER_TRIGGER_MODE "Trigger.triggerMode" +#define PN_RCU_TRIGGER_FILTER0_COEFF0 "Trigger.filter0.coeff0" +#define PN_RCU_TRIGGER_FILTER0_COEFF1 "Trigger.filter0.coeff1" +#define PN_RCU_TRIGGER_FILTER0_COEFF2 "Trigger.filter0.coeff2" +#define PN_RCU_TRIGGER_FILTER0_COEFF3 "Trigger.filter0.coeff3" +#define PN_RCU_TRIGGER_FILTER1_COEFF0 "Trigger.filter1.coeff0" +#define PN_RCU_TRIGGER_FILTER1_COEFF1 "Trigger.filter1.coeff1" +#define PN_RCU_TRIGGER_FILTER1_COEFF2 "Trigger.filter1.coeff2" +#define PN_RCU_TRIGGER_FILTER1_COEFF3 "Trigger.filter1.coeff3" // TBBoard #define PSN_TB_BOARD "LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@" @@ -248,6 +313,62 @@ #define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" #define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" +// LBAAntenna +#define PSN_LBA_ANTENNA "LOFAR_PIC_@lbaantenna@" +#define PST_LBA_ANTENNA "LBAAntenna" + +// HBAAntenna +#define PSN_HBA_ANTENNA "LOFAR_PIC_@hbaantenna@" +#define PST_HBA_ANTENNA "HBAAntenna" + +// StationInfo +#define PSN_STATION_INFO "LOFAR_PIC_StationInfo" +#define PST_STATION_INFO "StationInfo" +#define PN_STI_STATIONID "stationID" +#define PN_STI_N_RSP_BOARDS "N_RSPBoards" +#define PN_STI_N_TB_BOARDS "N_TBBoards" +#define PN_STI_N_LBAS "N_LBAS" +#define PN_STI_N_HBAS "N_HBAS" +#define PN_STI_HBA__SPLIT "HBA_Split" +#define PN_STI_WIDE_LBAS "wide_LBAS" +#define PN_STI_POWER48_ON "power48On" +#define PN_STI_POWER220_ON "power220On" +#define PN_STI_CABINET_X "Cabinet.X" +#define PN_STI_CABINET_Y "Cabinet.Y" +#define PN_STI_CABINET_Z "Cabinet.Z" +#define PN_STI_HBA_CENTERX "HBA.centerX" +#define PN_STI_HBA_CENTERY "HBA.centerY" +#define PN_STI_HBA_CENTERZ "HBA.centerZ" +#define PN_STI_HBA_HBA0_CENTERX "HBA.HBA0.centerX" +#define PN_STI_HBA_HBA0_CENTERY "HBA.HBA0.centerY" +#define PN_STI_HBA_HBA0_CENTERZ "HBA.HBA0.centerZ" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_X "HBA.HBA0.NormalVector.X" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Y "HBA.HBA0.NormalVector.Y" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Z "HBA.HBA0.NormalVector.Z" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_X "HBA.HBA0.RotationMatrix.X" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Y "HBA.HBA0.RotationMatrix.Y" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Z "HBA.HBA0.RotationMatrix.Z" +#define PN_STI_HBA_HBA0_ROTATION "HBA.HBA0.rotation" +#define PN_STI_HBA_HBA1_CENTERX "HBA.HBA1.centerX" +#define PN_STI_HBA_HBA1_CENTERY "HBA.HBA1.centerY" +#define PN_STI_HBA_HBA1_CENTERZ "HBA.HBA1.centerZ" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_X "HBA.HBA1.NormalVector.X" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Y "HBA.HBA1.NormalVector.Y" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Z "HBA.HBA1.NormalVector.Z" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_X "HBA.HBA1.RotationMatrix.X" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Y "HBA.HBA1.RotationMatrix.Y" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Z "HBA.HBA1.RotationMatrix.Z" +#define PN_STI_HBA_HBA1_ROTATION "HBA.HBA1.rotation" +#define PN_STI_LBA_CENTERX "LBA.centerX" +#define PN_STI_LBA_CENTERY "LBA.centerY" +#define PN_STI_LBA_CENTERZ "LBA.centerZ" +#define PN_STI_LBA__NORMAL_VECTOR_X "LBA.NormalVector.X" +#define PN_STI_LBA__NORMAL_VECTOR_Y "LBA.NormalVector.Y" +#define PN_STI_LBA__NORMAL_VECTOR_Z "LBA.NormalVector.Z" +#define PN_STI_LBA__ROTATION_MATRIX_X "LBA.RotationMatrix.X" +#define PN_STI_LBA__ROTATION_MATRIX_Y "LBA.RotationMatrix.Y" +#define PN_STI_LBA__ROTATION_MATRIX_Z "LBA.RotationMatrix.Z" + // LogProcessor #define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" #define PST_LOG_PROCESSOR "LogProcessor" @@ -266,6 +387,7 @@ // SoftwareMonitor #define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" #define PST_SOFTWARE_MONITOR "SoftwareMonitor" +#define PN_SWM_SW_LEVEL "SWLevel" // SHMInfoServer #define PSN_SHM_INFO_SERVER "LOFAR_PermSW_SHMInfoServer" @@ -282,19 +404,8 @@ #define PN_CLC_CONNECTED "connected" #define PN_CLC_REQUESTED_CLOCK "requestedClock" #define PN_CLC_ACTUAL_CLOCK "actualClock" - -// Antenna -#define PSN_ANTENNA "@antenna@" -#define PST_ANTENNA "Antenna" -#define PN_ANT_STATUS_STATE "status.state" -#define PN_ANT_STATUS_CHILD_STATE "status.childState" -#define PN_ANT_STATUS_MESSAGE "status.message" -#define PN_ANT_STATUS_LEAF "status.leaf" -#define PN_ANT_RCUX "RCUX" -#define PN_ANT_RCUY "RCUY" -#define PN_ANT_DELTAX "deltaX" -#define PN_ANT_DELTAY "deltaY" -#define PN_ANT_DELTAH "deltaH" +#define PN_CLC_REQUESTED_BITMODE "requestedBitmode" +#define PN_CLC_ACTUAL_BITMODE "actualBitmode" // StnObservation #define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" @@ -302,6 +413,9 @@ #define PN_OBS_NAME "name" #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" +#define PN_OBS_RECEIVER_BITMAP "receiverBitmap" +#define PN_OBS_HBA_BITMAP "HBABitmap" +#define PN_OBS_LBA_BITMAP "LBABitmap" // BeamControl #define PSN_BEAM_CONTROL "LOFAR_ObsSW_@observation@_BeamControl" @@ -338,5 +452,6 @@ #define PN_TBC_TRIGGER_PEAK_VALUE "trigger.peakValue" #define PN_TBC_TRIGGER_FLAGS "trigger.flags" #define PN_TBC_TRIGGER_TABLE "trigger.table" +#define PN_TBC_TRIGGER_MISSED "trigger.missed" #endif diff --git a/MAC/APL/StationCU/src/StationControl/StationControl.cc b/MAC/APL/StationCU/src/StationControl/StationControl.cc index a385c05b0db..26f69d44602 100644 --- a/MAC/APL/StationCU/src/StationControl/StationControl.cc +++ b/MAC/APL/StationCU/src/StationControl/StationControl.cc @@ -27,11 +27,13 @@ #include <Common/LofarLogger.h> #include <Common/LofarLocators.h> #include <Common/LofarConstants.h> +#include <Common/StreamUtil.h> #include <Common/SystemUtil.h> #include <Common/Version.h> #include <ApplCommon/LofarDirs.h> #include <ApplCommon/StationConfig.h> #include <ApplCommon/StationInfo.h> +#include <ApplCommon/AntennaSets.h> #include <Common/ParameterSet.h> #include <GCF/PVSS/GCF_PVTypes.h> @@ -124,8 +126,8 @@ StationControl::StationControl(const string& cntlrName) : itsRCUmask.reset(); itsTBmask.reset(); - LOG_DEBUG_STR("sizeof itsLBArcumask: " << itsLBArcumask.size()); - LOG_DEBUG_STR("sizeof itsHBArcumask: " << itsHBArcumask.size()); + LOG_DEBUG_STR("sizeof itsLBAmask: " << itsLBAmask.size()); + LOG_DEBUG_STR("sizeof itsHBAmask: " << itsHBAmask.size()); LOG_DEBUG_STR("sizeof itsRCUmask: " << itsRCUmask.size()); LOG_DEBUG_STR("sizeof itsTBmask: " << itsTBmask.size()); } @@ -238,27 +240,51 @@ GCFEvent::TResult StationControl::initial_state(GCFEvent& event, itsClockPSinitialized = true; LOG_DEBUG ("Attached to external propertySets"); + // Obtain initial clock value GCFPVInteger clockVal; itsClockPropSet->getValue(PN_CLC_REQUESTED_CLOCK, clockVal); if (clockVal.getValue() != 0) { itsClock = clockVal.getValue(); - LOG_DEBUG_STR("Clock in PVSS has value: " << itsClock); + LOG_INFO_STR("Clock in PVSS has value: " << itsClock); } else { // try actual clock itsClockPropSet->getValue(PN_CLC_ACTUAL_CLOCK, clockVal); if (clockVal.getValue() == 0) { - // both DB values are 0, fall back to 160 - LOG_DEBUG("Clock settings in the database are all 0, setting 160 as default"); - itsClock = 160; + // both DB values are 0, fall back to 200 + LOG_WARN("Clock settings in the database are all 0, setting 200 as default"); + itsClock = 200; itsClockPropSet->setValue(PN_CLC_REQUESTED_CLOCK, GCFPVInteger(itsClock)); } else { itsClock = clockVal.getValue(); - LOG_DEBUG_STR("Actual clock in PVSS has value: " << itsClock << " applying that value"); + LOG_INFO_STR("Actual clock in PVSS has value: " << itsClock << " applying that value"); itsClockPropSet->setValue(PN_CLC_REQUESTED_CLOCK, clockVal); } } + + // Obtain initial bitmode value + GCFPVInteger bitmodeVal; + itsClockPropSet->getValue(PN_CLC_REQUESTED_BITMODE, bitmodeVal); + if (bitmodeVal.getValue() != 0) { + itsBitmode = bitmodeVal.getValue(); + LOG_INFO_STR("Bitmode in PVSS has value: " << itsBitmode); + } + else { + // try actual bitmode + itsClockPropSet->getValue(PN_CLC_ACTUAL_BITMODE, bitmodeVal); + if (bitmodeVal.getValue() == 0) { + // both DB values are 0, fall back to 16 + LOG_WARN("Bitmode settings in the database are all 0, setting 16 as default"); + itsBitmode = 16; + itsClockPropSet->setValue(PN_CLC_REQUESTED_BITMODE, GCFPVInteger(itsBitmode)); + } + else { + itsBitmode = bitmodeVal.getValue(); + LOG_INFO_STR("Actual bitmode in PVSS has value: " << itsBitmode << " applying that value"); + itsClockPropSet->setValue(PN_CLC_REQUESTED_BITMODE, bitmodeVal); + } + } LOG_DEBUG ("Going to connect state to attach to ClockController"); TRAN(StationControl::connect_state); // go to next state. @@ -443,6 +469,10 @@ GCFEvent::TResult StationControl::subscribe2HWstates(GCFEvent& event, GCFPortInt TRAN(StationControl::operational_state); // go to next state. } break; + + case DP_CHANGED: + _databaseEventHandler(event); + break; default: status = GCFEvent::NOT_HANDLED; @@ -499,6 +529,10 @@ GCFEvent::TResult StationControl::subscribe2Splitters(GCFEvent& event, GCFPortIn LOG_INFO("Going to operational mode"); TRAN(StationControl::operational_state); // go to next state. break; + + case DP_CHANGED: + _databaseEventHandler(event); + break; default: status = GCFEvent::NOT_HANDLED; @@ -573,6 +607,14 @@ GCFEvent::TResult StationControl::operational_state(GCFEvent& event, GCFPortInte LOG_TRACE_FLOW("Dispatch to observation FSM's"); theObs->second->doEvent(event, port); LOG_TRACE_FLOW("Back from dispatch"); + + // check if observation is still running after this timer. + if (theObs->second->curState() == CTState::QUITED && theObs->second->isReady()) { + sendControlResult(*itsParentPort, CONTROL_QUIT, theObs->second->getName(), CT_RESULT_LOST_CONNECTION); + LOG_DEBUG_STR("Removing " << theObs->second->getName() << " from the administration due to premature quit"); + delete theObs->second; + itsObsMap.erase(theObs); + } } break; @@ -660,7 +702,7 @@ GCFEvent::TResult StationControl::operational_state(GCFEvent& event, GCFPortInte // check if all actions for this event are finished. vector<ChildControl::StateInfo> cntlrStates = itsChildControl->getPendingRequest("", treeID); -LOG_TRACE_FLOW_STR("There are " << cntlrStates.size() << " busy controllers"); + LOG_TRACE_FLOW_STR("There are " << cntlrStates.size() << " busy controllers"); if (cntlrStates.empty()) { // no pending requests? Ready. if (event.signal != CONTROL_QUITED) { sendControlResult(*itsParentPort, event.signal, cntlrName, CT_RESULT_NO_ERROR); @@ -704,7 +746,6 @@ LOG_TRACE_FLOW_STR("There are " << cntlrStates.size() << " busy controllers"); return (status); } - // // startObservation_state(event,port) // @@ -714,36 +755,20 @@ GCFEvent::TResult StationControl::startObservation_state(GCFEvent& event, GCFPor { LOG_DEBUG_STR("startObservation: " << eventName(event) << "@" << port.getName()); + /* + * Several parts of the station (clock, splitters, bitmode..) need to be configured in sequence, and can take + * a while to stabilise. This is implemented by sequencing the station configuration in using F_TIMER. Every time + * the timer is triggered, the next configuration step is performed, after which an ACK event defers back to the + * timer to perform the next step. + */ + switch (event.signal) { case CONTROL_CLAIM: { - // Clock changes are done in the claim state and require an extra action - if (itsClock != itsStartingObs->second->obsPar()->sampleClock) { - // Check if all others obs are down otherwise we may not switch the clock - CONTROLCommonEvent ObsEvent(event); // we just need the name - uint16 instanceNr = getInstanceNr(ObsEvent.cntlrName); - OTDBtreeIDType treeID = getObservationNr(ObsEvent.cntlrName); - string cntlrName = controllerName(CNTLRTYPE_STATIONCTRL, instanceNr, treeID); - if (itsObsMap.size() != 1) { - LOG_FATAL_STR("Need to switch the clock to " << itsStartingObs->second->obsPar()->sampleClock << - " for observation " << treeID << " but there are still " << itsObsMap.size()-1 << - " other observations running at clockspeed" << itsClock << "."); - _abortObservation(itsStartingObs); - itsStartingObs = itsObsMap.end(); - TRAN(StationControl::operational_state); - break; - } - // its OK to switch te clock - itsClock = itsStartingObs->second->obsPar()->sampleClock; - LOG_DEBUG_STR ("Changing clock to " << itsClock); - CLKCTRLSetClockEvent setClock; - setClock.clock = itsClock; - itsClkCtrlPort->send(setClock); // results in CLKCTRL_SET_CLOCK_ACK - itsClockPropSet->setValue(PN_CLC_REQUESTED_CLOCK,GCFPVInteger(itsClock)); - } - else { - LOG_INFO_STR("new observation also uses clock " << itsClock); - itsTimerPort->setTimer(0.0); // goto set splitter section - } + // defer the setup to the timer event + itsSetupSequence = 0; + + itsTimerPort->setTimer(0.0); + break; } break; @@ -758,31 +783,24 @@ GCFEvent::TResult StationControl::startObservation_state(GCFEvent& event, GCFPor } // clock was set succesfully, give clock 5 seconds to stabilize LOG_INFO("Stationclock is changed, waiting 5 seconds to let the clock stabilize"); + itsTimerPort->setTimer(5.0); } break; - case F_TIMER: { - StationConfig sc; - if (!sc.hasSplitters) { - LOG_INFO_STR("Ignoring splitter settings because we don't have splitters"); - // finally send a CLAIM event to the observation - LOG_TRACE_FLOW("Dispatch CLAIM event to observation FSM's."); - CONTROLClaimEvent claimEvent; - itsStartingObs->second->doEvent(claimEvent, port); - - LOG_INFO("Going back to operational state."); + case CLKCTRL_SET_BITMODE_ACK: { + CLKCTRLSetBitmodeAckEvent ack(event); + if (ack.status != CLKCTRL_NO_ERR) { + LOG_FATAL_STR("Unable to set the bitmode to " << itsBitmode << "."); + _abortObservation(itsStartingObs); itsStartingObs = itsObsMap.end(); TRAN(StationControl::operational_state); break; } + // bitmode was set succesfully + LOG_INFO("Stationbitmode is changed"); - // set the splitters in the right state. - bool splitterState = itsStartingObs->second->obsPar()->splitterOn; - LOG_DEBUG_STR ("Setting the splitters to " << (splitterState ? "ON" : "OFF")); - CLKCTRLSetSplittersEvent setEvent; - setEvent.splittersOn = splitterState; - itsClkCtrlPort->send(setEvent); // will result in CLKCTRL_SET_SPLITTERS_ACK + itsTimerPort->setTimer(0.0); } break; @@ -791,23 +809,107 @@ GCFEvent::TResult StationControl::startObservation_state(GCFEvent& event, GCFPor bool splitterState = itsStartingObs->second->obsPar()->splitterOn; if (ack.status != CLKCTRL_NO_ERR) { LOG_FATAL_STR("Unable to set the splittters to " << (splitterState ? "ON" : "OFF")); - _abortObservation(itsStartingObs); - itsStartingObs = itsObsMap.end(); - TRAN(StationControl::operational_state); - break; - } - - itsSplitters = splitterState; - sleep (2); // give splitters time to stabilize. - - // finally send a CLAIM event to the observation - LOG_TRACE_FLOW("Dispatch CLAIM event to observation FSM's"); - CONTROLClaimEvent claimEvent; - itsStartingObs->second->doEvent(claimEvent, port); - - LOG_INFO("Going back to operational state"); - itsStartingObs = itsObsMap.end(); - TRAN(StationControl::operational_state); + } else { + itsSplitters = splitterState; + } + + // give splitters time to stabilize. + itsTimerPort->setTimer(2.0); + } + break; + + case F_TIMER: { + switch (itsSetupSequence++) { + case 0: { + // Set the clock + if (itsClock != itsStartingObs->second->obsPar()->sampleClock) { + // Check if all others obs are down otherwise we may not switch the clock + if (itsObsMap.size() != 1) { + CONTROLCommonEvent ObsEvent(event); // we just need the name + OTDBtreeIDType treeID = getObservationNr(ObsEvent.cntlrName); + + LOG_FATAL_STR("Need to switch the clock to " << itsStartingObs->second->obsPar()->sampleClock << + " for observation " << treeID << " but there are still " << itsObsMap.size()-1 << + " other observations running at clockspeed" << itsClock << "."); + _abortObservation(itsStartingObs); + itsStartingObs = itsObsMap.end(); + TRAN(StationControl::operational_state); + break; + } + // its OK to switch te clock + itsClock = itsStartingObs->second->obsPar()->sampleClock; + LOG_DEBUG_STR ("Changing clock to " << itsClock); + CLKCTRLSetClockEvent setClock; + setClock.clock = itsClock; + itsClkCtrlPort->send(setClock); // results in CLKCTRL_SET_CLOCK_ACK + itsClockPropSet->setValue(PN_CLC_REQUESTED_CLOCK,GCFPVInteger(itsClock)); + } + else { + LOG_INFO_STR("new observation also uses clock " << itsClock); + itsTimerPort->setTimer(0.0); + } + } + + case 1: { + // Set the splitters + StationConfig sc; + if (!sc.hasSplitters) { + LOG_INFO_STR("Ignoring splitter settings because we don't have splitters"); + + itsTimerPort->setTimer(0.0); + break; + } + + // set the splitters in the right state. + bool splitterState = itsStartingObs->second->obsPar()->splitterOn; + LOG_DEBUG_STR ("Setting the splitters to " << (splitterState ? "ON" : "OFF")); + CLKCTRLSetSplittersEvent setEvent; + setEvent.splittersOn = splitterState; + itsClkCtrlPort->send(setEvent); // will result in CLKCTRL_SET_SPLITTERS_ACK + } + + case 2: { + // Set the bit mode + if (itsBitmode != itsStartingObs->second->obsPar()->bitsPerSample) { + // Check if all others obs are down otherwise we may not switch the bitmode + if (itsObsMap.size() != 1) { + CONTROLCommonEvent ObsEvent(event); // we just need the name + OTDBtreeIDType treeID = getObservationNr(ObsEvent.cntlrName); + + LOG_FATAL_STR("Need to switch the bitmode to " << itsStartingObs->second->obsPar()->bitsPerSample << + " for observation " << treeID << " but there are still " << itsObsMap.size()-1 << + " other observations running at bitmodespeed" << itsBitmode << "."); + _abortObservation(itsStartingObs); + itsStartingObs = itsObsMap.end(); + TRAN(StationControl::operational_state); + break; + } + + // its OK to switch the bitmode + itsBitmode = itsStartingObs->second->obsPar()->bitsPerSample; + LOG_DEBUG_STR ("Changing bitmode to " << itsBitmode); + CLKCTRLSetBitmodeEvent setBitmode; + setBitmode.bits_per_sample = itsBitmode; + itsClkCtrlPort->send(setBitmode); // results in CLKCTRL_SET_BITMODE_ACK + itsClockPropSet->setValue(PN_CLC_REQUESTED_BITMODE,GCFPVInteger(itsBitmode)); + } + else { + LOG_INFO_STR("new observation also uses bitmode " << itsBitmode); + itsTimerPort->setTimer(0.0); + } + } + + default: { + // finally send a CLAIM event to the observation + LOG_TRACE_FLOW("Dispatch CLAIM event to observation FSM's"); + CONTROLClaimEvent claimEvent; + itsStartingObs->second->doEvent(claimEvent, port); + + LOG_INFO("Going back to operational state"); + itsStartingObs = itsObsMap.end(); + TRAN(StationControl::operational_state); + } + } } break; @@ -893,18 +995,32 @@ void StationControl::_databaseEventHandler(GCFEvent& event) DPChangedEvent dpEvent(event); if (strstr(dpEvent.DPname.c_str(), PN_CLC_REQUESTED_CLOCK) != 0) { itsClock = ((GCFPVInteger*)(dpEvent.value._pValue))->getValue(); - LOG_DEBUG_STR("Received (requested)clock change from PVSS, clock is now " << itsClock); + LOG_INFO_STR("Received (requested)clock change from PVSS, clock is now " << itsClock); break; } - // during startup we adopt the value set by the Clockcontroller. + // during startup we adopt the value set by the ClockController. if (strstr(dpEvent.DPname.c_str(), PN_CLC_ACTUAL_CLOCK) != 0) { itsClock = ((GCFPVInteger*)(dpEvent.value._pValue))->getValue(); - LOG_DEBUG_STR("Received (actual)clock change from PVSS, clock is now " << itsClock); + LOG_INFO_STR("Received (actual)clock change from PVSS, bitmode is now " << itsClock); _abortObsWithWrongClock(); break; } + if (strstr(dpEvent.DPname.c_str(), PN_CLC_REQUESTED_BITMODE) != 0) { + itsBitmode = ((GCFPVInteger*)(dpEvent.value._pValue))->getValue(); + LOG_INFO_STR("Received (requested)bitmode change from PVSS, bitmode is now " << itsBitmode); + break; + } + + // during startup we adopt the value set by the ClockController. + if (strstr(dpEvent.DPname.c_str(), PN_CLC_ACTUAL_BITMODE) != 0) { + itsBitmode = ((GCFPVInteger*)(dpEvent.value._pValue))->getValue(); + LOG_INFO_STR("Received (actual)bitmode change from PVSS, bitmode is now " << itsBitmode); + _abortObsWithWrongBitmode(); + break; + } + // don't watch state and error fields. if ((strstr(dpEvent.DPname.c_str(), PN_OBJ_STATE) != 0) || (strstr(dpEvent.DPname.c_str(), PN_FSM_ERROR) != 0) || @@ -927,6 +1043,7 @@ void StationControl::_handleQueryEvent(GCFEvent& event) { LOG_TRACE_FLOW_STR ("_handleQueryEvent:" << eventName(event)); + // Check for errors DPQueryChangedEvent DPevent(event); if (DPevent.result != SA_NO_ERROR) { LOG_ERROR_STR("PVSS reported error " << DPevent.result << " for a query " << @@ -934,6 +1051,7 @@ void StationControl::_handleQueryEvent(GCFEvent& event) return; } + // Remember Query ID if not done before. if (!itsStateQryID) { itsStateQryID = DPevent.QryID; } @@ -941,6 +1059,7 @@ void StationControl::_handleQueryEvent(GCFEvent& event) // The selected datapoints are delivered with full PVSS names, like: // CS001:LOFAR_PIC_Cabinet0_Subrack0_RSPBoard0_RCU5.status.state // CS001:LOFAR_PIC_Cabinet0_Subrack0_RSPBoard0.splitterOn + // CS001:LOFAR_PIC_LBA000.status.state // Each event may contain more than one DP. int nrDPs = ((GCFPVDynArr*)(DPevent.DPnames._pValue))->getValue().size(); GCFPVDynArr* DPnames = (GCFPVDynArr*)(DPevent.DPnames._pValue); @@ -957,14 +1076,65 @@ void StationControl::_handleQueryEvent(GCFEvent& event) LOG_DEBUG_STR("QryUpdate: DP=" << nameStr << ", value=" << newState); + // test for LBA + if ((pos = nameStr.find("PIC_LBA")) != string::npos) { + uint antNr; + if (sscanf(nameStr.substr(pos).c_str(), "PIC_LBA%u.status.state", &antNr) != 1) { + LOG_ERROR_STR("Cannot determine address of " << nameStr << + ". AVAILABILITY OF ANTENNA'S MIGHT NOT BE UP TO DATE ANYMORE"); + continue; + } + if (antNr >= itsNrLBAs) { + LOG_ERROR_STR("LBA antenna number " << antNr << " is out of range!!!"); + continue; + } + + LOG_INFO_STR("New state of LBA " << antNr << " is " << newState); + // LBA's in de mode OFF and OPERATIONAL may be used in observations. + if (newState == modeOff || newState == modeOperational) { + itsLBAmask.set(antNr); + } + else { // all other modes + itsLBAmask.reset(antNr); + } + } // PIC_LBA + + // test for HBA + if ((pos = nameStr.find("PIC_HBA")) != string::npos) { + uint antNr; + if (sscanf(nameStr.substr(pos).c_str(), "PIC_HBA%u.status.state", &antNr) != 1) { + LOG_ERROR_STR("Cannot determine address of " << nameStr << + ". AVAILABILITY OF ANTENNA'S MIGHT NOT BE UP TO DATE ANYMORE"); + continue; + } + if (antNr >= itsNrHBAs) { + LOG_ERROR_STR("HBA antenna number " << antNr << " is out of range!!!"); + continue; + } + + LOG_INFO_STR("New state of HBA " << antNr << " is " << newState); + // HBA's in de mode OFF and OPERATIONAL may be used in observations. + if (newState == modeOff || newState == modeOperational) { + itsHBAmask.set(antNr); + } + else { // all other modes + itsHBAmask.reset(antNr); + } + } // PIC_HBA + // test for RCU if ((pos = nameStr.find("_RCU")) != string::npos) { - int rcu; - if (sscanf(nameStr.substr(pos).c_str(), "_RCU%d.status.state", &rcu) != 1) { + uint rcu; + if (sscanf(nameStr.substr(pos).c_str(), "_RCU%u.status.state", &rcu) != 1) { LOG_ERROR_STR("Cannot determine address of " << nameStr << ". AVAILABILITY OF ANTENNA'S MIGHT NOT BE UP TO DATE ANYMORE"); continue; } + if (rcu >= itsNrRCUs) { + LOG_ERROR_STR("RCU number " << rcu << " is out of range!!!"); + continue; + } + LOG_INFO_STR("New state of RCU " << rcu << " is " << newState); // RCU's in de mode OFF and OPERATIONAL may be used in observations. if (newState == modeOff || newState == modeOperational) { @@ -973,22 +1143,24 @@ void StationControl::_handleQueryEvent(GCFEvent& event) else { // all other modes itsRCUmask.reset(rcu); } - } + } // _RCU // test for RSPBoard else if ((pos = nameStr.find("_RSPBoard")) != string::npos) { - int rsp; + uint rsp; if (nameStr.find(".status.state") != string::npos) { - if (sscanf(nameStr.substr(pos).c_str(), "_RSPBoard%d.status.state", &rsp) == 1) { + if (sscanf(nameStr.substr(pos).c_str(), "_RSPBoard%u.status.state", &rsp) == 1) { + if (rsp >= itsNrRSPs) { + LOG_ERROR_STR("RSP board number " << rsp << " is out of range!!!"); + continue; + } LOG_INFO_STR("New state of RSPBoard " << rsp << " is " << newState); int rcubase = rsp * NR_RCUS_PER_RSPBOARD; for (int i = 0; i < NR_RCUS_PER_RSPBOARD; i++) { if (newState != RTDB_OBJ_STATE_OPERATIONAL) { itsRCUmask.reset(rcubase + i); } - else { - itsRCUmask.set(rcubase + i); - } + // no else: never mark an RCU operational on the state of an RSPBoard. } } } @@ -998,7 +1170,11 @@ void StationControl::_handleQueryEvent(GCFEvent& event) itsSplitterQryID = DPevent.QryID; } - if (sscanf(nameStr.substr(pos).c_str(), "_RSPBoard%d.splitterOn", &rsp) == 1) { + if (sscanf(nameStr.substr(pos).c_str(), "_RSPBoard%u.splitterOn", &rsp) == 1) { + if (rsp >= itsNrRSPs) { + LOG_ERROR_STR("RSP boardnumber " << rsp << " is out of range!!!"); + continue; + } if (itsSplitters[rsp] != (newState ? true : false)) { LOG_INFO_STR("New setting of splitter " << rsp << " is " << (newState ? "on" : "off")); if (newState) { @@ -1015,16 +1191,20 @@ void StationControl::_handleQueryEvent(GCFEvent& event) ". STATE OF ANTENNA'S OR SPLITTERS MIGHT NOT BE UP TO DATE ANYMORE"); continue; } - } + } // _RSPBoard // test for TBBoard else if ((pos = nameStr.find("_TBBoard")) != string::npos) { - int tbb; - if (sscanf(nameStr.substr(pos).c_str(), "_TBBoard%d.status.state", &tbb) != 1) { + uint tbb; + if (sscanf(nameStr.substr(pos).c_str(), "_TBBoard%u.status.state", &tbb) != 1) { LOG_ERROR_STR("Cannot determine address of " << nameStr << ". AVAILABILITY OF TBBOARD'S MIGHT NOT BE UP TO DATE ANYMORE"); continue; } + if (tbb >= itsNrTBBs) { + LOG_ERROR_STR("TB boardnumber " << tbb << " is out of range!!!"); + continue; + } LOG_INFO_STR("New state of TBBoard " << tbb << " is " << newState); if (newState != RTDB_OBJ_STATE_OPERATIONAL) { itsTBmask.reset(tbb); @@ -1032,14 +1212,17 @@ void StationControl::_handleQueryEvent(GCFEvent& event) else { itsTBmask.set(tbb); } - } + } // _TBBoard else { LOG_DEBUG_STR("State of unknown component received: " << nameStr); } } // for - _updateAntennaMasks(); // translate new RCU mask to the LBA and HBA masks. + if (itsHasSplitters && itsSplitters.count() != 0 && itsSplitters.count() != itsNrRSPs) { + LOG_WARN_STR("Not all splitters have the same state! " << itsSplitters); + // TODO: ring some bells in the Navigator? + } } @@ -1085,16 +1268,49 @@ uint16 StationControl::_addObservation(const string& name) // As base we use the definition of the AntennaSetsfile which we limit to the // receivers specified by the user (if any). Finally we can optionally correct // this set with the 'realtime' availability of the receivers. - StationConfig config; - Observation::RCUset_t definedReceivers = itsAntSet->RCUallocation(theObs.antennaSet); - Observation::RCUset_t userReceivers = theObs.getRCUbitset(config.nrLBAs, config.nrHBAs, theObs.antennaSet); - Observation::RCUset_t realReceivers = definedReceivers & userReceivers; + StationConfig config; + bool onLBAField(itsAntSet->usesLBAfield(theObs.antennaSet)); + RCUmask_t definedReceivers = (onLBAField ? itsAntSet->LBAallocation(theObs.antennaSet) + : itsAntSet->HBAallocation(theObs.antennaSet)); + RCUmask_t userReceivers = theObs.getRCUbitset(config.nrLBAs, config.nrHBAs, theObs.antennaSet); + RCUmask_t realReceivers = definedReceivers & userReceivers; LOG_DEBUG_STR("definedReceivers =" << definedReceivers); LOG_DEBUG_STR("userReceivers =" << userReceivers); LOG_DEBUG_STR("def&userReceivers=" << realReceivers); + // Before optionally applying the current hardware status make bitmap strings for PVSS. + string LBAbitmap; + string HBAbitmap; + LBAbitmap.resize(config.nrLBAs,'0'); + HBAbitmap.resize(config.nrHBAs,'0'); + if (onLBAField) { + for (int i(0); i < config.nrLBAs; i++) { + if (realReceivers[2*i] || realReceivers[2*i+1]) { + LBAbitmap[i] ='1'; + } + } + } + else { + for (int i(0); i < config.nrHBAs; i++) { + if (realReceivers[2*i] || realReceivers[2*i+1]) { + HBAbitmap[i] ='1'; + } + } + } + // apply the current state of the hardware to the desired selection when user likes that. if (itsUseHWinfo) { - realReceivers &= itsRCUmask; + vector<int> *mappingPtr = onLBAField ? &itsLBAmapping : &itsHBAmapping; + AntennaMask_t antBitSet = onLBAField ? itsLBAmask : itsHBAmask; + for (int rcu = 0; rcu < MAX_RCUS; rcu++) { + int idx((*mappingPtr)[rcu]); + if (!realReceivers[rcu] || idx<0 || !antBitSet[idx] || !itsRCUmask[rcu]) { + realReceivers.reset(rcu); + if (idx >= 0 && !antBitSet[idx]) { + LOG_INFO_STR("Rejecting RCU " << rcu << " because Antenna is out of order"); + } + } + } +LOG_DEBUG_STR("final receivers =" << realReceivers); // Write the corrected set back into the ParameterSetfile. string prefix = theObsPS.locateModule("Observation") + "Observation."; // save original under different name (using 'replace' is 'add' w. simplified testing) @@ -1110,7 +1326,7 @@ LOG_DEBUG_STR("def&userReceivers=" << realReceivers); // create an activeObservation object that will manage the child controllers. - ActiveObs* theNewObs = new ActiveObs(name, (State)&ActiveObs::initial, &theObsPS, itsHasSplitters, *this); + ActiveObs* theNewObs = new ActiveObs(name, (State)&ActiveObs::initial, &theObsPS, LBAbitmap, HBAbitmap, itsHasSplitters, *this); if (!theNewObs) { LOG_FATAL_STR("Unable to create the Observation '" << name << "'"); return (CT_RESULT_UNSPECIFIED); @@ -1167,6 +1383,25 @@ void StationControl::_abortObsWithWrongClock() } } +// +// _abortObsWithWrongBitmode() +// +void StationControl::_abortObsWithWrongBitmode() +{ + LOG_DEBUG_STR("Checking if all observations use bitmode " << itsBitmode); + + ObsIter iter = itsObsMap.begin(); + ObsIter end = itsObsMap.end(); + while (iter != end) { + if (iter->second->obsPar()->bitsPerSample != itsBitmode) { + LOG_FATAL_STR("Aborting observation " << getObservationNr(iter->second->getName()) << + " because the bitmode was (manually?) changed!"); + _abortObservation(iter); + } + ++iter; + } +} + // // _initAntennaMasks // @@ -1175,27 +1410,48 @@ void StationControl::_abortObsWithWrongClock() void StationControl::_initAntennaMasks() { // reset all variables - itsLBArcumask.reset(); - itsHBArcumask.reset(); + itsLBAmask.reset(); + itsHBAmask.reset(); // Adopt values from RemoteStation.conf StationConfig SC; - itsNrRSPboards = SC.nrRSPs; - itsNrLBAs = SC.nrLBAs; - itsNrHBAs = SC.nrHBAs; + itsNrRSPs = SC.nrRSPs; + itsNrTBBs = SC.nrRSPs; + itsNrLBAs = SC.nrLBAs; + itsNrHBAs = SC.nrHBAs; + itsNrRCUs = SC.nrRSPs * NR_RCUS_PER_RSPBOARD; itsHasSplitters= SC.hasSplitters; - ASSERTSTR (2*itsNrLBAs <= itsLBArcumask.size() && - 2*itsNrHBAs <= itsHBArcumask.size(), "Number of antennas exceed expected count"); - - // set the right bits. - for (uint i = 0; i < itsNrLBAs; i++) { - itsLBArcumask.set(2*i); - itsLBArcumask.set(2*i+1); - } - for (uint i = 0; i < itsNrHBAs; i++) { - itsHBArcumask.set(2*i); - itsHBArcumask.set(2*i+1); + ASSERTSTR (itsNrLBAs <= itsLBAmask.size() && + itsNrHBAs <= itsHBAmask.size(), "Number of antennas exceed expected count"); + + // Setup mapping from LBA antennas and HBA antennas to RCU numbers. + // itsxBAmapping(antNr,*) contains the + itsLBAmapping.resize(MAX_RCUS, -1); // 192 + itsHBAmapping.resize(MAX_RCUS, -1); + for (int ant = 0; ant < (int)MAX_ANTENNAS; ant++) { + if (ant < (int)itsNrHBAs) { + itsHBAmapping[N_POL*ant] = ant; + itsHBAmapping[N_POL*ant+1] = ant; + } + if (ant < (int)itsNrLBAs) { + if (ant > (int)itsNrRSPs * (int)NR_ANTENNAS_PER_RSPBOARD) { + itsLBAmapping[N_POL*ant+1 - (NR_RCUS_PER_RSPBOARD*itsNrRSPs)] = ant; + itsLBAmapping[N_POL*ant - (NR_RCUS_PER_RSPBOARD*itsNrRSPs)] = ant; + } + else { + itsLBAmapping[N_POL*ant] = ant; + itsLBAmapping[N_POL*ant+1] = ant; + } + } + } + { stringstream oss; + writeVector(oss, itsLBAmapping); + LOG_DEBUG_STR("LBAmap: " << oss.str()); + } + { stringstream oss; + writeVector(oss, itsHBAmapping); + LOG_DEBUG_STR("HBAmap: " << oss.str()); } // The masks are now initialized with the static information. The _handleQueryEvent routine @@ -1203,51 +1459,6 @@ void StationControl::_initAntennaMasks() // correct and latest state. } -// -// _updateAntennaMasks() -// -// Translates the RCU mask to the LBA and HBA masks. -// This routine is familiar with mapping of the antennas on the RCU's. -// -void StationControl::_updateAntennaMasks() -{ - // setup constants - bool doubleMappedLBA (itsNrLBAs > (itsNrRSPboards * NR_ANTENNAS_PER_RSPBOARD)); - int doubleMapRCUoffset (itsNrRSPboards * NR_RCUS_PER_RSPBOARD); - - // Note: the definition in StationControl.h and the ASSERT in _initAntennaMasks assure - // that we never exceed the boundaries of the bitmaps here. - for (int rcu = 0; rcu < MAX_RCUS/2 ; rcu+=2) { - if (itsRCUmask[rcu] && itsRCUmask[rcu+1]) { // X and Y - itsLBArcumask.set(rcu); - itsLBArcumask.set(rcu+1); - if (doubleMappedLBA) { - itsLBArcumask.set(doubleMapRCUoffset+rcu); - itsLBArcumask.set(doubleMapRCUoffset+rcu+1); - } - itsHBArcumask.set(rcu); - itsHBArcumask.set(rcu+1); - } - else { - itsLBArcumask.reset(rcu); - itsLBArcumask.reset(rcu+1); - if (doubleMappedLBA) { - itsLBArcumask.reset(doubleMapRCUoffset+rcu); - itsLBArcumask.reset(doubleMapRCUoffset+rcu+1); - } - itsHBArcumask.reset(rcu); - itsHBArcumask.reset(rcu+1); - } - } - LOG_DEBUG_STR("itsRCU:" << string(itsRCUmask.to_string<char,char_traits<char>,allocator<char> >())); - LOG_DEBUG_STR("itsLBA:" << string(itsLBArcumask.to_string<char,char_traits<char>,allocator<char> >())); - LOG_DEBUG_STR("itsHBA:" << string(itsHBArcumask.to_string<char,char_traits<char>,allocator<char> >())); - - if (itsHasSplitters && itsSplitters.count() != 0 && itsSplitters.count() != itsNrRSPboards) { - LOG_WARN_STR("Not all splitters have the same state! " << itsSplitters); - // TODO: ring some bells in the Navigator? - } -} // // _searchObsByTimerID(timerID) diff --git a/MAC/APL/StationCU/src/StationControl/StationControl.h b/MAC/APL/StationCU/src/StationControl/StationControl.h index 342cada054c..b5eef6b10ee 100644 --- a/MAC/APL/StationCU/src/StationControl/StationControl.h +++ b/MAC/APL/StationCU/src/StationControl/StationControl.h @@ -31,6 +31,7 @@ #include <Common/LofarConstants.h> #include <ApplCommon/Observation.h> #include <ApplCommon/AntennaSets.h> +#include <ApplCommon/StationDatatypes.h> //# ACC Includes #include <Common/ParameterSet.h> @@ -96,11 +97,11 @@ private: // helper methods void _initAntennaMasks (); - void _updateAntennaMasks (); void _updateObsListInPVSS (); uint16 _addObservation (const string& name); void _abortObservation (ObsIter theObs); void _abortObsWithWrongClock(); + void _abortObsWithWrongBitmode(); void _disconnectedHandler (GCFPortInterface& port); void _databaseEventHandler(GCFEvent& event); void _handleQueryEvent (GCFEvent& event); @@ -137,21 +138,27 @@ private: uint32 itsInstanceNr; time_t itsStartTime; // timestamp the controller was started int32 itsClock; + int32 itsBitmode; map<string, ActiveObs*> itsObsMap; // current running observations ObsIter itsStartingObs; // the Obs that is being started is this moment. // Availability information of Antenna's and circuit boards. bool itsUseHWinfo; - bitset<MAX_RCUS> itsLBArcumask; - bitset<MAX_RCUS> itsHBArcumask; - bitset<MAX_RCUS> itsRCUmask; + RCUmask_t itsRCUmask; + AntennaMask_t itsLBAmask; + AntennaMask_t itsHBAmask; bitset<MAX_RCUS / NR_RCUS_PER_TBBOARD> itsTBmask; uint32 itsNrLBAs; uint32 itsNrHBAs; - uint32 itsNrRSPboards; + uint32 itsNrRCUs; + uint32 itsNrRSPs; + uint32 itsNrTBBs; bool itsHasSplitters; bitset<MAX_RSPBOARDS> itsSplitters; // On or Off. + vector<int> itsLBAmapping; + vector<int> itsHBAmapping; + unsigned itsSetupSequence; }; };//StationCU diff --git a/MAC/APL/StationCU/src/StationControl/StationControlMain.cc b/MAC/APL/StationCU/src/StationControl/StationControlMain.cc index 9773aeab400..38ff113ea9e 100644 --- a/MAC/APL/StationCU/src/StationControl/StationControlMain.cc +++ b/MAC/APL/StationCU/src/StationControl/StationControlMain.cc @@ -22,7 +22,6 @@ //# #include <lofar_config.h> #include <Common/LofarLogger.h> -#include <Common/Exception.h> #include <Common/SystemUtil.h> #include <APL/APLCommon/ChildControl.h> #include <APL/APLCommon/ParentControl.h> @@ -34,9 +33,6 @@ using namespace LOFAR::GCF::TM; using namespace LOFAR::APLCommon; using namespace LOFAR::StationCU; -// Use a terminate handler that can produce a backtrace. -Exception::TerminateHandler t(Exception::terminate); - int main(int argc, char* argv[]) { using LOFAR::basename; diff --git a/MAC/APL/StationCU/src/TBBControl/PVSSDatapointDefs.h b/MAC/APL/StationCU/src/TBBControl/PVSSDatapointDefs.h index 6cb9a56637b..9f83a52dda5 100644 --- a/MAC/APL/StationCU/src/TBBControl/PVSSDatapointDefs.h +++ b/MAC/APL/StationCU/src/TBBControl/PVSSDatapointDefs.h @@ -1,4 +1,4 @@ -// This file was generated by create_db_files v2.0 on Mon Apr 26 01:38:02 UTC 2010 +// This file was generated by create_db_files v2.0 on Tue Oct 9 13:22:37 UTC 2012 #ifndef LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H #define LOFAR_DEPLOYMENT_PVSSDATAPOINTS_H @@ -15,18 +15,6 @@ #define PN_OBJ_MESSAGE "object.message" #define PN_OBJ_LEAF "object.leaf" -// Station -#define PSN_STATION "LOFAR_PIC_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - -// Station -#define PSN_STATION "LOFAR_PermSW_@ring@_@station@" -#define PST_STATION "Station" -#define PN_STS_POWER48_ON "power48On" -#define PN_STS_POWER220_ON "power220On" - // MACScheduler #define PSN_MAC_SCHEDULER "LOFAR_PermSW_MACScheduler" #define PST_MAC_SCHEDULER "MACScheduler" @@ -37,6 +25,10 @@ #define PN_MS_OTDB_LAST_POLL "OTDB.lastPoll" #define PN_MS_OTDB_POLLINTERVAL "OTDB.pollinterval" +// CRTriggerControl +#define PSN_CR_TRIGGER_CONTROL "LOFAR_PermSW_CRTriggerControl" +#define PST_CR_TRIGGER_CONTROL "CRTriggerControl" + // Observation #define PSN_OBSERVATION "LOFAR_ObsSW_@observation@" #define PST_OBSERVATION "Observation" @@ -53,6 +45,9 @@ #define PN_OBS_SAMPLE_CLOCK "sampleClock" #define PN_OBS_RUN_STATE "runState" #define PN_OBS_MEASUREMENT_SET "measurementSet" +#define PN_OBS_PROCESS_TYPE "processType" +#define PN_OBS_PROCESS_SUBTYPE "processSubtype" +#define PN_OBS_STRATEGY "strategy" #define PN_OBS_STATION_LIST "stationList" #define PN_OBS_INPUT_NODE_LIST "inputNodeList" #define PN_OBS_BGL_NODE_LIST "BGLNodeList" @@ -60,24 +55,24 @@ #define PN_OBS_BEAMS_ANGLE1 "Beams.angle1" #define PN_OBS_BEAMS_ANGLE2 "Beams.angle2" #define PN_OBS_BEAMS_DIRECTION_TYPE "Beams.directionType" -#define PN_OBS_BEAMS_BEAMLET_LIST "Beams.beamletList" #define PN_OBS_BEAMS_SUBBAND_LIST "Beams.subbandList" +#define PN_OBS_TIED_ARRAY_BEAMS_BEAM_INDEX "TiedArrayBeams.beamIndex" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE1 "TiedArrayBeams.angle1" +#define PN_OBS_TIED_ARRAY_BEAMS_ANGLE2 "TiedArrayBeams.angle2" +#define PN_OBS_TIED_ARRAY_BEAMS_DIRECTION_TYPE "TiedArrayBeams.directionType" +#define PN_OBS_TIED_ARRAY_BEAMS_DISPERSION "TiedArrayBeams.dispersion" +#define PN_OBS_TIED_ARRAY_BEAMS_COHERENT "TiedArrayBeams.coherent" // ObservationControl #define PSN_OBSERVATION_CONTROL "LOFAR_ObsSW_@observation@_ObservationControl" #define PST_OBSERVATION_CONTROL "ObservationControl" - -// Adder -#define PSN_ADDER "@adder@" -#define PST_ADDER "Adder" -#define PN_ADD_DROPPING "dropping" -#define PN_ADD_NR_BLOCKS_DROPPED "nrBlocksDropped" -#define PN_ADD_LOG_LINE "logLine" +#define PN_OBSCTRL_COMMAND "command" // InputBuffer -#define PSN_INPUT_BUFFER "@inputbuffer@" +#define PSN_INPUT_BUFFER "LOFAR_PermSW_@psionode@_InputBuffer" #define PST_INPUT_BUFFER "InputBuffer" #define PN_IPB_STATION_NAME "stationName" +#define PN_IPB_OBSERVATION_NAME "observationName" #define PN_IPB_STREAM0_BLOCKS_IN "stream0.blocksIn" #define PN_IPB_STREAM0_PERC_BAD "stream0.percBad" #define PN_IPB_STREAM0_REJECTED "stream0.rejected" @@ -93,12 +88,55 @@ #define PN_IPB_LATE "late" #define PN_IPB_IO_TIME "IOTime" -// Storage -#define PSN_STORAGE "@storage@" -#define PST_STORAGE "Storage" -#define PN_STR_TIME "time" -#define PN_STR_COUNT "count" -#define PN_STR_DROPPED "dropped" +// Adder +#define PSN_ADDER "LOFAR_ObsSW_@osionode@_@adder@" +#define PST_ADDER "Adder" +#define PN_ADD_DROPPING "dropping" +#define PN_ADD_DROPPED "dropped" +#define PN_ADD_DATA_PRODUCT_TYPE "dataProductType" +#define PN_ADD_DATA_PRODUCT "dataProduct" +#define PN_ADD_FILE_NAME "fileName" +#define PN_ADD_LOCUS_NODE "locusNode" +#define PN_ADD_WRITER "writer" +#define PN_ADD_DIRECTORY "directory" +#define PN_ADD_OBSERVATION_NAME "observationName" + +// Writer +#define PSN_WRITER "LOFAR_ObsSW_@oslocusnode@_@writer@" +#define PST_WRITER "Writer" +#define PN_WTR_WRITTEN "written" +#define PN_WTR_DROPPED "dropped" +#define PN_WTR_FILE_NAME "fileName" +#define PN_WTR_DATA_RATE "dataRate" +#define PN_WTR_DATA_PRODUCT_TYPE "dataProductType" +#define PN_WTR_OBSERVATION_NAME "observationName" + +// IONode +#define PSN_IO_NODE "LOFAR_PIC_BGP_@midplane@_@ionode@" +#define PST_IO_NODE "IONode" +#define PN_ION_STATION0 "station0" +#define PN_ION_IP0 "IP0" +#define PN_ION_MAC0 "MAC0" +#define PN_ION_STATION1 "station1" +#define PN_ION_IP1 "IP1" +#define PN_ION_MAC1 "MAC1" +#define PN_ION_USE2ND_STATION "use2ndStation" +#define PN_ION_USED_STATION "usedStation" +#define PN_ION_USEDIP "usedIP" +#define PN_ION_USEDMAC "usedMAC" + +// LocusNode +#define PSN_LOCUS_NODE "LOFAR_PIC_@osrack@_@locusnode@" +#define PST_LOCUS_NODE "LocusNode" +#define PN_LCN_FREE "free" +#define PN_LCN_TOTAL "total" +#define PN_LCN_CLAIMED "claimed" + +// CEPHardwareMonitor +#define PSN_CEP_HARDWARE_MONITOR "LOFAR_PermSW_CEPHardwareMonitor" +#define PST_CEP_HARDWARE_MONITOR "CEPHardwareMonitor" +#define PN_CHM_BGP_CONNECTED "BGP.connected" +#define PN_CHM_CLUSTER_CONNECTED "Cluster.connected" // Cabinet #define PSN_CABINET "LOFAR_PIC_@cabinet@" @@ -155,6 +193,8 @@ #define PN_RSP_VOLTAGE25 "voltage25" #define PN_RSP_VOLTAGE33 "voltage33" #define PN_RSP_VERSION "version" +#define PN_RSP_BITMODE "bitmode" +#define PN_RSP_BITMODE_CAPABILITY "bitmodeCapability" #define PN_RSP_ALERT "alert" #define PN_RSP_SPLITTER_ON "splitterOn" #define PN_RSP__ETHERNET_STATUS_STATE "Ethernet.status.state" @@ -273,6 +313,62 @@ #define PN_TBB_IMAGE_INFO_TP_FILE "imageInfo.TPFile" #define PN_TBB_IMAGE_INFO_MP_FILE "imageInfo.MPFile" +// LBAAntenna +#define PSN_LBA_ANTENNA "LOFAR_PIC_@lbaantenna@" +#define PST_LBA_ANTENNA "LBAAntenna" + +// HBAAntenna +#define PSN_HBA_ANTENNA "LOFAR_PIC_@hbaantenna@" +#define PST_HBA_ANTENNA "HBAAntenna" + +// StationInfo +#define PSN_STATION_INFO "LOFAR_PIC_StationInfo" +#define PST_STATION_INFO "StationInfo" +#define PN_STI_STATIONID "stationID" +#define PN_STI_N_RSP_BOARDS "N_RSPBoards" +#define PN_STI_N_TB_BOARDS "N_TBBoards" +#define PN_STI_N_LBAS "N_LBAS" +#define PN_STI_N_HBAS "N_HBAS" +#define PN_STI_HBA__SPLIT "HBA_Split" +#define PN_STI_WIDE_LBAS "wide_LBAS" +#define PN_STI_POWER48_ON "power48On" +#define PN_STI_POWER220_ON "power220On" +#define PN_STI_CABINET_X "Cabinet.X" +#define PN_STI_CABINET_Y "Cabinet.Y" +#define PN_STI_CABINET_Z "Cabinet.Z" +#define PN_STI_HBA_CENTERX "HBA.centerX" +#define PN_STI_HBA_CENTERY "HBA.centerY" +#define PN_STI_HBA_CENTERZ "HBA.centerZ" +#define PN_STI_HBA_HBA0_CENTERX "HBA.HBA0.centerX" +#define PN_STI_HBA_HBA0_CENTERY "HBA.HBA0.centerY" +#define PN_STI_HBA_HBA0_CENTERZ "HBA.HBA0.centerZ" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_X "HBA.HBA0.NormalVector.X" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Y "HBA.HBA0.NormalVector.Y" +#define PN_STI_HBA_HBA0__NORMAL_VECTOR_Z "HBA.HBA0.NormalVector.Z" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_X "HBA.HBA0.RotationMatrix.X" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Y "HBA.HBA0.RotationMatrix.Y" +#define PN_STI_HBA_HBA0__ROTATION_MATRIX_Z "HBA.HBA0.RotationMatrix.Z" +#define PN_STI_HBA_HBA0_ROTATION "HBA.HBA0.rotation" +#define PN_STI_HBA_HBA1_CENTERX "HBA.HBA1.centerX" +#define PN_STI_HBA_HBA1_CENTERY "HBA.HBA1.centerY" +#define PN_STI_HBA_HBA1_CENTERZ "HBA.HBA1.centerZ" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_X "HBA.HBA1.NormalVector.X" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Y "HBA.HBA1.NormalVector.Y" +#define PN_STI_HBA_HBA1__NORMAL_VECTOR_Z "HBA.HBA1.NormalVector.Z" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_X "HBA.HBA1.RotationMatrix.X" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Y "HBA.HBA1.RotationMatrix.Y" +#define PN_STI_HBA_HBA1__ROTATION_MATRIX_Z "HBA.HBA1.RotationMatrix.Z" +#define PN_STI_HBA_HBA1_ROTATION "HBA.HBA1.rotation" +#define PN_STI_LBA_CENTERX "LBA.centerX" +#define PN_STI_LBA_CENTERY "LBA.centerY" +#define PN_STI_LBA_CENTERZ "LBA.centerZ" +#define PN_STI_LBA__NORMAL_VECTOR_X "LBA.NormalVector.X" +#define PN_STI_LBA__NORMAL_VECTOR_Y "LBA.NormalVector.Y" +#define PN_STI_LBA__NORMAL_VECTOR_Z "LBA.NormalVector.Z" +#define PN_STI_LBA__ROTATION_MATRIX_X "LBA.RotationMatrix.X" +#define PN_STI_LBA__ROTATION_MATRIX_Y "LBA.RotationMatrix.Y" +#define PN_STI_LBA__ROTATION_MATRIX_Z "LBA.RotationMatrix.Z" + // LogProcessor #define PSN_LOG_PROCESSOR "LOFAR_PermSW_Daemons_LogProcessor" #define PST_LOG_PROCESSOR "LogProcessor" @@ -291,6 +387,7 @@ // SoftwareMonitor #define PSN_SOFTWARE_MONITOR "LOFAR_PermSW_SoftwareMonitor" #define PST_SOFTWARE_MONITOR "SoftwareMonitor" +#define PN_SWM_SW_LEVEL "SWLevel" // SHMInfoServer #define PSN_SHM_INFO_SERVER "LOFAR_PermSW_SHMInfoServer" @@ -307,19 +404,8 @@ #define PN_CLC_CONNECTED "connected" #define PN_CLC_REQUESTED_CLOCK "requestedClock" #define PN_CLC_ACTUAL_CLOCK "actualClock" - -// Antenna -#define PSN_ANTENNA "@antenna@" -#define PST_ANTENNA "Antenna" -#define PN_ANT_STATUS_STATE "status.state" -#define PN_ANT_STATUS_CHILD_STATE "status.childState" -#define PN_ANT_STATUS_MESSAGE "status.message" -#define PN_ANT_STATUS_LEAF "status.leaf" -#define PN_ANT_RCUX "RCUX" -#define PN_ANT_RCUY "RCUY" -#define PN_ANT_DELTAX "deltaX" -#define PN_ANT_DELTAY "deltaY" -#define PN_ANT_DELTAH "deltaH" +#define PN_CLC_REQUESTED_BITMODE "requestedBitmode" +#define PN_CLC_ACTUAL_BITMODE "actualBitmode" // StnObservation #define PSN_STN_OBSERVATION "LOFAR_ObsSW_@observation@" @@ -328,6 +414,8 @@ #define PN_OBS_CLAIM_CLAIM_DATE "claim.claimDate" #define PN_OBS_CLAIM_NAME "claim.name" #define PN_OBS_RECEIVER_BITMAP "receiverBitmap" +#define PN_OBS_HBA_BITMAP "HBABitmap" +#define PN_OBS_LBA_BITMAP "LBABitmap" // BeamControl #define PSN_BEAM_CONTROL "LOFAR_ObsSW_@observation@_BeamControl" diff --git a/MAC/Deployment/data/Coordinates/ETRF_FILES/FI609/FI609-antenna-positions-etrs.csv b/MAC/Deployment/data/Coordinates/ETRF_FILES/FI609/FI609-antenna-positions-etrs.csv index 3e0733d8994..827fccfaacc 100644 --- a/MAC/Deployment/data/Coordinates/ETRF_FILES/FI609/FI609-antenna-positions-etrs.csv +++ b/MAC/Deployment/data/Coordinates/ETRF_FILES/FI609/FI609-antenna-positions-etrs.csv @@ -1,4 +1,52 @@ NAME,ETRS-X,ETRS-Y,ETRS-Z,STATION-P,STATION-Q,STATION-R,RCU-X,RCU-Y +L0,2136833.225,810088.740,5935285.279,-0.000,-0.000,0.000,0,1 +L1,2136832.313,810091.120,5935285.283,2.481,0.583,0.000,2,3 +L2,2136830.780,810089.246,5935286.085,0.798,2.499,0.000,4,5 +L3,2136831.746,810086.726,5935286.081,-1.830,1.881,0.000,6,7 +L4,2136834.138,810086.358,5935285.276,-2.483,-0.584,0.000,8,9 +L5,2136835.671,810088.232,5935284.474,-0.800,-2.500,0.000,10,11 +L6,2136834.705,810090.754,5935284.477,1.829,-1.882,0.000,12,13 +L7,2136832.683,810083.046,5935286.245,-5.609,1.479,0.000,14,15 +L8,2136836.307,810083.846,5935284.841,-5.247,-2.473,0.000,16,17 +L9,2136838.490,810086.934,5935283.641,-2.432,-5.268,0.000,18,19 +L10,2136838.208,810090.869,5935283.209,1.523,-5.597,0.000,20,21 +L11,2136835.595,810093.806,5935283.745,4.763,-3.308,0.000,22,23 +L12,2136831.874,810094.373,5935284.999,5.775,0.529,0.000,24,25 +L13,2136828.784,810092.304,5935286.384,4.085,4.118,0.000,26,27 +L14,2136827.774,810088.567,5935287.252,0.482,5.779,0.000,28,29 +L15,2136829.313,810084.910,5935287.197,-3.347,4.738,0.000,30,31 +L16,2136827.496,810082.000,5935288.242,-6.028,7.119,0.000,32,33 +L17,2136830.196,810079.620,5935287.599,-8.725,4.649,0.000,34,35 +L18,2136834.881,810078.577,5935286.065,-10.326,-0.128,0.000,36,37 +L19,2136840.678,810082.158,5935283.506,-7.454,-6.816,0.000,38,39 +L20,2136842.220,810084.841,5935282.591,-4.966,-8.870,-0.000,40,41 +L21,2136842.709,810089.042,5935281.847,-0.838,-10.055,-0.000,42,43 +L22,2136840.820,810092.856,5935282.005,3.190,-8.670,-0.000,44,45 +L23,2136836.624,810096.732,5935282.980,7.556,-4.860,-0.000,46,47 +L24,2136832.390,810098.564,5935284.246,9.890,-0.684,0.000,48,49 +L25,2136828.407,810097.589,5935285.802,9.396,3.674,0.000,50,51 +L26,2136826.172,810094.571,5935287.011,6.657,6.514,0.000,52,53 +L27,2136824.745,810090.073,5935288.131,2.346,8.735,0.001,54,55 +L28,2136825.278,810085.457,5935288.566,-2.318,8.909,0.001,56,57 +L29,2136825.444,810077.480,5935289.588,-10.287,10.004,0.001,58,59 +L30,2136828.421,810075.211,5935288.832,-12.904,7.225,0.000,60,61 +L31,2136831.364,810074.934,5935287.817,-13.534,4.164,0.000,62,63 +L32,2136838.625,810076.703,5935284.980,-12.643,-3.780,0.000,64,65 +L33,2136841.406,810076.073,5935284.071,-13.605,-6.614,-0.000,66,67 +L34,2136844.576,810082.556,5935282.059,-7.525,-10.993,-0.000,68,69 +L35,2136845.569,810087.431,5935281.043,-2.787,-12.817,-0.000,70,71 +L36,2136846.854,810092.459,5935279.901,2.069,-14.974,-0.000,72,73 +L37,2136844.379,810094.649,5935280.489,4.550,-12.711,-0.000,74,75 +L38,2136841.244,810098.162,5935281.134,8.426,-9.963,-0.000,76,77 +L39,2136835.339,810101.550,5935282.786,12.511,-4.272,0.000,78,79 +L40,2136832.799,810102.379,5935283.582,13.642,-1.723,0.000,80,81 +L41,2136828.030,810100.946,5935285.482,12.787,3.538,0.000,82,83 +L42,2136824.136,810100.694,5935286.909,13.004,7.686,0.000,84,85 +L43,2136820.365,810093.032,5935289.296,5.821,12.886,0.001,86,87 +L44,2136820.109,810089.105,5935289.920,1.938,13.781,0.001,88,89 +L45,2136820.680,810083.676,5935290.452,-3.540,14.045,0.001,90,91 +L46,2136830.755,810101.266,5935284.464,12.779,0.611,0.000,92,93 +L47,2136827.708,810078.052,5935288.701,-9.988,7.525,0.000,94,95 H0,2136799.803,810023.941,5935308.107,-13.251,22.953,-0.003,0,1 H1,2136801.609,810028.590,5935306.831,-8.836,20.306,-0.002,2,3 H2,2136803.417,810033.240,5935305.554,-4.419,17.658,-0.002,4,5 @@ -47,3 +95,5 @@ H44,2136831.357,810036.614,5935295.106,-4.412,-12.362,0.002,88,89 H45,2136833.163,810041.264,5935293.829,0.005,-15.009,0.002,90,91 H46,2136836.777,810050.561,5935291.276,8.835,-20.305,0.002,92,93 H47,2136838.585,810055.210,5935290.000,13.251,-22.953,0.002,94,95 +CLBA,2136833.225,810088.740,5935285.279,-0.000,-0.000,0.000,-1,-1 +CHBA,2136819.1940,810039.5757,5935299.0536,0.0,0.0,0.0,-1,-1 \ No newline at end of file diff --git a/MAC/Deployment/data/Coordinates/vectors-and-matrices/FI609/FI609-lba-solution.lisp b/MAC/Deployment/data/Coordinates/vectors-and-matrices/FI609/FI609-lba-solution.lisp new file mode 100644 index 00000000000..35a8cdddd56 --- /dev/null +++ b/MAC/Deployment/data/Coordinates/vectors-and-matrices/FI609/FI609-lba-solution.lisp @@ -0,0 +1,12 @@ +(discarded-points + NIL) +(reduced-chi-squared 0.0001834637936724027) +(normal-vector (0.3339713 0.1266377 0.9340375)) +(normal-vector-uncertainties (0.0000048 0.0000048 0.0000018)) +(normal-vector-direction-uncertainties-arcsec :max 0.99 :rms 0.84 :avg 0.78) +(reference-point :etrs (2136833.225 810088.740 5935285.279) + :station-pqr (0.0 0.0 0.0)) +(station-pqr-to-etrs-matrix + #2A((-0.14881611950056886 -0.9307614981005229 0.3339712506046932) + (0.9855896003619196 -0.11214285543458863 0.1266377496381268) + (-0.08041705189339096 0.3480043298992806 0.9340375175206446))) diff --git a/MAC/Deployment/data/OTDB/Calibration.comp b/MAC/Deployment/data/OTDB/Calibration.comp index 34cf0b14c88..376a8ce1e4a 100644 --- a/MAC/Deployment/data/OTDB/Calibration.comp +++ b/MAC/Deployment/data/OTDB/Calibration.comp @@ -8,5 +8,5 @@ node Calibration 4.0.0 development 'node constraint' "Calibration pipeline" # name dir. type unit prun. vm value constr. descr. #-------------------------------------------------------------------------------------------------------- -par CalibratorSource I text - 100 0 '' - "Calibrator source for generation of instrument model" - +par CalibratorSource I text - 100 0 '' - "Calibrator source for generation of instrument model" +par SkyModel I text - 100 0 '' - "User-supplied sky model for generic calibration pipeline" diff --git a/MAC/Deployment/data/OTDB/DPPP.comp b/MAC/Deployment/data/OTDB/DPPP.comp index 39251834936..0519a9ecec2 100644 --- a/MAC/Deployment/data/OTDB/DPPP.comp +++ b/MAC/Deployment/data/OTDB/DPPP.comp @@ -128,6 +128,9 @@ uses Options 4.0.0 development 1 'Solver configuration' node demixer 4.0.0 development 'node constraint' "Demix" par type I text - 10 0 "demixer" - "Type of the demixer, do not change" +par baseline I text - 10 0 "" - "Baselines to be demixed" +par blrange I vdbl - 10 0 "" - "Vector of ranges of baseline lengths (in m) to be demixed" +par corrtype I ptext - 10 0 "auto|cross;cross" - "correlation type to demix? Must be auto, cross, or an empty string." par freqstep I int - 10 0 1 - "Number of channels to average in result." par timestep I int - 10 0 1 - "Number of time slots to average in result." par demixfreqstep I int - 10 0 1 - "Number of channels to average in demixing." diff --git a/MAC/Deployment/data/OTDB/Observation.comp b/MAC/Deployment/data/OTDB/Observation.comp index c3b44af3599..d6cfab5dc00 100644 --- a/MAC/Deployment/data/OTDB/Observation.comp +++ b/MAC/Deployment/data/OTDB/Observation.comp @@ -28,6 +28,7 @@ par nrTBBSettings I int - 10 100 0 par nrBeamformers I int - 10 100 0 - 'Number of beamformers in this observation' par nrPolarisations I pint - 10 100 '1|2;2' - 'Number of polarisations to use in this observation' par nrSlotsInFrame I int - 10 100 61 - '???' +par nrBitsPerSample I pint - 10 0 '16|8|4;16' - 'sample size in bits' par referencePhaseCenter I vdbl - 10 100 '[3826577.110, 461022.900, 5064892.758]' - 'Constant value: phase center of LOFAR' par existingStations I vtext - 10 100 '["CS001","CS002","CS003","CS004","CS005","CS006","CS007","CS011","CS013","CS017","CS021","CS024","CS026","CS028","CS030","CS031","CS101","CS103","CS201","CS301","CS302","CS401","CS501","RS106","RS205","RS208","RS306","RS307","RS406","RS503","DE601","DE602","DE603","DE604","DE605","FR606","UK608"]' - 'Constant value: stations that can be used' par existingAntennaFields I vtext - 10 100 '["LBA","HBA","HBA0","HBA1"]' - 'Constant value: names of all antennafields' diff --git a/MAC/Deployment/data/OTDB/PreProcessing.comp b/MAC/Deployment/data/OTDB/PreProcessing.comp new file mode 100644 index 00000000000..addc5245bd7 --- /dev/null +++ b/MAC/Deployment/data/OTDB/PreProcessing.comp @@ -0,0 +1,13 @@ +# -- PreProcessing-- +# +# $Id$ +# +# name vers qual constr. descr. +#-------------------------------------------------------------------------------------------------------- +node PreProcessing 4.0.0 development 'node constraint' "Settings for the pre-processing pipelines" + +# name dir. type unit prun. vm value constr. descr. +#-------------------------------------------------------------------------------------------------------- +par demix_always I vtext - 100 0 [] - "List of sources that must always be demixed" +par demix_if_needed I vtext - 100 0 [] - "List of sources that will only be demixed if needed, based on some heuristics" + diff --git a/MAC/Deployment/data/OTDB/PythonControl.comp b/MAC/Deployment/data/OTDB/PythonControl.comp index 41b69d5f6db..25af7db4962 100644 --- a/MAC/Deployment/data/OTDB/PythonControl.comp +++ b/MAC/Deployment/data/OTDB/PythonControl.comp @@ -24,5 +24,5 @@ uses AWimager 4.0.0 development 1 "awimager" uses GSM 4.0.0 development 1 "GSM" uses BDSM 4.0.0 development 1 "BDSM" uses Calibration 4.0.0 development 1 "Calibration" - +uses PreProcessing 4.0.0 development 1 "Pre-processing" diff --git a/MAC/Deployment/data/OTDB/createPICfile b/MAC/Deployment/data/OTDB/createPICfile index 262d150f8fc..299d2b2445c 100755 --- a/MAC/Deployment/data/OTDB/createPICfile +++ b/MAC/Deployment/data/OTDB/createPICfile @@ -64,6 +64,21 @@ def expandCabinetMarker(dataPoint, nrRSP): print "21 "+dataPoint.replace("@cabinet@","Cabinet"+str(cabinet))+".status.state" +def expandLBAMarker(dataPoint, nrLBA): + """ + Expands the lines that only contain the @lbaantenna@ marker with all cabinet numbers + """ + for lba in range(0, nrLBA): + print "21 "+dataPoint.replace("@lbaantenna@","LBA%03d"%lba)+".status.state" + +def expandHBAMarker(dataPoint, nrHBA): + """ + Expands the lines that only contain the @hbaantenna@ marker with all cabinet numbers + """ + for lba in range(0, nrHBA): + print "21 "+dataPoint.replace("@hbaantenna@","HBA%02d"%lba)+".status.state" + + # MAIN # all the files we are using @@ -78,11 +93,11 @@ parser.add_option("-l", "--local", action="store_true", dest="isLocal", default= (options, args) = parser.parse_args() if (options.isLocal): - PVSSbasefile= "../PVSS/PVSSDataPoints.base" + PVSSbasefile= "../PVSS/data/PVSSDataPoints.base" StationFile = "../StaticMetaData/StationInfo.dat" ControlFile = "../StaticMetaData/ControlInfo.dat" - RingFile = "../PVSS/Rings.list" - ClusterFile = "../PVSS/Clusters.list" + RingFile = "../PVSS/data/Rings.list" + ClusterFile = "../PVSS/data/Clusters.list" else: PVSSbasefile= "/opt/lofar/pvss/dpdef/PVSSDataPoints.base" StationFile = "/opt/lofar/etc/StationInfo.dat" @@ -205,6 +220,10 @@ for line in filledLine.findall(open(StationFile).read()): expandSubrackMarker(prefix+line, int(nrRSP)) elif line.find("@cabinet@") >= 0: expandCabinetMarker(prefix+line, int(nrRSP)) + elif line.find("@lbaantenna@") >= 0: + expandLBAMarker(prefix+line, int(nrLBA)) + elif line.find("@hbaantenna@") >= 0: + expandHBAMarker(prefix+line, int(nrHBA)) # for all expandable lines # Permanent software on the stations diff --git a/MAC/Deployment/data/OTDB/create_OTDB_comps b/MAC/Deployment/data/OTDB/create_OTDB_comps index 60af1571b0e..cf7b0d70fdf 100755 --- a/MAC/Deployment/data/OTDB/create_OTDB_comps +++ b/MAC/Deployment/data/OTDB/create_OTDB_comps @@ -246,7 +246,7 @@ echo "# Generated file !!!" >Stations.list if [ "${INDIR}" = "." ]; then wdir="../StaticMetaData" otdbdir="." - pvssdir="../PVSS" + pvssdir="../PVSS/data" else wdir="/opt/lofar/etc" otdbdir="/opt/lofar/etc/otdb" diff --git a/MAC/Deployment/data/PVSS/License/471_3031_2_Astron_Gen_II_2_311.log b/MAC/Deployment/data/PVSS/License/471_3031_2_Astron_Gen_II_2_311.log new file mode 100644 index 00000000000..49fbf91ae45 --- /dev/null +++ b/MAC/Deployment/data/PVSS/License/471_3031_2_Astron_Gen_II_2_311.log @@ -0,0 +1,31 @@ + +--------------------------------------------------- +[license] +code = "RS305C 70099091807" +version = 30800002 +sn = "471_3031_2_Astron_Gen_II_2_311/1" +date = 2012.10.11;09:46:36,000 +comment = "Remote Station RS305" +expire = 0000.00.00;00:00:00,000 +redundancy = 0 +ui = 2 +para = 1 +dde = 5 +event = 1 +ios = 4000 +ssi = 0 +api = 80 +excelreport = 5 + http = 0 + infoserver = 1000 + comcenter = 5 +maintenance = 1 + scheduler = 1 + recipe = 1 +distributed = 255 + uifix = 0 + parafix = 0 + pararemote = 0 + ctrlext = 1 + update = 0 + diff --git a/MAC/Deployment/data/PVSS/License/Astron_Central_1_shield.txt b/MAC/Deployment/data/PVSS/License/Astron_Central_1_shield.txt index 0f5595ea711..8beb1c99acb 100644 --- a/MAC/Deployment/data/PVSS/License/Astron_Central_1_shield.txt +++ b/MAC/Deployment/data/PVSS/License/Astron_Central_1_shield.txt @@ -1,28 +1,29 @@ [license] -code = "dongleHost 40316486309" -version = 30800002 -sn = "471_3031_1_Astron_Gen_I_1_38" -expire = 0000.00.00;00:00:00,000 -redundancy = 1 -ui = 15 -para = 4 -dde = 5 -event = 1 -ios = 100000 -ssi = 0 -api = 80 -excelreport = 5 - http = 15 - infoserver = 5000 - comcenter = 5 -maintenance = 0 - scheduler = 0 -distributed = 255 - uifix = 0 - parafix = 0 - pararemote = 0 - ctrlext = 1 - update = 0 -licenseMax = 8 -licenseLeft = 5 +#hw = 00825320842 +code = "dongleHost 50202878741" +version = 31100002 +sn = "471_3031_1_Astron_Gen_I_2_311" +expire = 0000.00.00;00:00:00,000 +redundancy = 1 +ui = 15 +para = 4 +dde = 5 +event = 1 +api = 80 +excelreport = 5 +http = 15 +infoserver = 5000 +ios = 100000 +comcenter = 5 +maintenance = 0 +scheduler = 0 +ssi = 0 +distributed = 255 +uifix = 0 +parafix = 0 +pararemote = 0 +ctrlext = 1 +update = 0 +licenseMax = 8 +licenseLeft = 8 diff --git a/MAC/Deployment/data/PVSS/License/Astron_Station_1_shield.txt b/MAC/Deployment/data/PVSS/License/Astron_Station_1_shield.txt index b7b3fbf49ec..d8932c70f5b 100644 --- a/MAC/Deployment/data/PVSS/License/Astron_Station_1_shield.txt +++ b/MAC/Deployment/data/PVSS/License/Astron_Station_1_shield.txt @@ -1,7 +1,7 @@ [license] -code = "dongleHost 30533373122" -version = 30800002 -sn = "471_3031_2_Astron_Gen_II_1_38" +code = "dongleHost 60318387154" +version = 31100002 +sn = "471_3031_2_Astron_Gen_II_2_311" expire = 0000.00.00;00:00:00,000 redundancy = 0 ui = 2 @@ -12,18 +12,18 @@ ios = 4000 ssi = 0 api = 80 excelreport = 5 - http = 0 - infoserver = 1000 - comcenter = 5 +http = 0 +infoserver = 1000 +comcenter = 5 maintenance = 1 - scheduler = 1 - recipe = 1 +scheduler = 1 +recipe = 1 distributed = 255 - uifix = 0 - parafix = 0 - pararemote = 0 - ctrlext = 1 - update = 0 +uifix = 0 +parafix = 0 +pararemote = 0 +ctrlext = 1 +update = 0 licenseMax = 100 -licenseLeft = 46 +licenseLeft = 96 diff --git a/MAC/Deployment/data/PVSS/License/PVSStoolLicense.exe b/MAC/Deployment/data/PVSS/License/PVSStoolLicense.exe index dc235473152cd21d5af222f4ece828bd6c9d5f5d..2da1cf71dd55af267aac7f02cbee00f4a2a60a17 100755 GIT binary patch literal 89088 zcmeFaeSB2aoj*Q#!V!ZLG{GpSQ3u6>77bc3um;OmYKff*B<O;QiuM}Ox;jzX0wzqR z&2Sk@Thh`kZK2w&-Nh~4TEvH75Sql5wy3DI(%rPB?MV}BT2qZRb$;*n=bUrrP7>7p ze)skI{_~4+@44sUb3RY!b3W&BYW{Ikpdb(k6yjed6A0|an}5~veDB8ql21JIi4y~l z9{<y`cIPen=~+vh+wQ5j>+Vl~>h2rwsJQvYJMa8-yyB)?D(-H)v*NZpD;9imam5{< zUU|!f6DEug8_>HBd~wTP9{Kfi_TMLebKi3V_<rZ5_;Y`j_f60JLEd*i_cy%zGj~h+ zUmods?j(G_bo)O)_jgIZ<+)!=dgF6%$oF0HuD$JMhp;Ur(MTY$D6c4xcky>WY2$hV z`FS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<#>PP=h#Hza*6zY!=a6B_=4A06}vvVzdEH)jeakR(VrFwBM$>x3d`BppUmDFYX@ z047pdIy?!j0w<hdg)9VkTi${v@j-y_R6d7q=DGYThx5I8q^Kj}L~F?1F(N}O6YBuI zGvcZU$;z^^^kg@gEQiVIaz6C-8F@)Qmm#k)bYp@y%uDr(O^aX|Ayf{9p~@%%MWSd_ r2i1pUibIVNLhVojN<`gI5*k)=WAV+UzfuHB5hz8V6oFC%-XQRQw@j+L diff --git a/MAC/Deployment/data/PVSS/License/RS305C_option.txt b/MAC/Deployment/data/PVSS/License/RS305C_option.txt new file mode 100644 index 00000000000..964db037acf --- /dev/null +++ b/MAC/Deployment/data/PVSS/License/RS305C_option.txt @@ -0,0 +1,29 @@ +[license] +code = "RS305C 61412543354" +version = 31100002 +comment = "Remote Station RS305" +sn = "471_3031_2_Astron_Gen_II_2_311" +expire = 0000.00.00;00:00:00,000 +redundancy = 0 +ui = 2 +para = 1 +dde = 5 +event = 1 +api = 80 +excelreport = 5 +http = 0 +infoserver = 1000 +ios = 4000 +comcenter = 5 +maintenance = 1 +scheduler = 1 +ssi = 0 +recipe = 1 +distributed = 255 +uifix = 0 +parafix = 0 +pararemote = 0 +ctrlext = 1 +update = 0 + + diff --git a/MAC/Deployment/data/PVSS/License/shield.RS305C.txt b/MAC/Deployment/data/PVSS/License/shield.RS305C.txt new file mode 100644 index 00000000000..adda3be8c14 --- /dev/null +++ b/MAC/Deployment/data/PVSS/License/shield.RS305C.txt @@ -0,0 +1,29 @@ +[license] +code = "RS305C 20354947138" +version = 31100002 +sn = "471_3031_2_Astron_Gen_II_2_311/4" +date = 2012.10.26;11:45:21,000 +comment = "Remote Station RS305" +expire = 0000.00.00;00:00:00,000 +redundancy = 0 +ui = 2 +para = 1 +dde = 5 +event = 1 +ios = 4000 +ssi = 0 +api = 80 +excelreport = 5 +http = 0 +infoserver = 1000 +comcenter = 5 +maintenance = 1 +scheduler = 1 +recipe = 1 +distributed = 255 +uifix = 0 +parafix = 0 +pararemote = 0 +ctrlext = 1 +update = 0 + diff --git a/MAC/Deployment/data/PVSS/License/shield_471_3031_1_Astron_Gen_I_2_311.txt b/MAC/Deployment/data/PVSS/License/shield_471_3031_1_Astron_Gen_I_2_311.txt deleted file mode 100644 index 6bfaa53e255..00000000000 --- a/MAC/Deployment/data/PVSS/License/shield_471_3031_1_Astron_Gen_I_2_311.txt +++ /dev/null @@ -1,29 +0,0 @@ -[license] -#hw = 00825320842 -code = "dongleHost 50202878741" -version = 31100002 -sn = "471_3031_1_Astron_Gen_I_2_311" -expire = 0000.00.00;00:00:00,000 -redundancy = 1 -ui = 15 -para = 4 -dde = 5 -event = 1 -api = 80 -excelreport = 5 -http = 15 -infoserver = 5000 -ios = 100000 -comcenter = 5 -maintenance = 0 -scheduler = 0 -ssi = 0 -distributed = 255 -uifix = 0 -parafix = 0 -pararemote = 0 -ctrlext = 1 -update = 0 -licenseMax = 8 -licenseLeft = 8 - diff --git a/MAC/Deployment/data/PVSS/License/shield_471_3031_2_Astron_Gen_II_2_311.txt b/MAC/Deployment/data/PVSS/License/shield_471_3031_2_Astron_Gen_II_2_311.txt deleted file mode 100644 index 24d3b1007cd..00000000000 --- a/MAC/Deployment/data/PVSS/License/shield_471_3031_2_Astron_Gen_II_2_311.txt +++ /dev/null @@ -1,30 +0,0 @@ -[license] -#hw = 12831493085 -code = "dongleHost 40337353363" -version = 31100002 -sn = "471_3031_2_Astron_Gen_II_2_311" -expire = 0000.00.00;00:00:00,000 -redundancy = 0 -ui = 2 -para = 1 -dde = 5 -event = 1 -api = 80 -excelreport = 5 -http = 0 -infoserver = 1000 -ios = 4000 -comcenter = 5 -maintenance = 1 -scheduler = 1 -ssi = 0 -recipe = 1 -distributed = 255 -uifix = 0 -parafix = 0 -pararemote = 0 -ctrlext = 1 -update = 0 -licenseMax = 100 -licenseLeft = 100 - diff --git a/MAC/Deployment/data/PVSS/data/Adder.dpdef b/MAC/Deployment/data/PVSS/data/Adder.dpdef index d5bba9c187c..cc7152416bc 100644 --- a/MAC/Deployment/data/PVSS/data/Adder.dpdef +++ b/MAC/Deployment/data/PVSS/data/Adder.dpdef @@ -1,8 +1,10 @@ # Adder -dropping bool +dropping bool dropped int dataProductType string +dataProduct string fileName string -locusNode string +locusNode int +writer int directory string observationName string diff --git a/MAC/Deployment/data/PVSS/data/BGPAppl.dpdef b/MAC/Deployment/data/PVSS/data/BGPAppl.dpdef index 78375878852..75c6e2843dd 100644 --- a/MAC/Deployment/data/PVSS/data/BGPAppl.dpdef +++ b/MAC/Deployment/data/PVSS/data/BGPAppl.dpdef @@ -1,6 +1,7 @@ -ioNodeList intArr -locusNodeList stringArr +ioNodeList intArr adderList stringArr -writerList stringArr -dataProductList stringArr -dataProductTypeList stringArr +# the next lists will be in adder.dpdef as from release 1.8 +locusNodeList stringArr +writerList stringArr +dataProductList stringArr +dataProductTypeList stringArr \ No newline at end of file diff --git a/MAC/Deployment/data/PVSS/data/CEPHardwareMonitor.dpdef b/MAC/Deployment/data/PVSS/data/CEPHardwareMonitor.dpdef new file mode 100644 index 00000000000..0298855bb6e --- /dev/null +++ b/MAC/Deployment/data/PVSS/data/CEPHardwareMonitor.dpdef @@ -0,0 +1,4 @@ +# CEPHardwareMonitor +# +BGP.connected bool +Cluster.connected bool diff --git a/MAC/Deployment/data/PVSS/data/ClockControl.dpdef b/MAC/Deployment/data/PVSS/data/ClockControl.dpdef index 6ef73feb64b..19378adf572 100644 --- a/MAC/Deployment/data/PVSS/data/ClockControl.dpdef +++ b/MAC/Deployment/data/PVSS/data/ClockControl.dpdef @@ -2,3 +2,5 @@ connected bool requestedClock int actualClock int +requestedBitmode int +actualBitmode int diff --git a/MAC/Deployment/data/PVSS/data/MCUbase.dpdef b/MAC/Deployment/data/PVSS/data/MCUbase.dpdef index fc188996d98..c7bb910c2f4 100644 --- a/MAC/Deployment/data/PVSS/data/MCUbase.dpdef +++ b/MAC/Deployment/data/PVSS/data/MCUbase.dpdef @@ -1,3 +1,4 @@ +======= # MainCU specific PVSS Database types # DpType @@ -118,13 +119,16 @@ NavPanelConfig.NavPanelConfig 1# BGPRack_Hardware 9# OSRack_Hardware 9# BGPMidplane_Hardware 9# - OSSubcluster_Hardware 9# BGPAppl_Processes 9# CEPHardwareMonitor_Processes 9# BGPProc_Processes 9# StnLOFAR_Observations 9# StnLOFAR_Reports 9# StnLOFAR_Alerts 9# + HBAAntenna_Hardware 9# + IONode_Hardware 9# + IONode_Processes 9# + PythonControl_Processes 9# TypeName NavigatorUserSaves.NavigatorUserSaves 1# @@ -158,7 +162,7 @@ DpName TypeName __navigator Navigator root NavPanelConfig __gcf_cwd GCFWatchDog -rootsaves NavigatorUserSaves +rootSaves NavigatorUserSaves _CtrlDebug_CTRL_5 _CtrlDebug _CtrlDebug_CTRL_6 _CtrlDebug _CtrlDebug_CTRL_7 _CtrlDebug @@ -200,7 +204,7 @@ root.CalServer_Processes NavPanelConfig "Processes/CalServer.pnl" root.BeamServer_Processes NavPanelConfig "Processes/BeamServer.pnl" root.SHMInfoServer_Processes NavPanelConfig "Processes/SHMInfoServer.pnl" root.Observation_Observations NavPanelConfig "Observations/Observation_overview.pnl" -root.Ring_Hardware NavPanelConfig "Hardware/LOFAR_Europe.pnl:LOFAR_PIC_Europe", "Hardware/LOFAR_Remote.pnl:LOFAR_PIC_Remote", "Hardware/LOFAR_Core.pnl:LOFAR_PIC_Core" +root.Ring_Hardware NavPanelConfig "main.pnl:LOFAR_PIC_Europe", "Hardware/LOFAR_Europe.pnl:LOFAR_PIC_Europe", "Hardware/LOFAR_Remote.pnl:LOFAR_PIC_Remote", "Hardware/LOFAR_Core.pnl:LOFAR_PIC_Core" root.LOFAR_Alerts NavPanelConfig "Alerts/lofar_alarms.pnl" root.LOFAR_Reports NavPanelConfig "Reports/LOFAR_Reports_main.pnl" root.CEPLOFAR_Processes NavPanelConfig "Processes/CEP_Processes.pnl" @@ -208,10 +212,14 @@ root.CEPPIC_Hardware NavPanelConfig "Hardware/CEP.pnl" root.BGPRack_Hardware NavPanelConfig "Hardware/CEP_BGPRack_detailed.pnl" root.OSRack_Hardware NavPanelConfig "Hardware/CEP_OSRack_detailed.pnl" root.BGPMidplane_Hardware NavPanelConfig "Hardware/CEP_Midplane.pnl" -root.OSSubcluster_Hardware NavPanelConfig "Hardware/CEP_OSSubcluster.pnl" root.BGPAppl_Processes NavPanelConfig "Processes/BGPAppl.pnl" root.CEPHardwareMonitor_Processes NavPanelConfig "Processes/CEPHardwareMonitor.pnl" root.BGPProc_Processes NavPanelConfig "Processes/BGPProc.pnl" +root.HBAAntenna_Hardware NavPanelConfig "Hardware/HBAAntenna.pnl" +root.IONode_Hardware NavPanelConfig "Hardware/CEP_IONode.pnl" +root.IONode_Processes NavPanelConfig "Processes/CEP_IONodeProcesses.pnl" +root.CEPlogProcessor_Processes NavPanelConfig "Processes/CEPlogProcessor.pnl" +root.PythonControl_Processes NavPanelConfig "Processes/PythonControl.pnl" rootSaves.Queries.Query NavigatorUserSaves "SELECT '_original.._value' FROM 'LOFAR_PIC*.status.state' REMOTE ALL WHERE '_original.._value' >= 20 AND '_original.._value' < 30", "SELECT '_original.._value' FROM 'LOFAR_PIC*.status.state' REMOTE ALL WHERE '_original.._value' >= 30 AND '_original.._value' < 40", "SELECT '_original.._value' FROM 'LOFAR_PIC*.status.state' REMOTE ALL WHERE '_original.._value' >= 40 AND '_original.._value' < 50", "SELECT '_original.._value' FROM 'LOFAR_PIC*.status.state' REMOTE ALL WHERE '_original.._value' >= 50 AND '_original.._value' < 60" rootSaves.Queries.Short NavigatorUserSaves "All hardware in Maintenance", "All hardware in Test", "All hardware in Suspicious", "All hardware in Alarm" diff --git a/MAC/Deployment/data/PVSS/data/Observation.dpdef b/MAC/Deployment/data/PVSS/data/Observation.dpdef index d177f846026..23463e0cf1d 100644 --- a/MAC/Deployment/data/PVSS/data/Observation.dpdef +++ b/MAC/Deployment/data/PVSS/data/Observation.dpdef @@ -12,6 +12,9 @@ receiverList string sampleClock int runState string measurementSet string +processType string +processSubtype string +strategy string stationList string inputNodeList string diff --git a/MAC/Deployment/data/PVSS/data/PVSSDataPoints.base b/MAC/Deployment/data/PVSS/data/PVSSDataPoints.base index 9074c5c3e92..d7ebb363914 100644 --- a/MAC/Deployment/data/PVSS/data/PVSSDataPoints.base +++ b/MAC/Deployment/data/PVSS/data/PVSSDataPoints.base @@ -20,7 +20,7 @@ LOFAR - M N LOFAR PIC - M N LOFAR_PIC Ring - M N LOFAR_PIC_@ring@ -Station STS M Y LOFAR_PIC_@ring@_@station@ +Station - M Y LOFAR_PIC_@ring@_@station@ WAN - M N LOFAR_PIC_WAN WANarea - M N LOFAR_PIC_WAN_@wan@ Switch - M Y LOFAR_PIC_WAN_@wan@_@switch@ @@ -28,7 +28,7 @@ PermSW - M N LOFAR_PermSW RTDBPort - M N CRTriggerPort # Note: the next 4 lines are neccesary for PVSS2SAS to create the PIC tree. Ring - M N LOFAR_PermSW_@ring@ -Station STS M Y LOFAR_PermSW_@ring@_@station@ +Station - M Y LOFAR_PermSW_@ring@_@station@ Cluster - M N LOFAR_PermSW_@cluster@ Node - M Y LOFAR_PermSW_@cluster@_@node@ Daemons - M N LOFAR_PermSW_Daemons @@ -62,7 +62,7 @@ IONode ION C Y LOFAR_PIC_BGP_@midplane@_@ionode@ OSRack - C N LOFAR_PIC_@osrack@ LocusNode LCN C Y LOFAR_PIC_@osrack@_@locusnode@ CEPPermSW - C N LOFAR_PermSW -CEPHardwareMonitor CHM C Y LOFAR_PermSW_HardwareMonitor +CEPHardwareMonitor CHM C Y LOFAR_PermSW_CEPHardwareMonitor SoftwareMonitor - C Y LOFAR_PermSW_SoftwareMonitor Daemons - C N LOFAR_PermSW_Daemons PVSS00pmon - C Y LOFAR_PermSW_Daemons_PVSS00pmon @@ -87,7 +87,7 @@ RCU RCU S N LOFAR_PIC_@cabinet@_@subrack@_@RSPBoard@_@rcu@ TBBoard TBB S Y LOFAR_PIC_@cabinet@_@subrack@_@TBBoard@ LBAAntenna LBA S N LOFAR_PIC_@lbaantenna@ HBAAntenna HBA S N LOFAR_PIC_@hbaantenna@ -StationInfo - S Y LOFAR_PIC_StationInfo +StationInfo STI S Y LOFAR_PIC_StationInfo StnPermSW - S N LOFAR_PermSW # Note: the next 2 lines are neccesary for PVSS2SAS to create the PIC tree. Cluster - S N LOFAR_PermSW_@cluster@ diff --git a/MAC/Deployment/data/PVSS/data/RSPBoard.dpdef b/MAC/Deployment/data/PVSS/data/RSPBoard.dpdef index ba7397cd98b..05135b04192 100644 --- a/MAC/Deployment/data/PVSS/data/RSPBoard.dpdef +++ b/MAC/Deployment/data/PVSS/data/RSPBoard.dpdef @@ -2,6 +2,8 @@ voltage12 float voltage25 float voltage33 float version string +bitmode int +bitmodeCapability int alert int splitterOn int Ethernet.status :ObjectStatus diff --git a/MAC/Deployment/data/PVSS/data/SoftwareMonitor.dpdef b/MAC/Deployment/data/PVSS/data/SoftwareMonitor.dpdef new file mode 100644 index 00000000000..a051033b4a0 --- /dev/null +++ b/MAC/Deployment/data/PVSS/data/SoftwareMonitor.dpdef @@ -0,0 +1,2 @@ +# SoftwareMonitor +SWLevel int diff --git a/MAC/Deployment/data/PVSS/data/Station.dpdef b/MAC/Deployment/data/PVSS/data/Station.dpdef deleted file mode 100644 index 77c09bc0bb5..00000000000 --- a/MAC/Deployment/data/PVSS/data/Station.dpdef +++ /dev/null @@ -1,5 +0,0 @@ -# Station -# -power48On bool -power220On bool - diff --git a/MAC/Deployment/data/PVSS/data/StationInfo.dpdef b/MAC/Deployment/data/PVSS/data/StationInfo.dpdef index a9d495292f1..2549833daf4 100644 --- a/MAC/Deployment/data/PVSS/data/StationInfo.dpdef +++ b/MAC/Deployment/data/PVSS/data/StationInfo.dpdef @@ -5,6 +5,10 @@ N_LBAS int N_HBAS int HBA_Split bool wide_LBAS bool +power48On bool +power220On bool +datastream0 bool +datastream1 bool Cabinet.X float Cabinet.Y float Cabinet.Z float diff --git a/MAC/Deployment/data/PVSS/data/StnObservation.dpdef b/MAC/Deployment/data/PVSS/data/StnObservation.dpdef index 9d213e2143e..a20fd24d3ba 100644 --- a/MAC/Deployment/data/PVSS/data/StnObservation.dpdef +++ b/MAC/Deployment/data/PVSS/data/StnObservation.dpdef @@ -1,5 +1,5 @@ name string claim :Claim receiverBitmap string -HBAbitmap string -LBAbitmap string +HBABitmap string +LBABitmap string diff --git a/MAC/Deployment/data/StaticMetaData/AntennaFields/DE601-AntennaField.conf b/MAC/Deployment/data/StaticMetaData/AntennaFields/DE601-AntennaField.conf index 57ae1d4274b..1835b96fc23 100644 --- a/MAC/Deployment/data/StaticMetaData/AntennaFields/DE601-AntennaField.conf +++ b/MAC/Deployment/data/StaticMetaData/AntennaFields/DE601-AntennaField.conf @@ -1,227 +1,227 @@ # # AntennaPositions for DE601 -# ITRF2005 target_date = 2012.5 -# Created: 2012-01-24 14:49:41 +# IGS08 measurement date 2012-05-30 +# Created: 2012-09-03 15:56:36 # NORMAL_VECTOR LBA -3 [ 0.631139 0.075776 0.771960 ] +3 [ 0.6328271882340650 0.0780991312002186 0.7703442292333122 ] ROTATION_MATRIX LBA 3 x 3 [ - -0.1194530000 -0.7664170000 0.6311390000 - 0.9928400000 -0.0923420000 0.0757770000 - 0.0002040000 0.6356720000 0.7719590000 + -0.1214634322601195 -0.7647321881206433 0.6328271882340650 + 0.9925955422980562 -0.0928219139137982 0.0780991312002186 + -0.0008509016506948 0.6376274560819920 0.7703442292333122 ] LBA -3 [ 4034036.395510000 487026.791083000 4900279.047 ] +3 [ 4034038.256327 487026.578711 4900280.346094 ] 96 x 2 x 3 [ - -5.283000 -12.310000 5.535000 -5.283000 -12.310000 5.535000 - -9.277000 -5.631001 8.142000 -9.277000 -5.631001 8.142000 - -8.284000 -12.058000 7.964000 -8.284000 -12.058000 7.964000 --11.799000 -6.449001 10.284000 -11.799000 -6.449001 10.284000 - 4.631000 19.175001 -5.680000 4.631000 19.175001 -5.680000 - 1.120000 23.908000 -3.276000 1.120000 23.908000 -3.276000 - 10.718000 21.431001 -10.880000 10.718000 21.431001 -10.880000 - 8.655000 25.765001 -9.621000 8.655000 25.765001 -9.621000 - -7.792000 -17.357000 8.085000 -7.792000 -17.357000 8.085000 - -5.652000 -23.938000 6.985000 -5.652000 -23.938000 6.985000 - -8.125000 -26.191000 9.229000 -8.125000 -26.191000 9.229000 --11.092000 -24.343001 11.473000 -11.092000 -24.343001 11.473000 - 1.099000 4.375000 -1.331000 1.099000 4.375000 -1.331000 - -2.960000 2.384000 2.185000 -2.960000 2.384000 2.185000 - -4.506000 5.270000 3.164000 -4.506000 5.270000 3.164000 - -2.448000 9.094000 1.104000 -2.448000 9.094000 1.104000 - -7.252000 5.674000 5.370000 -7.252000 5.674000 5.370000 - -9.562000 1.818999 7.640000 -9.562000 1.818999 7.640000 --11.936000 10.083999 8.765000 -11.936000 10.083999 8.765000 --14.520000 7.011999 11.181000 -14.520000 7.011999 11.181000 - 15.278000 -9.444998 -11.560000 15.278000 -9.444998 -11.560000 - 13.623000 -18.024999 -9.361000 13.623000 -18.024999 -9.361000 - 21.915000 -13.609998 -16.576990 21.915000 -13.609998 -16.576990 - 16.310000 -22.827998 -11.084000 16.310000 -22.827998 -11.084000 - 0.692000 -13.503000 0.767000 0.692000 -13.503000 0.767000 - -1.600000 -16.217000 2.910000 -1.600000 -16.217000 2.910000 - 3.265000 -16.394999 -1.051000 3.265000 -16.394999 -1.051000 - 4.489000 -20.225999 -1.674000 4.489000 -20.225999 -1.674000 - 14.811000 6.202002 -12.724000 14.811000 6.202002 -12.724000 - 16.927000 8.834002 -14.714000 16.927000 8.834002 -14.714000 - 19.746000 -0.605998 -16.087000 19.746000 -0.605998 -16.087000 - 22.919000 3.514002 -19.087990 22.919000 3.514002 -19.087990 --12.694000 13.910999 9.007000 -12.694000 13.910999 9.007000 --10.578000 19.695999 6.705000 -10.578000 19.695999 6.705000 --15.802000 27.354999 10.221000 -15.802000 27.354999 10.221000 --18.392000 22.015999 12.866000 -18.392000 22.015999 12.866000 - 4.801000 2.949001 -4.217000 4.801000 2.949001 -4.217000 - 3.261000 8.433001 -3.499000 3.261000 8.433001 -3.499000 - 7.681000 4.213001 -6.697000 7.681000 4.213001 -6.697000 - 7.290000 7.903001 -6.741000 7.290000 7.903001 -6.741000 --16.847000 -12.226001 14.983000 -16.847000 -12.226001 14.983000 --18.686000 -2.335001 15.510000 -18.686000 -2.335001 15.510000 --22.770000 -9.405002 19.548000 -22.770000 -9.405002 19.548000 --23.601000 1.090998 19.192000 -23.601000 1.090998 19.192000 - 5.346000 -3.562999 -4.020000 5.346000 -3.562999 -4.020000 - 8.348000 -2.726999 -6.557000 8.348000 -2.726999 -6.557000 - 5.668000 -8.348999 -3.810000 5.668000 -8.348999 -3.810000 - 9.460000 -6.722999 -7.072000 9.460000 -6.722999 -7.072000 - -0.494000 17.569000 -1.331000 -0.494000 17.569000 -1.331000 - 15.817000 -2.771998 -12.660000 15.817000 -2.771998 -12.660000 - -0.540000 28.513000 -2.374000 -0.540000 28.513000 -2.374000 - -7.889000 19.900000 4.486000 -7.889000 19.900000 4.486000 - 8.210000 -23.674999 -4.376000 8.210000 -23.674999 -4.376000 - 24.219000 -6.743998 -19.138990 24.219000 -6.743998 -19.138990 - -8.444000 27.458000 4.194000 -8.444000 27.458000 4.194000 - 0.652000 7.756000 -1.299000 0.652000 7.756000 -1.299000 --16.589000 -19.124001 15.453000 -16.589000 -19.124001 15.453000 - 9.354000 -17.049999 -5.966000 9.354000 -17.049999 -5.966000 - -2.634000 -19.827000 4.111000 -2.634000 -19.827000 4.111000 - 20.886000 13.069002 -18.369000 20.886000 13.069002 -18.369000 - 13.120000 -0.397999 -10.689000 13.120000 -0.397999 -10.689000 - 9.507000 -13.233999 -6.468000 9.507000 -13.233999 -6.468000 --15.373000 -2.025001 12.770000 -15.373000 -2.025001 12.770000 - -5.265000 -0.674000 4.372000 -5.265000 -0.674000 4.372000 - 3.325000 13.951001 -4.096000 3.325000 13.951001 -4.096000 - -2.693000 -6.971000 2.891000 -2.693000 -6.971000 2.891000 - 13.954000 13.371001 -12.730000 13.954000 13.371001 -12.730000 - 10.561000 7.401001 -9.367000 10.561000 7.401001 -9.367000 - 1.612000 -24.018000 1.053000 1.612000 -24.018000 1.053000 - -0.508000 -25.785000 2.960000 -0.508000 -25.785000 2.960000 - 1.098000 -4.952000 -0.409000 1.098000 -4.952000 -0.409000 --13.483000 -10.591001 12.071000 -13.483000 -10.591001 12.071000 - 9.972000 0.178001 -8.172000 9.972000 0.178001 -8.172000 - -6.224000 15.125000 3.596000 -6.224000 15.125000 3.596000 - 6.067000 13.718001 -6.315000 6.067000 13.718001 -6.315000 - -5.662000 27.602000 1.905000 -5.662000 27.602000 1.905000 - 0.189000 -9.917000 0.824000 0.189000 -9.917000 0.824000 - 12.441000 -5.395999 -9.640000 12.441000 -5.395999 -9.640000 --10.720000 -17.640001 10.507000 -10.720000 -17.640001 10.507000 --19.034000 6.023999 14.970000 -19.034000 6.023999 14.970000 --13.252000 2.430999 10.596000 -13.252000 2.430999 10.596000 - -1.803000 21.652000 -0.663000 -1.803000 21.652000 -0.663000 - -8.941000 9.680000 6.355000 -8.941000 9.680000 6.355000 - -2.694000 -3.355000 2.535000 -2.694000 -3.355000 2.535000 - 19.547000 -9.261998 -15.069990 19.547000 -9.261998 -15.069990 - 4.018000 -0.348999 -3.251000 4.018000 -0.348999 -3.251000 - 16.196000 22.425002 -15.458000 16.196000 22.425002 -15.458000 - 11.739000 15.420001 -11.122000 11.739000 15.420001 -11.122000 - -7.878000 -0.990000 6.540000 -7.878000 -0.990000 6.540000 --23.226000 11.893998 17.818000 -23.226000 11.893998 17.818000 - -4.861000 -8.855000 4.849000 -4.861000 -8.855000 4.849000 - 10.658000 -24.627999 -6.284000 10.658000 -24.627999 -6.284000 --16.419000 13.017999 12.141000 -16.419000 13.017999 12.141000 - 2.430000 -8.065000 -1.191000 2.430000 -8.065000 -1.191000 - 5.988000 -11.835999 -3.728000 5.988000 -11.835999 -3.728000 - -3.519000 12.299000 1.664000 -3.519000 12.299000 1.664000 + -5.288327 -12.331211 5.533406 -5.288327 -12.331211 5.533406 + -9.261827 -5.633711 8.166406 -9.261827 -5.633711 8.166406 + -8.262327 -12.055711 7.971406 -8.262327 -12.055711 7.971406 +-11.768577 -6.434961 10.300156 -11.768577 -6.434961 10.300156 + 4.649173 19.186039 -5.691844 4.649173 19.186039 -5.691844 + 1.107173 23.921039 -3.256344 1.107173 23.921039 -3.256344 + 10.762173 21.388039 -10.930594 10.762173 21.388039 -10.930594 + 8.632423 25.778539 -9.759094 8.632423 25.778539 -9.759094 + -7.774577 -17.368461 8.080906 -7.774577 -17.368461 8.080906 + -5.667577 -23.900711 6.986406 -5.667577 -23.900711 6.986406 + -8.161145 -26.170756 9.251638 -8.161145 -26.170756 9.251638 +-11.074077 -24.306961 11.491156 -11.074077 -24.306961 11.491156 + 1.071923 4.389789 -1.357594 1.071923 4.389789 -1.357594 + -2.965327 2.415039 2.190656 -2.965327 2.415039 2.190656 + -4.502577 5.269789 3.207656 -4.502577 5.269789 3.207656 + -2.438327 9.113039 1.129406 -2.438327 9.113039 1.129406 + -7.223077 5.675289 5.390156 -7.223077 5.675289 5.390156 + -9.550577 1.830289 7.642906 -9.550577 1.830289 7.642906 +-11.915827 10.094789 8.781406 -11.915827 10.094789 8.781406 +-14.516827 7.013289 11.183656 -14.516827 7.013289 11.183656 + 15.283173 -9.441961 -11.572094 15.283173 -9.441961 -11.572094 + 13.571923 -17.998711 -9.390594 13.571923 -17.998711 -9.390594 + 21.859423 -13.623961 -16.604844 21.859423 -13.623961 -16.604844 + 16.311673 -22.825211 -11.106094 16.311673 -22.825211 -11.106094 + 0.673173 -13.470711 0.741656 0.673173 -13.470711 0.741656 + -1.618577 -16.208961 2.890156 -1.618577 -16.208961 2.890156 + 3.265923 -16.408211 -1.048344 3.265923 -16.408211 -1.048344 + 4.469423 -20.213961 -1.672594 4.469423 -20.213961 -1.672594 + 14.821173 6.170289 -12.725594 14.821173 6.170289 -12.725594 + 16.900173 8.819039 -14.721094 16.900173 8.819039 -14.721094 + 19.779923 -0.611211 -16.055844 19.779923 -0.611211 -16.055844 + 22.894423 3.520539 -19.073094 22.894423 3.520539 -19.073094 +-12.694577 13.948289 9.041656 -12.694577 13.948289 9.041656 +-10.543577 19.729539 6.727656 -10.543577 19.729539 6.727656 +-15.811077 27.358039 10.260406 -15.811077 27.358039 10.260406 +-18.369577 21.993289 12.902156 -18.369577 21.993289 12.902156 + 4.764173 2.932039 -4.243094 4.764173 2.932039 -4.243094 + 3.246203 8.369065 -3.522420 3.246203 8.369065 -3.522420 + 7.678423 4.164789 -6.719344 7.678423 4.164789 -6.719344 + 7.266423 7.887289 -6.746844 7.266423 7.887289 -6.746844 +-16.824577 -12.222211 15.032906 -16.824577 -12.222211 15.032906 +-18.612827 -2.337711 15.565156 -18.612827 -2.337711 15.565156 +-22.703619 -9.423919 19.600780 -22.703619 -9.423919 19.600780 +-23.549827 1.104039 19.256406 -23.549827 1.104039 19.256406 + 5.315923 -3.566461 -4.033094 5.315923 -3.566461 -4.033094 + 8.342673 -2.749211 -6.575844 8.342673 -2.749211 -6.575844 + 5.661173 -8.334211 -3.804344 5.661173 -8.334211 -3.804344 + 9.471923 -6.760211 -7.059094 9.471923 -6.760211 -7.059094 + -0.494577 17.580539 -1.320594 -0.494577 17.580539 -1.320594 + 15.834423 -2.775461 -12.626594 15.834423 -2.775461 -12.626594 + -0.545577 28.476539 -2.405344 -0.545577 28.476539 -2.405344 + -7.834827 19.906039 4.530656 -7.834827 19.906039 4.530656 + 8.189173 -23.683711 -4.404594 8.189173 -23.683711 -4.404594 + 24.212923 -6.743461 -19.154344 24.212923 -6.743461 -19.154344 + -8.428577 27.454039 4.223906 -8.428577 27.454039 4.223906 + 0.604423 7.736289 -1.277844 0.604423 7.736289 -1.277844 +-16.543327 -19.122461 15.513656 -16.543327 -19.122461 15.513656 + 9.311423 -17.052961 -5.978094 9.311423 -17.052961 -5.978094 + -2.680077 -19.839461 4.092656 -2.680077 -19.839461 4.092656 + 20.838423 13.066789 -18.439844 20.838423 13.066789 -18.439844 + 13.107923 -0.402711 -10.680094 13.107923 -0.402711 -10.680094 + 9.504923 -13.248461 -6.469344 9.504923 -13.248461 -6.469344 +-15.326077 -2.024461 12.764406 -15.326077 -2.024461 12.764406 + -5.265077 -0.691211 4.379906 -5.265077 -0.691211 4.379906 + 3.317673 13.969539 -4.109594 3.317673 13.969539 -4.109594 + -2.714327 -6.955961 2.874406 -2.714327 -6.955961 2.874406 + 13.910673 13.407039 -12.797594 13.910673 13.407039 -12.797594 + 10.516173 7.414789 -9.405844 10.516173 7.414789 -9.405844 + 1.575173 -24.009711 1.036156 1.575173 -24.009711 1.036156 + -0.540327 -25.800461 2.968906 -0.540327 -25.800461 2.968906 + 1.110423 -4.963461 -0.397094 1.110423 -4.963461 -0.397094 +-13.439077 -10.609961 12.127656 -13.439077 -10.609961 12.127656 + 9.960173 0.184039 -8.197344 9.960173 0.184039 -8.197344 + -6.190827 15.126039 3.632156 -6.190827 15.126039 3.632156 + 6.033673 13.740539 -6.350594 6.033673 13.740539 -6.350594 + -5.658577 27.625789 1.904656 -5.658577 27.625789 1.904656 + 0.180673 -9.929211 0.815656 0.180673 -9.929211 0.815656 + 12.453673 -5.400961 -9.629594 12.453673 -5.400961 -9.629594 +-10.715077 -17.645461 10.488156 -10.715077 -17.645461 10.488156 +-19.002077 6.028789 15.011906 -19.002077 6.028789 15.011906 +-13.244327 2.434289 10.636656 -13.244327 2.434289 10.636656 + -1.783077 21.665539 -0.643594 -1.783077 21.665539 -0.643594 + -8.925077 9.693039 6.384406 -8.925077 9.693039 6.384406 + -2.693077 -3.358711 2.511406 -2.693077 -3.358711 2.511406 + 19.545173 -9.294211 -15.090094 19.545173 -9.294211 -15.090094 + 3.993673 -0.342961 -3.286594 3.993673 -0.342961 -3.286594 + 16.160173 22.501789 -15.589844 16.160173 22.501789 -15.589844 + 11.706423 15.359289 -11.183844 11.706423 15.359289 -11.183844 + -7.867827 -0.989211 6.529156 -7.867827 -0.989211 6.529156 +-23.202577 11.917539 17.899656 -23.202577 11.917539 17.899656 + -4.880327 -8.855461 4.823156 -4.880327 -8.855461 4.823156 + 10.653673 -24.621711 -6.307594 10.653673 -24.621711 -6.307594 +-16.401577 13.002539 12.172406 -16.401577 13.002539 12.172406 + 2.428173 -8.072961 -1.199094 2.428173 -8.072961 -1.199094 + 6.019923 -11.860711 -3.713094 6.019923 -11.860711 -3.713094 + -3.493827 12.332789 1.679906 -3.493827 12.332789 1.679906 ] NORMAL_VECTOR HBA -3 [ 0.631204 0.076214 0.771864 ] +3 [ 0.6315838091894460 0.0768144370032466 0.7714929904002105 ] ROTATION_MATRIX HBA 3 x 3 [ - -0.1197220000 -0.7663210000 0.6312040000 - 0.9928070000 -0.0923300000 0.0762140000 - -0.0001250000 0.6357880000 0.7718640000 + -0.1198066951176159 -0.7659948264431504 0.6315838091894460 + 0.9927969402960025 -0.0919453659417217 0.0768144370032466 + -0.0007688587789930 0.6362373578658382 0.7714929904002105 ] HBA -3 [ 4034099.839510000 487013.425089000 4900229.635 ] +3 [ 4034101.521943 487012.756515 4900230.499386 ] 96 x 2 x 3 [ - 21.111010 -14.583999 -15.823000 21.111010 -14.583999 -15.823000 - 21.493010 -9.511999 -16.636000 21.493010 -9.511999 -16.636000 - 21.874010 -4.439999 -17.448000 21.874010 -4.439999 -17.448000 - 22.255010 0.633001 -18.261000 22.255010 0.633001 -18.261000 - 22.636010 5.705002 -19.073000 22.636010 5.705002 -19.073000 - 16.753010 -18.848999 -11.838000 16.753010 -18.848999 -11.838000 - 17.134010 -13.776999 -12.651000 17.134010 -13.776999 -12.651000 - 17.516010 -8.703999 -13.463000 17.516010 -8.703999 -13.463000 - 17.897010 -3.631999 -14.276000 17.897010 -3.631999 -14.276000 - 18.278010 1.440001 -15.088000 18.278010 1.440001 -15.088000 - 18.659010 6.512001 -15.901000 18.659010 6.512001 -15.901000 - 19.041000 11.584001 -16.714000 19.041000 11.584001 -16.714000 - 12.395010 -23.113999 -7.853000 12.395010 -23.113999 -7.853000 - 12.776010 -18.040999 -8.666000 12.776010 -18.040999 -8.666000 - 13.157010 -12.968999 -9.478000 13.157010 -12.968999 -9.478000 - 13.539010 -7.896999 -10.291000 13.539010 -7.896999 -10.291000 - 13.920010 -2.824999 -11.104000 13.920010 -2.824999 -11.104000 - 14.301010 2.247001 -11.916000 14.301010 2.247001 -11.916000 - 14.682000 7.319001 -12.729000 14.682000 7.319001 -12.729000 - 15.064000 12.391001 -13.541000 15.064000 12.391001 -13.541000 - 15.445000 17.463001 -14.354000 15.445000 17.463001 -14.354000 - 8.418010 -22.306000 -4.681000 8.418010 -22.306000 -4.681000 - 8.799010 -17.234000 -5.494000 8.799010 -17.234000 -5.494000 - 9.180010 -12.162000 -6.306000 9.180010 -12.162000 -6.306000 - 9.562010 -7.090000 -7.119000 9.562010 -7.090000 -7.119000 - 9.943010 -2.018000 -7.931000 9.943010 -2.018000 -7.931000 - 10.324000 3.054000 -8.744000 10.324000 3.054000 -8.744000 - 10.705000 8.126001 -9.556000 10.705000 8.126001 -9.556000 - 11.087000 13.198001 -10.369000 11.087000 13.198001 -10.369000 - 11.468000 18.271001 -11.181000 11.468000 18.271001 -11.181000 - 4.441010 -21.499000 -1.509000 4.441010 -21.499000 -1.509000 - 4.822010 -16.427000 -2.321000 4.822010 -16.427000 -2.321000 - 5.203010 -11.355000 -3.134000 5.203010 -11.355000 -3.134000 - 5.585010 -6.283000 -3.946000 5.585010 -6.283000 -3.946000 - 5.966010 -1.211000 -4.759000 5.966010 -1.211000 -4.759000 - 6.347000 3.861000 -5.571000 6.347000 3.861000 -5.571000 - 6.728000 8.934000 -6.384000 6.728000 8.934000 -6.384000 - 7.110000 14.006000 -7.196000 7.110000 14.006000 -7.196000 - 7.491000 19.078000 -8.009000 7.491000 19.078000 -8.009000 - 0.464010 -20.692000 1.664000 0.464010 -20.692000 1.664000 - 0.845010 -15.620000 0.851000 0.845010 -15.620000 0.851000 - 1.227010 -10.548000 0.039000 1.227010 -10.548000 0.039000 - 1.608010 -5.476000 -0.774000 1.608010 -5.476000 -0.774000 - 1.989000 -0.403000 -1.586000 1.989000 -0.403000 -1.586000 - 2.370000 4.669000 -2.399000 2.370000 4.669000 -2.399000 - 2.751000 9.741000 -3.211000 2.751000 9.741000 -3.211000 - 3.133000 14.813000 -4.024000 3.133000 14.813000 -4.024000 - 3.514000 19.885000 -4.836000 3.514000 19.885000 -4.836000 - -3.512990 -19.885001 4.836000 -3.512990 -19.885001 4.836000 - -3.131990 -14.813001 4.024000 -3.131990 -14.813001 4.024000 - -2.749990 -9.740001 3.211000 -2.749990 -9.740001 3.211000 - -2.368990 -4.668001 2.399000 -2.368990 -4.668001 2.399000 - -1.988000 0.403999 1.586000 -1.988000 0.403999 1.586000 - -1.607000 5.475999 0.774000 -1.607000 5.475999 0.774000 - -1.226000 10.548000 -0.039000 -1.226000 10.548000 -0.039000 - -0.844000 15.620000 -0.851000 -0.844000 15.620000 -0.851000 - -0.463000 20.692000 -1.664000 -0.463000 20.692000 -1.664000 - -7.489990 -19.077001 8.009000 -7.489990 -19.077001 8.009000 - -7.108990 -14.005001 7.196000 -7.108990 -14.005001 7.196000 - -6.726990 -8.933001 6.384000 -6.726990 -8.933001 6.384000 - -6.346000 -3.861001 5.571000 -6.346000 -3.861001 5.571000 - -5.965000 1.210999 4.759000 -5.965000 1.210999 4.759000 - -5.584000 6.282999 3.946000 -5.584000 6.282999 3.946000 - -5.202000 11.354999 3.134000 -5.202000 11.354999 3.134000 - -4.821000 16.426999 2.321000 -4.821000 16.426999 2.321000 - -4.440000 21.498999 1.509000 -4.440000 21.498999 1.509000 --11.466990 -18.270001 11.181000 -11.466990 -18.270001 11.181000 --11.085990 -13.198001 10.369000 -11.085990 -13.198001 10.369000 --10.704000 -8.126001 9.556000 -10.704000 -8.126001 9.556000 --10.323000 -3.054001 8.744000 -10.323000 -3.054001 8.744000 - -9.942000 2.017999 7.931000 -9.942000 2.017999 7.931000 - -9.561000 7.089999 7.119000 -9.561000 7.089999 7.119000 - -9.179000 12.161999 6.306000 -9.179000 12.161999 6.306000 - -8.798000 17.234999 5.494000 -8.798000 17.234999 5.494000 - -8.417000 22.306999 4.681000 -8.417000 22.306999 4.681000 --15.443990 -17.463002 14.354000 -15.443990 -17.463002 14.354000 --15.062990 -12.391002 13.541000 -15.062990 -12.391002 13.541000 --14.681000 -7.319002 12.729000 -14.681000 -7.319002 12.729000 --14.300000 -2.247002 11.916000 -14.300000 -2.247002 11.916000 --13.919000 2.824998 11.104000 -13.919000 2.824998 11.104000 --13.538000 7.897998 10.291000 -13.538000 7.897998 10.291000 --13.156000 12.969998 9.478000 -13.156000 12.969998 9.478000 --12.775000 18.041999 8.666000 -12.775000 18.041999 8.666000 --12.394000 23.113999 7.853000 -12.394000 23.113999 7.853000 --19.040000 -11.584002 16.714000 -19.040000 -11.584002 16.714000 --18.658000 -6.512002 15.901000 -18.658000 -6.512002 15.901000 --18.277000 -1.439002 15.088000 -18.277000 -1.439002 15.088000 --17.896000 3.632998 14.276000 -17.896000 3.632998 14.276000 --17.515000 8.704998 13.463000 -17.515000 8.704998 13.463000 --17.133000 13.776998 12.651000 -17.133000 13.776998 12.651000 --16.752000 18.848998 11.838000 -16.752000 18.848998 11.838000 --22.635000 -5.704002 19.073000 -22.635000 -5.704002 19.073000 --22.254000 -0.632002 18.261000 -22.254000 -0.632002 18.261000 --21.873000 4.439998 17.448000 -21.873000 4.439998 17.448000 --21.492000 9.511998 16.636000 -21.492000 9.511998 16.636000 --21.110000 14.583998 15.823000 -21.110000 14.583998 15.823000 + 20.808479 -15.324466 -15.498846 20.808479 -15.324466 -15.498846 + 21.305081 -10.285305 -16.398255 21.305081 -10.285305 -16.398255 + 21.801824 -5.241538 -17.294490 21.801824 -5.241538 -17.294490 + 22.288301 -0.198961 -18.196896 22.288301 -0.198961 -18.196896 + 22.775773 4.841546 -19.095841 22.775773 4.841546 -19.095841 + 16.351177 -19.412627 -11.455059 16.351177 -19.412627 -11.455059 + 16.851951 -14.368606 -12.354852 16.851951 -14.368606 -12.354852 + 17.343349 -9.320202 -13.254484 17.343349 -9.320202 -13.254484 + 17.842190 -4.274015 -14.158761 17.842190 -4.274015 -14.158761 + 18.326034 0.760223 -15.062858 18.326034 0.760223 -15.062858 + 18.827076 5.786030 -15.955155 18.827076 5.786030 -15.955155 + 19.317226 10.839638 -16.857749 19.317226 10.839638 -16.857749 + 11.894171 -23.508046 -7.425116 11.894171 -23.508046 -7.425116 + 12.394382 -18.456602 -8.331916 12.394382 -18.456602 -8.331916 + 12.897795 -13.395951 -9.235428 12.897795 -13.395951 -9.235428 + 13.392010 -8.355224 -10.119179 13.392010 -8.355224 -10.119179 + 13.874891 -3.311264 -11.016649 13.874891 -3.311264 -11.016649 + 14.359303 1.721462 -11.921558 14.359303 1.721462 -11.921558 + 14.855389 6.744568 -12.817716 14.855389 6.744568 -12.817716 + 15.351266 11.786073 -13.719430 15.351266 11.786073 -13.719430 + 15.833928 16.807357 -14.644782 15.833928 16.807357 -14.644782 + 7.934101 -22.553366 -4.270667 7.934101 -22.553366 -4.270667 + 8.436837 -17.502379 -5.176291 8.436837 -17.502379 -5.176291 + 8.934489 -12.440964 -6.091835 8.934489 -12.440964 -6.091835 + 9.440178 -7.394897 -6.979949 9.440178 -7.394897 -6.979949 + 9.928057 -2.358390 -7.882481 9.928057 -2.358390 -7.882481 + 10.417418 2.678927 -8.790594 10.417418 2.678927 -8.790594 + 10.901779 7.690834 -9.671504 10.901779 7.690834 -9.671504 + 11.383709 12.720639 -10.561304 11.383709 12.720639 -10.561304 + 11.888060 17.759934 -11.479011 11.888060 17.759934 -11.479011 + 3.983606 -21.599638 -1.127306 3.983606 -21.599638 -1.127306 + 4.469868 -16.549885 -2.015333 4.469868 -16.549885 -2.015333 + 4.962695 -11.471812 -2.927748 4.962695 -11.471812 -2.927748 + 5.466034 -6.433081 -3.830345 5.466034 -6.433081 -3.830345 + 5.965158 -1.412706 -4.735029 5.965158 -1.412706 -4.735029 + 6.448966 3.622535 -5.627056 6.448966 3.622535 -5.627056 + 6.932810 8.641480 -6.515978 6.932810 8.641480 -6.515978 + 7.425252 13.669809 -7.409707 7.425252 13.669809 -7.409707 + 7.925429 18.716368 -8.322290 7.925429 18.716368 -8.322290 + 0.023795 -20.661062 2.035743 0.023795 -20.661062 2.035743 + 0.506525 -15.605252 1.134160 0.506525 -15.605252 1.134160 + 1.002034 -10.534865 0.228568 1.002034 -10.534865 0.228568 + 1.491319 -5.480243 -0.670336 1.491319 -5.480243 -0.670336 + 1.978009 -0.460087 -1.574472 1.978009 -0.460087 -1.574472 + 2.471231 4.571114 -2.468265 2.471231 4.571114 -2.468265 + 2.950101 9.595565 -3.353625 2.950101 9.595565 -3.353625 + 3.449482 14.629253 -4.253460 3.449482 14.629253 -4.253460 + 3.949740 19.678057 -5.194628 3.949740 19.678057 -5.194628 + -3.954338 -19.713572 5.203984 -3.954338 -19.713572 5.203984 + -3.467550 -14.630971 4.296010 -3.467550 -14.630971 4.296010 + -2.969333 -9.564829 3.368020 -2.969333 -9.564829 3.368020 + -2.466625 -4.524140 2.460979 -2.466625 -4.524140 2.460979 + -1.964282 0.492650 1.563702 -1.964282 0.492650 1.563702 + -1.470498 5.519490 0.663385 -1.470498 5.519490 0.663385 + -0.986156 10.537807 -0.216855 -0.986156 10.537807 -0.216855 + -0.515216 15.563102 -1.104598 -0.515216 15.563102 -1.104598 + -0.048741 20.637184 -2.040557 -0.048741 20.637184 -2.040557 + -7.912010 -18.767008 8.358321 -7.912010 -18.767008 8.358321 + -7.427551 -13.702011 7.446257 -7.427551 -13.702011 7.446257 + -6.936950 -8.613499 6.531688 -6.936950 -8.613499 6.531688 + -6.432243 -3.567135 5.626633 -6.432243 -3.567135 5.626633 + -5.943853 1.451367 4.724607 -5.943853 1.451367 4.724607 + -5.456656 6.482695 3.827574 -5.456656 6.482695 3.827574 + -4.966912 11.489009 2.936708 -4.966912 11.489009 2.936708 + -4.470352 16.524891 2.032155 -4.470352 16.524891 2.032155 + -4.000854 21.587351 1.086924 -4.000854 21.587351 1.086924 +-11.876298 -17.808153 11.486245 -11.876298 -17.808153 11.486245 +-11.392820 -12.772782 10.588491 -11.392820 -12.772782 10.588491 +-10.906784 -7.686076 9.686815 -10.906784 -7.686076 9.686815 +-10.402393 -2.626532 8.775978 -10.402393 -2.626532 8.775978 + -9.901055 2.408071 7.866547 -9.901055 2.408071 7.866547 + -9.417383 7.427636 6.978004 -9.417383 7.427636 6.978004 + -8.934581 12.446144 6.080149 -8.934581 12.446144 6.080149 + -8.437507 17.502856 5.159731 -8.437507 17.502856 5.159731 + -7.961876 22.534184 4.230484 -7.961876 22.534184 4.230484 +-15.838315 -16.853924 14.637251 -15.838315 -16.853924 14.637251 +-15.352842 -11.832189 13.739050 -15.352842 -11.832189 13.739050 +-14.868224 -6.735355 12.820044 -14.868224 -6.735355 12.820044 +-14.369331 -1.664459 11.915128 -14.369331 -1.664459 11.915128 +-13.872101 3.346689 11.015968 -13.872101 3.346689 11.015968 +-13.397229 8.346846 10.136363 -13.397229 8.346846 10.136363 +-12.904699 13.405618 9.225228 -12.904699 13.405618 9.225228 +-12.394594 18.470053 8.290242 -12.394594 18.470053 8.290242 +-11.898727 23.504826 7.374869 -11.898727 23.504826 7.374869 +-19.300405 -10.875471 16.865419 -19.300405 -10.875471 16.865419 +-18.820482 -5.810455 15.955754 -18.820482 -5.810455 15.955754 +-18.336559 -0.726159 15.059094 -18.336559 -0.726159 15.059094 +-17.844674 4.299220 14.166271 -17.844674 4.299220 14.166271 +-17.351938 9.290226 13.270936 -17.351938 9.290226 13.270936 +-16.843463 14.361521 12.345023 -16.843463 14.361521 12.345023 +-16.365340 19.423544 11.404411 -16.365340 19.423544 11.404411 +-22.771571 -4.893640 19.095772 -22.771571 -4.893640 19.095772 +-22.292085 0.196370 18.197106 -22.292085 0.196370 18.197106 +-21.792245 5.232651 17.305845 -21.792245 5.232651 17.305845 +-21.303653 10.242335 16.408825 -21.303653 10.242335 16.408825 +-20.818984 15.294047 15.499783 -20.818984 15.294047 15.499783 ] diff --git a/MAC/Deployment/data/StaticMetaData/AntennaFields/FI609-AntennaField.conf b/MAC/Deployment/data/StaticMetaData/AntennaFields/FI609-AntennaField.conf index ba34a01ebf5..f0c2e0907ce 100644 --- a/MAC/Deployment/data/StaticMetaData/AntennaFields/FI609-AntennaField.conf +++ b/MAC/Deployment/data/StaticMetaData/AntennaFields/FI609-AntennaField.conf @@ -1,118 +1,70 @@ # # AntennaPositions for FI609 -# ITRF2005 target_date = 2012.5 -# Created: 2012-07-16 19:53:21 +# ITRF2005 target_date = 2013.5 +# Created: 2012-10-09 13:53:51 # NORMAL_VECTOR LBA -3 [ 0.598753 0.072099 0.797682 ] +3 [ 0.333971 0.126638 0.934037 ] ROTATION_MATRIX LBA 3 x 3 [ - -0.1195950000 -0.7919540000 0.5987530000 - 0.9928230000 -0.0954190000 0.0720990000 - 0.0000330000 0.6030780000 0.7976820000 + -0.1488160000 -0.9307610000 0.3339710000 + 0.9855900000 -0.1121430000 0.1266380000 + -0.0804170000 0.3480040000 0.9340380000 ] LBA -3 [ 3829261.424550000 469162.284861000 5062137.310 ] -96 x 2 x 3 [ - 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 - -2.019000 -0.243000 1.538000 -2.019000 -0.243000 1.538000 - -1.338000 2.105000 0.814000 -1.338000 2.105000 0.814000 - 0.800000 2.363000 -0.814000 0.800000 2.363000 -0.814000 - 2.019000 0.243000 -1.538000 2.019000 0.243000 -1.538000 - 1.338000 -2.105000 -0.814000 1.338000 -2.105000 -0.814000 - -0.800000 -2.363000 0.814000 -0.800000 -2.363000 0.814000 - 4.079000 2.490000 -3.287000 4.079000 2.490000 -3.287000 - 4.553000 -1.450000 -3.287000 4.553000 -1.450000 -3.287000 - 2.897000 -4.710000 -1.749000 2.897000 -4.710000 -1.749000 - -0.114000 -5.767000 0.607000 -0.114000 -5.767000 0.607000 - -3.073000 -4.125000 2.679000 -3.073000 -4.125000 2.679000 - -4.593000 -0.553001 3.498000 -4.593000 -0.553001 3.498000 - -3.965000 3.276999 2.680000 -3.965000 3.276999 2.680000 - -1.481000 5.575000 0.607000 -1.481000 5.575000 0.607000 - 1.696000 5.264000 -1.749000 1.696000 5.264000 -1.749000 - 3.325000 8.094000 -3.227000 3.325000 8.094000 -3.227000 - 5.895000 6.174000 -4.983000 5.895000 6.174000 -4.983000 - 8.055000 1.789000 -6.208000 8.055000 1.789000 -6.208000 - 7.100000 -5.296000 -4.851000 7.100000 -5.296000 -4.851000 - 5.558000 -7.771000 -3.469000 5.558000 -7.771000 -3.469000 - 2.574000 -9.698000 -1.056000 2.574000 -9.698000 -1.056000 - -0.823000 -9.088000 1.439000 -0.823000 -9.088000 1.439000 - -4.947000 -6.164001 4.270000 -4.947000 -6.164001 4.270000 - -7.561000 -2.503001 5.902000 -7.561000 -2.503001 5.902000 - -8.010000 1.856999 5.845000 -8.010000 1.856999 5.845000 - -6.423000 5.147999 4.356000 -6.423000 5.147999 4.356000 - -3.496000 8.124999 1.890000 -3.496000 8.124999 1.890000 - 0.098000 9.160000 -0.901000 0.098000 9.160000 -0.901000 - 6.085000 11.711000 -5.626000 6.085000 11.711000 -5.626000 - 8.653000 9.473001 -7.351000 8.653000 9.473001 -7.351000 - 9.729000 6.591001 -7.898000 9.729000 6.591001 -7.898000 - 10.555000 -1.357999 -7.800000 10.555000 -1.357999 -7.800000 - 11.846000 -3.957999 -8.534000 11.846000 -3.957999 -8.534000 - 7.953000 -9.375000 -5.122000 7.953000 -9.375000 -5.122000 - 4.619000 -12.043000 -2.378000 4.619000 -12.043000 -2.378000 - 1.254000 -15.057000 0.420000 1.254000 -15.057000 0.420000 - -1.108000 -13.300000 2.034000 -1.108000 -13.300000 2.034000 - -4.648000 -11.324001 4.512000 -4.648000 -11.324001 4.512000 - -8.914000 -6.506001 7.279000 -8.914000 -6.506001 7.279000 --10.281000 -4.219001 8.099000 -10.281000 -4.219001 8.099000 --10.622000 1.094999 7.874000 -10.622000 1.094999 7.874000 --11.584000 5.119999 8.232000 -11.584000 5.119999 8.232000 - -6.993000 11.547999 4.205000 -6.993000 11.547999 4.205000 - -4.144000 13.144999 1.922000 -4.144000 13.144999 1.922000 - 0.066000 14.419000 -1.353000 0.066000 14.419000 -1.353000 --46.335000 17.673996 33.182000 -46.335000 17.673996 33.182000 - 11.383990 57.565001 -13.748000 11.383990 57.565001 -13.748000 - 2.611000 17.408000 -3.533000 2.611000 17.408000 -3.533000 - 4.638000 19.009000 -5.200000 4.638000 19.009000 -5.200000 - 14.358000 8.711001 -11.565000 14.358000 8.711001 -11.565000 - 15.030000 -7.363999 -10.616000 15.030000 -7.363999 -10.616000 - 13.860000 -11.972999 -9.321000 13.860000 -11.972999 -9.321000 - 5.393000 -17.343000 -2.480000 5.393000 -17.343000 -2.480000 - -5.242000 -16.244001 5.403000 -5.242000 -16.244001 5.403000 --11.414000 -13.831001 9.818000 -11.414000 -13.831001 9.818000 --14.458000 0.234999 10.831000 -14.458000 0.234999 10.831000 --14.758000 8.385999 10.320000 -14.758000 8.385999 10.320000 - -9.310000 15.253999 5.609000 -9.310000 15.253999 5.609000 - -8.039000 23.172999 3.939000 -8.039000 23.172999 3.939000 - 2.247000 24.576000 -3.908000 2.247000 24.576000 -3.908000 - 11.966000 19.631001 -10.756000 11.966000 19.631001 -10.756000 - 15.751000 15.269001 -13.203000 15.751000 15.269001 -13.203000 - 19.928000 8.381001 -15.716000 19.928000 8.381001 -15.716000 - 18.162000 -8.927999 -12.826000 18.162000 -8.927999 -12.826000 - 15.488000 -15.960999 -10.183000 15.488000 -15.960999 -10.183000 - 7.405000 -24.872000 -3.310000 7.405000 -24.872000 -3.310000 - -3.977000 -24.282001 5.180000 -3.977000 -24.282001 5.180000 --11.131000 -21.194001 10.271000 -11.131000 -21.194001 10.271000 --16.975000 -11.649002 13.794000 -16.975000 -11.649002 13.794000 --21.572000 3.661998 15.861000 -21.572000 3.661998 15.861000 --15.823000 19.435998 10.120000 -15.823000 19.435998 10.120000 --11.836000 32.002999 5.991000 -11.836000 32.002999 5.991000 - 0.101000 31.247000 -2.900000 0.101000 31.247000 -2.900000 - 11.458000 26.949001 -11.036000 11.458000 26.949001 -11.036000 - 17.292000 23.246001 -15.080000 17.292000 23.246001 -15.080000 - 24.497000 6.208002 -18.949000 24.497000 6.208002 -18.949000 - 26.158000 -11.760998 -18.572000 26.158000 -11.760998 -18.572000 - 21.558000 -22.275998 -14.168000 21.558000 -22.275998 -14.168000 - 14.462000 -24.832999 -8.611000 14.462000 -24.832999 -8.611000 - 5.553000 -33.729000 -1.119000 5.553000 -33.729000 -1.119000 - -9.613000 -30.959001 10.014000 -9.613000 -30.959001 10.014000 --15.886000 -26.187002 14.291000 -15.886000 -26.187002 14.291000 --24.716000 -14.105002 19.827000 -24.716000 -14.105002 19.827000 --25.169000 -5.898002 19.425000 -25.169000 -5.898002 19.425000 --24.556000 14.570998 17.115000 -24.556000 14.570998 17.115000 --20.355000 18.467998 13.610000 -20.355000 18.467998 13.610000 --23.588000 23.474998 15.584000 -23.588000 23.474998 15.584000 - 3.630000 41.115000 -6.441000 3.630000 41.115000 -6.441000 - 21.736000 27.821002 -18.830000 21.736000 27.821002 -18.830000 - 31.775000 11.529002 -24.893000 31.775000 11.529002 -24.893000 - 32.237000 -4.510997 -23.790000 32.237000 -4.510997 -23.790000 - 11.012000 -39.388999 -4.705000 11.012000 -39.388999 -4.705000 - -6.724000 -34.986001 8.209000 -6.724000 -34.986001 8.209000 --19.713000 -31.887002 17.679000 -19.713000 -31.887002 17.679000 --30.445000 9.700997 21.975000 -30.445000 9.700997 21.975000 +3 [ 2136832.728720000 810088.928305000 5935285.442 ] +48 x 2 x 3 [ + 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 + -0.912000 2.380000 0.004000 -0.912000 2.380000 0.004000 + -2.445000 0.506000 0.806000 -2.445000 0.506000 0.806000 + -1.479000 -2.014000 0.802000 -1.479000 -2.014000 0.802000 + 0.913000 -2.382000 -0.003000 0.913000 -2.382000 -0.003000 + 2.446000 -0.508000 -0.805000 2.446000 -0.508000 -0.805000 + 1.480000 2.014000 -0.802000 1.480000 2.014000 -0.802000 + -0.542000 -5.694000 0.966000 -0.542000 -5.694000 0.966000 + 3.082000 -4.894000 -0.438000 3.082000 -4.894000 -0.438000 + 5.265000 -1.806000 -1.638000 5.265000 -1.806000 -1.638000 + 4.983000 2.129000 -2.070000 4.983000 2.129000 -2.070000 + 2.370000 5.066000 -1.534000 2.370000 5.066000 -1.534000 + -1.351000 5.633000 -0.280000 -1.351000 5.633000 -0.280000 + -4.441000 3.563999 1.105000 -4.441000 3.563999 1.105000 + -5.451000 -0.173001 1.973000 -5.451000 -0.173001 1.973000 + -3.912000 -3.830001 1.918000 -3.912000 -3.830001 1.918000 + -5.729000 -6.740001 2.963000 -5.729000 -6.740001 2.963000 + -3.029000 -9.120000 2.320000 -3.029000 -9.120000 2.320000 + 1.656000 -10.163000 0.786000 1.656000 -10.163000 0.786000 + 7.453000 -6.582000 -1.773000 7.453000 -6.582000 -1.773000 + 8.995000 -3.898999 -2.688000 8.995000 -3.898999 -2.688000 + 9.484000 0.302001 -3.432000 9.484000 0.302001 -3.432000 + 7.595000 4.116000 -3.274000 7.595000 4.116000 -3.274000 + 3.399000 7.992000 -2.299000 3.399000 7.992000 -2.299000 + -0.835000 9.824000 -1.033000 -0.835000 9.824000 -1.033000 + -4.818000 8.848999 0.523000 -4.818000 8.848999 0.523000 + -7.053000 5.830999 1.732000 -7.053000 5.830999 1.732000 + -8.480000 1.332999 2.852000 -8.480000 1.332999 2.852000 + -7.947000 -3.283001 3.287000 -7.947000 -3.283001 3.287000 + -7.781000 -11.260001 4.309000 -7.781000 -11.260001 4.309000 + -4.804000 -13.529001 3.553000 -4.804000 -13.529001 3.553000 + -1.861000 -13.806000 2.538000 -1.861000 -13.806000 2.538000 + 5.400000 -12.037000 -0.299000 5.400000 -12.037000 -0.299000 + 8.181000 -12.666999 -1.208000 8.181000 -12.666999 -1.208000 + 11.351000 -6.183999 -3.220000 11.351000 -6.183999 -3.220000 + 12.344000 -1.308999 -4.236000 12.344000 -1.308999 -4.236000 + 13.629000 3.719001 -5.378000 13.629000 3.719001 -5.378000 + 11.154000 5.909001 -4.790000 11.154000 5.909001 -4.790000 + 8.019000 9.422001 -4.145000 8.019000 9.422001 -4.145000 + 2.114000 12.810000 -2.493000 2.114000 12.810000 -2.493000 + -0.426000 13.639000 -1.697000 -0.426000 13.639000 -1.697000 + -5.195000 12.205999 0.203000 -5.195000 12.205999 0.203000 + -9.089000 11.953999 1.630000 -9.089000 11.953999 1.630000 +-12.860000 4.291999 4.017000 -12.860000 4.291999 4.017000 +-13.116000 0.364999 4.641000 -13.116000 0.364999 4.641000 +-12.545000 -5.064001 5.173000 -12.545000 -5.064001 5.173000 + -2.470000 12.526000 -0.815000 -2.470000 12.526000 -0.815000 + -5.517000 -10.688001 3.422000 -5.517000 -10.688001 3.422000 ] NORMAL_VECTOR HBA @@ -126,54 +78,54 @@ ROTATION_MATRIX HBA ] HBA -3 [ 2136818.263510000 810038.592116000 5935299.531 ] +3 [ 2136818.697730000 810039.764004000 5935299.217 ] 48 x 2 x 3 [ --18.938810 -14.472459 8.734270 -18.938810 -14.472459 8.734270 --17.132810 -9.823459 7.458270 -17.132810 -9.823459 7.458270 --15.324810 -5.173459 6.181270 -15.324810 -5.173459 6.181270 --13.518810 -0.525459 4.905270 -13.518810 -0.525459 4.905270 - -9.903810 8.772542 2.352270 -9.903810 8.772542 2.352270 - -8.096810 13.420542 1.075270 -8.096810 13.420542 1.075270 - -4.481820 22.718542 -1.477730 -4.481820 22.718542 -1.477730 - -2.675820 27.366542 -2.753730 -2.675820 27.366542 -2.753730 --14.435810 -16.585459 7.410270 -14.435810 -16.585459 7.410270 --12.628810 -11.937459 6.134270 -12.628810 -11.937459 6.134270 --10.820810 -7.288458 4.858270 -10.820810 -7.288458 4.858270 - -9.014810 -2.639458 3.581270 -9.014810 -2.639458 3.581270 - -5.399810 6.657542 1.028270 -5.399810 6.657542 1.028270 - -3.592810 11.307542 -0.247730 -3.592810 11.307542 -0.247730 - 0.021190 20.604542 -2.800730 0.021190 20.604542 -2.800730 - 1.828180 25.253543 -4.077730 1.828180 25.253543 -4.077730 - -9.931810 -18.700458 6.087270 -9.931810 -18.700458 6.087270 - -8.124810 -14.052458 4.810270 -8.124810 -14.052458 4.810270 - -6.317810 -9.402458 3.534270 -6.317810 -9.402458 3.534270 - -4.510810 -4.753458 2.257270 -4.510810 -4.753458 2.257270 - -0.896810 4.543542 -0.295730 -0.896810 4.543542 -0.295730 - 0.910190 9.192543 -1.571730 0.910190 9.192543 -1.571730 - 4.525190 18.489543 -4.124730 4.525190 18.489543 -4.124730 - 6.331190 23.138543 -5.401730 6.331190 23.138543 -5.401730 - -5.427810 -20.814458 4.763270 -5.427810 -20.814458 4.763270 - -3.621810 -16.165458 3.487270 -3.621810 -16.165458 3.487270 - -1.813810 -11.516458 2.210270 -1.813810 -11.516458 2.210270 - -0.007810 -6.868457 0.934270 -0.007810 -6.868457 0.934270 - 3.607190 2.428543 -1.618730 3.607190 2.428543 -1.618730 - 5.414190 7.078543 -2.895730 5.414190 7.078543 -2.895730 - 9.028190 16.375543 -5.448730 9.028190 16.375543 -5.448730 - 10.835190 21.024543 -6.724730 10.835190 21.024543 -6.724730 - -0.924810 -22.928458 3.439270 -0.924810 -22.928458 3.439270 - 0.882190 -18.280457 2.163270 0.882190 -18.280457 2.163270 - 2.689190 -13.630457 0.886270 2.689190 -13.630457 0.886270 - 4.496190 -8.982457 -0.389730 4.496190 -8.982457 -0.389730 - 8.111190 0.315543 -2.943730 8.111190 0.315543 -2.943730 - 9.918190 4.963543 -4.219730 9.918190 4.963543 -4.219730 - 13.532190 14.261544 -6.772730 13.532190 14.261544 -6.772730 - 15.340190 18.910544 -8.049730 15.340190 18.910544 -8.049730 - 3.579190 -25.042457 2.115270 3.579190 -25.042457 2.115270 - 5.386190 -20.393457 0.839270 5.386190 -20.393457 0.839270 - 7.193190 -15.745457 -0.437730 7.193190 -15.745457 -0.437730 - 9.001190 -11.096457 -1.713730 9.001190 -11.096457 -1.713730 - 12.615190 -1.799456 -4.266730 12.615190 -1.799456 -4.266730 - 14.421190 2.850544 -5.543730 14.421190 2.850544 -5.543730 - 18.035190 12.147544 -8.096730 18.035190 12.147544 -8.096730 - 19.843190 16.796544 -9.372730 19.843190 16.796544 -9.372730 +-19.391000 -15.634702 9.053400 -19.391000 -15.634702 9.053400 +-17.585000 -10.985702 7.777400 -17.585000 -10.985702 7.777400 +-15.777000 -6.335702 6.500400 -15.777000 -6.335702 6.500400 +-13.971000 -1.687702 5.224400 -13.971000 -1.687702 5.224400 +-10.356000 7.610299 2.671400 -10.356000 7.610299 2.671400 + -8.549000 12.258299 1.394400 -8.549000 12.258299 1.394400 + -4.934010 21.556299 -1.158600 -4.934010 21.556299 -1.158600 + -3.128010 26.204299 -2.434600 -3.128010 26.204299 -2.434600 +-14.888000 -17.747702 7.729400 -14.888000 -17.747702 7.729400 +-13.081000 -13.099702 6.453400 -13.081000 -13.099702 6.453400 +-11.273000 -8.450701 5.177400 -11.273000 -8.450701 5.177400 + -9.467000 -3.801701 3.900400 -9.467000 -3.801701 3.900400 + -5.852000 5.495299 1.347400 -5.852000 5.495299 1.347400 + -4.045000 10.145299 0.071400 -4.045000 10.145299 0.071400 + -0.431010 19.442300 -2.481600 -0.431010 19.442300 -2.481600 + 1.375990 24.091300 -3.758600 1.375990 24.091300 -3.758600 +-10.384000 -19.862701 6.406400 -10.384000 -19.862701 6.406400 + -8.577000 -15.214701 5.129400 -8.577000 -15.214701 5.129400 + -6.770000 -10.564701 3.853400 -6.770000 -10.564701 3.853400 + -4.963000 -5.915701 2.576400 -4.963000 -5.915701 2.576400 + -1.349000 3.381299 0.023400 -1.349000 3.381299 0.023400 + 0.458000 8.030300 -1.252600 0.458000 8.030300 -1.252600 + 4.073000 17.327300 -3.805600 4.073000 17.327300 -3.805600 + 5.878990 21.976300 -5.082600 5.878990 21.976300 -5.082600 + -5.880000 -21.976701 5.082400 -5.880000 -21.976701 5.082400 + -4.074000 -17.327701 3.806400 -4.074000 -17.327701 3.806400 + -2.266000 -12.678701 2.529400 -2.266000 -12.678701 2.529400 + -0.460000 -8.030700 1.253400 -0.460000 -8.030700 1.253400 + 3.155000 1.266300 -1.299600 3.155000 1.266300 -1.299600 + 4.962000 5.916300 -2.576600 4.962000 5.916300 -2.576600 + 8.576000 15.213300 -5.129600 8.576000 15.213300 -5.129600 + 10.383000 19.862300 -6.405600 10.383000 19.862300 -6.405600 + -1.377000 -24.090701 3.758400 -1.377000 -24.090701 3.758400 + 0.430000 -19.442700 2.482400 0.430000 -19.442700 2.482400 + 2.237000 -14.792700 1.205400 2.237000 -14.792700 1.205400 + 4.044000 -10.144700 -0.070600 4.044000 -10.144700 -0.070600 + 7.659000 -0.846700 -2.624600 7.659000 -0.846700 -2.624600 + 9.466000 3.801300 -3.900600 9.466000 3.801300 -3.900600 + 13.080000 13.099301 -6.453600 13.080000 13.099301 -6.453600 + 14.888000 17.748301 -7.730600 14.888000 17.748301 -7.730600 + 3.127000 -26.204700 2.434400 3.127000 -26.204700 2.434400 + 4.934000 -21.555700 1.158400 4.934000 -21.555700 1.158400 + 6.741000 -16.907700 -0.118600 6.741000 -16.907700 -0.118600 + 8.549000 -12.258700 -1.394600 8.549000 -12.258700 -1.394600 + 12.163000 -2.961699 -3.947600 12.163000 -2.961699 -3.947600 + 13.969000 1.688301 -5.224600 13.969000 1.688301 -5.224600 + 17.583000 10.985301 -7.777600 17.583000 10.985301 -7.777600 + 19.391000 15.634301 -9.053600 19.391000 15.634301 -9.053600 ] diff --git a/MAC/Deployment/data/StaticMetaData/AntennaFields/RS305-AntennaField.conf b/MAC/Deployment/data/StaticMetaData/AntennaFields/RS305-AntennaField.conf new file mode 100644 index 00000000000..733ed4df00c --- /dev/null +++ b/MAC/Deployment/data/StaticMetaData/AntennaFields/RS305-AntennaField.conf @@ -0,0 +1,179 @@ +# +# AntennaPositions for RS305 +# ITRF2005 target_date = 2012.5 +# Created: 2012-10-10 14:47:46 +# + +NORMAL_VECTOR LBA +3 [ 0.598460 0.072037 0.797907 ] + +ROTATION_MATRIX LBA +3 x 3 [ + -0.1195790000 -0.7921780000 0.5984600000 + 0.9928250000 -0.0954460000 0.0720370000 + 0.0000540000 0.6027800000 0.7979070000 +] + +LBA +3 [ 3828720.758730000 454781.410823000 5063851.082 ] +96 x 2 x 3 [ + 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 + -2.020000 -0.243000 1.537000 -2.020000 -0.243000 1.537000 + -1.338000 2.105000 0.814000 -1.338000 2.105000 0.814000 + 0.800000 2.363000 -0.814000 0.800000 2.363000 -0.814000 + 2.020000 0.243000 -1.537000 2.020000 0.243000 -1.537000 + 1.338000 -2.105000 -0.814000 1.338000 -2.105000 -0.814000 + -0.800000 -2.363000 0.814000 -0.800000 -2.363000 0.814000 + -2.079000 5.305000 1.080000 -2.079000 5.305000 1.080000 + 1.078000 5.547000 -1.310000 1.078000 5.547000 -1.310000 + 3.731000 3.192001 -3.087000 3.731000 3.192001 -3.087000 + 4.638000 -0.655999 -3.420000 4.638000 -0.655999 -3.420000 + 3.375000 -4.195999 -2.153000 3.375000 -4.195999 -2.153000 + 0.533000 -5.774000 0.121000 0.533000 -5.774000 0.121000 + -2.559000 -4.649000 2.339000 -2.559000 -4.649000 2.339000 + -4.454000 -1.349000 3.462000 -4.454000 -1.349000 3.462000 + -4.264000 2.582000 2.965000 -4.264000 2.582000 2.965000 + -6.571000 4.864000 4.489000 -6.571000 4.864000 4.489000 + -5.076000 7.897000 3.095000 -5.076000 7.897000 3.095000 + -1.592000 10.199000 0.274000 -1.592000 10.199000 0.274000 + 4.122000 8.378001 -3.848000 4.122000 8.378001 -3.848000 + 6.141000 6.235001 -5.169000 6.141000 6.235001 -5.169000 + 7.747000 2.346001 -6.022000 7.747000 2.346001 -6.022000 + 7.321000 -1.833999 -5.326000 7.321000 -1.833999 -5.326000 + 5.050000 -6.713999 -3.182000 5.050000 -6.713999 -3.182000 + 2.158000 -9.647000 -0.747000 2.158000 -9.647000 -0.747000 + -1.340000 -9.818000 1.892000 -1.340000 -9.818000 1.892000 + -4.015000 -7.547000 3.693000 -4.015000 -7.547000 3.693000 + -6.465000 -3.634000 5.177000 -6.465000 -3.634000 5.177000 + -7.366000 0.937000 5.440000 -7.366000 0.937000 5.440000 + -9.531000 8.626999 6.370000 -9.531000 8.626999 6.370000 + -7.782000 11.628000 4.787000 -7.782000 11.628000 4.787000 + -5.484000 12.712000 2.966000 -5.484000 12.712000 2.966000 + 0.889000 13.034000 -1.844000 0.889000 13.034000 -1.844000 + 2.955000 14.411000 -3.518000 2.955000 14.411000 -3.518000 + 7.385000 9.079001 -6.358000 7.385000 9.079001 -6.358000 + 9.593000 4.685001 -7.618000 9.593000 4.685001 -7.618000 + 12.081000 0.224001 -9.082000 12.081000 0.224001 -9.082000 + 10.713000 -2.563999 -7.804000 10.713000 -2.563999 -7.804000 + 9.193000 -6.800999 -6.281000 9.193000 -6.800999 -6.281000 + 5.401000 -11.688999 -2.996000 5.401000 -11.688999 -2.996000 + 3.589000 -13.188999 -1.501000 3.589000 -13.188999 -1.501000 + -0.677000 -13.141000 1.694000 -0.677000 -13.141000 1.694000 + -3.894000 -13.982000 4.183000 -3.894000 -13.982000 4.183000 + -9.151000 -7.688001 7.557000 -9.151000 -7.688001 7.557000 +-10.488000 -3.995001 8.227000 -10.488000 -3.995001 8.227000 +-11.593000 1.364999 8.572000 -11.593000 1.364999 8.572000 + 25.915000 -46.067998 -15.278000 25.915000 -46.067998 -15.278000 +-35.656000 -29.798003 29.434000 -35.656000 -29.798003 29.434000 +-14.045000 4.802999 10.101000 -14.045000 4.802999 10.101000 +-15.371000 7.471999 10.854000 -15.371000 7.471999 10.854000 + -7.278000 18.670000 3.773000 -7.278000 18.670000 3.773000 + 5.633000 18.079001 -5.857000 5.633000 18.079001 -5.857000 + 9.361000 16.209001 -8.485000 9.361000 16.209001 -8.485000 + 13.839000 5.179001 -10.847000 13.839000 5.179001 -10.847000 + 13.159000 -7.978999 -9.150000 13.159000 -7.978999 -9.150000 + 11.337000 -15.456999 -7.108000 11.337000 -15.456999 -7.108000 + 0.088000 -17.999000 1.559000 0.088000 -17.999000 1.559000 + -6.459000 -17.647000 6.438000 -6.459000 -17.647000 6.438000 +-12.085000 -10.246001 9.989000 -12.085000 -10.246001 9.989000 +-18.476000 -7.958001 14.576000 -18.476000 -7.958001 14.576000 +-19.801000 4.986999 14.401000 -19.801000 4.986999 14.401000 +-16.011000 16.658999 10.504000 -16.011000 16.658999 10.504000 +-12.576000 20.989999 7.538000 -12.576000 20.989999 7.538000 + -7.119010 25.583000 3.030000 -7.119010 25.583000 3.030000 + 6.829000 21.843001 -7.094000 6.829000 21.843001 -7.094000 + 12.535000 17.884001 -11.016000 12.535000 17.884001 -11.016000 + 19.854000 7.016002 -15.524000 19.854000 7.016002 -15.524000 + 19.597000 -7.116998 -14.056000 19.597000 -7.116998 -14.056000 + 17.252000 -15.759998 -11.516000 17.252000 -15.759998 -11.516000 + 9.690000 -22.191999 -5.264000 9.690000 -22.191999 -5.264000 + -2.531000 -26.560000 4.296000 -2.531000 -26.560000 4.296000 +-15.323000 -17.992001 13.117000 -15.323000 -17.992001 13.117000 +-25.501000 -11.904002 20.202000 -25.501000 -11.904002 20.202000 +-25.122000 2.905998 18.580000 -25.122000 2.905998 18.580000 +-21.884000 16.676998 14.908000 -21.884000 16.676998 14.908000 +-19.020010 23.618999 12.133000 -19.020010 23.618999 12.133000 + -5.459010 31.084000 1.288000 -5.459010 31.084000 1.288000 + 8.954000 31.557001 -9.565000 8.954000 31.557001 -9.565000 + 17.496000 24.887002 -15.370000 17.496000 24.887002 -15.370000 + 19.687000 15.816002 -16.194000 19.687000 15.816002 -16.194000 + 27.009000 3.920003 -20.611000 27.009000 3.920003 -20.611000 + 25.073000 -14.735998 -17.475000 25.073000 -14.735998 -17.475000 + 21.357000 -22.127998 -14.021000 21.357000 -22.127998 -14.021000 + 11.812000 -32.058999 -5.965000 11.812000 -32.058999 -5.965000 + 5.223000 -31.892999 -1.038000 5.223000 -31.892999 -1.038000 +-11.245000 -29.310001 11.080000 -11.245000 -29.310001 11.080000 +-14.457000 -23.728001 12.986000 -14.457000 -23.728001 12.986000 +-18.421000 -27.311001 16.282000 -18.421000 -27.311001 16.282000 +-33.123000 8.182997 24.104990 -33.123000 8.182997 24.104990 +-22.782010 29.564998 14.418000 -22.782010 29.564998 14.418000 + -9.876010 40.628999 3.739000 -9.876010 40.628999 3.739000 + 3.009990 39.778000 -5.849000 3.009990 39.778000 -5.849000 + 31.454000 10.221003 -24.515000 31.454000 10.221003 -24.515000 + 28.255000 -11.492997 -20.155000 28.255000 -11.492997 -20.155000 + 26.012000 -27.405998 -17.036000 26.012000 -27.405998 -17.036000 + -7.217000 -37.082000 8.761000 -7.217000 -37.082000 8.761000 +] + +NORMAL_VECTOR HBA +3 [ 0.598753 0.072099 0.797682 ] + +ROTATION_MATRIX HBA +3 x 3 [ + -0.1195950000 -0.7919540000 0.5987530000 + 0.9928230000 -0.0954190000 0.0720990000 + 0.0000330000 0.6030780000 0.7976820000 +] + +HBA +3 [ 3828732.711740000 454692.403824000 5063850.315 ] +48 x 2 x 3 [ +-15.478010 -2.278001 11.824000 -15.478010 -2.278001 11.824000 +-14.521010 2.646999 10.661000 -14.521010 2.646999 10.661000 +-13.565010 7.571999 9.498000 -13.565010 7.571999 9.498000 +-12.608010 12.496999 8.334000 -12.608010 12.496999 8.334000 +-11.466000 -3.737001 8.944000 -11.466000 -3.737001 8.944000 +-10.509010 1.186999 7.781000 -10.509010 1.186999 7.781000 + -9.553010 6.111999 6.618000 -9.553010 6.111999 6.618000 + -8.596010 11.037000 5.455000 -8.596010 11.037000 5.455000 + -9.367000 -15.048000 8.391000 -9.367000 -15.048000 8.391000 + -8.411000 -10.123000 7.228000 -8.411000 -10.123000 7.228000 + -7.453000 -5.198000 6.064000 -7.453000 -5.198000 6.064000 + -6.497000 -0.273000 4.901000 -6.497000 -0.273000 4.901000 + -5.540010 4.652000 3.738000 -5.540010 4.652000 3.738000 + -4.584010 9.576000 2.575000 -4.584010 9.576000 2.575000 + -3.626010 14.501000 1.411000 -3.626010 14.501000 1.411000 + -2.669010 19.426000 0.248000 -2.669010 19.426000 0.248000 + -5.355000 -16.507000 5.512000 -5.355000 -16.507000 5.512000 + -4.398000 -11.582000 4.348000 -4.398000 -11.582000 4.348000 + -3.441000 -6.657000 3.185000 -3.441000 -6.657000 3.185000 + -2.484000 -1.733000 2.021000 -2.484000 -1.733000 2.021000 + -1.528000 3.192000 0.858000 -1.528000 3.192000 0.858000 + -0.571010 8.117000 -0.305000 -0.571010 8.117000 -0.305000 + 0.385990 13.042000 -1.469000 0.385990 13.042000 -1.469000 + 1.342990 17.967000 -2.632000 1.342990 17.967000 -2.632000 + -1.343000 -17.967000 2.632000 -1.343000 -17.967000 2.632000 + -0.386000 -13.042000 1.469000 -0.386000 -13.042000 1.469000 + 0.571000 -8.117000 0.305000 0.571000 -8.117000 0.305000 + 1.528000 -3.192000 -0.858000 1.528000 -3.192000 -0.858000 + 2.484000 1.733001 -2.021000 2.484000 1.733001 -2.021000 + 3.440990 6.657001 -3.185000 3.440990 6.657001 -3.185000 + 4.397990 11.582001 -4.348000 4.397990 11.582001 -4.348000 + 5.354990 16.507001 -5.512000 5.354990 16.507001 -5.512000 + 2.669000 -19.425999 -0.248000 2.669000 -19.425999 -0.248000 + 3.626000 -14.500999 -1.411000 3.626000 -14.500999 -1.411000 + 4.584000 -9.575999 -2.575000 4.584000 -9.575999 -2.575000 + 5.540000 -4.651999 -3.738000 5.540000 -4.651999 -3.738000 + 6.497000 0.273001 -4.901000 6.497000 0.273001 -4.901000 + 7.453000 5.198001 -6.064000 7.453000 5.198001 -6.064000 + 8.410990 10.123001 -7.228000 8.410990 10.123001 -7.228000 + 9.366990 15.048001 -8.391000 9.366990 15.048001 -8.391000 + 8.596000 -11.036999 -5.455000 8.596000 -11.036999 -5.455000 + 9.553000 -6.111999 -6.618000 9.553000 -6.111999 -6.618000 + 10.509000 -1.186999 -7.781000 10.509000 -1.186999 -7.781000 + 11.466000 3.737001 -8.944000 11.466000 3.737001 -8.944000 + 12.608000 -12.496999 -8.334000 12.608000 -12.496999 -8.334000 + 13.565000 -7.571999 -9.498000 13.565000 -7.571999 -9.498000 + 14.521000 -2.646998 -10.661000 14.521000 -2.646998 -10.661000 + 15.478000 2.278002 -11.824000 15.478000 2.278002 -11.824000 +] diff --git a/MAC/Deployment/data/StaticMetaData/Attenuation/Attenuation.conf b/MAC/Deployment/data/StaticMetaData/Attenuation/Attenuation.conf new file mode 100644 index 00000000000..f9f3b63cbfd --- /dev/null +++ b/MAC/Deployment/data/StaticMetaData/Attenuation/Attenuation.conf @@ -0,0 +1,17 @@ +# +# Attenuation.conf +# +# This file contains the attenuations of the various coaxcables for each rcumode. +# The line of RCUmode 0 is used to define the cablelengths. +# +#Rcumode 50m 80m 85m 115m 130m +#--------------------------------------------------- +0 50 80 85 115 130 +1 -2.05 -3.32 -3.53 -4.74 -5.40 +2 -2.05 -3.32 -3.53 -4.74 -5.40 +3 -2.05 -3.32 -3.53 -4.74 -5.40 +4 -2.05 -3.32 -3.53 -4.74 -5.40 +5 -3.64 -5.87 -6.22 -8.35 -9.52 +6 -4.24 -6.82 -7.21 -9.70 -11.06 +7 -4.46 -7.19 -7.58 -10.18 -11.61 + diff --git a/MAC/Deployment/data/StaticMetaData/Attenuation/DE601-Attenuation.conf b/MAC/Deployment/data/StaticMetaData/Attenuation/DE601-Attenuation.conf new file mode 100644 index 00000000000..bfa4ff11f4d --- /dev/null +++ b/MAC/Deployment/data/StaticMetaData/Attenuation/DE601-Attenuation.conf @@ -0,0 +1,17 @@ +# +# Attenuation.conf +# +# This file contains the attenuations of the various coaxcables for each rcumode. +# The line of RCUmode 0 is used to define the cablelengths. +# Note: All HBA Attenuations are corrected for the Older RCU with 1dB Att. step +#Rcumode 50m 80m 85m 115m 130m +#--------------------------------------------------- +0 50 80 85 115 130 +1 -0.51 -0.83 -0.88 -1.18 -1.35 +2 -0.51 -0.83 -0.88 -1.18 -1.35 +3 -0.51 -0.83 -0.88 -1.18 -1.35 +4 -0.51 -0.83 -0.88 -1.18 -1.35 +5 -0.91 -1.47 -1.55 -2.09 -2.38 +6 -1.06 -1.71 -1.80 -2.43 -2.77 +7 -1.12 -1.78 -1.90 -2.55 -2.90 + diff --git a/MAC/Deployment/data/StaticMetaData/Attenuation/FI609-Attenuation.conf b/MAC/Deployment/data/StaticMetaData/Attenuation/FI609-Attenuation.conf new file mode 100644 index 00000000000..314afd729ae --- /dev/null +++ b/MAC/Deployment/data/StaticMetaData/Attenuation/FI609-Attenuation.conf @@ -0,0 +1,17 @@ +# +# Attenuation.conf +# +# This file contains the attenuations of the various coaxcables for each rcumode. +# The line of RCUmode 0 is used to define the cablelengths. +# +#Rcumode 120m 80m 85m 115m 130m +#--------------------------------------------------- +0 50 80 85 115 130 +1 -4.85 -3.32 -3.53 -4.74 -5.40 +2 -4.85 -3.32 -3.53 -4.74 -5.40 +3 -4.85 -3.32 -3.53 -4.74 -5.40 +4 -4.85 -3.32 -3.53 -4.74 -5.40 +5 -8.55 -5.87 -6.22 -8.35 -9.52 +6 -9.92 -6.82 -7.21 -9.70 -11.06 +7 -10.42 -7.19 -7.58 -10.18 -11.61 + diff --git a/MAC/Deployment/data/StaticMetaData/CableDelays/DE601-CableDelays.conf b/MAC/Deployment/data/StaticMetaData/CableDelays/DE601-CableDelays.conf index 710f529400d..6ec609c9659 100644 --- a/MAC/Deployment/data/StaticMetaData/CableDelays/DE601-CableDelays.conf +++ b/MAC/Deployment/data/StaticMetaData/CableDelays/DE601-CableDelays.conf @@ -1,7 +1,4 @@ # -# CableDelays.conf for DE601 -# -# # Effelsberg CableDelays.conf # # 2009 Oct 12 James M Anderson --- MPIfR Created based on default @@ -11,6 +8,50 @@ # account for the cable delay of the patch # cables within the electronics cabinet. # Also, are the LBH cables all 130 m? +# +# 2012 Sept 14 Menno Norden --- Astron correction applied to rev14249 +# 2012 October 16 Norden-Wucknitz Checked on Tiles +# +# Original file: DE601-CableDelays.conf-rev14249.svn000.tmp.conf +# Modifications: http://www.astro.uni-bonn.de/~wucknitz/wiki/doku.php/lbg:single:start?&#effelsberg_cable_lengths_hba +# HBA +##RCUnr len delay corrected +##---------------------------------------------------- +#6 130 530.6981 115 ok +#7 130 530.6981 115 ok +#8 130 530.6981 115 ok +#9 130 530.6981 115 ok +#10 115 465.4000 85 ok +#11 115 465.6000 85 ok +#22 130 530.6981 115 ok +#23 130 530.6981 115 ok +#40 130 530.6981 115 ok +#41 130 530.6981 115 ok +#74 115 465.5254 130 ok +#75 115 465.5254 130 ok +#76 115 465.5254 130 ok +#77 115 465.5254 130 ok +#92 115 465.5000 130 ok +#93 115 465.5000 130 ok +#94 115 465.5000 130 ok +#95 115 465.5000 130 ok +#164 85 342.5133 115 ok +#165 85 342.5133 115 ok +# +# Two antennas 58-59,86-87 have been wrong in rev14249 and are correct now +# +#58 130 530.6981 115 ok +#59 130 530.6981 115 ok +#86 115 ok +#87 115 ok +# +# Two antennas 92-95 have been wrong and are still wrong +# Note Menno: I assume 115m when 130m is wrong (please check!!) +# +#92 130 530.6981 130 ok +#93 130 530.6981 130 ok +#94 130 530.6981 130 ok +#95 130 530.6981 130 ok # # This file contains for each input of each RCU the delay the length of the cable # connected to itadds to the signal path. @@ -21,8 +62,8 @@ # 50m 199.2573 # 80m 326.9640 # 85m 342.5133 -# 115m 465.5254 -# 130m 530.6981 +# 115m 465.5254 +# 130m 530.6981 # # LBL LBH HBA #RCUnr len delay len delay len delay @@ -33,12 +74,12 @@ 3 130 530.6981 130 530.6981 115 465.5000 4 130 530.6981 130 530.6981 115 465.5000 5 130 530.6981 130 530.6981 115 465.5000 -6 130 530.6981 130 530.6981 130 530.6981 -7 130 530.6981 130 530.6981 130 530.6981 -8 130 530.6981 130 530.6981 130 530.6981 -9 130 530.6981 130 530.6981 130 530.6981 -10 130 530.6981 130 530.6981 115 465.4000 -11 130 530.6981 130 530.6981 115 465.6000 +6 130 530.6981 130 530.6981 115 465.5000 +7 130 530.6981 130 530.6981 115 465.5000 +8 130 530.6981 130 530.6981 115 465.5000 +9 130 530.6981 130 530.6981 115 465.4000 +10 130 530.6981 130 530.6981 85 342.4000 +11 130 530.6981 130 530.6981 85 342.6000 12 130 530.6981 130 530.6981 115 465.2000 13 130 530.6981 130 530.6981 115 465.5000 14 130 530.6981 130 530.6981 115 466.0000 @@ -49,8 +90,8 @@ 19 130 530.6981 130 530.6981 115 465.5000 20 130 530.6981 130 530.6981 115 465.5000 21 130 530.6981 130 530.6981 115 465.6000 -22 130 530.6981 130 530.6981 130 530.6981 -23 130 530.6981 130 530.6981 130 530.6981 +22 130 530.6981 130 530.6981 115 465.6000 +23 130 530.6981 130 530.6981 115 465.4000 24 130 530.6981 130 530.6981 85 342.5000 25 130 530.6981 130 530.6981 85 342.6000 26 130 530.6981 130 530.6981 85 342.5000 @@ -67,8 +108,8 @@ 37 130 530.6981 130 530.6981 115 465.5000 38 130 530.6981 130 530.6981 115 465.5000 39 130 530.6981 130 530.6981 115 465.5000 -40 130 530.6981 130 530.6981 130 530.6981 -41 130 530.6981 130 530.6981 130 530.6981 +40 130 530.6981 130 530.6981 115 465.5000 +41 130 530.6981 130 530.6981 115 465.5000 42 130 530.6981 130 530.6981 85 342.3000 43 130 530.6981 130 530.6981 85 342.5000 44 130 530.6981 130 530.6981 85 342.6000 @@ -85,8 +126,8 @@ 55 130 530.6981 130 530.6981 115 465.5000 56 130 530.6981 130 530.6981 115 465.5000 57 130 530.6981 130 530.6981 115 465.5000 -58 130 530.6981 130 530.6981 115 465.5254 -59 130 530.6981 130 530.6981 115 465.5254 +58 130 530.6981 130 530.6981 115 465.5000 +59 130 530.6981 130 530.6981 115 465.5000 60 130 530.6981 130 530.6981 85 342.3000 61 130 530.6981 130 530.6981 85 342.5000 62 130 530.6981 130 530.6981 85 342.6000 @@ -101,10 +142,10 @@ 71 130 530.6981 130 530.6981 115 465.5000 72 130 530.6981 130 530.6981 115 465.5000 73 130 530.6981 130 530.6981 115 465.4000 -74 130 530.6981 130 530.6981 115 465.5254 -75 130 530.6981 130 530.6981 115 465.5254 -76 130 530.6981 130 530.6981 115 465.5254 -77 130 530.6981 130 530.6981 115 465.5254 +74 130 530.6981 130 530.6981 130 519.8000 +75 130 530.6981 130 530.6981 130 519.7000 +76 130 530.6981 130 530.6981 130 519.6000 +77 130 530.6981 130 530.6981 130 519.8000 78 130 530.6981 130 530.6981 85 342.5000 79 130 530.6981 130 530.6981 85 342.5000 80 130 530.6981 130 530.6981 85 342.5000 @@ -113,16 +154,16 @@ 83 130 530.6981 130 530.6981 85 342.5000 84 130 530.6981 130 530.6981 85 342.5000 85 130 530.6981 130 530.6981 85 342.4000 -86 130 530.6981 130 530.6981 115 465.5254 -87 130 530.6981 130 530.6981 115 465.5254 +86 130 530.6981 130 530.6981 115 465.5000 +87 130 530.6981 130 530.6981 115 465.5000 88 130 530.6981 130 530.6981 115 465.5000 89 130 530.6981 130 530.6981 115 465.5000 90 130 530.6981 130 530.6981 115 465.5000 91 130 530.6981 130 530.6981 115 465.5000 -92 130 530.6981 130 530.6981 115 465.5000 -93 130 530.6981 130 530.6981 115 465.5000 -94 130 530.6981 130 530.6981 115 465.5000 -95 130 530.6981 130 530.6981 115 465.5000 +92 130 530.6981 130 530.6981 130 519.6000 +93 130 530.6981 130 530.6981 130 519.6000 +94 130 530.6981 130 530.6981 130 519.6000 +95 130 530.6981 130 530.6981 130 519.6000 96 130 530.6981 130 530.6981 85 342.5000 97 130 530.6981 130 530.6981 85 342.5000 98 130 530.6981 130 530.6981 85 342.5000 @@ -191,8 +232,8 @@ 161 130 530.6981 130 530.6981 85 342.5000 162 130 530.6981 130 530.6981 85 342.5000 163 130 530.6981 130 530.6981 85 342.5000 -164 130 530.6981 130 530.6981 85 342.5133 -165 130 530.6981 130 530.6981 85 342.5133 +164 130 530.6981 130 530.6981 115 465.5000 +165 130 530.6981 130 530.6981 115 465.4000 166 130 530.6981 130 530.6981 115 465.4000 167 130 530.6981 130 530.6981 115 465.5000 168 130 530.6981 130 530.6981 85 342.4000 diff --git a/MAC/Deployment/data/StaticMetaData/CableDelays/FI609-CableDelays.conf b/MAC/Deployment/data/StaticMetaData/CableDelays/FI609-CableDelays.conf index af96f02e144..d08c9c2d435 100644 --- a/MAC/Deployment/data/StaticMetaData/CableDelays/FI609-CableDelays.conf +++ b/MAC/Deployment/data/StaticMetaData/CableDelays/FI609-CableDelays.conf @@ -1,8 +1,9 @@ +# CableDelays.conf KAIRA (FI609) # -# CableDelays.conf KAIRA +# Derek McKay-Bukowski, SGO, 2012-09-27 # -# This file contains for each input of each RCU the delay the length of the cable -# connected to it adds to the signal path. +# This file contains for each input of each RCU the delay the length of +# the cable connected to it adds to the signal path. # # Lenghts are in meters, delays are in ns. # @@ -13,102 +14,126 @@ # 115m 465.5254 # 130m 530.6981 # +# 50m cables are formed from an 80m cable, joined with half of a second +# 80m cable. Joins for these cables are located in the LBA cable +# mausoleum. +# +# HBA cable delays are based on the nominal cable length values (from +# the cable barcodes). LBA values are based on a combination of bar +# codes and the measured group delays of the 40m extension components. +# +# +# +# ACHTUNG!!! +# +# There is currently no 50m column in Attenuation.conf. Additionally, +# the software can only cope +# with three LBA cable values. This will require some hacking... +# *ahem* modification by Menno to +# make this work. Thus, in the interim, we shall use 115m attenuations +# for the 50m cables +# (although the cable delay lengths themselves will still be the +# correct values for teh 50m +# length. +# +# +# # LBL LBH HBA -#RCUnr len delay len delay len delay +#RCUnr len delay len delay len delay #----------------------------------------------------------------------- -0 0 0.0 0 0.0 85 342.5133 -1 0 0.0 0 0.0 85 342.5133 -2 0 0.0 0 0.0 85 342.5133 -3 0 0.0 0 0.0 85 342.5133 -4 0 0.0 0 0.0 85 342.5133 -5 0 0.0 0 0.0 85 342.5133 -6 0 0.0 0 0.0 85 342.5133 -7 0 0.0 0 0.0 85 342.5133 -8 0 0.0 0 0.0 85 342.5133 -9 0 0.0 0 0.0 85 342.5133 -10 0 0.0 0 0.0 85 342.5133 -11 0 0.0 0 0.0 85 342.5133 -12 0 0.0 0 0.0 115 465.5254 -13 0 0.0 0 0.0 115 465.5254 -14 0 0.0 0 0.0 115 465.5254 -15 0 0.0 0 0.0 115 465.5254 -16 0 0.0 0 0.0 85 342.5133 -17 0 0.0 0 0.0 85 342.5133 -18 0 0.0 0 0.0 85 342.5133 -19 0 0.0 0 0.0 85 342.5133 -20 0 0.0 0 0.0 85 342.5133 -21 0 0.0 0 0.0 85 342.5133 -22 0 0.0 0 0.0 85 342.5133 -23 0 0.0 0 0.0 85 342.5133 -24 0 0.0 0 0.0 85 342.5133 -25 0 0.0 0 0.0 85 342.5133 -26 0 0.0 0 0.0 115 465.5254 -27 0 0.0 0 0.0 115 465.5254 -28 0 0.0 0 0.0 115 465.5254 -29 0 0.0 0 0.0 115 465.5254 -30 0 0.0 0 0.0 115 465.5254 -31 0 0.0 0 0.0 115 465.5254 -32 0 0.0 0 0.0 85 342.5133 -33 0 0.0 0 0.0 85 342.5133 -34 0 0.0 0 0.0 85 342.5133 -35 0 0.0 0 0.0 85 342.5133 -36 0 0.0 0 0.0 85 342.5133 -37 0 0.0 0 0.0 85 342.5133 -38 0 0.0 0 0.0 85 342.5133 -39 0 0.0 0 0.0 85 342.5133 -40 0 0.0 0 0.0 115 465.5254 -41 0 0.0 0 0.0 115 465.5254 -42 0 0.0 0 0.0 115 465.5254 -43 0 0.0 0 0.0 115 465.5254 -44 0 0.0 0 0.0 115 465.5254 -45 0 0.0 0 0.0 115 465.5254 -46 0 0.0 0 0.0 115 465.5254 -47 0 0.0 0 0.0 115 465.5254 -48 0 0.0 0 0.0 85 342.5133 -49 0 0.0 0 0.0 85 342.5133 -50 0 0.0 0 0.0 85 342.5133 -51 0 0.0 0 0.0 85 342.5133 -52 0 0.0 0 0.0 85 342.5133 -53 0 0.0 0 0.0 85 342.5133 -54 0 0.0 0 0.0 85 342.5133 -55 0 0.0 0 0.0 85 342.5133 -56 0 0.0 0 0.0 115 465.5254 -57 0 0.0 0 0.0 115 465.5254 -58 0 0.0 0 0.0 115 465.5254 -59 0 0.0 0 0.0 115 465.5254 -60 0 0.0 0 0.0 115 465.5254 -61 0 0.0 0 0.0 115 465.5254 -62 0 0.0 0 0.0 115 465.5254 -63 0 0.0 0 0.0 115 465.5254 -64 0 0.0 0 0.0 85 342.5133 -65 0 0.0 0 0.0 85 342.5133 -66 0 0.0 0 0.0 85 342.5133 -67 0 0.0 0 0.0 85 342.5133 -68 0 0.0 0 0.0 85 342.5133 -69 0 0.0 0 0.0 85 342.5133 -70 0 0.0 0 0.0 115 465.5254 -71 0 0.0 0 0.0 115 465.5254 -72 0 0.0 0 0.0 115 465.5254 -73 0 0.0 0 0.0 115 465.5254 -74 0 0.0 0 0.0 115 465.5254 -75 0 0.0 0 0.0 115 465.5254 -76 0 0.0 0 0.0 115 465.5254 -77 0 0.0 0 0.0 115 465.5254 -78 0 0.0 0 0.0 115 465.5254 -79 0 0.0 0 0.0 115 465.5254 -80 0 0.0 0 0.0 85 342.5133 -81 0 0.0 0 0.0 85 342.5133 -82 0 0.0 0 0.0 85 342.5133 -83 0 0.0 0 0.0 85 342.5133 -84 0 0.0 0 0.0 115 465.5254 -85 0 0.0 0 0.0 115 465.5254 -86 0 0.0 0 0.0 115 465.5254 -87 0 0.0 0 0.0 115 465.5254 -88 0 0.0 0 0.0 115 465.5254 -89 0 0.0 0 0.0 115 465.5254 -90 0 0.0 0 0.0 115 465.5254 -91 0 0.0 0 0.0 115 465.5254 -92 0 0.0 0 0.0 115 465.5254 -93 0 0.0 0 0.0 115 465.5254 -94 0 0.0 0 0.0 115 465.5254 -95 0 0.0 0 0.0 115 465.5254 \ No newline at end of file +0 115 465.60 115 465.60 85 342.40 +1 115 465.60 115 465.60 85 342.40 +2 115 465.60 115 465.60 85 342.70 +3 115 465.60 115 465.60 85 342.40 +4 115 465.60 115 465.60 85 342.60 +5 115 465.60 115 465.60 85 342.40 +6 115 465.60 115 465.60 85 342.50 +7 115 465.60 115 465.60 85 342.40 +8 115 465.40 115 465.40 85 342.60 +9 115 465.60 115 465.60 85 342.40 +10 50 483.60 50 483.60 85 342.50 +11 50 483.80 50 483.80 85 342.50 +12 50 477.70 50 477.70 115 465.60 +13 50 478.70 50 478.70 115 465.50 +14 115 465.60 115 465.60 115 465.60 +15 115 465.60 115 465.60 115 465.60 +16 115 465.60 115 465.60 85 342.60 +17 115 465.60 115 465.60 85 342.40 +18 50 478.70 50 478.70 85 342.60 +19 50 477.70 50 477.70 85 342.00 +20 50 482.70 50 482.70 85 342.60 +21 50 483.80 50 483.80 85 342.40 +22 50 478.70 50 478.70 85 342.30 +23 50 477.70 50 477.70 85 342.40 +24 50 478.80 50 478.80 85 342.50 +25 50 478.70 50 478.70 85 342.40 +26 115 465.60 115 465.60 115 465.50 +27 115 465.60 115 465.60 115 465.40 +28 115 465.50 115 465.50 115 465.60 +29 115 465.50 115 465.50 115 465.50 +30 115 465.60 115 465.60 115 465.50 +31 115 465.60 115 465.60 115 465.60 +32 115 465.60 115 465.60 85 342.40 +33 115 465.60 115 465.60 85 342.40 +34 115 465.60 115 465.60 85 342.60 +35 115 465.60 115 465.60 85 342.40 +36 115 465.60 115 465.60 85 342.40 +37 115 465.60 115 465.60 85 342.40 +38 50 477.80 50 477.80 85 342.40 +39 50 477.80 50 477.80 85 342.40 +40 50 478.50 50 478.50 115 465.60 +41 50 478.70 50 478.70 115 465.60 +42 50 482.80 50 482.80 115 465.50 +43 50 482.80 50 482.80 115 465.70 +44 50 483.70 50 483.70 115 465.50 +45 50 482.80 50 482.80 115 465.40 +46 50 477.70 50 477.70 115 465.60 +47 50 478.70 50 478.70 115 465.40 +48 50 483.10 50 483.10 85 342.20 +49 50 482.70 50 482.70 85 342.30 +50 50 478.80 50 478.80 85 342.70 +51 50 478.80 50 478.80 85 342.40 +52 50 478.80 50 478.80 85 342.40 +53 50 477.80 50 477.80 85 342.40 +54 115 465.60 115 465.60 85 342.40 +55 115 465.60 115 465.60 85 342.50 +56 115 465.60 115 465.60 115 465.60 +57 115 465.60 115 465.60 115 465.50 +58 80 320.60 80 320.60 115 465.60 +59 80 319.70 80 319.70 115 465.50 +60 115 465.60 115 465.60 115 465.60 +61 115 465.60 115 465.60 115 465.50 +62 115 465.60 115 465.60 115 465.50 +63 115 465.60 115 465.60 115 465.50 +64 50 478.70 50 478.70 85 342.60 +65 50 477.80 50 477.80 85 342.40 +66 50 478.80 50 478.80 85 342.40 +67 50 478.70 50 478.70 85 342.10 +68 50 478.70 50 478.70 85 342.60 +69 50 478.70 50 478.70 85 342.50 +70 50 482.80 50 482.80 115 465.60 +71 50 483.80 50 483.80 115 465.60 +72 130 518.70 130 518.70 115 465.60 +73 130 519.00 130 519.00 115 465.40 +74 50 482.70 50 482.70 115 465.50 +75 50 482.70 50 482.70 115 465.50 +76 130 519.30 130 519.30 115 465.50 +77 130 519.10 130 519.10 115 465.50 +78 50 482.70 50 482.70 115 465.50 +79 50 483.60 50 483.60 115 465.40 +80 50 482.70 50 482.70 85 342.60 +81 50 483.80 50 483.80 85 342.30 +82 50 478.80 50 478.80 85 342.60 +83 50 478.80 50 478.80 85 342.50 +84 50 478.70 50 478.70 115 465.60 +85 50 478.70 50 478.70 115 465.40 +86 115 465.60 115 465.60 115 465.60 +87 115 465.60 115 465.60 115 465.50 +88 115 465.60 115 465.60 115 465.60 +89 115 465.40 115 465.40 115 465.50 +90 80 326.80 80 326.80 115 465.50 +91 80 326.90 80 326.90 115 465.40 +92 50 477.80 50 477.80 115 465.60 +93 50 477.80 50 477.80 115 465.60 +94 115 465.60 115 465.60 115 465.40 +95 115 465.60 115 465.60 115 465.60 diff --git a/MAC/Deployment/data/StaticMetaData/CableDelays/RS210-CableDelays.conf b/MAC/Deployment/data/StaticMetaData/CableDelays/RS210-CableDelays.conf new file mode 100644 index 00000000000..e62d82268aa --- /dev/null +++ b/MAC/Deployment/data/StaticMetaData/CableDelays/RS210-CableDelays.conf @@ -0,0 +1,114 @@ +# +# CableDelays.conf RS210 +# +# This file contains for each input of each RCU the delay the length of the cable +# connected to it adds to the signal path. +# +# Lenghts are in meters, delays are in ns. +# +# Note: The first order values are: +# 50m 199.2573 +# 80m 326.9640 +# 85m 342.5133 +# 115m 465.5254 +# 130m 530.6981 +# +# LBL LBH HBA +#RCUnr len delay len delay len delay +#----------------------------------------------------------------------- +0 80 326.9640 80 326.9640 115 465.5254 +1 80 326.9640 80 326.9640 115 465.5254 +2 80 326.9640 80 326.9640 115 465.5254 +3 80 326.9640 80 326.9640 115 465.5254 +4 80 326.9640 80 326.9640 115 465.5254 +5 80 326.9640 80 326.9640 115 465.5254 +6 115 465.5254 80 326.9640 115 465.5254 +7 115 465.5254 80 326.9640 115 465.5254 +8 115 465.5254 80 326.9640 115 465.5254 +9 115 465.5254 80 326.9640 115 465.5254 +10 115 465.5254 80 326.9640 115 465.5254 +11 115 465.5254 80 326.9640 115 465.5254 +12 80 326.9640 80 326.9640 115 465.5254 +13 80 326.9640 80 326.9640 115 465.5254 +14 80 326.9640 80 326.9640 115 465.5254 +15 80 326.9640 80 326.9640 115 465.5254 +16 80 326.9640 80 326.9640 85 342.5133 +17 80 326.9640 80 326.9640 85 342.5133 +18 80 326.9640 115 465.5254 85 342.5133 +19 80 326.9640 115 465.5254 85 342.5133 +20 80 326.9640 80 326.9640 115 465.5254 +21 80 326.9640 80 326.9640 115 465.5254 +22 80 326.9640 80 326.9640 115 465.5254 +23 80 326.9640 80 326.9640 115 465.5254 +24 80 326.9640 80 326.9640 115 465.5254 +25 80 326.9640 80 326.9640 115 465.5254 +26 80 326.9640 80 326.9640 115 465.5254 +27 80 326.9640 80 326.9640 115 465.5254 +28 80 326.9640 80 326.9640 115 465.5254 +29 80 326.9640 80 326.9640 115 465.5254 +30 80 326.9640 80 326.9640 115 465.5254 +31 80 326.9640 80 326.9640 115 465.5254 +32 115 465.5254 80 326.9640 85 342.5133 +33 115 465.5254 80 326.9640 85 342.5133 +34 115 465.5254 80 326.9640 85 342.5133 +35 115 465.5254 80 326.9640 85 342.5133 +36 115 465.5254 80 326.9640 85 342.5133 +37 115 465.5254 80 326.9640 85 342.5133 +38 115 465.5254 80 326.9640 85 342.5133 +39 115 465.5254 80 326.9640 85 342.5133 +40 80 326.9640 115 465.5254 115 465.5254 +41 80 326.9640 115 465.5254 115 465.5254 +42 80 326.9640 115 465.5254 115 465.5254 +43 80 326.9640 115 465.5254 115 465.5254 +44 80 326.9640 80 326.9640 115 465.5254 +45 80 326.9640 80 326.9640 115 465.5254 +46 80 326.9640 80 326.9640 115 465.5254 +47 80 326.9640 80 326.9640 115 465.5254 +48 80 326.9640 80 326.9640 85 342.5133 +49 80 326.9640 80 326.9640 85 342.5133 +50 80 326.9640 80 326.9640 85 342.5133 +51 80 326.9640 80 326.9640 85 342.5133 +52 80 326.9640 80 326.9640 85 342.5133 +53 80 326.9640 80 326.9640 85 342.5133 +54 80 326.9640 80 326.9640 85 342.5133 +55 80 326.9640 80 326.9640 85 342.5133 +56 115 465.5254 80 326.9640 85 342.5133 +57 115 465.5254 80 326.9640 85 342.5133 +58 115 465.5254 80 326.9640 115 465.5254 +59 115 465.5254 80 326.9640 115 465.5254 +60 115 465.5254 80 326.9640 115 465.5254 +61 115 465.5254 80 326.9640 115 465.5254 +62 115 465.5254 80 326.9640 115 465.5254 +63 115 465.5254 80 326.9640 115 465.5254 +64 115 465.5254 80 326.9640 85 342.5133 +65 115 465.5254 80 326.9640 85 342.5133 +66 115 465.5254 80 326.9640 85 342.5133 +67 115 465.5254 80 326.9640 85 342.5133 +68 115 465.5254 115 465.5254 85 342.5133 +69 115 465.5254 115 465.5254 85 342.5133 +70 80 326.9640 115 465.5254 85 342.5133 +71 80 326.9640 115 465.5254 85 342.5133 +72 80 326.9640 80 326.9640 85 342.5133 +73 80 326.9640 80 326.9640 85 342.5133 +74 80 326.9640 80 326.9640 85 342.5133 +75 80 326.9640 80 326.9640 85 342.5133 +76 80 326.9640 80 326.9640 85 342.5133 +77 80 326.9640 80 326.9640 85 342.5133 +78 80 326.9640 80 326.9640 115 465.5254 +79 80 326.9640 80 326.9640 115 465.5254 +80 80 326.9640 80 326.9640 85 342.5133 +81 80 326.9640 80 326.9640 85 342.5133 +82 80 326.9640 80 326.9640 85 342.5133 +83 80 326.9640 80 326.9640 85 342.5133 +84 115 465.5254 80 326.9640 85 342.5133 +85 115 465.5254 80 326.9640 85 342.5133 +86 115 465.5254 80 326.9640 85 342.5133 +87 115 465.5254 80 326.9640 85 342.5133 +88 115 465.5254 80 326.9640 85 342.5133 +89 115 465.5254 80 326.9640 85 342.5133 +90 115 465.5254 80 326.9640 85 342.5133 +91 115 465.5254 80 326.9640 85 342.5133 +92 115 465.5254 80 326.9640 85 342.5133 +93 115 465.5254 80 326.9640 85 342.5133 +94 80 326.9640 115 465.5254 85 342.5133 +95 80 326.9640 115 465.5254 85 342.5133 diff --git a/MAC/Deployment/data/StaticMetaData/CableDelays/RS305-CableDelays.conf b/MAC/Deployment/data/StaticMetaData/CableDelays/RS305-CableDelays.conf new file mode 100644 index 00000000000..a8caac10f43 --- /dev/null +++ b/MAC/Deployment/data/StaticMetaData/CableDelays/RS305-CableDelays.conf @@ -0,0 +1,114 @@ +# +# CableDelays.conf RS305 +# +# This file contains for each input of each RCU the delay the length of the cable +# connected to it adds to the signal path. +# +# Lenghts are in meters, delays are in ns. +# +# Note: The first order values are: +# 50m 199.2573 +# 80m 326.9640 +# 85m 342.5133 +# 115m 465.5254 +# 130m 530.6981 +# +# LBL LBH HBA +#RCUnr len delay len delay len delay +#----------------------------------------------------------------------- +0 80 326.9640 80 326.9640 85 342.5133 +1 80 326.9640 80 326.9640 85 342.5133 +2 80 326.9640 80 326.9640 85 342.5133 +3 80 326.9640 80 326.9640 85 342.5133 +4 115 465.5254 80 326.9640 85 342.5133 +5 115 465.5254 80 326.9640 85 342.5133 +6 115 465.5254 80 326.9640 85 342.5133 +7 115 465.5254 80 326.9640 85 342.5133 +8 115 465.5254 80 326.9640 85 342.5133 +9 115 465.5254 80 326.9640 85 342.5133 +10 80 326.9640 80 326.9640 85 342.5133 +11 80 326.9640 80 326.9640 85 342.5133 +12 80 326.9640 80 326.9640 85 342.5133 +13 80 326.9640 80 326.9640 85 342.5133 +14 80 326.9640 115 465.5254 85 342.5133 +15 80 326.9640 115 465.5254 85 342.5133 +16 50 199.2573 80 326.9640 115 465.5254 +17 50 199.2573 80 326.9640 115 465.5254 +18 80 326.9640 80 326.9640 115 465.5254 +19 80 326.9640 80 326.9640 115 465.5254 +20 80 326.9640 80 326.9640 85 342.5133 +21 80 326.9640 80 326.9640 85 342.5133 +22 80 326.9640 80 326.9640 85 342.5133 +23 80 326.9640 80 326.9640 85 342.5133 +24 80 326.9640 80 326.9640 85 342.5133 +25 80 326.9640 80 326.9640 85 342.5133 +26 115 465.5254 80 326.9640 85 342.5133 +27 115 465.5254 80 326.9640 85 342.5133 +28 115 465.5254 80 326.9640 85 342.5133 +29 115 465.5254 80 326.9640 85 342.5133 +30 115 465.5254 80 326.9640 85 342.5133 +31 115 465.5254 80 326.9640 85 342.5133 +32 115 465.5254 80 326.9640 115 465.5254 +33 115 465.5254 80 326.9640 115 465.5254 +34 115 465.5254 80 326.9640 115 465.5254 +35 115 465.5254 80 326.9640 115 465.5254 +36 80 326.9640 80 326.9640 115 465.5254 +37 80 326.9640 80 326.9640 115 465.5254 +38 80 326.9640 115 465.5254 85 342.5133 +39 80 326.9640 115 465.5254 85 342.5133 +40 80 326.9640 80 326.9640 85 342.5133 +41 80 326.9640 80 326.9640 85 342.5133 +42 50 199.2573 80 326.9640 85 342.5133 +43 50 199.2573 80 326.9640 85 342.5133 +44 50 199.2573 80 326.9640 85 342.5133 +45 50 199.2573 80 326.9640 85 342.5133 +46 80 326.9640 80 326.9640 85 342.5133 +47 80 326.9640 80 326.9640 85 342.5133 +48 80 326.9640 80 326.9640 115 465.5254 +49 80 326.9640 80 326.9640 115 465.5254 +50 80 326.9640 80 326.9640 115 465.5254 +51 80 326.9640 80 326.9640 115 465.5254 +52 115 465.5254 80 326.9640 115 465.5254 +53 115 465.5254 80 326.9640 115 465.5254 +54 115 465.5254 80 326.9640 115 465.5254 +55 115 465.5254 80 326.9640 115 465.5254 +56 115 465.5254 80 326.9640 85 342.5133 +57 115 465.5254 80 326.9640 85 342.5133 +58 115 465.5254 80 326.9640 85 342.5133 +59 115 465.5254 80 326.9640 85 342.5133 +60 115 465.5254 80 326.9640 85 342.5133 +61 115 465.5254 80 326.9640 85 342.5133 +62 115 465.5254 80 326.9640 85 342.5133 +63 115 465.5254 80 326.9640 85 342.5133 +64 115 465.5254 115 465.5254 115 465.5254 +65 115 465.5254 115 465.5254 115 465.5254 +66 80 326.9640 115 465.5254 115 465.5254 +67 80 326.9640 115 465.5254 115 465.5254 +68 80 326.9640 115 465.5254 115 465.5254 +69 80 326.9640 115 465.5254 115 465.5254 +70 50 199.2573 80 326.9640 115 465.5254 +71 50 199.2573 80 326.9640 115 465.5254 +72 50 199.2573 80 326.9640 115 465.5254 +73 50 199.2573 80 326.9640 115 465.5254 +74 50 199.2573 80 326.9640 85 342.5133 +75 50 199.2573 80 326.9640 85 342.5133 +76 50 199.2573 80 326.9640 85 342.5133 +77 50 199.2573 80 326.9640 85 342.5133 +78 80 326.9640 80 326.9640 85 342.5133 +79 80 326.9640 80 326.9640 85 342.5133 +80 115 465.5254 50 199.2573 115 465.5254 +81 115 465.5254 50 199.2573 115 465.5254 +82 115 465.5254 50 199.2573 115 465.5254 +83 115 465.5254 50 199.2573 115 465.5254 +84 115 465.5254 50 199.2573 115 465.5254 +85 115 465.5254 50 199.2573 115 465.5254 +86 115 465.5254 80 326.9640 115 465.5254 +87 115 465.5254 80 326.9640 115 465.5254 +88 115 465.5254 80 326.9640 115 465.5254 +89 115 465.5254 80 326.9640 115 465.5254 +90 80 326.9640 80 326.9640 115 465.5254 +91 80 326.9640 80 326.9640 115 465.5254 +92 80 326.9640 80 326.9640 115 465.5254 +93 80 326.9640 80 326.9640 115 465.5254 +94 50 199.2573 80 326.9640 115 465.5254 +95 50 199.2573 80 326.9640 115 465.5254 diff --git a/MAC/Deployment/data/StaticMetaData/ControlInfo.dat b/MAC/Deployment/data/StaticMetaData/ControlInfo.dat index 0f8caeffff5..207dd24f166 100644 --- a/MAC/Deployment/data/StaticMetaData/ControlInfo.dat +++ b/MAC/Deployment/data/StaticMetaData/ControlInfo.dat @@ -3,7 +3,7 @@ # # $Id: $ # -# name IPaddress MACaddress +# Name IPaddress MACaddress #------------------------------------------ MCU001 10.144.0.2 00:30:48:2d:00:f6 SAS001 10.144.0.3 00:30:48:79:1c:f4 diff --git a/MAC/Deployment/data/StaticMetaData/RSPConnections_CCU.dat b/MAC/Deployment/data/StaticMetaData/RSPConnections_CCU.dat index 95e948bad9c..ea13c6236ef 100755 --- a/MAC/Deployment/data/StaticMetaData/RSPConnections_CCU.dat +++ b/MAC/Deployment/data/StaticMetaData/RSPConnections_CCU.dat @@ -54,10 +54,10 @@ CS011 RSP_0 R00-M1-N09-J00 10.170.0.165 00:14:5E:7D:95:52 CS011 RSP_0 R01-M1-N09-J00 10.170.1.165 00:14:5E:7D:34:09 CS011 RSP_1 R00-M0-N09-J00 10.170.0.37 00:14:5E:7D:08:51 CS011 RSP_1 R01-M0-N09-J00 10.170.1.37 00:14:5E:7D:93:1E -CS013 RSP_0 R00-M0-N04-J00 10.170.0.17 00:14:5E:7D:18:17 -CS013 RSP_0 R01-M0-N04-J00 10.170.1.17 00:14:5E:7D:96:38 -CS013 RSP_1 R00-M0-N04-J01 10.170.0.18 00:14:5E:7D:18:18 -CS013 RSP_1 R01-M0-N04-J01 10.170.1.18 00:14:5E:7D:96:39 +CS013 RSP_0 R00-M0-N10-J01 10.170.0.42 00:14:5E:7D:1C:0A +CS013 RSP_0 R01-M0-N10-J01 10.170.1.42 00:14:5E:7D:92:AF +CS013 RSP_1 R00-M0-N14-J01 10.170.0.58 00:14:5E:7D:94:7B +CS013 RSP_1 R01-M0-N14-J01 10.170.1.58 00:14:5E:7D:1C:CC CS017 RSP_0 R00-M1-N08-J00 10.170.0.161 00:14:5E:7D:94:46 CS017 RSP_0 R01-M1-N08-J00 10.170.1.161 00:14:5E:7D:8D:02 CS017 RSP_1 R00-M0-N08-J00 10.170.0.33 00:14:5E:7D:95:58 diff --git a/MAC/Deployment/data/StaticMetaData/RSPConnections_local.dat b/MAC/Deployment/data/StaticMetaData/RSPConnections_local.dat index 9995472bb42..811e3d33228 100644 --- a/MAC/Deployment/data/StaticMetaData/RSPConnections_local.dat +++ b/MAC/Deployment/data/StaticMetaData/RSPConnections_local.dat @@ -9,10 +9,10 @@ # Station_lane DestIP DestMAC alias #------------------------------------------------- -DE601_00 10.211.1.3 00:26:6C:FB:79:69 lofar1a -DE601_01 10.212.1.3 00:26:6C:FC:CC:31 lofar2a -DE601_02 10.213.1.3 00:A0:D1:EC:75:69 lofar3a -DE601_03 10.214.1.3 00:A0:D1:EC:76:85 lofar4a +DE601_00 10.211.1.2 00:30:48:34:74:5F lofar1 +DE601_01 10.212.1.2 00:30:48:34:74:73 lofar2 +DE601_02 10.213.1.2 00:30:48:34:74:69 lofar3 +DE601_03 10.214.1.2 00:30:48:BB:90:2F lofar4 DE602_00 10.170.0.182 00:12:F2:C6:C1:00 R00-BG1-DE602 DE602_01 10.170.0.182 00:12:F2:C6:C1:00 R00-BG1-DE602 diff --git a/MAC/Deployment/data/StaticMetaData/RSPDriver.conf.tmpl b/MAC/Deployment/data/StaticMetaData/RSPDriver.conf.tmpl index 6107bf58cb7..01205d2e03e 100644 --- a/MAC/Deployment/data/StaticMetaData/RSPDriver.conf.tmpl +++ b/MAC/Deployment/data/StaticMetaData/RSPDriver.conf.tmpl @@ -195,7 +195,7 @@ RSPDriver.IGNORE_REMOTE_DATA=0 # RSPDriver.CDO_ENABLE=1 RSPDriver.CDO_N_BLOCKS=16 -RSPDriver.CDO_N_BEAMLETS=61 +#RSPDriver.CDO_N_BEAMLETS=61 RSPDriver.FB_ENABLE=1 # @@ -270,6 +270,7 @@ RSPDriver.WRITE_SI=1 RSPDriver.READ_SI=1 RSPDriver.SPLITTER=1 RSPDriver.READ_LATENCY=1 +RSPDriver.READ_BITMODE=1 # # TDS_CONTROL diff --git a/MAC/Deployment/data/StaticMetaData/StationInfo.dat b/MAC/Deployment/data/StaticMetaData/StationInfo.dat index 665da06653f..545c16af6cb 100644 --- a/MAC/Deployment/data/StaticMetaData/StationInfo.dat +++ b/MAC/Deployment/data/StaticMetaData/StationInfo.dat @@ -178,7 +178,7 @@ SE607 207 E 11.9302386 57.3990617 50.34 24 12 96 96 N # Chillbolton UK608 208 E -1.4342539 51.1439472 137.66 24 12 96 96 No No # Finland -FI609 209 E 20.7609103 69.0714225 533.25 12 6 0 48 No No +FI609 209 E 20.7609103 69.0714225 533.25 12 6 48 48 No No ## 210 - 255 ## diff --git a/MAC/Deployment/data/StaticMetaData/TBBConnections.dat b/MAC/Deployment/data/StaticMetaData/TBBConnections.dat index 0447550cb9d..7eb12b46e5c 100644 --- a/MAC/Deployment/data/StaticMetaData/TBBConnections.dat +++ b/MAC/Deployment/data/StaticMetaData/TBBConnections.dat @@ -55,6 +55,7 @@ RS207 TBB_0 locus050 RS208 TBB_0 locus051 RS210 TBB_0 locus052 # +RS305 TBB_0 locus082 RS306 TBB_0 locus053 RS307 TBB_0 locus054 RS308 TBB_0 locus055 diff --git a/MAC/Deployment/data/StaticMetaData/iHBADeltas/DE601-iHBADeltas.conf b/MAC/Deployment/data/StaticMetaData/iHBADeltas/DE601-iHBADeltas.conf index c3202424281..2c4cf5bbce0 100644 --- a/MAC/Deployment/data/StaticMetaData/iHBADeltas/DE601-iHBADeltas.conf +++ b/MAC/Deployment/data/StaticMetaData/iHBADeltas/DE601-iHBADeltas.conf @@ -1,23 +1,24 @@ # # HBADeltas for DE601 -# Created: 2012-01-24 14:49:41 +# Created: 2012-09-03 15:56:36 +# based on IGS08 measurement data taken on 2012-05-30 # HBADeltas 16 x 3 [ - 1.263 -2.184 -0.817 - 0.301 -1.953 -0.053 - -0.661 -1.722 0.711 - -1.623 -1.490 1.475 - 1.383 -0.959 -1.036 - 0.421 -0.728 -0.272 - -0.541 -0.497 0.492 - -1.503 -0.266 1.255 - 1.503 0.266 -1.255 - 0.541 0.497 -0.492 - -0.421 0.728 0.272 - -1.383 0.959 1.036 - 1.623 1.490 -1.475 - 0.661 1.722 -0.711 - -0.301 1.953 0.053 - -1.263 2.184 0.817 + 1.26258 -2.18428 -0.81613 + 0.30089 -1.95269 -0.05191 + -0.66079 -1.72111 0.71232 + -1.62247 -1.48952 1.47654 + 1.38254 -0.95968 -1.03627 + 0.42086 -0.72809 -0.27204 + -0.54082 -0.49651 0.49218 + -1.50250 -0.26492 1.25640 + 1.50250 0.26492 -1.25640 + 0.54082 0.49651 -0.49218 + -0.42086 0.72809 0.27204 + -1.38254 0.95968 1.03627 + 1.62247 1.48952 -1.47654 + 0.66079 1.72111 -0.71232 + -0.30089 1.95269 0.05191 + -1.26258 2.18428 0.81613 ] diff --git a/MAC/Deployment/data/StaticMetaData/iHBADeltas/FI609-iHBADeltas.conf b/MAC/Deployment/data/StaticMetaData/iHBADeltas/FI609-iHBADeltas.conf new file mode 100644 index 00000000000..b51f7a53be1 --- /dev/null +++ b/MAC/Deployment/data/StaticMetaData/iHBADeltas/FI609-iHBADeltas.conf @@ -0,0 +1,23 @@ +# +# HBADeltas for FI609 +# Created: 2012-08-08 06:35:00, manually rotated by 90 degrees by IV +# +HBADeltas +16 x 3 [ + 0.980 -2.464 -0.017 + -0.113 -1.949 0.305 + -1.206 -1.436 0.626 + -2.299 -0.921 0.948 + 1.420 -1.336 -0.327 + 0.327 -0.821 -0.005 + -0.766 -0.307 0.316 + -1.860 0.207 0.637 + 1.860 -0.207 -0.637 + 0.766 0.307 -0.316 + -0.327 0.821 0.005 + -1.420 1.336 0.327 + 2.299 0.921 -0.948 + 1.206 1.436 -0.626 + 0.113 1.949 -0.305 + -0.980 2.464 0.017 +] diff --git a/MAC/Deployment/data/StaticMetaData/iHBADeltas/RS305-iHBADeltas.conf b/MAC/Deployment/data/StaticMetaData/iHBADeltas/RS305-iHBADeltas.conf new file mode 100644 index 00000000000..e1dd8dfd99b --- /dev/null +++ b/MAC/Deployment/data/StaticMetaData/iHBADeltas/RS305-iHBADeltas.conf @@ -0,0 +1,23 @@ +# +# HBADeltas for RS305 +# Created: 2012-10-10 14:47:46 +# +HBADeltas +16 x 3 [ + -1.809 -1.262 1.472 + -1.577 -0.066 1.190 + -1.345 1.129 0.907 + -1.112 2.324 0.625 + -0.835 -1.616 0.773 + -0.603 -0.421 0.491 + -0.371 0.775 0.208 + -0.139 1.970 -0.074 + 0.139 -1.970 0.074 + 0.371 -0.775 -0.208 + 0.603 0.421 -0.491 + 0.835 1.616 -0.773 + 1.112 -2.324 -0.625 + 1.345 -1.129 -0.907 + 1.577 0.066 -1.190 + 1.809 1.262 -1.472 +] diff --git a/MAC/GCF/PVSS/src/PVSSinfo.cc b/MAC/GCF/PVSS/src/PVSSinfo.cc index 52ec199299c..4e6c890b868 100644 --- a/MAC/GCF/PVSS/src/PVSSinfo.cc +++ b/MAC/GCF/PVSS/src/PVSSinfo.cc @@ -105,11 +105,11 @@ bool PVSSinfo::propExists(const string& dpeName) if (Manager::getId(dpePvssName, dpId) == PVSS_FALSE) { LOG_TRACE_VAR_STR("propExists(" << dpeName << "): FALSE"); - return false; + return (false); } LOG_TRACE_VAR_STR("propExists(" << dpeName << "): OK"); - return true; + return (true); } // @@ -121,11 +121,11 @@ bool PVSSinfo::typeExists (const string& dpTypeName) DpTypeId dpTypeId; if (Manager::getTypeId(pvssTypeName, dpTypeId) != PVSS_TRUE) { LOG_TRACE_VAR_STR("typeExists(" << dpTypeName << "): FALSE"); - return (true); + return (false); } LOG_TRACE_VAR_STR("typeExists(" << dpTypeName << "): OK"); - return (false); + return (true); } // diff --git a/MAC/MACIO/include/MACIO/CMakeLists.txt b/MAC/MACIO/include/MACIO/CMakeLists.txt index 03b459cc0d2..ec01b8fb9f1 100644 --- a/MAC/MACIO/include/MACIO/CMakeLists.txt +++ b/MAC/MACIO/include/MACIO/CMakeLists.txt @@ -6,7 +6,7 @@ set(inst_HEADERS GCF_Event.h KVTLogger.h MACServiceInfo.h - Marshalling.h + Marshalling.tcc ProtocolDefs.h StringVector.h DoubleVector.h diff --git a/MAC/MACIO/include/MACIO/DoubleVector.h b/MAC/MACIO/include/MACIO/DoubleVector.h index b103bcbbc1d..15021737497 100644 --- a/MAC/MACIO/include/MACIO/DoubleVector.h +++ b/MAC/MACIO/include/MACIO/DoubleVector.h @@ -30,7 +30,6 @@ //# Includes #include <Common/lofar_vector.h> #include <Common/StreamUtil.h> -#include <MACIO/Marshalling.h> // Avoid 'using namespace' in headerfiles @@ -48,9 +47,9 @@ public: DoubleVector() {}; ~DoubleVector() {}; - unsigned int getSize(); - unsigned int pack (void *buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char *buffer) const; + size_t unpack(char *buffer); ostream& print (ostream& os) const; vector<double>& operator()() @@ -64,26 +63,24 @@ private: // @} // getSize() -inline unsigned int DoubleVector::getSize() +inline size_t DoubleVector::getSize() const { - unsigned int offset = 0; - MSH_SIZE_VECTOR_DOUBLE(offset, theVector); - return (offset); + return (MSH_size(theVector)); } // pack() -inline unsigned int DoubleVector::pack(void *buffer) +inline size_t DoubleVector::pack(char *buffer) const { - unsigned int offset = 0; - MSH_PACK_VECTOR_DOUBLE(buffer, offset, theVector); + size_t offset = 0; + MSH_pack(buffer, offset, theVector); return (offset); } // unpack() -inline unsigned int DoubleVector::unpack(void *buffer) +inline size_t DoubleVector::unpack(char *buffer) { - unsigned int offset = 0; - MSH_UNPACK_VECTOR_DOUBLE(buffer, offset, theVector); + size_t offset = 0; + MSH_unpack(buffer, offset, theVector); return (offset); } diff --git a/MAC/MACIO/include/MACIO/Marshalling.h b/MAC/MACIO/include/MACIO/Marshalling.h deleted file mode 100644 index 73f17328611..00000000000 --- a/MAC/MACIO/include/MACIO/Marshalling.h +++ /dev/null @@ -1,244 +0,0 @@ -//# -*- mode: c++ -*- -//# -//# Marshalling.h: Macros for packing/unpacking some classes -//# -//# Copyright (C) 2002-2004 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# This program is free software; you can redistribute it and/or modify -//# it under the terms of the GNU General Public License as published by -//# the Free Software Foundation; either version 2 of the License, or -//# (at your option) any later version. -//# -//# This program is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License -//# along with this program; if not, write to the Free Software -//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//# -//# $Id$ - -#ifndef MACIO_MARSHALLING_H_ -#define MACIO_MARSHALLING_H_ - -#include <Common/LofarTypes.h> -#include <Common/lofar_string.h> -#include <Common/lofar_bitset.h> -#include <Common/lofar_map.h> - -// SIZE string -#define MSH_STRING_SIZE(stdstring) \ - (sizeof(uint32) + (stdstring).size() * sizeof(char)) - -// PACK string -#define MSH_PACK_STRING(bufptr, offset, stdstring) \ -do { \ - /* pack stdstring with length */ \ - uint32 size = (stdstring).size() * sizeof(char); \ - memcpy(((char*)(bufptr)) + (offset), &size, sizeof(size)); \ - offset += sizeof(size); \ - memcpy(((char*)(bufptr)) + (offset), (stdstring).c_str(), size * sizeof(char)); \ - offset += size * sizeof(char); \ -} while (0) - -// UNPACK string -#define MSH_UNPACK_STRING(bufptr, offset, stdstring) \ -do { \ - uint32 size = 0; \ - memcpy(&size, ((char*)(bufptr)) + (offset), sizeof(size)); \ - offset += sizeof(size); \ - char stringbuf[size + 1]; \ - memcpy(stringbuf, ((char*)(bufptr)) + (offset), size * sizeof(char)); \ - stringbuf[size] = '\0'; \ - (stdstring) = string(stringbuf); /* cast to std::string */ \ - offset += size * sizeof(char); \ -} while (0) - -// SIZE bitset<...> -#define MSH_BITSET_SIZE(bset) sizeof(bset) - -// PACK bitset<...> -#define MSH_PACK_BITSET(buffer, offset, bset) \ -do { \ - memcpy(((char*)(buffer))+(offset), &(bset), sizeof(bset)); \ - offset += sizeof(bset); \ -} while(0) - -// UNPACK bitset<...> -#define MSH_UNPACK_BITSET(buffer,offset,bset) \ -do { \ - memcpy(&bset, ((char*)(buffer))+(offset), sizeof(bset)); \ - offset += sizeof(bset); \ -} while(0) - -// SIZE map<string, class_with_getSize> -#define MSH_SIZE_MAP_STRING_CLASS(sizevar, themap, datatype) \ -do { \ - sizevar = sizeof(int32); \ - map<string, datatype>::iterator iter = themap.begin(); \ - map<string, datatype>::iterator end = themap.end(); \ - while (iter != end) { \ - sizevar += MSH_STRING_SIZE(iter->first); \ - sizevar += iter->second.getSize(); \ - iter++; \ - } \ -} while (0) - - -// PACK map<string, class_with_pack> -#define MSH_PACK_MAP_STRING_CLASS(bufptr, offset, themap, datatype) \ -do { \ - int32 nrElem = themap.size(); \ - memcpy(((char*)(bufptr)) + (offset), &nrElem, sizeof(int32)); \ - offset += sizeof(int32); \ - \ - map<string, datatype>::iterator iter = themap.begin(); \ - map<string, datatype>::iterator end = themap.end(); \ - while (iter != end) { \ - MSH_PACK_STRING(bufptr, offset, iter->first); \ - offset += iter->second.pack(bufptr + offset); \ - iter++; \ - } \ -} while (0) - -// UNPACK map<string, class_with_unpack> -#define MSH_UNPACK_MAP_STRING_CLASS(bufptr, offset, themap, datatype) \ -do { \ - int32 nrElem = 0; \ - memcpy(&nrElem, ((char*)(bufptr)) + (offset), sizeof(nrElem)); \ - offset += sizeof(nrElem); \ - \ - for (int elem = 0; elem < nrElem; elem++) { \ - string elem1; \ - MSH_UNPACK_STRING(bufptr, offset, elem1); \ - offset += themap[elem1].unpack(bufptr + offset); \ - } \ -} while (0) - -// SIZE map<string, ptr2class_with_getSize> -#define MSH_SIZE_MAP_STRING_CLASSPTR(sizevar, themap, datatype) \ -do { \ - sizevar = sizeof(int32); \ - map<string, datatype*>::iterator iter = themap.begin(); \ - map<string, datatype*>::iterator end = themap.end(); \ - while (iter != end) { \ - sizevar += MSH_STRING_SIZE(iter->first); \ - sizevar += iter->second->getSize(); \ - iter++; \ - } \ -} while (0) - - -// PACK map<string, ptr2class_with_pack> -#define MSH_PACK_MAP_STRING_CLASSPTR(bufptr, offset, themap, datatype) \ -do { \ - int32 nrElem = themap.size(); \ - memcpy(((char*)(bufptr)) + (offset), &nrElem, sizeof(int32)); \ - offset += sizeof(int32); \ - \ - map<string, datatype*>::iterator iter = themap.begin(); \ - map<string, datatype*>::iterator end = themap.end(); \ - while (iter != end) { \ - MSH_PACK_STRING(bufptr, offset, iter->first); \ - offset += iter->second->pack((char*)bufptr + offset); \ - iter++; \ - } \ -} while (0) - -// UNPACK map<string, ptr2class_with_unpack> -#define MSH_UNPACK_MAP_STRING_CLASSPTR(bufptr, offset, themap, datatype) \ -do { \ - int32 nrElem = 0; \ - memcpy(&nrElem, ((char*)(bufptr)) + (offset), sizeof(nrElem)); \ - offset += sizeof(nrElem); \ - \ - for (int elem = 0; elem < nrElem; elem++) { \ - string elem1; \ - MSH_UNPACK_STRING(bufptr, offset, elem1); \ - themap[elem1] = new datatype; \ - offset += themap[elem1]->unpack((char*)bufptr + offset); \ - } \ -} while (0) - -// SIZE vector<string>> -#define MSH_SIZE_VECTOR_STRING(sizevar, thevector) \ -do { \ - sizevar = sizeof(int32); \ - vector<string>::iterator iter = thevector.begin(); \ - vector<string>::iterator end = thevector.end(); \ - while (iter != end) { \ - sizevar += MSH_STRING_SIZE(*iter); \ - iter++; \ - } \ -} while (0) - - -// PACK vector<string> -#define MSH_PACK_VECTOR_STRING(bufptr, offset, thevector) \ -do { \ - int32 nrElem = thevector.size(); \ - memcpy(((char*)(bufptr)) + (offset), &nrElem, sizeof(int32)); \ - offset += sizeof(int32); \ - \ - vector<string>::iterator iter = thevector.begin(); \ - vector<string>::iterator end = thevector.end(); \ - while (iter != end) { \ - MSH_PACK_STRING(bufptr, offset, *iter); \ - iter++; \ - } \ -} while (0) - -// UNPACK vector<string> -#define MSH_UNPACK_VECTOR_STRING(bufptr, offset, thevector) \ -do { \ - int32 nrElem = 0; \ - memcpy(&nrElem, ((char*)(bufptr)) + (offset), sizeof(nrElem)); \ - offset += sizeof(nrElem); \ - \ - for (int elem = 0; elem < nrElem; elem++) { \ - string elem1; \ - MSH_UNPACK_STRING(bufptr, offset, elem1); \ - thevector.push_back(elem1); \ - } \ -} while (0) - -// SIZE vector<double>> -#define MSH_SIZE_VECTOR_DOUBLE(sizevar, thevector) \ -do { \ - sizevar = sizeof(int32) + thevector.size() * sizeof(double); \ -} while (0) - - -// PACK vector<double> -#define MSH_PACK_VECTOR_DOUBLE(bufptr, offset, thevector) \ -do { \ - int32 nrElem = thevector.size(); \ - memcpy(((char*)(bufptr)) + (offset), &nrElem, sizeof(int32)); \ - offset += sizeof(int32); \ - \ - for (int idx=0; idx < nrElem; idx++) { \ - memcpy(((char*)(bufptr)) + (offset), &(thevector[idx]), sizeof(double)); \ - offset += sizeof(double); \ - } \ -} while (0) - -// UNPACK vector<double> -#define MSH_UNPACK_VECTOR_DOUBLE(bufptr, offset, thevector) \ -do { \ - int32 nrElem = 0; \ - memcpy(&nrElem, ((char*)(bufptr)) + (offset), sizeof(nrElem)); \ - offset += sizeof(nrElem); \ - \ - for (int elem = 0; elem < nrElem; elem++) { \ - double elem1; \ - memcpy(&elem1, ((char*)(bufptr)) + (offset), sizeof(elem1)); \ - thevector.push_back(elem1); \ - offset += sizeof(double); \ - } \ -} while (0) - -#endif /* MARSHALLING_H_ */ diff --git a/MAC/MACIO/include/MACIO/Marshalling.tcc b/MAC/MACIO/include/MACIO/Marshalling.tcc new file mode 100644 index 00000000000..bc6a6c75f75 --- /dev/null +++ b/MAC/MACIO/include/MACIO/Marshalling.tcc @@ -0,0 +1,237 @@ +//# -*- mode: c++ -*- +//# +//# Marshalling.h: Macros for packing/unpacking some classes +//# +//# Copyright (C) 2002-2004 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: Marshalling.h 19796 2012-01-17 10:06:03Z overeem $ + +#ifndef MACIO_MARSHALLING_TCC_ +#define MACIO_MARSHALLING_TCC_ + +#include <Common/LofarTypes.h> +#include <Common/lofar_bitset.h> +#include <Common/lofar_map.h> +#include <Common/lofar_string.h> +#include <Common/lofar_vector.h> +#include <boost/dynamic_bitset.hpp> +#include <sstream> + +using namespace LOFAR; + +// Basic template +template<typename T> inline size_t MSH_size(const T &tVar) +{ + return (sizeof(tVar)); +} + +template<typename T> inline void MSH_pack(char *bufPtr, size_t &offset, const T &tVar) +{ + size_t size = MSH_size(tVar); + memcpy(bufPtr + offset, &tVar, size); + offset += size; +} + +template<typename T> inline void MSH_unpack(const char *bufPtr, size_t &offset, T &tVar) +{ + size_t size = MSH_size(tVar); + memcpy(&tVar, bufPtr + offset, size); + offset += size; +} + +// Specialistion for string +template<> inline size_t MSH_size<string>(const string &tVar) +{ + return (sizeof(int32) + tVar.size() + sizeof(char)); +} + +template <> inline void MSH_pack<string>(char *bufPtr, size_t &offset, const string &tVar) +{ + int32 nrChars = tVar.size(); + memcpy(bufPtr + offset, &nrChars, sizeof(nrChars)); + offset += sizeof(nrChars); + memcpy(bufPtr + offset, tVar.data(), nrChars); + offset += nrChars; + memset(bufPtr + offset, 0, 1); + offset++; +} + +template<> inline void MSH_unpack<string>(const char *bufPtr, size_t &offset, string &tVar) +{ + int32 nrChars; + memcpy(&nrChars, bufPtr + offset, sizeof(nrChars)); + offset += sizeof(nrChars); + tVar= string(bufPtr+offset); + offset += nrChars + 1; +} + +// Specialistion for boost::dynamic_bitset +template<> inline size_t MSH_size<boost::dynamic_bitset<> >(const boost::dynamic_bitset<> &tVar) +{ + return (sizeof(int32) + tVar.size() + sizeof(char)); +} + +// Specialisation for boost::dynamic_bitset +template <> inline void MSH_pack<boost::dynamic_bitset<> >(char *bufPtr, size_t &offset, const boost::dynamic_bitset<> &tVar) +{ + int32 nrBits = tVar.size(); + memcpy(bufPtr + offset, &nrBits, sizeof(nrBits)); + offset += sizeof(nrBits); + stringstream tmpbuf(stringstream::in | stringstream::out); + tmpbuf << tVar; + memcpy(bufPtr + offset, tmpbuf.str().data(), nrBits); + offset += nrBits; + memset(bufPtr + offset, 0, 1); + offset++; +} + +template<> void inline MSH_unpack<boost::dynamic_bitset<> >(const char *bufPtr, size_t &offset, boost::dynamic_bitset<> &tVar) +{ + int32 nrBits; + memcpy(&nrBits, bufPtr + offset, sizeof(nrBits)); + offset += sizeof(nrBits); +// tVar << std::string(bufPtr+offset); + tVar = boost::dynamic_bitset<>(string(bufPtr+offset)); + offset += nrBits + 1; +} + +// basics for vector<T> +template<typename T> size_t MSH_size(const vector<T> &tVar) +{ + size_t sizevar = sizeof(int32); + typename vector<T>::const_iterator iter = tVar.begin(); + typename vector<T>::const_iterator end = tVar.end(); + while (iter != end) { + sizevar += MSH_size(*iter); + iter++; + } + return (sizevar); +} + +template<typename T> void MSH_pack(char *bufPtr, size_t &offset, const vector<T> &tVar) +{ + int32 nrElem = tVar.size(); + memcpy((char*)bufPtr + offset, &nrElem, sizeof(int32)); + offset += sizeof(int32); + + typename vector<T>::const_iterator iter = tVar.begin(); + typename vector<T>::const_iterator end = tVar.end(); + while (iter != end) { + MSH_pack(bufPtr, offset, *iter); + iter++; + } +} + +template<typename T> void MSH_unpack(const char* bufPtr, size_t &offset, vector<T> &tVar) +{ + int32 nrElem = 0; + memcpy(&nrElem, (char*)bufPtr + offset, sizeof(nrElem)); + offset += sizeof(nrElem); + + for (int elem = 0; elem < nrElem; elem++) { + T elem1; + MSH_unpack(bufPtr, offset, elem1); + tVar.push_back(elem1); + } +} + +// basics for map<string,T*> +template<typename T> size_t MSH_size(const map<string,T*> &tVar) +{ + size_t sizevar = sizeof(int32); + typename map<string,T*>::const_iterator iter = tVar.begin(); + typename map<string,T*>::const_iterator end = tVar.end(); + while (iter != end) { + sizevar += MSH_size(iter->first) + iter->second->getSize(); + iter++; + } + return (sizevar); +} + +template<typename T> void MSH_pack(char *bufPtr, size_t &offset, const map<string,T*> &tVar) +{ + int32 nrElem = tVar.size(); + memcpy((char*)bufPtr + offset, &nrElem, sizeof(int32)); + offset += sizeof(int32); + + typename map<string,T*>::const_iterator iter = tVar.begin(); + typename map<string,T*>::const_iterator end = tVar.end(); + while (iter != end) { + MSH_pack(bufPtr, offset, iter->first); + offset += iter->second->pack(bufPtr + offset); + iter++; + } +} + +template<typename T> void MSH_unpack(const char* bufPtr, size_t &offset, map<string,T*> &tVar) +{ + int32 nrElem = 0; + memcpy(&nrElem, (char*)bufPtr + offset, sizeof(nrElem)); + offset += sizeof(nrElem); + + for (int elem = 0; elem < nrElem; elem++) { + string elem1; + MSH_unpack(bufPtr, offset, elem1); + tVar[elem1] = new T; + offset += tVar[elem1]->unpack(bufPtr + offset); + } +} + +// basics for map<string,T> +template<typename T> size_t MSH_size(const map<string,T> &tVar) +{ + size_t sizevar = sizeof(int32); + typename map<string,T>::const_iterator iter = tVar.begin(); + typename map<string,T>::const_iterator end = tVar.end(); + while (iter != end) { + sizevar += MSH_size(iter->first) + iter->second.getSize(); + iter++; + } + return (sizevar); +} + +template<typename T> void MSH_pack(char *bufPtr, size_t &offset, const map<string,T> &tVar) +{ + int32 nrElem = tVar.size(); + memcpy((char*)bufPtr + offset, &nrElem, sizeof(int32)); + offset += sizeof(int32); + + typename map<string,T>::const_iterator iter = tVar.begin(); + typename map<string,T>::const_iterator end = tVar.end(); + while (iter != end) { + MSH_pack(bufPtr, offset, iter->first); + offset += iter->second.pack(bufPtr + offset); + iter++; + } +} + +template<typename T> void MSH_unpack(const char* bufPtr, size_t &offset, map<string,T> &tVar) +{ + int32 nrElem = 0; + memcpy(&nrElem, (char*)bufPtr + offset, sizeof(nrElem)); + offset += sizeof(nrElem); + + for (int elem = 0; elem < nrElem; elem++) { + string elem1; + MSH_unpack(bufPtr, offset, elem1); + offset += tVar[elem1].unpack(bufPtr + offset); + } +} + +#endif /* MARSHALLING_H_ */ diff --git a/MAC/MACIO/include/MACIO/ProtocolDefs.h b/MAC/MACIO/include/MACIO/ProtocolDefs.h index 7bc148bcc65..ea155c1b8be 100644 --- a/MAC/MACIO/include/MACIO/ProtocolDefs.h +++ b/MAC/MACIO/include/MACIO/ProtocolDefs.h @@ -28,9 +28,18 @@ namespace LOFAR { namespace MACIO { -/** - * Macro to encode an event's signal from the signal id, protocal an in/out direction - */ +// +// +-------------------------------++-------------------------------+ +// | O | I | p | p | p | p | p | p || m | m | m | m | m | m | m | m | +// +-------------------------------++-------------------------------+ +// +// O : out going message +// I : incoming message +// p : protocol number (0..63) +// m : messagenumber (0..255) +// + +// Macro to encode an event's signal from the signal id, protocal an in/out direction #define F_SIGNAL(prot, sig, inout) ( (((unsigned short)(inout) & 0x3) << 14) \ | (((unsigned short)(prot) & 0x3f) << 8) \ | ((unsigned short)(sig) & 0xff) \ @@ -41,9 +50,7 @@ namespace LOFAR { #define F_ERR_PROTOCOL(errID) ( ((unsigned short)(errID) / 100) & 0x3f ) #define F_ERR_NR(errID) ( (unsigned short)(errID) % 100 ) -/** - * Define different types of signals - */ +// Define different types of signals #define F_IN 0x01 #define F_OUT 0x02 #define F_INOUT (F_IN | F_OUT) diff --git a/MAC/MACIO/include/MACIO/StringVector.h b/MAC/MACIO/include/MACIO/StringVector.h index 09c8942a7d6..1b2d5634e75 100644 --- a/MAC/MACIO/include/MACIO/StringVector.h +++ b/MAC/MACIO/include/MACIO/StringVector.h @@ -30,8 +30,8 @@ //# Includes #include <Common/lofar_string.h> #include <Common/lofar_vector.h> +#include <MACIO/Marshalling.tcc> #include <Common/StreamUtil.h> -#include <MACIO/Marshalling.h> // Avoid 'using namespace' in headerfiles @@ -49,9 +49,9 @@ public: StringVector() {}; ~StringVector() {}; - unsigned int getSize(); - unsigned int pack (void *buffer); - unsigned int unpack(void *buffer); + size_t getSize() const; + size_t pack (char *buffer) const; + size_t unpack(char *buffer); ostream& print (ostream& os) const; vector<string>& operator()() @@ -66,26 +66,24 @@ private: // @} // getSize() -inline unsigned int StringVector::getSize() +inline size_t StringVector::getSize() const { - unsigned int offset = 0; - MSH_SIZE_VECTOR_STRING(offset, theVector); - return (offset); + return (MSH_size(theVector)); } // pack() -inline unsigned int StringVector::pack(void *buffer) +inline size_t StringVector::pack(char *buffer) const { - unsigned int offset = 0; - MSH_PACK_VECTOR_STRING(buffer, offset, theVector); + size_t offset = 0; + MSH_pack(buffer, offset, theVector); return (offset); } // unpack() -inline unsigned int StringVector::unpack(void *buffer) +inline size_t StringVector::unpack(char *buffer) { - unsigned int offset = 0; - MSH_UNPACK_VECTOR_STRING(buffer, offset, theVector); + size_t offset = 0; + MSH_unpack(buffer, offset, theVector); return (offset); } diff --git a/MAC/MACIO/test/tMarshalling.cc b/MAC/MACIO/test/tMarshalling.cc index 6742cd644c5..c9d5b748b35 100644 --- a/MAC/MACIO/test/tMarshalling.cc +++ b/MAC/MACIO/test/tMarshalling.cc @@ -29,11 +29,12 @@ #include <Common/lofar_map.h> #include <Common/lofar_vector.h> #include <Common/hexdump.h> -#include <MACIO/Marshalling.h> +#include <MACIO/Marshalling.tcc> #include "tMarshalling.h" using namespace LOFAR; +using namespace std; namespace LOFAR { @@ -42,28 +43,28 @@ SubArray::SubArray(int i, double d, string s) : { } -unsigned int SubArray::getSize() { - return (sizeof(int) + sizeof(double) + MSH_STRING_SIZE(someString)); +size_t SubArray::getSize() const { + return (sizeof(int) + sizeof(double) + MSH_size(someString)); } -unsigned int SubArray::pack(void* buffer) { - unsigned int offset = 0; - memcpy(((char*)(buffer)+offset), &someInt, sizeof(int)); +size_t SubArray::pack(char* buffer) const { + size_t offset = 0; + memcpy(buffer+offset, &someInt, sizeof(int)); offset += sizeof (int); - memcpy(((char*)(buffer)+offset), &someDouble, sizeof(double)); + memcpy(buffer+offset, &someDouble, sizeof(double)); offset += sizeof (double); - MSH_PACK_STRING(buffer, offset, someString); + MSH_pack(buffer, offset, someString); return (offset); } -unsigned int SubArray::unpack(void* buffer) { - unsigned int offset = 0; - memcpy(&someInt, ((char*)(buffer))+offset, sizeof(int)); +size_t SubArray::unpack(const char* buffer) { + size_t offset = 0; + memcpy(&someInt, buffer+offset, sizeof(int)); offset += sizeof(int); - memcpy(&someDouble, ((char*)(buffer))+offset, sizeof(double)); + memcpy(&someDouble, buffer+offset, sizeof(double)); offset += sizeof(double); - MSH_UNPACK_STRING(buffer, offset, someString); + MSH_unpack(buffer, offset, someString); return (offset); } @@ -72,28 +73,28 @@ SubArrayNC::SubArrayNC(int i, double d, string s) : { } -unsigned int SubArrayNC::getSize() { - return (sizeof(int) + sizeof(double) + MSH_STRING_SIZE(someString)); +size_t SubArrayNC::getSize() const { + return (sizeof(int) + sizeof(double) + MSH_size(someString)); } -unsigned int SubArrayNC::pack(void* buffer) { - unsigned int offset = 0; - memcpy(((char*)(buffer)+offset), &someInt, sizeof(int)); +size_t SubArrayNC::pack(char* buffer) const { + size_t offset = 0; + memcpy(buffer+offset, &someInt, sizeof(int)); offset += sizeof (int); - memcpy(((char*)(buffer)+offset), &someDouble, sizeof(double)); + memcpy(buffer+offset, &someDouble, sizeof(double)); offset += sizeof (double); - MSH_PACK_STRING(buffer, offset, someString); + MSH_pack(buffer, offset, someString); return (offset); } -unsigned int SubArrayNC::unpack(void* buffer) { - unsigned int offset = 0; - memcpy(&someInt, ((char*)(buffer))+offset, sizeof(int)); +size_t SubArrayNC::unpack(const char* buffer) { + size_t offset = 0; + memcpy(&someInt, buffer+offset, sizeof(int)); offset += sizeof(int); - memcpy(&someDouble, ((char*)(buffer))+offset, sizeof(double)); + memcpy(&someDouble, buffer+offset, sizeof(double)); offset += sizeof(double); - MSH_UNPACK_STRING(buffer, offset, someString); + MSH_unpack(buffer, offset, someString); return (offset); } @@ -105,51 +106,80 @@ int main (int /*argc*/, char** /*argv[]*/) // string test string tstString("Dit is een teststring"); cout << "Testing string: " << tstString << endl; - - cout << "size = " << MSH_STRING_SIZE(tstString) << endl; + cout << "size = " << MSH_size(tstString) << endl; char buf[4096]; - int32 offset(0); - MSH_PACK_STRING(buf, offset, tstString); + size_t offset1(0); + MSH_pack(buf, offset1, tstString); cout << "packed: " << endl; - hexdump(buf, offset); + hexdump(buf, offset1); string newString; - offset = 0; - MSH_UNPACK_STRING(buf, offset, newString); + size_t offset2(0); + MSH_unpack(buf, offset2, newString); cout << "unpacked: " << newString << endl; + ASSERTSTR (offset1 == offset2 && tstString == newString, "Failure 1 in strings"); + - // bitmap test1 - bitset<32> bs1; + // bitset test1 + LOFAR::bitset<35> bs1; bs1.reset(); bs1.set(0); bs1.set(5); bs1.set(20); - cout << "Testing bitset<32>" << bs1 << endl; - - cout << "size = " << MSH_BITSET_SIZE(bs1) << endl; + cout << "Testing bitset<35>: " << bs1 << endl; + cout << "size = " << MSH_size(bs1) << endl; bzero(buf, 4096); - offset = 0; - MSH_PACK_BITSET(buf, offset, bs1); + offset1 = 0; + MSH_pack(buf, offset1, bs1); cout << "packed:" << endl; - hexdump(buf, offset); + hexdump(buf, offset1); - bitset<32> bs2; - offset = 0; - MSH_UNPACK_BITSET(buf, offset, bs2); + LOFAR::bitset<35> bs2; + offset2 = 0; + MSH_unpack(buf, offset2, bs2); + cout << "size = " << offset2 << endl; cout << "unpacked: " << bs2 << endl; + ASSERTSTR (offset1 == offset2, "Failure in offset var of bitsets"); + ASSERTSTR (bs1 == bs2, "Failure in bitsets"); + + + // dynamic bitmap + boost::dynamic_bitset<> dbs1(25); + dbs1.set(0); + dbs1.set(5); + dbs1.set(6); + dbs1.set(20); + cout << "Testing dynamic_bitset<25>" << endl << dbs1 << endl; + cout << "size = " << MSH_size(dbs1) << endl; + + bzero(buf, 4096); + offset1 = 0; + MSH_pack(&buf[0], offset1, dbs1); + cout << "packed:" << endl; + hexdump(buf, offset1); + + boost::dynamic_bitset<> dbs2; + offset2 = 0; + MSH_unpack(&buf[0], offset2, dbs2); + cout << "unpacked: " << dbs2 << endl; + cout << "size = " << dbs2.size() << endl; + cout << "offset1 = " << offset1 << endl; + cout << "offset2 = " << offset2 << endl; + ASSERTSTR (offset1 == offset2 && dbs1 == dbs2, "Failure in dynamic bitsets"); + // SubArray SubArray SA1(25, 3.14, "stringetje"); cout << "Testing SubArray class:" << SA1.someInt << "," << SA1.someDouble << "," << SA1.someString << endl; - unsigned int size(SA1.getSize()); + size_t size(SA1.getSize()); cout << "size = " << size << endl; bzero(buf, 4096); - offset = 0; + size_t offset = 0; SA1.pack(buf); cout << "packed:" << endl; hexdump(buf, size); @@ -161,6 +191,7 @@ int main (int /*argc*/, char** /*argv[]*/) << "," << SA2.someString << endl; + // map<string, subArray> map<string, SubArray> ms1; ms1["eerste_item"] = SubArray(25, 3.14, "stringetje"); @@ -174,19 +205,21 @@ int main (int /*argc*/, char** /*argv[]*/) iter++; } - unsigned int mapsize; - MSH_SIZE_MAP_STRING_CLASS(mapsize, ms1, SubArray); + size_t mapsize; + mapsize = MSH_size(ms1); +// MSH_SIZE_MAP_STRING_CLASS(mapsize, ms1, SubArray); cout << "size = " << mapsize << endl; bzero(buf, 4096); offset = 0; - MSH_PACK_MAP_STRING_CLASS(buf, offset, ms1, SubArray); + MSH_pack(buf, offset, ms1); +// MSH_PACK_MAP_STRING_CLASS(buf, offset, ms1, SubArray); cout << "packed:" << endl; hexdump(buf, mapsize); map<string, SubArray> ms2; offset = 0; - MSH_UNPACK_MAP_STRING_CLASS(buf, offset, ms2, SubArray); + MSH_unpack(buf, offset, ms2); cout << "Unpacked map<string, SubArray>: " << endl; map<string, SubArray>::iterator iter2 = ms2.begin(); map<string, SubArray>::iterator end2 = ms2.end(); @@ -210,19 +243,19 @@ int main (int /*argc*/, char** /*argv[]*/) iternc++; } - unsigned int mapncsize; - MSH_SIZE_MAP_STRING_CLASSPTR(mapncsize, msanc1, SubArrayNC); + size_t mapncsize; + mapncsize = MSH_size(msanc1); cout << "size = " << mapncsize << endl; bzero(buf, 4096); offset = 0; - MSH_PACK_MAP_STRING_CLASSPTR(buf, offset, msanc1, SubArrayNC); + MSH_pack(buf, offset, msanc1); cout << "packed:" << endl; hexdump(buf, mapncsize); map<string, SubArrayNC*> msanc2; offset = 0; - MSH_UNPACK_MAP_STRING_CLASSPTR(buf, offset, msanc2, SubArrayNC); + MSH_unpack(buf, offset, msanc2); cout << "Unpacked map<string, SubArrayNC*>: " << endl; iternc = msanc2.begin(); endnc = msanc2.end(); @@ -248,19 +281,19 @@ int main (int /*argc*/, char** /*argv[]*/) itersv++; } - unsigned int svsize; - MSH_SIZE_VECTOR_STRING(svsize, sv1); + size_t svsize; + svsize = MSH_size(sv1); cout << "size = " << svsize << endl; bzero(buf, 4096); - offset = 0; - MSH_PACK_VECTOR_STRING(buf, offset, sv1); + offset1 = 0; + MSH_pack(buf, offset1, sv1); cout << "packed:" << endl; hexdump(buf, svsize); vector<string> sv2; - offset = 0; - MSH_UNPACK_VECTOR_STRING(buf, offset, sv2); + offset2 = 0; + MSH_unpack(buf, offset2, sv2); cout << "Unpacked vector<string>" << endl; itersv = sv2.begin(); endsv = sv2.end(); @@ -270,6 +303,8 @@ int main (int /*argc*/, char** /*argv[]*/) i++; itersv++; } + ASSERTSTR (offset1 == offset2 && sv1 == sv2, "Failure in vector<string>"); + // vector<double> vector<double> dv1; @@ -286,19 +321,19 @@ int main (int /*argc*/, char** /*argv[]*/) iterdv++; } - unsigned int dvsize; - MSH_SIZE_VECTOR_DOUBLE(dvsize, dv1); + size_t dvsize; + dvsize = MSH_size(dv1); cout << "size = " << dvsize << endl; bzero(buf, 4096); offset = 0; - MSH_PACK_VECTOR_DOUBLE(buf, offset, dv1); + MSH_pack(buf, offset, dv1); cout << "packed:" << endl; hexdump(buf, dvsize); vector<double> dv2; offset = 0; - MSH_UNPACK_VECTOR_DOUBLE(buf, offset, dv2); + MSH_unpack(buf, offset, dv2); cout << "Unpacked vector<double>" << endl; iterdv = dv2.begin(); enddv = dv2.end(); @@ -308,6 +343,5 @@ int main (int /*argc*/, char** /*argv[]*/) i++; iterdv++; } - - return (0); + ASSERTSTR (offset1 == offset2 && dv1 == dv2, "Failure in vector<double>"); } diff --git a/MAC/MACIO/test/tMarshalling.h b/MAC/MACIO/test/tMarshalling.h index c8acab445f9..89ff7e5cb46 100644 --- a/MAC/MACIO/test/tMarshalling.h +++ b/MAC/MACIO/test/tMarshalling.h @@ -18,7 +18,7 @@ //# along with this program; if not, write to the Free Software //# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //# -//# $Id$ +//# $Id: tMarshalling.h 11023 2008-03-18 08:07:14Z overeem $ #ifndef RTC_TMARSHALLING_H #define RTC_TMARSHALLING_H @@ -51,9 +51,9 @@ public: SubArray(int i, double d, string s); SubArray() {}; - unsigned int getSize(); - unsigned int pack(void* buffer); - unsigned int unpack(void* buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); }; class SubArrayNC @@ -65,9 +65,9 @@ public: SubArrayNC(int i, double d, string s); SubArrayNC() {}; - unsigned int getSize(); - unsigned int pack(void* buffer); - unsigned int unpack(void* buffer); + size_t getSize() const; + size_t pack (char* buffer) const; + size_t unpack(const char *buffer); private: // prevent copy SubArrayNC(const SubArrayNC&); diff --git a/MAC/Navigator2/panels/Hardware/CEP.pnl b/MAC/Navigator2/panels/Hardware/CEP.pnl index 1f5a9caca46..e082a0a7a6b 100644 --- a/MAC/Navigator2/panels/Hardware/CEP.pnl +++ b/MAC/Navigator2/panels/Hardware/CEP.pnl @@ -19,7 +19,6 @@ void prepareHardwareList() { // For this panel CEP should be selectable so we get them for the treelist dynAppend(g_stationList,navFunct_bareDBName(sysName)); - DebugN(\"g_stat: \"+g_stationList); // For this panel BGPRacks and BGPMidplanes should be selectable so we get them for the treelist // BGPRacks first @@ -49,8 +48,6 @@ void prepareHardwareList() { dynAppend(g_BGPRackList,b); } } - DebugN(\"bgp: \"+g_BGPRackList); - DebugN(\"mid: \"+g_BGPMidplaneList); // For this panel OSRacks and OSSubclusters should be selectable so we get them for the treelist // OSRacks first diff --git a/MAC/Navigator2/panels/Hardware/CEP_BGPRack_detailed.pnl b/MAC/Navigator2/panels/Hardware/CEP_BGPRack_detailed.pnl index e32a6e5e915..af049719bb7 100644 --- a/MAC/Navigator2/panels/Hardware/CEP_BGPRack_detailed.pnl +++ b/MAC/Navigator2/panels/Hardware/CEP_BGPRack_detailed.pnl @@ -16,8 +16,8 @@ PANEL,-1 -1 1011 662 N "_3DFace" 0 setValue(\"selfState.light\",\"toolTipText\",baseDP); if(dpExists(baseDP + \".BGPSwitch\")) { - dpConnect(\"controlBGP\", baseDP + \".bgpSwitch:_online.._value\", - baseDP + \".bgpSwitch:_online.._invalid\"); + dpConnect(\"controlBGP\", baseDP + \".BGPSwitch:_online.._value\", + baseDP + \".BGPSwitch:_online.._invalid\"); if (!navFunct_dpReachable(baseDP)) { controlIOnode(\"\",false,\"\",true); } @@ -234,4 +234,4 @@ LANG:1 6 Layer8 "objects\\Hardware\\CEP_Midplane_small.pnl" 408 540 T 88 1 0 1 5 -6 1 "$BGPMidplaneNr""0" -0 +0 \ No newline at end of file diff --git a/MAC/Navigator2/panels/Hardware/CEP_IONode.pnl b/MAC/Navigator2/panels/Hardware/CEP_IONode.pnl new file mode 100644 index 00000000000..efea0504f6d --- /dev/null +++ b/MAC/Navigator2/panels/Hardware/CEP_IONode.pnl @@ -0,0 +1,784 @@ +V 11 +1 +LANG:1 10 CEP_IONode +PANEL,-1 -1 1011 745 N "_3DFace" 0 +"main() +{ + // Initialise the Panel + navPanel_initPanel(\"fw_viewBox\"); + + baseDP = g_currentDatapoint; + + dyn_string dpAr= strsplit(dpSubStr(g_currentDatapoint,DPSUB_DP),\"_\"); + if (strpos(dpAr[dynlen(dpAr)],\"IONode\") > -1) { + ioNr = substr(dpAr[dynlen(dpAr)],6,strlen(dpAr[dynlen(dpAr)])); + } else { + LOG_ERROR(\"CEP_IONode.pnl:Initialize|No IONode found in currentDatapoint.\"); + } + + + if(dpExists(baseDP + \".usedStation\")) { + dpConnect(\"controlIOnode\", baseDP + \".station0:_online.._value\", + baseDP + \".IP0:_online.._value\", + baseDP + \".MAC0:_online.._value\", + baseDP + \".station1:_online.._value\", + baseDP + \".IP1:_online.._value\", + baseDP + \".MAC1:_online.._value\", + baseDP + \".MACForeign:_online.._value\", + baseDP + \".usedStation:_online.._value\", + baseDP + \".usedIP:_online.._value\", + baseDP + \".usedMAC:_online.._value\", + baseDP + \".use2ndStation:_online.._value\", + CEPDBName + \"LOFAR_PIC_BGP.BGPSwitch:_online.._value\", + baseDP + \".usedStation:_online.._invalid\"); + if (!navFunct_dpReachable(baseDP)) { + controlIOnode(\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",true); + } + } + + // pass baseDP to selfstate Object to work with + setValue(\"selfState.light\",\"toolTipText\",baseDP); + + // connect for selfUpdates + showSelfState(baseDP); + + reload(); +} + +void controlIOnode(string dp1, string station0, + string dp2, string ipAddress0, + string dp3, string macAddress0, + string dp4, string station1, + string dp5, string ipAddress1, + string dp6, string macAddress1, + string dp7, string macForeign, + string dp8, string station, + string dp9, string ipAddress, + string dp10, string macAddress, + string dp11, bool use2ndStation, + string dp12, bool bgpSwitch, + string dp13, bool invalid) { + + string nodeName = navFunct_DPName2CEPName(baseDP); + setValue(\"nodeName\",\"text\",\"Node: \"+nodeName); + + if (!invalid) { + setValue(\"ip0_text\",\"text\",ipAddress0); + setValue(\"mac0_text\",\"text\",macAddress0); + setValue(\"station0_text\",\"text\",station0); + setValue(\"ip1_text\",\"text\",ipAddress1); + setValue(\"mac1_text\",\"text\",macAddress1); + setValue(\"macForeign0_text\",\"text\",macForeign); + setValue(\"macForeign1_text\",\"text\",macForeign); + setValue(\"station1_text\",\"text\",station1); + setValue(\"ip_text\",\"text\",ipAddress); + setValue(\"mac_text\",\"text\",macAddress); + setValue(\"station_text\",\"text\",station); + if (bgpSwitch) { + BGPline0.visible(false); + BGPline1.visible(true); + } else { + BGPline0.visible(true); + BGPline1.visible(false); + } + } else { + setValue(\"ip0_text\",\"text\",\"???????\"); + setValue(\"mac0_text\",\"text\",\"???????\"); + setValue(\"station0_text\",\"text\",\"?????\"); + setValue(\"ip1_text\",\"text\",\"???????\"); + setValue(\"mac1_text\",\"text\",\"???????\"); + setValue(\"macForeign0_text\",\"text\",\"???????\"); + setValue(\"macForeign1_text\",\"text\",\"???????\"); + setValue(\"station1_text\",\"text\",\"?????\"); + setValue(\"ip_text\",\"text\",\"???????\"); + setValue(\"mac_text\",\"text\",\"???????\"); + setValue(\"station_text\",\"text\",\"?????\"); + BGPline0.visible(false); + BGPline1.visible(false); + } +} + +void prepareHardwareList() { + // set the hardware selectable items + dynAppend(g_stationList,navFunct_bareDBName(sysName)); + dynAppend(g_IONodeList,ioNr); + +} + +// +// Callback for dpConnect to action point. +// If there is an action required this point will tell so +// +void doAction(string aDP, string anAction) { + LOG_DEBUG(\"CEP_IONode.pnl:doAction| Action required. found: \" + anAction); + // split action into essentials + dyn_string actionString; + if (!navFunct_splitAction(anAction,actionString)) { + return; + } + + LOG_DEBUG(\"CEP_IONode.pnl:doAction|found actionString: \" + actionString); + + // Reload + if (actionString[1] == \"Reload\") { + reload(); + } else if (actionString[1] == \"DistChanged\") { + // for dist system bound hardware only, if the distsystem went offline we need to replace + // the screen with a broken connection screen. + if (!g_initializing) { + + // check if this syst is in the connectionlist and down + int iPos=dynContains(g_connections[\"NAME\"],sysName); + if (iPos > 0) { + if (!g_connections[\"UP\"][iPos]) { + navPanel_setEvent(\"invalid DP\",\"ChangePanel\"); + } + } + } + return; + } +} + +void reload() { + + navFunct_clearGlobalLists(); + + // set the hardware selectable items for this screen + prepareHardwareList(); + + // set panel to ready + g_objectReady=true; + + + // trigger that the panel values are calculated and ready + navPanel_setEvent(\"CEP_IONode.pnl\",\"Update\"); + +} +" 0 + E E E E 1 -1 -1 0 188 128 +""0 1 +E "#uses \"navPanel.ctl\" +string baseDP = \"\"; +int ioNr = -1; + +" 0 + 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 658 +"childStateBorder" +"" +1 500 80 E E E 1 E 1 E N {0,0,0} E N "_3DFace" E E + E E +77 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 1.723518850987432 0 0.5840455840455839 -181.6517055655296 118.3190883190883 1 E 117 20 674 722 +2 917 +"nodeName" +"" +1 350 100 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(); +}" 0 + "main() +{ + dblClick(); +}" 0 + +78 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main() +{ + click(); +}" 0 + 0 1 1 2 1 E U 1 E 350 100 567 124 +0 2 2 "0s" 0 0 0 192 0 0 350 100 1 +1 +LANG:1 33 MS Shell Dlg,14,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 20 Node: R00-M0-N00-J00 +1 954 1 "" 1 +0 +2 919 +"PRIMITIVE_TEXT1" +"" +1 82 172 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +80 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 82 172 279 191 +0 2 2 "0s" 0 0 0 192 0 0 82 172 1 +1 +LANG:1 35 MS Shell Dlg 2,12,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 24 Possible Configurations: +2 920 +"PRIMITIVE_TEXT2" +"" +1 600 160 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +81 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 600 160 781 179 +0 2 2 "0s" 0 0 0 192 0 0 600 160 1 +1 +LANG:1 35 MS Shell Dlg 2,12,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 21 Chosen Configuration: +6 921 +"RECTANGLE1" +"" +1 130 200 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E + E E +82 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 0.9310344827586207 0 0.8 -59.03448275862068 51.99999999999999 1 E 130 200 420 360 +2 922 +"PRIMITIVE_TEXT3" +"" +1 72 252 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +83 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 72 252 90 268 +0 2 2 "0s" 0 0 0 192 0 0 72 252 1 +1 +LANG:1 35 MS Shell Dlg 2,10,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 3 Ip: +2 923 +"PRIMITIVE_TEXT4" +"" +1 72 222 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +84 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 72 222 124 238 +0 2 2 "0s" 0 0 0 192 0 0 72 222 1 +1 +LANG:1 35 MS Shell Dlg 2,10,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 8 Station: +2 924 +"PRIMITIVE_TEXT5" +"" +1 72 282 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +85 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 72 282 103 298 +0 2 2 "0s" 0 0 0 192 0 0 72 282 1 +1 +LANG:1 35 MS Shell Dlg 2,10,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 4 Mac: +14 925 +"station0_text" +"" +1 162 219 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +86 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +0 +1 +LANG:1 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 +0 160 217 314 240 +2 "0s" 0 0 0 0 0 -1 E E E +14 926 +"ip0_text" +"" +1 162 249 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +87 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +0 +1 +LANG:1 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 +0 160 247 314 270 +2 "0s" 0 0 0 0 0 -1 E E E +14 927 +"mac0_text" +"" +1 162 279 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +88 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +0 +1 +LANG:1 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 +0 160 277 314 300 +2 "0s" 0 0 0 0 0 -1 E E E +2 928 +"PRIMITIVE_TEXT6" +"" +1 32 252 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +89 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 32 252 42 275 +0 2 2 "0s" 0 0 0 192 0 0 32 252 1 +1 +LANG:1 35 MS Shell Dlg 2,14,-1,5,50,0,0,0,0,0 +0 1 +LANG:1 1 0 +6 929 +"RECTANGLE2" +"" +1 130 200 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E + E E +90 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 0.9310344827586207 0 0.8125 -59.03448275862068 227.5 1 E 130 200 420 360 +2 930 +"PRIMITIVE_TEXT7" +"" +1 72 430 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +91 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 72 430 90 446 +0 2 2 "0s" 0 0 0 192 0 0 72 430 1 +1 +LANG:1 35 MS Shell Dlg 2,10,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 3 Ip: +2 931 +"PRIMITIVE_TEXT8" +"" +1 72 400 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +92 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 72 400 124 416 +0 2 2 "0s" 0 0 0 192 0 0 72 400 1 +1 +LANG:1 35 MS Shell Dlg 2,10,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 8 Station: +2 932 +"PRIMITIVE_TEXT9" +"" +1 72 460 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +93 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 72 460 103 476 +0 2 2 "0s" 0 0 0 192 0 0 72 460 1 +1 +LANG:1 35 MS Shell Dlg 2,10,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 4 Mac: +14 933 +"station1_text" +"" +1 162 400 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +94 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +0 +1 +LANG:1 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 +0 160 398 314 421 +2 "0s" 0 0 0 0 0 -1 E E E +14 934 +"ip1_text" +"" +1 162 430 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +95 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +0 +1 +LANG:1 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 +0 160 428 314 451 +2 "0s" 0 0 0 0 0 -1 E E E +14 935 +"mac1_text" +"" +1 162 460 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +96 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +0 +1 +LANG:1 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 +0 160 458 314 481 +2 "0s" 0 0 0 0 0 -1 E E E +2 936 +"PRIMITIVE_TEXT10" +"" +1 32 430 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +97 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 32 430 42 453 +0 2 2 "0s" 0 0 0 192 0 0 32 430 1 +1 +LANG:1 35 MS Shell Dlg 2,14,-1,5,50,0,0,0,0,0 +0 1 +LANG:1 1 1 +6 937 +"RECTANGLE3" +"" +1 130 200 E E E 0 E 1 E N {0,0,0} E N "_Transparent" E E + E E +98 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 0.9310344827586207 0 0.625 558.9655172413793 185 1 E 130 200 420 360 +2 938 +"PRIMITIVE_TEXT11" +"" +1 690 350 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +99 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 690 350 708 366 +0 2 2 "0s" 0 0 0 192 0 0 690 350 1 +1 +LANG:1 35 MS Shell Dlg 2,10,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 3 Ip: +2 939 +"PRIMITIVE_TEXT12" +"" +1 690 320 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +100 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 690 320 742 336 +0 2 2 "0s" 0 0 0 192 0 0 690 320 1 +1 +LANG:1 35 MS Shell Dlg 2,10,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 8 Station: +2 940 +"PRIMITIVE_TEXT13" +"" +1 690 380 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +101 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 690 380 721 396 +0 2 2 "0s" 0 0 0 192 0 0 690 380 1 +1 +LANG:1 35 MS Shell Dlg 2,10,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 4 Mac: +14 941 +"station_text" +"" +1 780 317 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +102 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +0 +1 +LANG:1 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 +0 778 315 932 338 +2 "0s" 0 0 0 0 0 -1 E E E +14 942 +"ip_text" +"" +1 780 347 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +103 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +0 +1 +LANG:1 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 +0 778 345 932 368 +2 "0s" 0 0 0 0 0 -1 E E E +14 943 +"mac_text" +"" +1 780 377 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +104 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +0 +1 +LANG:1 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 +0 778 375 932 398 +2 "0s" 0 0 0 0 0 -1 E E E +4 945 +"BGPline0" +"" +1 350 280 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + E E +106 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 350 280 660 360 +4 948 +"BGPline1" +"" +1 350.0000000000001 460 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + E E +109 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 350 460 660 360 +2 950 +"PRIMITIVE_TEXT14" +"" +1 72 313 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +110 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 72 313 124 329 +0 2 2 "0s" 0 0 0 192 0 0 72 313 1 +1 +LANG:1 35 MS Shell Dlg 2,10,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 8 Foreign: +14 951 +"macForeign0_text" +"" +1 162 310 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +111 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +0 +1 +LANG:1 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 +0 160 308 314 331 +2 "0s" 0 0 0 0 0 -1 E E E +2 952 +"PRIMITIVE_TEXT15" +"" +1 72 493 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +112 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 72 493 124 509 +0 2 2 "0s" 0 0 0 192 0 0 72 493 1 +1 +LANG:1 35 MS Shell Dlg 2,10,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 8 Foreign: +14 953 +"macForeign1_text" +"" +1 162 490 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +113 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +0 +1 +LANG:1 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 +0 160 488 314 511 +2 "0s" 0 0 0 0 0 -1 E E E +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 +3 1 "selfState" -1 +"objects\\lofar_self_state.pnl" 7 8 T 79 1 0 1 50 130 +0 +0 diff --git a/MAC/Navigator2/panels/Hardware/CEP_Midplane.pnl b/MAC/Navigator2/panels/Hardware/CEP_Midplane.pnl index 989b602eb62..709a7921c66 100644 --- a/MAC/Navigator2/panels/Hardware/CEP_Midplane.pnl +++ b/MAC/Navigator2/panels/Hardware/CEP_Midplane.pnl @@ -1,4 +1,4 @@ -V 10 +V 11 1 LANG:1 7 Station PANEL,-1 -1 1011 745 N "_3DFace" 0 @@ -679,135 +679,135 @@ LAYER, 7 1 LANG:1 6 Layer8 0 -3 3 "PANEL_REF4" +3 3 "PANEL_REF4" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 30 T 13 1 0 1 61 6.00000000000016 1 "$nodeNr""31" -3 4 "PANEL_REF5" +3 4 "PANEL_REF5" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 50 T 14 1 0 1 61 7.00000000000016 1 "$nodeNr""30" -3 5 "PANEL_REF6" +3 5 "PANEL_REF6" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 70 T 15 1 0 1 61 8.00000000000016 1 "$nodeNr""29" -3 6 "PANEL_REF7" +3 6 "PANEL_REF7" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 90 T 16 1 0 1 61 9.00000000000016 1 "$nodeNr""28" -3 7 "PANEL_REF8" +3 7 "PANEL_REF8" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 110 T 17 1 0 1 61 10.00000000000016 1 "$nodeNr""27" -3 8 "PANEL_REF9" +3 8 "PANEL_REF9" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 140 T 18 1 0 1 61 1.00000000000016 1 "$nodeNr""26" -3 9 "PANEL_REF10" +3 9 "PANEL_REF10" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 160 T 19 1 0 1 61 2.00000000000016 1 "$nodeNr""25" -3 10 "PANEL_REF11" +3 10 "PANEL_REF11" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 180 T 20 1 0 1 61 3.00000000000016 1 "$nodeNr""24" -3 11 "PANEL_REF12" +3 11 "PANEL_REF12" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 200 T 21 1 0 1 61 4.00000000000016 1 "$nodeNr""23" -3 12 "PANEL_REF13" +3 12 "PANEL_REF13" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 220 T 22 1 0 1 61 5.00000000000016 1 "$nodeNr""22" -3 13 "PANEL_REF14" +3 13 "PANEL_REF14" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 30 T 23 1 0 1 61 216.0000000000001 1 "$nodeNr""21" -3 14 "PANEL_REF15" +3 14 "PANEL_REF15" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 220 T 24 1.003584229390681 0 1 60.67741935483869 47.00000000000016 1 "$nodeNr""20" -3 15 "PANEL_REF16" +3 15 "PANEL_REF16" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 70 T 25 1 0 1 61 218.0000000000001 1 "$nodeNr""19" -3 16 "PANEL_REF17" +3 16 "PANEL_REF17" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 90 T 26 1 0 1 61 219.0000000000001 1 "$nodeNr""18" -3 17 "PANEL_REF18" +3 17 "PANEL_REF18" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 110 T 27 1 0 1 61 220.0000000000001 1 "$nodeNr""17" -3 18 "PANEL_REF19" +3 18 "PANEL_REF19" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 140 T 28 1 0 1 61 211.0000000000001 1 "$nodeNr""16" -3 19 "PANEL_REF20" +3 19 "PANEL_REF20" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 160 T 29 1 0 1 61 212.0000000000001 1 "$nodeNr""15" -3 20 "PANEL_REF21" +3 20 "PANEL_REF21" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 180 T 30 1 0 1 61 213.0000000000001 1 "$nodeNr""14" -3 21 "PANEL_REF22" +3 21 "PANEL_REF22" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 200 T 31 1 0 1 61 214.0000000000001 1 "$nodeNr""13" -3 22 "PANEL_REF23" +3 22 "PANEL_REF23" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 220 T 32 1 0 1 61 215.0000000000001 1 "$nodeNr""12" -3 23 "PANEL_REF24" +3 23 "PANEL_REF24" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 220 T 33 1 0 1 61 257.0000000000002 1 "$nodeNr""10" -3 24 "PANEL_REF25" +3 24 "PANEL_REF25" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 30 T 34 1 0 1 61 426.0000000000002 1 "$nodeNr""11" -3 25 "PANEL_REF26" +3 25 "PANEL_REF26" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 70 T 35 1 0 1 61 428.0000000000002 1 "$nodeNr""9" -3 26 "PANEL_REF27" +3 26 "PANEL_REF27" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 90 T 36 1 0 1 61 429.0000000000002 1 "$nodeNr""8" -3 27 "PANEL_REF28" +3 27 "PANEL_REF28" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 110 T 37 1 0 1 61 430.0000000000002 1 "$nodeNr""7" -3 28 "PANEL_REF29" +3 28 "PANEL_REF29" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 140 T 38 1 0 1 61 421.0000000000002 1 "$nodeNr""6" -3 29 "PANEL_REF30" +3 29 "PANEL_REF30" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 160 T 39 1 0 1 61 422.0000000000002 1 "$nodeNr""5" -3 30 "PANEL_REF31" +3 30 "PANEL_REF31" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 180 T 40 1 0 1 61 423.0000000000002 1 "$nodeNr""4" -3 31 "PANEL_REF32" +3 31 "PANEL_REF32" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 200 T 41 1 0 1 61 424.0000000000002 1 "$nodeNr""3" -3 32 "PANEL_REF33" +3 32 "PANEL_REF33" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 220 T 42 1 0 1 61 425.0000000000002 1 "$nodeNr""2" -3 33 "PANEL_REF34" +3 33 "PANEL_REF34" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 220 T 43 1 0 1 61 467.0000000000002 1 "$nodeNr""0" -3 34 "PANEL_REF35" +3 34 "PANEL_REF35" -1 "objects\\Hardware\\CEP_IONode_small.pnl" 90 30 T 44 1 0 1 61 636.0000000000001 1 "$nodeNr""1" -3 69 "PANEL_REF70" +3 69 "PANEL_REF70" -1 "objects\\Hardware\\midplane_small.pnl" 360 20 T 78 1 0 1 -98 -8.000000000000043 0 -0 \ No newline at end of file +0 diff --git a/MAC/Navigator2/panels/Hardware/LOFAR_Core.pnl b/MAC/Navigator2/panels/Hardware/LOFAR_Core.pnl index f41c8441c0d..6614ef60ea5 100644 --- a/MAC/Navigator2/panels/Hardware/LOFAR_Core.pnl +++ b/MAC/Navigator2/panels/Hardware/LOFAR_Core.pnl @@ -1,7 +1,7 @@ -V 10 +V 11 1 LANG:1 8 (NoName) -PANEL,-1 -1 1077 780 N "_3DFace" 0 +PANEL,-1 -1 1077 790 N "_3DFace" 0 "main() { // Initialise the Panel @@ -278,100 +278,100 @@ LAYER, 7 1 LANG:1 6 Layer8 0 -3 13 "PANEL_REF14" +3 13 "PANEL_REF14" -1 "objects\\Hardware\\Station_small.pnl" 457 486 T 34 0.7424242424242424 0 0.7407407407407407 88.17799150929585 -22.85844132607411 1 "$Station""CS002" -3 20 "PANEL_REF21" +3 20 "PANEL_REF21" -1 "objects\\Hardware\\Station_small.pnl" 457 486 T 42 0.7424242424242424 0 0.7407407407407407 78.17799150929585 -52.85844132607411 1 "$Station""CS003" -3 21 "PANEL_REF22" +3 21 "PANEL_REF22" -1 "objects\\Hardware\\Station_small.pnl" 457 486 T 43 0.7424242424242424 0 0.7407407407407407 78.17799150929585 -2.8584413260741 1 "$Station""CS004" -3 22 "PANEL_REF23" +3 22 "PANEL_REF23" -1 "objects\\Hardware\\Station_small.pnl" 457 486 T 44 0.7424242424242424 0 0.7072354607860037 98.17799150929591 24.00673939508379 1 "$Station""CS005" -3 23 "PANEL_REF24" +3 23 "PANEL_REF24" -1 "objects\\Hardware\\Station_small.pnl" 457 486 T 45 0.7424242424242424 0 0.7407407407407407 118.1779915092959 -12.8584413260741 1 "$Station""CS006" -3 24 "PANEL_REF25" +3 24 "PANEL_REF25" -1 "objects\\Hardware\\Station_small.pnl" 457 486 T 46 0.7424242424242424 0 0.7407407407407407 108.1779915092959 -32.8584413260741 1 "$Station""CS007" -3 25 "PANEL_REF26" +3 25 "PANEL_REF26" -1 "objects\\Hardware\\Station_small.pnl" 457 486 T 47 0.7424242424242424 0 0.7407407407407407 298.1779915092959 37.14155867392589 1 "$Station""CS201" -3 26 "PANEL_REF27" +3 26 "PANEL_REF27" -1 "objects\\Hardware\\Station_small.pnl" 457 486 T 48 0.7424242424242424 0 0.7407407407407407 68.17799150929585 247.1415586739259 1 "$Station""CS301" -3 27 "PANEL_REF28" +3 27 "PANEL_REF28" -1 "objects\\Hardware\\Station_small.pnl" 457 486 T 49 0.7424242424242424 0 0.7407407407407407 558.1779915092959 -62.85844132607414 1 "$Station""CS103" -3 28 "PANEL_REF29" +3 28 "PANEL_REF29" -1 "objects\\Hardware\\Station_small.pnl" 457 486 T 50 0.7424242424242424 0 0.7407407407407407 -21.82200849070415 -92.8584413260741 1 "$Station""CS021" -3 29 "PANEL_REF30" +3 29 "PANEL_REF30" -1 "objects\\Hardware\\Station_small.pnl" 457 486 T 51 0.7424242424242424 0 0.7407407407407407 -41.82200849070415 -232.8584413260741 1 "$Station""CS030" -3 30 "PANEL_REF31" +3 30 "PANEL_REF31" -1 "objects\\Hardware\\Station_small.pnl" 457 486 T 52 0.7424242424242424 0 0.7407407407407407 -121.8220084907042 17.14155867392589 1 "$Station""CS401" -3 31 "PANEL_REF32" +3 31 "PANEL_REF32" -1 "objects\\Hardware\\Station_small.pnl" 457 486 T 53 0.7424242424242424 0 0.7407407407407407 -51.82200849070415 57.14155867392589 1 "$Station""CS032" -3 34 "PANEL_REF35" +3 34 "PANEL_REF35" -1 "objects\\Hardware\\Station_small.pnl" 457 486 T 55 0.7424242424242424 0 0.7407407407407407 -201.8220084907042 337.1415586739259 1 "$Station""CS302" -3 35 "PANEL_REF36" +3 35 "PANEL_REF36" -1 "objects\\Hardware\\Station_small.pnl" 417 67 T 56 0.7241379310344828 0 0.7241379310344828 65.80907546226885 -21.08747626186907 1 "$Station""CS501" -3 38 "PANEL_REF39" +3 38 "PANEL_REF39" -1 "objects\\Hardware\\Station_small.pnl" 617 167 T 59 0.7241379310344828 0 0.7241379310344828 150.9814892553723 6.49873063468263 1 "$Station""CS101" -3 43 "PANEL_REF44" +3 43 "PANEL_REF44" -1 "objects\\Hardware\\Station_small.pnl" 577 317 T 64 0.7241379310344828 0 0.7241379310344828 139.9470064967516 87.87804097951025 1 "$Station""CS017" -3 44 "PANEL_REF45" +3 44 "PANEL_REF45" -1 "objects\\Hardware\\Station_small.pnl" 657 307 T 65 0.7241379310344828 0 0.7241379310344828 152.015972013993 75.1194202898551 1 "$Station""CS026" -3 49 "PANEL_REF50" +3 49 "PANEL_REF50" -1 "objects\\Hardware\\Station_small.pnl" 447 447 T 70 0.7241379310344828 0 0.7241379310344828 84.0849375312344 123.7401099450276 1 "$Station""CS001" -3 50 "PANEL_REF51" +3 50 "PANEL_REF51" -1 "objects\\Hardware\\Station_small.pnl" 527 527 T 71 0.7241379310344828 0 0.7241379310344828 116.1539030484758 155.8090754622688 1 "$Station""CS024" -3 51 "PANEL_REF52" -"objects/Hardware\\Station_small.pnl" 487 357 T 71 0.7241379310344828 0 0.7241379310344828 135.1400566383475 99.40935056281384 +3 51 "PANEL_REF52" -1 +"objects\\Hardware\\Station_small.pnl" 487 357 T 71 0.7241379310344828 0 0.7241379310344828 135.1400566383475 99.40935056281384 1 "$Station""CS011" -3 52 "PANEL_REF53" -"objects/Hardware\\Station_small.pnl" 387 257 T 72 0.7241379310344828 0 0.7241379310344828 107.5538497417958 71.8231436662621 +3 52 "PANEL_REF53" -1 +"objects\\Hardware\\Station_small.pnl" 387 257 T 72 0.7241379310344828 0 0.7241379310344828 107.5538497417958 71.8231436662621 1 "$Station""CS013" -3 53 "PANEL_REF54" -"objects/Hardware\\Station_small.pnl" 517 47 T 73 0.7241379310344828 0 0.7241379310344828 143.3952823588206 13.39528235882057 +3 53 "PANEL_REF54" -1 +"objects\\Hardware\\Station_small.pnl" 517 47 T 73 0.7241379310344828 0 0.7241379310344828 143.3952823588206 13.39528235882057 1 "$Station""CS028" -3 54 "PANEL_REF55" -"objects/Hardware\\Station_small.pnl" 277 257 T 74 0.7241379310344828 0 0.7241379310344828 77.20902215558886 71.82314366626211 +3 54 "PANEL_REF55" -1 +"objects\\Hardware\\Station_small.pnl" 277 257 T 74 0.7241379310344828 0 0.7241379310344828 77.20902215558886 71.82314366626211 1 "$Station""CS031" -0 \ No newline at end of file +0 diff --git a/MAC/Navigator2/panels/Observations/Observation_overview.pnl b/MAC/Navigator2/panels/Observations/Observation_overview.pnl index fbe72e211da..267c55bc28a 100644 --- a/MAC/Navigator2/panels/Observations/Observation_overview.pnl +++ b/MAC/Navigator2/panels/Observations/Observation_overview.pnl @@ -1,7 +1,7 @@ V 11 1 LANG:1 0 -PANEL,-1 -1 995 561 N "_3DFace" 0 +PANEL,-1 -1 995 747 N "_3DFace" 0 "main() { // Initialise the Panel @@ -32,6 +32,9 @@ PANEL,-1 -1 995 561 N "_3DFace" 0 baseDP + \".inputNodeList\", baseDP + \".BGLNodeList\", baseDP + \".storageNodeList\", + baseDP + \".processType\", + baseDP + \".processSubtype\", + baseDP + \".strategy\", baseDP + \".Beams.directionType\", baseDP + \".Beams.angle1\", baseDP + \".Beams.angle2\", @@ -41,7 +44,7 @@ PANEL,-1 -1 995 561 N "_3DFace" 0 LOG_ERROR(\"Observation_overview.pnl:main|Couldn't connect to : \"+baseDP); } if (!navFunct_dpReachable(baseDP)) { - updateObservationControl(\"\",0,\"\",0,\"\",\"\",\"\",\"\",\"\",\"\",0,\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",makeDynString(),\"\",makeDynFloat(), + updateObservationControl(\"\",0,\"\",0,\"\",\"\",\"\",\"\",\"\",\"\",0,\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",makeDynString(),\"\",makeDynFloat(), \"\",makeDynFloat(),\"\",makeDynString(),\"\",true); } } else { @@ -60,6 +63,9 @@ PANEL,-1 -1 995 561 N "_3DFace" 0 setValue(\"inputNodeListText\", \"backCol\", \"Lofar_dpdoesnotexist\"); setValue(\"BGLNodeListText\", \"backCol\", \"Lofar_dpdoesnotexist\"); setValue(\"runStateText\", \"backCol\", \"Lofar_dpdoesnotexist\"); + setValue(\"processTypeText\", \"backCol\", \"Lofar_dpdoesnotexist\"); + setValue(\"processSubTypeText\", \"backCol\", \"Lofar_dpdoesnotexist\"); + setValue(\"strategy\", \"backCol\", \"Lofar_dpdoesnotexist\"); setValue(\"storageNodeListText\", \"backCol\", \"Lofar_dpdoesnotexist\"); } @@ -80,12 +86,15 @@ updateObservationControl(string dp1, int claimPeriod, string dp12,string inputNodeList, string dp13,string BGLNodeList, string dp14,string storageNodeList, - string dp15,dyn_string directionType, - string dp16,dyn_float angle1, - string dp17,dyn_float angle2, - string dp18,dyn_string subbandList, - string dp19,string runState, - string dp20, bool invalid) + string dp15,string processType, + string dp16,string processSubtype, + string dp17,string strategy, + string dp18,dyn_string directionType, + string dp19,dyn_float angle1, + string dp20,dyn_float angle2, + string dp21,dyn_string subbandList, + string dp22,string runState, + string dp23, bool invalid) { LOG_TRACE(\"Observation_overview.pnl:updateObservationControl|entered\"); beamTable.deleteAllLines(); @@ -115,6 +124,9 @@ updateObservationControl(string dp1, int claimPeriod, setValue(\"inputNodeListText\", \"text\", inputNodeList); setValue(\"BGLNodeListText\", \"text\", BGLNodeList); setValue(\"storageNodeListText\", \"text\", storageNodeList); + setValue(\"processTypeText\", \"text\", processType); + setValue(\"processSubtypeText\", \"text\", processSubtype); + setValue(\"strategyText\", \"text\", strategy); setValue(\"runStateText\", \"text\", runState); for (int i=1; i<= dynlen(directionType); i++) { @@ -145,6 +157,9 @@ updateObservationControl(string dp1, int claimPeriod, setValue(\"inputNodeListText\", \"backCol\", SymbolCol); setValue(\"BGLNodeListText\", \"backCol\", SymbolCol); setValue(\"storageNodeListText\", \"backCol\", SymbolCol); + setValue(\"processTypeText\", \"backCol\", SymbolCol); + setValue(\"processSubtypeText\", \"backCol\", SymbolCol); + setValue(\"strategyText\", \"backCol\", SymbolCol); setValue(\"runStateText\", \"backCol\", SymbolCol); } @@ -244,7 +259,7 @@ LANG:1 14 Antenna Array: 14 2 "antennaArrayText" "" -1 102 72 E E E 1 E 1 E N "_WindowText" E N "_Window" E E +1 114.449594438007 72 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 5 0 0 0 0 0 E E E @@ -255,7 +270,7 @@ LANG:1 0 0 1 LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 -0 117 128 984 149 +0 117 128 352 149 2 "0s" 0 0 0 0 0 -1 E E E 25 3 "beamTable" @@ -356,7 +371,7 @@ LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 2 6 "PRIMITIVE_TEXT11" "" -1 395 64 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E +1 396 40 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E E E 13 0 0 0 0 0 E E E @@ -366,8 +381,8 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 395 66 456 79 -0 2 2 "0s" 0 0 0 192 0 0 395 66 1 +E E 0 1 1 2 1 E U 1 E 396 42 457 55 +0 2 2 "0s" 0 0 0 192 0 0 396 42 1 1 LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 0 1 @@ -375,7 +390,7 @@ LANG:1 10 Stop Time: 14 7 "stopTimeText" "" -1 469 64 E E E 1 E 1 E N "_WindowText" E N "_Window" E E +1 470 40 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 15 0 0 0 0 0 E E E @@ -386,7 +401,7 @@ LANG:1 0 0 1 LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 -0 467 62 701 83 +0 468 38 702 59 2 "0s" 0 0 0 0 0 -1 E E E 2 8 "PRIMITIVE_TEXT12" @@ -426,7 +441,7 @@ LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 2 10 "PRIMITIVE_TEXT13" "" -1 369 86 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E +1 370 62 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E E E 21 0 0 0 0 0 E E E @@ -436,8 +451,8 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 369 88 457 101 -0 2 2 "0s" 0 0 0 192 0 0 369 88 1 +E E 0 1 1 2 1 E U 1 E 370 64 458 77 +0 2 2 "0s" 0 0 0 192 0 0 370 64 1 1 LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 0 1 @@ -445,7 +460,7 @@ LANG:1 15 Prepare Period: 14 11 "preparePeriodText" "" -1 469 86 E E E 1 E 1 E N "_WindowText" E N "_Window" E E +1 470 62 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 23 0 0 0 0 0 E E E @@ -456,7 +471,7 @@ LANG:1 0 0 1 LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 -0 467 84 701 105 +0 468 60 702 81 2 "0s" 0 0 0 0 0 -1 E E E 2 12 "PRIMITIVE_TEXT14" @@ -496,7 +511,7 @@ LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 2 14 "PRIMITIVE_TEXT15" "" -1 751 108 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E +1 711 64 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E E E 29 0 0 0 0 0 E E E @@ -506,8 +521,8 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 751 110 826 123 -0 2 2 "0s" 0 0 0 192 0 0 751 110 1 +E E 0 1 1 2 1 E U 1 E 711 66 786 79 +0 2 2 "0s" 0 0 0 192 0 0 711 66 1 1 LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 0 1 @@ -515,7 +530,7 @@ LANG:1 12 NyquistZone: 14 15 "nyquistzoneText" "" -1 836.7391304347826 110 E E E 1 E 1 E N "_WindowText" E N "_Window" E E +1 798.7391304347826 64 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 31 0 0 0 0 0 E E E @@ -526,12 +541,12 @@ LANG:1 0 0 1 LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 -0 835 106 869 127 +0 797 60 831 81 2 "0s" 0 0 0 0 0 -1 E E E 2 16 "PRIMITIVE_TEXT16" "" -1 -3791.477835200918 -1240 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E +1 -7378.867681650218 -1812 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E E E 33 0 0 0 0 0 E E E @@ -541,7 +556,7 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1.263157894736842 0 1 -588.3684210526316 -262 1 E 752 372 829 385 +E E 0 1 1 2 1 E 1.263157894736842 0 1 -587.3684210526316 -286 1 E 752 372 829 385 0 2 2 "0s" 0 0 0 192 0 0 752 372 1 1 LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 @@ -550,7 +565,7 @@ LANG:1 12 SampleClock: 14 17 "sampleClockText" "" -1 468.9999999999999 106 E E E 1 E 1 E N "_WindowText" E N "_Window" E E +1 469.9999999999999 82 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 35 0 0 0 0 0 E E E @@ -561,7 +576,7 @@ LANG:1 0 0 1 LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 -0 467 106 701 127 +0 468 82 702 103 2 "0s" 0 0 0 0 0 -1 E E E 2 18 "PRIMITIVE_TEXT17" @@ -795,7 +810,7 @@ LANG:1 12 Observation: 13 31 "Abort_Observation" "" -1 6 490 E E E 0 E 0 E N "_ButtonText" E N "_Button" E E +1 10 710 E E E 0 E 0 E N "_ButtonText" E N "_Button" E E E E 61 0 0 0 0 0 E E E @@ -806,7 +821,7 @@ LANG:1 0 0 1 LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 -0 4 488 128 514 +0 8 708 132 734 T 1 @@ -838,7 +853,7 @@ dyn_errClass err; 2 32 "PRIMITIVE_TEXT23" "" -1 710 64 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E +1 711 40 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E E E 63 0 0 0 0 0 E E E @@ -848,8 +863,8 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 710 66 762 79 -0 2 2 "0s" 0 0 0 192 0 0 710 66 1 +E E 0 1 1 2 1 E U 1 E 711 42 763 55 +0 2 2 "0s" 0 0 0 192 0 0 711 42 1 1 LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 0 1 @@ -857,7 +872,7 @@ LANG:1 9 runState: 14 33 "runStateText" "" -1 786 64 E E E 1 E 1 E N "_WindowText" E N "_Window" E E +1 799 40 E E E 1 E 1 E N "_WindowText" E N "_Window" E E E E 65 0 0 0 0 0 E E E @@ -868,7 +883,112 @@ LANG:1 0 0 1 LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 -0 784 62 982 83 +0 797 38 981 59 +2 "0s" 0 0 0 0 0 -1 E E E +2 34 +"PRIMITIVE_TEXT24" +"" +1 712 106 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +66 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 1 E 712 108 763 121 +0 2 2 "0s" 0 0 0 192 0 0 712 108 1 +1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 +LANG:1 9 Strategy: +14 35 +"strategyText" +"" +1 798.4173913043478 108 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +67 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +0 +1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 798 104 984 125 +2 "0s" 0 0 0 0 0 -1 E E E +2 36 +"PRIMITIVE_TEXT25" +"" +1 -7378.867681650218 -1768 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +68 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1.263157894736842 0 1 -587.3684210526316 -264 1 E 752 372 828 385 +0 2 2 "0s" 0 0 0 192 0 0 752 372 1 +1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 +LANG:1 12 processType: +14 37 +"processTypeText" +"" +1 469.9999999999999 104 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +69 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +0 +1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 468 104 702 125 +2 "0s" 0 0 0 0 0 -1 E E E +2 40 +"PRIMITIVE_TEXT27" +"" +1 -7378.867681650218 -1720 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +72 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1.263157894736842 0 1 -587.3684210526316 -240 1 E 752 372 846 385 +0 2 2 "0s" 0 0 0 192 0 0 752 372 1 +1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 +LANG:1 15 processSubtype: +14 41 +"processSubtypeText" +"" +1 489.9999999999999 128 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +73 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +0 +1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 488 128 702 149 2 "0s" 0 0 0 0 0 -1 E E E 0 LAYER, 1 @@ -899,4 +1019,4 @@ LAYER, 7 1 LANG:1 0 0 -0 \ No newline at end of file +0 diff --git a/MAC/Navigator2/panels/Processes/BGPAppl.pnl b/MAC/Navigator2/panels/Processes/BGPAppl.pnl index ac44aa055af..cc2979f753b 100644 --- a/MAC/Navigator2/panels/Processes/BGPAppl.pnl +++ b/MAC/Navigator2/panels/Processes/BGPAppl.pnl @@ -12,24 +12,28 @@ PANEL,-1 -1 1013 750 N "_3DFace" 0 - // determine if we have an observation name in the DP, if so strip it and get the real name to be included in the toplabel + // determine if we have an observation name in the DP, if so strip it and get the real name to be included in the toplabel string bareDP=dpSubStr(baseDP,DPSUB_DP); - + // The BGPappl belonging by an observation contains : + // ioNodeList (all IoNodes involved, each ionode is connected to a station, obtainable via ionode#.usedStation) + // and all of the next lists are contained per ionode in a [,,,] list + // locusNodeList [x,x,x] list all used locusNodes per ionode + // adderList [x,x,x] adders per ionode + // writerList [x,x,x] writers per ionode + // dataProductList [x,x,x] dataproducts per ionode + // dataProductTypeList [x,x,x] dataproductTypes per ionode + // check if the requiered datapoint for this view are enabled and accessible if (dpExists(baseDP + \".ioNodeList\")) { if (dpConnect(\"updateBGPAppl\", baseDP + \".ioNodeList\", - baseDP + \".locusNodeList\", baseDP + \".adderList\", - baseDP + \".writerList\", - baseDP + \".dataProductList\", - baseDP + \".dataProductTypeList\", baseDP + \".ioNodeList:_online.._invalid\") == -1) { LOG_ERROR(\"BGPAppl.pnl:main|Couldn'tconnect to: \"+baseDP); } if (!navFunct_dpReachable(baseDP)) { - updateBGPAppl(\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",\"\",true); + updateBGPAppl(\"\",makeDynString(\"\"),\"\",makeDynString(\"\"),true); } } else { LOG_ERROR(\"BGPAppl.pnl:main|Couldn't find DP to connect to: \"+baseDP); @@ -39,13 +43,9 @@ PANEL,-1 -1 1013 750 N "_3DFace" 0 reload(); } -updateBGPAppl(string dp1,dyn_int ionodeList, - string dp2,dyn_string locusNodeList, - string dp3,dyn_string adderList, - string dp4,dyn_string writerList, - string dp5,dyn_string dataProductList, - string dp6,dyn_string dataProductTypeList, - string dp7, bool invalid) +updateBGPAppl(string dp1,dyn_string ioNodeList, + string dp2,dyn_string adderList, + string dp3, bool invalid) { LOG_TRACE(\"BGPAppl.pnl:updateBGPAppl|entered\"); string SymbolCol=\"_Window\"; @@ -55,25 +55,23 @@ updateBGPAppl(string dp1,dyn_int ionodeList, SymbolCol=\"Lofar_dpOffline\"; } } - - + dyn_string stations; + // clear stationtable stationTable.deleteAllLines(); - dynClear(stationList); - - // loop over nr of stations to fill table - for (int i = 1; i <= dynlen(ionodeList); i++) { - - // update stations based inputbuffers and adders - stationTable.appendLine(\"ioNode\",ionodeList[i], - \"adders\",adderList[i], - \"writers\",writerList[i], - \"locusNodes\",locusNodeList[i], - \"dataProducts\",dataProductList[i], - \"type\",dataProductTypeList[i]); + // loop over nr of ionodes to fill table + for (int i = 1; i <= dynlen(ioNodeList); i++) { + string station; + + dpGet(navFunct_IONode2DPName(ioNodeList[i])+\".usedStation\",station); + dynAppend(stations,station); + // update stationTable + stationTable.appendLine(\"Station\",station,\"IONode\",ioNodeList[i],\"Adders\",adderList[i]); } + stationList = stations; + nodeList = ioNodeList; // set the observation selectable items prepareProcesses(); @@ -88,7 +86,7 @@ void prepareProcesses() { dynAppend(g_processesList,baseDP); // append all involved stations for (int i=1; i <= dynlen(stationList); i++) { - dynAppend(result,baseDP+\",BGLProc->\"+stationList[i]+\",\"+baseDP+\"_BGPProc#\"+stationList[i]); + dynAppend(result,baseDP+\",BGLProc->\"+stationList[i]+\",\"+baseDP+\"_BGPProc#\"+nodeList[i]); } dynAppend(g_processesList,baseDP+\"_BGPProc\"); @@ -153,7 +151,39 @@ string baseDP=\"\"; string database=\"\"; string observation=\"\"; string observationName = \"\"; -dyn_string stationList; +dyn_string stationList=\"\"; +dyn_string nodeList=\"\"; +bool bDoubleClicked = false; + +// routine for single mouse click +void click(int row) { + // set delay in case double click was meant + delay(0, 100); + if (!bDoubleClicked) { + string station = stationTable.cellValueRC(row,\"Station\"); + navPanel_setEvent(station,\"EventClick\"); + } +} + +// routine for double mouse click +void dblClick(int row) { + // indicate this is a doubleClick + bDoubleClicked = true; + + string IONode = stationTable.cellValueRC(row,\"IONode\"); + if (IONode != \"\") { + string selection = baseDP+\"_BGPProc#\"+IONode; + navPanel_setEvent(selection,\"ChangePanel\"); + } + // set delay to avoid click event will be triggered + delay(0, 500); + bDoubleClicked = false; +} + +// routine for right mouse click +void rClick(int row) { + navPanel_setEvent(\"BGPAppl\",\"EventRightClick\"); +} " 0 2 "CBRef" "1" @@ -200,8 +230,16 @@ LANG:1 0 25 42 "stationTable" "" -1 20 320 E E E 1 E 1 E N "_WindowText" E N "_Window" E E - E E +1 30 360 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + "main(int row, string column) +{ + rClick(row); +}" 0 + "main(int row, string column) +{ + dblClick(row); +}" 0 + 12 0 0 0 0 0 E E E 0 @@ -211,48 +249,57 @@ LANG:1 0 0 1 LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 -0 18 318 1002 622 -EE 1 0 1 6 0 "ioNode" 4 1 0 "s" 1 -LANG:1 6 ioNode -E -1 -LANG:1 0 - -45 "adders" 10 1 0 "s" 1 -LANG:1 6 adders -E -1 -LANG:1 0 - -100 "writers" 10 1 0 "s" 1 -LANG:1 7 writers -E -1 -LANG:1 0 +0 28 358 422 712 +"main() +{ + stationTable.tableMode(TABLE_SELECT_BROWSE); + + // connect for highlight mechanism + dpConnect( \"bgpapplCallback\",true,DPNAME_NAVIGATOR + g_navigatorID +\".objectTrigger\" ); +} -100 "locusNodes" 27 1 0 "s" 1 -LANG:1 10 locusNodes +void bgpapplCallback(string dp1, bool aTrig) { + + LOG_DEBUG(\"Observation_small.pnl:bgpapplCallback|ObjectTrigger Callback on: \"+dp1+\" trigger: \"+aTrig); + LOG_DEBUG(\"Observation_small.pnl:bgpapplCallback|Found highlight : \" + highlight + \" BGPAppl\"); + int lineNr=-1; + for (int i=0; i< stationTable.lineCount(); i++) { + stationTable.currentCell(i,0); + if (dynContains(highlight,stationTable.cellValueRC(i,\"Station\"))) { + stationTable.cellBackCol(\"Lofar_highLight\"); + lineNr=i; + } else { + stationTable.cellBackCol(\"white\"); + } + } +}" 0 +"main(int row, string column, string value) +{ + click(row); +}" 0 + 1 0 1 3 0 "Station" 10 1 0 "s" 1 +LANG:1 7 Station E 1 LANG:1 0 -255 "dataProducts" 33 1 0 "s" 1 -LANG:1 12 dataProducts +100 "IONode" 7 1 0 "[2d,False,False,ALIGNMENT_BEGINNING,False]" 1 +LANG:1 6 IONode E 1 LANG:1 0 -305 "type" 10 1 0 "s" 1 -LANG:1 4 type +75 "Adders" 21 1 0 "s" 1 +LANG:1 6 Adders E 1 LANG:1 0 -98 +200 14 14 10 10 1 LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 -0 0 1 1 1 7 +0 0 1 0 1 7 1 0 0 LAYER, 1 diff --git a/MAC/Navigator2/panels/Processes/BGPProc.pnl b/MAC/Navigator2/panels/Processes/BGPProc.pnl new file mode 100644 index 00000000000..3b6239a7018 --- /dev/null +++ b/MAC/Navigator2/panels/Processes/BGPProc.pnl @@ -0,0 +1,928 @@ +V 11 +1 +LANG:1 7 Station +PANEL,-1 -1 1020 698 N "_3DFace" 0 +"main() +{ + // Initialise the Panel + navPanel_initPanel(\"fw_viewBox\"); + strModuleName = myModuleName(); + baseDP = g_currentDatapoint; + + if(dpExists(sysName+\"LOFAR_PIC_BGP.BGPSwitch\")) { + dpConnect(\"switchBGP\", sysName+\"LOFAR_PIC_BGP.BGPSwitch:_online.._value\", + sysName+\"LOFAR_PIC_BGP.BGPSwitch:_online.._invalid\"); + if (!navFunct_dpReachable(sysName+\"LOFAR_PIC_BGP.BGPSwitch\")) { + controlBGP(\"\",false,\"\",true); + } + } +} + +void switchBGP(string dp1, bool bgpswitch, + string dp2, bool invalid) { + + if (!invalid) { + reload(); + } +} + +void prepareProcesses() { + dyn_string result; + // here we need to add the Inputbuffer, adders and the writers that are part of this screen + // so we need to determine all the databasePoints for these processes + + inputBufferDP = sysName+\"LOFAR_PermSW_PSIONode\"+navFunct_formatInt(ioNode,99)+\"_InputBuffer\"; + adderDP = sysName+\"LOFAR_ObsSW_OSIONode\"+navFunct_formatInt(ioNode,99)+\"_Adder\"; + dynAppend(result,\",InputBuffer,\"+inputBufferDP); + dynAppend(g_processesList,inputBufferDP); + dynClear(writers); + dynClear(locusNodes); + for (int i = 1; i <= dynlen(adders); i++ ) { + dynAppend(result,\",Adder\"+adders[i]+\",\"+adderDP+adders[i]); + dynAppend(g_processesList,adderDP+adders[i]); + int l; + int w; + bool invalid=true; + if (dpGet(adderDP+adders[i]+\".locusNode\",l,adderDP+adders[i]+\".locusNode:_online.._invalid\",invalid) >= 0) { + if (!invalid) dynAppend(locusNodes,l); + } + if (dpGet(adderDP+adders[i]+\".writer\",w,adderDP+adders[i]+\".writer:_online.._invalid\",invalid) >= 0) { + if (!invalid) dynAppend(writers,w); + } + } + for (int i = 1; i <= dynlen(writers); i++ ) { + string writerDP=sysName+\"LOFAR_ObsSW_OSLocusNode\"+navFunct_formatInt(locusNodes[i],999)+\"_Writer\"+navFunct_formatInt(writers[i],99); + dynAppend(result,\",Writer\"+navFunct_formatInt(writers[i],99)+\",\"+writerDP); + dynAppend(g_processesList,writerDP); + } + + + // write result to the db so various panels can reset themselves + dpSet(DPNAME_NAVIGATOR + g_navigatorID + \".processesList\",result); + + LOG_DEBUG(\"BGPProc.pnl:prepareProcesses|processList found: \"+ result); + +} + +// +// Callback for dpConnect to action point. +// If there is an action required this point will tell so +// +void doAction(string aDP, string anAction) { + LOG_DEBUG(\"BGPProcr.pnl:doAction| Action required. found: \" + anAction); + // split action into essentials + dyn_string actionString; + if (!navFunct_splitAction(anAction,actionString)) { + return; + } + + LOG_DEBUG(\"BGPProc.pnl:doAction|found actionString: \" + actionString); + + // Reload + if (actionString[1] == \"Reload\") { + reload(); + } +} + +void reload() { + + string var = \"\"; + // get the saved panelparams for this panel + if (dpExists(DPNAME_NAVIGATOR + g_navigatorID + \".panelParamList\")) { + dpGet(DPNAME_NAVIGATOR + g_navigatorID + \".panelParamList\",var); + // empty the paramList + dpSet(DPNAME_NAVIGATOR + g_navigatorID + \".panelParamList\",\"\"); + } else { + LOG_WARN(\"BGPProc.pnl:main| Error: no dp \" + DPNAME_NAVIGATOR + g_navigatorID+\".panelParamList\"); + } + + // get BGLAppl path to obtain the lists + BGLApplDP = navFunct_getPathLessOne(baseDP); + + // if var is empty something went wrong (maybe back and fort between other panel, so the panelParamlist was emptied) + // in that case we jump back to the prior screen + + if (var == \"\" && ioNode == -1) { + g_currentDatapoint = BGLApplDP; + navPanel_setEvent(\"BGPProc\",\"ChangePanel\"); + } + + if (ioNode == -1) { + ioNode = (int)var; + } + + + + + if ( dpExists(BGLApplDP+\".ioNodeList\") ) { + dpGet(BGLApplDP+\".ioNodeList\",ioNodeList); + } else { + LOG_ERROR(\"BGPProc.pnl:main|Error getting ioNodeList value\"); + } + + if ( dpExists(BGLApplDP+\".adderList\") ) { + dpGet(BGLApplDP+\".adderList\",adderList); + } else { + LOG_ERROR(\"BGPProc.pnl:main|Error getting adderList value\"); + } + LOG_DEBUG(\"BGPProc.pnl:main|selected ioNode: \"+ioNode); + LOG_DEBUG(\"BGPProc.pnl:main|ioNodeList: \"+ioNodeList); + LOG_DEBUG(\"BGPProc.pnl:main|adderList: \"+adderList); + + + // get position of ioNode in dynArray to see what writers and adders belong to this screen + int idx = dynContains(ioNodeList,ioNode); + if (idx > 0) { + adders=navFunct_listToDynString(adderList[idx]); + } else { + LOG_ERROR(\"BGPProc.pnl:main|ERROR: ionode not in ioNodeList !!!\"); + } + LOG_DEBUG(\"BGPProc.pnl:main|adders: \"+adders); + + // In the database we can find the IONode involved + nodeDP = navFunct_IONode2DPName(ioNode); + string nodeName = navFunct_DPName2CEPName(nodeDP); + + LOG_DEBUG(\"BGPProc.pnl:main|nodeName working: \"+nodeName); + + redraw(); + + // if no match found we have an error + if (nodeName == \"\" ) { + LOG_ERROR(\"BGPProc.pnl:main| ERROR no IONode-name found, can't view running processes\"); + } else { + + // we have to set the stripped inputBuffer List and Adder List here. + // Since this is the Survey mode we only need one InputBuffer and one Adder + dpSet(DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.objectName\",\"CircularBuffer\", + DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.paramList\",makeDynString(ioNode)); + + + + setValue(\"ionodeLabel\",\"text\",\"IONode: \"+nodeName); + setValue(\"ionodeLabel\",\"toolTipText\",nodeDP); + + } + // pass baseDP to selfstate Object to work with + setValue(\"selfState.light\",\"toolTipText\",baseDP); + + // connect for selfUpdates + showSelfState(baseDP); + + + navFunct_clearGlobalLists(); + + // set the hardware selectable items for this screen + prepareProcesses(); + + // set panel to ready + g_objectReady=true; + + // trigger that the panel values are calculated and ready + navPanel_setEvent(\"BGPProc.pnl\",\"Update\"); + +} + + " 0 + E E E E 1 -1 -1 0 0 0 +""0 1 +E "#uses \"navPanel.ctl\" +string baseDP = \"\"; +string BGLApplDP = \"\"; + +int ioNode = -1; +string nodeDP=\"\"; +string inputBufferDP=\"\"; +string adderDP=\"\"; + +dyn_string ioNodeList; +dyn_string adderList; + +dyn_string adders=\"\"; +dyn_string writers=\"\"; +dyn_string locusNodes=\"\"; + +dyn_string refNames; +string strModuleName; +bool bDoubleClicked = false; + +// routine for single mouse click +void click(string dp) { + // set delay in case double click was meant + delay(0, 100); + if (!bDoubleClicked) { + navPanel_setEvent(\"BGPProc.pnl\",\"EventClick\"); + } +} + +// routine for double mouse click +void dblClick(string dp) { + // indicate this is a doubleClick + bDoubleClicked = true; + + if (dpExists(dp) ) { + LOG_DEBUG(\"BGPProc.pnl:DoubleClick|Setting currentDatapoint from : \"+g_currentDatapoint+\" to \"+dp); + g_currentDatapoint=dp; + navPanel_setEvent(\"BGPProc.pnl\",\"ChangePanel\"); + } + // set delay to avoid click event will be triggered + delay(0, 500); + bDoubleClicked = false; +} + +// routine for right mouse click +void rClick(string dp) { + navPanel_setEvent(\"BGPProc.pnl\",\"EventRightClick\"); +} +void clearRefNames() { + // remove all symbols because new ones will be added + for (int i=1; i <= dynlen(refNames); i++) { + removeSymbol(strModuleName,\"\",refNames[i]); + } + dynClear(refNames); +} + + +void redraw() { + LOG_TRACE(\"BGPProc.pnl:redraw\"); + string addPanelName = \"objects/Processes/adder.pnl\"; + + // clear old refNames if available + if (dynlen(refNames) > 0) { + clearRefNames(); + } + + // now start adding adders to panel + int ref = 1; + for (int i = 1; i <= dynlen(adders); i++ ) { + LOG_TRACE(\"BGPProc.pnl:redraw|Adding adder: \" + adders[i]); + refNames[ref]=\"adder\"+(ref); + + if ( addSymbol( strModuleName, // Stay in this modul + \"\", // Name of this panel + addPanelName, // Panel to add + refNames[ref], // Ref of the addedPanel + makeDynString( \"$adderNumber:\" + adders[i] , // Define all $values + \"$nodeDP:\" + nodeDP), // + -17, // Xpos of the AddedSymbol + 350+((i-1)*30), // Ypos of the AddedSymbol + 0, // angle + 1 ,1 // zoomX , zoomY + ) < 0 ) { + LOG_ERROR(\"BGPProc.pnl:redraw|Error Appending adder : \" + i + \" in this panel.\"); + } + ref++; + } +} +" 0 + 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 273 +"ionode_highLight" +"" +1 240 10 E E E 1 E 0 E N "_Transparent" E N "Lofar_highLight" E E + "main() +{ + rClick(nodeDP); +}" 0 + "main() +{ + dblClick(nodeDP); +}" 0 + +48 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +"main() +{ + dpConnect( \"ionodeCallback\",true,DPNAME_NAVIGATOR + g_navigatorID +\".objectTrigger\" ); +} + +void ionodeCallback(string dp1, bool aTrig) { + + LOG_DEBUG(\"BGPProc.pnl:ionodeCallback|ObjectTrigger Callback on: \"+dp1+\" trigger: \"+aTrig); + LOG_DEBUG(\"BGPProc.pnl:ionodeCallback|Found highlight : \" + highlight + \" Looking for ionode: \"+nodeDP); + bool bHighlight=false; + if (dynContains(highlight,nodeDP)) { + bHighlight=true; + } + LOG_DEBUG(\"BGPProc.pnl:ionodeCallback|Highlight request: \"+bHighlight); + ionode_highLight.visible = bHighlight; + +} + +" 0 + "main() +{ + click(nodeDP); +}" 0 + 0 1 1 2 1 E 1 0 1 144 -228 1 E 30 230 251 264 +6 0 +"RECTANGLE1" +"" +1 40 110 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E + E E +3 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1.048387096774194 0 0.5609756097560976 68.06451612903223 -21.70731707317073 1 E 40 110 660 520 +6 1 +"RECTANGLE2" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +4 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 50 -208 1 E 740 230 789 279 +2 2 +"PRIMITIVE_TEXT1" +"" +1 864 2 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +5 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 1 E 864 2 949 15 +0 2 2 "0s" 0 0 0 192 0 0 864 2 1 +1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 +LANG:1 12 ComputeNodes +2 3 +"ionodeLabel" +"" +1 180 10 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(nodeDP); +}" 0 + "main() +{ + dblClick(nodeDP); +}" 0 + +6 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main() +{ + click(nodeDP); +}" 0 + 0 1 1 2 1 E U 1 E 180 10 387 30 +0 2 2 "0s" 0 0 0 192 0 0 180 10 1 +1 +LANG:1 33 MS Shell Dlg,-1,16,5,75,0,0,0,0,0 +0 1 +LANG:1 22 IONode: R00-M0-N00-J00 +6 5 +"RECTANGLE19" +"" +1 150 40 E E E 1 E 1 E N "_Transparent" E N "_Transparent" E E + E E +8 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 180 90 2 1 0 "pictures/arrowRight.gif" 4294967295 E 570 30 619 79 +6 6 +"RECTANGLE20" +"" +1 150 40 E E E 1 E 1 E N "_Transparent" E N "_Transparent" E E + E E +9 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +2 +"dashclr"N "_Transparent" +"rotatefill" "r" +E E 0 1 1 2 1 E -0.01886456694761347 -0.9998220482235222 0.9998220482235222 -0.01886456694761347 770.758141713434 840.464504495836 2 1 0 "pictures/arrowLeft.gif" 4294967295 E 570 30 619 79 +1 274 0 "" 1 +0 +6 9 +"RECTANGLE23" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +11 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 100 -208 1 E 740 230 789 279 +6 10 +"RECTANGLE24" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +12 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 150 -208 1 E 740 230 789 279 +6 11 +"RECTANGLE25" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +13 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 200 -208 1 E 740 230 789 279 +6 12 +"RECTANGLE26" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +14 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 50 -158 1 E 740 230 789 279 +6 13 +"RECTANGLE27" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +15 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 100 -158 1 E 740 230 789 279 +6 14 +"RECTANGLE28" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +16 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 150 -158 1 E 740 230 789 279 +6 15 +"RECTANGLE29" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +17 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 200 -158 1 E 740 230 789 279 +6 16 +"RECTANGLE30" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +18 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 50 -108 1 E 740 230 789 279 +6 17 +"RECTANGLE31" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +19 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 100 -108 1 E 740 230 789 279 +6 18 +"RECTANGLE32" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +20 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 150 -108 1 E 740 230 789 279 +6 19 +"RECTANGLE33" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +21 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 200 -108 1 E 740 230 789 279 +6 20 +"RECTANGLE34" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +22 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 50 -58 1 E 740 230 789 279 +6 21 +"RECTANGLE35" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +23 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 100 -58 1 E 740 230 789 279 +6 22 +"RECTANGLE36" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +24 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 150 -58 1 E 740 230 789 279 +6 23 +"RECTANGLE37" +"" +1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E + E E +25 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 200 -58 1 E 740 230 789 279 +1 275 1 "" 285 +0 +1 276 1 "" 226 +0 +1 277 1 "" 229 +0 +1 278 1 "" 234 +0 +1 279 1 "" 235 +0 +1 280 1 "" 236 +0 +1 281 1 "" 237 +0 +1 282 1 "" 238 +0 +1 283 1 "" 239 +0 +1 284 1 "" 240 +0 +1 285 1 "" 241 +0 +1 286 1 "" 242 +0 +1 287 1 "" 243 +0 +1 288 1 "" 244 +0 +1 289 1 "" 245 +0 +1 290 1 "" 246 +0 +1 291 1 "" 247 +0 +1 292 1 "51" 1 +0 +1 293 1 "" 249 +0 +1 294 1 "" 250 +0 +1 295 1 "" 251 +0 +1 296 1 "" 252 +0 +1 297 1 "" 253 +0 +1 298 1 "" 254 +0 +1 299 1 "" 255 +0 +1 300 1 "" 261 +0 +1 301 1 "" 262 +0 +1 302 1 "" 263 +0 +1 303 1 "" 264 +0 +1 304 1 "" 265 +0 +1 305 1 "" 279 +0 +1 306 1 "" 280 +0 +1 307 1 "" 281 +0 +1 308 1 "" 282 +0 +1 309 1 "" 283 +0 +1 310 1 "" 290 +0 +1 311 1 "" 291 +0 +1 312 1 "" 292 +0 +6 112 +"RECTANGLE38" +"" +1 40 110 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E + E E +29 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1.451612903225807 0 1 41.93548387096772 160 1 E 40 110 660 520 +2 156 +"PRIMITIVE_TEXT19" +"" +1 105 350.0000000000001 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +30 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 105 350.0000000000001 117 363 +0 2 2 "0s" 0 0 0 192 0 0 105 350.0000000000001 1 +1 +LANG:1 34 MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 2 Nr +2 157 +"PRIMITIVE_TEXT20" +"" +1 120 350.0000000000001 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +31 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 120 350.0000000000001 144 363 +0 2 2 "0s" 0 0 0 192 0 0 120 350.0000000000001 1 +1 +LANG:1 34 MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 4 Stat +2 158 +"PRIMITIVE_TEXT21" +"" +1 150 350.0000000000001 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +32 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 150 350.0000000000001 177 363 +0 2 2 "0s" 0 0 0 192 0 0 150 350.0000000000001 1 +1 +LANG:1 34 MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 4 Drop +2 159 +"PRIMITIVE_TEXT22" +"" +1 200 350.0000000000001 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +33 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 200 350.0000000000001 248 363 +0 2 2 "0s" 0 0 0 192 0 0 200 350.0000000000001 1 +1 +LANG:1 34 MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 7 Dropped +2 160 +"PRIMITIVE_TEXT23" +"" +1 308 350.0000000000001 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +34 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 308 350.0000000000001 336 363 +0 2 2 "0s" 0 0 0 192 0 0 308 350.0000000000001 1 +1 +LANG:1 34 MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 5 Error +2 161 +"PRIMITIVE_TEXT24" +"" +1 430 350.0000000000001 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +35 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 430 350.0000000000001 509 363 +0 2 2 "0s" 0 0 0 192 0 0 430 350.0000000000001 1 +1 +LANG:1 34 MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 13 CurrentAction +2 162 +"PRIMITIVE_TEXT25" +"" +1 560 350.0000000000001 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +36 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 560 350.0000000000001 627 363 +0 2 2 "0s" 0 0 0 192 0 0 560 350.0000000000001 1 +1 +LANG:1 34 MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 10 logMessage +2 235 +"PRIMITIVE_TEXT26" +"" +1 110 310 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +46 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 110 310 162 326 +0 2 2 "0s" 0 0 0 192 0 0 110 310 1 +1 +LANG:1 35 MS Shell Dlg 2,10,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 7 Adders: +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 +3 0 "selfState" -1 +"objects\\lofar_self_state.pnl" 678 158 T 0 1 0 1 -540 -150 +0 +3 1 "PANEL_REF53" -1 +"objects\\Processes\\circularBuffer.pnl" 90 160 T 1 1 0 1 -100 -110 +0 +0 diff --git a/MAC/Navigator2/panels/Processes/BGPProc_mainloader.pnl b/MAC/Navigator2/panels/Processes/BGPProc_mainloader.pnl deleted file mode 100644 index 11ecf5e8b16..00000000000 --- a/MAC/Navigator2/panels/Processes/BGPProc_mainloader.pnl +++ /dev/null @@ -1,169 +0,0 @@ -V 10 -1 -LANG:1 7 Station -PANEL,-1 -1 980 746 N "_3DFace" 0 -"main() -{ - // Initialise the Panel - navPanel_initPanel(\"fw_viewBox\"); - - baseDP = g_currentDatapoint; - string strModuleName = myModuleName(); - string addPanelName = \"\"; - dyn_string addPanelValues = makeDynString(); - - // get the saved panelparams for this panel - string var=\"\"; - if (dpExists(DPNAME_NAVIGATOR + g_navigatorID + \".panelParamList\")) { - dpGet(DPNAME_NAVIGATOR + g_navigatorID + \".panelParamList\",var); - // empty the paramList - dpSet(DPNAME_NAVIGATOR + g_navigatorID + \".panelParamList\",\"\"); - } else { - LOG_WARN(\"navCtrl.ctl:navCtrl_handleLocatorEvent| Error: no dp \" + DPNAME_NAVIGATOR + g_navigatorID+\".panelParamList\"); - } - - // get BGLAppl path to obtain the inputbufferList and the outputbufferList - BGLApplDP = navFunct_getPathLessOne(baseDP); - - dyn_string stationList; - dyn_string inputBufferList; - dyn_string adderList; - - - if ( dpExists(BGLApplDP+\".inputBufferList\") ) { - dpGet(BGLApplDP+\".inputBufferList\",inputBufferList); - } else { - LOG_ERROR(\"BGPProc_mainloader.pnl:main|Error getting inputBufferList value\"); - } - - if ( dpExists(BGLApplDP+\".adderList\") ) { - dpGet(BGLApplDP+\".adderList\",adderList); - } else { - LOG_ERROR(\"BGPProc_mainloader.pnl:main|Error getting adderList value\"); - } - - if ( dpExists(BGLApplDP+\".stationList\") ) { - dpGet(BGLApplDP+\".stationList\",stationList); - } else { - LOG_ERROR(\"BGPProc_mainloader.pnl:main|Error getting stationList value\"); - } - - addPanelName=\"objects/Processes/BGPProc.pnl\"; - dynClear(addPanelValues); - dynAppend(addPanelValues,\"$stationList:\"+stationList); - dynAppend(addPanelValues,\"$inputBufferList:\"+inputBufferList); - dynAppend(addPanelValues,\"$adderList:\"+adderList); - dynAppend(addPanelValues,\"$station:\"+var); - - if ( addSymbol( strModuleName, // Stay in this module - \"\", // Name of this panel - addPanelName, // Panel to add - \"BGPProc\", // Ref of the addedPanel - addPanelValues, // Define all $values of particular addedpanel - 0, // Xpos of the AddedSymbol - 0, // Ypos of the AddedSymbol - 0, // angle - 1, // zoomX, - 1 // zoomY - ) < 0 ) { - LOG_ERROR(\"BGPProc_mainloader.pnl:main|Error Appending \"+addPanelName +\" : \" + getLastError()); - } - - reload(); - -} - -void prepareProcesses() { - dyn_string result; - - dynAppend(result,\",BGPProc,\"+baseDP); - dynAppend(g_processesList,baseDP); - - - // write result to the db so various panels can reset themselves - dpSet(DPNAME_NAVIGATOR + g_navigatorID + \".processesList\",result); - - LOG_DEBUG(\"BGPProc_mainloader.pnl:prepareProcesses|processList found: \"+ result); - -} - -// -// Callback for dpConnect to action point. -// If there is an action required this point will tell so -// -void doAction(string aDP, string anAction) { - LOG_DEBUG(\"BGPProc_mainloader.pnl:doAction| Action required. found: \" + anAction); - // split action into essentials - dyn_string actionString; - if (!navFunct_splitAction(anAction,actionString)) { - return; - } - - LOG_DEBUG(\"BGPProc_mainloader.pnl:doAction|found actionString: \" + actionString); - - // Reload - if (actionString[1] == \"Reload\") { - reload(); - } -} - -void reload() { - - navFunct_clearGlobalLists(); - - // set the hardware selectable items for this screen - prepareProcesses(); - - // set panel to ready - g_objectReady=true; - - // trigger that the panel values are calculated and ready - navPanel_setEvent(\"BGPProc_mainloader.pnl\",\"Update\"); - -} - - " 0 - E E E E 1 -1 -1 0 0 0 -""0 1 -E "#uses \"navPanel.ctl\" -string baseDP = \"\"; -string BGLApplDP = \"\";" 0 - 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 -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 diff --git a/MAC/Navigator2/panels/Processes/CEP_IONodeProcesses.pnl b/MAC/Navigator2/panels/Processes/CEP_IONodeProcesses.pnl new file mode 100644 index 00000000000..8a6864685f9 --- /dev/null +++ b/MAC/Navigator2/panels/Processes/CEP_IONodeProcesses.pnl @@ -0,0 +1,408 @@ +V 11 +1 +LANG:1 10 CEP_IONode +PANEL,-1 -1 1073 754 N "_3DFace" 0 +"main() +{ + // Initialise the Panel + navPanel_initPanel(\"fw_viewBox\"); + strModuleName = myModuleName(); + baseDP = g_currentDatapoint; + nodeDP = baseDP; + + dyn_string dpAr= strsplit(dpSubStr(g_currentDatapoint,DPSUB_DP),\"_\"); + if (strpos(dpAr[dynlen(dpAr)],\"IONode\") > -1) { + ioNode = substr(dpAr[dynlen(dpAr)],6,strlen(dpAr[dynlen(dpAr)])); + } else { + LOG_ERROR(\"CEP_IONodeProcesses.pnl:Initialize|No IONode found in currentDatapoint.\"); + } + + inputBufferDP = sysName+\"LOFAR_PermSW_PSIONode\"+navFunct_formatInt(ioNode,99)+\"_InputBuffer\"; + adderDP = sysName+\"LOFAR_ObsSW_OSIONode\"+navFunct_formatInt(ioNode,99)+\"_Adder\"; + + reload(); + + +} + +void prepareProcesses() { + dyn_string result; + // here we need to add the Inputbuffer, adders and the locusnodes that are part of this screen + // so we need to determine all the databasePoints for these processes + + dynAppend(result,\",InputBuffer,\"+inputBufferDP); + dynAppend(g_processesList,inputBufferDP); + + dynClear(writers); + dynClear(locusNodes); + for (int i = 0; i < 10; i++ ) { + dynAppend(result,\",Adder\"+i+\",\"+adderDP+i); + dynAppend(g_processesList,adderDP+i); + int l; + int w; + bool invalid=true; + if (dpGet(adderDP+i+\".locusNode\",l,adderDP+i+\".locusNode:_online.._invalid\",invalid) >= 0) { + if (!invalid) dynAppend(locusNodes,l); + } + if (dpGet(adderDP+i+\".writer\",w,adderDP+i+\".writer:_online.._invalid\",invalid) >= 0) { + if (!invalid) dynAppend(writers,w); + } + } + for (int i = 1; i <= dynlen(writers); i++ ) { + string writerDP=sysName+\"LOFAR_ObsSW_OSLocusNode\"+navFunct_formatInt(locusNodes[i],999)+\"_Writer\"+navFunct_formatInt(writers[i],99); + dynAppend(result,\",Writer\"+navFunct_formatInt(writers[i],99)+\",\"+writerDP); + dynAppend(g_processesList,writerDP); + } + + // write result to the db so various panels can reset themselves + dpSet(DPNAME_NAVIGATOR + g_navigatorID + \".processesList\",result); + + LOG_DEBUG(\"CEP_IONodeProcesses.pnl:prepareProcesses|processList found: \"+ result); + +} + +// +// Callback for dpConnect to action point. +// If there is an action required this point will tell so +// +void doAction(string aDP, string anAction) { + LOG_DEBUG(\"CEP_IONodeProcesses.pnl:doAction| Action required. found: \" + anAction); + // split action into essentials + dyn_string actionString; + if (!navFunct_splitAction(anAction,actionString)) { + return; + } + + LOG_DEBUG(\"CEP_IONodeProcesses.pnl:doAction|found actionString: \" + actionString); + + // Reload + if (actionString[1] == \"Reload\") { + reload(); + } +} + +void reload() { + + // get the name of the selected station + string dp = nodeDP+\".usedStation\"; + if (dpExists(dp) ){ + dpGet(dp,station); + } else { + LOG_ERROR(\"CEP_IONodeProcesses.pnl:main|ERROR DP does not exist: \"+dp); + return; + } + + stationDP=station+\":\"; + + // In the database we can find the IONode involved + string nodeName = navFunct_DPName2CEPName(nodeDP); + + LOG_DEBUG(\"CEP_IONodeProcesses.pnl:main|nodeName working: \"+nodeName); + + redraw(); + + // if no match found we have an error + if (nodeName == \"\" || station == \"\") { + LOG_ERROR(\"CEP_IONodeProcesses.pnl:main| ERROR no station or IONode-name found, can't view running processes\"); + } else { + + // we have to set the stripped inputBuffer List and Adder List here. + // Since this is the Survey mode we only need one InputBuffer and one Adder + dpSet(DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.objectName\",\"CircularBuffer\", + DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.paramList\",makeDynString(ioNode)); + + + LOG_DEBUG(\"CEP_IONodeProcesses.pnl:main|Station: \"+station); + + setValue(\"ionodeLabel\",\"text\",\"IONode: \"+nodeName); + setValue(\"stationLabel\",\"text\",station); + setValue(\"ionodeLabel\",\"toolTipText\",nodeDP); + setValue(\"stationLabel\",\"toolTipText\",stationDP); + + } + // pass baseDP to selfstate Object to work with + setValue(\"selfState.light\",\"toolTipText\",baseDP); + + + // start the logging process + // navPanel_showLogging(baseDP); + + // connect for selfUpdates + showSelfState(baseDP); + + + + + + navFunct_clearGlobalLists(); + + // set the hardware selectable items for this screen + prepareProcesses(); + + // set panel to ready + g_objectReady=true; + + // trigger that the panel values are calculated and ready + navPanel_setEvent(\"CEP_IONodeProcesses.pnl\",\"Update\"); + +} + + " 0 + E E E E 1 -1 -1 0 188 128 +""0 1 +E "#uses \"navPanel.ctl\" +string baseDP = \"\"; + +string station; +int ioNode; +string nodeDP=\"\"; +string inputBufferDP=\"\"; +string adderDP=\"\"; +string stationDP=\"\"; + +string locusNode; + + +dyn_string refNames; +dyn_string writers; +dyn_string locusNodes; + +string strModuleName; +bool bDoubleClicked = false; + +// routine for single mouse click +void click(string dp) { + // set delay in case double click was meant + delay(0, 100); + if (!bDoubleClicked) { + navPanel_setEvent(\"CEP_IONodeProcesses.pnl\",\"EventClick\"); + } +} + +// routine for double mouse click +void dblClick(string dp) { + // indicate this is a doubleClick + bDoubleClicked = true; + + if (dpExists(dp) ) { + LOG_DEBUG(\"CEP_IONodeProcesses.pnl:DoubleClick|Setting currentDatapoint from : \"+g_currentDatapoint+\" to \"+dp); + g_currentDatapoint=dp; + navPanel_setEvent(\"CEP_IONodeProcesses.pnl\",\"ChangePanel\"); + } + // set delay to avoid click event will be triggered + delay(0, 500); + bDoubleClicked = false; +} + +// routine for right mouse click +void rClick(string dp) { + navPanel_setEvent(\"CEP_IONodeProcesses.pnl\",\"EventRightClick\"); +} +void clearRefNames() { + // remove all symbols because new ones will be added + for (int i=1; i <= dynlen(refNames); i++) { + removeSymbol(strModuleName,\"\",refNames[i]); + } + dynClear(refNames); +} + + +void redraw() { + LOG_TRACE(\"CEP_IONodeProcesses.pnl:redraw\"); + string addPanelName = \"objects/Processes/adder.pnl\"; + + // clear old refNames if available + if (dynlen(refNames) > 0) { + clearRefNames(); + } + + // now start adding adders to panel + + for (int i = 0; i < 10; i++ ) { + LOG_TRACE(\"CEP_IONodeProcesses.pnl:redraw|Adding adder: \" + i); + refNames[i+1]=\"singleadder\"+(i); + + if ( addSymbol( strModuleName, // Stay in this modul + \"\", // Name of this panel + addPanelName, // Panel to add + refNames[i+1], // Ref of the addedPanel + makeDynString( \"$adderNumber:\" + i , // Define all $values + \"$nodeDP:\" + nodeDP), // + 0, // Xpos of the AddedSymbol + 245+((i-1)*30), // Ypos of the AddedSymbol + 0, // angle + 1 ,1 // zoomX , zoomY + ) < 0 ) { + LOG_ERROR(\"CEP_IONodeProcesses.pnl:redraw|Error Appending adder : \" + i + \" in this panel.\"); + } + } +} +" 0 + 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 658 +"childStateBorder" +"" +1 500 80 E E E 1 E 1 E N {0,0,0} E N "_3DFace" E E + E E +77 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 1.061061061061061 0 1 0 0 1 E 0 0 999 709 +2 917 +"ionodeLabel" +"" +1 340 10 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(); +}" 0 + "main() +{ + dblClick(); +}" 0 + +78 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main() +{ + click(); +}" 0 + 0 1 1 2 1 E U 1 E 340 10 557 34 +0 2 2 "0s" 0 0 0 192 0 0 340 10 1 +1 +LANG:1 33 MS Shell Dlg,14,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 20 Node: R00-M0-N00-J00 +1 957 1 "" 1 +0 +1 958 2 "" 285 +0 +1 959 2 "" 226 +0 +1 960 2 "" 229 +0 +1 961 2 "" 234 +0 +1 962 2 "" 235 +0 +1 963 2 "" 236 +0 +1 964 2 "" 237 +0 +1 965 2 "" 238 +0 +1 966 2 "" 239 +0 +1 967 2 "" 240 +0 +1 968 2 "" 241 +0 +1 969 2 "" 242 +0 +1 970 2 "" 243 +0 +1 971 2 "" 244 +0 +1 972 2 "" 245 +0 +1 973 2 "" 246 +0 +1 974 2 "" 247 +0 +1 975 2 "51" 1 +0 +1 976 2 "" 249 +0 +1 977 2 "" 250 +0 +1 978 2 "" 251 +0 +1 979 2 "" 252 +0 +1 980 2 "" 253 +0 +1 981 2 "" 254 +0 +1 982 2 "" 255 +0 +1 983 2 "" 261 +0 +1 984 2 "" 262 +0 +1 985 2 "" 263 +0 +1 986 2 "" 264 +0 +1 987 2 "" 265 +0 +1 988 2 "" 279 +0 +1 989 2 "" 280 +0 +1 990 2 "" 281 +0 +1 991 2 "" 282 +0 +1 992 2 "" 283 +0 +1 993 2 "" 290 +0 +1 994 2 "" 291 +0 +1 995 2 "" 292 +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 +3 1 "selfState" -1 +"objects\\lofar_self_state.pnl" 7 8 T 79 1 0 1 300 4 +0 +3 2 "PANEL_REF2" -1 +"objects\\Processes\\circularBuffer.pnl" 35 32 T 80 1 0 1 190 20 +0 +0 diff --git a/MAC/Navigator2/panels/Processes/CEP_Processes.pnl b/MAC/Navigator2/panels/Processes/CEP_Processes.pnl index 85a5b35f3ac..94cf82ae878 100644 --- a/MAC/Navigator2/panels/Processes/CEP_Processes.pnl +++ b/MAC/Navigator2/panels/Processes/CEP_Processes.pnl @@ -197,21 +197,21 @@ LANG:1 6 logMsg 0 1 188 39 "15" 2 0 -1 189 39 "16" 4 +1 189 39 "" 113 0 -1 190 39 "16" 3 +1 190 39 "" 144 0 -1 191 39 "16.0" 1 +1 191 39 "" 166 0 -1 192 39 "16" 6 +1 192 39 "16" 4 0 -1 193 39 "16" 2 +1 193 39 "16" 3 0 -1 194 39 "" 113 +1 194 39 "16.0" 1 0 -1 195 39 "" 144 +1 195 39 "16" 6 0 -1 196 39 "" 166 +1 196 39 "16" 2 0 1 197 40 "" 4 0 @@ -368,9 +368,9 @@ LANG:1 0 "objects\\Processes\\ObsSW_CEP.pnl" 10 382 T 45 1 0 1 -5 0 0 3 40 "PANEL_REF21" -1 -"objects\\Processes\\controller_small.pnl" 0 280 T 46 1 0 1 0 -14 +"objects\\Processes\\controller_small.pnl" 0 280 T 46 1 0 1 0 -10 1 -"$name""HardwareMonitor" +"$name""CEPHardwareMonitor" 3 41 "PANEL_REF42" -1 "objects\\Processes\\controller_small.pnl" 0 280 T 55 1 0 1 0 15 1 diff --git a/MAC/Navigator2/panels/Processes/CEPlogProcessor.pnl b/MAC/Navigator2/panels/Processes/CEPlogProcessor.pnl new file mode 100644 index 00000000000..4ed2bda2446 --- /dev/null +++ b/MAC/Navigator2/panels/Processes/CEPlogProcessor.pnl @@ -0,0 +1,88 @@ +V 11 +1 +LANG:1 0 +PANEL,-1 -1 1013 750 N "_3DFace" 0 +"main() +{ + // Initialise the Panel + navPanel_initPanel(\"fw_viewBox\"); +}" 0 + E E E E 1 -1 -1 0 0 0 +""0 1 +E "#uses \"navPanel.ctl\"" 0 + 2 +"CBRef" "1" +"EClose" E +"" +DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 +LAYER, 0 +1 +LANG:1 0 +1 1 1 "" 0 +0 +1 2 1 "0" 1 +0 +1 3 1 "" 2 +0 +1 4 1 "" 3 +0 +1 5 1 "" 7 +0 +1 6 1 "" 8 +0 +1 7 1 "" 9 +0 +1 8 1 "" 10 +0 +1 9 1 "" 11 +0 +1 10 1 "" 12 +0 +1 11 1 "" 13 +0 +1 12 1 "" 15 +0 +1 13 1 "" 16 +0 +1 14 1 "" 17 +0 +1 15 1 "" 18 +0 +1 16 1 "" 19 +0 +1 17 1 "" 20 +0 +0 +LAYER, 1 +1 +LANG:1 0 +0 +LAYER, 2 +1 +LANG:1 0 +0 +LAYER, 3 +1 +LANG:1 0 +0 +LAYER, 4 +1 +LANG:1 0 +0 +LAYER, 5 +1 +LANG:1 0 +0 +LAYER, 6 +1 +LANG:1 0 +0 +LAYER, 7 +1 +LANG:1 0 +0 +3 1 "PANEL_REF2" -1 +"objects\\Processes\\daemon_big.pnl" 49 72 T 20 1 0 1 0.999999999999986 -22 +1 +"$daemonName""LogProcessor" +0 diff --git a/MAC/Navigator2/panels/Processes/CalibrationControl.pnl b/MAC/Navigator2/panels/Processes/CalibrationControl.pnl index ceda3c4cef3..750fe35f032 100644 --- a/MAC/Navigator2/panels/Processes/CalibrationControl.pnl +++ b/MAC/Navigator2/panels/Processes/CalibrationControl.pnl @@ -1,4 +1,4 @@ -V 10 +V 11 1 LANG:1 0 PANEL,-1 -1 1013 750 N "_3DFace" 0 @@ -21,7 +21,7 @@ PANEL,-1 -1 1013 750 N "_3DFace" 0 baseDP + \".connected:_online.._invalid\") == -1) { } if (!navFunct_dpReachable(baseDP)) { - updateCalibrationControl(\"\",false,\"\",\"\",\"\",\"\",\"\",\"\",\"\",0,\"\".makeDynString(),\"\",true); + updateCalibrationControl(\"\",false,\"\",\"\",\"\",\"\",\"\",\"\",\"\",0,\"\",makeDynString(),\"\",true); } } else { LOG_ERROR(\"CalibrationControl.pnl:main|Couldn't find DP to connect to: \"+baseDP); @@ -202,12 +202,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 30 320 95 334 +E E 0 1 1 2 1 E U 1 E 30 320 95 333 0 2 2 "0s" 0 0 0 192 0 0 30 320 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 10 Connected: 6 51 "connectedText" @@ -236,12 +235,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 30 344 109 358 +E E 0 1 1 2 1 E U 1 E 30 344 109 357 0 2 2 "0s" 0 0 0 192 0 0 30 344 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 13 antennaArray: 14 66 "antennaArrayText" @@ -256,9 +254,8 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 113 338 992 359 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 113 338 992 359 2 "0s" 0 0 0 0 0 -1 E E E 25 82 "beamTable" @@ -273,9 +270,8 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 113 422 367 597 +LANG:1 33 MS Shell Dlg,-1,13,5,50,0,0,0,0,0 +0 113 422 367 597 EE 1 0 1 1 8 "Name" 22 1 0 "s" 1 LANG:1 4 Name E @@ -301,9 +297,8 @@ LANG:1 2 #2 LANG:1 2 #1 10 8 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -0 1 0 1 7 +LANG:1 33 MS Shell Dlg,-1,13,5,50,0,0,0,0,0 +0 0 1 0 1 7 1 0 2 83 "PRIMITIVE_TEXT10" @@ -318,12 +313,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 30 428 103 442 +E E 0 1 1 2 1 E U 1 E 30 428 103 441 0 2 2 "0s" 0 0 0 192 0 0 30 428 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 10 BeamNames: 2 84 "PRIMITIVE_TEXT11" @@ -338,12 +332,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 30 365 61 379 +E E 0 1 1 2 1 E U 1 E 30 365 61 378 0 2 2 "0s" 0 0 0 192 0 0 30 365 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 6 rcu's: 14 85 "rcusText" @@ -358,9 +351,8 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 113 359 992 380 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 113 359 992 380 2 "0s" 0 0 0 0 0 -1 E E E 2 86 "PRIMITIVE_TEXT12" @@ -375,12 +367,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 30 386 59 400 +E E 0 1 1 2 1 E U 1 E 30 386 59 399 0 2 2 "0s" 0 0 0 192 0 0 30 386 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 7 filter: 14 87 "filterText" @@ -395,9 +386,8 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 113 380 332 401 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 113 380 332 401 2 "0s" 0 0 0 0 0 -1 E E E 2 88 "PRIMITIVE_TEXT13" @@ -412,12 +402,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 30 407 101 421 +E E 0 1 1 2 1 E U 1 E 30 407 101 420 0 2 2 "0s" 0 0 0 192 0 0 30 407 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 12 nyquistzone: 14 89 "nyquistzoneText" @@ -432,9 +421,8 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 113 401 162 422 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 113 401 162 422 2 "0s" 0 0 0 0 0 -1 E E E 0 LAYER, 1 @@ -465,8 +453,8 @@ LAYER, 7 1 LANG:1 0 0 -3 0 "PANEL_REF1" +3 0 "PANEL_REF1" -1 "objects\\Processes\\controller_top.pnl" 49 92 T 0 1 0 1 1.4432899320127e-014 -40 1 "$ctrlName""CalibrationControl" -0 \ No newline at end of file +0 diff --git a/MAC/Navigator2/panels/Processes/MACScheduler.pnl b/MAC/Navigator2/panels/Processes/MACScheduler.pnl index dd539c4f8d7..700135b1626 100644 --- a/MAC/Navigator2/panels/Processes/MACScheduler.pnl +++ b/MAC/Navigator2/panels/Processes/MACScheduler.pnl @@ -1,4 +1,4 @@ -V 10 +V 11 1 LANG:1 0 PANEL,-1 -1 1013 750 N "_3DFace" 0 @@ -150,7 +150,7 @@ updateOTDB(string dp1, bool connected, setValue(\"txt_OTDBpollinterval\", \"backCol\", \"Lofar_invalid\"); } else { setValue(\"txt_OTDBconnected\", \"backCol\", \"Lofar_dpOffline\"); - setValue(\"txt_OTDBlastPoll\", \"backCol\", \"Lofar_idpOffline\"); + setValue(\"txt_OTDBlastPoll\", \"backCol\", \"Lofar_dpOffline\"); setValue(\"txt_OTDBpollinterval\", \"backCol\", \"Lofar_dpOffline\"); } } @@ -268,9 +268,8 @@ LANG:1 0 "dashclr"N "_Transparent" E E 0 0 1 0 1 E 2.28571428571429 0 0.487179487179487 -38.5714285714286 172.384615384615 0 E 30 303 451 421 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 1 LANG:1 4 OTDB 2 13 "PRIMITIVE_TEXT7" @@ -285,12 +284,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 40 344 105 358 +E E 0 1 1 2 1 E U 1 E 40 344 105 357 0 2 2 "0s" 0 0 0 192 0 0 40 344 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 10 Connected: 2 14 "PRIMITIVE_TEXT8" @@ -305,12 +303,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 349 344 421 358 +E E 0 1 1 2 1 E U 1 E 349 344 421 357 0 2 2 "0s" 0 0 0 192 0 0 349 344 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 14 Poll Interval: 2 15 "PRIMITIVE_TEXT9" @@ -325,12 +322,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 665 344 718 358 +E E 0 1 1 2 1 E U 1 E 665 344 718 357 0 2 2 "0s" 0 0 0 192 0 0 665 344 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 10 Last Poll: 14 16 "txt_OTDBconnected" @@ -345,9 +341,8 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 115 341 339 362 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 115 341 339 362 2 "0s" 0 0 0 0 0 -1 E E E 14 17 "txt_OTDBpollinterval" @@ -362,9 +357,8 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 428 338 652 359 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 428 338 652 359 2 "0s" 0 0 0 0 0 -1 E E E 14 18 "txt_OTDBlastPoll" @@ -379,9 +373,8 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 728 341 952 362 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 728 341 952 362 2 "0s" 0 0 0 0 0 -1 E E E 17 19 "PlannedObservationList" @@ -396,9 +389,8 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 28 418 322 722 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 28 418 322 722 0 E @@ -419,12 +411,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 100 390 228 404 +E E 0 1 1 2 1 E U 1 E 100 390 228 403 0 2 2 "0s" 0 0 0 192 0 0 100 390 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 21 Planned Observations: 17 32 "ActiveObservationList" @@ -439,9 +430,8 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 358 418 652 722 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 358 418 652 722 0 E @@ -462,12 +452,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 430 392 548 406 +E E 0 1 1 2 1 E U 1 E 430 392 548 405 0 2 2 "0s" 0 0 0 192 0 0 430 392 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 20 Active Observations: 17 34 "FinishedObservationList" @@ -482,9 +471,8 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 688 420 982 722 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 688 420 982 722 0 E @@ -505,12 +493,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 760 392 889 406 +E E 0 1 1 2 1 E U 1 E 760 392 889 405 0 2 2 "0s" 0 0 0 192 0 0 760 392 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 22 Finished Observations: 0 LAYER, 1 @@ -541,8 +528,8 @@ LAYER, 7 1 LANG:1 0 0 -3 0 "PANEL_REF1" +3 0 "PANEL_REF1" -1 "objects\\Processes\\controller_top.pnl" 49 92 T 0 1 0 1 1.4432899320127e-014 -40 1 "$ctrlName""MACScheduler" -0 \ No newline at end of file +0 diff --git a/MAC/Navigator2/panels/Processes/MainCU_Processes.pnl b/MAC/Navigator2/panels/Processes/MainCU_Processes.pnl index f8de83016d7..e0e6e35b6ae 100644 --- a/MAC/Navigator2/panels/Processes/MainCU_Processes.pnl +++ b/MAC/Navigator2/panels/Processes/MainCU_Processes.pnl @@ -1,4 +1,4 @@ -V 10 +V 11 1 LANG:1 0 PANEL,-1 -1 1000 735 N "_3DFace" 0 @@ -73,12 +73,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 370 2 446 23 +E E 0 1 1 2 1 E U 1 E 370 2 446 22 0 2 2 "0s" 0 0 0 192 0 0 370 2 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-16-*-100-100-*-*-iso8859-1|-16,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,16,5,75,0,0,0,0,0 +0 1 LANG:1 7 Daemons 2 37 "PRIMITIVE_TEXT2" @@ -93,12 +92,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 370 186 439 207 +E E 0 1 1 2 1 E U 1 E 370 186 439 206 0 2 2 "0s" 0 0 0 192 0 0 370 186 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-16-*-100-100-*-*-iso8859-1|-16,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,16,5,75,0,0,0,0,0 +0 1 LANG:1 6 PermSW 1 137 12 "" 1 0 @@ -118,9 +116,9 @@ LANG:1 6 PermSW 0 1 145 12 "14.0" 1 0 -1 146 12 "14" 2 +1 146 12 "14" 6 0 -1 147 12 "14" 6 +1 147 12 "14" 2 0 1 148 12 "15" 4 0 @@ -128,61 +126,61 @@ LANG:1 6 PermSW 0 1 150 12 "15.0" 1 0 -1 151 12 "15" 2 +1 151 12 "15" 6 0 -1 152 12 "15" 6 +1 152 12 "15" 2 0 -1 153 12 "16" 4 +1 153 12 "17" 4 0 -1 154 12 "16" 3 +1 154 12 "17" 3 0 -1 155 12 "16.0" 1 +1 155 12 "17.0" 1 0 -1 156 12 "16" 2 +1 156 12 "17" 6 0 -1 157 12 "16" 6 +1 157 12 "17" 2 0 -1 158 12 "17" 4 +1 158 12 "18" 4 0 -1 159 12 "17" 3 +1 159 12 "18" 3 0 -1 160 12 "17.0" 1 +1 160 12 "18.0" 1 0 -1 161 12 "17" 2 +1 161 12 "18" 6 0 -1 162 12 "17" 6 +1 162 12 "18" 2 0 -1 163 12 "18" 4 +1 163 12 "19" 4 0 -1 164 12 "18" 3 +1 164 12 "19" 3 0 -1 165 12 "18.0" 1 +1 165 12 "19.0" 1 0 -1 166 12 "18" 2 +1 166 12 "19" 6 0 -1 167 12 "18" 6 +1 167 12 "19" 2 0 -1 168 12 "19" 4 +1 168 12 "" 79 0 -1 169 12 "19" 3 +1 169 12 "" 80 0 -1 170 12 "19.0" 1 +1 170 12 "" 82 0 -1 171 12 "19" 2 +1 171 12 "" 113 0 -1 172 12 "19" 6 +1 172 12 "" 144 0 -1 173 12 "" 79 +1 173 12 "" 145 0 -1 174 12 "" 80 +1 174 12 "20" 4 0 -1 175 12 "" 82 +1 175 12 "20" 3 0 -1 176 12 "" 113 +1 176 12 "20.0" 1 0 -1 177 12 "" 144 +1 177 12 "20" 6 0 -1 178 12 "" 145 +1 178 12 "20" 2 0 1 179 13 "" 4 0 @@ -207,12 +205,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 199 18 206 32 +E E 0 1 1 2 1 E U 1 E 199 18 206 31 0 2 2 "0s" 0 0 0 192 0 0 199 18 1 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 1 LANG:1 1 A 2 112 "PRIMITIVE_TEXT10" @@ -227,12 +224,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 220 18 254 32 +E E 0 1 1 2 1 E U 1 E 220 18 254 31 0 2 2 "0s" 0 0 0 192 0 0 220 18 1 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 1 LANG:1 6 logMsg 1 184 14 "" 4 0 @@ -287,12 +283,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 163 205 184 219 +E E 0 1 1 2 1 E U 1 E 163 205 184 218 0 2 2 "0s" 0 0 0 192 0 0 163 205 1 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 1 LANG:1 5 error 2 135 "PRIMITIVE_TEXT13" @@ -307,12 +302,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 288 205 351 219 +E E 0 1 1 2 1 E U 1 E 288 205 351 218 0 2 2 "0s" 0 0 0 192 0 0 288 205 1 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 1 LANG:1 13 currentAction 2 136 "PRIMITIVE_TEXT14" @@ -327,12 +321,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 413 205 447 219 +E E 0 1 1 2 1 E U 1 E 413 205 447 218 0 2 2 "0s" 0 0 0 192 0 0 413 205 1 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 1 LANG:1 6 logMsg 1 204 20 "" 4 0 @@ -383,35 +376,35 @@ LAYER, 7 1 LANG:1 0 0 -3 12 "PANEL_REF13" -"objects\\Processes\\ObsSW_Main.pnl" 75 402 T 15 1 0 1 -69 -110 +3 12 "PANEL_REF13" -1 +"objects\\Processes\\ObsSW_Main.pnl" 75 402 T 15 1 0 1 -65 -110 0 -3 13 "PANEL_REF14" +3 13 "PANEL_REF14" -1 "objects\\Processes\\daemon_small.pnl" 0 40 T 16 1 0 1 0 -8 1 "$name""LogProcessor" -3 14 "PANEL_REF15" +3 14 "PANEL_REF15" -1 "objects\\Processes\\daemon_small.pnl" 0 80 T 24 1 0 1 0 -18 1 "$name""ServiceBroker" -3 15 "PANEL_REF16" +3 15 "PANEL_REF16" -1 "objects\\Processes\\daemon_small.pnl" 0 110 T 25 1 0 1 0 -18 1 "$name""CTStartDaemon" -3 16 "PANEL_REF17" +3 16 "PANEL_REF17" -1 "objects\\Processes\\daemon_small.pnl" 0 140 T 26 1 0 1 0 -18 1 "$name""SASGateway" -3 19 "PANEL_REF20" +3 19 "PANEL_REF20" -1 "objects\\Processes\\controller_small.pnl" 0 220 T 27 U 1 "$name""MACScheduler" -3 20 "PANEL_REF21" +3 20 "PANEL_REF21" -1 "objects\\Processes\\controller_small.pnl" 0 280 T 35 1 0 1 0 -32 1 "$name""SoftwareMonitor" -3 21 "PANEL_REF22" +3 21 "PANEL_REF22" -1 "objects\\Processes\\daemon_small.pnl" 0 140 T 35 1 0 1 0 12 1 "$name""KeyValueLogger" -0 \ No newline at end of file +0 diff --git a/MAC/Navigator2/panels/Processes/PythonControl.pnl b/MAC/Navigator2/panels/Processes/PythonControl.pnl new file mode 100644 index 00000000000..936a31a6404 --- /dev/null +++ b/MAC/Navigator2/panels/Processes/PythonControl.pnl @@ -0,0 +1,165 @@ +V 11 +1 +LANG:1 0 +PANEL,-1 -1 1013 750 N "_3DFace" 0 +"main() +{ + // Initialise the Panel + navPanel_initPanel(\"fw_viewBox\"); + + baseDP = g_currentDatapoint; + database = dpSubStr(baseDP,DPSUB_SYS); + + reload(); +} + +void prepareProcesses() { + dyn_string result; + + dynAppend(result,\",PythonControl,\"+baseDP); + dynAppend(g_processesList,baseDP); + + + // write result to the db so various panels can reset themselves + dpSet(DPNAME_NAVIGATOR + g_navigatorID + \".processesList\",result); + + LOG_DEBUG(\"PythonControl.pnl:prepareProcesses|processList found: \"+ result); + +} + +// +// Callback for dpConnect to action point. +// If there is an action required this point will tell so +// +void doAction(string aDP, string anAction) { + LOG_DEBUG(\"PythonControl.pnl:doAction| Action required. found: \" + anAction); + // split action into essentials + dyn_string actionString; + if (!navFunct_splitAction(anAction,actionString)) { + return; + } + + LOG_DEBUG(\"PythonControl.pnl:doAction|found actionString: \" + actionString); + + // Reload + if (actionString[1] == \"Reload\") { + reload(); + } +} + +void reload() { + + navFunct_clearGlobalLists(); + + // set the observation selectable items + prepareProcesses(); + + // set panel to ready + g_objectReady=true; + + // trigger that the panel values are calculated and ready + navPanel_setEvent(\"PythonControl.pnl\",\"Update\"); +} + +" 0 + E E E E 1 -1 -1 0 49 92 +""0 1 +E "#uses \"navPanel.ctl\" + +string baseDP=\"\"; +string database=\"\";" 0 + 2 +"CBRef" "1" +"EClose" E +"" +DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 +LAYER, 0 +1 +LANG:1 0 +1 48 0 "" 0 +0 +1 49 0 "0" 1 +0 +1 50 0 "" 2 +0 +1 51 0 "" 3 +0 +1 52 0 "" 7 +0 +1 53 0 "" 8 +0 +1 54 0 "" 9 +0 +1 55 0 "" 10 +0 +1 56 0 "" 11 +0 +1 57 0 "" 12 +0 +1 58 0 "" 13 +0 +1 59 0 "" 15 +0 +1 60 0 "" 16 +0 +1 61 0 "" 17 +0 +1 62 0 "" 18 +0 +1 63 0 "" 19 +0 +1 64 0 "" 20 +0 +2 47 +"PRIMITIVE_TEXT7" +"" +1 30 320 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + E E +21 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 1 E 30 320 60 333 +0 2 2 "0s" 0 0 0 192 0 0 30 320 1 +1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 +LANG:1 4 None +0 +LAYER, 1 +1 +LANG:1 0 +0 +LAYER, 2 +1 +LANG:1 0 +0 +LAYER, 3 +1 +LANG:1 0 +0 +LAYER, 4 +1 +LANG:1 0 +0 +LAYER, 5 +1 +LANG:1 0 +0 +LAYER, 6 +1 +LANG:1 0 +0 +LAYER, 7 +1 +LANG:1 0 +0 +3 0 "PANEL_REF1" -1 +"objects\\Processes\\controller_top.pnl" 49 92 T 0 1 0 1 1.4432899320127e-014 -40 +1 +"$ctrlName""PythonControl" +0 diff --git a/MAC/Navigator2/panels/Processes/Station_Processes.pnl b/MAC/Navigator2/panels/Processes/Station_Processes.pnl index a71d369bcf3..b2bd0c83af1 100644 --- a/MAC/Navigator2/panels/Processes/Station_Processes.pnl +++ b/MAC/Navigator2/panels/Processes/Station_Processes.pnl @@ -1,7 +1,7 @@ -V 10 +V 11 1 LANG:1 0 -PANEL,-1 -1 1016 737 N "_3DFace" 0 +PANEL,-1 -1 1016 732 N "_3DFace" 0 "main() { // Initialise the Panel @@ -93,12 +93,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 370 2 446 23 +E E 0 1 1 2 1 E U 1 E 370 2 446 22 0 2 2 "0s" 0 0 0 192 0 0 370 2 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-16-*-100-100-*-*-iso8859-1|-16,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,16,5,75,0,0,0,0,0 +0 1 LANG:1 7 Daemons 2 37 "PRIMITIVE_TEXT2" @@ -113,12 +112,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 380 140 449 161 +E E 0 1 1 2 1 E U 1 E 380 140 449 160 0 2 2 "0s" 0 0 0 192 0 0 380 140 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-16-*-100-100-*-*-iso8859-1|-16,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,16,5,75,0,0,0,0,0 +0 1 LANG:1 6 PermSW 1 232 13 "" 4 0 @@ -143,12 +141,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 200 20 207 34 +E E 0 1 1 2 1 E U 1 E 200 20 207 33 0 2 2 "0s" 0 0 0 192 0 0 200 20 1 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 1 LANG:1 1 A 2 112 "PRIMITIVE_TEXT10" @@ -163,12 +160,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 220 21 254 35 +E E 0 1 1 2 1 E U 1 E 220 21 254 34 0 2 2 "0s" 0 0 0 192 0 0 220 21 1 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 1 LANG:1 6 logMsg 1 237 14 "" 4 0 @@ -213,12 +209,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 162 212 183 226 +E E 0 1 1 2 1 E U 1 E 162 212 183 225 0 2 2 "0s" 0 0 0 192 0 0 162 212 1 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 1 LANG:1 5 error 2 135 "PRIMITIVE_TEXT13" @@ -233,12 +228,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 286 212 349 226 +E E 0 1 1 2 1 E U 1 E 286 212 349 225 0 2 2 "0s" 0 0 0 192 0 0 286 212 1 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 1 LANG:1 13 currentAction 2 136 "PRIMITIVE_TEXT14" @@ -253,12 +247,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 415 212 449 226 +E E 0 1 1 2 1 E U 1 E 415 212 449 225 0 2 2 "0s" 0 0 0 192 0 0 415 212 1 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 1 LANG:1 6 logMsg 1 252 20 "" 4 0 @@ -330,9 +323,9 @@ LANG:1 6 logMsg 0 1 286 31 "20.0" 1 0 -1 287 31 "20" 2 +1 287 31 "20" 6 0 -1 288 31 "20" 6 +1 288 31 "20" 2 0 1 289 31 "21" 4 0 @@ -340,9 +333,9 @@ LANG:1 6 logMsg 0 1 291 31 "21.0" 1 0 -1 292 31 "21" 2 +1 292 31 "21" 6 0 -1 293 31 "21" 6 +1 293 31 "21" 2 0 1 294 31 "22" 4 0 @@ -350,9 +343,9 @@ LANG:1 6 logMsg 0 1 296 31 "22.0" 1 0 -1 297 31 "22" 2 +1 297 31 "22" 6 0 -1 298 31 "22" 6 +1 298 31 "22" 2 0 1 299 31 "" 97 0 @@ -419,12 +412,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 202 162 209 176 +E E 0 1 1 2 1 E U 1 E 202 162 209 175 0 2 2 "0s" 0 0 0 192 0 0 202 162 1 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 1 LANG:1 1 A 2 231 "PRIMITIVE_TEXT16" @@ -439,12 +431,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 222 163 256 177 +E E 0 1 1 2 1 E U 1 E 222 163 256 176 0 2 2 "0s" 0 0 0 192 0 0 222 163 1 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 1 LANG:1 6 logMsg 0 LAYER, 1 @@ -475,62 +466,62 @@ LAYER, 7 1 LANG:1 0 0 -3 13 "PANEL_REF14" +3 13 "PANEL_REF14" -1 "objects\\Processes\\daemon_small.pnl" 0 40 T 16 1 0 1 0 -5 1 "$name""LogProcessor" -3 14 "PANEL_REF15" +3 14 "PANEL_REF15" -1 "objects\\Processes\\daemon_small.pnl" 0 80 T 24 1 0 1 0 -13 1 "$name""ServiceBroker" -3 15 "PANEL_REF16" +3 15 "PANEL_REF16" -1 "objects\\Processes\\daemon_small.pnl" 0 110 T 25 1 0 1 0 70 1 "$name""CTStartDaemon" -3 16 "PANEL_REF17" +3 16 "PANEL_REF17" -1 "objects\\Processes\\daemon_small.pnl" 0 140 T 26 1 0 1 0 -41 1 "$name""SASGateway" -3 20 "PANEL_REF21" +3 20 "PANEL_REF21" -1 "objects\\Processes\\controller_small.pnl" 0 280 T 35 1 0 1 0 -50 1 "$name""AMCServer" -3 21 "PANEL_REF22" +3 21 "PANEL_REF22" -1 "objects\\Processes\\controller_small.pnl" 0 270 T 35 1 0 1 0 -12 1 "$name""BeamServer" -3 22 "PANEL_REF23" +3 22 "PANEL_REF23" -1 "objects\\Processes\\controller_small.pnl" 0 330 T 36 1 0 1 0 -44 1 "$name""CalServer" -3 25 "PANEL_REF26" +3 25 "PANEL_REF26" -1 "objects\\Processes\\controller_small.pnl" 0 380 T 37 1 0 1 0 -66 1 "$name""SHMInfoServer" -3 28 "PANEL_REF29" +3 28 "PANEL_REF29" -1 "objects\\Processes\\controller_small.pnl" 10 430 T 39 1 0 1 -10 -88 1 "$name""RSPDriver" -3 31 "PANEL_REF32" -"objects\\Processes\\ObsSW_Station.pnl" 100 502 T 39 1 0 1 -110 20.00000000000001 +3 31 "PANEL_REF32" -1 +"objects\\Processes\\ObsSW_Station.pnl" 100 502 T 39 1 0 1 -100 20.00000000000001 0 -3 32 "PANEL_REF33" +3 32 "PANEL_REF33" -1 "objects\\Processes\\controller_small.pnl" 10 470 T 40 1 0 1 -10 -100 1 "$name""TBBDriver" -3 34 "PANEL_REF35" +3 34 "PANEL_REF35" -1 "objects\\Processes\\controller_small.pnl" 10 470 T 40 1 0 1 -10 -72 1 "$name""StationControl" -3 36 "PANEL_REF37" +3 36 "PANEL_REF37" -1 "objects\\Processes\\controller_small.pnl" 10 470 T 42 1 0 0.9653979238754328 -10 -26.7370242214534 1 "$name""ClockControl" -3 37 "PANEL_REF38" +3 37 "PANEL_REF38" -1 "objects\\Processes\\controller_small.pnl" 10 470 T 43 1 0 1 -10 -15 1 "$name""HardwareMonitor" -3 38 "PANEL_REF39" +3 38 "PANEL_REF39" -1 "objects\\Processes\\controller_small.pnl" 10 470 T 44 1 0 1 -10 14 1 "$name""SoftwareMonitor" diff --git a/MAC/Navigator2/panels/main.pnl b/MAC/Navigator2/panels/main.pnl index 894b4c84532..6e354360844 100644 --- a/MAC/Navigator2/panels/main.pnl +++ b/MAC/Navigator2/panels/main.pnl @@ -1,44 +1,379 @@ -V 10 -1 -LANG:1 0 -PANEL,1 1 1250 770 N "_3DFace" 0 -E E E E E 1 -1 -1 0 -1 -1 -""0 1 -E E 2 -"CBRef""1" -"EClose"E -"" -DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 -LAYER, 0 -1 -LANG:1 0 -0 -LAYER, 1 -1 -LANG:1 0 -0 -LAYER, 2 -1 -LANG:1 0 -0 -LAYER, 3 -1 -LANG:1 0 -0 -LAYER, 4 -1 -LANG:1 0 -0 -LAYER, 5 -1 -LANG:1 0 -0 -LAYER, 6 -1 -LANG:1 0 -0 -LAYER, 7 -1 -LANG:1 0 -0 -0 \ No newline at end of file +V 11 +1 +LANG:1 0 +PANEL,-1 -1 1010 745 N "_3DFace" 0 +"main() +{ + // Initialise the Panel + navPanel_initPanel(\"fw_viewBox\"); + + baseDP=g_currentDatapoint; + + strPanelName = \"antennaField\"; + strModuleName = myModuleName(); + + stationList = makeDynString(\"CS001\",\"CS002\",\"CS003\",\"CS004\",\"CS005\",\"CS006\",\"RS007\", + \"CS011\",\"CS013\",\"CS017\", + \"CS021\",\"CS024\",\"CS026\",\"CS028\", + \"CS030\",\"CS031\",\"CS032\", + \"RS101\",\"RS103\",\"RS201\",\"RS301\",\"RS302\",\"RS401\",\"RS501\", + \"RS106\", + \"RS205\",\"rs208\",\"RS210\", + \"RS305\",\"RS306\",\"RS307\",\"RS310\", + \"RS406\",\"RS407\",\"RS409\", + \"RS503\",\"RS508\",\"RS509\", + \"DE601\",\"DE602\",\"DE603\",\"DE604\",\"RS605\",\"FR606\",\"SE607\",\"UK608\", + \"CCU001\",\"MCU001\"); + + redraw(); + +} + +// +// Callback for dpConnect to action point. +// If there is an action required this point will tell so +// +void doAction(string aDP, string anAction) { + LOG_DEBUG(\"swlevel.pnl:doAction| Action required. found: \" + anAction); + // split action into essentials + dyn_string actionString; + if (!navFunct_splitAction(anAction,actionString)) { + return; + } + + LOG_DEBUG(\"swlevel.pnl:doAction|found actionString: \" + actionString); + + // Reload + if (actionString[1] == \"Reload\") { + redraw(arrayList.text(arrayList.number())); + return; + } else if (actionString[1] == \"DistChanged\") { + // for dist system bound hardware only, if the distsystem went offline we need to replace + // the screen with a broken connection screen. + if (!g_initializing) { + + // check if this syst is in the connectionlist and down + int iPos=dynContains(g_connections[\"NAME\"],sysName); + if (iPos > 0) { + if (!g_connections[\"UP\"][iPos]) { + navPanel_setEvent(\"invalid DP\",\"ChangePanel\"); + } + } + } + return; + } +} +" 0 + E E E E 1 -1 -1 0 20 30 +""0 1 +E "#uses \"navPanel.ctl\" + +dyn_string stationList; +dyn_string SWLevelRefNames; +dyn_string datastreamRefNames; +string strPanelName; +string strModuleName; +string baseDP=\"\"; + +void clearSWLevelRefNames() { + // remove all symbols because new ones will be added + for (int i=1; i <= dynlen(SWLevelRefNames); i++) { + removeSymbol(strModuleName,\"\",SWLevelRefNames[i]); + } + dynClear(SWLevelRefNames); +} + +void clearDatastreamRefNames() { + // remove all symbols because new ones will be added + for (int i=1; i <= dynlen(datastreamRefNames); i++) { + removeSymbol(strModuleName,\"\",datastreamRefNames[i]); + } + dynClear(datastreamRefNames); +} + +void redraw() { + + navFunct_clearGlobalLists(); + + string addPanelName = \"objects/swlevel.pnl\"; + + if (dynlen(SWLevelRefNames) > 0) { + clearSWLevelRefNames(); + } + + if (dynlen(datastreamRefNames) > 0) { + clearDatastreamRefNames(); + } + + int xPos_AddSymbol = 0; + int yPos_AddSymbol = 18; + int ref = 1; + string addPanelName = \"objects/swlevel.pnl\"; + //loop over list and prepare panel with all stations and swlevel objects + for (int i=1; i<= dynlen(stationList); i++) { + + SWLevelRefNames[i]=\"stationSW\"+(i); + + if ( addSymbol( strModuleName, // Stay in this modul + \"\", // Name of this panel + addPanelName, // Panel to add + SWLevelRefNames[ref], // Ref of the addedPanel + makeDynString( \"$station:\" + stationList[i]) , // Define all $values + xPos_AddSymbol, // Xpos of the AddedSymbol + yPos_AddSymbol, // Ypos of the AddedSymbol + 0, // angle + 1 ,1 // zoomX , zoomY + ) < 0 ) { + LOG_ERROR(\"swlevel.pnl:redraw|Error Appending swlevel for: \" + stationList[i] + \" in this panel.\"); + } + yPos_AddSymbol += 10; + ref++; + } + + xPos_AddSymbol = 150; + yPos_AddSymbol = 18; + ref = 1; + addPanelName = \"objects/datastreamLevel.pnl\"; + //loop over list and prepare panel with all datastreamobjects + for (int i=1; i<= dynlen(stationList); i++) { + //skip CCU and MCU machines + if (strpos(stationList[i],\"MCU\") >=0 ||strpos(stationList[i],\"CCU\") >=0) continue; + + datastreamRefNames[i]=\"datastream\"+(i); + + if ( addSymbol( strModuleName, // Stay in this modul + \"\", // Name of this panel + addPanelName, // Panel to add + datastreamRefNames[ref], // Ref of the addedPanel + makeDynString( \"$station:\" + stationList[i]) , // Define all $values + xPos_AddSymbol, // Xpos of the AddedSymbol + yPos_AddSymbol, // Ypos of the AddedSymbol + 0, // angle + 1 ,1 // zoomX , zoomY + ) < 0 ) { + LOG_ERROR(\"swlevel.pnl:redraw|Error datastream for : \" + stationList[i] + \" in this panel.\"); + } + yPos_AddSymbol += 10; + ref++; + } + // trigger that the panel values are calculated and ready + dynClear(highlight); + dynClear(strHighlight); + + // set panel to ready + g_objectReady=true; + + navPanel_setEvent(\"swlevel.pnl\",\"Update\"); +}" 0 + 2 +"CBRef" "1" +"EClose" E +"" +DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 +LAYER, 0 +1 +LANG:1 0 +2 4 +"PRIMITIVE_TEXT4" +"" +1 65 10 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +4 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 65 10 107 23 +0 2 2 "0s" 0 0 0 192 0 0 65 10 1 +1 +LANG:1 34 MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 7 swlevel +6 21 +"RECTANGLE1" +"" +1 140 140 E E E 1 E 1 E N {0,0,0} E N "green" E E + E E +6 0 0 0 0 0 +E E E +0 +1 +LANG:1 7 Level 6 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 0.7142857142857143 -10 60 1 E 140 140 150 210 +6 22 +"RECTANGLE2" +"" +1 140 140 E E E 1 E 1 E N {0,0,0} E N "yellow" E E + E E +7 0 0 0 0 0 +E E E +0 +1 +LANG:1 9 Level 2-5 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 0.7142857142857143 -10 110 1 E 140 140 150 210 +6 23 +"RECTANGLE3" +"" +1 140 140 E E E 1 E 1 E N {0,0,0} E N {255,170,0} E E + E E +8 0 0 0 0 0 +E E E +0 +1 +LANG:1 7 Level 1 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 0.7142857142857143 -10 160 1 E 140 140 150 210 +6 24 +"RECTANGLE4" +"" +1 140 140 E E E 1 E 1 E N {0,0,0} E N "red" E E + E E +9 0 0 0 0 0 +E E E +0 +1 +LANG:1 7 Level 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 0.7142857142857143 -10 210 1 E 140 140 150 210 +2 25 +"PRIMITIVE_TEXT5" +"" +1 155 2 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +10 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 155 2 196 15 +0 2 2 "0s" 0 0 0 192 0 0 155 2 1 +1 +LANG:1 34 MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 6 stream +6 26 +"RECTANGLE5" +"" +1 140 140 E E E 1 E 1 E N {0,0,0} E N "green" E E + E E +11 0 0 0 0 0 +E E E +0 +1 +LANG:1 13 datastream on + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1.428571428571429 75 -40 1 E 140 140 150 210 +6 27 +"RECTANGLE6" +"" +1 140 140 E E E 1 E 1 E N {0,0,0} E N "red" E E + E E +12 0 0 0 0 0 +E E E +0 +1 +LANG:1 14 datastream off + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1.428571428571429 75 60 1 E 140 140 150 210 +4 28 +"LINE1" +"" +1 230 0 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + E E +13 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 2 1 2 1 E 230 0 230 540 +2 29 +"PRIMITIVE_TEXT6" +"" +1 160 15 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +14 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 160 15 167 28 +0 2 2 "0s" 0 0 0 192 0 0 160 15 1 +1 +LANG:1 34 MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 1 0 +2 30 +"PRIMITIVE_TEXT7" +"" +1 190 15 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + E E +15 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E U 0 E 190 15 197 28 +0 2 2 "0s" 0 0 0 192 0 0 190 15 1 +1 +LANG:1 34 MS Shell Dlg 2,8,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 1 1 +0 +LAYER, 1 +1 +LANG:1 0 +0 +LAYER, 2 +1 +LANG:1 0 +0 +LAYER, 3 +1 +LANG:1 0 +0 +LAYER, 4 +1 +LANG:1 0 +0 +LAYER, 5 +1 +LANG:1 0 +0 +LAYER, 6 +1 +LANG:1 0 +0 +LAYER, 7 +1 +LANG:1 0 +0 +0 diff --git a/MAC/Navigator2/panels/objects/Hardware/CEP_BGPRack.pnl b/MAC/Navigator2/panels/objects/Hardware/CEP_BGPRack.pnl index 2ecb652c552..78648fd56ba 100644 --- a/MAC/Navigator2/panels/objects/Hardware/CEP_BGPRack.pnl +++ b/MAC/Navigator2/panels/objects/Hardware/CEP_BGPRack.pnl @@ -19,7 +19,7 @@ PANEL,-1 -1 669 432 N "_3DFace" 0 dpConnect(\"controlBGP\", baseDP + \".BGPSwitch:_online.._value\", baseDP + \".BGPSwitch:_online.._invalid\"); if (!navFunct_dpReachable(baseDP)) { - controlIOnode(\"\",false,\"\",true); + controlBGP(\"\",false,\"\",true); } } diff --git a/MAC/Navigator2/panels/objects/Hardware/CEP_IONode_small.pnl b/MAC/Navigator2/panels/objects/Hardware/CEP_IONode_small.pnl index 46666a02957..31f7437df86 100644 --- a/MAC/Navigator2/panels/objects/Hardware/CEP_IONode_small.pnl +++ b/MAC/Navigator2/panels/objects/Hardware/CEP_IONode_small.pnl @@ -22,25 +22,19 @@ PANEL,-1 -1 823 158 N "_3DFace" 1 nodeNr = $nodeNr; IONodeNr=nodeNr+(32*midplaneNr); // Midplaneindex + (32* nodeNr); - - if (IONodeNr < 10) { - baseDP+=\"_IONode0\"+IONodeNr; - } else { - baseDP+=\"_IONode\"+IONodeNr; - } - + baseDP+=\"_IONode\"+navFunct_formatInt(IONodeNr,99); string nodeName = navFunct_DPName2CEPName(baseDP); setValue(\"nodeName\",\"text\",\"Node: \"+nodeName); if(dpExists(baseDP + \".usedStation\")) { - dpConnect(\"controlIOnode\", baseDP + \".usedStation:_online.._value\", - baseDP + \".usedIP:_online.._value\", - baseDP + \".usedMAC:_online.._value\", - baseDP + \".usedStation:_online.._invalid\"); + dpConnect(\"controlIOnodeSmall\", baseDP + \".usedStation:_online.._value\", + baseDP + \".usedIP:_online.._value\", + baseDP + \".usedMAC:_online.._value\", + baseDP + \".usedStation:_online.._invalid\"); if (!navFunct_dpReachable(baseDP)) { controlIOnode(\"\",\"\",\"\",\"\",\"\",\"\",true); } - } + } // pass baseDP to selfstate Object to work with setValue(\"selfState.light\",\"toolTipText\",baseDP); @@ -50,10 +44,10 @@ PANEL,-1 -1 823 158 N "_3DFace" 1 } -void controlIOnode(string dp1, string station, - string dp2, string ipAddress, - string dp3, string macAddress, - string dp4, bool invalid) { +void controlIOnodeSmall(string dp1, string station, + string dp2, string ipAddress, + string dp3, string macAddress, + string dp4, bool invalid) { if (!invalid) { setValue(\"ipAddress\",\"text\",\"IP: \"+ipAddress); diff --git a/MAC/Navigator2/panels/objects/Hardware/CEP_Midplane_small.pnl b/MAC/Navigator2/panels/objects/Hardware/CEP_Midplane_small.pnl index 711d70202fe..8c2dfc13a6f 100644 --- a/MAC/Navigator2/panels/objects/Hardware/CEP_Midplane_small.pnl +++ b/MAC/Navigator2/panels/objects/Hardware/CEP_Midplane_small.pnl @@ -1,4 +1,4 @@ -V 10 +V 11 1 LANG:1 8 (NoName) PANEL,-1 -1 453 525 N "_3DFace" 1 @@ -17,17 +17,34 @@ PANEL,-1 -1 453 525 N "_3DFace" 1 baseDP += \"_BGP_Midplane\" + mNr; } - string aS = navFunct_DPName2CEPName(baseDP); - setValue(\"Midplane_Txt\",\"text\",aS); // pass baseDP to selfstate Object to work with setValue(\"selfState.light\",\"toolTipText\",baseDP); + if(dpExists(sysName+\"LOFAR_PIC_BGP.BGPSwitch\")) { + dpConnect(\"controlMidplane\", sysName+\"LOFAR_PIC_BGP.BGPSwitch:_online.._value\", + sysName+\"LOFAR_PIC_BGP.BGPSwitch:_online.._invalid\"); + if (!navFunct_dpReachable(\"LOFAR_PIC_BGP.BGPSwitch\")) { + controlMidplane(\"\",false,\"\",true); + } + } + // connect for childUpdates showChildState(baseDP); // connect for selfUpdates showSelfState(baseDP); -}" 0 + +} + +void controlMidplane(string dp1, bool bgpswitch, + string dp2, bool invalid) { + + if (!invalid) { + string aS = navFunct_DPName2CEPName(baseDP); + setValue(\"Midplane_Txt\",\"text\",aS); + } +} +" 0 E "main() { click(); @@ -221,12 +238,11 @@ E "main() { click(); }" 0 - 0 1 1 0 1 E U 0 E 27 175 86 192 + 0 1 1 0 1 E U 0 E 27 175 86 191 0 2 0 "0s" 0 0 0 192 0 0 27 175 1 1 -LANG:1 87 -*-Arial-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,697,0,0,0,0,0,0,0,0,Arial -0 "" -1 +LANG:1 26 Arial,-1,13,5,69,0,0,0,0,0 +0 1 LANG:1 8 Midplane 1 5 1 "" 1 0 @@ -259,7 +275,7 @@ LAYER, 7 1 LANG:1 6 Layer8 0 -3 1 "selfState" +3 1 "selfState" -1 "objects\\lofar_self_state.pnl" 363 291 T 87 0.8947368421052632 0 1 -298.7894736842105 -273 0 -0 \ No newline at end of file +0 diff --git a/MAC/Navigator2/panels/objects/Hardware/Station-2Cabinets.pnl b/MAC/Navigator2/panels/objects/Hardware/Station-2Cabinets.pnl index 46bb9c97bbb..2651deb7422 100644 --- a/MAC/Navigator2/panels/objects/Hardware/Station-2Cabinets.pnl +++ b/MAC/Navigator2/panels/objects/Hardware/Station-2Cabinets.pnl @@ -1,17 +1,17 @@ -V 10 +V 11 1 LANG:1 7 Station PANEL,-1 -1 980 784 N "_3DFace" 0 "main() { //get current database name to determine the station - string station = strrtrim(dpSubStr(g_currentDatapoint,DPSUB_SYS),\":\"); + string station = dpSubStr(g_currentDatapoint,DPSUB_SYS); - string mainStationDP=MainDBName+\"LOFAR_PIC_\"+navFunct_getRingFromStation(station)+\"_\"+station; + string stationDP=station+\"LOFAR_PIC_StationInfo\"; - if (dpExists(mainStationDP+\".power48On\") ){ - dpConnect(\"updatePower48\",mainStationDP+\".power48On\", - mainStationDP+\".power48On:_online.._invalid\"); + if (dpExists(stationDP+\".power48On\") ){ + dpConnect(\"updatePower48\",stationDP+\".power48On\", + stationDP+\".power48On:_online.._invalid\"); } else { setValue(\"power48On\",\"backCol\",\"Lofar_dpdoesnotexist\"); } @@ -59,195 +59,195 @@ LANG:1 0 1 "dashclr"N "_Transparent" E E 0 1 1 0 1 E 1 0 1 0 -10 2 0 3 "pictures/small-station-sized.PNG" 13434828 E 0 10 933 543 -1 2137 97 "" 2190 +1 2260 97 "" 2190 0 -1 2138 97 "" 2188 +1 2261 97 "" 2188 0 -1 2139 97 "86" 1 +1 2262 97 "86" 1 0 -1 2140 97 "" 2187 +1 2263 97 "" 2187 0 -1 2133 96 "" 2190 +1 2256 96 "" 2190 0 -1 2134 96 "" 2188 +1 2257 96 "" 2188 0 -1 2135 96 "86" 1 +1 2258 96 "86" 1 0 -1 2136 96 "" 2187 +1 2259 96 "" 2187 0 -1 2141 100 "" 914 +1 2264 100 "" 914 0 -1 2142 100 "" 901 +1 2265 100 "" 901 0 -1 2143 100 "" 908 +1 2266 100 "" 908 0 -1 2144 100 "" 907 +1 2267 100 "" 907 0 -1 2145 100 "" 906 +1 2268 100 "" 906 0 -1 2146 100 "" 905 +1 2269 100 "" 905 0 -1 2147 100 "" 904 +1 2270 100 "" 904 0 -1 2148 100 "" 903 +1 2271 100 "" 903 0 -1 2149 100 "" 902 +1 2272 100 "" 902 0 -1 2150 100 "" 0 +1 2273 100 "" 0 0 -1 2151 100 "" 909 +1 2274 100 "" 909 0 -1 2152 100 "1" 1 +1 2275 100 "1" 1 0 -1 2153 100 "" 912 +1 2276 100 "" 912 0 -1 2154 101 "" 914 +1 2277 101 "" 914 0 -1 2155 101 "" 901 +1 2278 101 "" 901 0 -1 2156 101 "" 908 +1 2279 101 "" 908 0 -1 2157 101 "" 907 +1 2280 101 "" 907 0 -1 2158 101 "" 906 +1 2281 101 "" 906 0 -1 2159 101 "" 905 +1 2282 101 "" 905 0 -1 2160 101 "" 904 +1 2283 101 "" 904 0 -1 2161 101 "" 903 +1 2284 101 "" 903 0 -1 2162 101 "" 902 +1 2285 101 "" 902 0 -1 2163 101 "" 0 +1 2286 101 "" 0 0 -1 2164 101 "" 909 +1 2287 101 "" 909 0 -1 2165 101 "1" 1 +1 2288 101 "1" 1 0 -1 2166 101 "" 912 +1 2289 101 "" 912 0 -1 2167 102 "" 914 +1 2290 102 "" 914 0 -1 2168 102 "" 901 +1 2291 102 "" 901 0 -1 2169 102 "" 908 +1 2292 102 "" 908 0 -1 2170 102 "" 907 +1 2293 102 "" 907 0 -1 2171 102 "" 906 +1 2294 102 "" 906 0 -1 2172 102 "" 905 +1 2295 102 "" 905 0 -1 2173 102 "" 904 +1 2296 102 "" 904 0 -1 2174 102 "" 903 +1 2297 102 "" 903 0 -1 2175 102 "" 902 +1 2298 102 "" 902 0 -1 2176 102 "" 0 +1 2299 102 "" 0 0 -1 2177 102 "" 909 +1 2300 102 "" 909 0 -1 2178 102 "1" 1 +1 2301 102 "1" 1 0 -1 2179 102 "" 912 +1 2302 102 "" 912 0 -1 2180 103 "" 0 +1 2303 103 "" 0 0 -1 2181 103 "" 13 +1 2304 103 "" 13 0 -1 2182 103 "" 15 +1 2305 103 "" 15 0 -1 2183 103 "" 16 +1 2306 103 "" 16 0 -1 2184 103 "" 18 +1 2307 103 "" 18 0 -1 2185 103 "" 19 +1 2308 103 "" 19 0 -1 2186 103 "" 20 +1 2309 103 "" 20 0 -1 2187 103 "" 21 +1 2310 103 "" 21 0 -1 2188 103 "" 22 +1 2311 103 "" 22 0 -1 2189 103 "" 24 +1 2312 103 "" 24 0 -1 2190 103 "" 25 +1 2313 103 "" 25 0 -1 2191 103 "" 26 +1 2314 103 "" 26 0 -1 2192 103 "" 27 +1 2315 103 "" 27 0 -1 2193 103 "" 28 +1 2316 103 "" 28 0 -1 2194 103 "" 29 +1 2317 103 "" 29 0 -1 2195 103 "" 30 +1 2318 103 "" 30 0 -1 2196 103 "" 31 +1 2319 103 "" 31 0 -1 2197 103 "" 32 +1 2320 103 "" 32 0 -1 2198 103 "" 33 +1 2321 103 "" 33 0 -1 2199 103 "" 34 +1 2322 103 "" 34 0 -1 2200 103 "" 35 +1 2323 103 "" 35 0 -1 2201 103 "" 36 +1 2324 103 "" 36 0 -1 2202 103 "" 38 +1 2325 103 "" 38 0 -1 2203 103 "" 39 +1 2326 103 "" 39 0 -1 2204 104 "" 0 +1 2327 104 "" 0 0 -1 2205 104 "" 13 +1 2328 104 "" 13 0 -1 2206 104 "" 15 +1 2329 104 "" 15 0 -1 2207 104 "" 16 +1 2330 104 "" 16 0 -1 2208 104 "" 18 +1 2331 104 "" 18 0 -1 2209 104 "" 19 +1 2332 104 "" 19 0 -1 2210 104 "" 20 +1 2333 104 "" 20 0 -1 2211 104 "" 21 +1 2334 104 "" 21 0 -1 2212 104 "" 22 +1 2335 104 "" 22 0 -1 2213 104 "" 24 +1 2336 104 "" 24 0 -1 2214 104 "" 25 +1 2337 104 "" 25 0 -1 2215 104 "" 26 +1 2338 104 "" 26 0 -1 2216 104 "" 27 +1 2339 104 "" 27 0 -1 2217 104 "" 28 +1 2340 104 "" 28 0 -1 2218 104 "" 29 +1 2341 104 "" 29 0 -1 2219 104 "" 30 +1 2342 104 "" 30 0 -1 2220 104 "" 31 +1 2343 104 "" 31 0 -1 2221 104 "" 32 +1 2344 104 "" 32 0 -1 2222 104 "" 33 +1 2345 104 "" 33 0 -1 2223 104 "" 34 +1 2346 104 "" 34 0 -1 2224 104 "" 35 +1 2347 104 "" 35 0 -1 2225 104 "" 36 +1 2348 104 "" 36 0 -1 2226 104 "" 38 +1 2349 104 "" 38 0 -1 2227 104 "" 39 +1 2350 104 "" 39 0 7 2132 "power48On" @@ -263,53 +263,53 @@ LANG:1 19 48 Volt PowerSupply 1 "dashclr"N "_Transparent" E E 0 1 1 2 1 E 1.190082644628099 0 1.190082644628099 472.7438016528926 -374.2975206611569 1 E 75 575 5 5 -1 2228 105 "" 0 +1 2351 105 "" 0 0 -1 2229 105 "" 13 +1 2352 105 "" 13 0 -1 2230 105 "" 15 +1 2353 105 "" 15 0 -1 2231 105 "" 16 +1 2354 105 "" 16 0 -1 2232 105 "" 18 +1 2355 105 "" 18 0 -1 2233 105 "" 19 +1 2356 105 "" 19 0 -1 2234 105 "" 20 +1 2357 105 "" 20 0 -1 2235 105 "" 21 +1 2358 105 "" 21 0 -1 2236 105 "" 22 +1 2359 105 "" 22 0 -1 2237 105 "" 24 +1 2360 105 "" 24 0 -1 2238 105 "" 25 +1 2361 105 "" 25 0 -1 2239 105 "" 26 +1 2362 105 "" 26 0 -1 2240 105 "" 27 +1 2363 105 "" 27 0 -1 2241 105 "" 28 +1 2364 105 "" 28 0 -1 2242 105 "" 29 +1 2365 105 "" 29 0 -1 2243 105 "" 30 +1 2366 105 "" 30 0 -1 2244 105 "" 31 +1 2367 105 "" 31 0 -1 2245 105 "" 32 +1 2368 105 "" 32 0 -1 2246 105 "" 33 +1 2369 105 "" 33 0 -1 2247 105 "" 34 +1 2370 105 "" 34 0 -1 2248 105 "" 35 +1 2371 105 "" 35 0 -1 2249 105 "" 36 +1 2372 105 "" 36 0 -1 2250 105 "" 38 +1 2373 105 "" 38 0 -1 2251 105 "" 39 +1 2374 105 "" 39 0 2 2252 "PRIMITIVE_TEXT10" @@ -324,12 +324,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 585 89 600 99 +E E 0 1 1 2 1 E U 1 E 585 89 600 98 0 2 2 "0s" 0 0 0 192 0 0 585 89 1 1 -LANG:1 100 -*-MS Shell Dlg-bold-r-normal-*-*-60-100-100-*-*-iso8859-1|-8,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 32 MS Shell Dlg,-1,8,5,75,0,0,0,0,0 +0 1 LANG:1 3 pps 2 2253 "PRIMITIVE_TEXT11" @@ -344,12 +343,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 620 220 648 230 +E E 0 1 1 2 1 E U 1 E 620 220 648 229 0 2 2 "0s" 0 0 0 192 0 0 620 220 1 1 -LANG:1 100 -*-MS Shell Dlg-bold-r-normal-*-*-60-100-100-*-*-iso8859-1|-8,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 32 MS Shell Dlg,-1,8,5,75,0,0,0,0,0 +0 1 LANG:1 5 LCU-1 2 2254 "PRIMITIVE_TEXT12" @@ -364,12 +362,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 600 232 671 242 +E E 0 1 1 2 1 E U 1 E 600 232 671 241 0 2 2 "0s" 0 0 0 192 0 0 600 232 1 1 -LANG:1 100 -*-MS Shell Dlg-bold-r-normal-*-*-60-100-100-*-*-iso8859-1|-8,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 32 MS Shell Dlg,-1,8,5,75,0,0,0,0,0 +0 1 LANG:1 16 Extendable table 2 2255 "PRIMITIVE_TEXT13" @@ -384,12 +381,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 622 257 648 267 +E E 0 1 1 2 1 E U 1 E 622 257 648 266 0 2 2 "0s" 0 0 0 192 0 0 622 257 1 1 -LANG:1 100 -*-MS Shell Dlg-bold-r-normal-*-*-60-100-100-*-*-iso8859-1|-8,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 32 MS Shell Dlg,-1,8,5,75,0,0,0,0,0 +0 1 LANG:1 5 Cover 0 LAYER, 1 @@ -420,39 +416,39 @@ LAYER, 7 1 LANG:1 6 Layer8 0 -3 96 "PANEL_REF97" +3 96 "PANEL_REF97" -1 "objects\\Hardware\\Station_Cabinet_small.pnl" 358 358 T 860 1 0 1 -46 -180 1 "$CabinetNr""0" -3 97 "PANEL_REF98" +3 97 "PANEL_REF98" -1 "objects\\Hardware\\Station_Cabinet_small.pnl" 358 458 T 861 1 0 1 163 -280 1 "$CabinetNr""1" -3 100 "PANEL_REF101" +3 100 "PANEL_REF101" -1 "objects\\Hardware\\Station_Subrack_small.pnl" 288 620 T 864 1 0 1 -136 -353 2 "$CabinetNr""0" "$SubrackNr""0" -3 101 "PANEL_REF102" +3 101 "PANEL_REF102" -1 "objects\\Hardware\\Station_Subrack_small.pnl" 248 670 T 865 1 0 1 -96 -221 2 "$CabinetNr""0" "$SubrackNr""1" -3 102 "PANEL_REF103" +3 102 "PANEL_REF103" -1 "objects\\Hardware\\Station_Subrack_small.pnl" 258 620 T 866 1 0 1 102 -353 2 "$CabinetNr""1" "$SubrackNr""2" -3 103 "PANEL_REF104" +3 103 "PANEL_REF104" -1 "objects\\Hardware\\Cabinet_Top.pnl" 140 540 T 867 1 0 1 0 -14.99999999999997 1 "$CabinetNr""0" -3 104 "PANEL_REF105" +3 104 "PANEL_REF105" -1 "objects\\Hardware\\Cabinet_Top.pnl" 360 540 T 868 1 0 1 -10 -15 1 "$CabinetNr""1" -3 105 "PANEL_REF106" +3 105 "PANEL_REF106" -1 "objects\\Hardware\\Cabinet_Top.pnl" 140 540 T 878 1 0 1 420 -14.99999999999997 1 "$CabinetNr""3" -0 \ No newline at end of file +0 diff --git a/MAC/Navigator2/panels/objects/Hardware/midplane_small.pnl b/MAC/Navigator2/panels/objects/Hardware/midplane_small.pnl index 8ce41b0a65f..67f982d30f5 100644 --- a/MAC/Navigator2/panels/objects/Hardware/midplane_small.pnl +++ b/MAC/Navigator2/panels/objects/Hardware/midplane_small.pnl @@ -1,24 +1,39 @@ -V 10 +V 11 1 LANG:1 0 PANEL,-1 -1 500 400 N "_3DFace" 0 "main() { - baseDP = g_currentDatapoint; + baseDP = g_currentDatapoint; - string aS = navFunct_DPName2CEPName(baseDP); - - setValue(\"midplaneName\",\"text\",aS); // pass baseDP to selfstate Object to work with setValue(\"selfState.light\",\"toolTipText\",baseDP); - + if(dpExists(sysName+\"LOFAR_PIC_BGP.BGPSwitch\")) { + dpConnect(\"controlMidplane\", sysName+\"LOFAR_PIC_BGP.BGPSwitch:_online.._value\", + sysName+\"LOFAR_PIC_BGP.BGPSwitch:_online.._invalid\"); + if (!navFunct_dpReachable(\"LOFAR_PIC_BGP.BGPSwitch\")) { + controlMidplane(\"\",false,\"\",true); + } + } + // connect for childUpdates showChildState(baseDP); // connect for selfUpdates - showSelfState(baseDP); -}" 0 + showSelfState(baseDP); + +} + +void controlMidplane(string dp1, bool bgpswitch, + string dp2, bool invalid) { + + if (!invalid) { + string aS = navFunct_DPName2CEPName(baseDP); + setValue(\"midplaneName\",\"text\",aS); + } +} +" 0 E E E E 1 -1 -1 0 0 0 ""0 1 E "#uses \"navPanel.ctl\" @@ -47,12 +62,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 42 2.000000000000199 178 19 +E E 0 1 1 2 1 E U 1 E 42 2.000000000000199 178 18 0 2 2 "0s" 0 0 0 192 0 0 42 2.000000000000199 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,13,5,75,0,0,0,0,0 +0 1 LANG:1 18 Midplane: R00-M00 0 LAYER, 1 @@ -83,7 +97,7 @@ LAYER, 7 1 LANG:1 0 0 -3 0 "selfState" +3 0 "selfState" -1 "objects\\lofar_self_state.pnl" 358 18 T 0 1 0 1 -350 -18.9999999999998 0 -0 \ No newline at end of file +0 diff --git a/MAC/Navigator2/panels/objects/Processes/BGPProc.pnl b/MAC/Navigator2/panels/objects/Processes/BGPProc.pnl deleted file mode 100644 index 93f6f2851af..00000000000 --- a/MAC/Navigator2/panels/objects/Processes/BGPProc.pnl +++ /dev/null @@ -1,652 +0,0 @@ -V 10 -1 -LANG:1 13 IONode detail -PANEL,-1 -1 1003 784 N "_3DFace" 4 -"$adderList" -"$inputBufferList" -"$station" -"$stationList" -"main() -{ - // Initialise the Panel - navPanel_initPanel(\"fw_viewBox\"); - - baseDP = g_currentDatapoint; - - adderList = $adderList; - stationList = $stationList; - inputBufferList = $inputBufferList; - - DebugN(\"BGPProc_surveys.pnl:main|stationList: \"+stationList); - DebugN(\"BGPProc_surveys.pnl:main|InputBufferList: \"+inputBufferList); - DebugN(\"BGPProc_surveys.pnl:main|AdderList: \"+adderList); - LOG_DEBUG(\"BGPProc_surveys.pnl:main|stationList: \"+stationList); - LOG_DEBUG(\"BGPProc_surveys.pnl:main|InputBufferList: \"+inputBufferList); - LOG_DEBUG(\"BGPProc_surveys.pnl:main|AdderList: \"+adderList); - - // get position of station in dynArray to see what inputNodes and adders belong to this screen - int idx = dynContains(stationList,$station); - if (idx > 0) { - inputbuffer=navFunct_listToDynString(inputBufferList[idx]); - adder=navFunct_listToDynString(adderList[idx]); - } else { - LOG_ERROR(\"BGPProc_surveys.pnl:main|ERROR: Station not in stationList !!!\"); - } - LOG_DEBUG(\"BGPProc_surveys.pnl:main|inputbuffer: \"+inputbuffer); - LOG_DEBUG(\"BGPProc_surveys.pnl:main|adder: \"+adder); - - - - // In the database we can find the IONode involved per stationName, so lets - // get that nodeName - string nodeName = navFunct_stationNameToIONode($station); - - DebugN(\"Station: \",$station); - DebugN(\"nodeName: \",nodeName); - - - LOG_DEBUG(\"BGPProc_surveys.pnl:main|nodeName working: \"+nodeName); - - // if no match found we have an error - if (nodeName == \"\" || $station == \"\") { - LOG_ERROR(\"BGPProc.pnl:main| ERROR no station or IONode-name found, can't view running processes\"); - } else { - - // we have to set the stripped inputBuffer List and Adder List here. - // Since this is the Survey mode we only need one InputBuffer and one Adder - dpSet(DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.objectName\",\"CircularBuffer\", - DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.paramList\",makeDynString(inputbuffer)); - dpSet(DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.objectName\",\"Adder\", - DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.paramList\",makeDynString(adder)); - - - LOG_DEBUG(\"BGPProc.pnl:main|Station: \"+$station); - - setValue(\"ionode\",\"text\",\"IONode: \"+nodeName); - setValue(\"stationLabel\",\"text\",$station); - } - // pass baseDP to selfstate Object to work with - setValue(\"selfState.light\",\"toolTipText\",baseDP); - - - - // start the logging process - navPanel_showLogging(baseDP); - - // connect for selfUpdates - showSelfState(baseDP); - - reload(); -} - - -void prepareProcesses() { - dyn_string result; - - dynAppend(result,\",BGPProc,\"+baseDP); - dynAppend(g_processesList,baseDP); - - - // write result to the db so various panels can reset themselves - dpSet(DPNAME_NAVIGATOR + g_navigatorID + \".processesList\",result); - - LOG_DEBUG(\"BGPProc_surveys.pnl:prepareProcesses|processList found: \"+ result); - -} -// -// Callback for dpConnect to action point. -// If there is an action required this point will tell so -// -void doAction(string aDP, string anAction) { - LOG_DEBUG(\"BGPProc_surveys.pnl:doAction| Action required. found: \" + anAction); - // split action into essentials - dyn_string actionString; - if (!navFunct_splitAction(anAction,actionString)) { - return; - } - - LOG_DEBUG(\"BGPProc_surveys.pnl:doAction|found actionString: \" + actionString); - - // Reload - if (actionString[1] == \"Reload\") { - reload(); - } -} - -void reload() { - - navFunct_clearGlobalLists(); - - // set the hardware selectable items for this screen - prepareProcesses(); - - // set panel to ready - g_objectReady=true; - - // trigger that the panel values are calculated and ready - navPanel_setEvent(\"BGPProc_surveys.pnl\",\"Update\"); - -}" 0 - E E E E 1 0 0 0 0 0 -""0 1 -E "#uses \"navPanel.ctl\" - -dyn_string inputBufferList; -dyn_string adderList; -dyn_string stationList; - -dyn_string inputbuffer=\"\"; -dyn_string adder=\"\"; - -string baseDP = \"\"; -int ioNr; -" 0 - 2 -"CBRef" "1" -"EClose" E -"" -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 211 -"RECTANGLE1" -"" -1 40 110 E E E 1 E 1 E N {0,0,0} E N "_Transparent" E E - E E -106 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 100 42 1 E 40 110 660 520 -6 212 -"RECTANGLE2" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -107 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 50 24 1 E 740 230 789 279 -2 225 -"PRIMITIVE_TEXT1" -"" -1 864 234 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E -131 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 864 234 949 248 -0 2 2 "0s" 0 0 0 192 0 0 864 234 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 -LANG:1 12 ComputeNodes -2 228 -"ionode" -"" -1 339 132 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E -135 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 339 132 546 153 -0 2 2 "0s" 0 0 0 192 0 0 339 132 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-16-*-100-100-*-*-iso8859-1|-16,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 -LANG:1 22 IONode: R00-M0-N00-J00 -6 230 -"RECTANGLE18" -"" -1 150 40 E E E 1 E 1 E N "_Transparent" E N "_Transparent" E E - E E -137 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 50 -18 2 1 0 "pictures/arrowRight.gif" 4294967295 E 30 240 104 314 -6 231 -"RECTANGLE19" -"" -1 150 40 E E E 1 E 1 E N "_Transparent" E N "_Transparent" E E - E E -139 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 180 222 2 1 0 "pictures/arrowRight.gif" 4294967295 E 570 30 619 79 -6 232 -"RECTANGLE20" -"" -1 150 40 E E E 1 E 1 E N "_Transparent" E N "_Transparent" E E - E E -141 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 180 372 2 1 0 "pictures/arrowLeft.gif" 4294967295 E 570 30 619 79 -6 233 -"RECTANGLE21" -"" -1 150 40 E E E 1 E 1 E N "_Transparent" E N "_Transparent" E E - E E -143 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 0.9999999999999999 50 182 2 1 0 "pictures/arrowLeft.gif" 4294967295 E 30 240 104 314 -1 348 51 "" 1 -0 -6 288 -"RECTANGLE23" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -226 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 100 24 1 E 740 230 789 279 -6 289 -"RECTANGLE24" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -228 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 150 24 1 E 740 230 789 279 -6 290 -"RECTANGLE25" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -230 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 200 24 1 E 740 230 789 279 -6 291 -"RECTANGLE26" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -232 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 50 74 1 E 740 230 789 279 -6 292 -"RECTANGLE27" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -234 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 100 74 1 E 740 230 789 279 -6 293 -"RECTANGLE28" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -236 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 150 74 1 E 740 230 789 279 -6 294 -"RECTANGLE29" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -238 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 200 74 1 E 740 230 789 279 -6 295 -"RECTANGLE30" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -240 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 50 124 1 E 740 230 789 279 -6 296 -"RECTANGLE31" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -242 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 100 124 1 E 740 230 789 279 -6 297 -"RECTANGLE32" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -244 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 150 124 1 E 740 230 789 279 -6 298 -"RECTANGLE33" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -246 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 200 124 1 E 740 230 789 279 -6 299 -"RECTANGLE34" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -248 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 50 174 1 E 740 230 789 279 -6 300 -"RECTANGLE35" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -250 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 100 174 1 E 740 230 789 279 -6 301 -"RECTANGLE36" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -252 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 150 174 1 E 740 230 789 279 -6 302 -"RECTANGLE37" -"" -1 760 220 E E E 1 E 1 E N {0,0,0} E N "STD_object_background" E E - E E -254 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 200 174 1 E 740 230 789 279 -1 349 52 "" 226 -0 -1 350 52 "" 229 -0 -1 351 52 "" 234 -0 -1 352 52 "" 235 -0 -1 353 52 "" 236 -0 -1 354 52 "" 237 -0 -1 355 52 "" 238 -0 -1 356 52 "" 239 -0 -1 357 52 "" 240 -0 -1 358 52 "" 241 -0 -1 359 52 "" 242 -0 -1 360 52 "" 243 -0 -1 361 52 "" 244 -0 -1 362 52 "" 245 -0 -1 363 52 "" 246 -0 -1 364 52 "" 247 -0 -1 365 52 "51" 1 -0 -1 366 52 "" 249 -0 -1 367 52 "" 250 -0 -1 368 52 "" 251 -0 -1 369 52 "" 252 -0 -1 370 52 "" 253 -0 -1 371 52 "" 254 -0 -1 372 52 "" 255 -0 -1 373 52 "" 261 -0 -1 374 52 "" 262 -0 -1 375 52 "" 263 -0 -1 376 52 "" 264 -0 -1 377 52 "" 265 -0 -1 378 52 "" 279 -0 -1 379 52 "" 280 -0 -1 380 52 "" 281 -0 -1 381 52 "" 282 -0 -1 382 52 "" 283 -0 -1 383 53 "" 227 -0 -1 384 53 "51" 1 -0 -1 385 53 "" 256 -0 -1 386 53 "" 266 -0 -1 387 53 "" 267 -0 -1 388 53 "" 268 -0 -1 389 53 "" 269 -0 -1 390 53 "" 270 -0 -2 346 -"stationLabel" -"" -1 15 247 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E -255 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 15 247 63 268 -0 2 2 "0s" 0 0 0 192 0 0 15 247 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-16-*-100-100-*-*-iso8859-1|-16,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 -LANG:1 5 CSxxx -2 347 -"storageLabel" -"" -1 15 450 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E -257 0 0 0 0 0 -E E E -0 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 15 450 73 471 -0 2 2 "0s" 0 0 0 192 0 0 15 450 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-16-*-100-100-*-*-iso8859-1|-16,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 -LANG:1 7 Storxxx -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 -3 51 "selfState" -"objects\\lofar_self_state.pnl" 678 158 T 169 1 0 1 -537 -4 -0 -3 52 "PANEL_REF53" -"objects\\Processes\\circularBuffer.pnl" 90 160 T 255 1 0 1 50 -5 -1 -"$objectNumber""0" -3 53 "PANEL_REF54" -"objects\\Processes\\adder.pnl" 90 360 T 255 1 0 1 50 2 -1 -"$objectNumber""0" -0 \ No newline at end of file diff --git a/MAC/Navigator2/panels/objects/Processes/ObsSW_CEP.pnl b/MAC/Navigator2/panels/objects/Processes/ObsSW_CEP.pnl index 3b5bb9e71ec..a8f3ffc2d91 100644 --- a/MAC/Navigator2/panels/objects/Processes/ObsSW_CEP.pnl +++ b/MAC/Navigator2/panels/objects/Processes/ObsSW_CEP.pnl @@ -5,7 +5,6 @@ PANEL,-1 -1 994 293 N "_3DFace" 0 "main() { baseDP=g_currentDatapoint; - setValue(\"CEPDBNAME\",\"text\",navFunct_bareDBName(CEPDBName)+\":\"); }" 0 E E E E 1 -1 -1 0 0 0 ""0 1 @@ -196,16 +195,6 @@ LANG:1 6 logMsg 0 1 170 15 "" 2 0 -1 172 16 "" 4 -0 -1 173 16 "" 3 -0 -1 174 16 "0" 1 -0 -1 176 16 "" 6 -0 -1 175 16 "" 2 -0 2 113 "observationName" "" @@ -226,7 +215,7 @@ LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 0 1 LANG:1 11 observation 2 144 -"CEPDBNAME" +"PRIMITIVE_TEXT7" "" 1 176 20 E E E 1 E 1 E N "Blue" E N "_Transparent" E E E E @@ -296,6 +285,16 @@ void stationCallback(string dp1, bool aTrig) { } } } " 0 +1 172 16 "" 4 +0 +1 173 16 "" 3 +0 +1 174 16 "0" 1 +0 +1 176 16 "" 6 +0 +1 175 16 "" 2 +0 0 LAYER, 1 1 @@ -330,9 +329,9 @@ LANG:1 0 2 "$databaselevel""ccu" "$name""OnlineControl_BGPAppl" -3 16 "PANEL_REF17" -1 -"objects\\Processes\\interactive_controller_small.pnl" 180 140 T 28 1 0 1 -10 -50 +3 16 "PANEL_REF16" -1 +"objects\\Processes\\interactive_controller_small.pnl" 170 90 T 44 U 2 "$databaselevel""ccu" -"$name""OnlineControl_StorageAppl" +"$name""PythonControl" 0 diff --git a/MAC/Navigator2/panels/objects/Processes/ObsSW_Main.pnl b/MAC/Navigator2/panels/objects/Processes/ObsSW_Main.pnl index 02c37a7f740..728aacf5353 100644 --- a/MAC/Navigator2/panels/objects/Processes/ObsSW_Main.pnl +++ b/MAC/Navigator2/panels/objects/Processes/ObsSW_Main.pnl @@ -112,14 +112,14 @@ E E E LANG:1 19 Active Observations 8 -"frameShadow" "enum 48" -"selectionMode" "enum 0" -"backgroundOrigin" "enum 0" -"defaultRenameAction" "enum 0" -"frameShape" "enum 6" -"vScrollBarMode" "enum 0" -"hScrollBarMode" "enum 0" "resizeMode" "enum 0" +"hScrollBarMode" "enum 0" +"vScrollBarMode" "enum 0" +"frameShape" "enum 6" +"defaultRenameAction" "enum 0" +"backgroundOrigin" "enum 0" +"selectionMode" "enum 0" +"frameShadow" "enum 48" 1 LANG:1 37 MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 0 820 20 989 375 @@ -287,45 +287,35 @@ LANG:1 6 logMsg 0 1 154 15 "" 2 0 -1 156 16 "" 4 +1 156 17 "" 4 0 -1 157 16 "" 3 +1 157 17 "" 3 0 -1 158 16 "0" 1 +1 158 17 "0" 1 0 -1 160 16 "" 6 +1 160 17 "" 6 0 -1 159 16 "" 2 +1 159 17 "" 2 0 -1 161 17 "" 4 +1 161 18 "" 4 0 -1 162 17 "" 3 +1 162 18 "" 3 0 -1 163 17 "0" 1 +1 163 18 "0" 1 0 -1 165 17 "" 6 +1 165 18 "" 6 0 -1 164 17 "" 2 +1 164 18 "" 2 0 -1 166 18 "" 4 +1 166 19 "" 4 0 -1 167 18 "" 3 +1 167 19 "" 3 0 -1 168 18 "0" 1 +1 168 19 "0" 1 0 -1 170 18 "" 6 +1 170 19 "" 6 0 -1 169 18 "" 2 -0 -1 171 19 "" 4 -0 -1 172 19 "" 3 -0 -1 173 19 "0" 1 -0 -1 175 19 "" 6 -0 -1 174 19 "" 2 +1 169 19 "" 2 0 2 79 "mainDBName" @@ -431,6 +421,16 @@ LANG:1 0 1 "dashclr"N "_Transparent" E E 0 2 1 2 1 E 290 96 810 96 +1 171 20 "" 4 +0 +1 172 20 "" 3 +0 +1 173 20 "0" 1 +0 +1 175 20 "" 6 +0 +1 174 20 "" 2 +0 0 LAYER, 1 1 @@ -470,11 +470,6 @@ LANG:1 0 2 "$databaselevel""ccu" "$name""OnlineControl_BGPAppl" -3 16 "PANEL_REF17" -1 -"objects\\Processes\\interactive_controller_small.pnl" 180 140 T 28 1 0 1 -7 14 -2 -"$databaselevel""ccu" -"$name""OnlineControl_StorageAppl" 3 17 "PANEL_REF18" -1 "objects\\Processes\\interactive_controller_small.pnl" 180 200 T 29 1 0 1 -7 23 2 @@ -490,4 +485,9 @@ LANG:1 0 2 "$databaselevel""station" "$name""TBBControl" +3 20 "PANEL_REF20" -1 +"objects\\Processes\\interactive_controller_small.pnl" 170 90 T 43 1 0 1 3 63 +2 +"$databaselevel""ccu" +"$name""PythonControl" 0 diff --git a/MAC/Navigator2/panels/objects/Processes/adder.pnl b/MAC/Navigator2/panels/objects/Processes/adder.pnl index dc06dbeed5c..b657a63e302 100644 --- a/MAC/Navigator2/panels/objects/Processes/adder.pnl +++ b/MAC/Navigator2/panels/objects/Processes/adder.pnl @@ -1,74 +1,88 @@ -V 10 +V 11 1 LANG:1 5 Adder -PANEL,-1 -1 631 221 N "_3DFace" 1 -"$objectNumber" +PANEL,-1 -1 1047 192 N "_3DFace" 2 +"$adderNumber" +"$nodeDP" "main() { - baseDP = g_currentDatapoint; - database = dpSubStr(baseDP,DPSUB_SYS); + baseDP = $nodeDP; - panelName=\"Adder\"; - - // check if the required datapoint for this view are enabled and accessible - if (dpExists(DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.objectName\") ){ - if (dpConnect(\"updateTrigger\", DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.objectName:_online.._value\", - DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.paramList:_online.._value\", - DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.objectName:_online.._invalid\") == -1) { - LOG_ERROR(\"adder.pnl:main|Couldn't connect to: \"+DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.objectName \"+ getLastError() ); - } + // determine adderNumber + adderNr=$adderNumber; + + // baseDp is something like CCU001:LOFAR_PIC_BGP_Midplane[x]_IONode[xx]\"] + // for the Adders it needs to point to: LOFAR_ObsSW_OSIOnode[xx]_Adder[xx] + + int pos = strpos(baseDP,\"IONode\"); + if (pos < 0) { + LOG_ERROR(\"adder.pnl:main|Couldn't find IONode in baseDP: \"+baseDP); + return; } else { - LOG_ERROR(\"adder.pnl:main|Couldn't find DP to connect to: \"+DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.objectName\" ); - } -} + string ioNr=substr(baseDP,pos+6,2); + baseDP=sysName+\"LOFAR_ObsSW_OSIONode\"+ioNr; + } -void updateTrigger( string dp1, string objectName, - string dp2, dyn_string paramList, - string dp3, bool invalid) { - if (objectName == panelName) { - LOG_TRACE(\"adder.pnl:updateTrigger|objectName: \"+objectName+ - \" panelName: \"+ panelName); - - // determine adderNumber - objectNr=$objectNumber; + adderDP = baseDP+\"_Adder\"+adderNr; + + dpGet(adderDP+\".locusNode\",locusNr); + dpGet(adderDP+\".writer\",writerNr); - int bufNr = -1; - if (dynlen(paramList) <= 1+objectNr && paramList[1+objectNr] < 127) { - bufNr=paramList[1+objectNr];; - adderDP=database+\"Adder\"+bufNr; + setValue(\"addernr_text\",\"text\",adderNr); + + writerDP = sysName+\"LOFAR_ObwSW_OSLocusNode\"+navFunct_formatInt(locusNr,999)+\"_Writer\"+navFunct_formatInt(writerNr,99); + setValue(\"writerNr_text\",\"text\",\"Writer\"+navFunct_formatInt(writerNr,99)); + setValue(\"writerNr_text\",\"toolTipText\",writerDP); - // connect to the adder values - // check if the requiered datapoint for this view are enabled and accessible - if (dpExists(adderDP + \".dropping\")) { - if (dpConnect(\"updateAdder\", adderDP + \".dropping\", - adderDP + \".nrBlocksDropped\", - adderDP + \".dropping:_online.._invalid\") == -1) { - LOG_ERROR(\"adder.pnl:main|Couldn't connect to: \"+adderDP+\" \"+getLastError()); - } - } else { - LOG_ERROR(\"adder.pnl:main|Couldn't find DP to connect to: \"+adderDP + \".dropping\"); - setValue(\"dropping\", \"foreCol\", \"Lofar_dpdoesnotexist\"); - setValue(\"nrBlocksDropped\", \"backCol\", \"Lofar_dpdoesnotexist\"); - } + LOG_DEBUG(\"adder.pnl:main|adderDP: \"+adderDP); + LOG_DEBUG(\"adder.pnl:main|writerDP: \"+writerDP); + + // connect to the adder values + // check if the requiered datapoint for this view are enabled and accessible + if (dpExists(adderDP + \".dropping\")) { + if (dpConnect(\"updateAdder\", adderDP + \".dropping\", + adderDP + \".dropped\", + adderDP + \".process.error\", + adderDP + \".process.currentAction\", + adderDP + \".process.logMsg\", + adderDP + \".dropping:_online.._invalid\") == -1) { + LOG_ERROR(\"adder.pnl:main|Couldn't connect to: \"+adderDP+\" \"+getLastError()); + } + } else { + LOG_ERROR(\"adder.pnl:main|Couldn't find DP to connect to: \"+adderDP + \".dropping\"); + setValue(\"dropping\", \"foreCol\", \"Lofar_dpdoesnotexist\"); + setValue(\"nrBlocksDropped\", \"backCol\", \"Lofar_dpdoesnotexist\"); + } - // pass baseDP to selfstate Object to work with - setValue(\"selfState.light\",\"toolTipText\",adderDP); - // connect for selfUpdates - showSelfState(adderDP); + // pass baseDP to selfstate Object to work with + setValue(\"selfState.light\",\"toolTipText\",adderDP); + // connect for selfUpdates + showSelfState(adderDP); - } else { - LOG_ERROR(\"adder.pnl:main|adderList out of range or invalid adderDP\"); - } - } } updateAdder(string dp1, bool dropping, - string dp2, int nrBlocksDropped, - string dp3, bool invalid) + string dp2, int nrBlocksDropped, + string dp3, string error, + string dp4, string currentAction, + string dp5, string logMsg, + string dp6, bool invalid) { LOG_DEBUG(\"adder.pnl:updateAdder|entered\"); if (!invalid) { + myTable.deleteAllLines(); + // check if error == \"Not running\"; + // if true then the name of the process is red, otherwise black + if (error == \"Not running\") { + addernr_text.foreCol() = \"Lofar_broken\"; + } else { + addernr_text.foreCol() = \"_3DText\"; + } + setValue(\"dropping\", \"backCol\", \"_Window\"); + setValue(\"nrBlocksDropped\", \"backCol\", \"_Window\"); + + myTable.appendLine(\"error\",error,\"currentAction\",currentAction,\"logMsg\",navFunct_getLogColor(logMsg,navFunct_getLogLevel(logMsg))); if (dropping) { setValue(\"dropping\", \"backCol\", \"red\"); } else { @@ -81,19 +95,72 @@ updateAdder(string dp1, bool dropping, } } " 0 - E E E E 1 0 0 0 0 0 + E "main() +{ + click(adderDP); +}" 0 + "main(int row, string column) +{ + rClick(adderDP); +}" 0 + "main(int row, string column) +{ + dblClick(adderDP); +}" 0 + 1 0 0 0 0 0 ""0 1 E "#uses \"navPanel.ctl\" -string ksp=\"\"; string adder=\"\"; -string database=\"\"; -string panelName=\"\"; string baseDP = \"\"; string adderDP=\"\"; -int objectNr=0; -" 0 +string writerDP=\"\"; + + +int adderNr=-1; +int locusNr=-1; +int writerNr=-1; + +bool bDoubleClicked = false; + +// routine for single mouse click +void click(string dp) { + // set delay in case double click was meant + delay(0, 100); + if (!bDoubleClicked) { + string event=\"\"; + if (dp == writerDP) { + event = \"Writer\"+navFunct_formatInt(writerNr,99); + } else if (dp == adderDP) { + event = \"Adder\"+adderNr; + } else { + event = \"adder.pnl\"; + } + navPanel_setEvent(event,\"EventClick\"); + } +} + +// routine for double mouse click +void dblClick(string dp) { + // indicate this is a doubleClick + bDoubleClicked = true; + + if (dpExists(dp) ) { + LOG_DEBUG(\"adder.pnl:DoubleClick|Setting currentDatapoint from : \"+g_currentDatapoint+\" to \"+dp); + g_currentDatapoint=dp; + navPanel_setEvent(\"adder.pnl\",\"ChangePanel\"); + } + // set delay to avoid click event will be triggered + delay(0, 500); + bDoubleClicked = false; +} + +// routine for right mouse click +void rClick(string dp) { + navPanel_setEvent(\"adder.pnl\",\"EventRightClick\"); +} + " 0 2 "CBRef" "1" "EClose" E @@ -102,12 +169,20 @@ 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 227 -"RECTANGLE16" +6 280 +"writer_highLight" "" -1 120 180 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E -134 0 0 0 0 0 +1 240 10 E E E 1 E 0 E N "_Transparent" E N "Lofar_highLight" E E + "main() +{ + rClick(writerDP); +}" 0 + "main() +{ + dblClick(writerDP); +}" 0 + +208 0 0 0 0 0 E E E 0 1 @@ -115,15 +190,44 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 10 22 610 195 -1 271 51 "" 1 -0 -2 256 -"PRIMITIVE_TEXT14" +"main() +{ + dpConnect( \"writerCallback\",true,DPNAME_NAVIGATOR + g_navigatorID +\".objectTrigger\" ); +} + +void writerCallback(string dp1, bool aTrig) { + + LOG_DEBUG(\"adder.pnl:writerCallback|ObjectTrigger Callback on: \"+dp1+\" trigger: \"+aTrig); + LOG_DEBUG(\"adder.pnl:writerCallback|Found highlight : \" + highlight + \" Looking for writer\"+navFunct_formatInt(writerNr,99)); + bool bHighlight=false; + if (dynContains(highlight,\"Writer\"+navFunct_formatInt(writerNr,99))) { + bHighlight=true; + } + LOG_DEBUG(\"adder.pnl:writerCallback|Highlight request: \"+bHighlight); + writer_highLight.visible = bHighlight; + +} + +" 0 + "main() +{ + click(writerDP); +}" 0 + 0 1 1 2 1 E 1 0 1 -29 -79 1 E 40 100 119 130 +6 278 +"adder_highLight" "" -1 280 2 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E -183 0 0 0 0 0 +1 240 10 E E E 1 E 0 E N "_Transparent" E N "Lofar_highLight" E E + "main(int row, string column) +{ + rClick(adderDP); +}" 0 + "main(int row, string column) +{ + dblClick(adderDP); +}" 0 + +207 0 0 0 0 0 E E E 0 1 @@ -131,18 +235,71 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 280 2 322 19 -0 2 2 "0s" 0 0 0 192 0 0 280 2 1 +"main() +{ + dpConnect( \"adderCallback\",true,DPNAME_NAVIGATOR + g_navigatorID +\".objectTrigger\" ); +} + +void adderCallback(string dp1, bool aTrig) { + + LOG_DEBUG(\"adder.pnl:adderCallback|ObjectTrigger Callback on: \"+dp1+\" trigger: \"+aTrig); + LOG_DEBUG(\"adder.pnl:adderCallback|Found highlight : \" + highlight + \" Looking for Adder\"+adderNr); + bool bHighlight=false; + if (dynContains(highlight,\"Adder\"+adderNr)) { + bHighlight=true; + } + LOG_DEBUG(\"adder.pnl:adderCallback|Highlight request: \"+bHighlight); + adder_highLight.visible = bHighlight; + +} + +" 0 + "main() +{ + click(adderDP); +}" 0 + 0 1 1 2 1 E 1 0 1 -55 -55 1 E 190 70 1070 107 +6 227 +"RECTANGLE16" +"" +1 120 180 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main(int row, string column) +{ + rClick(adderDP); +}" 0 + "main(int row, string column) +{ + dblClick(adderDP); +}" 0 + +134 0 0 0 0 0 +E E E +0 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" +LANG:1 0 + 1 -LANG:1 5 Adder +"dashclr"N "_Transparent" +E "main() +{ + click(adderDP); +}" 0 + 0 1 1 2 1 E 0.9775280898876404 0 1 3.146067415730345 0 1 E 140 20 1030 47 +1 281 51 "" 1 +0 7 266 "dropping" "" 1 270 50 E E E 1 E 1 E N {0,0,0} E N "green" E E - E E + "main(int row, string column) +{ + rClick(adderDP); +}" 0 + "main(int row, string column) +{ + dblClick(adderDP); +}" 0 + 194 0 0 0 0 0 E E E 0 @@ -151,33 +308,45 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 0.8095238095238095 0 0.8095238095238095 41.52380952380952 -2.380952380952408 1 E 270 50 10 10 -2 267 -"PRIMITIVE_TEXT15" +E "main() +{ + click(adderDP); +}" 0 + 0 1 1 2 1 E 1 0 1 60 5 1 E 120 30 7 7 +14 269 +"nrBlocksDropped" "" -1 182 32 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E -195 0 0 0 0 0 +1 200 24 E E E 1 E 1 E N "_3DText" E N "_Window" E E + "main(int row, string column) +{ + rClick(adderDP); +}" 0 + "main(int row, string column) +{ + dblClick(adderDP); +}" 0 + +199 0 0 0 0 0 E E E 0 1 LANG:1 0 +0 1 -"dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 182 32 244 49 -0 2 2 "0s" 0 0 0 192 0 0 182 32 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 -LANG:1 8 dropping -2 268 -"PRIMITIVE_TEXT16" +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 198 22 312 46 +2 "0s" 0 0 0 0 0 -1 "main() +{ + click(adderDP); +}" 0 + E E +2 273 +"addernr_text" "" -1 340 32 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E +1 123 26 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E E E -197 0 0 0 0 0 +203 0 0 0 0 0 E E E 0 1 @@ -185,84 +354,109 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 340 32 486 49 -0 2 2 "0s" 0 0 0 192 0 0 340 32 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 -LANG:1 20 Nr of blocks dropped -14 269 -"nrBlocksDropped" +E E 0 1 1 2 1 E U 0 E 123 26 131 42 +0 2 2 "0s" 0 0 0 192 0 0 123 26 1 +1 +LANG:1 35 MS Shell Dlg 2,10,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 1 0 +6 274 +"arrow" "" -1 495 28 E E E 1 E 1 E N "_3DText" E N "_Window" E E +1 150 40 E E E 1 E 1 E N "_Transparent" E N "_Transparent" E E E E -199 0 0 0 0 0 +204 0 0 0 0 0 E E E 0 1 LANG:1 0 -0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 493 26 607 50 -2 "0s" 0 0 0 0 0 -1 E E E -25 270 -"myLogTable" +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 0.4054054054054054 0 0.4054054054054056 77.83783783783784 -77.29729729729735 2 1 0 "pictures/arrowLeft.gif" 4294967295 E 30 240 104 314 +2 275 +"writerNr_text" "" -1 -60 -190 E E E 1 E 1 E N "_WindowText" E N "_Window" E E - E E -201 0 0 0 0 0 +1 20 30 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + "main() +{ + rClick(writerDP); +}" 0 + "main() +{ + dblClick(writerDP); +}" 0 + +205 0 0 0 0 0 E E E 0 1 LANG:1 0 -0 -1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 13 51 607 191 -EE 1 0 1 5 1 "time" 12 1 0 "s" 1 -LANG:1 4 time -E 1 -LANG:1 0 +"dashclr"N "_Transparent" +E "main() +{ + click(writerDP); +}" 0 + 0 1 1 2 1 E U 0 E 20 30 60 46 +0 2 2 "0s" 0 0 0 192 0 0 20 30 1 +1 +LANG:1 35 MS Shell Dlg 2,10,-1,5,75,0,0,0,0,0 +0 1 +LANG:1 6 writer +25 276 +"myTable" +"" +1 249.8823099816354 -3 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + "main(int row, string column) +{ + rClick(adderDP); +}" 0 + "main(int row, string column) +{ + dblClick(adderDP); +}" 0 -150 "level" 5 1 0 "s" 1 -LANG:1 5 level -E +206 0 0 0 0 0 +E E E +0 1 LANG:1 0 -70 "source" 17 1 0 "s" 1 -LANG:1 6 source +0 +1 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 318 22 1002 46 +E"main(int row, string column, string value) +{ + click(adderDP); +}" 0 + 0 0 1 3 1 "error" 13 1 0 "s" 1 +LANG:1 5 error E 1 LANG:1 0 -200 "message" 90 1 0 "s" 1 -LANG:1 7 message +125 "currentAction" 13 1 0 "s" 1 +LANG:1 13 currentAction E 1 LANG:1 0 -1000 "code" 17 1 0 "s" 1 -LANG:1 4 code +125 "logMsg" 63 1 0 "s" 1 +LANG:1 6 logMsg E 1 LANG:1 0 -200 -14 14 "" 1 1 +579 +19 19 "" 1 1 LANG:1 2 #1 -10 30 +10 150 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -0 1 2 1 7 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 0 0 0 1 7 1 0 0 LAYER, 1 @@ -293,7 +487,7 @@ LAYER, 7 1 LANG:1 6 Layer8 0 -3 51 "selfState" -"objects\\lofar_self_state.pnl" 678 158 T 169 1 0 1 -668 -135 +3 51 "selfState" -1 +"objects\\lofar_self_state.pnl" 678 158 T 169 1 0 1 -538 -133 +0 0 -0 \ No newline at end of file diff --git a/MAC/Navigator2/panels/objects/Processes/circularBuffer.pnl b/MAC/Navigator2/panels/objects/Processes/circularBuffer.pnl index 0b6a81d136d..5a6ef1b0ce5 100644 --- a/MAC/Navigator2/panels/objects/Processes/circularBuffer.pnl +++ b/MAC/Navigator2/panels/objects/Processes/circularBuffer.pnl @@ -1,11 +1,12 @@ -V 10 +V 11 1 LANG:1 14 CircularBuffer -PANEL,-1 -1 640 211 N "_3DFace" 1 -"$objectNumber" +PANEL,-1 -1 843 280 N "_3DFace" 0 "main() { + + baseDP = g_currentDatapoint; database = dpSubStr(baseDP,DPSUB_SYS); @@ -35,27 +36,24 @@ void updateTrigger( string dp1, string objectName, \" panelName: \"+ panelName); - // determine inputBufferNumber - objectNr=$objectNumber; - DebugN(\"objectNr found: \",objectNr); - int bufNr = -1; - LOG_DEBUG(\"circularBuffer.pnl:updateTrigger|dynlen paramList: \"+dynlen(paramList)+\" objectNr: \"+objectNr+\" paramList[1+objectNr]: \"+paramList[1+objectNr]); - if (dynlen(paramList) <= (1+objectNr)) { - bufNr=paramList[1+objectNr]; - DebugN(\"bufNr calculated:\" , bufNr); - if (bufNr > 63) { + int ioNr = -1; + LOG_DEBUG(\"circularBuffer.pnl:updateTrigger|dynlen paramList: \"+dynlen(paramList)+\" paramList[1]: \"+paramList[1]); + if (dynlen(paramList) <= (1)) { + ioNr=paramList[1+objectNr]; + if (ioNr > 63) { LOG_ERROR(\"circularBuffer.pnl:updateTrigger|invalid InputBufferDP\"); return; } - LOG_DEBUG(\"circularBuffer.pnl:updateTrigger| found bufNr: \" + bufNr); - inputBufferDP=database+\"InputBuffer\"+bufNr; + + LOG_DEBUG(\"circularBuffer.pnl:updateTrigger| found bufNr: \" + ioNr); + setValue(\"InputBuffer_text\",\"text\",\"PSIONode\"+navFunct_formatInt(ioNr,99)); + inputBufferDP=database+\"LOFAR_PermSW_PSIONode\"+navFunct_formatInt(ioNr,99)+\"_InputBuffer\"; - DebugN(\"Looking for DP: \",inputBufferDP); // connect to the inputBuffer values // check if the requiered datapoint for this view are enabled and accessible if (dpExists(inputBufferDP + \".stationName\")) { - if (dpConnect(\"updateBuffer\", inputBufferDP + \".stationName\", + if (!dpConnect(\"updateBuffer\", inputBufferDP + \".stationName\", inputBufferDP + \".late\", inputBufferDP + \".IOTime\", inputBufferDP + \".stream0.blocksIn\", @@ -70,7 +68,7 @@ void updateTrigger( string dp1, string objectName, inputBufferDP + \".stream3.blocksIn\", inputBufferDP + \".stream3.percBad\", inputBufferDP + \".stream3.rejected\", - inputBufferDP + \".stationName:_online.._invalid\") == -1) { + inputBufferDP + \".status.state:_online.._invalid\") == -1) { LOG_ERROR(\"circularBuffer.pnl:updateTrigger|Couldn't connect to: \"+inputBufferDP+\" \"+getLastError()); } } else { @@ -93,6 +91,24 @@ void updateTrigger( string dp1, string objectName, // pass baseDP to selfstate Object to work with setValue(\"selfState.light\",\"toolTipText\",inputBufferDP); + + + // get the name of the selected station + nodeDP = navFunct_IONode2DPName(ioNr); + string dp = nodeDP+\".usedStation\"; + if (dpExists(dp) ){ + dpGet(dp,station); + } else { + LOG_ERROR(\"circularBuffer.pnl:main|ERROR DP does not exist: \"+dp); + return; + } + + stationDP=station+\":\"; + + + setValue(\"stationLabel\",\"text\",station); + setValue(\"stationLabel\",\"toolTipText\",stationDP); + // connect for selfUpdates showSelfState(inputBufferDP); @@ -100,6 +116,7 @@ void updateTrigger( string dp1, string objectName, } else { LOG_ERROR(\"circularBuffer.pnl:main|inputBufferList out of range\"); } + } } @@ -120,7 +137,8 @@ updateBuffer(string dp1, string stationName, string dp15, string rejected3, string dp16, bool invalid) { - LOG_DEBUG(\"circularBuffer.pnl:updateBeffer|entered\"); + + LOG_DEBUG(\"circularBuffer.pnl:updateBuffer|entered\"); if (!invalid) { setValue(\"Late\", \"text\", late); setValue(\"IOTime\", \"text\", IOTime); @@ -165,7 +183,46 @@ string panelName=\"\"; string baseDP = \"\"; string inputBufferDP=\"\"; -int objectNr=0;" 0 +string station=\"\"; +string stationDP=\"\"; +string nodeDP=\"\"; + +int objectNr=0; + +bool bDoubleClicked = false; + +// routine for single mouse click +void click(string dp) { + // set delay in case double click was meant + delay(0, 100); + if (!bDoubleClicked) { + if (dp == stationDP) { + navPanel_setEvent(station,\"EventClick\"); + } else { + navPanel_setEvent(\"InputBuffer\",\"EventClick\"); + } + } +} + +// routine for double mouse click +void dblClick(string dp) { + // indicate this is a doubleClick + bDoubleClicked = true; + + if (dpExists(dp) ) { + LOG_DEBUG(\"CircularBuffer.pnl:DoubleClick|Setting currentDatapoint from : \"+g_currentDatapoint+\" to \"+dp); + g_currentDatapoint=dp; + navPanel_setEvent(\"CircularBuffer.pnl\",\"ChangePanel\"); + } + // set delay to avoid click event will be triggered + delay(0, 500); + bDoubleClicked = false; +} + +// routine for right mouse click +void rClick(string dp) { + navPanel_setEvent(\"CircularBuffer.pnl\",\"EventRightClick\"); +}" 0 2 "CBRef" "1" "EClose" E @@ -174,11 +231,64 @@ 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 285 +"InputBuffer_highLight" +"" +1 240 10 E E E 1 E 0 E N "_Transparent" E N "Lofar_highLight" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + +223 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +"main() +{ + dpConnect( \"InputBufferCallback\",true,DPNAME_NAVIGATOR + g_navigatorID +\".objectTrigger\" ); +} + +void InputBufferCallback(string dp1, bool aTrig) { + + LOG_DEBUG(\"circularBuffer.pnl:InputBufferCallback|ObjectTrigger Callback on: \"+dp1+\" trigger: \"+aTrig); + LOG_DEBUG(\"circularBuffer.pnl:InputBufferCallback|Found highlight : \" + highlight + \" Looking for InputBuffer\"); + bool bHighlight=false; + if (dynContains(highlight,\"InputBuffer\")) { + bHighlight=true; + } + LOG_DEBUG(\"circularBuffer.pnl:InputBufferCallback|Highlight request: \"+bHighlight); + InputBuffer_highLight.visible = bHighlight; + +} + +" 0 + "main() +{ + click(inputBufferDP); +}" 0 + 0 1 1 2 1 E 1 0 1 140 -10 1 E 10 20 620 199 6 226 "RECTANGLE15" "" 1 120 180 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 132 0 0 0 0 0 E E E 0 @@ -187,12 +297,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 -90 -148 1 E 100 180 700 349 +E "main() +{ + click(inputBufferDP); +}" 0 + 0 1 1 2 1 E 1 0 1 55 -165 1 E 100 180 700 349 6 229 "RECTANGLE17" "" 1 120 20 E E E 1 E 1 E N "_Transparent" E N "_Transparent" E E - E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 136 0 0 0 0 0 E E E 0 @@ -201,12 +323,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 196 45 2 1 0 "pictures/circleAni.gif" 4294967295 E 120 20 219 119 +E "main() +{ + click(inputBufferDP); +}" 0 + 0 1 1 2 1 E 1 0 1 341 28 2 1 0 "pictures/circleAni.gif" 4294967295 E 120 20 219 119 14 234 "In0" "" -1 42 62 E E E 1 E 1 E N "_3DText" E N "_Window" E E - E E +1 187 45 E E E 1 E 1 E N "_3DText" E N "_Window" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 144 0 0 0 0 0 E E E 0 @@ -215,15 +349,26 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 40 60 108 84 -2 "0s" 0 0 0 0 0 -1 E E E +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 185 43 253 67 +2 "0s" 0 0 0 0 0 -1 "main() +{ + click(inputBufferDP); +}" 0 + E E 14 235 "Bad0" "" -1 114 62 E E E 1 E 1 E N "_WindowText" E N "_Window" E E - E E +1 259 45 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 146 0 0 0 0 0 E E E 0 @@ -232,15 +377,26 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 112 60 180 84 -2 "0s" 0 0 0 0 0 -1 E E E +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 257 43 325 67 +2 "0s" 0 0 0 0 0 -1 "main() +{ + click(inputBufferDP); +}" 0 + E E 2 236 "PRIMITIVE_TEXT3" "" -1 22 67 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E +1 167 50 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 147 0 0 0 0 0 E E E 0 @@ -249,18 +405,29 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 22 67 29 81 -0 2 2 "0s" 0 0 0 192 0 0 22 67 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" +E "main() +{ + click(inputBufferDP); +}" 0 + 0 1 1 2 1 E U 1 E 167 50 174 63 +0 2 2 "0s" 0 0 0 192 0 0 167 50 1 1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 1 0 14 237 "In1" "" -1 42 92 E E E 1 E 1 E N "_3DText" E N "_Window" E E - E E +1 187 75 E E E 1 E 1 E N "_3DText" E N "_Window" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 149 0 0 0 0 0 E E E 0 @@ -269,15 +436,26 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 40 90 108 114 -2 "0s" 0 0 0 0 0 -1 E E E +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 185 73 253 97 +2 "0s" 0 0 0 0 0 -1 "main() +{ + click(inputBufferDP); +}" 0 + E E 14 238 "Bad1" "" -1 114 92 E E E 1 E 1 E N "_WindowText" E N "_Window" E E - E E +1 259 75 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 151 0 0 0 0 0 E E E 0 @@ -286,15 +464,26 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 112 90 180 114 -2 "0s" 0 0 0 0 0 -1 E E E +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 257 73 325 97 +2 "0s" 0 0 0 0 0 -1 "main() +{ + click(inputBufferDP); +}" 0 + E E 2 239 "PRIMITIVE_TEXT4" "" -1 22 97 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E +1 167 80 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 153 0 0 0 0 0 E E E 0 @@ -303,18 +492,29 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 22 97 29 111 -0 2 2 "0s" 0 0 0 192 0 0 22 97 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" +E "main() +{ + click(inputBufferDP); +}" 0 + 0 1 1 2 1 E U 1 E 167 80 174 93 +0 2 2 "0s" 0 0 0 192 0 0 167 80 1 1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 1 1 14 240 "In2" "" -1 42 122 E E E 1 E 1 E N "_3DText" E N "_Window" E E - E E +1 187 105 E E E 1 E 1 E N "_3DText" E N "_Window" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 155 0 0 0 0 0 E E E 0 @@ -323,15 +523,26 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 40 120 108 144 -2 "0s" 0 0 0 0 0 -1 E E E +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 185 103 253 127 +2 "0s" 0 0 0 0 0 -1 "main() +{ + click(inputBufferDP); +}" 0 + E E 14 241 "Bad2" "" -1 114 122 E E E 1 E 1 E N "_WindowText" E N "_Window" E E - E E +1 259 105 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 157 0 0 0 0 0 E E E 0 @@ -340,15 +551,26 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 112 120 180 144 -2 "0s" 0 0 0 0 0 -1 E E E +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 257 103 325 127 +2 "0s" 0 0 0 0 0 -1 "main() +{ + click(inputBufferDP); +}" 0 + E E 2 242 "PRIMITIVE_TEXT5" "" -1 22 127 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E +1 167 110 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 159 0 0 0 0 0 E E E 0 @@ -357,18 +579,29 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 22 127 29 141 -0 2 2 "0s" 0 0 0 192 0 0 22 127 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" +E "main() +{ + click(inputBufferDP); +}" 0 + 0 1 1 2 1 E U 1 E 167 110 174 123 +0 2 2 "0s" 0 0 0 192 0 0 167 110 1 1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 1 2 14 243 "In3" "" -1 42 152 E E E 1 E 1 E N "_3DText" E N "_Window" E E - E E +1 187 135 E E E 1 E 1 E N "_3DText" E N "_Window" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 161 0 0 0 0 0 E E E 0 @@ -377,15 +610,26 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 40 150 108 174 -2 "0s" 0 0 0 0 0 -1 E E E +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 185 133 253 157 +2 "0s" 0 0 0 0 0 -1 "main() +{ + click(inputBufferDP); +}" 0 + E E 14 244 "Bad3" "" -1 116 152 E E E 1 E 1 E N "_WindowText" E N "_Window" E E - E E +1 261 135 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 163 0 0 0 0 0 E E E 0 @@ -394,15 +638,26 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 112 150 180 174 -2 "0s" 0 0 0 0 0 -1 E E E +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 257 133 325 157 +2 "0s" 0 0 0 0 0 -1 "main() +{ + click(inputBufferDP); +}" 0 + E E 2 245 "PRIMITIVE_TEXT6" "" -1 22 157 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E +1 167 140 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 165 0 0 0 0 0 E E E 0 @@ -411,18 +666,29 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 22 157 29 171 -0 2 2 "0s" 0 0 0 192 0 0 22 157 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" +E "main() +{ + click(inputBufferDP); +}" 0 + 0 1 1 2 1 E U 1 E 167 140 174 153 +0 2 2 "0s" 0 0 0 192 0 0 167 140 1 1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 1 3 2 246 "PRIMITIVE_TEXT7" "" -1 42 47 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E +1 186 33 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 166 0 0 0 0 0 E E E 0 @@ -431,18 +697,29 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 41 47 53 64 -0 2 2 "0s" 0 0 0 192 0 0 41 47 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" +E "main() +{ + click(inputBufferDP); +}" 0 + 0 1 1 2 1 E U 1 E 185 33 197 49 +0 2 2 "0s" 0 0 0 192 0 0 185 33 1 1 +LANG:1 33 MS Shell Dlg,-1,13,5,75,0,0,0,0,0 +0 1 LANG:1 2 In 2 247 "PRIMITIVE_TEXT8" "" -1 114 47 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E +1 259 30 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 168 0 0 0 0 0 E E E 0 @@ -451,20 +728,31 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 114 47 155 64 -0 2 2 "0s" 0 0 0 192 0 0 114 47 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" +E "main() +{ + click(inputBufferDP); +}" 0 + 0 1 1 2 1 E U 1 E 259 30 300 46 +0 2 2 "0s" 0 0 0 192 0 0 259 30 1 1 +LANG:1 33 MS Shell Dlg,-1,13,5,75,0,0,0,0,0 +0 1 LANG:1 4 %Bad -1 284 51 "" 1 +1 293 51 "" 1 0 14 249 "Late" "" -1 510 82 E E E 1 E 1 E N "_3DText" E N "_Window" E E - E E +1 655 65 E E E 1 E 1 E N "_3DText" E N "_Window" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 171 0 0 0 0 0 E E E 0 @@ -473,15 +761,26 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 508 80 574 104 -2 "0s" 0 0 0 0 0 -1 E E E +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 653 63 719 87 +2 "0s" 0 0 0 0 0 -1 "main() +{ + click(inputBufferDP); +}" 0 + E E 2 250 "PRIMITIVE_TEXT9" "" -1 446 85 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E +1 591 68 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 172 0 0 0 0 0 E E E 0 @@ -490,18 +789,29 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 446 85 476 102 -0 2 2 "0s" 0 0 0 192 0 0 446 85 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" +E "main() +{ + click(inputBufferDP); +}" 0 + 0 1 1 2 1 E U 1 E 591 68 621 84 +0 2 2 "0s" 0 0 0 192 0 0 591 68 1 1 +LANG:1 33 MS Shell Dlg,-1,13,5,75,0,0,0,0,0 +0 1 LANG:1 4 Late 2 251 "PRIMITIVE_TEXT10" "" -1 577 84 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E +1 722 67 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 174 0 0 0 0 0 E E E 0 @@ -510,18 +820,29 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 577 84 597 101 -0 2 2 "0s" 0 0 0 192 0 0 577 84 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" +E "main() +{ + click(inputBufferDP); +}" 0 + 0 1 1 2 1 E U 1 E 722 67 742 83 +0 2 2 "0s" 0 0 0 192 0 0 722 67 1 1 +LANG:1 33 MS Shell Dlg,-1,13,5,75,0,0,0,0,0 +0 1 LANG:1 2 ms 14 252 "IOTime" "" -1 510 122 E E E 1 E 1 E N "_3DText" E N "_Window" E E - E E +1 655 105 E E E 1 E 1 E N "_3DText" E N "_Window" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 176 0 0 0 0 0 E E E 0 @@ -530,15 +851,26 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 508 120 574 144 -2 "0s" 0 0 0 0 0 -1 E E E +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 653 103 719 127 +2 "0s" 0 0 0 0 0 -1 "main() +{ + click(inputBufferDP); +}" 0 + E E 2 253 "PRIMITIVE_TEXT11" "" -1 446 125 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E +1 591 108 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 178 0 0 0 0 0 E E E 0 @@ -547,18 +879,29 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 446 125 496 142 -0 2 2 "0s" 0 0 0 192 0 0 446 125 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" +E "main() +{ + click(inputBufferDP); +}" 0 + 0 1 1 2 1 E U 1 E 591 108 641 124 +0 2 2 "0s" 0 0 0 192 0 0 591 108 1 1 +LANG:1 33 MS Shell Dlg,-1,13,5,75,0,0,0,0,0 +0 1 LANG:1 6 IOTime 2 254 "PRIMITIVE_TEXT12" "" -1 577 124 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E +1 722 107 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 180 0 0 0 0 0 E E E 0 @@ -567,18 +910,29 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 577 124 597 141 -0 2 2 "0s" 0 0 0 192 0 0 577 124 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" +E "main() +{ + click(inputBufferDP); +}" 0 + 0 1 1 2 1 E U 1 E 722 107 742 123 +0 2 2 "0s" 0 0 0 192 0 0 722 107 1 1 +LANG:1 33 MS Shell Dlg,-1,13,5,75,0,0,0,0,0 +0 1 LANG:1 2 ms 2 255 -"PRIMITIVE_TEXT13" +"InputBuffer_text" "" -1 250 12 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E +1 435 -8 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(); +}" 0 + "main() +{ + dblClick(); +}" 0 + 181 0 0 0 0 0 E E E 0 @@ -587,18 +941,29 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 250 12 347 29 -0 2 2 "0s" 0 0 0 192 0 0 250 12 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 -LANG:1 15 Circular Buffer +E "main() +{ + click(); +}" 0 + 0 1 1 2 1 E U 1 E 435 -8 508 8 +0 2 2 "0s" 0 0 0 192 0 0 435 -8 1 +1 +LANG:1 33 MS Shell Dlg,-1,13,5,75,0,0,0,0,0 +0 1 +LANG:1 11 InputBuffer 4 261 "LINE5" "" -1 270 102 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E +1 415 85 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 188 0 0 0 0 0 E E E 0 @@ -607,12 +972,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 2 1 2 1 E 270 102 310 112 +E "main() +{ + click(inputBufferDP); +}" 0 + 0 2 1 2 1 E 415 85 455 95 4 262 "LINE6" "" -1 270 72 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E +1 415 55 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 189 0 0 0 0 0 E E E 0 @@ -621,12 +998,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 2 1 2 1 E 270 72 310 102 +E "main() +{ + click(inputBufferDP); +}" 0 + 0 2 1 2 1 E 415 55 455 85 4 263 "LINE7" "" -1 270 132 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E +1 415 115 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 190 0 0 0 0 0 E E E 0 @@ -635,12 +1024,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 2 1 2 1 E 270 132 310 122 +E "main() +{ + click(inputBufferDP); +}" 0 + 0 2 1 2 1 E 415 115 455 105 4 264 "LINE8" "" -1 270 162 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E +1 415 145 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 191 0 0 0 0 0 E E E 0 @@ -649,12 +1050,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 2 1 2 1 E 270 162 310 132 +E "main() +{ + click(inputBufferDP); +}" 0 + 0 2 1 2 1 E 415 145 455 115 6 265 "RECTANGLE22" "" 1 150 40 E E E 1 E 1 E N "_Transparent" E N "_Transparent" E E - E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 193 0 0 0 0 0 E E E 0 @@ -663,12 +1076,24 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1 -35 49 2 1 0 "pictures/arrowRight.gif" 4294967295 E 450 50 474 74 +E "main() +{ + click(inputBufferDP); +}" 0 + 0 1 1 2 1 E 1 0 1 110 32 2 1 0 "pictures/arrowRight.gif" 4294967295 E 450 50 474 74 14 279 "Rejected0" "" -1 185 62 E E E 1 E 1 E N "_WindowText" E N "_Window" E E - E E +1 330 45 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 214 0 0 0 0 0 E E E 0 @@ -677,15 +1102,26 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 183 60 251 84 -2 "0s" 0 0 0 0 0 -1 E E E +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 328 43 396 67 +2 "0s" 0 0 0 0 0 -1 "main() +{ + click(inputBufferDP); +}" 0 + E E 14 280 "Rejected1" "" -1 185 92 E E E 1 E 1 E N "_WindowText" E N "_Window" E E - E E +1 330 75 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 216 0 0 0 0 0 E E E 0 @@ -694,15 +1130,26 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 183 90 251 114 -2 "0s" 0 0 0 0 0 -1 E E E +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 328 73 396 97 +2 "0s" 0 0 0 0 0 -1 "main() +{ + click(inputBufferDP); +}" 0 + E E 14 281 "Rejected2" "" -1 185 122 E E E 1 E 1 E N "_WindowText" E N "_Window" E E - E E +1 330 105 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 218 0 0 0 0 0 E E E 0 @@ -711,15 +1158,26 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 183 120 251 144 -2 "0s" 0 0 0 0 0 -1 E E E +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 328 103 396 127 +2 "0s" 0 0 0 0 0 -1 "main() +{ + click(inputBufferDP); +}" 0 + E E 14 282 "Rejected3" "" -1 187 152 E E E 1 E 1 E N "_WindowText" E N "_Window" E E - E E +1 332 135 E E E 1 E 1 E N "_WindowText" E N "_Window" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 220 0 0 0 0 0 E E E 0 @@ -728,15 +1186,26 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 183 150 251 174 -2 "0s" 0 0 0 0 0 -1 E E E +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 328 133 396 157 +2 "0s" 0 0 0 0 0 -1 "main() +{ + click(inputBufferDP); +}" 0 + E E 2 283 "PRIMITIVE_TEXT17" "" -1 185 47 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E - E E +1 330 30 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(inputBufferDP); +}" 0 + "main() +{ + dblClick(inputBufferDP); +}" 0 + 222 0 0 0 0 0 E E E 0 @@ -745,13 +1214,105 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 185 47 243 64 -0 2 2 "0s" 0 0 0 192 0 0 185 47 1 -1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" +E "main() +{ + click(inputBufferDP); +}" 0 + 0 1 1 2 1 E U 1 E 330 30 388 46 +0 2 2 "0s" 0 0 0 192 0 0 330 30 1 1 +LANG:1 33 MS Shell Dlg,-1,13,5,75,0,0,0,0,0 +0 1 LANG:1 7 %Reject +6 290 +"station_highLight" +"" +1 240 10 E E E 1 E 0 E N "_Transparent" E N "Lofar_highLight" E E + "main() +{ + rClick(stationDP); +}" 0 + "main() +{ + dblClick(stationDP); +}" 0 + +227 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +"main() +{ + dpConnect( \"stationCallback\",true,DPNAME_NAVIGATOR + g_navigatorID +\".objectTrigger\" ); +} + +void stationCallback(string dp1, bool aTrig) { + + LOG_DEBUG(\"BGPProc.pnl:stationCallback|ObjectTrigger Callback on: \"+dp1+\" trigger: \"+aTrig); + LOG_DEBUG(\"BGPProc.pnl:stationCallback|Found highlight : \" + highlight + \" Looking for station: \"+station); + bool bHighlight=false; + if (dynContains(highlight,station)) { + bHighlight=true; + } + LOG_DEBUG(\"BGPProc.pnl:stationCallback|Highlight request: \"+bHighlight); + station_highLight.visible = bHighlight; +} + +" 0 + "main() +{ + click(stationDP); +}" 0 + 0 1 1 2 1 E 1 0 1 10 -52 1 E 0 132 64 166 +6 291 +"RECTANGLE18" +"" +1 150 40 E E E 1 E 1 E N "_Transparent" E N "_Transparent" E E + E E +228 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E E 0 1 1 2 1 E 1 0 1 52 -180 2 1 0 "pictures/arrowRight.gif" 4294967295 E 30 240 104 314 +2 292 +"stationLabel" +"" +1 15 90 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E + "main() +{ + rClick(stationDP); +}" 0 + "main() +{ + dblClick(stationDP); +}" 0 + +229 0 0 0 0 0 +E E E +0 +1 +LANG:1 0 + +1 +"dashclr"N "_Transparent" +E "main() +{ + click(stationDP); +}" 0 + 0 1 1 2 1 E U 1 E 15 90 63 110 +0 2 2 "0s" 0 0 0 192 0 0 15 90 1 +1 +LANG:1 33 MS Shell Dlg,-1,16,5,75,0,0,0,0,0 +0 1 +LANG:1 5 CSxxx 0 LAYER, 1 1 @@ -781,7 +1342,7 @@ LAYER, 7 1 LANG:1 6 Layer8 0 -3 51 "selfState" -"objects\\lofar_self_state.pnl" 678 158 T 169 1.062627825683233 0 1 -710.461665813232 -125 +3 51 "selfState" -1 +"objects\\lofar_self_state.pnl" 678 158 T 169 1.062627825683233 0 1 -565.461665813232 -142 +0 0 -0 \ No newline at end of file diff --git a/MAC/Navigator2/panels/objects/Processes/interactive_controller_small.pnl b/MAC/Navigator2/panels/objects/Processes/interactive_controller_small.pnl index d73ef73ec08..22065ee08ea 100644 --- a/MAC/Navigator2/panels/objects/Processes/interactive_controller_small.pnl +++ b/MAC/Navigator2/panels/objects/Processes/interactive_controller_small.pnl @@ -1,4 +1,4 @@ -V 10 +V 11 1 LANG:1 0 PANEL,-1 -1 785 105 N "_3DFace" 2 @@ -27,7 +27,6 @@ void updateTrigger( string dp1, string objectName, string dp2, dyn_string paramList, string dp3, bool invalid) { - if (objectName == panelName) { LOG_TRACE(\"interactive_controller_small.pnl:main|updateTrigger: \"+$name+\" objectName: \"+objectName+ \" panelName: \"); @@ -310,9 +309,8 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 118 4 644 46 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 118 4 644 46 EE 0 0 1 3 1 "error" 7 1 0 "s" 1 LANG:1 5 error E @@ -336,9 +334,8 @@ LANG:1 0 LANG:1 2 #1 10 150 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -0 0 0 1 7 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 0 0 0 1 7 1 0 2 6 "name" @@ -353,12 +350,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 10 10 40 24 +E E 0 1 1 2 1 E U 1 E 10 10 40 23 0 2 2 "0s" 0 0 0 192 0 0 10 10 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 4 name 0 LAYER, 1 @@ -389,7 +385,7 @@ LAYER, 7 1 LANG:1 0 0 -3 0 "selfState" +3 0 "selfState" -1 "objects\\lofar_self_state.pnl" 9.500000000000011 9.5 T 1 1 0 1 -0.499999999999992 10.5 0 -0 \ No newline at end of file +0 diff --git a/MAC/Navigator2/panels/objects/Processes/station_interactive_controller_small.pnl b/MAC/Navigator2/panels/objects/Processes/station_interactive_controller_small.pnl index 299b1b2e221..23827d8ea01 100644 --- a/MAC/Navigator2/panels/objects/Processes/station_interactive_controller_small.pnl +++ b/MAC/Navigator2/panels/objects/Processes/station_interactive_controller_small.pnl @@ -1,4 +1,4 @@ -V 10 +V 11 1 LANG:1 0 PANEL,-1 -1 785 105 N "_3DFace" 2 @@ -16,10 +16,10 @@ PANEL,-1 -1 785 105 N "_3DFace" 2 if (dpConnect(\"updateTrigger\", DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.objectName:_online.._value\", DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.paramList:_online.._value\", DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.objectName:_online.._invalid\") == -1) { - LOG_ERROR(\"interactive_controller_small.pnl:main|Couldn't find DP to connect to: \"+DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.objectName\" ); + LOG_ERROR(\"station_interactive_controller_small.pnl:main|Couldn't find DP to connect to: \"+DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.objectName\" ); } } else { - LOG_ERROR(\"interactive_controller_small.pnl:main|Couldn't connect to: \"+DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.objectName \" + getLastError()); + LOG_ERROR(\"station_interactive_controller_small.pnl:main|Couldn't connect to: \"+DPNAME_NAVIGATOR + g_navigatorID + \".updateTrigger.objectName \" + getLastError()); } } @@ -29,7 +29,7 @@ void updateTrigger( string dp1, string objectName, if (objectName == panelName) { - LOG_TRACE(\"interactive_controller_small.pnl:main|updateTrigger: \"+$name+\" objectName: \"+objectName+\" panelName: \"+panelName); + LOG_TRACE(\"station_interactive_controller_small.pnl:main|updateTrigger: \"+$name+\" objectName: \"+objectName+\" panelName: \"+panelName); string observation=\"\"; string station = \"\"; if (dynlen(paramList) > 0) { @@ -91,7 +91,7 @@ void dblClick() { // indicate this is a doubleClick bDoubleClicked = true; if (dpExists(baseDP) ) { - LOG_DEBUG(\"interactive_controller_small.pnl:DoubleClick|Setting currentDatapoint from : \"+g_currentDatapoint+\" to \"+baseDP); + LOG_DEBUG(\"station_interactive_controller_small.pnl:DoubleClick|Setting currentDatapoint from : \"+g_currentDatapoint+\" to \"+baseDP); g_currentDatapoint=baseDP; navPanel_setEvent($name,\"ChangePanel\"); } @@ -118,7 +118,7 @@ void rClick() { // // *************************************** void reload(string obsBaseDP,string station) { - LOG_DEBUG(\"interactive_controller_small.pnl:reload| entered: \"+obsBaseDP+\" connected=\"+connected+\" old baseDP=\"+baseDP+\" station: \"+station ); + LOG_DEBUG(\"station_interactive_controller_small.pnl:reload| entered: \"+obsBaseDP+\" connected=\"+connected+\" old baseDP=\"+baseDP+\" station: \"+station ); if (baseDP == obsBaseDP) { return; @@ -157,7 +157,7 @@ void reload(string obsBaseDP,string station) { connected=true; } } else { - LOG_ERROR(\"interactive_controller_small.pnl:reload|Couldn't find DP to connect to: \"+baseDP); + LOG_ERROR(\"station_interactive_controller_small.pnl:reload|Couldn't find DP to connect to: \"+baseDP); } // pass baseDP to selfstate Object to work with setValue(\"selfState.light\",\"toolTipText\",baseDP); @@ -294,9 +294,8 @@ LANG:1 0 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 118 4 644 46 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 118 4 644 46 EE 0 0 1 3 1 "error" 7 1 0 "s" 1 LANG:1 5 error E @@ -320,9 +319,8 @@ LANG:1 0 LANG:1 2 #1 10 150 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -0 0 0 1 7 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 0 0 0 1 7 1 0 2 6 "name" @@ -337,12 +335,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E U 1 E 10 10 40 24 +E E 0 1 1 2 1 E U 1 E 10 10 40 23 0 2 2 "0s" 0 0 0 192 0 0 10 10 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 4 name 0 LAYER, 1 @@ -373,7 +370,7 @@ LAYER, 7 1 LANG:1 0 0 -3 0 "selfState" +3 0 "selfState" -1 "objects\\lofar_self_state.pnl" 9.500000000000011 9.5 T 1 1 0 1 -0.499999999999992 12.5 0 -0 \ No newline at end of file +0 diff --git a/MAC/Navigator2/panels/objects/navigator_alerts.pnl b/MAC/Navigator2/panels/objects/navigator_alerts.pnl index 8dc7a5bb415..2187a053dfe 100644 --- a/MAC/Navigator2/panels/objects/navigator_alerts.pnl +++ b/MAC/Navigator2/panels/objects/navigator_alerts.pnl @@ -1,4 +1,4 @@ -V 10 +V 11 1 LANG:1 0 PANEL,-1 -1 1058 126 N "_3DFace" 1 @@ -169,12 +169,14 @@ void ackAllClicked() { // ok rest should be possible to acknowledge // find the entry in the table - iPos=dynContains(g_alarms[\"DPNAME\"],dp); + if ( dynlen(g_alarms[\"DPNAME\"]) >= 1) { + iPos=dynContains(g_alarms[\"DPNAME\"],dp); - if (iPos < 1) { - LOG_ERROR(\"navigator_alerts.pnl:ackAllClicked|Strange, couldn't find chosen entry in alarm global list: \" + dp); - } else { - acknowledgeAlarm(iPos,getCurrentTime(),dp,message,0); + if (iPos < 1) { + LOG_ERROR(\"navigator_alerts.pnl:ackAllClicked|Strange, couldn't find chosen entry in alarm global list: \" + dp); + } else { + acknowledgeAlarm(iPos,getCurrentTime(),dp,message,0); + } } } } @@ -419,10 +421,9 @@ LANG:0 0 E E 0 1 1 0 1 E U 0 E 990 30 1031.999999999996 46 0 2 2 "4d" 4 0 0 64 0 0 990 30 1 2 -LANG:1 87 -*-Arial-bold-r-normal-*-13-*-100-100-*-*-iso8859-1|-13,0,0,0,758,0,0,0,0,0,0,0,0,Arial +LANG:1 26 Arial,-1,13,5,75,0,0,0,0,0 LANG:0 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 "" -2 +0 2 LANG:1 1 0 LANG:0 1 0 25 11 @@ -446,9 +447,8 @@ LANG:1 0 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 "" - 8 8 962 92 +LANG:1 32 Arial Black,-1,11,5,50,0,0,0,0,0 +0 8 8 962 92 E"main(int row, string column, string value) { click(row); @@ -488,14 +488,13 @@ LANG:1 2 #3 LANG:1 2 #4 10 10 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 "" -0 1 0 1 7 +LANG:1 32 Arial Black,-1,11,5,50,0,0,0,0,0 +0 0 1 0 1 7 1 0 2 16 "PRIMITIVE_TEXT1" "" -1 970 10 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E +1 968 -10 E E E 1 E 1 E N "_WindowText" E N "_Transparent" E E E E 28 0 0 0 0 0 E E E @@ -505,12 +504,11 @@ LANG:1 0 1 "dashclr"N "_Transparent" -E E 0 1 1 2 1 E 1 0 1.666666666666667 -2 -26.66666666666667 1 E 972 22 1025 36 +E E 0 1 1 2 1 E 1 0 1.666666666666667 -2 -26.66666666666667 1 E 972 22 1025 35 0 2 2 "0s" 0 0 0 192 0 0 972 22 1 1 -LANG:1 101 -*-MS Shell Dlg-bold-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,758,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" -1 +LANG:1 33 MS Shell Dlg,-1,11,5,75,0,0,0,0,0 +0 1 LANG:1 9 # Alarms: 13 17 "ack_all_button" @@ -525,9 +523,8 @@ LANG:1 22 Acknowledge all alarms 0 1 -LANG:1 98 -*-MS Shell Dlg-*-r-normal-*-11-*-100-100-*-*-iso8859-1|-11,0,0,0,505,0,0,0,0,0,0,0,0,MS Shell Dlg -0 "" - 968 58 1032 84 +LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 +0 968 58 1032 84 T 1 @@ -566,4 +563,4 @@ LAYER, 7 1 LANG:1 0 0 -0 \ No newline at end of file +0 diff --git a/MAC/Navigator2/panels/objects/navigator_progressBar.pnl b/MAC/Navigator2/panels/objects/navigator_progressBar.pnl index fab265653ac..488ca0166c7 100644 --- a/MAC/Navigator2/panels/objects/navigator_progressBar.pnl +++ b/MAC/Navigator2/panels/objects/navigator_progressBar.pnl @@ -15,6 +15,7 @@ PANEL,-1 -1 638 94 N "_3DFace" 1 break; } } + // Check if Action point exists and connect to it if // it does. The action Point is the call back for this object itsActionDp = DPNAME_NAVIGATOR + g_navigatorID + \".\"+$name+\".action\"; @@ -40,7 +41,7 @@ void initialize() { // connect progressbar to value to act on setProgressBarDPE() { - if (dpExists(itsProgressBarDp)) { + if (dpExists(itsProgressBarDp)) { if (connected && dpExists(dpe) && dpe != \"\") { dpDisconnect(display,dpe); connected=false; @@ -49,6 +50,7 @@ setProgressBarDPE() { dpConnect(\"display\",true,dpe); connected=true; } + } display(string dp1, string progress) @@ -59,6 +61,7 @@ display(string dp1, string progress) \"used31\",\"scale\",1-number/100.0,1, \"used32\",\"scale\",1-number/100.0,1, \"progressValue\",\"text\",number); + } @@ -191,12 +194,14 @@ LANG:0 0 1 "dashclr"N "_Transparent" -"main() -{ - float x,y; - - getValue(\"\",\"position\",x,y); - addSymbol(myModuleName(), myPanelName(), \"objects/STD_INFOS/minitext_t_l.pnl\",\"mt1\",makeDynString(\"$s_txt:\"),x,y,0,1,1); +"main() +{ + + float x,y; + + getValue(\"\",\"position\",x,y); + addSymbol(myModuleName(), myPanelName(), \"objects/STD_INFOS/minitext_t_l.pnl\",\"mt1\",makeDynString(\"$s_txt:\"),x,y,0,1,1); + }" 0 E 0 1 1 0 1 E U 1 E 4 10 10 10 30 @@ -251,4 +256,4 @@ LAYER, 7 1 LANG:1 6 Layer8 0 -0 +0 \ No newline at end of file diff --git a/MAC/Navigator2/panels/objects/navigator_viewSelection.pnl b/MAC/Navigator2/panels/objects/navigator_viewSelection.pnl index 7ef9757893b..d613f2863ca 100644 --- a/MAC/Navigator2/panels/objects/navigator_viewSelection.pnl +++ b/MAC/Navigator2/panels/objects/navigator_viewSelection.pnl @@ -1,7 +1,7 @@ V 11 1 LANG:1 0 -PANEL,-1 -1 1024 781 N "_3DFace" 1 +PANEL,-1 -1 1024 757 N "_3DFace" 1 "$name" "main(){ @@ -75,7 +75,6 @@ void setEvent(dyn_string aSelection,string event) { if (navigator_initializing()) { return; } - string anEvent=$name+\"|\"+event; if (dpExists(itsEventDp)) { dpSet(itsEventDp,anEvent); @@ -96,12 +95,12 @@ DISPLAY_LAYER, 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 LAYER, 0 1 LANG:1 0 -28 0 +28 18 "tabView" "" 1 351.934020618558 755.2214285714285 E E E 1 E 1 E N "_3DText" E N "_3DFace" E E E E -1 0 0 0 0 0 +16 0 0 0 0 0 E E E 0 1 @@ -134,76 +133,6 @@ LANG:1 7 Reports LANG:1 6 Alerts 0 -30 5 -"FRAME1" -"" -1 11 644 E E E 1 E 1 E N "_WindowText" E N {0,0,0} E E - E E -6 0 0 0 0 0 -E E E -1 -1 -LANG:1 0 - -1 -"dashclr"N "_Transparent" -E E 0 0 1 0 1 E U 0 E 11 644 310 734 -1 -LANG:1 32 Arial Black,-1,11,5,50,0,0,0,0,0 -0 1 -LANG:1 11 Frame Title -6 7 -"RECTANGLE1" -"" -1 9 651 E E E 1 E 1 E N {0,0,0} E N {255,255,255} E E - E E -8 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 U 1 E 9 651 321 718 -2 9 -"PRIMITIVE_TEXT1" -"" -1 5.92 666 E E E 1 E 1 E N "_WindowText" E N "_Window" E E - E E -10 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 1.4 0 1 -0.8 0 1 E 4 666 25 681 -0 2 2 "0s" 0 0 0 192 0 0 4 666 1 -1 -LANG:1 32 Arial Black,-1,11,5,50,0,0,0,0,0 -0 1 -LANG:1 3 DP: -2 11 -"PRIMITIVE_TEXT2" -"" -1 11 706 E E E 1 E 1 E N "_WindowText" E N "_Window" E E - E E -12 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 U 1 E 11 706 46 721 -0 2 2 "0s" 0 0 0 192 0 0 11 706 1 -1 -LANG:1 32 Arial Black,-1,11,5,50,0,0,0,0,0 -0 1 -LANG:1 6 state: 13 13 "testButton" "" @@ -256,7 +185,7 @@ EP_childPanelOn() 22 14 "panelChoice" "" -1 860 40 E E E 1 E 0 E N "_WindowText" E N "_Window" E E +1 860 50 E E E 1 E 0 E N "_WindowText" E N "_Window" E E E E 15 0 0 0 0 0 E E E @@ -267,7 +196,7 @@ LANG:1 0 0 1 LANG:1 33 MS Shell Dlg,-1,11,5,50,0,0,0,0,0 -0 858 38 1012 59 +0 858 48 1012 69 0 E @@ -281,11 +210,11 @@ E E 1 0 -1 15 0 "" 1 +1 19 0 "" 1 0 -1 16 1 "" 1 +1 20 1 "" 1 0 -1 17 2 "" 1 +1 21 2 "" 1 0 0 LAYER, 1 @@ -325,4 +254,4 @@ LANG:1 0 3 2 "PANEL_REF3" -1 "objects\\Processes\\lofar_Proc_state.pnl" 225 5 T 16 1 0 1 -19 1 0 -0 +0 \ No newline at end of file diff --git a/MAC/Navigator2/scripts/libs/CEP_Processes.ctl b/MAC/Navigator2/scripts/libs/CEP_Processes.ctl index e47aa89cc11..2403f1feb14 100644 --- a/MAC/Navigator2/scripts/libs/CEP_Processes.ctl +++ b/MAC/Navigator2/scripts/libs/CEP_Processes.ctl @@ -131,7 +131,7 @@ bool CEP_Processes_UpdateCEPControllers() { dpSet(DPNAME_NAVIGATOR + g_navigatorID + ".updateTrigger.objectName","OnlineControl_BGPApplPanel", DPNAME_NAVIGATOR + g_navigatorID + ".updateTrigger.paramList",makeDynString(CEP_obsBaseDP)); - dpSet(DPNAME_NAVIGATOR + g_navigatorID + ".updateTrigger.objectName","OnlineControl_StorageApplPanel", + dpSet(DPNAME_NAVIGATOR + g_navigatorID + ".updateTrigger.objectName","PythonControlPanel", DPNAME_NAVIGATOR + g_navigatorID + ".updateTrigger.paramList",makeDynString(CEP_obsBaseDP)); } diff --git a/MAC/Navigator2/scripts/libs/MainCU_Processes.ctl b/MAC/Navigator2/scripts/libs/MainCU_Processes.ctl index a61b531c979..0852b1f8940 100644 --- a/MAC/Navigator2/scripts/libs/MainCU_Processes.ctl +++ b/MAC/Navigator2/scripts/libs/MainCU_Processes.ctl @@ -130,10 +130,10 @@ void MainCU_Processes_UpdateMainControllers() { dpSet(DPNAME_NAVIGATOR + g_navigatorID + ".updateTrigger.objectName","ObservationControlPanel", DPNAME_NAVIGATOR + g_navigatorID + ".updateTrigger.paramList",makeDynString(obsBaseDP)); // also connect to CCU Ctrls - dpSet(DPNAME_NAVIGATOR + g_navigatorID + ".updateTrigger.objectName","OnlineControl_StorageApplPanel", - DPNAME_NAVIGATOR + g_navigatorID + ".updateTrigger.paramList",makeDynString(obsBaseDP)); dpSet(DPNAME_NAVIGATOR + g_navigatorID + ".updateTrigger.objectName","OnlineControl_BGPApplPanel", DPNAME_NAVIGATOR + g_navigatorID + ".updateTrigger.paramList",makeDynString(obsBaseDP)); + dpSet(DPNAME_NAVIGATOR + g_navigatorID + ".updateTrigger.objectName","PythonControlPanel", + DPNAME_NAVIGATOR + g_navigatorID + ".updateTrigger.paramList",makeDynString(obsBaseDP)); } } diff --git a/MAC/Navigator2/scripts/libs/Station_Processes.ctl b/MAC/Navigator2/scripts/libs/Station_Processes.ctl index 57105071c18..d1538f9b78d 100644 --- a/MAC/Navigator2/scripts/libs/Station_Processes.ctl +++ b/MAC/Navigator2/scripts/libs/Station_Processes.ctl @@ -145,7 +145,7 @@ bool Station_Processes_UpdateStationControllers() { // check if selection is made, and the selection is indeed a new one if (newSelectedStation != 0) { - if (strtok(newSelectedStation,":") < 0) { + if (strpos(newSelectedStation,":") < 0) { station_selectedStation=newSelectedStation+":"; } else { station_selectedStation=newSelectedStation; @@ -153,6 +153,11 @@ bool Station_Processes_UpdateStationControllers() { } stationDBName.text(station_selectedStation); + + DebugN("dpSubSys: ", dpSubStr(station_obsBaseDP,DPSUB_SYS)); + DebugN("obsBase: " , station_obsBaseDP); + DebugN("newselstation: ", newSelectedStation); + DebugN("station: ", station_selectedStation); dpSet(DPNAME_NAVIGATOR + g_navigatorID + ".updateTrigger.objectName","BeamControlPanel", DPNAME_NAVIGATOR + g_navigatorID + ".updateTrigger.paramList",makeDynString(station_obsBaseDP,station_selectedStation)); @@ -197,7 +202,7 @@ bool Station_Processes_UpdateProcessesList() { station_selectedStation = dpSubStr(g_currentDatapoint,DPSUB_SYS); } - if (strtok(station_selectedStation,":") < 0) { + if (strpos(station_selectedStation,":") < 0) { station_selectedStation+=":"; } if (strpos(obsDP,station_selectedStation) < 0) { diff --git a/MAC/Navigator2/scripts/libs/navCtrl.ctl b/MAC/Navigator2/scripts/libs/navCtrl.ctl index 3acca14f4ab..c1af5241527 100644 --- a/MAC/Navigator2/scripts/libs/navCtrl.ctl +++ b/MAC/Navigator2/scripts/libs/navCtrl.ctl @@ -65,6 +65,7 @@ void navCtrl_handleViewBoxEvent(string dp,string value){ string aShape; string anEvent; dyn_string aSelection; + string selection=""; if (dpExists(DPNAME_NAVIGATOR + g_navigatorID + ".fw_viewBox.selection")) { dpGet(DPNAME_NAVIGATOR + g_navigatorID+".fw_viewBox.selection", aSelection); @@ -87,6 +88,7 @@ void navCtrl_handleViewBoxEvent(string dp,string value){ LOG_INFO("navCtrl.ctl:navCtrl_handleViewBoxEvent| Found event : " + anEvent); LOG_INFO("navCtrl.ctl:navCtrl_handleViewBoxEvent| Found selection: " + aSelection); navCtrl_handleNavigatorEvent(aSelection,anEvent,aShape); + // depending on the event received, actions need to be taken @@ -125,6 +127,31 @@ void navCtrl_handleViewBoxEvent(string dp,string value){ // Panel needs to be changed if (anEvent == "ChangePanel") { + // To be able to handle same panel for different choices we introduce the possiblity to give a fake extra _level in the + // selection datapoint, in that case the selection will be stripped from the fake point and set to the one b4 that + // a fake point will be known by the # delim + + string var=""; + if (strpos(aSelection[1],"#") >= 0) { + dyn_string aS = strsplit(aSelection[1],"#"); + selection = aS[1]; + var= aS[2]; + + LOG_DEBUG("navCtrl.ctl:navCtrl_handleViewBoxEvent|#selection: "+selection); + LOG_DEBUG("navCtrl.ctl:navCtrl_handleViewBoxEvent|#var: "+var); + if (dpExists(DPNAME_NAVIGATOR + g_navigatorID + ".panelParamList")) { + dpSet(DPNAME_NAVIGATOR + g_navigatorID + ".panelParamList",var); + } else { + LOG_WARN("navCtrl.ctl:navCtrl_handleViewBoxEvent| Error: no dp " + DPNAME_NAVIGATOR + g_navigatorID+".panelParamList"); + } + } + + + + if (dpExists(selection)) { + g_currentDatapoint=selection; + } + if (navTabCtrl_showView()) { navFunct_waitObjectReady(500); @@ -311,6 +338,7 @@ void navCtrl_handleViewSelectionEvent(string dp,string value){ string aShape; string anEvent; dyn_string aSelection; + string selection=""; if (dpExists(DPNAME_NAVIGATOR + g_navigatorID + ".fw_viewSelection.selection")) { @@ -366,7 +394,31 @@ void navCtrl_handleViewSelectionEvent(string dp,string value){ //ChangePanel if (anEvent == "ChangePanel") { - + + // To be able to handle same panel for different choices we introduce the possiblity to give a fake extra _level in the + // selection datapoint, in that case the selection will be stripped from the fake point and set to the one b4 that + // a fake point will be known by the # delim + + string var=""; + if (strpos(selection,"#") >= 0) { + dyn_string aS = strsplit(selection,"#"); + selection = aS[1]; + var= aS[2]; + + LOG_DEBUG("navCtrl.ctl:navCtrl_handleViewSelectionEvent|#selection: "+selection); + LOG_DEBUG("navCtrl.ctl:navCtrl_handleViewSelectionEvent|#var: "+var); + if (dpExists(DPNAME_NAVIGATOR + g_navigatorID + ".panelParamList")) { + dpSet(DPNAME_NAVIGATOR + g_navigatorID + ".panelParamList",var); + } else { + LOG_WARN("navCtrl.ctl:navCtrl_handleViewSelectionEvent| Error: no dp " + DPNAME_NAVIGATOR + g_navigatorID+".panelParamList"); + } + } + + + if (dpExists(selection)) { + g_currentDatapoint=selection; + } + if (navTabCtrl_showView()) { navFunct_waitObjectReady(500); @@ -534,10 +586,12 @@ void navCtrl_handleDetailSelectionEvent(string dp,string value,string target){ if (sel[1] == "Observations") { typeSelector=sel[1]; - observationType=sel[2]; - selection=sel[3]; - if (!dynContains(highlight,selection)) { - dynAppend(highlight,selection); + if (dynlen(sel) >= 2) observationType=sel[2]; + if (dynlen(sel) >= 3) { + selection=sel[3]; + if (!dynContains(highlight,selection)) { + dynAppend(highlight,selection); + } } // if selection == observation, add involved hardware && software @@ -573,7 +627,7 @@ void navCtrl_handleDetailSelectionEvent(string dp,string value,string target){ } if (anEvent == "ChangePanel") { - + //check if a tab change should be initiated if (ACTIVE_TAB != typeSelector && typeSelector != "") { LOG_DEBUG("navCtrl.ctl:navCtrl_handleDetailSelectionEvent|Active tab should be changed to : "+ typeSelector); @@ -587,7 +641,7 @@ void navCtrl_handleDetailSelectionEvent(string dp,string value,string target){ // a fake point will be known by the # delim string var=""; - if (strtok(selection,"#") >= 0) { + if (strpos(selection,"#") >= 0) { dyn_string aS = strsplit(selection,"#"); selection = aS[1]; var= aS[2]; @@ -597,7 +651,7 @@ void navCtrl_handleDetailSelectionEvent(string dp,string value,string target){ if (dpExists(DPNAME_NAVIGATOR + g_navigatorID + ".panelParamList")) { dpSet(DPNAME_NAVIGATOR + g_navigatorID + ".panelParamList",var); } else { - LOG_WARN("navCtrl.ctl:navCtrl_handleLocatorEvent| Error: no dp " + DPNAME_NAVIGATOR + g_navigatorID+".panelParamList"); + LOG_WARN("navCtrl.ctl:navCtrl_handleDetailSelectionEvent| Error: no dp " + DPNAME_NAVIGATOR + g_navigatorID+".panelParamList"); } } diff --git a/MAC/Navigator2/scripts/libs/navFunct.ctl b/MAC/Navigator2/scripts/libs/navFunct.ctl index 11a7c1692ec..b00b85372d3 100644 --- a/MAC/Navigator2/scripts/libs/navFunct.ctl +++ b/MAC/Navigator2/scripts/libs/navFunct.ctl @@ -79,7 +79,8 @@ //navFunct_CEPName2inputBuf : returns ionr from CEPname //navFunct_stationNameToIONode : returns the IONode belonging to a station //navFunct_isBGPSwitch : returns the BGPSwitch setting (True = BGPRack1, False=BGPRack0) - +//navFunct_IONode2DPName : returns the DP name based on the ionode number. +//navFunct_formatInt : returns a string with the int preceeded by zeros #uses "GCFLogging.ctl" #uses "GCFCommon.ctl" @@ -1174,17 +1175,22 @@ void navFunct_fillObservationsList() { for (int i=1; i <= dynlen(g_processesList);i++) { // check if the dptype is of type (Stn)Observation string process = navFunct_getPathLessOne(g_processesList[i]); - if (dpTypeName(process) == "Observation" || dpTypeName(process) == "StnObservation") { - // get the real observation name - int iPos = dynContains(g_observations["DP"],dpSubStr(process,DPSUB_DP)); - if (iPos > 0) { - string observation = g_observations["NAME"][iPos]; - strreplace(observation,"LOFAR_ObsSW_",""); + // check if it is an existing databasePoint + if (dpExists(process) ) { + if (dpTypeName(process) == "Observation" || dpTypeName(process) == "StnObservation" || dpTypeName(process) == "CEPObservation") { + // get the real observation name + int iPos = dynContains(g_observations["DP"],dpSubStr(process,DPSUB_DP)); + if (iPos > 0) { + string observation = g_observations["NAME"][iPos]; + strreplace(observation,"LOFAR_ObsSW_",""); - if (!dynContains(g_observationsList,observation)) { - dynAppend(g_observationsList,observation); + if (!dynContains(g_observationsList,observation)) { + dynAppend(g_observationsList,observation); + } } } + } else { + LOG_ERROR("navFunct.ctl:navFunct_fillObservationsLists| ERROR: illegal DP in processList: "+process); } } // otherwise hardware @@ -1822,6 +1828,7 @@ string navFunct_CEPName2DPName(string CEPName) { int nodenr=0; int ionr=0; + if (foundRack) { name += "BGP"; } @@ -1890,7 +1897,7 @@ string navFunct_DPName2CEPName(string DPName) { int nodenr=0; int ionr=0; - if (foundRack) { + if (foundRack){ name += "R0" + rack; } @@ -2046,11 +2053,11 @@ bool navFunct_isOnline(int syst) { } } - +// Searchs all ionodes.usedStation names for match with the given name string navFunct_stationNameToIONode(string name) { dyn_dyn_anytype tab; - dpQuery("SELECT '_original.._value' FROM 'R0*-*.station' REMOTE '"+CEPDBName+"' WHERE _DPT = \"BGPConnectionInfo\"",tab); + dpQuery("SELECT '_original.._value' FROM 'LOFAR_PIC_BGP_Midplane*_IONode*.usedStation' REMOTE '"+CEPDBName+"' WHERE _DPT = \"IONode\"",tab); for(int z=2;z<=dynlen(tab);z++) { if (tab[z][2] == name) return dpSubStr(tab[z][1],DPSUB_DP); @@ -2058,9 +2065,51 @@ string navFunct_stationNameToIONode(string name) { return "not found"; } +// returns if the 2nd rack is used (true) or not (false) bool navFunct_isBGPSwitch() { // get BGPSwitch to see if rack 0 or rack 1 in use bool BGPSwitch=false; dpGet(CEPDBName+"LOFAR_PIC_BGP.BGPSwitch",BGPSwitch); return BGPSwitch; } + +//returns the name of the DataPoint for a given ionr +string navFunct_IONode2DPName(int ionode) { + string ext=""; + if (ionode < 10) ext = "0"; + string dp = CEPDBName+"LOFAR_PIC_BGP_Midplane"+navFunct_IONode2Midplane(ionode)+"_IONode"+ext+ionode; + + return dp; + +} + +// **************************************** +// Name: navFunct_formatInt +// **************************************** +// val = the value to be formatted +// maxval = the maximum value to determine the format +// so a val of 1 will be formatted" +// maxval 9 - 1 +// maxval 99 - 01 +// maxval 999 - 001 +// Returns: +// the intval as string preceeded with zeros +// or "" if error +// **************************************** +string navFunct_formatInt(int val,int maxval) { + if (val > maxval) + return ""; + + int nr = val; + // have to avoid loop when nr = 0 + if (nr == 0) nr = 1; + string ret=""; + while (nr < maxval) { + if (nr*10 > maxval) break; + nr*=10; + ret+="0"; + } + ret+=val; + return ret; +} + diff --git a/MAC/Navigator2/scripts/libs/navTabCtrl.ctl b/MAC/Navigator2/scripts/libs/navTabCtrl.ctl index c30fbbbec04..2f1df535abc 100644 --- a/MAC/Navigator2/scripts/libs/navTabCtrl.ctl +++ b/MAC/Navigator2/scripts/libs/navTabCtrl.ctl @@ -371,7 +371,7 @@ void navTabCtrl_fillPanelChoice(dyn_string panels,int panelNr) { // /////////////////////////////////////////////////////////////////////////// void navTabCtrl_saveAndRestoreCurrentDP(string newtab) { - +/* LOG_DEBUG("navTabCtrl.ctl:navTabCtrl_saveAndRestoreCurrentDP| curDP: "+g_currentDatapoint); LOG_DEBUG("navTabCtrl.ctl:navTabCtrl_saveAndRestoreCurrentDP| ACTIVE_TAB: "+ACTIVE_TAB); LOG_DEBUG("navTabCtrl.ctl:navTabCtrl_saveAndRestoreCurrentDP| newtab: "+newtab); @@ -402,6 +402,7 @@ void navTabCtrl_saveAndRestoreCurrentDP(string newtab) { g_currentDatapoint = MainDBName+"LOFAR"; } LOG_DEBUG("navTabCtrl.ctl:navTabCtrl_saveAndRestoreCurrentDP|curDP after change: ",g_currentDatapoint); + */ } diff --git a/MAC/Navigator2/scripts/libs/navigator.ctl b/MAC/Navigator2/scripts/libs/navigator.ctl index d858f4707b9..b845ea1aa23 100644 --- a/MAC/Navigator2/scripts/libs/navigator.ctl +++ b/MAC/Navigator2/scripts/libs/navigator.ctl @@ -147,6 +147,7 @@ void navigator_handleEventInitialize() // Init the connection Watchdog GCFCWD_Init(); + // we need to wait until the connection watchdog has been initialised if (!waitInitProcess("GCFCWDFinished")) { LOG_FATAL("navigator.ctl:navigator_handleEventInitialize|Couldn't finish GCFCWD_Init() , leaving"); @@ -167,6 +168,7 @@ void navigator_handleEventInitialize() // Initilaize the alarm system initNavigatorAlarms(); + // we need to wait until the alarmSystem has been initialised if (!waitInitProcess("initNavigatorAlarmsFinished")) { LOG_FATAL("navigator.ctl:navigator_handleEventInitialize|Couldn't finish initNavigatorAlarmsFinished() , leaving"); @@ -181,6 +183,7 @@ void navigator_handleEventInitialize() LOG_FATAL("navigator.ctl:navigator_handleEventInitialize|Couldn't finish queryConnectObservationsFinished() , leaving"); } + // set initialized ready g_initializing = false; diff --git a/MAC/Navigator2/scripts/readStationBGPconnections.ctl b/MAC/Navigator2/scripts/readStationBGPconnections.ctl index b4352f31d25..13d1b8db3e8 100644 --- a/MAC/Navigator2/scripts/readStationBGPconnections.ctl +++ b/MAC/Navigator2/scripts/readStationBGPconnections.ctl @@ -32,12 +32,16 @@ main() { bool showDebug = false; + + // first empty old settings + + emptyIONodes(); string strCurConfig; string strDataDir = ""; string strDataDir = ""; if (isdir("/opt/lofar/etc/") ) { - strDataDir = "/opt/lofar/etc/StaticMetaData/"; + strDataDir = "/opt/lofar/etc/"; } else if ( isdir ("d:/data/TRUNK-CCU001/data/configs/") ) { strDataDir = "d:/data/TRUNK-CCU001/data/configs/"; } else { @@ -45,120 +49,77 @@ main() return; } - string strRSPDatFile = strDataDir+"RSPConnections.dat"; - string strMACDatFile = strDataDir+"MAC+IP.dat"; + string strRSPDatFile = strDataDir+"RSPConnections_CCU.dat"; dyn_string dynStr_RSPfile; - dyn_string dynStr_MACfile; - // first read the files - dynStr_RSPfile = lto_getFile_asDynStr(strRSPDatFile); - dynStr_MACfile = lto_getFile_asDynStr(strMACDatFile); + // first read the file + dynStr_RSPfile = lto_getFile_asDynStr(strRSPDatFile); DebugN("Filling Database from file " + strRSPDatFile); for (int index=1;index <= dynlen(dynStr_RSPfile);index++) { if (strpos(dynStr_RSPfile[index],"#") < 0 || strpos(dynStr_RSPfile[index],"#") > 4) { + dyn_string linesplitted=strsplit(dynStr_RSPfile[index]," \t"); if (showDebug) DebugN(index+" :"+linesplitted); - // check if stationname is not empty - if (dynlen(linesplitted) == 3 && linesplitted[3] != "") { - string ionode = linesplitted[3]; - string ioname = "LOFAR_PIC_"+navFunct_CEPName2DPName(ionode); - - int stationPlace=1; - if (strpos(ionode,"BG") < 0) { - stationPlace = 0; - } else { - if (showDebug) DebugN("BGP in name found: " + ionode); - continue; - } - int rackPlace=1; - if (strpos(ionode,"R00") < 0) { - rackPlace=0; - } + string station = linesplitted[1]; + string rspstr = linesplitted[2]; + string ionode = linesplitted[3]; + string ip = linesplitted[4]; + string mac = linesplitted[5]; + string macForeign = ""; + // the station/mac/ip places are for the cases were rsp1 can be the 2nd ear or a foreign station + // if a foreign station is used they will be in the list as R(00-01)_BG(1-3)_(DE,FR,SE,UK)(601-608) + // and the real ionode can be found based on the shared ipnr + // then the info will go to the 2nd station in the database - dyn_string rsp = strsplit(linesplitted[2],"_"); - int nr = rsp[2]; - if (showDebug) DebugN( "node: "+ionode+ " rspfull: " + linesplitted[2]+ " rsp[2]" + rsp[2]+ "nr: "+nr); - if (dpExists(ioname)) { - dpSet(ioname+".station"+stationPlace,linesplitted[1]); -// dpSet(ioname+".RSPBoard"+rackPlace,nr); - } else { - DebugN(ionode+" gives wrong dp: " , ioname); - } - } - } - } - DebugN("Ready"); - - // now read MAC+IP - DebugN("Filling Database from file " + strMACDatFile); - for (int index=1;index <= dynlen(dynStr_MACfile);index++) { - if (strpos(dynStr_MACfile[index],"#") < 0 || strpos(dynStr_MACfile[index],"#") > 4) { - dyn_string linesplitted=strsplit(dynStr_MACfile[index]," \t"); - - if (showDebug) DebugN(index+" :"+linesplitted); - // check if stationname is not empty - if (dynlen(linesplitted) == 3 && linesplitted[1] != "") { - string ionode= linesplitted[1]; - if (strpos(ionode,"R02") >= 0) { - continue; - } - int rackPlace=1; - if (strpos(ionode,"R00") < 0) { - rackPlace=0; + int stationPlace=1; + if (strpos(ionode,"R00") >= 0) { + stationPlace=0; + } + if (strpos(ionode,"BG") >= 0) { + if (showDebug) DebugN(" ionode contains BG router name, trying to find real ionode for connection based on ip: "+ip); + ionode=""; + // check list based on ipnr and find the real ionode + for (int idx=1;idx <= index;idx++) { + if (strpos(dynStr_RSPfile[idx],ip) >= 0) { + if (showDebug) DebugN(" found match for ip in: " + dynStr_RSPfile[idx]); + dyn_string sp = strsplit(dynStr_RSPfile[idx]," \t"); + ionode= sp[3]; + macForeign= mac; + break; + } } - - string ioname = "LOFAR_PIC_"+navFunct_CEPName2DPName(ionode); - + } - int stationPlace=1; - - if (strpos(ionode,"BG") < 0) { - stationPlace = 0; - } else { - if (showDebug) DebugN("BGP in name found: " + ionode); - // we need te find out the foreign connection info out of two files - // first we need the Station and rspinfo that belong to thies node - dyn_string rspinfo = dynPatternMatch("*"+ionode+"*",dynStr_RSPfile); - // take stationname and rspnr - if (dynlen(rspinfo) < 1) { - DebugN("no match in RSPconnections.dat for pattern: "+ ionode); - continue; - } - dyn_string spl=strsplit(rspinfo[1]," \t"); - string station = spl[1]; - dyn_string rsp = strsplit(spl[2],"_"); - int nr = rsp[2]; - - - //now look for match on ip nr in same file - dyn_string ipinfo = dynPatternMatch("*"+linesplitted[2]+"*",dynStr_MACfile); - // there must be 2 hits, 1st is the right node, 2nd is the initial line with BG - if (dynlen(ipinfo) < 2) { - DebugN("couldn't find match on ip for :"+ionode+" with pattern "+"*"+linesplitted[2]+"*"); - continue; - } - spl=strsplit(ipinfo[1]," \t"); - ionode= spl[1]; - ioname = "LOFAR_PIC_"+navFunct_CEPName2DPName(ionode); - if (dpExists(ioname)) { - dpSet(ioname+".station"+stationPlace,station); -// dpSet(ioname+".RSPBoard"+rackPlace,nr); - } else { - DebugN(ionode+" gives wrong dp: " , ioname); - continue; - } - } - - if (dpExists(ioname)) { - dpSet(ioname+".IP"+rackPlace,linesplitted[2]); - dpSet(ioname+".MAC"+rackPlace,linesplitted[3]); + if (ionode == "" ) { + DebugN("Found BG name in ionode, but couldn't find ip match. skipping...."); + continue; + } else { + if (showDebug) DebugN("ionode match found: "+ionode); + } + + string ioname = "LOFAR_PIC_"+navFunct_CEPName2DPName(ionode); + + + + dyn_string rsp = strsplit(rspstr,"_"); + int nr = rsp[2]; + if (showDebug) DebugN( "node: "+ionode+ " rspfull: " + rspstr+ " rsp[2]" + rsp[2]+ " nr: "+nr + + " ip: "+ip+ " mac: "+mac); + if (dpExists(ioname)) { + dpSet(ioname+".IP"+stationPlace,ip); + if (macForeign != "") { + dpSet(ioname+".MACForeign",macForeign); + dpSet(ioname+".station1",station); } else { - DebugN(ionode+" gives wrong dp: " , ioname); + dpSet(ioname+".MAC"+stationPlace,mac); + dpSet(ioname+".station0",station); } - } + } else { + DebugN(ionode+" gives wrong dp: " , ioname); + } } } DebugN("Ready"); @@ -196,3 +157,22 @@ dyn_string lto_getFile_asDynStr(string aFileName) return aFile_asDynStr; } + +void emptyIONodes() { + for (int i = 0; i < 64;i++) { + string ext = ""; + if (i < 10) ext = "0"; + string dp = "LOFAR_PIC_BGP_Midplane"+navFunct_IONode2Midplane(i)+"_IONode"+ext+i; + if (dpExists(dp+".station0")) { + dpSet(dp+".station0",""); + dpSet(dp+".IP0",""); + dpSet(dp+".MAC0",""); + dpSet(dp+".station1",""); + dpSet(dp+".IP1",""); + dpSet(dp+".MAC1",""); + dpSet(dp+".MACForeign",""); + } else { + DebugN("wrong dp found: "+dp+".station0"); + } + } +} diff --git a/MAC/Tools/Clock/plotclock b/MAC/Tools/Clock/plotclock index fccd5acb434..d48ca778709 100755 --- a/MAC/Tools/Clock/plotclock +++ b/MAC/Tools/Clock/plotclock @@ -1,5 +1,28 @@ -#!/usr/bin/gnuplot +#!/bin/bash +# +# V1.0, M.J.Norden, 18-09-2012 +# Usage: plotclock yyyymmdd +# + +if [ "$1" != "" ]; then + cp /var/log/ntpstats/loopstats.$1 /localhome/data/loopstats + +else + cp /var/log/ntpstats/loopstats /localhome/data/loopstats + echo "Usage: plotclock yyyymmdd" + sleep 1 + +fi +/usr/bin/gnuplot <<\EOF set grid ytics -plot "/var/log/ntpstats/loopstats" using 2:3 axis x1y1 w lines lt 3 title "clock offset", '' using 2:5 w lines lt 1 title "RMS jitter" +set xtics 7200 +set mxtics 4 +set autoscale +set ylabel "time difference between GPS time and LCU clock" +set xlabel "seconds elapsed since last midnight (UTC)" +plot "/localhome/data/loopstats" using 2:3 axis x1y1 w lines lt 3 title "clock offset", '' using 2:5 w lines lt 1 title "RMS jitter" pause 30 reread +EOF + + diff --git a/MAC/Tools/Rubidium/plotrubidium b/MAC/Tools/Rubidium/plotrubidium index 2d788d07f90..7f7807b379b 100644 --- a/MAC/Tools/Rubidium/plotrubidium +++ b/MAC/Tools/Rubidium/plotrubidium @@ -1,4 +1,19 @@ -#!/usr/bin/gnuplot +#!/bin/bash +# +# V1.0, M.J.Norden, 18-09-2012 +# Usage: plotrubidium yyyymmdd +# + +if [ "$1" != "" ]; then + cp /var/log/ntpstats/rubidium_log.$1 /localhome/data/rubidium_log + +else + cp /var/log/ntpstats/rubidium_log /localhome/data/rubidium_log + echo "Usage: plotrubidium yyyymmdd" + sleep 1 + +fi +/usr/bin/gnuplot <<\EOF set grid ytics set xtics 7200 set mxtics 4 @@ -9,6 +24,8 @@ set xlabel "date-time (UT)" set timefmt "%Y-%m-%dT%H:%M:%S" set xdata time set format x "%d %b-%H:%M" -plot "/var/log/ntpstats/rubidium_log" using 1:5 every 20 notitle; +plot "/localhome/data/rubidium_log" using 1:5 every 20 notitle; pause 300 reread +EOF + diff --git a/RTCP/CNProc/src/AsyncTransposeBeams.cc b/RTCP/CNProc/src/AsyncTransposeBeams.cc index 9ff2e0d426b..39b00d5a656 100644 --- a/RTCP/CNProc/src/AsyncTransposeBeams.cc +++ b/RTCP/CNProc/src/AsyncTransposeBeams.cc @@ -20,11 +20,10 @@ namespace RTCP { union Tag { struct { - unsigned sourceRank :13; /* 0..8191, or two BG/P racks */ - unsigned comm :2; - unsigned _dummy :1; - unsigned subband :8; - unsigned beam :8; + unsigned sign : 1; /* must be 0 */ + unsigned sourceRank :11; /* 0..4095, or one BG/P rack */ + unsigned subband :10; + unsigned beam : 9; } info; uint32 nr; @@ -48,6 +47,7 @@ AsyncTransposeBeams::AsyncTransposeBeams( itsCommHandles(itsNrCommunications,nrSubbands), itsLocalSubbands(nrSubbands) { + ASSERT(itsNrCommunications == 1); // no bits left to encode communication channel, so we can support only one } template <typename T,unsigned DIM, unsigned FLAGS_DIM> void AsyncTransposeBeams::postReceive(SampleData<T,DIM,FLAGS_DIM> *transposedData, unsigned localSubband, unsigned globalSubband, unsigned beam, unsigned psetIndex, unsigned coreIndex) @@ -71,8 +71,9 @@ AsyncTransposeBeams::AsyncTransposeBeams( for (unsigned h = 0; h < itsNrCommunications; h ++) { Tag t; + t.info.sign = 0; t.info.sourceRank = rank; - t.info.comm = h; + //t.info.comm = h; t.info.beam = beam; t.info.subband = globalSubband; @@ -104,7 +105,8 @@ unsigned AsyncTransposeBeams::waitForAnyReceive() LOG_DEBUG_STR( "Received subband " << subband << " from pset ??, rank " << rank << ", tag " << tag ); #endif // mark the right communication handle as received - itsCommHandles[t.info.comm][subband] = -1; + unsigned comm = 0; // = t.info.comm; + itsCommHandles[comm][subband] = -1; // check whether we have received all communications for this psetIndex. // This is the case when commHandles are -1. @@ -141,8 +143,9 @@ unsigned AsyncTransposeBeams::waitForAnyReceive() for (unsigned h = 0; h < itsNrCommunications; h ++) { Tag t; + t.info.sign = 0; t.info.sourceRank = itsLocationInfo.rank(); - t.info.comm = h; + //t.info.comm = h; t.info.subband = subband; t.info.beam = globalBeam; diff --git a/RTCP/CNProc/src/PPF.cc b/RTCP/CNProc/src/PPF.cc index 60054befef8..278c69dc174 100644 --- a/RTCP/CNProc/src/PPF.cc +++ b/RTCP/CNProc/src/PPF.cc @@ -88,8 +88,14 @@ template <> void PPF<i4complex>::initConstantTable() extern fcomplex _FIR_fp_table[16][16]; static const float map[] = { +/* + * TODO: Test whether this is better: + * 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, - -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5, + -7.5, -6.5, -5.5, -4.5, -3.5, -2.5, -1.5, -0.5 + */ + 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, + -7.0, -7.0, -6.0, 5.0, -4.0, -3.0, -2.0, -1.0 }; for (unsigned i = 0; i < 16; i ++) diff --git a/RTCP/IONProc/src/ION_main.cc b/RTCP/IONProc/src/ION_main.cc index f7a5bd9d198..339a197ef1d 100644 --- a/RTCP/IONProc/src/ION_main.cc +++ b/RTCP/IONProc/src/ION_main.cc @@ -33,6 +33,7 @@ #include <Interface/Stream.h> #include <Interface/Parset.h> #include <ION_Allocator.h> +#include <SSH.h> #include <Stream/SocketStream.h> #include <StreamMultiplexer.h> #include <IONProc/Package__Version.h> @@ -49,10 +50,6 @@ #include <sys/types.h> #include <sys/mman.h> -#ifdef HAVE_LIBSSH2 -#include <libssh2.h> -#endif - #include <boost/format.hpp> #if defined HAVE_MPI @@ -390,13 +387,10 @@ int main(int argc, char **argv) } #endif -#ifdef HAVE_LIBSSH2 - int rc = libssh2_init(0); - if (rc) { - std::cerr << "libssh2 init failed: " << rc << std::endl; + if (!SSH_Init()) { + std::cerr << "SSH subsystem init failed" << std::endl; exit(1); } -#endif #if defined HAVE_BGP INIT_LOGGER_WITH_SYSINFO(str(boost::format("IONProc@%02d") % myPsetNumber)); @@ -415,9 +409,7 @@ int main(int argc, char **argv) master_thread(); -#ifdef HAVE_LIBSSH2 - libssh2_exit(); -#endif + SSH_Finalize(); #if defined HAVE_MPI MPI_Finalize(); diff --git a/RTCP/IONProc/src/InputThreadAsm.S b/RTCP/IONProc/src/InputThreadAsm.S index 41581a666e7..68b6d99354a 100644 --- a/RTCP/IONProc/src/InputThreadAsm.S +++ b/RTCP/IONProc/src/InputThreadAsm.S @@ -27,8 +27,8 @@ _copy_pkt_to_bbuffer_32_bytes: cmpwi 1,7,1 subi 7,7,1 - sub 3,3,4 subi 4,4,1*16 + sub 3,3,4 subi 5,5,16 li 8,16 diff --git a/RTCP/IONProc/src/Job.cc b/RTCP/IONProc/src/Job.cc index 40b3f8e97cb..f38d8888f0b 100644 --- a/RTCP/IONProc/src/Job.cc +++ b/RTCP/IONProc/src/Job.cc @@ -88,7 +88,9 @@ Job::Job(const char *parsetName) if (itsParset.PLC_controlled()) { // let the ApplController decide what we should do try { - itsPLCStream = new SocketStream(itsParset.PLC_Host(), itsParset.PLC_Port(), SocketStream::TCP, SocketStream::Client, 60); + // Do _not_ wait for the stop time to communicate with ApplController, + // or the whole observation could be wasted. + itsPLCStream = new SocketStream(itsParset.PLC_Host(), itsParset.PLC_Port(), SocketStream::TCP, SocketStream::Client, time(0) + 30); itsPLCClient = new PLCClient(*itsPLCStream, *this, itsParset.PLC_ProcID(), itsObservationID); itsPLCClient->start(); @@ -225,7 +227,7 @@ void Job::StorageProcess::start() throw SystemCallException("getcwd", errno, THROW_ARGS); #ifdef HAVE_LIBSSH2 - std::string commandLine = str(boost::format("cd %s && %s%s %u %d %u") + std::string commandLine = str(boost::format("cd %s && %s%s %u %d %u 2>&1") % cwd #if defined USE_VALGRIND % "valgrind --leak-check=full " @@ -242,7 +244,7 @@ void Job::StorageProcess::start() #endif ); - itsSSHconnection = new SSHconnection(itsLogPrefix, itsHostname, commandLine, userName, sshKey); + itsSSHconnection = new SSHconnection(itsLogPrefix, itsHostname, commandLine, userName, sshKey, 0); itsSSHconnection->start(); #else @@ -279,13 +281,20 @@ void Job::StorageProcess::stop(struct timespec deadline) #ifdef HAVE_LIBSSH2 itsSSHconnection->stop(deadline); #else - // TODO: update timeout - time_t now = time(0); + joinSSH(itsLogPrefix, itsPID, (deadline.tv_sec ? deadline.tv_sec : time(0)) + 1); +#endif + + itsThread->cancel(); +} - unsigned timeout = 1 + (now < deadline.tv_sec ? deadline.tv_sec - now : 0); - joinSSH(itsLogPrefix, itsPID, timeout); -#endif +bool Job::StorageProcess::isDone() +{ +#ifdef HAVE_LIBSSH2 + return itsSSHconnection->isDone(); +#else + return false; +#endif } @@ -293,7 +302,7 @@ void Job::StorageProcess::controlThread() { LOG_DEBUG_STR(itsLogPrefix << "[ControlThread] connecting..."); std::string resource = getStorageControlDescription(itsParset.observationID(), itsRank); - PortBroker::ClientStream stream(itsHostname, storageBrokerPort(itsParset.observationID()), resource); + PortBroker::ClientStream stream(itsHostname, storageBrokerPort(itsParset.observationID()), resource, 0); // for now, we just send the parset and call it a day LOG_DEBUG_STR(itsLogPrefix << "[ControlThread] connected -- sending parset"); @@ -317,13 +326,26 @@ void Job::startStorageProcesses() void Job::stopStorageProcesses() { - struct timespec deadline; + time_t deadline = time(0) + 300; + struct timespec immediately = { 0, 0 }; + + size_t nrRunning = itsStorageProcesses.size(); + + do { + for (unsigned rank = 0; rank < itsStorageProcesses.size(); rank ++) + if (itsStorageProcesses[rank]->isDone()) { + itsStorageProcesses[rank]->stop(immediately); + + nrRunning--; + } + + if (nrRunning > 0) + sleep(1); - deadline.tv_sec = time(0) + 10; - deadline.tv_nsec = 0; + } while( nrRunning > 0 && time(0) < deadline ); for (unsigned rank = 0; rank < itsStorageProcesses.size(); rank ++) - itsStorageProcesses[rank]->stop(deadline); + itsStorageProcesses[rank]->stop(immediately); } diff --git a/RTCP/IONProc/src/Job.h b/RTCP/IONProc/src/Job.h index 0e14dbaf6a5..c72f291955c 100644 --- a/RTCP/IONProc/src/Job.h +++ b/RTCP/IONProc/src/Job.h @@ -99,6 +99,8 @@ class Job : public PLCRunnable void start(); void stop( struct timespec deadline ); + bool isDone(); + private: void controlThread(); diff --git a/RTCP/IONProc/src/LogThread.cc b/RTCP/IONProc/src/LogThread.cc index 4b3a123f33b..ccf585bbec1 100644 --- a/RTCP/IONProc/src/LogThread.cc +++ b/RTCP/IONProc/src/LogThread.cc @@ -102,11 +102,23 @@ void LogThread::writeCPUstats(std::stringstream &str) struct CPUload load; struct timeval tv; + static size_t lowIdleCount = 0; + if (readCPUstats(load)) { gettimeofday( &tv, 0 ); float timediff = (tv.tv_sec - previousTimeval.tv_sec) + (tv.tv_usec - previousTimeval.tv_usec)/1.0e6; + unsigned idle0 = static_cast<unsigned>((load.idle0 - previousLoad.idle0) / timediff); + if (idle0 < 10) + lowIdleCount++; + else + lowIdleCount = 0; + + // TODO: Don't print this error in non-realtime mode + if (lowIdleCount == 5) + LOG_ERROR("CPU load critical on core 0"); + //str << ", us/sy/in/id: [" str << ", us/sy/in/id(0): [" << fixed << setprecision(0) @@ -114,7 +126,7 @@ void LogThread::writeCPUstats(std::stringstream &str) << (unsigned(load.system - previousLoad.system) + 2) / 4 / timediff << '/' << (unsigned(load.interrupt - previousLoad.interrupt) + 2) / 4 / timediff << '/' << (unsigned(load.idle - previousLoad.idle) + 2) / 4 / timediff << '(' - << (unsigned(load.idle0 - previousLoad.idle0) / timediff) << ")]"; + << idle0 << ")]"; #if 0 << "], id: [" << (unsigned(load.idlePerCore[0] - previousLoad.idlePerCore[0]) << '/' diff --git a/RTCP/IONProc/src/OutputSection.cc b/RTCP/IONProc/src/OutputSection.cc index ac157218ddb..a5fc54bcda1 100644 --- a/RTCP/IONProc/src/OutputSection.cc +++ b/RTCP/IONProc/src/OutputSection.cc @@ -233,8 +233,8 @@ void OutputSection::notDroppingData(unsigned stream) void OutputSection::mainLoop() { #if defined HAVE_BGP_ION - //doNotRunOnCore0(); - runOnCore0(); + doNotRunOnCore0(); + //runOnCore0(); setPriority(2); #endif diff --git a/RTCP/IONProc/src/OutputThread.cc b/RTCP/IONProc/src/OutputThread.cc index 79bf6bb8ffa..00fbd065016 100644 --- a/RTCP/IONProc/src/OutputThread.cc +++ b/RTCP/IONProc/src/OutputThread.cc @@ -42,7 +42,8 @@ namespace RTCP { OutputThread::OutputThread(const Parset &parset, OutputType outputType, unsigned streamNr, unsigned adderNr) : itsLogPrefix(str(boost::format("[obs %u type %u stream %3u adder %3u] ") % parset.observationID() % outputType % streamNr % adderNr)), - itsOutputDescriptor(getStreamDescriptorBetweenIONandStorage(parset, outputType, streamNr)) + itsOutputDescriptor(getStreamDescriptorBetweenIONandStorage(parset, outputType, streamNr)), + itsDeadline(parset.stopTime()) { for (unsigned i = 0; i < maxSendQueueSize; i ++) itsFreeQueue.append(newStreamableData(parset, outputType, streamNr, hugeMemoryAllocator)); @@ -65,7 +66,7 @@ void OutputThread::mainLoop() try { LOG_DEBUG_STR(itsLogPrefix << "Creating connection to " << itsOutputDescriptor << "..."); - SmartPtr<Stream> streamToStorage(createStream(itsOutputDescriptor, false)); + SmartPtr<Stream> streamToStorage(createStream(itsOutputDescriptor, false, static_cast<time_t>(itsDeadline))); LOG_DEBUG_STR(itsLogPrefix << "Creating connection to " << itsOutputDescriptor << ": done"); for (SmartPtr<StreamableData> data; (data = itsSendQueue.remove()) != 0; itsFreeQueue.append(data.release())) diff --git a/RTCP/IONProc/src/OutputThread.h b/RTCP/IONProc/src/OutputThread.h index 428cf923fb9..4a34677461a 100644 --- a/RTCP/IONProc/src/OutputThread.h +++ b/RTCP/IONProc/src/OutputThread.h @@ -55,6 +55,7 @@ class OutputThread const std::string itsLogPrefix; const std::string itsOutputDescriptor; + const double itsDeadline; public: SmartPtr<Thread> itsThread; diff --git a/RTCP/IONProc/src/RSP.h b/RTCP/IONProc/src/RSP.h index 7499850da12..adaf9e013f6 100644 --- a/RTCP/IONProc/src/RSP.h +++ b/RTCP/IONProc/src/RSP.h @@ -23,6 +23,7 @@ #ifndef LOFAR_IONPROC_RSP_H #define LOFAR_IONPROC_RSP_H +#include <Common/LofarTypes.h> namespace LOFAR { namespace RTCP { @@ -34,14 +35,14 @@ namespace RTCP { struct RSP { struct Header { - uint8_t version; - uint8_t sourceInfo; - uint16_t configuration; - uint16_t station; - uint8_t nrBeamlets; - uint8_t nrBlocks; - uint32_t timestamp; - uint32_t blockSequenceNumber; + uint8 version; + uint8 sourceInfo; + uint16 configuration; + uint16 station; + uint8 nrBeamlets; + uint8 nrBlocks; + uint32 timestamp; + uint32 blockSequenceNumber; } header; char data[8130]; diff --git a/RTCP/IONProc/src/SSH.cc b/RTCP/IONProc/src/SSH.cc index dc2d734f785..3438333507c 100644 --- a/RTCP/IONProc/src/SSH.cc +++ b/RTCP/IONProc/src/SSH.cc @@ -34,12 +34,14 @@ #include <fcntl.h> #include <string.h> #include <errno.h> +#include <time.h> #include <vector> #include <string> #include <sstream> #ifdef HAVE_LIBSSH2 #include <Scheduling.h> +#include <Interface/SmartPtr.h> #include <sstream> #include <sys/select.h> #include <Common/lofar_string.h> @@ -52,14 +54,15 @@ namespace LOFAR { namespace RTCP { #ifdef HAVE_LIBSSH2 - -SSHconnection::SSHconnection(const string &logPrefix, const string &hostname, const string &commandline, const string &username, const string &sshkey) + +SSHconnection::SSHconnection(const string &logPrefix, const string &hostname, const string &commandline, const string &username, const string &sshkey, time_t deadline) : itsLogPrefix(logPrefix), itsHostName(hostname), itsCommandLine(commandline), itsUserName(username), - itsSSHKey(sshkey) + itsSSHKey(sshkey), + itsDeadline(deadline) { } @@ -68,6 +71,11 @@ void SSHconnection::start() itsThread = new Thread(this, &SSHconnection::commThread, itsLogPrefix + "[SSH Thread] ", 65536); } +bool SSHconnection::isDone() +{ + return itsThread->isDone(); +} + void SSHconnection::stop( const struct timespec &deadline ) { if (!itsThread->wait(deadline)) { @@ -210,34 +218,45 @@ bool SSHconnection::waitsocket( FileDescriptorBasedStream &sock ) void SSHconnection::commThread() { #if defined HAVE_BGP_ION - //doNotRunOnCore0(); - runOnCore0(); + doNotRunOnCore0(); + //runOnCore0(); //nice(19); #endif - SocketStream sock( itsHostName, 22, SocketStream::TCP, SocketStream::Client ); - - LOG_DEBUG_STR( itsLogPrefix << "Connected" ); - int rc; int exitcode; - char *exitsignal=(char *)"none"; + char *exitsignal = 0; + SmartPtr<SocketStream> sock; - /* Prevent cancellation from here on -- we manually insert cancellation points to avoid - screwing up libssh2's internal administration. */ - Cancellation::disable(); - Cancellation::point(); + for(;;) { + // keep trying to connect + sock = new SocketStream( itsHostName, 22, SocketStream::TCP, SocketStream::Client, itsDeadline ); - if (!open_session(sock)) - return; + LOG_DEBUG_STR( itsLogPrefix << "Connected" ); - if (!open_channel(sock)) - return; + /* Prevent cancellation from here on -- we manually insert cancellation points to avoid + screwing up libssh2's internal administration. */ + { + ScopedDelayCancellation dc; + + Cancellation::point(); + + if (!open_session(*sock)) + continue; + + if (!open_channel(*sock)) + continue; + } + + break; + } + + LOG_DEBUG_STR( itsLogPrefix << "Starting remote command: " << itsCommandLine); while( (rc = libssh2_channel_exec(channel, itsCommandLine.c_str())) == LIBSSH2_ERROR_EAGAIN ) { - waitsocket(sock); + waitsocket(*sock); } if (rc) @@ -248,63 +267,88 @@ void SSHconnection::commThread() LOG_DEBUG_STR( itsLogPrefix << "Remote command started, waiting for output" ); + Cancellation::disable(); + Cancellation::point(); + +#define NRSTREAMS 2 + // raw input buffer - char data[0x1000]; + char data[NRSTREAMS][0x1000]; // the current line (or line remnant) - string line(""); + string line[NRSTREAMS]; + + // how many streams still provide data + unsigned nrOpenStreams = NRSTREAMS; + + // which streams still provide data + bool isOpen[NRSTREAMS]; + + for (unsigned s = 0; s < NRSTREAMS; ++s) + isOpen[s] = true; /* Session I/O */ - for( ;; ) + while( nrOpenStreams > 0 ) { - /* loop until we block */ - do { - rc = libssh2_channel_read( channel, data, sizeof data ); - if( rc > 0 ) - { - // create a buffer for line + data - stringstream buffer; + for (unsigned s = 0; s < NRSTREAMS; ++s) { + if (!isOpen[s]) + continue; + + /* loop until we block */ + do { + rc = libssh2_channel_read_ex( channel, s, data[s], sizeof data[s] ); + if( rc > 0 ) + { + // create a buffer for line + data + stringstream buffer; - buffer << line; - buffer.write( data, rc ); + buffer << line[s]; + buffer.write( data[s], rc ); - /* extract and log lines */ - for( ;; ) - { - Cancellation::point(); + /* extract and log lines */ + for( ;; ) + { + Cancellation::point(); - std::getline( buffer, line ); + std::getline( buffer, line[s] ); - if (!buffer.good()) { - // 'line' now holds the remnant - break; - } + if (!buffer.good()) { + // 'line' now holds the remnant + + if (line[s].size() > 1024) { + LOG_ERROR_STR( itsLogPrefix << "Line too long (" << line[s].size() << "); truncated: " << line[s] ); + line[s] = ""; + } + break; + } - // TODO: Use logger somehow (we'd duplicate the prefix if we just use LOG_* macros..) - cout << line << endl; + // TODO: Use logger somehow (we'd duplicate the prefix if we just use LOG_* macros..) + cout << line[s] << endl; + } + } else { + if( rc < 0 && rc != LIBSSH2_ERROR_EAGAIN ) { + /* no need to output this for the EAGAIN case */ + LOG_ERROR_STR( itsLogPrefix << "libssh2_channel_read_ex returned " << rc << " for channel " << s); + } } - } else { - if( rc < 0 && rc != LIBSSH2_ERROR_EAGAIN ) { - /* no need to output this for the EAGAIN case */ - LOG_ERROR_STR( itsLogPrefix << "libssh2_channel_read returned " << rc); - } + } while( rc > 0 ); + + /* this is due to blocking that would occur otherwise so we loop on + this condition */ + if( rc != LIBSSH2_ERROR_EAGAIN ) + { + /* EOF */ + --nrOpenStreams; } - } while( rc > 0 ); + } - /* this is due to blocking that would occur otherwise so we loop on - this condition */ - if( rc == LIBSSH2_ERROR_EAGAIN ) - { - waitsocket(sock); - } else { - /* EOF */ - break; - } + if (nrOpenStreams > 0) + waitsocket(*sock); } LOG_DEBUG_STR( itsLogPrefix << "Disconnecting" ); - close_channel(sock); + close_channel(*sock); if (rc == 0) { @@ -323,9 +367,64 @@ void SSHconnection::commThread() LOG_INFO_STR(itsLogPrefix << "Terminated normally"); } } + +#include <openssl/crypto.h> + +std::vector< SmartPtr<Mutex> > openssl_mutexes; + +static void lock_callback(int mode, int type, const char *file, int line) +{ + (void)file; + (void)line; + + if (mode & CRYPTO_LOCK) + openssl_mutexes[type]->lock(); + else + openssl_mutexes[type]->unlock(); +} + +static unsigned long thread_id_callback() +{ + return static_cast<unsigned long>(pthread_self()); +} + +#endif + +bool SSH_Init() { + +#ifdef HAVE_LIBSSH2 + // initialise openssl + openssl_mutexes.resize(CRYPTO_num_locks()); + for (size_t i = 0; i < openssl_mutexes.size(); ++i) + openssl_mutexes[i] = new Mutex; + + CRYPTO_set_id_callback(&thread_id_callback); + CRYPTO_set_locking_callback(&lock_callback); + + // initialise libssh2 + int rc = libssh2_init(0); + if (rc) + return false; #endif + return true; +} + +void SSH_Finalize() { +#ifdef HAVE_LIBSSH2 + // exit libssh2 + libssh2_exit(); + + // exit openssl + CRYPTO_set_locking_callback(NULL); + CRYPTO_set_id_callback(NULL); + + openssl_mutexes.clear(); +#endif +} + + static void exitwitherror( const char *errorstr ) { // can't cast to (void) since gcc won't allow that as a method to drop the result @@ -417,7 +516,7 @@ pid_t forkSSH(const std::string &logPrefix, const char *hostName, const char * c } -void joinSSH(const std::string &logPrefix, pid_t pid, unsigned &timeout) +void joinSSH(const std::string &logPrefix, pid_t pid, time_t deadline) { if (pid != 0) { int status; @@ -440,11 +539,10 @@ void joinSSH(const std::string &logPrefix, pid_t pid, unsigned &timeout) return; } else if (ret == 0) { // child still running - if (timeout == 0) { + if (deadline > 0 && deadline < time(0)) { break; } - timeout--; sleep(1); } else { // child exited diff --git a/RTCP/IONProc/src/SSH.h b/RTCP/IONProc/src/SSH.h index 7dda0f9d048..f8ecad86a3a 100644 --- a/RTCP/IONProc/src/SSH.h +++ b/RTCP/IONProc/src/SSH.h @@ -31,6 +31,7 @@ #include <Stream/FileDescriptorBasedStream.h> #include <libssh2.h> #include <Interface/SmartPtr.h> +#include <time.h> #endif #include <string> @@ -38,15 +39,20 @@ namespace LOFAR { namespace RTCP { +bool SSH_Init(); +void SSH_Finalize(); + #ifdef HAVE_LIBSSH2 class SSHconnection { public: - SSHconnection(const string &logPrefix, const string &hostname, const string &commandline, const string &username, const string &sshkey); + SSHconnection(const string &logPrefix, const string &hostname, const string &commandline, const string &username, const string &sshkey, time_t deadline = 0); void start(); void stop( const struct timespec &deadline ); + bool isDone(); + private: const string itsLogPrefix; const string itsHostName; @@ -55,6 +61,7 @@ private: const string itsSSHKey; SmartPtr<Thread> itsThread; + const time_t itsDeadline; static void free_session( LIBSSH2_SESSION *session ); static void free_channel( LIBSSH2_CHANNEL *channel ); @@ -74,7 +81,7 @@ private: #endif pid_t forkSSH(const std::string &logPrefix, const char *hostName, const char * const extraParams[], const char *userName, const char *sshKey); -void joinSSH(const std::string &logPrefix, pid_t pid, unsigned &timeout); +void joinSSH(const std::string &logPrefix, pid_t pid, time_t deadline = 0); const char *explainExitStatus( int exitstatus ); diff --git a/RTCP/IONProc/src/WallClockTime.h b/RTCP/IONProc/src/WallClockTime.h index 16e28bf729e..cdc4313cb6c 100644 --- a/RTCP/IONProc/src/WallClockTime.h +++ b/RTCP/IONProc/src/WallClockTime.h @@ -98,7 +98,7 @@ inline void WallClockTime::cancelWait() ScopedLock scopedLock(itsMutex); itsCancelled = true; - itsCondition.signal(); + itsCondition.broadcast(); } diff --git a/RTCP/IONProc/test/CMakeLists.txt b/RTCP/IONProc/test/CMakeLists.txt index 14beaac6c09..0cc60d5c9d0 100644 --- a/RTCP/IONProc/test/CMakeLists.txt +++ b/RTCP/IONProc/test/CMakeLists.txt @@ -7,3 +7,6 @@ include_directories(${PACKAGE_SOURCE_DIR}/src) lofar_add_test(tDelayCompensation tDelayCompensation.cc) lofar_add_test(tSSH tSSH.cc) +#lofar_add_test(tRSPTimeStamp tRSPTimeStamp.cc) + +#add_subdirectory(newInputSection) diff --git a/RTCP/IONProc/test/RTCP.parset b/RTCP/IONProc/test/RTCP.parset index 2f6644efc96..3cfafd16055 100644 --- a/RTCP/IONProc/test/RTCP.parset +++ b/RTCP/IONProc/test/RTCP.parset @@ -1,7 +1,7 @@ OLAP.CNProc.integrationSteps = 768 OLAP.CNProc.phaseOnePsets = [0..4] OLAP.CNProc.phaseTwoPsets = [0..4] -OLAP.CNProc.phaseThreePsets = [] +OLAP.CNProc.phaseThreePsets = [0..4] OLAP.CNProc.phaseOneTwoCores = [0,1,2] OLAP.CNProc.phaseThreeCores = [0,1,2] OLAP.CNProc.partition = PartitionName @@ -14,24 +14,20 @@ OLAP.nrBitsPerSample = 16 OLAP.nrTimesInFrame = 16 OLAP.nrSecondsOfBuffer = 3.5 OLAP.CNProc.nrPPFTaps = 16 -OLAP.Storage.userName = romein -OLAP.Storage.sshIdentityFile = /home/romein/.ssh/id_rsa -OLAP.Storage.msWriter = /tmp/build/gnu_opt/RTCP/Storage/src/Storage_main +OLAP.Storage.userName = mol +OLAP.Storage.sshIdentityFile = /home/mol/.ssh/id_dsa +OLAP.Storage.msWriter = Storage_main OLAP.storageNodeList = [5*0] OLAP.OLAP_Conn.IONProc_Storage_Ports = [8300..9000] OLAP.OLAP_Conn.IONProc_Storage_Transport = TCP OLAP.OLAP_Conn.rawDataOutputOnly = F OLAP.storageStationNames = [CS004LBA,CS006LBA,RS205LBA,RS208LBA,RS306LBA] OLAP.tiedArrayStationNames = [] -Observation.Beam[0].nrTiedArrayBeams = 2 +Observation.Beam[0].nrTiedArrayBeams = 1 Observation.Beam[0].TiedArrayBeam[0].angle1 = 1.1 Observation.Beam[0].TiedArrayBeam[0].angle2 = 1.2 Observation.Beam[0].TiedArrayBeam[0].coherent = T Observation.Beam[0].TiedArrayBeam[0].dispersionMeasure = 0.0 -Observation.Beam[0].TiedArrayBeam[1].angle1 = 1.3 -Observation.Beam[0].TiedArrayBeam[1].angle2 = 1.4 -Observation.Beam[0].TiedArrayBeam[1].coherent = T -Observation.Beam[0].TiedArrayBeam[1].dispersionMeasure = 0.0 OLAP.IONProc.integrationSteps = 1 OLAP.CNProc_CoherentStokes.timeIntegrationFactor = 1 OLAP.CNProc_IncoherentStokes.timeIntegrationFactor = 1 @@ -39,7 +35,7 @@ OLAP.CNProc_CoherentStokes.channelsPerSubband = 256 OLAP.CNProc_IncoherentStokes.channelsPerSubband = 256 OLAP.CNProc_CoherentStokes.subbandsPerFile = 244 OLAP.CNProc_IncoherentStokes.subbandsPerFile = 244 -OLAP.CNProc_CoherentStokes.which = I # IQUV, XXYY +OLAP.CNProc_CoherentStokes.which = XXYY # I, IQUV, XXYY OLAP.CNProc_IncoherentStokes.which = I # IQUV OLAP.PencilInfo.storageNodeList = [] OLAP.delayCompensation = T @@ -80,9 +76,9 @@ OLAP.Storage.hosts = [localhost] Observation.DataProducts.Output_Correlated.enabled = T Observation.DataProducts.Output_Correlated.locations = [5*localhost:/tmp] Observation.DataProducts.Output_Correlated.filenames = [SB000.MS,SB001.MS,SB002.MS,SB003.MS,SB004.MS] -Observation.DataProducts.Output_Beamformed.enabled = F +Observation.DataProducts.Output_Beamformed.enabled = T Observation.DataProducts.Output_Beamformed.locations = [4*localhost:/tmp] -Observation.DataProducts.Output_Beamformed.filenames = [CV001.X,CV001.Y,CV002.X,CV002.Y] +Observation.DataProducts.Output_Beamformed.filenames = [CV001.Xr,CV001.Xi,CV002.Yr,CV002.Yi] Observation.DataProducts.Output_Trigger.enabled = F Observation.DataProducts.Output_Trigger.locations = [] Observation.DataProducts.Output_Trigger.filenames = [] diff --git a/RTCP/IONProc/test/newInputSection/CMakeLists.txt b/RTCP/IONProc/test/newInputSection/CMakeLists.txt new file mode 100644 index 00000000000..875538d004f --- /dev/null +++ b/RTCP/IONProc/test/newInputSection/CMakeLists.txt @@ -0,0 +1 @@ +lofar_add_test(newInputSection newInputSection.cc) diff --git a/RTCP/IONProc/test/newInputSection/OMPThread.h b/RTCP/IONProc/test/newInputSection/OMPThread.h new file mode 100644 index 00000000000..01447894238 --- /dev/null +++ b/RTCP/IONProc/test/newInputSection/OMPThread.h @@ -0,0 +1,67 @@ +#ifndef __OMPTHREAD__ +#define __OMPTHREAD__ + +#include <pthread.h> +#include <time.h> +#include <signal.h> +#include <Common/LofarLogger.h> +#include <Common/SystemCallException.h> + +namespace LOFAR { + +class OMPThread { +public: + OMPThread(): id(0), stopped(false) {} + + void start() { + id = pthread_self(); + } + + void stop() { + id = 0; + stopped = true; + } + + void kill() { + while (!stopped) { + // interrupt blocking system calls (most notably, read()) + // note that the thread will stick around until the end + // of pragma parallel, so the thread id is always valid + // once it has been set. + pthread_t oldid = id; + + if (oldid > 0) + if (pthread_kill(oldid, SIGHUP) < 0) + throw SystemCallException("pthread_kill", errno, THROW_ARGS); + + // sleep for 100ms - do NOT let us get killed here, + // because we're maintaining integrity + const struct timespec ts = { 1, 200*1000 }; + while (nanosleep( &ts, NULL ) == -1 && errno == EINTR) + ; + } + } + + class ScopedRun { + public: + ScopedRun( OMPThread &thread ): thread(thread) { + thread.start(); + } + + ~ScopedRun() { + thread.stop(); + } + + private: + OMPThread &thread; + }; + +private: + volatile pthread_t id; + volatile bool stopped; +}; + +} + +#endif + diff --git a/RTCP/IONProc/test/newInputSection/Poll.h b/RTCP/IONProc/test/newInputSection/Poll.h new file mode 100644 index 00000000000..b3151a7cf63 --- /dev/null +++ b/RTCP/IONProc/test/newInputSection/Poll.h @@ -0,0 +1,82 @@ +#ifndef POLL +#define POLL + +#include <Stream/FileDescriptorBasedStream.h> +#include <Common/SystemCallException.h> +#include <sys/epoll.h> + +class Poll: protected FileDescriptorBasedStream { +public: + Poll(); + + // Caveats: + // * Don't add a stream that's already in the set + // * You might want to call s->setnonblocking() as well, + // or your read()/write() can still block. + void add( FileDescriptorBasedStream *s, bool reading, bool writing ); + + // Note: closing the file descriptor automatically removes + // the stream from the list, see man epoll. + void remove( FileDescriptorBasedStream *s ); + + // Wait for timeout_ms milliseconds for events, and return + // the relevant streams. Up to maxevents streams are returned. + std::vector<FileDescriptorBasedStream *> poll( int timeout_ms, size_t maxevents ); +}; + +Poll::Poll() +{ + fd = epoll_create1(EPOLL_CLOEXEC); + + if( fd == -1 ) + throw SystemCallException("epoll_create1", errno, THROW_ARGS); +} + +void Poll::add( FileDescriptorBasedStream *s, bool reading, bool writing ) +{ + ASSERT( s->fd >= 0 ); + + struct epoll_event ev; + ev.events = (reading ? EPOLLIN : 0) | (writing ? EPOLLOUT : 0); + ev.data.ptr = s; + + if (epoll_ctl(fd, EPOLL_CTL_ADD, s->fd, &ev) == -1) + throw SystemCallException("epoll_ctl", errno, THROW_ARGS); +} + +void Poll::remove( FileDescriptorBasedStream *s ) +{ + ASSERT( s->fd >= 0 ); + + struct epoll_event ev; + + if (epoll_ctl(fd, EPOLL_CTL_DEL, s->fd, &ev) == -1) + throw SystemCallException("epoll_ctl", errno, THROW_ARGS); +} + +std::vector<FileDescriptorBasedStream *> Poll::poll( int timeout_ms, size_t maxevents ) +{ + // In theory, starvation can occur under heavy I/O if maxevents < #streams. If + // this is to be avoided, extend this class to employ a ready list as + // described in 'man epoll'. + std::vector<struct epoll_event> events(maxevents); + int nfds; + + nfds = epoll_wait(fd, &events[0], events.size(), timeout_ms ); + + if (nfds == -1) + throw SystemCallException("epoll_wait", errno, THROW_ARGS); + + std::vector<FileDescriptorBasedStream *> result(nfds, 0); + + for (int i = 0; i < nfds; ++i) { + FileDescriptorBasedStream *s = static_cast<FileDescriptorBasedStream*>(events[i].data.ptr); + + results[i] = s; + } + + return result; +} + +#endif + diff --git a/RTCP/IONProc/test/newInputSection/Ranges.h b/RTCP/IONProc/test/newInputSection/Ranges.h new file mode 100644 index 00000000000..48d3e669918 --- /dev/null +++ b/RTCP/IONProc/test/newInputSection/Ranges.h @@ -0,0 +1,217 @@ +#ifndef RANGES +#define RANGES + +#include <Interface/SparseSet.h> +#include <Common/LofarLogger.h> +#include <Common/LofarTypes.h> + +#include <ostream> + +namespace LOFAR { +namespace RTCP { + +// +// Thread-safe set of int64 [from,to) ranges. +// +class Ranges { +public: + Ranges(); + Ranges( void *data, size_t numBytes, int64 minHistory, bool create ); + ~Ranges(); + + // remove [0,to) + void excludeBefore( int64 to ); + + // add a range [from,to), and return whether the addition + // was succesful. + bool include( int64 from, int64 to ); + + // returns whether there is anything set in [first, last) + bool anythingBetween( int64 first, int64 last ) const; + + SparseSet<int64> sparseSet( int64 first, int64 last ) const; + +private: + struct Range { + // Write'from' before 'to' to allow the following invariant: + // + // from < to : a valid range + // from >= to : invalid range (being written) + // from = to = 0: an unused range + volatile int64 from, to; + + Range(): from(0), to(0) {} + }; + + size_t len; + Range * ranges; + Range * begin; + Range * end; + Range *head; + + // minimal history to maintain (samples newer than this + // will be maintained in favour of newly added ranges) + int64 minHistory; + +public: + static size_t size(size_t numElements) { + return numElements * sizeof(struct Range); + } + + friend std::ostream& operator<<( std::ostream &str, const Ranges &r ); +}; + +std::ostream& operator<<( std::ostream &str, const Ranges &r ) +{ + + for (struct Ranges::Range *i = r.begin; i != r.end; ++i) + if (i->to != 0) + str << "[" << i->from << ", " << i->to << ") "; + + return str; +} + +Ranges::Ranges() +: + len(0), + ranges(0), + begin(0), + end(begin), + head(begin), + minHistory(0) +{ +} + +Ranges::Ranges( void *data, size_t numBytes, int64 minHistory, bool create ) +: + len(numBytes / sizeof *ranges), + ranges(create ? new(data)Range[len] : static_cast<Range*>(data)), + begin(&ranges[0]), + end(&ranges[len]), + head(begin), + minHistory(minHistory) +{ + ASSERT( len > 0 ); +} + +Ranges::~Ranges() +{ + for (struct Range *i = begin; i != end; ++i) + i->~Range(); +} + +void Ranges::excludeBefore( int64 to ) +{ + for (struct Range *i = begin; i != end; ++i) { + if (i->to <= to) { + // erase; delete 'to' first! + i->to = 0; + i->from = 0; + continue; + } + + if (i->from > to) { + // shorten + i->from = to; + } + } +} + +bool Ranges::include( int64 from, int64 to ) +{ + ASSERTSTR( from < to, from << " < " << to ); + ASSERTSTR( from >= head->to, from << " >= " << head->to ); + + if (head->to == 0) { + // *head is unused + head->from = from; + head->to = to; + return true; + } + + if (head->to == from) { + // *head can be extended + head->to = to; + return true; + } + + // new range is needed + struct Range * const next = head + 1 == end ? begin : head + 1; + + if (next->to < to - minHistory) { + // range at 'next' is old enough to toss away + next->from = from; + next->to = to; + + head = next; + return true; + } + + // no room -- discard + return false; +} + +bool Ranges::anythingBetween( int64 first, int64 last ) const +{ + for(struct Range *i = begin; i != end; ++i) { + // read in same order as writes occur + int64 from = i->from; + int64 to = i->to; + + if (to == 0) { + // unused + continue; + } + + if (from >= to) { + // read/write conflict + continue; + } + + from = std::max( from, first ); + to = std::min( to, last ); + + if (from < to) + return true; + } + + return false; +} + +SparseSet<int64> Ranges::sparseSet( int64 first, int64 last ) const +{ + SparseSet<int64> result; + + if (first >= last) + return result; + + for(struct Range *i = begin; i != end; ++i) { + // read in same order as writes occur + int64 from = i->from; + int64 to = i->to; + + if (to == 0) { + // unused + continue; + } + + if (from >= to) { + // read/write conflict + continue; + } + + from = std::max( from, first ); + to = std::min( to, last ); + + if (from < to) + result.include(from, to); + } + + return result; +} + +} +} + +#endif + diff --git a/RTCP/IONProc/test/newInputSection/SampleBuffer.h b/RTCP/IONProc/test/newInputSection/SampleBuffer.h new file mode 100644 index 00000000000..73ca26e7782 --- /dev/null +++ b/RTCP/IONProc/test/newInputSection/SampleBuffer.h @@ -0,0 +1,99 @@ +#ifndef __SAMPLEBUFFER__ +#define __SAMPLEBUFFER__ + +#include <Common/LofarLogger.h> +#include <Common/LofarConstants.h> +#include <Interface/MultiDimArray.h> +#include <Interface/Allocator.h> +#include "StationSettings.h" +#include "SharedMemory.h" +#include "Ranges.h" +#include <string> +#include <complex> + +namespace LOFAR { +namespace RTCP { + +template<typename T> class SampleBuffer { +public: + SampleBuffer( const struct StationSettings &settings, bool create ); + + struct SampleType { + std::complex<T> x; + std::complex<T> y; + }; + +private: + const std::string logPrefix; + SharedMemoryArena data; + SparseSetAllocator allocator; + + struct StationSettings *initSettings( const struct StationSettings &localSettings, bool create ); + + static size_t dataSize( const struct StationSettings &settings ) { + return sizeof settings + + NR_RSPBOARDS * (Ranges::size(settings.nrFlagRanges) + 8) + + settings.nrBeamlets * (settings.nrSamples * sizeof(T) + 128); + } + +public: + struct StationSettings *settings; + + const size_t nrBeamlets; + const size_t nrSamples; + const size_t nrFlagRanges; + + MultiDimArray<T,2> beamlets; // [subband][sample] + std::vector<Ranges> flags; // [rspboard] +}; + + +template<typename T> SampleBuffer<T>::SampleBuffer( const struct StationSettings &_settings, bool create ) +: + logPrefix(str(boost::format("[station %s %s board] [SampleBuffer] ") % _settings.station.stationName % _settings.station.antennaSet)), + data(_settings.dataKey, dataSize(_settings), create ? SharedMemoryArena::CREATE_EXCL : SharedMemoryArena::READ), + allocator(data), + settings(initSettings(_settings, create)), + + nrBeamlets(settings->nrBeamlets), + nrSamples(settings->nrSamples), + nrFlagRanges(settings->nrFlagRanges), + + beamlets(boost::extents[nrBeamlets][nrSamples], 128, allocator, false, false), + flags(settings->nrBoards) +{ + // bitmode must coincide with our template + ASSERT( sizeof(T) == N_POL * 2 * settings->station.bitmode / 8 ); + + for (size_t f = 0; f < flags.size(); f++) { + size_t numBytes = Ranges::size(nrFlagRanges); + + flags[f] = Ranges(static_cast<int64*>(allocator.allocate(numBytes, 8)), numBytes, nrSamples, create); + } + + LOG_INFO_STR( logPrefix << "Initialised" ); +} + +template<typename T> struct StationSettings *SampleBuffer<T>::initSettings( const struct StationSettings &localSettings, bool create ) +{ + //struct StationSettings *sharedSettings = allocator.allocateTyped<struct StationSettings>(); + struct StationSettings *sharedSettings = allocator.allocateTyped(); + + if (create) { + // register settings + LOG_INFO_STR( logPrefix << "Registering " << localSettings.station ); + *sharedSettings = localSettings; + } else { + // verify settings + ASSERT( *sharedSettings == localSettings ); + LOG_INFO_STR( logPrefix << "Connected to " << localSettings.station ); + } + + return sharedSettings; +} + +} +} + +#endif + diff --git a/RTCP/IONProc/test/newInputSection/SharedMemory.h b/RTCP/IONProc/test/newInputSection/SharedMemory.h new file mode 100644 index 00000000000..4de23a0a141 --- /dev/null +++ b/RTCP/IONProc/test/newInputSection/SharedMemory.h @@ -0,0 +1,149 @@ +#ifndef SHARED_MEMORY +#define SHARED_MEMORY + +#include <Common/Exception.h> +#include <Common/SystemCallException.h> +#include <Common/LofarLogger.h> +#include <Interface/Allocator.h> + +#include <sys/ipc.h> +#include <sys/shm.h> +#include <sys/stat.h> +#include <unistd.h> +#include <time.h> + +namespace LOFAR { +namespace RTCP { + +class SharedMemoryArena: public FixedArena { +public: + EXCEPTION_CLASS(TimeOutException, LOFAR::Exception); + + enum Mode { + CREATE, + CREATE_EXCL, + READ, + READWRITE + }; + + SharedMemoryArena( key_t key, size_t size, Mode mode = CREATE, time_t timeout = 60 ); + ~SharedMemoryArena(); + + template <typename T> T* ptr( size_t offset = 0 ) const { + return reinterpret_cast<T*>(reinterpret_cast<char*>(itsBegin) + offset); + } + +private: + const key_t key; + const Mode mode; + int shmid; +}; + +template<typename T> class SharedStruct { +public: + SharedStruct( key_t key, bool create = false, time_t timeout = 60 ); + + T &get() { + return *data.ptr<T>(); + } + + T &get() const { + return *data.ptr<T>(); + } + +private: + SharedMemoryArena data; + + SharedStruct( const SharedStruct & ); + SharedStruct &operator=( const SharedStruct & ); +}; + +SharedMemoryArena::SharedMemoryArena( key_t key, size_t size, Mode mode, time_t timeout ) +: + FixedArena(NULL, size), + key(key), + mode(mode), + shmid(-1) +{ + time_t deadline = time(0) + timeout; + int open_flags = 0, attach_flags = 0; + + switch (mode) { + case CREATE_EXCL: + open_flags |= IPC_EXCL; + case CREATE: + open_flags |= IPC_CREAT | SHM_NORESERVE | S_IRUSR | S_IWUSR; + break; + + case READ: + attach_flags |= SHM_RDONLY; + break; + + case READWRITE: + default: + break; + } + + // get/create shmid handle + for(;;) { + shmid = shmget( key, itsSize, open_flags ); + + if (shmid == -1) { + if (!timeout) + throw SystemCallException("shmget", errno, THROW_ARGS); + + if (errno != ENOENT && errno != EEXIST) + throw SystemCallException("shmget", errno, THROW_ARGS); + } else { + // attach to segment + itsBegin = shmat( shmid, NULL, attach_flags ); + + if (itsBegin != (void*)-1) + break; // success! + + if (!timeout) + throw SystemCallException("shmat", errno, THROW_ARGS); + + if (errno != EINVAL) + throw SystemCallException("shmat", errno, THROW_ARGS); + } + + // try again until the deadline + + if (time(0) >= deadline) + throw TimeOutException("shared memory", THROW_ARGS); + + if (usleep(999999) < 0) + throw SystemCallException("sleep", errno, THROW_ARGS); + } + +} + +SharedMemoryArena::~SharedMemoryArena() +{ + try { + // detach + if (shmdt(itsBegin) < 0) + throw SystemCallException("shmdt", errno, THROW_ARGS); + + // destroy + if (mode == CREATE || mode == CREATE_EXCL) + if (shmctl(shmid, IPC_RMID, NULL) < 0) + throw SystemCallException("shmctl", errno, THROW_ARGS); + + } catch (Exception &ex) { + LOG_ERROR_STR("Exception in destructor: " << ex); + } +} + +template<typename T> SharedStruct<T>::SharedStruct( key_t key, bool create, time_t timeout ) +: + data(key, sizeof(T), create ? SharedMemoryArena::CREATE : SharedMemoryArena::READWRITE, timeout) +{ +} + +} +} + +#endif + diff --git a/RTCP/IONProc/test/newInputSection/StationData.h b/RTCP/IONProc/test/newInputSection/StationData.h new file mode 100644 index 00000000000..1dd93434314 --- /dev/null +++ b/RTCP/IONProc/test/newInputSection/StationData.h @@ -0,0 +1,390 @@ +#ifndef __STATIONDATA__ +#define __STATIONDATA__ + +#include <Common/LofarLogger.h> +#include <Stream/Stream.h> +#include <Interface/RSPTimeStamp.h> +#include <Interface/SmartPtr.h> +#include <RSP.h> +#include <WallClockTime.h> +#include "SampleBuffer.h" +#include "Ranges.h" +#include "StationSettings.h" +#include <string> +#include <cstring> +#include <omp.h> + +namespace LOFAR { +namespace RTCP { + +template<typename T> class RSPBoard { +public: + RSPBoard( Stream &inputStream, SampleBuffer<T> &buffer, unsigned boardNr, const struct StationSettings &settings ); + + const unsigned nr; + + bool readPacket(); + void writePacket(); + + static size_t packetSize( struct RSP &packet ) { + return sizeof(struct RSP::Header) + packet.header.nrBeamlets * packet.header.nrBlocks * sizeof(T); + } + +private: + const std::string logPrefix; + + Stream &inputStream; + const bool supportPartialReads; + struct RSP packet; + TimeStamp last_timestamp; + TimeStamp last_logtimestamp; + + SampleBuffer<T> &buffer; + Ranges &flags; + const struct StationSettings settings; + const size_t firstBeamlet; + + size_t nrReceived, nrBadSize, nrBadTime, nrOutOfOrder; + + void logStatistics(); +}; + +template<typename T> RSPBoard<T>::RSPBoard( Stream &inputStream, SampleBuffer<T> &buffer, unsigned boardNr, const struct StationSettings &settings ) +: + nr(boardNr), + logPrefix(str(boost::format("[station %s %s board %u] [RSPBoard] ") % settings.station.stationName % settings.station.antennaSet % nr)), + inputStream(inputStream), + supportPartialReads(dynamic_cast<SocketStream *>(&inputStream) == 0 || dynamic_cast<SocketStream &>(inputStream).protocol != SocketStream::UDP), + + buffer(buffer), + flags(buffer.flags[boardNr]), + settings(settings), + firstBeamlet(settings.nrBeamlets / settings.nrBoards * boardNr), + + nrReceived(0), + nrBadSize(0), + nrBadTime(0), + nrOutOfOrder(0) +{ +} + +template<typename T> void RSPBoard<T>::writePacket() +{ + const uint8 &nrBeamlets = packet.header.nrBeamlets; + const uint8 &nrTimeslots = packet.header.nrBlocks; + + // the timestamp is of the last read packet by definition + const TimeStamp ×tamp = last_timestamp; + + const size_t from_offset = (int64)timestamp % settings.nrSamples; + size_t to_offset = ((int64)timestamp + nrTimeslots) % settings.nrSamples; + + if (to_offset == 0) + to_offset = settings.nrSamples; + + const size_t wrap = from_offset < to_offset ? 0 : settings.nrSamples - from_offset; + + const T *beamlets = reinterpret_cast<const T*>(&packet.data); + + ASSERT( nrBeamlets <= settings.nrBeamlets / settings.nrBoards ); + + // mark data we overwrite as invalid + flags.excludeBefore(timestamp + nrTimeslots - settings.nrSamples); + + // transpose + for (uint8 b = 0; b < nrBeamlets; ++b) { + T *dst1 = &buffer.beamlets[firstBeamlet + b][from_offset]; + + if (wrap > 0) { + T *dst2 = &buffer.beamlets[firstBeamlet + b][0]; + + memcpy(dst1, beamlets, wrap * sizeof(T)); + memcpy(dst2, beamlets, to_offset * sizeof(T)); + } else { + memcpy(dst1, beamlets, nrTimeslots * sizeof(T)); + } + + beamlets += nrTimeslots; + } + + // mark as valid + flags.include(timestamp, timestamp + nrTimeslots); +} + +template<typename T> bool RSPBoard<T>::readPacket() +{ + if (supportPartialReads) { + // read header first + inputStream.read(&packet, sizeof(struct RSP::Header)); + + // read rest of packet + inputStream.read(&packet.data, packetSize(packet) - sizeof(struct RSP::Header)); + + ++nrReceived; + } else { + // read full packet at once -- numbytes will tell us how much we've actually read + size_t numbytes = inputStream.tryRead(&packet, sizeof packet); + + ++nrReceived; + + if( numbytes < sizeof(struct RSP::Header) + || numbytes != packetSize(packet) ) { + LOG_WARN_STR( logPrefix << "Packet is " << numbytes << " bytes, but should be " << packetSize(packet) << " bytes" ); + + ++nrBadSize; + return false; + } + } + + // check sanity of packet + + // detect bad timestamp + if (packet.header.timestamp == ~0U) { + ++nrBadTime; + return false; + } + + const TimeStamp timestamp(packet.header.timestamp, packet.header.blockSequenceNumber, settings.station.clock); + + // detect out-of-order data + if (timestamp < last_timestamp) { + ++nrOutOfOrder; + return false; + } + + // don't accept big jumps (>10s) in timestamp + const int64 oneSecond = settings.station.clock / 1024; + + if (last_timestamp && packet.header.timestamp > last_timestamp + 10 * oneSecond) { + ++nrBadTime; + return false; + } + + // packet was read and is sane + + last_timestamp = timestamp; + + if (timestamp > last_logtimestamp + oneSecond) { + logStatistics(); + + last_logtimestamp = timestamp; + } + + return true; +} + + +template<typename T> void RSPBoard<T>::logStatistics() +{ + LOG_INFO_STR( logPrefix << "Received " << nrReceived << " packets: " << nrOutOfOrder << " out of order, " << nrBadTime << " bad timestamps, " << nrBadSize << " bad sizes" ); + + nrReceived = 0; + nrOutOfOrder = 0; + nrBadTime = 0; + nrBadSize = 0; +} + + +class StationStreams { +public: + StationStreams( const std::string &logPrefix, const StationSettings &settings, const std::vector<std::string> &streamDescriptors ); + + void process(); + + void stop(); + +protected: + const std::string logPrefix; + const StationSettings settings; + const std::vector<std::string> streamDescriptors; + const size_t nrBoards; + + WallClockTime waiter; + + virtual void processBoard( size_t nr ) = 0; +}; + +StationStreams::StationStreams( const std::string &logPrefix, const StationSettings &settings, const std::vector<std::string> &streamDescriptors ) +: + logPrefix(logPrefix), + settings(settings), + streamDescriptors(streamDescriptors), + nrBoards(streamDescriptors.size()) +{ +} + +void StationStreams::process() +{ + std::vector<OMPThread> threads(nrBoards); + + ASSERT(nrBoards > 0); + + LOG_INFO_STR( logPrefix << "Start" ); + + #pragma omp parallel sections num_threads(2) + { + #pragma omp section + { + // start all boards + LOG_INFO_STR( logPrefix << "Starting all boards" ); + #pragma omp parallel for num_threads(nrBoards) + for (size_t i = 0; i < nrBoards; ++i) { + OMPThread::ScopedRun sr(threads[i]); + + processBoard(i); + } + } + + #pragma omp section + { + // wait until we have to stop + LOG_INFO_STR( logPrefix << "Waiting for stop signal" ); + waiter.waitForever(); + + // kill all boards + LOG_INFO_STR( logPrefix << "Stopping all boards" ); + #pragma omp parallel for num_threads(nrBoards) + for (size_t i = 0; i < nrBoards; ++i) + threads[i].kill(); + } + } + + LOG_INFO_STR( logPrefix << "End" ); +} + +void StationStreams::stop() +{ + waiter.cancelWait(); +} + + +template<typename T> class Station: public StationStreams { +public: + Station( const StationSettings &settings, const std::vector<std::string> &streamDescriptors ); + +protected: + SampleBuffer<T> buffer; + + virtual void processBoard( size_t nr ); +}; + +template<typename T> Station<T>::Station( const StationSettings &settings, const std::vector<std::string> &streamDescriptors ) +: + StationStreams(str(boost::format("[station %s %s] [Station] ") % settings.station.stationName % settings.station.antennaSet), settings, streamDescriptors), + + buffer(settings, true) +{ + LOG_INFO_STR( logPrefix << "Initialised" ); +} + +template<typename T> void Station<T>::processBoard( size_t nr ) +{ + const std::string logPrefix(str(boost::format("[station %s %s board %u] [Station] ") % settings.station.stationName % settings.station.antennaSet % nr)); + + try { + LOG_INFO_STR( logPrefix << "Connecting to " << streamDescriptors[nr] ); + SmartPtr<Stream> s = createStream(streamDescriptors[nr], true); + + LOG_INFO_STR( logPrefix << "Connecting to shared memory buffer 0x" << std::hex << settings.dataKey ); + RSPBoard<T> board(*s, buffer, nr, settings); + + LOG_INFO_STR( logPrefix << "Start" ); + + for(;;) + if (board.readPacket()) + board.writePacket(); + + } catch (Stream::EndOfStreamException &ex) { + LOG_INFO_STR( logPrefix << "End of stream"); + } catch (SystemCallException &ex) { + if (ex.error == EINTR) + LOG_INFO_STR( logPrefix << "Aborted: " << ex.what()); + else + LOG_ERROR_STR( logPrefix << "Caught Exception: " << ex); + } catch (Exception &ex) { + LOG_ERROR_STR( logPrefix << "Caught Exception: " << ex); + } + + LOG_INFO_STR( logPrefix << "End"); +} + + +template<typename T> class Generator: public StationStreams { +public: + Generator( const StationSettings &settings, const std::vector<std::string> &streamDescriptors ); + +protected: + void processBoard( size_t nr ); + + virtual void makePacket( struct RSP &header, const TimeStamp ×tamp ); +}; + +template<typename T> Generator<T>::Generator( const StationSettings &settings, const std::vector<std::string> &streamDescriptors ) +: + StationStreams(str(boost::format("[station %s %s] [Generator] ") % settings.station.stationName % settings.station.antennaSet), settings, streamDescriptors) +{ + LOG_INFO_STR( logPrefix << "Initialised" ); +} + +template<typename T> void Generator<T>::makePacket( struct RSP &packet, const TimeStamp ×tamp ) +{ + packet.header.nrBeamlets = settings.nrBeamlets / settings.nrBoards; + packet.header.nrBlocks = 16; + + packet.header.timestamp = timestamp.getSeqId(); + packet.header.blockSequenceNumber = timestamp.getBlockId(); + + int64 data = timestamp; + + memset(packet.data, data & 0xFF, sizeof packet.data); +} + +template<typename T> void Generator<T>::processBoard( size_t nr ) +{ + const std::string logPrefix(str(boost::format("[station %s %s board %u] [Generator] ") % settings.station.stationName % settings.station.antennaSet % nr)); + + try { + LOG_INFO_STR( logPrefix << "Connecting to " << streamDescriptors[nr] ); + SmartPtr<Stream> s = createStream(streamDescriptors[nr], false); + + LOG_INFO_STR( logPrefix << "Start" ); + + TimeStamp current(time(0L) + 1, 0, settings.station.clock); + for(;;) { + struct RSP packet; + + makePacket( packet, current ); + + ASSERT(RSPBoard<T>::packetSize(packet) <= sizeof packet); + + if (!waiter.waitUntil(current)) + break; + + try { + s->write(&packet, RSPBoard<T>::packetSize(packet)); + } catch (SystemCallException &ex) { + // UDP can return ECONNREFUSED or EINVAL if server does not have its port open + if (ex.error != ECONNREFUSED && ex.error != EINVAL) + throw; + } + + current += packet.header.nrBlocks; + } + } catch (Stream::EndOfStreamException &ex) { + LOG_INFO_STR( logPrefix << "End of stream"); + } catch (SystemCallException &ex) { + if (ex.error == EINTR) + LOG_INFO_STR( logPrefix << "Aborted: " << ex.what()); + else + LOG_ERROR_STR( logPrefix << "Caught Exception: " << ex); + } catch (Exception &ex) { + LOG_ERROR_STR( logPrefix << "Caught Exception: " << ex); + } + + LOG_INFO_STR( logPrefix << "End"); +} + +} +} + +#endif diff --git a/RTCP/IONProc/test/newInputSection/StationID.h b/RTCP/IONProc/test/newInputSection/StationID.h new file mode 100644 index 00000000000..d4fcafed0e3 --- /dev/null +++ b/RTCP/IONProc/test/newInputSection/StationID.h @@ -0,0 +1,82 @@ +#ifndef __STATIONID__ +#define __STATIONID__ + +#include <Common/LofarLogger.h> +#include <ostream> +#include <cstdio> +#include <string> + +namespace LOFAR { +namespace RTCP { + +struct StationID { + char stationName[64]; + char antennaSet[64]; + + unsigned clock; + unsigned bitmode; + + StationID( const std::string &stationName = "", const std::string &antennaSet = "", unsigned clock = 200 * 1000 * 1000, unsigned bitmode = 16) + : + clock(clock), + bitmode(bitmode) + { + snprintf(this->stationName, sizeof this->stationName, "%s", stationName.c_str()); + snprintf(this->antennaSet, sizeof this->antennaSet, "%s", antennaSet.c_str()); + } + + bool operator==(const struct StationID &other) const { + return !strncmp(stationName, other.stationName, sizeof stationName) + && !strncmp(antennaSet, other.antennaSet, sizeof antennaSet) + && clock == other.clock + && bitmode == other.bitmode; + } + + bool operator!=(const struct StationID &other) const { + return !(*this == other); + } + + uint32 hash() const { + // convert to 32 bit value (human-readable in hexadecimal) + uint32 stationNr = 0; + + const std::string stationNameStr(stationName); + const std::string antennaSetStr(antennaSet); + + for(std::string::const_iterator c = stationNameStr.begin(); c != stationNameStr.end(); ++c) + if(*c >= '0' && *c <= '9') + stationNr = stationNr * 16 + (*c - '0'); + + uint32 antennaSetNr = 0; + + if (antennaSetStr == "HBA_ONE" || antennaSetStr == "HBA1" ) + antennaSetNr = 1; + else + antennaSetNr = 0; + + ASSERT( stationNr < (1L << 16) ); + ASSERT( antennaSetNr < (1L << 4) ); + + ASSERT( clock/1000000 == 200 || clock/1000000 == 160 ); + ASSERT( bitmode == 4 || bitmode == 8 || bitmode == 16 ); + + unsigned clockNr = clock/1000000 == 200 ? 0x20 : 0x16; + unsigned bitmodeNr = bitmode == 16 ? 0xF : bitmode; + + return (stationNr << 16) + (antennaSetNr << 12) + (clockNr << 4) + bitmodeNr; + } + +}; + +std::ostream& operator<<( std::ostream &str, const struct StationID &s ) { + str << "station " << s.stationName << " antennaset " << s.antennaSet << " clock " << s.clock/1000000 << " bitmode " << s.bitmode; + + return str; +} + +} +} + + +#endif + diff --git a/RTCP/IONProc/test/newInputSection/StationSettings.h b/RTCP/IONProc/test/newInputSection/StationSettings.h new file mode 100644 index 00000000000..171db9b02c9 --- /dev/null +++ b/RTCP/IONProc/test/newInputSection/StationSettings.h @@ -0,0 +1,79 @@ +#ifndef __STATIONSETTINGS__ +#define __STATIONSETTINGS__ + +#include <Common/LofarLogger.h> +#include "StationID.h" +#include <ostream> + +namespace LOFAR { +namespace RTCP { + +#define NR_RSPBOARDS 4 + +struct StationSettings { +private: + static const unsigned currentVersion = 1; + + unsigned version; + + bool valid() const { return version == currentVersion; } + +public: + struct StationID station; + + unsigned nrBeamlets; + + size_t nrSamples; + + unsigned nrBoards; + size_t nrFlagRanges; + + key_t dataKey; + + StationSettings(); + + // read settings from shared memory, using the given stationID + StationSettings(struct StationID station); + + bool operator==(const struct StationSettings &other) const { + return station == other.station + && nrBeamlets == other.nrBeamlets + && nrSamples == other.nrSamples + && nrBoards == other.nrBoards + && nrFlagRanges == other.nrFlagRanges + && dataKey == other.dataKey; + } + +}; + +StationSettings::StationSettings() +: + version(currentVersion) +{ +} + +StationSettings::StationSettings(struct StationID station) +: + version(currentVersion), + station(station) +{ + do { + SharedStruct<struct StationSettings> shm(station.hash(), false); + + *this = shm.get(); + } while (!valid()); + + ASSERT( valid() ); +} + +std::ostream& operator<<( std::ostream &str, const struct StationSettings &s ) { + str << s.station << " beamlets: " << s.nrBeamlets << " buffer: " << (1.0 * s.nrSamples / s.station.clock * 1024) << "s"; + + return str; +} + +} +} + +#endif + diff --git a/RTCP/IONProc/test/newInputSection/TimeSync.h b/RTCP/IONProc/test/newInputSection/TimeSync.h new file mode 100644 index 00000000000..61f80f98cef --- /dev/null +++ b/RTCP/IONProc/test/newInputSection/TimeSync.h @@ -0,0 +1,89 @@ +#ifndef TIMESYNC +#define TIMESYNC + +#include <Common/Thread/Mutex.h> +#include <Common/Thread/Condition.h> + +namespace LOFAR { + +class TimeSync { +public: + TimeSync(); + + // set to `val' + void set( int64 val ); + + // wait for the value to be at least `val' + + // wait for the value to be at least `val' (and + // return true), or until there is no more data + // or a timeout (return false). + bool wait( int64 val ); + bool wait( int64 val, struct timespec &timeout ); + + // signal no more data + void noMoreData(); + +private: + bool stop; + int64 timestamp; + int64 waitFor; + + Mutex mutex; + Condition cond; +}; + +TimeSync::TimeSync() +: + stop(false), + timestamp(0), + waitFor(0) +{ +} + +void TimeSync::set( int64 val ) { + ScopedLock sl(mutex); + + timestamp = val; + + if (waitFor != 0 && timestamp > waitFor) + cond.signal(); +} + +bool TimeSync::wait( int64 val ) { + ScopedLock sl(mutex); + + waitFor = val; + + while (timestamp <= val && !stop) + cond.wait(mutex); + + waitFor = 0; + + return timestamp <= val; +} + +bool TimeSync::wait( int64 val, struct timespec &timeout ) { + ScopedLock sl(mutex); + + waitFor = val; + + while (timestamp <= val && !stop) + if( !cond.wait(mutex, timeout) ) + break; + + waitFor = 0; + + return timestamp <= val; +} + +void TimeSync::noMoreData() { + ScopedLock sl(mutex); + + stop = true; + cond.signal(); +} + +} + +#endif diff --git a/RTCP/IONProc/test/newInputSection/foo.cc b/RTCP/IONProc/test/newInputSection/foo.cc new file mode 100644 index 00000000000..3c814527f10 --- /dev/null +++ b/RTCP/IONProc/test/newInputSection/foo.cc @@ -0,0 +1,457 @@ +#include <lofar_config.h> +#include <Common/LofarLogger.h> +#include <Common/LofarConstants.h> +#include <Stream/Stream.h> +#include <Stream/SocketStream.h> +#include <RSP.h> +#include <Interface/RSPTimeStamp.h> +#include <Interface/MultiDimArray.h> +#include <Interface/SmartPtr.h> +#include <Interface/Stream.h> +#include <WallClockTime.h> +#include "SharedMemory.h" +#include "Ranges.h" +#include "OMPThread.h" +#include "mpi.h" + +#include <vector> +#include <omp.h> +#include <map> +#include <string> +#include <ostream> +#include <cstring> +#include <boost/format.hpp> + +#define NR_RSPBOARDS 4 + +using namespace LOFAR; +using namespace RTCP; + +template<typename T> struct SampleType { + std::complex<T> x; + std::complex<T> y; +}; + +struct StationID { + char stationName[64]; + char antennaSet[64]; + + unsigned clock; + unsigned bitmode; + + StationID( const std::string &stationName = "", const std::string &antennaSet = "", unsigned clock = 200 * 1000000, unsigned bitmode = 16) + : + clock(clock), + bitmode(bitmode) + { + snprintf(this->stationName, sizeof this->stationName, "%s", stationName.c_str()); + snprintf(this->antennaSet, sizeof this->antennaSet, "%s", antennaSet.c_str()); + } + + bool operator==(const struct StationID &other) const { + return !strncmp(stationName, other.stationName, sizeof stationName) + && !strncmp(antennaSet, other.antennaSet, sizeof antennaSet) + && clock == other.clock + && bitmode == other.bitmode; + } + + bool operator!=(const struct StationID &other) const { + return !(*this == other); + } + + uint32 hash() const { + // convert to 32 bit value (human-readable in hexadecimal) + uint32 stationNr = 0; + + const std::string stationNameStr(stationName); + const std::string antennaSetStr(antennaSet); + + for(std::string::const_iterator c = stationNameStr.begin(); c != stationNameStr.end(); ++c) + if(*c >= '0' && *c <= '9') + stationNr = stationNr * 16 + (*c - '0'); + + uint32 antennaSetNr = 0; + + if (antennaSetStr == "HBA_ONE" || antennaSetStr == "HBA1" ) + antennaSetNr = 1; + else + antennaSetNr = 0; + + ASSERT( stationNr < (1L << 16) ); + ASSERT( antennaSetNr < (1L << 4) ); + + ASSERT( clock/1000000 == 200 || clock/1000000 == 160 ); + ASSERT( bitmode == 4 || bitmode == 8 || bitmode == 16 ); + + unsigned clockNr = clock/1000000 == 200 ? 0x20 : 0x16; + unsigned bitmodeNr = bitmode == 16 ? 0xF : bitmode; + + return (stationNr << 16) + (antennaSetNr << 12) + (clockNr << 4) + bitmodeNr; + } + +}; + +std::ostream& operator<<( std::ostream &str, const struct StationID &s ) { + str << "station " << s.stationName << " antennaset " << s.antennaSet << " clock " << s.clock/1000000 << " bitmode " << s.bitmode; + + return str; +} + +struct StationSettings { +private: + static const unsigned currentVersion = 1; + + unsigned version; + + bool valid() const { return version == currentVersion; } + +public: + struct StationID station; + + unsigned nrBeamlets; + + size_t nrSamples; + + unsigned nrBoards; + size_t nrFlagRanges; + + key_t dataKey; + + StationSettings(); + + // read settings from shared memory, using the given stationID + StationSettings(struct StationID station); + + bool operator==(const struct StationSettings &other) const { + return station == other.station + && nrBeamlets == other.nrBeamlets + && nrSamples == other.nrSamples + && nrBoards == other.nrBoards + && nrFlagRanges == other.nrFlagRanges + && dataKey == other.dataKey; + } + +}; + +std::ostream& operator<<( std::ostream &str, const struct StationSettings &s ) { + str << s.station << " beamlets: " << s.nrBeamlets << " buffer: " << (1.0 * s.nrSamples / s.station.clock * 1024) << "s"; + + return str; +} + +StationSettings::StationSettings() +: + version(currentVersion) +{ +} + + +StationSettings::StationSettings(struct StationID station) +: + version(currentVersion), + station(station) +{ + SharedStruct<struct StationSettings> shm(station.hash(), false); + + *this = shm.get(); + + ASSERT( valid() ); +} + + +template<typename T> class SampleBuffer { +public: + SampleBuffer( const struct StationSettings &settings, bool create ); + +private: + const std::string logPrefix; + SharedMemoryArena data; + SparseSetAllocator allocator; + + struct StationSettings *initSettings( const struct StationSettings &localSettings, bool create ); + + static size_t dataSize( const struct StationSettings &settings ) { + return sizeof settings + + NR_RSPBOARDS * (Ranges::size(settings.nrFlagRanges) + 8) + + settings.nrBeamlets * (settings.nrSamples * N_POL * 2 * settings.station.bitmode / 8 + 128); + } + +public: + struct StationSettings *settings; + + const size_t nrBeamlets; + const size_t nrSamples; + const size_t nrFlagRanges; + + MultiDimArray<T,2> beamlets; // [subband][sample] + std::vector<Ranges> flags; // [rspboard] +}; + + +template<typename T> SampleBuffer<T>::SampleBuffer( const struct StationSettings &_settings, bool create ) +: + logPrefix(str(boost::format("[station %s %s board] [SampleBuffer] ") % _settings.station.stationName % _settings.station.antennaSet)), + data(_settings.dataKey, dataSize(_settings), create ? SharedMemoryArena::CREATE_EXCL : SharedMemoryArena::READ), + allocator(data), + settings(initSettings(_settings, create)), + + nrBeamlets(settings->nrBeamlets), + nrSamples(settings->nrSamples), + nrFlagRanges(settings->nrFlagRanges), + + beamlets(boost::extents[nrBeamlets][nrSamples], 128, allocator, false, create), + flags(settings->nrBoards) +{ + // bitmode must coincide with our template + ASSERT( sizeof(T) == N_POL * 2 * settings->station.bitmode / 8 ); + + // typical #slots/packet + ASSERT( settings->nrSamples % 16 == 0 ); + + for (size_t f = 0; f < flags.size(); f++) { + size_t numBytes = Ranges::size(nrFlagRanges); + + flags[f] = Ranges(static_cast<int64*>(allocator.allocate(numBytes, 8)), numBytes, nrSamples, create); + } + + LOG_INFO_STR( logPrefix << "Initialised" ); +} + +template<typename T> struct StationSettings *SampleBuffer<T>::initSettings( const struct StationSettings &localSettings, bool create ) +{ + //struct StationSettings *sharedSettings = allocator.allocateTyped<struct StationSettings>(); + struct StationSettings *sharedSettings = allocator.allocateTyped(); + + if (create) { + // register settings + LOG_INFO_STR( logPrefix << "Registering " << localSettings.station ); + *sharedSettings = localSettings; + } else { + // verify settings + ASSERT( *sharedSettings == localSettings ); + LOG_INFO_STR( logPrefix << "Connected to " << localSettings.station ); + } + + return sharedSettings; +} + +template<typename T> class RSPBoard { +public: + RSPBoard( Stream &inputStream, SampleBuffer<T> &buffer, unsigned boardNr, const struct StationSettings &settings ); + + const unsigned nr; + + bool readPacket(); + void writePacket(); + + static size_t packetSize( struct RSP &packet ) { + return sizeof(struct RSP::Header) + packet.header.nrBeamlets * packet.header.nrBlocks * sizeof(T); + } + +private: + const std::string logPrefix; + + Stream &inputStream; + const bool supportPartialReads; + struct RSP packet; + TimeStamp last_timestamp; + TimeStamp last_logtimestamp; + + SampleBuffer<T> &buffer; + Ranges &flags; + const struct StationSettings settings; + const size_t firstBeamlet; + + size_t nrReceived, nrBadSize, nrBadTime, nrOutOfOrder; + + void logStatistics(); +}; + +template<typename T> RSPBoard<T>::RSPBoard( Stream &inputStream, SampleBuffer<T> &buffer, unsigned boardNr, const struct StationSettings &settings ) +: + nr(boardNr), + logPrefix(str(boost::format("[station %s %s board %u] [RSPBoard] ") % settings.station.stationName % settings.station.antennaSet % nr)), + inputStream(inputStream), + supportPartialReads(dynamic_cast<SocketStream *>(&inputStream) == 0 || dynamic_cast<SocketStream &>(inputStream).protocol != SocketStream::UDP), + + buffer(buffer), + flags(buffer.flags[boardNr]), + settings(settings), + firstBeamlet(settings.nrBeamlets / settings.nrBoards * boardNr), + + nrReceived(0), + nrBadSize(0), + nrBadTime(0), + nrOutOfOrder(0) +{ +} + +template<typename T> void RSPBoard<T>::writePacket() +{ + const uint8 &nrBeamlets = packet.header.nrBeamlets; + const uint8 &nrTimeslots = packet.header.nrBlocks; + + ASSERT( settings.nrSamples % nrTimeslots == 0 ); + + // the timestamp is of the last read packet by definition + const TimeStamp ×tamp = last_timestamp; + + const size_t bufferOffset = (int64)timestamp % settings.nrSamples; + + const T *beamlets = reinterpret_cast<const T*>(&packet.data); + + ASSERT( nrBeamlets <= settings.nrBeamlets / settings.nrBoards ); + + // mark data we overwrite as invalid + flags.excludeBefore(timestamp + nrTimeslots - settings.nrSamples); + + // transpose + for (uint8 b = 0; b < nrBeamlets; ++b) { + T *dst = &buffer.beamlets[firstBeamlet + b][bufferOffset]; + + memcpy(dst, beamlets, nrTimeslots * sizeof(T)); + + beamlets += nrTimeslots; + } + + // mark as valid + flags.include(timestamp, timestamp + nrTimeslots); +} + +template<typename T> bool RSPBoard<T>::readPacket() +{ + if (supportPartialReads) { + // read header first + inputStream.read(&packet, sizeof(struct RSP::Header)); + + // read rest of packet + inputStream.read(&packet.data, packetSize(packet) - sizeof(struct RSP::Header)); + + ++nrReceived; + } else { + // read full packet at once -- numbytes will tell us how much we've actually read + size_t numbytes = inputStream.tryRead(&packet, sizeof packet); + + ++nrReceived; + + if( numbytes < sizeof(struct RSP::Header) + || numbytes != packetSize(packet) ) { + LOG_WARN_STR( logPrefix << "Packet is " << numbytes << " bytes, but should be " << packetSize(packet) << " bytes" ); + + ++nrBadSize; + return false; + } + } + + // check sanity of packet + + // detect bad timestamp + if (packet.header.timestamp == ~0U) { + ++nrBadTime; + return false; + } + + const TimeStamp timestamp(packet.header.timestamp, packet.header.blockSequenceNumber, settings.station.clock); + + // detect out-of-order data + if (timestamp < last_timestamp) { + ++nrOutOfOrder; + return false; + } + + // don't accept big jumps (>10s) in timestamp + const int64 oneSecond = settings.station.clock / 1024; + + if (last_timestamp && packet.header.timestamp > last_timestamp + 10 * oneSecond) { + ++nrBadTime; + return false; + } + + // packet was read and is sane + + last_timestamp = timestamp; + + if (timestamp > last_logtimestamp + oneSecond) { + logStatistics(); + + last_logtimestamp = timestamp; + } + + return true; +} + + +template<typename T> void RSPBoard<T>::logStatistics() +{ + LOG_INFO_STR( logPrefix << "Received " << nrReceived << " packets: " << nrOutOfOrder << " out of order, " << nrBadTime << " bad timestamps, " << nrBadSize << " bad sizes" ); + + nrReceived = 0; + nrOutOfOrder = 0; + nrBadTime = 0; + nrBadSize = 0; +} + + + + + + +class StationStreams { +public: + StationStreams( const std::string &logPrefix, const StationSettings &settings, const std::vector<std::string> &streamDescriptors ); + + void process(); + + void stop(); + +protected: + const std::string logPrefix; + const StationSettings settings; + const std::vector<std::string> streamDescriptors; + const size_t nrBoards; + + WallClockTime waiter; + + virtual void processBoard( size_t nr ) = 0; +}; + +StationStreams::StationStreams( const std::string &logPrefix, const StationSettings &settings, const std::vector<std::string> &streamDescriptors ) +: + logPrefix(logPrefix), + settings(settings), + streamDescriptors(streamDescriptors), + nrBoards(streamDescriptors.size()) +{ +} + +void StationStreams::process() +{ + std::vector<OMPThread> threads(nrBoards); + + ASSERT(nrBoards > 0); + + LOG_INFO_STR( logPrefix << "Start" ); + + #pragma omp parallel sections num_threads(2) + { + #pragma omp section + { + // start all boards + LOG_INFO_STR( logPrefix << "Starting all boards" ); + #pragma omp parallel for num_threads(nrBoards) + for (size_t i = 0; i < nrBoards; ++i) { + OMPThread::ScopedRun sr(threads[i]); + + processBoard(i); + } + } + + #pragma omp section + { + // wait until we have to stop + LOG_INFO_STR( logPrefix << "Waiting for stop signal" ); + waiter.waitForever(); + + // kill all boards + LOG_INFO_STR( logPrefix << "Stopping all boards" ); + #pragma omp parallel for num_threads(nrBo \ No newline at end of file diff --git a/RTCP/IONProc/test/newInputSection/newInputSection.cc b/RTCP/IONProc/test/newInputSection/newInputSection.cc new file mode 100644 index 00000000000..112cb940c3b --- /dev/null +++ b/RTCP/IONProc/test/newInputSection/newInputSection.cc @@ -0,0 +1,922 @@ +#include <lofar_config.h> +#include <Common/LofarLogger.h> +#include <Common/Thread/Mutex.h> +#include <Stream/Stream.h> +#include <Stream/SocketStream.h> +#include <Interface/MultiDimArray.h> +#include <Interface/Stream.h> +#include <WallClockTime.h> +#include "SharedMemory.h" +#include "Ranges.h" +#include "OMPThread.h" +#include "StationID.h" +#include "StationSettings.h" +#include "SampleBuffer.h" +#include "StationData.h" +#include "mpi.h" + +#include <vector> +#include <omp.h> +#include <string> +#include <boost/format.hpp> + +#define DURATION 60 +#define BLOCKSIZE 0.005 +#define NRSTATIONS 3 + +using namespace LOFAR; +using namespace RTCP; + +template<typename T> class SampleBufferReader { +public: + SampleBufferReader( const StationSettings &settings, const std::vector<size_t> beamlets, const TimeStamp &from, const TimeStamp &to, size_t blockSize ); + + void process( double maxDelay ); + +protected: + const StationSettings settings; + SampleBuffer<T> buffer; + + const std::vector<size_t> beamlets; + const TimeStamp from, to; + const size_t blockSize; + + virtual void copyNothing( const TimeStamp &from, const TimeStamp &to ) { (void)from, (void)to; } + + virtual void copyBeamlet( unsigned beamlet, unsigned transfer, const TimeStamp &from_ts, const T* from, size_t nrSamples ) = 0; + virtual void copyStart( const TimeStamp &from, const TimeStamp &to, size_t wrap ) { (void)from, (void)to, (void)wrap; } + + virtual void copyFlags ( unsigned transfer, const SparseSet<int64> &flags ) = 0; + virtual void copyEnd() {} + + void copy( const TimeStamp &from, const TimeStamp &to ); + +private: + WallClockTime waiter; +}; + + +template<typename T> SampleBufferReader<T>::SampleBufferReader( const StationSettings &settings, const std::vector<size_t> beamlets, const TimeStamp &from, const TimeStamp &to, size_t blockSize ) +: + settings(settings), + buffer(settings, false), + + beamlets(beamlets), + from(from), + to(to), + blockSize(blockSize) +{ + for (size_t i = 0; i < beamlets.size(); ++i) + ASSERT( beamlets[i] < buffer.nrBeamlets ); + + ASSERT( blockSize > 0 ); + ASSERT( blockSize < settings.nrSamples ); + ASSERT( from < to ); +} + + +template<typename T> void SampleBufferReader<T>::process( double maxDelay ) +{ + /*const TimeStamp maxDelay_ts(static_cast<int64>(maxDelay * settings.station.clock / 1024) + blockSize, settings.station.clock); + + const TimeStamp current(from); + + for (TimeStamp current = from; current < to; current += blockSize) { + // wait + LOG_INFO_STR("Waiting until " << (current + maxDelay_ts) << " for " << current); + waiter.waitUntil( current + maxDelay_ts ); + + // read + LOG_INFO_STR("Reading from " << current << " to " << (current + blockSize)); + copy(current, current + blockSize); + } + + LOG_INFO("Done reading data");*/ + const TimeStamp maxDelay_ts(static_cast<int64>(maxDelay * settings.station.clock / 1024) + blockSize, settings.station.clock); + + const TimeStamp current(from); + + double totalwait = 0.0; + unsigned totalnr = 0; + + double lastreport = MPI_Wtime(); + + for (TimeStamp current = from; current < to; current += blockSize) { + // wait + waiter.waitUntil( current + maxDelay_ts ); + + // read + double bs = MPI_Wtime(); + + copy(current, current + blockSize); + + totalwait += MPI_Wtime() - bs; + totalnr++; + + if (bs - lastreport > 1.0) { + double mbps = (sizeof(T) * blockSize * beamlets.size() * 8) / (totalwait/totalnr) / 1e6; + lastreport = bs; + totalwait = 0.0; + totalnr = 0; + + LOG_INFO_STR("Reading speed: " << mbps << " Mbit/s"); + } + } + + LOG_INFO("Done reading data"); +} + +template<typename T> void SampleBufferReader<T>::copy( const TimeStamp &from, const TimeStamp &to ) +{ + ASSERT( from < to ); + ASSERT( to - from < (int64)buffer.nrSamples ); + + const unsigned nrBoards = buffer.flags.size(); + +#if 0 + // check whether there is any data at all + bool data = false; + + for (unsigned b = 0; b < nrBoards; ++b) + if (buffer.flags[b].anythingBetween(from, to)) { + data = true; + break; + } + + if (!data) { + copyNothing(from, to); + return; + } +#endif + + // copy the beamlets + + size_t from_offset = (int64)from % buffer.nrSamples; + size_t to_offset = (int64)to % buffer.nrSamples; + + if (to_offset == 0) + to_offset = buffer.nrSamples; + + // wrap > 0 if we need to wrap around the end of the buffer + size_t wrap = from_offset < to_offset ? 0 : buffer.nrSamples - from_offset; + + copyStart(from, to, wrap); + + for (size_t i = 0; i < beamlets.size(); ++i) { + unsigned nr = beamlets[i]; + const T* origin = &buffer.beamlets[nr][0]; + + if (wrap > 0) { + copyBeamlet( nr, 0, from, origin + from_offset, wrap ); + copyBeamlet( nr, 1, from, origin, to_offset ); + } else { + copyBeamlet( nr, 0, from, origin + from_offset, to_offset - from_offset ); + } + } + + // copy the flags + + for (unsigned b = 0; b < nrBoards; ++b) + copyFlags( b, buffer.flags[b].sparseSet(from, to).invert(from, to) ); + + copyEnd(); +} + +Mutex MPIMutex; + +//#define USE_RMA + +#ifdef USE_RMA + +#define MULTIPLE_WINDOWS + +template<typename T> class MPISharedBuffer: public SampleBuffer<T> { +public: + MPISharedBuffer( const struct StationSettings &settings ); + + ~MPISharedBuffer(); + +private: +#ifdef MULTIPLE_WINDOWS + std::vector<MPI_Win> beamlets_windows; +#else + MPI_Win beamlets_window; +#endif +}; + +template<typename T> MPISharedBuffer<T>::MPISharedBuffer( const struct StationSettings &settings ) +: + SampleBuffer<T>(settings, false) +#ifdef MULTIPLE_WINDOWS + , beamlets_windows(NRSTATIONS) +#endif +{ +#ifdef MULTIPLE_WINDOWS + for (int i = 0; i < NRSTATIONS; ++i) { + int error = MPI_Win_create(this->beamlets.origin(), this->beamlets.num_elements() * sizeof(T), 1, MPI_INFO_NULL, MPI_COMM_WORLD, &beamlets_windows[i]); + + ASSERT(error == MPI_SUCCESS); + } +#else + int error = MPI_Win_create(this->beamlets.origin(), this->beamlets.num_elements() * sizeof(T), 1, MPI_INFO_NULL, MPI_COMM_WORLD, &beamlets_window); + + ASSERT(error == MPI_SUCCESS); +#endif +} + +template<typename T> MPISharedBuffer<T>::~MPISharedBuffer() +{ +#ifdef MULTIPLE_WINDOWS + for (int i = 0; i < NRSTATIONS; ++i) { + int error = MPI_Win_free(&beamlets_windows[i]); + + ASSERT(error == MPI_SUCCESS); + } +#else + int error = MPI_Win_free(&beamlets_window); + + ASSERT(error == MPI_SUCCESS); +#endif +} + +template<typename T> class MPISharedBufferReader { +public: + MPISharedBufferReader( const std::vector<struct StationSettings> &settings, const TimeStamp &from, const TimeStamp &to, size_t blockSize, const std::vector<size_t> &beamlets ); + + ~MPISharedBufferReader(); + + void process( double maxDelay ); + +private: + const std::vector<struct StationSettings> settings; + const TimeStamp from, to; + const size_t blockSize; + const std::vector<size_t> beamlets; + + MultiDimArray<T, 3> buffer; // [station][beamlet][sample] + +#ifdef MULTIPLE_WINDOWS + std::vector<MPI_Win> beamlets_windows; +#else + MPI_Win beamlets_window; +#endif + + WallClockTime waiter; + + void copy( const TimeStamp &from, const TimeStamp &to ); +}; + +template<typename T> MPISharedBufferReader<T>::MPISharedBufferReader( const std::vector<struct StationSettings> &settings, const TimeStamp &from, const TimeStamp &to, size_t blockSize, const std::vector<size_t> &beamlets ) +: + settings(settings), + from(from), + to(to), + blockSize(blockSize), + beamlets(beamlets), + + buffer(boost::extents[settings.size()][beamlets.size()][blockSize], 128, heapAllocator, false, false) +#ifdef MULTIPLE_WINDOWS + , beamlets_windows(settings.size()) +#endif +{ + ASSERT( settings.size() > 0 ); + ASSERT( from.getClock() == to.getClock() ); + ASSERT( settings[0].station.clock == from.getClock()); + + for (size_t i = 0; i < settings.size(); ++i) { + ASSERT(settings[i].station.clock == settings[0].station.clock); + ASSERT(settings[i].station.clock == from.getClock()); + ASSERT(settings[i].station.bitmode == settings[0].station.bitmode); + + ASSERT(settings[i].nrSamples > blockSize); + } + +#ifdef MULTIPLE_WINDOWS + for (int i = 0; i < settings.size(); ++i) { + int error = MPI_Win_create(MPI_BOTTOM, 0, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &beamlets_windows[i]); + + ASSERT(error == MPI_SUCCESS); + } +#else + int error = MPI_Win_create(MPI_BOTTOM, 0, 1, MPI_INFO_NULL, MPI_COMM_WORLD, &beamlets_window); + + ASSERT(error == MPI_SUCCESS); +#endif +} + +template<typename T> MPISharedBufferReader<T>::~MPISharedBufferReader() +{ +#ifdef MULTIPLE_WINDOWS + for (int i = 0; i < settings.size(); ++i) { + int error = MPI_Win_free(&beamlets_windows[i]); + + ASSERT(error == MPI_SUCCESS); + } +#else + int error = MPI_Win_free(&beamlets_window); + + ASSERT(error == MPI_SUCCESS); +#endif +} + +template<typename T> void MPISharedBufferReader<T>::process( double maxDelay ) +{ + const TimeStamp maxDelay_ts(static_cast<int64>(maxDelay * settings[0].station.clock / 1024) + blockSize, settings[0].station.clock); + + const TimeStamp current(from); + + double totalwait = 0.0; + unsigned totalnr = 0; + + double lastreport = MPI_Wtime(); + + for (TimeStamp current = from; current < to; current += blockSize) { + // wait + //LOG_INFO_STR("Waiting until " << (current + maxDelay_ts) << " for " << current); + waiter.waitUntil( current + maxDelay_ts ); + + // read + //LOG_INFO_STR("Reading from " << current << " to " << (current + blockSize)); + double bs = MPI_Wtime(); + + copy(current, current + blockSize); + + totalwait += MPI_Wtime() - bs; + totalnr++; + + if (bs - lastreport > 1.0) { + double mbps = (sizeof(T) * blockSize * beamlets.size() * 8) / (totalwait/totalnr) / 1e6; + lastreport = bs; + totalwait = 0.0; + totalnr = 0; + + LOG_INFO_STR("Reading speed: " << mbps << " Mbit/s"); + } + } + + LOG_INFO("Done reading data"); +} + +template<typename T> void MPISharedBufferReader<T>::copy( const TimeStamp &from, const TimeStamp &to ) +{ + int error; + +#ifdef MULTIPLE_WINDOWS + for (int i = 0; i < settings.size(); ++i) { + error = MPI_Win_lock( MPI_LOCK_SHARED, i, MPI_MODE_NOCHECK, beamlets_windows[i] ); + ASSERT(error == MPI_SUCCESS); + } +#endif + + for (size_t s = 0; s < settings.size(); ++s) { +#ifndef MULTIPLE_WINDOWS + error = MPI_Win_lock( MPI_LOCK_SHARED, s, MPI_MODE_NOCHECK, beamlets_window ); + ASSERT(error == MPI_SUCCESS); +#endif + + //LOG_INFO_STR("Copying from station " << s); + const struct StationSettings settings = this->settings[s]; + + size_t from_offset = (int64)from % settings.nrSamples; + size_t to_offset = (int64)to % settings.nrSamples; + + if (to_offset == 0) + to_offset = settings.nrSamples; + + size_t wrap = from_offset < to_offset ? 0 : settings.nrSamples - from_offset; + + for (size_t i = 0; i < beamlets.size(); ++i) { + unsigned nr = beamlets[i]; + + size_t origin = nr * settings.nrSamples; + + if (wrap > 0) { + //if (i==0) LOG_INFO_STR("Reading wrapped data"); +#ifdef MULTIPLE_WINDOWS + error = MPI_Get( &buffer[s][i][0], wrap * sizeof(T), MPI_CHAR, s, (origin + from_offset) * sizeof(T), wrap * sizeof(T), MPI_CHAR, beamlets_windows[s] ); +#else + error = MPI_Get( &buffer[s][i][0], wrap * sizeof(T), MPI_CHAR, s, (origin + from_offset) * sizeof(T), wrap * sizeof(T), MPI_CHAR, beamlets_window ); +#endif + + ASSERT(error == MPI_SUCCESS); + +#ifdef MULTIPLE_WINDOWS + error = MPI_Get( &buffer[s][i][wrap], to_offset * sizeof(T), MPI_CHAR, s, origin * sizeof(T), to_offset * sizeof(T), MPI_CHAR, beamlets_windows[s] ); +#else + error = MPI_Get( &buffer[s][i][wrap], to_offset * sizeof(T), MPI_CHAR, s, origin * sizeof(T), to_offset * sizeof(T), MPI_CHAR, beamlets_window ); +#endif + + ASSERT(error == MPI_SUCCESS); + } else { + // higher performance by splitting into multiple requests if block size is large -- formula yet unknown + //size_t partSize = (to_offset - from_offset) / 2 + 1; + size_t partSize = to_offset - from_offset; + + for (size_t x = from_offset; x < to_offset; x += partSize) { + size_t y = std::min(x + partSize, to_offset); + +#ifdef MULTIPLE_WINDOWS + error = MPI_Get( &buffer[s][i][x - from_offset], (y - x) * sizeof(T), MPI_CHAR, s, (origin + x) * sizeof(T), (y - x) * sizeof(T), MPI_CHAR, beamlets_windows[s] ); +#else + error = MPI_Get( &buffer[s][i][x - from_offset], (y - x) * sizeof(T), MPI_CHAR, s, (origin + x) * sizeof(T), (y - x) * sizeof(T), MPI_CHAR, beamlets_window ); +#endif + + ASSERT(error == MPI_SUCCESS); + } + } + } + +#ifndef MULTIPLE_WINDOWS + error = MPI_Win_unlock( s, beamlets_window ); + ASSERT(error == MPI_SUCCESS); +#endif + } + +#ifdef MULTIPLE_WINDOWS + for (int i = 0; i < settings.size(); ++i) { + error = MPI_Win_unlock( i, beamlets_windows[i] ); + ASSERT(error == MPI_SUCCESS); + } +#endif +} +#else + +template<typename T> class MPISendStation: public SampleBufferReader<T> { +public: + MPISendStation( const struct StationSettings &settings, const TimeStamp &from, const TimeStamp &to, size_t blockSize, const std::vector<size_t> &beamlets, unsigned destRank ); + + struct Header { + StationID station; + + bool data; + size_t wrap; + + int64 from, to; + + size_t nrBeamlets; + size_t nrFlags; + + size_t flagsSize; + }; + + union tag_t { + struct { + unsigned type:2; + unsigned beamlet:10; + unsigned transfer:3; + } bits; + + int value; + + tag_t(): value(0) {} + }; + + enum tag_types { CONTROL = 0, BEAMLET = 1, FLAGS = 2 }; + +protected: + const unsigned destRank; + + std::vector<MPI_Request> requests; + size_t nrRequests; + + Matrix<char> flagsData; + + virtual void copyNothing( const TimeStamp &from, const TimeStamp &to ); + virtual void copyStart( const TimeStamp &from, const TimeStamp &to, size_t wrap ); + virtual void copyBeamlet( unsigned beamlet, unsigned transfer, const TimeStamp &from_ts, const T* from, size_t nrSamples ); + virtual void copyFlags ( unsigned transfer, const SparseSet<int64> &flags ); + virtual void copyEnd(); + + size_t flagsSize() const { + return sizeof(uint32_t) + this->settings.nrFlagRanges * sizeof(int64) * 2; + } +}; + + +template<typename T> MPISendStation<T>::MPISendStation( const struct StationSettings &settings, const TimeStamp &from, const TimeStamp &to, size_t blockSize, const std::vector<size_t> &beamlets, unsigned destRank ) +: + SampleBufferReader<T>(settings, beamlets, from, to, blockSize), + destRank(destRank), + requests(this->buffer.flags.size() + beamlets.size() * 2, 0), + nrRequests(0), + flagsData(this->buffer.flags.size(), flagsSize()) +{ +} + + +template<typename T> void MPISendStation<T>::copyNothing( const TimeStamp &from, const TimeStamp &to ) +{ + LOG_INFO_STR( "No valid data!" ); + + Header header; + header.station = this->settings.station; + header.data = false; + header.wrap = 0; + header.from = from; + header.to = to; + header.nrBeamlets = 0; + header.nrFlags = 0; + + { + ScopedLock sl(MPIMutex); + + union tag_t tag; + + tag.bits.type = CONTROL; + + int error = MPI_Isend(&header, sizeof header, MPI_CHAR, destRank, tag.value, MPI_COMM_WORLD, &requests[nrRequests++]); + ASSERT(error == MPI_SUCCESS); + } +} + + +template<typename T> void MPISendStation<T>::copyStart( const TimeStamp &from, const TimeStamp &to, size_t wrap ) +{ + Header header; + header.station = this->settings.station; + header.data = true; + header.wrap = wrap; + header.from = from; + header.to = to; + header.nrBeamlets = this->beamlets.size(); + header.nrFlags = this->buffer.flags.size(); + header.flagsSize = this->flagsSize(); + + { + ScopedLock sl(MPIMutex); + + int error = MPI_Isend(&header, sizeof header, MPI_CHAR, destRank, 0, MPI_COMM_WORLD, &requests[nrRequests++]); + + ASSERT(error == MPI_SUCCESS); + } + + //LOG_INFO( "Header sent" ); +} + + +template<typename T> void MPISendStation<T>::copyBeamlet( unsigned beamlet, unsigned transfer, const TimeStamp &from_ts, const T* from, size_t nrSamples) +{ + (void)from_ts; + + ScopedLock sl(MPIMutex); + + union tag_t tag; + + tag.bits.type = BEAMLET; + tag.bits.beamlet = beamlet; + tag.bits.transfer = transfer; + + int error = MPI_Isend( + (void*)from, nrSamples * sizeof(T), MPI_CHAR, + destRank, tag.value, + MPI_COMM_WORLD, &requests[nrRequests++]); + + ASSERT(error == MPI_SUCCESS); +} + + +template<typename T> void MPISendStation<T>::copyFlags( unsigned transfer, const SparseSet<int64> &flags ) +{ + //LOG_INFO_STR( "Copy flags for beamlets [" << fromBeamlet << ", " << toBeamlet << "): " << (100.0 * flags.count() / this->blockSize) << "% " << flags ); + ssize_t numBytes = flags.marshall(&flagsData[transfer][0], flagsSize()); + + ASSERT(numBytes >= 0); + + union tag_t tag; + + tag.bits.type = FLAGS; + tag.bits.transfer = transfer; + + { + ScopedLock sl(MPIMutex); + + int error = MPI_Isend( + (void*)&flagsData[transfer][0], flagsSize(), MPI_CHAR, + destRank, tag.value, + MPI_COMM_WORLD, &requests[nrRequests++]); + + ASSERT(error == MPI_SUCCESS); + } +} + + +template<typename T> void MPISendStation<T>::copyEnd() +{ + int flag = false; + std::vector<MPI_Status> statusses(nrRequests); + + while (!flag) { + { + ScopedLock sl(MPIMutex); + + int error = MPI_Testall(nrRequests, &requests[0], &flag, &statusses[0]); + + ASSERT(error == MPI_SUCCESS); + } + + // can't hold lock indefinitely + pthread_yield(); + } + + //LOG_INFO( "Copy done"); + + nrRequests = 0; +} + + +template<typename T> class MPIReceiveStation { +public: + MPIReceiveStation( const struct StationSettings &settings, const std::vector<int> stationRanks, const std::vector<size_t> &beamlets, size_t blockSize ); + + void receiveBlock(); + +private: + const struct StationSettings settings; + const std::vector<int> stationRanks; + +public: + const std::vector<size_t> beamlets; + const size_t blockSize; + MultiDimArray<T, 3> samples; // [station][beamlet][sample] + Matrix< SparseSet<int64> > flags; // [station][board] +}; + +template<typename T> MPIReceiveStation<T>::MPIReceiveStation( const struct StationSettings &settings, const std::vector<int> stationRanks, const std::vector<size_t> &beamlets, size_t blockSize ) +: + settings(settings), + stationRanks(stationRanks), + beamlets(beamlets), + blockSize(blockSize), + samples(boost::extents[stationRanks.size()][beamlets.size()][blockSize], 128, heapAllocator, false, false), + flags(stationRanks.size(), settings.nrBoards) +{ +} + + +template<typename T> void MPIReceiveStation<T>::receiveBlock() +{ + struct MPISendStation<T>::Header header; + + int error; + + size_t nrRequests = 0; + std::vector<MPI_Request> header_requests(stationRanks.size()); + std::vector<struct MPISendStation<T>::Header> headers(stationRanks.size()); + + // post receives for all headers + + for (size_t nr = 0; nr < stationRanks.size(); ++nr) { + typename MPISendStation<T>::tag_t tag; + + // receive the header + + tag.bits.type = MPISendStation<T>::CONTROL; + + error = MPI_Irecv(&headers[nr], sizeof header, MPI_CHAR, stationRanks[nr], tag.value, MPI_COMM_WORLD, &header_requests[nr]); + ASSERT(error == MPI_SUCCESS); + } + + // process stations in the order in which we receive the headers + + std::vector<MPI_Request> requests(beamlets.size() * 2 * stationRanks.size()); + std::vector<MPI_Status> statusses(beamlets.size() * 2 * stationRanks.size()); + Matrix< std::vector<char> > flagData(stationRanks.size(), settings.nrBoards); // [station][board][data] + + for (size_t i = 0; i < stationRanks.size(); ++i) { + int nr; + + // wait for any header request to finish + error = MPI_Waitany(header_requests.size(), &header_requests[0], &nr, MPI_STATUS_IGNORE); + ASSERT(error == MPI_SUCCESS); + + typename MPISendStation<T>::tag_t tag; + + // check the header + + const struct MPISendStation<T>::Header header = headers[nr]; + + ASSERT(header.to - header.from == (int64)blockSize); + ASSERT(header.wrap < blockSize); + + if (!header.data) + continue; + + // post receives for the beamlets + + ASSERT(header.nrBeamlets == beamlets.size()); + + tag.value = 0; // reset + tag.bits.type = MPISendStation<T>::BEAMLET; + + int rank = stationRanks[nr]; + + for (size_t beamlet = 0; beamlet < header.nrBeamlets; ++beamlet) { + tag.bits.beamlet = beamlet; + tag.bits.transfer = 0; + + error = MPI_Irecv( + &samples[nr][beamlet][0], sizeof(T) * (header.wrap ? header.wrap : blockSize), MPI_CHAR, + rank, tag.value, + MPI_COMM_WORLD, &requests[nrRequests++]); + + ASSERT(error == MPI_SUCCESS); + + if (header.wrap > 0) { + tag.bits.transfer = 1; + + error = MPI_Irecv( + &samples[nr][beamlet][header.wrap], sizeof(T) * (blockSize - header.wrap), MPI_CHAR, + rank, tag.value, + MPI_COMM_WORLD, &requests[nrRequests++]); + + ASSERT(error == MPI_SUCCESS); + } + } + + // post receives for the flags + + ASSERT(header.nrFlags == settings.nrBoards); + + tag.value = 0; // reset + tag.bits.type = MPISendStation<T>::FLAGS; + + for (size_t board = 0; board < header.nrFlags; ++board) { + tag.bits.transfer = board; + + flagData[nr][board].resize(header.flagsSize); + + error = MPI_Irecv( + &flagData[nr][0][0], header.flagsSize, MPI_CHAR, + rank, tag.value, + MPI_COMM_WORLD, &requests[nrRequests++]); + + ASSERT(error == MPI_SUCCESS); + } + } + + // wait for all transfers to finish + + if (nrRequests > 0) { + error = MPI_Waitall(nrRequests, &requests[0], &statusses[0]); + ASSERT(error == MPI_SUCCESS); + } + + // convert raw flagData to flags array + + for (size_t nr = 0; nr < stationRanks.size(); ++nr) + for (size_t board = 0; board < settings.nrBoards; ++board) + flags[nr][board].unmarshall(&flagData[nr][board][0]); + +} +#endif + +void sighandler(int) +{ + /* no-op */ +} + +int main( int argc, char **argv ) +{ + size_t clock = 200*1000*1000; + + typedef SampleBuffer<int16>::SampleType SampleT; + const TimeStamp from(time(0L) + 1, 0, clock); + const TimeStamp to(time(0L) + 1 + DURATION, 0, clock); + const size_t blockSize = BLOCKSIZE * clock / 1024; + std::map<unsigned, std::vector<size_t> > beamlets; + + struct StationID stationID("RS106", "LBA", clock, 16); + struct StationSettings settings; + + settings.station = stationID; + settings.nrBeamlets = 244; + settings.nrBoards = 4; + + settings.nrSamples = (5 * stationID.clock / 1024);// & ~0xFL; + settings.nrFlagRanges = 64; + + settings.dataKey = stationID.hash(); + + INIT_LOGGER(argv[0]); + + if (MPI_Init(&argc, &argv) != MPI_SUCCESS) { + LOG_ERROR_STR("MPI_Init failed"); + return 1; + } + + int nrHosts, rank; + + MPI_Comm_rank(MPI_COMM_WORLD, &rank); + MPI_Comm_size(MPI_COMM_WORLD, &nrHosts); + +#ifdef USE_RMA + int nrStations = NRSTATIONS; +#else + int nrStations = NRSTATIONS; +#endif + + for (unsigned i = 0; i < 244; ++i) + beamlets[nrStations + i % (nrHosts - nrStations)].push_back(i); + + if (rank > nrStations - 1) { + // receiver + LOG_INFO_STR("Receiver " << rank << " starts, handling " << beamlets[rank].size() << " subbands from " << nrStations << " stations." ); + +#ifdef USE_RMA + std::vector<struct StationSettings> stations(nrStations, settings); + + { + MPISharedBufferReader<SampleT> receiver(stations, from, to, blockSize, beamlets[rank]); + + receiver.process(0.0); + } +#else + std::vector<int> stationRanks(nrStations); + + for (size_t i = 0; i < stationRanks.size(); i++) + stationRanks[i] = i; + + { + MPIReceiveStation<SampleT> receiver(settings, stationRanks, beamlets[rank], blockSize); + + for(size_t block = 0; block < (to-from)/blockSize + 1; ++block) { + receiver.receiveBlock(); + + //LOG_INFO_STR("Receiver " << rank << " received block " << block); + } + } +#endif + LOG_INFO_STR("Receiver " << rank << " done"); + + MPI_Finalize(); + return 0; + } + + omp_set_nested(true); + omp_set_num_threads(32); + + signal(SIGHUP, sighandler); + siginterrupt(SIGHUP, 1); + + std::vector<std::string> inputStreams(4); + inputStreams[0] = "udp:127.0.0.1:4346"; + inputStreams[1] = "udp:127.0.0.1:4347"; + inputStreams[2] = "udp:127.0.0.1:4348"; + inputStreams[3] = "udp:127.0.0.1:4349"; + + if(rank == 0) { + Station< SampleT > station( settings, inputStreams ); + Generator< SampleT > generator( settings, inputStreams ); + + #pragma omp parallel sections num_threads(4) + { + #pragma omp section + { station.process(); } + + #pragma omp section + { generator.process(); } + + #pragma omp section + { sleep(DURATION + 1); station.stop(); sleep(1); generator.stop(); } + + #pragma omp section + { + struct StationID lookup("RS106", "HBA0"); + struct StationSettings s(stationID); + + LOG_INFO_STR("Detected " << s); +#ifdef USE_RMA + MPISharedBuffer<SampleT> streamer(s); +#else + #pragma omp parallel for num_threads(nrHosts - nrStations) + for (int i = nrStations; i < nrHosts; ++i) { + LOG_INFO_STR("Connecting to receiver " << i ); + MPISendStation< SampleT > streamer(s, from, to, blockSize, beamlets[i], i ); + + LOG_INFO_STR("Sending to receiver " << i ); + streamer.process( 0.0 ); + } +#endif + } + } + } else { + struct StationID lookup("RS106", "HBA0"); + struct StationSettings s(stationID); + + LOG_INFO_STR("Detected " << s); +#ifdef USE_RMA + MPISharedBuffer<SampleT> streamer(s); +#else + #pragma omp parallel for num_threads(nrHosts - nrStations) + for (int i = nrStations; i < nrHosts; ++i) { + LOG_INFO_STR("Connecting to receiver " << i ); + MPISendStation< SampleT > streamer(s, from, to, blockSize, beamlets[i], i ); + + LOG_INFO_STR("Sending to receiver " << i ); + streamer.process( 0.0 ); + } +#endif + } + + MPI_Finalize(); +} diff --git a/RTCP/IONProc/test/newInputSection/newInputSection_old.cc b/RTCP/IONProc/test/newInputSection/newInputSection_old.cc new file mode 100644 index 00000000000..6aeb5221ab2 --- /dev/null +++ b/RTCP/IONProc/test/newInputSection/newInputSection_old.cc @@ -0,0 +1,706 @@ +#include <lofar_config.h> + +#include <Common/Thread/Mutex.h> +#include <Common/LofarLogger.h> +#include <Stream/SocketStream.h> +#include "TimeSync.h" + +#include <RSP.h> +#include <Interface/RSPTimeStamp.h> + +#include <iostream> +#include <vector> + +using namespace std; +using namespace LOFAR; +using namespace RTCP; + +const unsigned nrInputs = 10; +const unsigned nrOutputs = 10; + +const float sampleClock = 8 * 1e6; +const float subbandWidth = sampleClock / 1024; +const size_t samplesPerBlock = subbandWidth * 0.05; + +const size_t packetSize = 9000; + +class Consumer; + +/* + * Lock-free buffer for RSP packets, including + * producer primitives. Supports a single producer. + */ +class PacketBuffer { +public: + struct Item { + // the converted timestamp for this packet, + // or 0 if this packet is being written. + volatile int64 timestamp; + + // the timestamp of the previous packet, + // or 0 for the first packet. + volatile int64 prev_timestamp; + + // the payload + struct RSP packet; + + Item(): timestamp(0), prev_timestamp(0) {} + }; + + class CircularPtr { + public: + CircularPtr( PacketBuffer &buffer, struct Item *item ): item(item), buffer(buffer) {} + + struct Item *item; + + void operator++() { + if (++item == buffer.end) + item = buffer.begin; + } + + void operator--() { + if (--item == buffer.begin) + item = buffer.end - 1; + } + + private: + PacketBuffer &buffer; + }; + +private: + vector<struct Item> packets; + struct Item * const begin; + struct Item * const end; + + vector<Consumer *> consumers; + Mutex consumersMutex; + + // points to where input will be written + CircularPtr head; + + // points to the packet at or right after head + CircularPtr next; + + // last recorded timestamp + int64 prev_timestamp; + +public: + PacketBuffer( size_t bufsize, unsigned sampleClock, unsigned timesPerSlot, bool realtime ); + + // timestamp of the last written packet (exclusive, + // so actually points to one timestamp beyond the youngest + // packet). + // + // (or 0 if no data has been written yet) + volatile int64 youngest; + + // timestamp of the oldest slot in the buffer (or 0 if + // the buffer has not been fully filled yet) + volatile int64 oldest; + struct Item * volatile oldest_item; + + // call before starting to write at head + void startWrite(); + + // pointer to the head packet + struct RSP &writePtr(); + + // call after completing a write at head + void stopWrite(); + + // call when data stream ends + void noMoreData(); + + // add/remove consumers + void registerConsumer( Consumer &consumer ); + void unregisterConsumer( Consumer &consumer ); + + // configuration parameters + const unsigned sampleClock; + const bool realtime; + const size_t timesPerSlot; +}; + +/* + * An abstract class describing a data processor. + */ +class PacketSink { +public: + virtual void processPacket( Consumer *consumer, const int64 ×tamp, struct RSP &packet ) = 0; + virtual void missingData( Consumer *consumer, const int64 &from, const int64 to ) = 0; +}; + +class Consumer { +public: + Consumer( PacketBuffer &buffer, PacketSink &sink ); + + void wait( int64 to, struct timespec &timeout ); + void read( int64 from, int64 to ); + +private: + PacketBuffer &buffer; + PacketSink &sink; + const bool realtime; + + PacketBuffer::CircularPtr tail; + + // needed for synchronisation + TimeSync needFrom, haveUntil; + friend class PacketBuffer; +}; + +PacketBuffer::PacketBuffer( size_t bufsize, unsigned sampleClock, unsigned timesPerSlot, bool realtime ) +: + packets(bufsize), + begin(&packets[0]), + end(&packets[bufsize]), + head(*this, begin), + next(*this, begin), + prev_timestamp(0), + + youngest(0), + oldest(0), + oldest_item(0), + + sampleClock(sampleClock), + realtime(realtime), + timesPerSlot(timesPerSlot) +{ + // head and next are distinct (once data is read) + ASSERT( bufsize >= 2 ); +} + +void PacketBuffer::startWrite() +{ + if (!realtime) { + // make sure that our consumers do not need the head.item + // that we're about to overwrite + + const int64 headTime = head.item->timestamp; + + if (headTime != 0) { + ScopedLock sl(consumersMutex); + + for (vector<Consumer *>::const_iterator i = consumers.begin(); i != consumers.end(); ++i) + (*i)->needFrom.wait( headTime + timesPerSlot ); + } + } + + // keep next pointed at the oldest packet + ++ next; + + // if we overwrite data because we wrapped around, + // we have to update oldest. + if (next.item->timestamp != 0) { + oldest_item = next.item; + oldest = next.item->timestamp; + } + + // invalidate head + head.item->timestamp = 0; +} + +struct RSP &PacketBuffer::writePtr() +{ + return head.item->packet; +} + +void PacketBuffer::stopWrite() +{ + // complete our bookkeeping on head + const struct RSP &packet = head.item->packet; + const int64 timestamp = TimeStamp(packet.header.timestamp, packet.header.blockSequenceNumber, sampleClock); + + head.item->prev_timestamp = prev_timestamp; + prev_timestamp = timestamp; + + // make head valid again + head.item->timestamp = timestamp; + + ++ head; + + // the very first packet initialises oldest + if (!oldest) { + oldest_item = head.item; + oldest = timestamp; + } + + youngest = timestamp + timesPerSlot; + + { + // readers could be waiting for this data both in realtime and in non-realtime modes + + // The consumersMutex only blocks if consumers are added or removed. + ScopedLock sl(consumersMutex); + + // make sure that our consumers unlock once we've written data they need + for (vector<Consumer *>::const_iterator i = consumers.begin(); i != consumers.end(); ++i) { + // These TimeSync locks block only if the consumer is about to wait + // for data. This is still cheaper than letting the consumers actively + // poll `youngest'. + (*i)->haveUntil.set( youngest ); + } + } +} + +void PacketBuffer::noMoreData() +{ + ScopedLock sl(consumersMutex); + + // make sure that our consumers unlock + for (vector<Consumer *>::const_iterator i = consumers.begin(); i != consumers.end(); ++i) + (*i)->haveUntil.noMoreData(); +} + +Consumer::Consumer( PacketBuffer &buffer, PacketSink &sink ) +: + buffer(buffer), + sink(sink), + realtime(buffer.realtime), + tail(buffer, 0) +{ +} + +void Consumer::wait( int64 to, struct timespec &timeout ) +{ + if (!realtime) { + // sync will occur in read() + return; + } + + if (!haveUntil.wait( to, timeout )) { + LOG_WARN_STR( "Data arrived too late for " << to ); + } else { + LOG_DEBUG_STR( "Data arrived on time for " << to ); + } +} + +void Consumer::read( int64 from, int64 to ) +{ + /* + * Read data from the circular buffer, lock free + * under the following conditions: + * - running in real-time mode + * - no logging anywhere + * + * This means that any information we retrieve + * from `buffer' can already be outdated at the next + * memory access. So we often store a local copy. Also, we + * let the buffer cache the following info, and update it + * atomically: + * + * youngest: timestamp of the latest packet that was written + * oldest: timestamp of the oldest packet still in the buffer + * oldest_item: pointer to the oldest item + * + * Each item has the following properties: + * + * timestamp: timestamp of the first sample, or 0 if this packet + * is either not used yet or being overwritten. + * prev_timestamp: + * timestamp of the previous received packet, needed + * to detect some forms of packet loss. + * item: pointer to the payload. + * + * Note that even dereferencing multiple properties of the same + * item might yield results from different packets, if the + * writer passed by in between reads. + * + * In the cases that multiple properties are needed, make sure + * that the code functions correctly if a second property comes + * from a later packet than the first property. + */ + ASSERT(from < to); + + /* + * Sync with writer if needed + */ + + if (!realtime) { + // reserve all data since from + needFrom.set( from ); + + // make sure all data (that exists) + // until to is available. + haveUntil.wait( to ); + } + + const int64 youngest = buffer.youngest; + + /* + * We will exit once we encounter data up to 'to' + * or later. So we have to make sure that exists, + * as we cannot count on more data to arrive. + */ + + if (youngest <= from) { + // no data available -- don't look for it + LOG_DEBUG_STR( "Data loss because no data is available" ); + sink.missingData( this, from, to ); + return; + } + + if (youngest < to) { + // partial data available -- only look for what might exist + LOG_DEBUG_STR( "Data loss because end is not available" ); + sink.missingData( this, youngest, to ); + + to = youngest; + } + + /* + * Make an initial guess where to start looking. + * We just have to make sure that we do not jump + * between [from, to) as we'd be forced to consider + * anything before `tail' as a loss. + */ + + if (!tail.item) { + // We'll need to scan -- start at the oldest data + tail.item = buffer.oldest_item; + } else { + // We'll continue from the last read() + // + // Rewind if needed. Note that prev_timestamp is only 0 + // if there was no previous packet. + while( tail.item->prev_timestamp >= from ) { + LOG_DEBUG_STR("Rewinding, am " << (tail.item->prev_timestamp - from) << " ahead"); + -- tail; + } + } + + /* + * Locate any data we can find and process it. + * + * We drop out of the loop when we either: + * - have all our data (from == to) + * - notice that the rest of the data is lost + */ + + while( from < to ) { + const int64 tailTime = tail.item->timestamp; + + if (tailTime == 0) { + // invalid or no data + + // prevent infinite loops if we run in lock-step with the writer + if (buffer.oldest >= to) + break; + + ++ tail; + continue; + } + + if (tailTime < from) { + // data is not useful to us + ++ tail; + continue; + } + + if (tailTime >= to) { + // Two possibilities: + // 1. Genuine data loss beyond the end of the packet. + // 2. Writer gained on us and wrote a new packet here. + + if (tail.item->prev_timestamp < from) { + // 1: this packet belongs here, so the loss + // spans across the end of the packet. + break; + } + + // 2: We're somewhere we should not be, most likely + // because the writer overwrote these packets. + + ASSERT(realtime); + + if (buffer.oldest >= to) { + // there is no data for us anymore + break; + } + + // valid data after head + LOG_DEBUG_STR( "Sync with head" ); + tail.item = buffer.oldest_item; + continue; + } + + if (tailTime != from) { + // data loss + LOG_DEBUG_STR( "Data loss within packet" ); + sink.missingData( this, from, tailTime ); + } + + // a packet! + sink.processPacket( this, tailTime, tail.item->packet ); + + /* + * If the writer did *anything* with this packet, the + * timestamp will have been changed. + */ + + if (tailTime != tail.item->timestamp) { + // we got interrupted + ASSERT(realtime); + + // mark packet as missing + LOG_DEBUG_STR( "Data loss due to read/write conflict" ); + sink.missingData( this, tailTime, tailTime + buffer.timesPerSlot ); + } + + // look for the next packet + from = tailTime + buffer.timesPerSlot; + + // no need to reconsider this packet + ++ tail; + } + + if (from < to) { + LOG_DEBUG_STR( "Data loss at end of packet" ); + sink.missingData( this, from, to ); + } +} + +void PacketBuffer::registerConsumer( Consumer &consumer ) +{ + ScopedLock sl(consumersMutex); + + consumers.push_back(&consumer); +} + +void PacketBuffer::unregisterConsumer( Consumer &consumer ) +{ + ScopedLock sl(consumersMutex); + + for (vector<Consumer*>::iterator i = consumers.begin(); i != consumers.end(); ++i) { + if (*i == &consumer) { + consumers.erase(i); + break; + } + } +} + +#if 0 +/* + * Input from one RSP board + */ +class RSPBoardInput { +public: + RSPBoardInput( FileDescriptorBasedStream &inputStream, unsigned subbandsPerPacket, unsigned timesPerSlot, unsigned nrPolarizations, unsigned sampleSize ); + + void read(); + + PacketBuffer buffer; + +private: + FileDescriptorBasedStream &inputStream; + + const unsigned subbandsPerPacket; + const unsigned timesPerSlot; + const unsigned nrPolarizations; + const unsigned sampleSize; + + const size_t subbandSize; + const size_t packetSize; +}; + +RSPBoardInput::RSPBoardInput( FileDescriptorBasedStream &inputStream, unsigned subbandsPerPacket, unsigned timesPerSlot, unsigned nrPolarizations, unsigned sampleSize ) +: + buffer(100), + inputStream(inputStream), + packetReadOffset(0), + + subbandsPerPacket(subbandsPerPacket), + timesPerSlot(timesPerSlot), + nrPolarizations(nrPolarizations), + sampleSize(sampleSize), + + subbandSize(timesPerSlot * nrPolarizations * sampleSize), + packetSize(sizeof(struct RSP::Header) + subbandsPerPacket * subbandSize) +{ + ASSERT(packetSize <= sizeof(struct RSP)); +} + +void RSPBoardInput::read() +{ + /* + * Read packets until we block. + */ + for(;;) { + struct RSP &packet = buffer.head.item->packet; + + void *dstPtr = reinterpret_cast<char*>(packet) + packetReadOffset; + size_t bytesLeft = packetSize - packetReadOffset; + size_t numbytes; + + if (packetReadOffset == 0) { + // new packet + buffer.startWrite(); + } + + try { + numbytes = s.tryRead(dstPtr, bytesLeft); + } catch(...) { + buffer.noMoreData(); + + throw; + } + + if (numbytes == bytesLeft) { + // finished reading packet + buffer.stopWrite(); + + packetReadOffset = 0; + } else { + // packet partially read + packetReadOffset += numbytes; + } + } +} + +/* + * Generates output from data generated by multiple RSP boards. + */ +class OutputGenerator { +public: + OutputGenerator( const vector< RSPBoardInput * > &inputs, const int64 &startTime, size_t blocksize ); + + int64 next_block_start; + size_t blocksize; + + void write(); + +private: + const vector< RSPboardInput * > &inputs; + vector< PacketBuffer::Consumer * > consumers; +}; + +OutputGenerator::OutputGenerator( const vector< RSPBoardInput * > &inputs, const int64 &startTime, size_t blocksize ) +: + next_block_start(startTime), + blocksize(blocksize), + inputs(inputs), + consumers(inputs.size(),0) +{ + for( size_t i = 0; i < inputs.size(); i++ ) + consumers[i] = new PacketBuffer::Consumer(inputs[i]->buffer); +} + +void OutputGenerator::processPacket( const RSPBoardInput &input, const int64 ×tamp, struct RSP *packet ) +{ +/* + char *srcPtr = packet->data; + + for (size_t sb = 0; sb < subbandsPerPacket; sb++) { + // copy full subband + memcpy( dstPtr, srcPtr, subbandSize ); + srcPtr += subbandSize; + } +*/ +} + +void OutputGenerator::missingData( const RSPBoardInput &input, const int64 &from, const int64 to ) +{ +} + +void OutputGenerator::write() +{ + /* todo: wait for T = next_block_start + max_wait_time */ + + for( size_t i = 0; i < consumers.size(); i++ ) { + RSPBoardInput &input = *inputs[i]; + PacketBuffer &buffer = input.buffer; + PacketBuffer::Consumer &consumer = consumers[i]; + unsigned timesPerSlot = input.timesPerSlot; + } +} + + +/* + * Design: + * + * Input is read from + */ +#endif + +#include <time.h> +#include <Common/Thread/Thread.h> +#include <WallClockTime.h> + +time_t start; + +class LogPacketSink: public PacketSink +{ +public: + virtual void processPacket( Consumer *consumer, const int64 ×tamp, struct RSP &packet ) { + //LOG_INFO_STR( "Received packet " << timestamp ); + } + virtual void missingData( Consumer *consumer, const int64 &from, const int64 to ) { + LOG_INFO_STR( "Missed data from " << from << " to " << to ); + } +}; + +class ConsumerThread { +public: + void run(); + + Consumer *consumer; + Thread thread; + + ConsumerThread( Consumer *consumer ): consumer(consumer), thread( this, &ConsumerThread::run ) {} +}; + +void ConsumerThread::run() +{ + TimeStamp cts(start, 0, sampleClock); + + for (size_t i = 0; i < 16; ++i) { + TimeStamp from = cts; + TimeStamp to = cts + 16 * 1000; + LOG_INFO_STR( ">>>> Reading from " << (int64)from << " to " << (int64)to << " <<<<<" ); + + struct timespec ts = to; + + consumer->wait( to, ts ); + consumer->read( from, to ); + LOG_INFO_STR( "<<<< Done reading from " << (int64)from << " to " << (int64)to << " >>>>>" ); + cts = to; + } +} + +int main( int argc, char **argv ) { + INIT_LOGGER(argv[0]); + + bool realtime = true; + + PacketBuffer buffer( 1100, sampleClock, 16, realtime ); + LogPacketSink logsink; + Consumer consumer( buffer, logsink ); + buffer.registerConsumer(consumer); + + ConsumerThread cthread( &consumer ); + + start = time(0) + 1; + + WallClockTime wct; + + TimeStamp ts(start, 0, sampleClock); + + for (size_t i = 0; i < 100; ++i) { + wct.waitUntil(ts + 0000); + + for (size_t j = 0; j < 160; ++j) { + buffer.startWrite(); + + struct RSP &packet = buffer.writePtr(); + + packet.header.timestamp = ts.getSeqId(); + packet.header.blockSequenceNumber = ts.getBlockId(); + + buffer.stopWrite(); + + ts += 16; + } + } + + buffer.noMoreData(); +} diff --git a/RTCP/IONProc/test/newInputSection/shmtest.cc b/RTCP/IONProc/test/newInputSection/shmtest.cc new file mode 100644 index 00000000000..f7b0d5d804b --- /dev/null +++ b/RTCP/IONProc/test/newInputSection/shmtest.cc @@ -0,0 +1,12 @@ +#include "SharedMemory.h" +#include <unistd.h> + +using namespace LOFAR; + +int main() { + INIT_LOGGER("foo"); + + SharedMemory shm( 0x123, 4096, SharedMemory::READ ); + + sleep(5); +} diff --git a/RTCP/IONProc/test/newInputSection/tRSPTimeStamp.cc b/RTCP/IONProc/test/newInputSection/tRSPTimeStamp.cc new file mode 100644 index 00000000000..e4085cf3f05 --- /dev/null +++ b/RTCP/IONProc/test/newInputSection/tRSPTimeStamp.cc @@ -0,0 +1,27 @@ +#include <lofar_config.h> + +#include <Common/LofarLogger.h> +#include <Interface/RSPTimeStamp.h> + +int main( int, char **argv ) +{ + INIT_LOGGER(argv[0]); + + unsigned clock = 200 * 1000 * 1000; + + { + TimeStamp ts(0,0,clock); + + for (int64 i = 0; i < clock * 3; ++i) { + ++ts; + + #define REPORT "(ts == " << ts << ", i == " << i << ")" + + ASSERTSTR( (int64)ts == i, REPORT ); + + ASSERTSTR( ts.getSeqId() == i / clock, REPORT ); + + ASSERTSTR( ts.getBlockId() == i % clock, REPORT ); + } + } +} diff --git a/RTCP/IONProc/test/tSSH.cc b/RTCP/IONProc/test/tSSH.cc index 58f6a2a68a5..8c8336efa7a 100644 --- a/RTCP/IONProc/test/tSSH.cc +++ b/RTCP/IONProc/test/tSSH.cc @@ -21,9 +21,9 @@ using namespace LOFAR; using namespace RTCP; -void test_SSHconnection() { +void test_SSHconnection( const char *cmd ) { #ifdef HAVE_LIBSSH2 - SSHconnection ssh("", "localhost", "echo SSHconnection success", USER, privkey); + SSHconnection ssh("", "localhost", cmd, USER, privkey); ssh.start(); @@ -47,8 +47,7 @@ void test_forkExec() { pid = forkSSH("", "localhost", params, USER, privkey); - unsigned timeout = 10; - joinSSH("", pid, timeout); + joinSSH("", pid, time(0) + 10); } int main() { @@ -60,15 +59,22 @@ int main() { // can we even ssh to localhost? char sshcmd[1024]; - snprintf(sshcmd, sizeof sshcmd, "ssh %s@localhost -i %s echo system success", USER, privkey); + snprintf(sshcmd, sizeof sshcmd, "ssh %s@localhost -o PasswordAuthentication=no -o KbdInteractiveAuthentication=no -o NoHostAuthenticationForLocalhost=yes -i %s echo system success", USER, privkey); int ret = system(sshcmd); if (ret < 0 || WEXITSTATUS(ret) != 0) { // no -- mark this test as unrunnable and don't attempt to try with libssh then return 3; } - test_SSHconnection(); + SSH_Init(); + + test_SSHconnection( "echo SSHconnection success [stdout]" ); + test_SSHconnection( "echo SSHconnection success [stderr] 1>&2" ); + test_SSHconnection( "echo SSHconnection success [stderr] 1>&2; echo SSHconnection success [stdout]" ); + test_SSHconnection( "echo SSHconnection success [stdout]; echo SSHconnection success [stderr] 1>&2" ); test_forkExec(); + SSH_Finalize(); + return 0; } diff --git a/RTCP/IONProc/test/tSSH.stdout b/RTCP/IONProc/test/tSSH.stdout index 0b2e0ea1c75..52dd9242161 100644 --- a/RTCP/IONProc/test/tSSH.stdout +++ b/RTCP/IONProc/test/tSSH.stdout @@ -1,3 +1,8 @@ system success -SSHconnection success +SSHconnection success [stdout] +SSHconnection success [stderr] +SSHconnection success [stderr] +SSHconnection success [stdout] +SSHconnection success [stdout] +SSHconnection success [stderr] forkExec success diff --git a/RTCP/Interface/include/Interface/Allocator.h b/RTCP/Interface/include/Interface/Allocator.h index 427471dae36..fb841218f94 100644 --- a/RTCP/Interface/include/Interface/Allocator.h +++ b/RTCP/Interface/include/Interface/Allocator.h @@ -48,6 +48,25 @@ class Allocator virtual void *allocate(size_t size, size_t alignment = 1) = 0; virtual void deallocate(void *) = 0; + + /* + * Allows TYPE *foo = allocator.allocateTyped() without type-casting. + */ + class TypedAllocator { + public: + TypedAllocator(Allocator &allocator, size_t alignment): allocator(allocator), alignment(alignment) {} + + // cast-operator overloading is the only way to let C++ automatically deduce the type that we want + // to return. + template<typename T> operator T* () { + return static_cast<T*>(allocator.allocate(sizeof(T), alignment)); + } + private: + Allocator &allocator; + const size_t alignment; + }; + + TypedAllocator allocateTyped(size_t alignment = 1) { return TypedAllocator(*this, alignment); } }; @@ -68,7 +87,7 @@ class SparseSetAllocator : public Allocator public: SparseSetAllocator(const Arena &); - virtual void *allocate(size_t size, size_t alignment); + virtual void *allocate(size_t size, size_t alignment = 1); virtual void deallocate(void *); bool empty() { ScopedLock sl(mutex); return sizes.empty(); } diff --git a/RTCP/Interface/include/Interface/MultiDimArray.h b/RTCP/Interface/include/Interface/MultiDimArray.h index e5a5496180d..4d1730d0792 100644 --- a/RTCP/Interface/include/Interface/MultiDimArray.h +++ b/RTCP/Interface/include/Interface/MultiDimArray.h @@ -32,17 +32,19 @@ template <typename T, unsigned DIM> class MultiDimArray : public boost::multi_ar SuperType(0, boost::detail::multi_array::extent_gen<DIM>()), allocator(&allocator), allocated_num_elements(0), - alignment(0) + alignment(0), + padToAlignment(false), + construct(true) { } - MultiDimArray(const ExtentList &extents, void *ptr) + MultiDimArray(const ExtentList &extents, void *ptr, bool construct = true) : // Use 'placement new' to force initialisation through constructors if T is a class // TODO: Not sure how to handle an exception raised by the constructor of T. The placement // delete[] will be called, but that's an empty stub. - SuperType(new(ptr)T[nrElements(extents)], extents), + SuperType(construct ? new(ptr)T[nrElements(extents)] : ptr, extents), allocator(&allocator), allocated_num_elements(nrElements(extents)), alignment(alignment), @@ -50,26 +52,30 @@ template <typename T, unsigned DIM> class MultiDimArray : public boost::multi_ar { } - MultiDimArray(const ExtentList &extents, size_t alignment = defaultAlignment(), Allocator &allocator = heapAllocator, bool padToAlignment = false) + MultiDimArray(const ExtentList &extents, size_t alignment = defaultAlignment(), Allocator &allocator = heapAllocator, bool padToAlignment = false, bool construct = true) : // Use 'placement new' to force initialisation through constructors if T is a class // TODO: Not sure how to handle an exception raised by the constructor of T. The placement // delete[] will be called, but that's an empty stub. - SuperType(new(allocator.allocate(padToAlignment ? align(nrElements(extents) * sizeof(T), alignment) : nrElements(extents) * sizeof(T), alignment))T[nrElements(extents)], extents), + SuperType(allocate(nrElements(extents), alignment, allocator, padToAlignment, construct), extents), allocator(&allocator), allocated_num_elements(nrElements(extents)), alignment(alignment), - padToAlignment(padToAlignment) + padToAlignment(padToAlignment), + construct(construct) { } MultiDimArray(const MultiDimArray<T,DIM> &other) : - SuperType(other.num_elements_ ? new(other.allocator->allocate(padToAlignment ? align(other.num_elements_ * sizeof(T), other.alignment) : other.num_elements_ * sizeof(T), other.alignment))T[other.num_elements_] : 0, other.extent_list_), + SuperType(other.num_elements_ ? allocate(other.num_elements_, other.alignment, *other.allocator, other.padToAlignment, other.construct) : 0, other.extent_list_), +//new(other.allocator->allocate(padToAlignment ? align(other.num_elements_ * sizeof(T), other.alignment) : other.num_elements_ * sizeof(T), other.alignment))T[other.num_elements_] : 0, other.extent_list_), allocator(other.allocator), allocated_num_elements(other.num_elements_), - alignment(other.alignment) + alignment(other.alignment), + padToAlignment(other.padToAlignment), + construct(true) { *this = other; } @@ -97,11 +103,11 @@ template <typename T, unsigned DIM> class MultiDimArray : public boost::multi_ar return *this; } - void resize(const ExtentList &extents, size_t alignment, Allocator &allocator, bool padToAlignment = false) + void resize(const ExtentList &extents, size_t alignment, Allocator &allocator, bool padToAlignment = false, bool construct = true) { destructElements(); - MultiDimArray newArray(extents, alignment, allocator, padToAlignment); + MultiDimArray newArray(extents, alignment, allocator, padToAlignment, construct); std::swap(this->base_, newArray.base_); std::swap(this->storage_, newArray.storage_); std::swap(this->extent_list_, newArray.extent_list_); @@ -113,6 +119,8 @@ template <typename T, unsigned DIM> class MultiDimArray : public boost::multi_ar std::swap(this->allocator, newArray.allocator); std::swap(this->allocated_num_elements, newArray.allocated_num_elements); std::swap(this->alignment, newArray.alignment); + std::swap(this->padToAlignment, newArray.padToAlignment); + std::swap(this->construct, newArray.construct); } void resize(const ExtentList &extents, size_t alignment = defaultAlignment()) @@ -126,10 +134,10 @@ template <typename T, unsigned DIM> class MultiDimArray : public boost::multi_ar unsigned new_num_elements = nrElements(extents); if (new_num_elements > allocated_num_elements) - THROW(InterfaceException, "MultiDimArray::resizeInplace: requested to resize to " << new_num_elements << " elements, but only " << allocated_num_elements << " are allocateod"); + THROW(InterfaceException, "MultiDimArray::resizeInplace: requested to resize to " << new_num_elements << " elements, but only " << allocated_num_elements << " are allocated"); // only destruct and construct all elements if the number of elements actually changes - if (new_num_elements != this->num_elements_) { + if (new_num_elements != this->num_elements_ && construct) { destructElements(); (void)new(this->base_)T[new_num_elements]; } @@ -186,6 +194,17 @@ template <typename T, unsigned DIM> class MultiDimArray : public boost::multi_ar size_t allocated_num_elements; unsigned alignment; bool padToAlignment; + bool construct; + + T *allocate(size_t nrElements, size_t alignment, Allocator &allocator, bool padToAlignment, bool construct) const { + size_t dataSize = padToAlignment + ? align(nrElements * sizeof(T), alignment) + : nrElements * sizeof(T); + + T *ptr = static_cast<T*>(allocator.allocate(dataSize, alignment)); + + return construct ? new(ptr)T[nrElements] : ptr; + } // a MultiDimArray made to replace another, using a different shape. Assumes // the original MultiDimArray allocated enough memory to hold the new @@ -200,13 +219,17 @@ template <typename T, unsigned DIM> class MultiDimArray : public boost::multi_ar allocator(0), // we did not allocate this allocated_num_elements(0), alignment(other.alignment), - padToAlignment(other.padToAlignment) + padToAlignment(other.padToAlignment), + construct(other.construct) { } void destructElements() { + if (!construct) + return; + // explicitly call the destructors in the 'placement new' array since C++ // cannot do this for us. The delete[] operator cannot know the size of the // array, and the placement delete[] operator exists (since new()[] will look diff --git a/RTCP/Interface/include/Interface/Parset.h b/RTCP/Interface/include/Interface/Parset.h index 5a9ec652f1d..682f091091f 100644 --- a/RTCP/Interface/include/Interface/Parset.h +++ b/RTCP/Interface/include/Interface/Parset.h @@ -30,6 +30,7 @@ //# Includes #include <Common/ParameterSet.h> +#include <Common/LofarBitModeInfo.h> #include <Common/StreamUtil.h> #include <Common/StringUtil.h> #include <Common/lofar_datetime.h> @@ -707,7 +708,16 @@ inline unsigned Parset::dedispersionFFTsize() const inline unsigned Parset::nrBitsPerSample() const { - return getUint32("OLAP.nrBitsPerSample"); + const std::string key = "Observation.nrBitsPerSample"; + + if (isDefined(key)) { + return getUint32(key); + } else { +#ifndef HAVE_BGP_CN + LOG_WARN_STR( "Missing key " << key << ", using the depricated key OLAP.nrBitsPerSample"); +#endif + return getUint32("OLAP.nrBitsPerSample", 16); + } } inline unsigned Parset::CNintegrationSteps() const @@ -1060,7 +1070,16 @@ inline int Parset::phaseThreeCoreIndex(unsigned core) const inline unsigned Parset::nrSlotsInFrame() const { - return getUint32("Observation.nrSlotsInFrame"); + unsigned nrSlots = 0; + + nrSlots = getUint32("Observation.nrSlotsInFrame", 0); + + if (nrSlots == 0) { + // return default + return maxBeamletsPerRSP(nrBitsPerSample()); + } + + return nrSlots; } inline string Parset::partitionName() const diff --git a/RTCP/Interface/include/Interface/RSPTimeStamp.h b/RTCP/Interface/include/Interface/RSPTimeStamp.h index 8a605629ee7..d2cc0c22c5a 100644 --- a/RTCP/Interface/include/Interface/RSPTimeStamp.h +++ b/RTCP/Interface/include/Interface/RSPTimeStamp.h @@ -42,6 +42,7 @@ namespace LOFAR { TimeStamp &setStamp(unsigned seqId, unsigned blockId); unsigned getSeqId() const; unsigned getBlockId() const; + unsigned getClock() const { return itsClockSpeed; } template <typename T> TimeStamp &operator += (T increment); template <typename T> TimeStamp &operator -= (T decrement); diff --git a/RTCP/Interface/include/Interface/SmartPtr.h b/RTCP/Interface/include/Interface/SmartPtr.h index 85e79a75cfe..1f6fc5190b7 100644 --- a/RTCP/Interface/include/Interface/SmartPtr.h +++ b/RTCP/Interface/include/Interface/SmartPtr.h @@ -46,6 +46,8 @@ template <typename T, class D = SmartPtrDelete<T> > class SmartPtr T & operator * () const; T * operator -> () const; + bool operator ! () const; + SmartPtr<T,D> & operator = (T *); SmartPtr<T,D> & operator = (const SmartPtr<T,D> &); @@ -115,6 +117,12 @@ template <typename T, class D> inline T *SmartPtr<T,D>::operator -> () const } +template <typename T, class D> inline bool SmartPtr<T,D>::operator ! () const +{ + return ptr == 0; +} + + template <typename T, class D> inline SmartPtr<T,D> &SmartPtr<T,D>::operator = (T *orig) { D::free(ptr); diff --git a/RTCP/Interface/include/Interface/Stream.h b/RTCP/Interface/include/Interface/Stream.h index d4eb594c5b8..8111b8e0284 100644 --- a/RTCP/Interface/include/Interface/Stream.h +++ b/RTCP/Interface/include/Interface/Stream.h @@ -33,7 +33,7 @@ namespace LOFAR { namespace RTCP { // Create a stream from a descriptor -Stream *createStream(const std::string &descriptor, bool asReader); +Stream *createStream(const std::string &descriptor, bool asReader, time_t deadline = 0); // Return a string descriptor, for all supported streamTypes except FCNP std::string getStreamDescriptorBetweenIONandCN(const char *streamType, unsigned ionode, unsigned pset, unsigned core, unsigned numpsets, unsigned numcores, unsigned channel); diff --git a/RTCP/Interface/src/Stream.cc b/RTCP/Interface/src/Stream.cc index 018588c8205..07b9225e388 100644 --- a/RTCP/Interface/src/Stream.cc +++ b/RTCP/Interface/src/Stream.cc @@ -38,6 +38,7 @@ #include <boost/format.hpp> #include <boost/lexical_cast.hpp> +#include <time.h> #include <vector> using boost::format; @@ -46,34 +47,37 @@ using namespace std; namespace LOFAR { namespace RTCP { -Stream *createStream(const string &descriptor, bool asServer) +Stream *createStream(const string &descriptor, bool asServer, time_t deadline) { vector<string> split = StringUtil::split(descriptor, ':'); + if (deadline > 0 && deadline <= time(0)) + THROW(SocketStream::TimeOutException, "Deadline already passed at start"); + if (descriptor == "null:") return new NullStream; else if (split.size() == 3 && split[0] == "udp") - return new SocketStream(split[1].c_str(), boost::lexical_cast<short>(split[2]), SocketStream::UDP, asServer ? SocketStream::Server : SocketStream::Client, 30); + return new SocketStream(split[1].c_str(), boost::lexical_cast<short>(split[2]), SocketStream::UDP, asServer ? SocketStream::Server : SocketStream::Client, deadline); else if (split.size() == 3 && split[0] == "tcp") - return new SocketStream(split[1].c_str(), boost::lexical_cast<short>(split[2]), SocketStream::TCP, asServer ? SocketStream::Server : SocketStream::Client, 30); + return new SocketStream(split[1].c_str(), boost::lexical_cast<short>(split[2]), SocketStream::TCP, asServer ? SocketStream::Server : SocketStream::Client, deadline); else if (split.size() == 3 && split[0] == "udpkey") - return new SocketStream(split[1].c_str(), 0, SocketStream::UDP, asServer ? SocketStream::Server : SocketStream::Client, 30, split[2].c_str()); + return new SocketStream(split[1].c_str(), 0, SocketStream::UDP, asServer ? SocketStream::Server : SocketStream::Client, deadline, split[2].c_str()); #ifdef USE_THREADS else if (split.size() == 4 && split[0] == "tcpbroker") return asServer ? static_cast<Stream*>(new PortBroker::ServerStream(split[3])) : static_cast<Stream*>(new PortBroker::ClientStream(split[1], boost::lexical_cast<short>(split[2]), split[3])); #endif else if (split.size() == 3 && split[0] == "tcpkey") #if defined CLUSTER_SCHEDULING - return new SocketStream(split[1].c_str(), 0, SocketStream::TCP, asServer ? SocketStream::Server : SocketStream::Client, 30000, split[2].c_str()); + return new SocketStream(split[1].c_str(), 0, SocketStream::TCP, asServer ? SocketStream::Server : SocketStream::Client, deadline, split[2].c_str()); #else - return new SocketStream(split[1].c_str(), 0, SocketStream::TCP, asServer ? SocketStream::Server : SocketStream::Client, 30, split[2].c_str()); + return new SocketStream(split[1].c_str(), 0, SocketStream::TCP, asServer ? SocketStream::Server : SocketStream::Client, deadline, split[2].c_str()); #endif else if (split.size() == 2 && split[0] == "file") return asServer ? new FileStream(split[1].c_str()) : new FileStream(split[1].c_str(), 0666); else if (split.size() == 2 && split[0] == "pipe") return new NamedPipeStream(split[1].c_str(), asServer); else if (split.size() == 2) - return new SocketStream(split[0].c_str(), boost::lexical_cast<short>(split[1]), SocketStream::UDP, asServer ? SocketStream::Server : SocketStream::Client, 30); + return new SocketStream(split[0].c_str(), boost::lexical_cast<short>(split[1]), SocketStream::UDP, asServer ? SocketStream::Server : SocketStream::Client, deadline); else if (split.size() == 1) return asServer ? new FileStream(split[0].c_str()) : new FileStream(split[0].c_str(), 0666); else diff --git a/RTCP/Run/src/LOFAR/Parset.py b/RTCP/Run/src/LOFAR/Parset.py index 5f796b04d92..e1e28958bbd 100644 --- a/RTCP/Run/src/LOFAR/Parset.py +++ b/RTCP/Run/src/LOFAR/Parset.py @@ -629,7 +629,7 @@ class Parset(util.Parset.Parset): # make sure that the remainder is easily factorisable for easier post-processing cnIntegrationSteps = forced_factors * increase_factors( int(round(nrSamplesPerSecond * cnIntegrationTime / forced_factors)) ) - cnIntegrationSteps = max(1, cnIntegrationSteps) + cnIntegrationSteps = max(forced_factors, cnIntegrationSteps) self.setdefault('OLAP.CNProc.integrationSteps', cnIntegrationSteps) @@ -819,7 +819,6 @@ class Parset(util.Parset.Parset): assert self.getNrOutputs() > 0, "No data output selected." assert len(self.stations) > 0, "No stations selected." assert len(self.getInt32Vector("Observation.subbandList")) > 0, "No subbands selected." - assert len(self.getInt32Vector("Observation.subbandList")) <= NRRSPBOARDS*NRBOARBEAMLETS, "More than %d subbands selected." % (NRRSPBOARDS*NRBOARBEAMLETS,) # phase 2 and 3 are either disjunct or equal assert self.phaseThreePsetDisjunct() or self.phaseTwoThreePsetEqual(), "Phase 2 and 3 should use either disjunct or the same psets." diff --git a/RTCP/Run/src/OLAP.parset b/RTCP/Run/src/OLAP.parset index 75cd4622476..2d586feaf84 100644 --- a/RTCP/Run/src/OLAP.parset +++ b/RTCP/Run/src/OLAP.parset @@ -37,100 +37,100 @@ PIC.Core.CS007HBA0.clockCorrectionTime = 7.913020e-06 PIC.Core.CS007HBA1.clockCorrectionTime = 7.913260e-06 PIC.Core.CS007HBA.clockCorrectionTime = 7.913140e-06 +PIC.Core.CS001LBA.clockCorrectionTime = 4.309154e-06 +PIC.Core.CS001HBA0.clockCorrectionTime = 4.309154e-06 +PIC.Core.CS001HBA1.clockCorrectionTime = 4.309154e-06 +PIC.Core.CS001HBA.clockCorrectionTime = 4.309154e-06 + +PIC.Core.CS011LBA.clockCorrectionTime = 7.55795e-06 +PIC.Core.CS011HBA0.clockCorrectionTime = 7.55795e-06 +PIC.Core.CS011HBA1.clockCorrectionTime = 7.55795e-06 +PIC.Core.CS011HBA.clockCorrectionTime = 7.55795e-06 + +PIC.Core.CS013LBA.clockCorrectionTime = 1.639118e-05 +PIC.Core.CS013HBA0.clockCorrectionTime = 1.639118e-05 +PIC.Core.CS013HBA1.clockCorrectionTime = 1.639118e-05 +PIC.Core.CS013HBA.clockCorrectionTime = 1.639118e-05 + +PIC.Core.CS017LBA.clockCorrectionTime = 1.540943e-05 +PIC.Core.CS017HBA0.clockCorrectionTime = 1.540943e-05 +PIC.Core.CS017HBA1.clockCorrectionTime = 1.540943e-05 +PIC.Core.CS017HBA.clockCorrectionTime = 1.540943e-05 + +PIC.Core.CS021LBA.clockCorrectionTime = 1.829614e-05 +PIC.Core.CS021HBA0.clockCorrectionTime = 1.829614e-05 +PIC.Core.CS021HBA1.clockCorrectionTime = 1.829614e-05 +PIC.Core.CS021HBA.clockCorrectionTime = 1.829614e-05 + +PIC.Core.CS024LBA.clockCorrectionTime = 4.7597e-06 +PIC.Core.CS024HBA0.clockCorrectionTime = 4.7597e-06 +PIC.Core.CS024HBA1.clockCorrectionTime = 4.7597e-06 +PIC.Core.CS024HBA.clockCorrectionTime = 4.7597e-06 + +PIC.Core.CS026LBA.clockCorrectionTime = 1.619986e-05 +PIC.Core.CS026HBA0.clockCorrectionTime = 1.619986e-05 +PIC.Core.CS026HBA1.clockCorrectionTime = 1.619986e-05 +PIC.Core.CS026HBA.clockCorrectionTime = 1.619986e-05 + +PIC.Core.CS028LBA.clockCorrectionTime = 1.70614e-06 +PIC.Core.CS028HBA0.clockCorrectionTime = 1.70614e-06 +PIC.Core.CS028HBA1.clockCorrectionTime = 1.70614e-06 +PIC.Core.CS028HBA.clockCorrectionTime = 1.70614e-06 + +PIC.Core.CS030LBA.clockCorrectionTime = 9.7160576e-06 +PIC.Core.CS030HBA0.clockCorrectionTime = 9.7160576e-06 +PIC.Core.CS030HBA1.clockCorrectionTime = 9.7160576e-06 +PIC.Core.CS030HBA.clockCorrectionTime = 9.7160576e-06 + +PIC.Core.CS031LBA.clockCorrectionTime = 6.471391e-06 +PIC.Core.CS031HBA0.clockCorrectionTime = 6.471391e-06 +PIC.Core.CS031HBA1.clockCorrectionTime = 6.471391e-06 +PIC.Core.CS031HBA.clockCorrectionTime = 6.471391e-06 + +PIC.Core.CS032LBA.clockCorrectionTime = 8.546815e-06 +PIC.Core.CS032HBA0.clockCorrectionTime = 8.546815e-06 +PIC.Core.CS032HBA1.clockCorrectionTime = 8.546815e-06 +PIC.Core.CS032HBA.clockCorrectionTime = 8.546815e-06 + +PIC.Core.CS101LBA.clockCorrectionTime = 1.525453e-05 +PIC.Core.CS101HBA0.clockCorrectionTime = 1.525453e-05 +PIC.Core.CS101HBA1.clockCorrectionTime = 1.525453e-05 +PIC.Core.CS101HBA.clockCorrectionTime = 1.525453e-05 + +PIC.Core.CS103LBA.clockCorrectionTime = 3.560284e-05 +PIC.Core.CS103HBA0.clockCorrectionTime = 3.560284e-05 +PIC.Core.CS103HBA1.clockCorrectionTime = 3.560284e-05 +PIC.Core.CS103HBA.clockCorrectionTime = 3.560284e-05 + +PIC.Core.CS201LBA.clockCorrectionTime = 1.744858e-05 +PIC.Core.CS201HBA0.clockCorrectionTime = 1.744858e-05 +PIC.Core.CS201HBA1.clockCorrectionTime = 1.744858e-05 +PIC.Core.CS201HBA.clockCorrectionTime = 1.744858e-05 + +PIC.Core.CS301LBA.clockCorrectionTime = 7.687733e-06 +PIC.Core.CS301HBA0.clockCorrectionTime = 7.687733e-06 +PIC.Core.CS301HBA1.clockCorrectionTime = 7.687733e-06 +PIC.Core.CS301HBA.clockCorrectionTime = 7.687733e-06 + +PIC.Core.CS302LBA.clockCorrectionTime = 1.494415e-05 +PIC.Core.CS302HBA0.clockCorrectionTime = 1.494415e-05 +PIC.Core.CS302HBA1.clockCorrectionTime = 1.494415e-05 +PIC.Core.CS302HBA.clockCorrectionTime = 1.494415e-05 + PIC.Core.CS401LBA.clockCorrectionTime = 8.051870e-06 PIC.Core.CS401HBA0.clockCorrectionTime = 8.057504e-06 PIC.Core.CS401HBA1.clockCorrectionTime = 8.057770e-06 PIC.Core.CS401HBA.clockCorrectionTime = 8.057637e-06 +PIC.Core.CS501LBA.clockCorrectionTime = 1.65833e-05 +PIC.Core.CS501HBA0.clockCorrectionTime = 1.65833e-05 +PIC.Core.CS501HBA1.clockCorrectionTime = 1.65833e-05 +PIC.Core.CS501HBA.clockCorrectionTime = 1.65833e-05 + # -# Stations outside of the superterp (no correction needed) +# Stations outside of the core (no correction needed) # -PIC.Core.CS001LBA.clockCorrectionTime = 0 -PIC.Core.CS001HBA0.clockCorrectionTime = 0 -PIC.Core.CS001HBA1.clockCorrectionTime = 0 -PIC.Core.CS001HBA.clockCorrectionTime = 0 - -PIC.Core.CS011LBA.clockCorrectionTime = 0 -PIC.Core.CS011HBA.clockCorrectionTime = 0 -PIC.Core.CS011HBA0.clockCorrectionTime = 0 -PIC.Core.CS011HBA1.clockCorrectionTime = 0 - -PIC.Core.CS013LBA.clockCorrectionTime = 0 -PIC.Core.CS013HBA.clockCorrectionTime = 0 -PIC.Core.CS013HBA0.clockCorrectionTime = 0 -PIC.Core.CS013HBA1.clockCorrectionTime = 0 - -PIC.Core.CS017LBA.clockCorrectionTime = 0 -PIC.Core.CS017HBA0.clockCorrectionTime = 0 -PIC.Core.CS017HBA1.clockCorrectionTime = 0 -PIC.Core.CS017HBA.clockCorrectionTime = 0 - -PIC.Core.CS021LBA.clockCorrectionTime = 0 -PIC.Core.CS021HBA.clockCorrectionTime = 0 -PIC.Core.CS021HBA0.clockCorrectionTime = 0 -PIC.Core.CS021HBA1.clockCorrectionTime = 0 - -PIC.Core.CS024LBA.clockCorrectionTime = 0 -PIC.Core.CS024HBA0.clockCorrectionTime = 0 -PIC.Core.CS024HBA1.clockCorrectionTime = 0 -PIC.Core.CS024HBA.clockCorrectionTime = 0 - -PIC.Core.CS026LBA.clockCorrectionTime = 0 -PIC.Core.CS026HBA0.clockCorrectionTime = 0 -PIC.Core.CS026HBA1.clockCorrectionTime = 0 -PIC.Core.CS026HBA.clockCorrectionTime = 0 - -PIC.Core.CS028LBA.clockCorrectionTime = 0 -PIC.Core.CS028HBA.clockCorrectionTime = 0 -PIC.Core.CS028HBA0.clockCorrectionTime = 0 -PIC.Core.CS028HBA1.clockCorrectionTime = 0 - -PIC.Core.CS030LBA.clockCorrectionTime = 0 -PIC.Core.CS030HBA.clockCorrectionTime = 0 -PIC.Core.CS030HBA0.clockCorrectionTime = 0 -PIC.Core.CS030HBA1.clockCorrectionTime = 0 - -PIC.Core.CS031LBA.clockCorrectionTime = 0 -PIC.Core.CS031HBA.clockCorrectionTime = 0 -PIC.Core.CS031HBA0.clockCorrectionTime = 0 -PIC.Core.CS031HBA1.clockCorrectionTime = 0 - -PIC.Core.CS032LBA.clockCorrectionTime = 0 -PIC.Core.CS032HBA0.clockCorrectionTime = 0 -PIC.Core.CS032HBA1.clockCorrectionTime = 0 -PIC.Core.CS032HBA.clockCorrectionTime = 0 - -PIC.Core.CS101LBA.clockCorrectionTime = 0 -PIC.Core.CS101HBA0.clockCorrectionTime = 0 -PIC.Core.CS101HBA1.clockCorrectionTime = 0 -PIC.Core.CS101HBA.clockCorrectionTime = 0 - -PIC.Core.CS103LBA.clockCorrectionTime = 0 -PIC.Core.CS103HBA0.clockCorrectionTime = 0 -PIC.Core.CS103HBA1.clockCorrectionTime = 0 -PIC.Core.CS103HBA.clockCorrectionTime = 0 - -PIC.Core.CS201LBA.clockCorrectionTime = 0 -PIC.Core.CS201HBA0.clockCorrectionTime = 0 -PIC.Core.CS201HBA1.clockCorrectionTime = 0 -PIC.Core.CS201HBA.clockCorrectionTime = 0 - -PIC.Core.CS301LBA.clockCorrectionTime = 0 -PIC.Core.CS301HBA0.clockCorrectionTime = 0 -PIC.Core.CS301HBA1.clockCorrectionTime = 0 -PIC.Core.CS301HBA.clockCorrectionTime = 0 - -PIC.Core.CS302LBA.clockCorrectionTime = 0 -PIC.Core.CS302HBA0.clockCorrectionTime = 0 -PIC.Core.CS302HBA.clockCorrectionTime = 0 -PIC.Core.CS302HBA1.clockCorrectionTime = 0 - -PIC.Core.CS501LBA.clockCorrectionTime = 0 -PIC.Core.CS501HBA0.clockCorrectionTime = 0 -PIC.Core.CS501HBA1.clockCorrectionTime = 0 -PIC.Core.CS501HBA.clockCorrectionTime = 0 - PIC.Core.RS106LBA.clockCorrectionTime = 0 PIC.Core.RS106HBA.clockCorrectionTime = 0 @@ -140,6 +140,9 @@ PIC.Core.RS205HBA.clockCorrectionTime = 0 PIC.Core.RS208LBA.clockCorrectionTime = 0 PIC.Core.RS208HBA.clockCorrectionTime = 0 +PIC.Core.RS305LBA.clockCorrectionTime = 0 +PIC.Core.RS305HBA.clockCorrectionTime = 0 + PIC.Core.RS306LBA.clockCorrectionTime = 0 PIC.Core.RS306HBA.clockCorrectionTime = 0 @@ -303,6 +306,8 @@ PIC.Core.RS205LBA.phaseCenter = [3831438.563, 463435.440, 5061025.466] PIC.Core.RS205HBA.phaseCenter = [3831479.670, 463487.529, 5060989.903] PIC.Core.RS208LBA.phaseCenter = [3847810.051, 466929.706, 5048357.222] PIC.Core.RS208HBA.phaseCenter = [3847753.310, 466962.809, 5048397.244] +PIC.Core.RS305LBA.phaseCenter = [3828720.768, 454781.428, 5063851.101] +PIC.Core.RS305HBA.phaseCenter = [3828732.721, 454692.421, 5063850.334] PIC.Core.RS306LBA.phaseCenter = [3829791.808, 452829.848, 5063221.590] PIC.Core.RS306HBA.phaseCenter = [3829771.249, 452761.702, 5063243.181] PIC.Core.RS307LBA.phaseCenter = [3837940.949, 449560.756, 5057381.288] diff --git a/RTCP/Run/src/RSPConnections.dat b/RTCP/Run/src/RSPConnections.dat index 6c947e96f7b..2db22bcc5a0 100644 --- a/RTCP/Run/src/RSPConnections.dat +++ b/RTCP/Run/src/RSPConnections.dat @@ -103,6 +103,8 @@ RS208 RSP_0 R00-M1-N08-J01 RS210 RSP_0 R00-M0-N14-J01 +RS305 RSP_0 R00-M0-N14-J00 + RS306 RSP_0 R00-M1-N14-J00 RS307 RSP_0 R00-M1-N15-J00 diff --git a/RTCP/Run/src/RTCP.parset b/RTCP/Run/src/RTCP.parset index ddd47f3c915..f5736b4a3ec 100644 --- a/RTCP/Run/src/RTCP.parset +++ b/RTCP/Run/src/RTCP.parset @@ -8,7 +8,7 @@ Observation.Campaign.name = "Development" Observation.Campaign.title = "Development" # ----- Input streams -Observation.VirtualInstrument.stationList = [CS302] +Observation.VirtualInstrument.stationList = [S33] #Observation.antennaSet=LBA_INNER #Observation.antennaSet=LBA_OUTER #Observation.antennaSet=LBA_X @@ -35,7 +35,7 @@ OLAP.nrTimesInFrame = 16 # [ 2*(5*0) ] --> [ 0,0,0,0,0,0,0,0,0,0 ] Observation.subbandList = [100..159] Observation.sampleClock = 200 -OLAP.nrBitsPerSample = 16 +Observation.nrBitsPerSample = 16 # Observation.{beamList,rspBoardList,rspSlotList} are automatically derived from Observation.subbandList #Observation.beamList = [244*0] @@ -65,7 +65,7 @@ Observation.Beam[0].TiedArrayBeam[0].coherent = T #Observation.Beam[0].TiedArrayBeam[2].dispersionMeasure = 1.3 # ----- Output streams -OLAP.Storage.hosts = [locus080] +OLAP.Storage.hosts = [locus095] OLAP.Storage.targetDirectory = /data # will be appended with dirmask and filenammask Observation.DataProducts.Output_Beamformed.enabled = T diff --git a/RTCP/Run/src/locations.sh.in b/RTCP/Run/src/locations.sh.in index c3b571a9664..2f67b87b503 100644 --- a/RTCP/Run/src/locations.sh.in +++ b/RTCP/Run/src/locations.sh.in @@ -28,12 +28,14 @@ then STORAGE_HOME=/data/home/lofartest IONPROC_PARSET="/bghome0/lofarsys/parsets/T$OBSID.parset" + STORAGE_PARSET="/globalhome/lofartest/log/T$OBSID.parset" LOGPARAMS="-s `CEPlogProcessorSettings | awk '/test/ { print $2; }'`" else ISTESTENV=0 STORAGE_HOME=/data/home/lofarsys IONPROC_PARSET="/bghome0/lofarsys/parsets/L$OBSID.parset" + STORAGE_PARSET="/globalhome/lofarsystem/log/L$OBSID.parset" LOGPARAMS="-s `CEPlogProcessorSettings | awk '/production/ { print $2; }'`" fi @@ -42,12 +44,12 @@ then STORAGE=$STORAGE_HOME/production/lofar/bin/Storage_main LOGDIR=/localhome/log - RUNDIR=/globalhome/lofarsystem - LOGBACKUPDIR=/globalhome/lofarsystem/log-archive + RUNDIR=$HOME + LOGBACKUPDIR=$HOME/log-archive EXTRA_KEYS=" OLAP.Storage.userName = lofarsys -OLAP.Storage.sshIdentityFile = /globalhome/lofarsystem/.ssh/id_rsa +OLAP.Storage.sshIdentityFile = /root/.ssh/id_rsa.lofarsys OLAP.Storage.msWriter=$STORAGE OLAP.Storage.AntennaSetsConf = $STORAGE_HOME/production/lofar/etc/AntennaSets.conf OLAP.Storage.AntennaFieldsDir = $STORAGE_HOME/production/lofar/etc/StaticMetaData diff --git a/RTCP/Run/src/startBGL.sh b/RTCP/Run/src/startBGL.sh index cf291b7ae5f..1471af1d1f5 100755 --- a/RTCP/Run/src/startBGL.sh +++ b/RTCP/Run/src/startBGL.sh @@ -25,8 +25,6 @@ date echo starting obs $OBSID echo "---------------" -STORAGE_PARSET=/opt/lofar/var/log/L$OBSID.parset - # Convert keys where needed /opt/lofar/bin/LOFAR/Parset.py -P $PARTITION $PARSET /opt/lofar/etc/OLAP.parset <(echo "$EXTRA_KEYS") > $IONPROC_PARSET && diff --git a/RTCP/Storage/include/Storage/InputThread.h b/RTCP/Storage/include/Storage/InputThread.h index 84bddd008d7..587084b61e3 100644 --- a/RTCP/Storage/include/Storage/InputThread.h +++ b/RTCP/Storage/include/Storage/InputThread.h @@ -53,6 +53,7 @@ class InputThread const std::string itsLogPrefix, itsInputDescriptor; Queue<SmartPtr<StreamableData> > &itsFreeQueue, &itsReceiveQueue; SmartPtr<Thread> itsThread; + const double itsDeadline; }; diff --git a/RTCP/Storage/src/InputThread.cc b/RTCP/Storage/src/InputThread.cc index 99b93758021..dd3bd93e2b3 100644 --- a/RTCP/Storage/src/InputThread.cc +++ b/RTCP/Storage/src/InputThread.cc @@ -39,7 +39,8 @@ InputThread::InputThread(const Parset &parset, OutputType outputType, unsigned s itsLogPrefix(logPrefix + "[InputThread] "), itsInputDescriptor(getStreamDescriptorBetweenIONandStorage(parset, outputType, streamNr)), itsFreeQueue(freeQueue), - itsReceiveQueue(receiveQueue) + itsReceiveQueue(receiveQueue), + itsDeadline(parset.stopTime()) { } @@ -61,7 +62,7 @@ void InputThread::mainLoop() { try { LOG_INFO_STR(itsLogPrefix << "Creating connection from " << itsInputDescriptor << "..." ); - SmartPtr<Stream> streamFromION(createStream(itsInputDescriptor, true)); + SmartPtr<Stream> streamFromION(createStream(itsInputDescriptor, true, itsDeadline)); LOG_INFO_STR(itsLogPrefix << "Creating connection from " << itsInputDescriptor << ": done" ); // limit reads from NullStream to 10 blocks; otherwise unlimited diff --git a/RTCP/Storage/src/MSWriterDAL.cc b/RTCP/Storage/src/MSWriterDAL.cc index f9130c7c87f..4df1bdcf028 100644 --- a/RTCP/Storage/src/MSWriterDAL.cc +++ b/RTCP/Storage/src/MSWriterDAL.cc @@ -258,7 +258,9 @@ namespace LOFAR sap.expTimeEndUTC().value = toUTC(stopTime); sap.expTimeEndMJD().value = toMJD(stopTime); - sap.totalIntegrationTime().value = parset.beamDuration(sapNr); + // TODO: fix the system to use the parset.beamDuration(sapNr), but OLAP + // does not work that way yet (beamDuration is currently unsupported). + sap.totalIntegrationTime().value = nrBlocks * parset.CNintegrationTime(); sap.totalIntegrationTimeUnit().value = "s"; // TODO: non-J2000 pointings diff --git a/RTCP/Storage/src/Storage_main.cc b/RTCP/Storage/src/Storage_main.cc index 76843114fe8..7d297c13b07 100644 --- a/RTCP/Storage/src/Storage_main.cc +++ b/RTCP/Storage/src/Storage_main.cc @@ -32,6 +32,8 @@ #include <unistd.h> #include <cstdio> #include <cstdlib> +#include <cstring> +#include <libgen.h> #include <stdexcept> #include <string> @@ -116,13 +118,17 @@ char stdoutbuf[1024], stderrbuf[1024]; int main(int argc, char *argv[]) { #if defined HAVE_LOG4CPLUS - INIT_LOGGER(string(getenv("LOFARROOT") ? : ".") + "/etc/Storage_main.log_prop"); + char *dirc = strdup(argv[0]); + + INIT_LOGGER(string(getenv("LOFARROOT") ? : dirname(dirc)) + "/../etc/Storage_main.log_prop"); + + free(dirc); #elif defined HAVE_LOG4CXX #error LOG4CXX support is broken (nonsensical?) -- please fix this code if you want to use it Context::initialize(); setLevel("Global",8); #else - INIT_LOGGER_WITH_SYSINFO(str(boost::format("Storage@%02d") % (argc > 1 ? atoi(argv[1]) : -1))); + INIT_LOGGER_WITH_SYSINFO(str(boost::format("Storage@%02d") % (argc > 2 ? atoi(argv[2]) : -1))); #endif CasaLogSink::attach(); diff --git a/RTCP/Storage/src/TBB_Writer_main.cc b/RTCP/Storage/src/TBB_Writer_main.cc index 2cc1e72f66c..a7dc45e498c 100644 --- a/RTCP/Storage/src/TBB_Writer_main.cc +++ b/RTCP/Storage/src/TBB_Writer_main.cc @@ -39,6 +39,7 @@ #include <csignal> #include <cstring> #include <cerrno> +#include <libgen.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/time.h> @@ -449,7 +450,11 @@ int main(int argc, char* argv[]) { setvbuf(stderr, stderrbuf, _IOLBF, sizeof stderrbuf); #if defined HAVE_LOG4CPLUS - INIT_LOGGER(string(getenv("LOFARROOT") ? : ".") + "/etc/Storage_main.log_prop"); + char *dirc = strdup(argv[0]); + + INIT_LOGGER(string(getenv("LOFARROOT") ? : dirname(dirc)) + "/../etc/TBB_Writer_main.log_prop"); + + free(dirc); #endif if ((err = parseArgs(argc, argv, &args)) != 0) { diff --git a/RTCP/Storage/src/TBB_Writer_main.log_prop b/RTCP/Storage/src/TBB_Writer_main.log_prop new file mode 100644 index 00000000000..3d46179d269 --- /dev/null +++ b/RTCP/Storage/src/TBB_Writer_main.log_prop @@ -0,0 +1,29 @@ + +# Configure the loggers +log4cplus.rootLogger=INFO, STDOUT +log4cplus.logger.TRC=INFO + +# prevent debug messages: accept >=WARN only, and don't forward messages to the rootLogger +log4cplus.logger.LCS.ApplCommon=WARN, STDOUT +log4cplus.additivity.LCS.ApplCommon=false +log4cplus.logger.LCS.MSLofar=WARN, STDOUT +log4cplus.additivity.LCS.MSLofar=false + +# Define the appenders +log4cplus.appender.STDOUT=log4cplus::ConsoleAppender +log4cplus.appender.STDOUT.layout=log4cplus::PatternLayout +log4cplus.appender.STDOUT.layout.ConversionPattern=%x %D{%d-%m-%y %H:%M:%S.%q} %-5p %m%n + +#log4cplus.appender.STDERR=log4cplus::ConsoleAppender +#log4cplus.appender.STDERR.layout=log4cplus::PatternLayout +#log4cplus.appender.STDERR.layout.ConversionPattern=%x %D{%d-%m-%y %H:%M:%S.%q} %-5p %c{3} - %m [%.25l]%n +#log4cplus.appender.STDERR.logToStdErr=true + +#log4cplus.appender.FILE=log4cplus::RollingFileAppender +#log4cplus.appender.FILE.File=${LOG4CPLUS_LOGFILENAME}.log +#log4cplus.appender.FILE.MaxFileSize=10MB +#log4cplus.appender.FILE.MaxBackupIndex=2 +#log4cplus.appender.FILE.layout=log4cplus::PatternLayout +#log4cplus.appender.FILE.layout.ConversionPattern=%x %D{%d-%m-%y %H:%M:%S.%q} %-5p %c{3} - %m [%.25l]%n + +log4cplus.appender.DUMP=log4cplus::NullAppender diff --git a/RTCP/Storage/test/tMSWriterDAL.parset b/RTCP/Storage/test/tMSWriterDAL.parset index d01a79579b6..9c742a90315 100644 --- a/RTCP/Storage/test/tMSWriterDAL.parset +++ b/RTCP/Storage/test/tMSWriterDAL.parset @@ -47,7 +47,7 @@ OLAP.correctClocks = T OLAP.delayCompensation = T OLAP.dispersionMeasure = 0 OLAP.maxNetworkDelay = 0.5 -OLAP.nrBitsPerSample = 16 +Observation.nrBitsPerSample = 16 OLAP.nrPsets = 4 OLAP.nrSecondsOfBuffer = 2.5 OLAP.nrTimesInFrame = 16 diff --git a/RTCP/Storage/test/tMeasurementSetFormat.parset-j2000 b/RTCP/Storage/test/tMeasurementSetFormat.parset-j2000 index 4b18640835c..d006e100dce 100644 --- a/RTCP/Storage/test/tMeasurementSetFormat.parset-j2000 +++ b/RTCP/Storage/test/tMeasurementSetFormat.parset-j2000 @@ -92,7 +92,7 @@ OLAP.correctClocks = T OLAP.delayCompensation = true OLAP.dispersionMeasure = 0 OLAP.maxNetworkDelay = 0.25 -OLAP.nrBitsPerSample = 16 +Observation.nrBitsPerSample = 16 OLAP.nrPencils = 1 OLAP.nrPsets = 64 OLAP.nrSecondsOfBuffer = 2.5 @@ -227,7 +227,7 @@ Observation.ObservationControl.OnlineControl.OLAP.StorageProc.subbandsPerMS = 1 Observation.ObservationControl.OnlineControl.OLAP.correctBandPass = true Observation.ObservationControl.OnlineControl.OLAP.delayCompensation = true Observation.ObservationControl.OnlineControl.OLAP.maxNetworkDelay = 0.25 -Observation.ObservationControl.OnlineControl.OLAP.nrBitsPerSample = 16 +Observation.ObservationControl.OnlineControl.Observation.nrBitsPerSample = 16 Observation.ObservationControl.OnlineControl.OLAP.nrPencils = 1 Observation.ObservationControl.OnlineControl.OLAP.nrSecondsOfBuffer = 2.5 Observation.ObservationControl.OnlineControl.OLAP.nrSubbandsPerFrame = 61 diff --git a/RTCP/Storage/test/tMeasurementSetFormat.parset-sun b/RTCP/Storage/test/tMeasurementSetFormat.parset-sun index 8e8bd1da6cb..68f04a45b1e 100644 --- a/RTCP/Storage/test/tMeasurementSetFormat.parset-sun +++ b/RTCP/Storage/test/tMeasurementSetFormat.parset-sun @@ -92,7 +92,7 @@ OLAP.correctClocks = T OLAP.delayCompensation = true OLAP.dispersionMeasure = 0 OLAP.maxNetworkDelay = 0.25 -OLAP.nrBitsPerSample = 16 +Observation.nrBitsPerSample = 16 OLAP.nrPencils = 1 OLAP.nrPsets = 64 OLAP.nrSecondsOfBuffer = 2.5 @@ -227,7 +227,7 @@ Observation.ObservationControl.OnlineControl.OLAP.StorageProc.subbandsPerMS = 1 Observation.ObservationControl.OnlineControl.OLAP.correctBandPass = true Observation.ObservationControl.OnlineControl.OLAP.delayCompensation = true Observation.ObservationControl.OnlineControl.OLAP.maxNetworkDelay = 0.25 -Observation.ObservationControl.OnlineControl.OLAP.nrBitsPerSample = 16 +Observation.ObservationControl.OnlineControl.Observation.nrBitsPerSample = 16 Observation.ObservationControl.OnlineControl.OLAP.nrPencils = 1 Observation.ObservationControl.OnlineControl.OLAP.nrSecondsOfBuffer = 2.5 Observation.ObservationControl.OnlineControl.OLAP.nrSubbandsPerFrame = 61 diff --git a/RTCP/Storage/test/tTBB_Writer.parset b/RTCP/Storage/test/tTBB_Writer.parset index 8752001f41a..243271c2648 100644 --- a/RTCP/Storage/test/tTBB_Writer.parset +++ b/RTCP/Storage/test/tTBB_Writer.parset @@ -73,7 +73,7 @@ OLAP.correctClocks = T OLAP.delayCompensation = true OLAP.dispersionMeasure = 0 OLAP.maxNetworkDelay = 0.25 -OLAP.nrBitsPerSample = 16 +Observation.nrBitsPerSample = 16 OLAP.nrPsets = 64 OLAP.nrSecondsOfBuffer = 2.5 OLAP.nrSubbandsPerFrame = 61 @@ -370,7 +370,7 @@ Observation.ObservationControl.OnlineControl.OLAP.coherentDedisperseChannels = f Observation.ObservationControl.OnlineControl.OLAP.correctBandPass = true Observation.ObservationControl.OnlineControl.OLAP.delayCompensation = true Observation.ObservationControl.OnlineControl.OLAP.maxNetworkDelay = 0.25 -Observation.ObservationControl.OnlineControl.OLAP.nrBitsPerSample = 16 +Observation.ObservationControl.OnlineControl.Observation.nrBitsPerSample = 16 Observation.ObservationControl.OnlineControl.OLAP.nrSecondsOfBuffer = 2.5 Observation.ObservationControl.OnlineControl.OLAP.nrSubbandsPerFrame = 61 Observation.ObservationControl.OnlineControl.OLAP.nrTimesInFrame = 16 diff --git a/SAS/Beaminfo/CMakeLists.txt b/SAS/Beaminfo/CMakeLists.txt index bf0a8a6f761..c5ff1b776f0 100644 --- a/SAS/Beaminfo/CMakeLists.txt +++ b/SAS/Beaminfo/CMakeLists.txt @@ -1,11 +1,10 @@ # $Id: CMakeLists.txt 16887 2011-09-20 10:46:43Z duscha $ -lofar_package(Beaminfo 0.1 DEPENDS Common ApplCommon MSLofar OTDB) +lofar_package(Beaminfo 0.1 DEPENDS Common ApplCommon OTDB) include(LofarFindPackage) -lofar_find_package(Casacore COMPONENTS casa ms tables REQUIRED) lofar_find_package(Boost COMPONENTS date_time REQUIRED) -add_subdirectory(include/Beaminfo) +#add_subdirectory(include/Beaminfo) add_subdirectory(src) add_subdirectory(test) diff --git a/SAS/Beaminfo/src/CMakeLists.txt b/SAS/Beaminfo/src/CMakeLists.txt index 0b761afc650..f8f70b55cfa 100644 --- a/SAS/Beaminfo/src/CMakeLists.txt +++ b/SAS/Beaminfo/src/CMakeLists.txt @@ -3,21 +3,8 @@ include(LofarPackageVersion) #include(PythonInstall) -set(beaminfo_LIB_SRCS - FailedTileInfo -) - -#set(beaminfo_PROGRAMS -# failedtilesinfo -# failedtiles2ms -#) - -#lofar_add_library(beaminfo ${beaminfo_LIB_SRCS}) - lofar_add_bin_program(failedtilesinfo failedtilesinfo.cc) -lofar_add_bin_program(failedtiles2ms failedtiles2ms.cc FailedTileInfo.cc) -#install(PROGRAMS -# failedtilesinfo -# failedtiles2ms -#DESTINATION bin) +install(PROGRAMS + failedtilesinfo +DESTINATION bin) diff --git a/SAS/Beaminfo/src/FailedTileInfo.cc b/SAS/Beaminfo/src/FailedTileInfo.cc index 87aac6c25a7..7ae878dc5ca 100644 --- a/SAS/Beaminfo/src/FailedTileInfo.cc +++ b/SAS/Beaminfo/src/FailedTileInfo.cc @@ -162,7 +162,7 @@ namespace LOFAR { flagCol.put (row, flags); } // Now loop through all entries for the tiles broken during the obs. - // Add them to vectors if its flag is not set yet. + // Add to a vector if its flag is not set yet. for (FailedTileInfo::VectorFailed::const_iterator iter = brokenDuring[antId].begin(); iter != brokenDuring[antId].end(); ++iter) { diff --git a/SAS/Beaminfo/src/failedtilesinfo.cc b/SAS/Beaminfo/src/failedtilesinfo.cc index 0cf53b1d5c9..4e5750ec447 100644 --- a/SAS/Beaminfo/src/failedtilesinfo.cc +++ b/SAS/Beaminfo/src/failedtilesinfo.cc @@ -27,8 +27,8 @@ #include <Common/ParameterSet.h> #include <Common/LofarLogger.h> #include <Common/SystemUtil.h> // needed for basename +#include <Common/StringUtil.h> // needed for split #include <Common/Exception.h> // THROW macro for exceptions -#include <ApplCommon/LofarDirs.h> // SAS #include <OTDB/OTDBconstants.h> @@ -56,241 +56,164 @@ using namespace casa; Exception::TerminateHandler t(Exception::terminate); // Time converter helper functions -string fromCasaTime (const MEpoch& epoch, double addDays); -MVEpoch toCasaTime(const string &time); -bool checkTime(const MVEpoch &starttime, const MVEpoch &endtime); +MVEpoch toCasaTime (const string& time); +string fromCasaTime (const MVEpoch& epoch); -void getFailedTilesInfo(OTDBconnection &conn, - const string &filename, - const MVEpoch &timeStart, - const MVEpoch &timeEnd=0); -string stripRCUString(const string &brokenHardware); +// Get the failed tile info before the given date (if end=0) +// or between the dates. +void getFailedTilesInfo(OTDBconnection& conn, + const string& filename, + const string& timeStart, + const string& timeEnd=string()); -//---------------------------------------------------------------------------------- -void usage(char *programname) -{ - cout << "Usage: " << programname << " <options>" << endl; - cout << "-d run in debug mode" << endl; - cout << "-p <filename> read parset (instead of default: failedtilesinfo.parset)" << endl; - cout << "-s <time> start time of observation in MS like 3-Mar-2011/13:54:23"<< endl; - cout << "-e <time> end time of observation in MS"<< endl; - cout << "-v turn on verbose mode" << endl; - cout << "-h show this help info" << endl; - - exit(0); -} - -// These two flags are global so that every function can act accordingly -bool debug=false; // debug mode -bool verbose=false; // verbose mode int main (int argc, char* argv[]) { - int opt=0; // argument parsing, current option - vector<MEpoch> failingTimes; - - string parsetName="failedtilesinfo.parset"; // parset location (default) - string starttimeString, endtimeString; // strings to get start and end time - MVEpoch startTime, endTime; // starttime and endtime of observation - - //--------------------------------------------- // Init logger string progName = LOFAR::basename(argv[0]); INIT_LOGGER(progName); - - // Parse command line arguments TODO! - while(opt != -1) - { - opt = getopt( argc, argv, "dp:s:e:vh"); - switch(opt) - { - case 'd': - debug=true; - break; - case 'p': // location of parset file - parsetName=optarg; - break; - case 's': // start time - starttimeString=optarg; - case 'e': // end time - endtimeString=optarg; - case 'v': // turn on verbose display of messages - verbose=true; - break; - case 'h': - usage(argv[0]); - break; - case ':': - cout << "Option " << opt << " is missing an argument" << endl; - usage(argv[0]); - break; - default: - break; - } - } - - // Parse parset entries - try - { - if(verbose) - { - LOG_INFO_STR("Reading parset: " << parsetName); + try { + // Get the parset name; use default if not given as first argument. + string parsetName = "failedtilesinfo.parset"; + if (argc > 1) { + parsetName = argv[1]; } - - //--------------------------------------------------------------------- ParameterSet parset(parsetName); - //string host = parset.getString("host", "sas.control.lofar.eu"); // production - string host = parset.getString("host", "RS005.astron.nl"); // DEBUG - string db = parset.getString("db", "TESTLOFAR_3"); + // Get the parameters. + ///string host = parset.getString("host", "sas.control.lofar.eu"); + string host = parset.getString("host", "RS005.astron.nl"); + string db = parset.getString("db", "TESTLOFAR_4"); string user = parset.getString("user", "paulus"); string password = parset.getString("password", "boskabouter"); string port = parset.getString("port", "5432"); - // Locations to save SAS hardware strings of broken and failed tiles to - string failedfilename = parset.getString("failedTilesFile", LOFAR_SHARE_LOCATION "/failedTiles.txt"); - string brokenfilename = parset.getString("brokenTilesFile", LOFAR_SHARE_LOCATION "/brokenTiles.txt"); - - //--------------------------------------------------------------------- - // Handle observation starttime and endtime - if(starttimeString.empty()) // if we didn't get the start time from the command arguments - { - starttimeString = parset.getString("StartTime", ""); - } - if(endtimeString.empty()) // if we didn't get the end time from the command arguments - { - endtimeString = parset.getString("EndTime", ""); - } - startTime=toCasaTime(starttimeString); - endTime=toCasaTime(endtimeString); - if(checkTime(startTime, endTime) != true) - { - THROW(Exception, "starttime >= endtime: " << starttimeString << " >= " << endtimeString); + // Files to save SAS hardware strings of broken and failed tiles. + // Failed means tiles failing during the observations. + // Broken means tiles already broken at the start of the observation. + string failedfilename = parset.getString("FailedTilesFile", + "failedTiles.txt"); + string brokenfilename = parset.getString("BrokenTilesFile", + "brokenTiles.txt"); + string startTimeString = parset.getString("StartTime", ""); + string endTimeString = parset.getString("EndTime", ""); + ASSERT (!(failedfilename.empty() || brokenfilename.empty())); + ASSERT (!(startTimeString.empty() || endTimeString.empty())); + MVEpoch startTime = toCasaTime(startTimeString); + MVEpoch endTime = toCasaTime(endTimeString); + if (startTime.get() > endTime.get()) { + THROW(Exception, "starttime " << startTimeString + << " must be <= end time " << endTimeString); } + // Convert to time format (ISO) that Boost understands. + startTimeString = fromCasaTime(startTime); + endTimeString = fromCasaTime(endTime); - LOG_INFO_STR("Getting SAS antenna health information"); + LOG_DEBUG_STR("Getting SAS antenna health information"); OTDBconnection conn(user, password, db, host, port); - LOG_INFO("Trying to connect to the database"); + LOG_DEBUG("Trying to connect to the database"); ASSERTSTR(conn.connect(), "Connnection failed"); - LOG_INFO_STR("Connection succesful: " << conn); - + LOG_DEBUG_STR("Connection succesful: " << conn); // Get broken hardware strings from SAS - getFailedTilesInfo(conn, brokenfilename, startTime); - getFailedTilesInfo(conn, failedfilename, startTime, endTime); - } - catch (Exception& x) - { + getFailedTilesInfo (conn, brokenfilename, startTimeString); + getFailedTilesInfo (conn, failedfilename, startTimeString, endTimeString); + + } catch (Exception& x) { LOG_FATAL_STR("Unexpected exception: " << x); return 1; } - - LOG_INFO_STR ("Terminated succesfully: " << argv[0]); return 0; } -/*! - \brief Convert casa epoch to posix time - \param epoch casa epoch - \param addDays add days (default=0) - \return dateTime string with date and time in the format ("YYYY-MM-DD HH:MM:SS") -*/ -string fromCasaTime (const MVEpoch& epoch, double addDays=0) -{ - MVTime t (epoch.get() + addDays); - return t.getTime().ISODate(); -} - -// Convert a time string time YYYY-Mon-DD TT:MM:SS.ss to a CASA MVEpoch -MVEpoch toCasaTime(const string &time) +// Convert a casacore time string time YYYY-Mon-DD TT:MM:SS.ss to an MVEpoch +MVEpoch toCasaTime (const string& time) { // e.g. 2011-Mar-19 21:17:06.514000 - Double casaTime; // casa MVEpoch time to be returned + Double casaTime; // casacore MVEpoch time to be returned Quantity result(casaTime, "s"); // set quantity unit to seconds - ASSERT(!time.empty()); MVTime::read(result, time); - return result; } -bool checkTime(const MVEpoch &starttimeCasa, const MVEpoch &endtimeCasa) +string fromCasaTime (const MVEpoch& epoch) { - return(starttimeCasa.get() < endtimeCasa.get()); + MVTime t (epoch.get()); + return t.getTime().ISODate(); } + // Get information about broken tiles from SAS database and store it in // an ASCII text file -// -void getFailedTilesInfo(OTDBconnection &conn, - const string &filename, - const MVEpoch &timeStart, - const MVEpoch &timeEnd) +void getFailedTilesInfo (OTDBconnection& conn, + const string& filename, + const string& timeStart, + const string& timeEnd) { - ASSERT(!filename.empty()); - + // Get OTDB info. TreeTypeConv TTconv(&conn); // TreeType converter object - ClassifConv CTconv(&conn); // converter I don't know - vector<OTDBvalue> valueList; // OTDB value list for the previous month - + ClassifConv CTconv(&conn); // converter + vector<OTDBvalue> valueList; // OTDB value list + vector<OTDBtree> treeList = conn.getTreeList(TTconv.get("hardware"), + CTconv.get("operational")); + ASSERTSTR(treeList.size(), "No hardware tree found, run tPICtree first"); + treeIDType treeID = treeList[treeList.size()-1].treeID(); + LOG_DEBUG_STR ("Using tree " << treeID); + OTDBtree treeInfo = conn.getTreeInfo(treeID); + LOG_DEBUG_STR(treeInfo); + LOG_DEBUG("Constructing a TreeValue object"); + TreeValue tv(&conn, treeID); + // Create the output file. fstream outfile; - outfile.open(filename.c_str(), ios::out); // this shows the correct behaviour of overwriting the file + outfile.open(filename.c_str(), ios::out); // Get list of all broken hardware from SAS for timestamp - LOG_INFO("Searching for a Hardware tree"); - vector<OTDBtree> treeList = conn.getTreeList(TTconv.get("hardware"), CTconv.get("operational")); - // showTreeList(treeList); - ASSERTSTR(treeList.size(),"No hardware tree found, run tPICtree first"); - treeIDType treeID = treeList[treeList.size()-1].treeID(); - LOG_INFO_STR ("Using tree " << treeID << " for the tests"); - OTDBtree treeInfo = conn.getTreeInfo(treeID); - LOG_INFO_STR(treeInfo); - LOG_INFO("Trying to construct a TreeValue object"); - TreeValue tv(&conn, treeID); - - if(timeEnd==0) // getting tiles broken at beginning - { - valueList = tv.getBrokenHardware(time_from_string(fromCasaTime(timeStart))); - } - else // getting tiles failed during observation - { - LOG_INFO_STR("Getting failed hardware from " << MVTime(timeStart.get()).getTime().ISODate() - << " to " << MVTime(timeEnd.get()).getTime().ISODate()); - valueList = tv.getFailedHardware(time_from_string(fromCasaTime(timeStart)), - time_from_string(fromCasaTime(timeEnd))); + LOG_DEBUG("Searching for a Hardware tree"); + + if (timeEnd.empty()) { + // Getting tiles broken at beginning. + valueList = tv.getBrokenHardware (time_from_string(timeStart)); + } else { + // Getting tiles failed during observation. + LOG_INFO_STR ("Getting failed hardware from " + << timeStart << " to " << timeEnd); + valueList = tv.getBrokenHardware (time_from_string(timeStart), + time_from_string(timeEnd)); } - if(valueList.empty()) - { - LOG_INFO_STR("No failed hardware found."); - } - else - { - // Now write entry in valuelist with broken hardware to file - for(unsigned int i=0; i<valueList.size(); i++) - { - if(valueList[i].name.find("RCU")!=string::npos) // Only write lines that contain RCU - { - outfile << stripRCUString(valueList[i].name) << "\t" << valueList[i].time << endl; - } - } + if (valueList.empty()) { + LOG_INFO_STR ("No failed hardware found."); + } else { + // Write entry in valuelist with broken hardware to file. + // A broken antenna element/tile entry must contain .status_state + int nrtile = 0; + int nrrcu = 0; + for (unsigned int i=0; i<valueList.size(); i++) { + if (valueList[i].name.find(".status_state") != string::npos) { + vector<string> parts = StringUtil::split (valueList[i].name, '.'); + bool match = false; + if (parts.size() > 4 && parts[4].size() > 3) { + // parts[3] is station name; parts[4] is tile name/number + string type = parts[4].substr(0,3); + if (type == "LBA" || type == "HBA") { + outfile << parts[3] + ' ' + parts[4] << ' ' + << valueList[i].time << endl; + nrtile++; + match = true; + } + } + if (!match && parts.size() > 7 && parts[7].size() > 3) { + // parts[3] is station name; parts[7] is RCU name/number + string type = parts[7].substr(0,3); + if (type == "RCU") { + outfile << parts[3] + ' ' + parts[7] << ' ' + << valueList[i].time << endl; + nrrcu++; + } + } + } + } + LOG_INFO_STR ("Found " << nrtile << " broken tiles and " + << nrrcu << " broken rcus"); } outfile.close(); } - -// Strip the RCU string in broken hardware of unnecessary information -string stripRCUString(const string &brokenHardware) -{ - string stripped; // stripped broken hardware line - vector<string> tokens; - - typedef boost::tokenizer<boost::char_separator<char> > tokenizer; - boost::char_separator<char> sep("."); - tokenizer tok(brokenHardware, sep); - - for(tokenizer::iterator beg=tok.begin(); beg!=tok.end();++beg) - { - tokens.push_back(*beg); - } - stripped=tokens[3].append(".").append(tokens[7]).append("."); - - return stripped; -} diff --git a/SAS/Beaminfo/test/CMakeLists.txt b/SAS/Beaminfo/test/CMakeLists.txt index ce0c68cf2b2..050a537718b 100644 --- a/SAS/Beaminfo/test/CMakeLists.txt +++ b/SAS/Beaminfo/test/CMakeLists.txt @@ -2,21 +2,4 @@ include(LofarCTest) -# Create symbolic links to scripts used by the tmakems test program. -get_target_property(_loc getparsetvalue LOCATION) -execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink - ${_loc} - ${CMAKE_CURRENT_BINARY_DIR}/getparsetvalue) -get_target_property(_loc finddproc LOCATION) -execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink - ${_loc} - ${CMAKE_CURRENT_BINARY_DIR}/finddproc) -execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink - ${LMWCommon_SOURCE_DIR}/src/startdistproc - ${CMAKE_CURRENT_BINARY_DIR}/startdistproc) -execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink - ${LMWCommon_SOURCE_DIR}/src/socketrun - ${CMAKE_CURRENT_BINARY_DIR}/socketrun) - -#lofar_add_test(tMSSplit tMSSplit.cc) -#lofar_add_test(tcombinevds DEPENDS combinevds) +lofar_add_test(tfailedtilesinfo) diff --git a/SAS/Beaminfo/test/failedtilesinfo.parset b/SAS/Beaminfo/test/failedtilesinfo.parset index 5344347aa63..23680953946 100644 --- a/SAS/Beaminfo/test/failedtilesinfo.parset +++ b/SAS/Beaminfo/test/failedtilesinfo.parset @@ -1,9 +1,7 @@ -#ms = /Users/duscha/Cluster/L2011_24380/L24380_SB030_uv.MS.dppp.dppp -ms = /tmp/joined.MS StartTime = 2011/05/15/16:59:08.0 EndTime = 2011/05/21/22:59:06.0 -# brokenTilesFile = -# failedTilesFile = +BrokenTilesFile = brokenTilesFile +FailedTilesFile = failedTilesFile +host = RS005.astron.nl +db = TESTLOFAR_4 port = 5432 -overwrite = T - diff --git a/SAS/Beaminfo/test/tfailedtilesinfo.run b/SAS/Beaminfo/test/tfailedtilesinfo.run new file mode 100755 index 00000000000..364091d176a --- /dev/null +++ b/SAS/Beaminfo/test/tfailedtilesinfo.run @@ -0,0 +1,26 @@ +#!/bin/sh + +# Exit with skipped status if unable to reach RS005. +ping -c 1 RS005.astron.nl > /dev/null 2>&1 || exit 3 + +# Create the parset for this test. +# The start and end times have to match those in the SAS data base. +cat > tfailedtilesinfo_tmp.parset <<EOF +StartTime = 2011/05/15/16:59:08.0 +EndTime = 2012/10/21/22:59:06.0 +BrokenTilesFile = tfailedtilesinfo_tmp.before +FailedTilesFile = tfailedtilesinfo_tmp.during +host = RS005.astron.nl +db = TESTLOFAR_4 +port = 5432 +EOF + +# Get the failed tile info. +../src/failedtilesinfo tfailedtilesinfo_tmp.parset + +# Print the output, so it will be compared by assay. +echo "Failed before:" +cat tfailedtilesinfo_tmp.before +echo +echo "Failed during:" +cat tfailedtilesinfo_tmp.during diff --git a/SAS/Beaminfo/test/tfailedtilesinfo.sh b/SAS/Beaminfo/test/tfailedtilesinfo.sh new file mode 100755 index 00000000000..d5a38db60d6 --- /dev/null +++ b/SAS/Beaminfo/test/tfailedtilesinfo.sh @@ -0,0 +1,2 @@ +#!/bin/sh +./runctest.sh tfailedtilesinfo 2>&1 > tfailedtilesinfo.log diff --git a/SAS/Beaminfo/test/tfailedtilesinfo.stdout b/SAS/Beaminfo/test/tfailedtilesinfo.stdout new file mode 100644 index 00000000000..25fe487c72d --- /dev/null +++ b/SAS/Beaminfo/test/tfailedtilesinfo.stdout @@ -0,0 +1,29 @@ +Failed before: +CS013.RCU86. 2011-Mar-04 09:56:05.496000 +CS026.RCU58. 2011-Mar-04 09:55:54.096000 +CS026.RCU59. 2011-Mar-04 09:56:05.496000 +CS026.RCU69. 2011-Mar-04 09:55:34.239000 +RS208.RCU53. 2011-Mar-04 12:16:54.317000 +RS208.RCU54. 2011-Mar-04 12:17:06.514000 +RS208.RCU59. 2011-Mar-04 11:08:15.719000 +RS208.RCU60. 2011-Mar-04 11:08:27.322000 +RS208.RCU67. 2011-Mar-04 12:18:17.987000 +RS208.RCU68. 2011-Mar-04 12:18:29.275000 +RS503.RCU55. 2011-Mar-04 12:00:36.614000 +RS503.RCU56. 2011-Mar-04 12:01:25.298000 +RS503.RCU57. 2011-Mar-04 12:24:49.665000 +RS503.RCU58. 2011-Mar-04 12:01:37.782000 +RS503.RCU65. 2011-Mar-04 12:01:51.709000 +RS503.RCU66. 2011-Mar-04 12:01:59.900000 +RS503.RCU79. 2011-Mar-04 12:25:22.066000 +RS503.RCU80. 2011-Mar-04 12:02:53.574000 +RS503.RCU85. 2011-Mar-04 12:02:25.409000 +RS503.RCU86. 2011-Mar-04 12:25:57.172000 +RS503.RCU95. 2011-Mar-04 12:03:44.517000 + +Failed during: +CS003.RCU94. 2011-May-19 21:33:33.010000 +RS106.RCU18. 2011-May-19 22:59:05.500000 +CS101.RCU66. 2011-May-20 10:00:05 +RS106.RCU0. 2011-May-20 10:00:05 +CS001.RCU0. 2011-May-20 17:24:56.115000 diff --git a/SAS/OTB/OTB-distribution/assembly.xml b/SAS/OTB/OTB-distribution/assembly.xml index 65edb36671a..100415d7b46 100644 --- a/SAS/OTB/OTB-distribution/assembly.xml +++ b/SAS/OTB/OTB-distribution/assembly.xml @@ -1,33 +1,33 @@ -<assembly - xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> - - <id>distribution</id> - - <formats> - <format>tar.gz</format> - </formats> - - <fileSets> - - <fileSet> - <directory>${project.build.directory}/dependency/jOTDB3-1.0.1-SNAPSHOT</directory> - <outputDirectory>server</outputDirectory> - <includes> - <include>**/*</include> - </includes> - </fileSet> - - <fileSet> - <directory>${project.build.directory}/dependency/OTB-1.0.1-SNAPSHOT</directory> - <outputDirectory>client</outputDirectory> - <includes> - <include>**/*</include> - </includes> - </fileSet> - - </fileSets> - - +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> + + <id>distribution</id> + + <formats> + <format>tar.gz</format> + </formats> + + <fileSets> + + <fileSet> + <directory>${project.build.directory}/dependency/jOTDB3-${project.version}</directory> + <outputDirectory>server</outputDirectory> + <includes> + <include>**/*</include> + </includes> + </fileSet> + + <fileSet> + <directory>${project.build.directory}/dependency/OTB-${project.version}</directory> + <outputDirectory>client</outputDirectory> + <includes> + <include>**/*</include> + </includes> + </fileSet> + + </fileSets> + + </assembly> \ No newline at end of file diff --git a/SAS/OTB/OTB-distribution/pom.xml b/SAS/OTB/OTB-distribution/pom.xml index 9cbaf8f7831..ef7035b7c16 100644 --- a/SAS/OTB/OTB-distribution/pom.xml +++ b/SAS/OTB/OTB-distribution/pom.xml @@ -1,91 +1,102 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - <name>Object Tree Browser Client/Server - distribution</name> - <packaging>pom</packaging> - - <groupId>nl.astron.lofar.sas</groupId> - <artifactId>OTB-distribution</artifactId> - <version>0.96-SNAPSHOT</version> - - <organization> - <name>Astron</name> - <url>http://www.astron.nl</url> - </organization> - - <build> - <plugins> - - <!-- Resolve client and server artifacts and extract them --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>2.4</version> - <executions> - <execution> - <id>unpack</id> - <phase>package</phase> - <goals> - <goal>unpack</goal> - </goals> - - <configuration> - <artifactItems> - <artifactItem> - <groupId>nl.astron.lofar.sas</groupId> - <artifactId>jOTDB3</artifactId> - <version>1.0.1-SNAPSHOT</version> - <type>tar.gz</type> - </artifactItem> - - <artifactItem> - <groupId>nl.astron.lofar.sas</groupId> - <artifactId>OTB</artifactId> - <version>1.0.1-SNAPSHOT</version> - <type>tar.gz</type> - </artifactItem> - - </artifactItems> - </configuration> - - </execution> - </executions> - </plugin> - - <!-- Create an TAR.GZ file --> - <plugin> - <artifactId>maven-assembly-plugin</artifactId> - <version>2.3</version> - <configuration> - <descriptor>assembly.xml</descriptor> - <appendAssemblyId>false</appendAssemblyId> - </configuration> - - <executions> - <execution> - <id>make-assembly</id> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - </plugin> - - </plugins> - </build> - - <distributionManagement> - <snapshotRepository> - <id>snapshots</id> - <name>Astron Nexus Repository</name> - <url>https://support.astron.nl/nexus/content/repositories/snapshots/</url> - </snapshotRepository> - </distributionManagement> - -</project> - - +<?xml version="1.0" encoding="UTF-8"?> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <name>Lofar OTB :: Distribution</name> + <description>Object Tree Browser Client/Server - Distribution</description> + + <parent> + <groupId>nl.astron.lofar.sas.otb</groupId> + <artifactId>otb-parent</artifactId> + <version>1.8.2-SNAPSHOT</version> + </parent> + + <artifactId>OTB-distribution</artifactId> + <packaging>pom</packaging> + + + <!-- Specification for the SCM used by the project, such as CVS, Subversion, etc. --> + <scm> + <connection>scm:svn:https://svn.astron.nl/LOFAR/trunk/SAS/OTB/OTB-distribution</connection> + <developerConnection>scm:svn:https://svn.astron.nl/LOFAR/trunk/SAS/OTB/OTB-distribution</developerConnection> + </scm> + + + <!-- Information required to build a project. --> + <build> + <plugins> + + <!-- Resolve client and server artifacts and extract them --> + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <id>unpack</id> + <phase>package</phase> + <goals> + <goal>unpack</goal> + </goals> + + <configuration> + <artifactItems> + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>jOTDB3</artifactId> + <type>tar.gz</type> + </artifactItem> + + <artifactItem> + <groupId>${project.groupId}</groupId> + <artifactId>OTB</artifactId> + <type>tar.gz</type> + </artifactItem> + + </artifactItems> + </configuration> + + </execution> + </executions> + </plugin> + + <!-- Create an TAR.GZ file --> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptor>assembly.xml</descriptor> + <appendAssemblyId>false</appendAssemblyId> + </configuration> + + <executions> + <execution> + <id>make-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + </build> + + <dependencies> + + <!-- Sibling dependencies --> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>OTB</artifactId> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>jOTDB3</artifactId> + </dependency> + + </dependencies> + +</project> + + diff --git a/SAS/OTB/OTB/dist-src/startClientOTB b/SAS/OTB/OTB/dist-src/startClientOTB index bc759f144e6..f4a6392c972 100644 --- a/SAS/OTB/OTB/dist-src/startClientOTB +++ b/SAS/OTB/OTB/dist-src/startClientOTB @@ -1,6 +1,6 @@ #!/bin/sh -export OTB_DIR=/opt/sas/otb +export OTB_DIR=/opt/sas/otb/client export JAVA_HOME=/usr/java/jdk1.7.0_02 echo @@ -12,7 +12,7 @@ export CLASSPATH=$OTB_APP for JAR_DEPENDENCY in $OTB_DIR/lib/*.jar do - echo -- Adding `basename $JAR_DEPENDENCY` dependency to Java Classpath + echo -- Adding dependency to CLASSPATH: `basename $JAR_DEPENDENCY` export CLASSPATH=$CLASSPATH:$JAR_DEPENDENCY done diff --git a/SAS/OTB/OTB/pom.xml b/SAS/OTB/OTB/pom.xml index 31c2baa12ed..807455145ea 100644 --- a/SAS/OTB/OTB/pom.xml +++ b/SAS/OTB/OTB/pom.xml @@ -1,195 +1,143 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - <groupId>nl.astron.lofar.sas</groupId> - <artifactId>OTB</artifactId> - <name>Object Tree Browser GUI</name> - <version>1.0.2</version> - - <organization> - <name>Astron</name> - <url>http://www.astron.nl</url> - </organization> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.test.sourceEncoding>UTF-8</project.test.sourceEncoding> - </properties> - - <build> - - <sourceDirectory>src</sourceDirectory> - - <resources> - <resource> - <directory>${basedir}</directory> - <includes> - <include>*.log_prop</include> - </includes> - </resource> - - <resource> - <directory>src</directory> - <excludes> - <exclude>**/*.java</exclude> - </excludes> - </resource> - </resources> - - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.7</source> - <target>1.7</target> - </configuration> - </plugin> - - - <!-- Set the main class in the manifest file --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.4</version> - - <configuration> - <archive> - <manifest> - <mainClass>nl.astron.lofar.sas.otb.Main</mainClass> - <addDefaultImplementationEntries>true</addDefaultImplementationEntries> - <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries> - </manifest> - </archive> - </configuration> - </plugin> - - <!-- Create a /target/lib directory with ALL dependencies --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>2.4</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>copy-dependencies</goal> - </goals> - <configuration> - <outputDirectory>${project.build.directory}/lib</outputDirectory> - </configuration> - </execution> - </executions> - </plugin> - - <!-- Create an TAR.GZ file --> - <plugin> - <artifactId>maven-assembly-plugin</artifactId> - <version>2.3</version> - <configuration> - <descriptor>assembly.xml</descriptor> - <appendAssemblyId>false</appendAssemblyId> - </configuration> - - <executions> - <execution> - <id>make-assembly</id> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - - <pluginManagement> - <plugins> - <!-- - This plugin's configuration is used to store Eclipse m2e settings only. - It has no influence on the Maven build itself. - --> - <plugin> - <groupId>org.eclipse.m2e</groupId> - <artifactId>lifecycle-mapping</artifactId> - <version>1.0.0</version> - <configuration> - <lifecycleMappingMetadata> - <pluginExecutions> - <pluginExecution> - <pluginExecutionFilter> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <versionRange>[1.0.0,)</versionRange> - <goals> - <goal>copy-dependencies</goal> - </goals> - </pluginExecutionFilter> - <action><ignore /></action> - </pluginExecution> - </pluginExecutions> - </lifecycleMappingMetadata> - </configuration> - </plugin> - </plugins> - </pluginManagement> - - </build> - - <dependencies> - - <dependency> - <groupId>nl.astron.lofar.sas</groupId> - <artifactId>jOTDB3</artifactId> - <version>1.0.2</version> - </dependency> - - <dependency> - <groupId>nl.astron.lofar.gui</groupId> - <artifactId>plotter</artifactId> - <version>1.0.2</version> - </dependency> - - <dependency> - <groupId>nl.astron.lofar.cep</groupId> - <artifactId>jParmFacade</artifactId> - <version>1.0.2</version> - </dependency> - - <dependency> - <groupId>org.swinglabs</groupId> - <artifactId>swing-layout</artifactId> - <version>1.0.3</version> - </dependency> - - <dependency> - <groupId>org.netbeans.external</groupId> - <artifactId>AbsoluteLayout</artifactId> - <version>RELEASE701</version> - </dependency> - - </dependencies> - - <repositories> - <repository> - <id>netbeans</id> - <name>NetBeans IDE Repos</name> - <url>http://bits.netbeans.org/maven2</url> - </repository> - </repositories> - - <distributionManagement> - <snapshotRepository> - <id>snapshots</id> - <name>Astron Nexus Repository</name> - <url>https://support.astron.nl/nexus/content/repositories/snapshots/</url> - </snapshotRepository> - </distributionManagement> - -</project> - - +<?xml version="1.0" encoding="UTF-8"?> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <name>Lofar OTB :: OTB</name> + <description>Object Tree Browser Client/Server - Object Tree Browser GUI</description> + + <parent> + <groupId>nl.astron.lofar.sas.otb</groupId> + <artifactId>otb-parent</artifactId> + <version>1.8.2-SNAPSHOT</version> + </parent> + + <artifactId>OTB</artifactId> + + <!-- The OTB GUI requires at least java 1.7 to compile. --> + <properties> + <project.compiler.version>1.7</project.compiler.version> + </properties> + + + <!-- Specification for the SCM used by the project, such as CVS, Subversion, etc. --> + <scm> + <connection>scm:svn:https://svn.astron.nl/LOFAR/trunk/SAS/OTB/OTB</connection> + <developerConnection>scm:svn:https://svn.astron.nl/LOFAR/trunk/SAS/OTB/OTB</developerConnection> + </scm> + + + <!-- Information required to build a project. --> + <build> + + <sourceDirectory>src</sourceDirectory> + + <resources> + <resource> + <directory>${basedir}</directory> + <includes> + <include>*.log_prop</include> + </includes> + </resource> + + <resource> + <directory>src</directory> + <excludes> + <exclude>**/*.java</exclude> + </excludes> + </resource> + </resources> + + <plugins> + + <!-- Set the main class in the manifest file --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + + <configuration> + <archive> + <manifest> + <mainClass>nl.astron.lofar.sas.otb.Main</mainClass> + <addDefaultImplementationEntries>true</addDefaultImplementationEntries> + <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries> + </manifest> + </archive> + </configuration> + </plugin> + + <!-- Create a /target/lib directory with ALL dependencies --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <outputDirectory>${project.build.directory}/lib</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + + <!-- Create an TAR.GZ file --> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptor>assembly.xml</descriptor> + <appendAssemblyId>false</appendAssemblyId> + </configuration> + + <executions> + <execution> + <id>make-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + + </build> + + <dependencies> + + <!-- Sibling dependencies --> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>jOTDB3</artifactId> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>jParmFacade</artifactId> + </dependency> + + <!-- Internal dependencies --> + <dependency> + <groupId>nl.astron.lofar.lib</groupId> + <artifactId>plotter</artifactId> + </dependency> + + <!-- External dependencies --> + <dependency> + <groupId>org.swinglabs</groupId> + <artifactId>swing-layout</artifactId> + </dependency> + + <dependency> + <groupId>org.netbeans.external</groupId> + <artifactId>AbsoluteLayout</artifactId> + </dependency> + + </dependencies> + +</project> + + diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/SharedVars.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/SharedVars.java index 496064f7b1d..a39470a0bf5 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/SharedVars.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/SharedVars.java @@ -24,10 +24,14 @@ package nl.astron.lofar.sas.otb; +import java.net.MalformedURLException; import java.rmi.Naming; +import java.rmi.NotBoundException; import java.rmi.RemoteException; import java.util.HashMap; -import nl.astron.lofar.java.cep.jparmfacade.jParmFacadeInterface; + +import nl.astron.lofar.sas.otb.exceptions.ParmDBConfigurationException; +import nl.astron.lofar.sas.otb.jparmfacade.jParmFacadeInterface; import nl.astron.lofar.sas.otb.util.OtdbRmi; import nl.astron.lofar.sas.otb.util.ParmDBConfigurationHelper; import nl.astron.lofar.sas.otbcomponents.OTBInputFieldBuilder; @@ -105,7 +109,6 @@ public class SharedVars { itsTreeState=OtdbRmi.getRemoteOTDB().getTreeInfo(aTreeID,false).state; } catch (RemoteException ex) { logger.debug("Exception during setTreeState(TreeID: "+aTreeID+")" ); - ex.printStackTrace(); } } @@ -146,7 +149,7 @@ public class SharedVars { itsjParmFacade = (jParmFacadeInterface) Naming.lookup(aRC); - } catch (Throwable e) { + } catch (ParmDBConfigurationException | NotBoundException | MalformedURLException | RemoteException e) { logger.error("jParmFacade could not be loaded : "+e.getMessage()); } } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/MainPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/MainPanel.java index f12e47ff71f..d105bc665b4 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/MainPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/MainPanel.java @@ -78,7 +78,7 @@ public class MainPanel extends javax.swing.JPanel /** * Initializes the buttonpanel. Every tab has different buttons */ - public void initializeButtons() { + public final void initializeButtons() { buttonPanel1.removeAllButtons(); switch (itsTabFocus) { case "PIC": diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/ResultBrowserPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/ResultBrowserPanel.form index 738fdeff209..903a70f02bc 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/ResultBrowserPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/ResultBrowserPanel.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/ResultBrowserPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/ResultBrowserPanel.java index 01361b7f490..bc01ecbf79f 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/ResultBrowserPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/ResultBrowserPanel.java @@ -26,10 +26,9 @@ package nl.astron.lofar.sas.otb.panels; import java.awt.event.ActionEvent; import java.rmi.RemoteException; -import java.util.Enumeration; +import java.util.ArrayList; import java.util.Iterator; import java.util.Set; -import java.util.Vector; import javax.swing.JComponent; import javax.swing.JPanel; import javax.swing.JTabbedPane; @@ -150,12 +149,10 @@ public class ResultBrowserPanel extends javax.swing.JPanel item.removeAllChildren(); //add the parmdb nodes - Vector childs = - OtdbRmi.getRemoteMaintenance().getItemList(((jOTDBnode)item.getUserObject()).treeID(), ((jOTDBnode)item.getUserObject()).nodeID(), 1); + ArrayList <jOTDBnode> childs = + new ArrayList<>(OtdbRmi.getRemoteMaintenance().getItemList(((jOTDBnode)item.getUserObject()).treeID(), ((jOTDBnode)item.getUserObject()).nodeID(), 1)); - Enumeration parmdbparms = childs.elements(); - while( parmdbparms.hasMoreElements() ) { - jOTDBnode parmdbparmitem = (jOTDBnode)parmdbparms.nextElement(); + for (jOTDBnode parmdbparmitem : childs ) { //only add values that mean something if(parmdbparmitem.limits != null && !parmdbparmitem.limits.equalsIgnoreCase("")){ String[] args = new String[3]; @@ -287,11 +284,11 @@ public class ResultBrowserPanel extends javax.swing.JPanel logger.debug("actionPerformed: " + evt); logger.debug("Trigger: "+evt.getActionCommand()); try { - Vector aL = OtdbRmi.getRemoteMaintenance().getItemList(itsTreeID, "%"+evt.getActionCommand()); + ArrayList<jOTDBnode> aL = new ArrayList<>(OtdbRmi.getRemoteMaintenance().getItemList(itsTreeID, "%"+evt.getActionCommand())); logger.debug("nr nodes found: " + aL.size()); logger.debug("nodes: " + aL); if (aL.size()> 0) { - changeSelection((jOTDBnode)aL.elementAt(0)); + changeSelection(aL.get(0)); } else { logger.warn("No panels for this choice"); } @@ -307,7 +304,7 @@ public class ResultBrowserPanel extends javax.swing.JPanel jTabbedPane1.removeAll(); // Check if the nodename uses specific panels and create them - Vector aPanelList=null; + ArrayList<String> aPanelList=null; if(aNode.getUserObject() instanceof jOTDBnode){ if (itsPanelHelper.isKey(LofarUtils.keyName(aNode.getName()))) { @@ -343,19 +340,7 @@ public class ResultBrowserPanel extends javax.swing.JPanel logger.debug("Getting panel for: "+aPanelName); try { p = (JPanel) Class.forName(aPanelName).newInstance(); - } catch (ClassNotFoundException ex) { - String aS="Error during getPanel: "+ ex; - logger.error(aS); - itsMainFrame.setNormalCursor(); - LofarUtils.showErrorPanel(this,aS,new javax.swing.ImageIcon(getClass().getResource("/nl/astron/lofar/sas/otb/icons/16_warn.gif"))); - return; - } catch (InstantiationException ex) { - String aS="Error during getPanel: "+ ex; - logger.error(aS); - itsMainFrame.setNormalCursor(); - LofarUtils.showErrorPanel(this,aS,new javax.swing.ImageIcon(getClass().getResource("/nl/astron/lofar/sas/otb/icons/16_warn.gif"))); - return; - } catch (IllegalAccessException ex) { + } catch ( ClassNotFoundException | InstantiationException | IllegalAccessException ex) { String aS="Error during getPanel: "+ ex; logger.error(aS); itsMainFrame.setNormalCursor(); @@ -389,7 +374,7 @@ public class ResultBrowserPanel extends javax.swing.JPanel jTabbedPane1.removeAll(); // Check if the nodename uses specific panels and create them - Vector aPanelList=null; + ArrayList<String> aPanelList=null; if (itsPanelHelper.isKey(LofarUtils.keyName(aNode.name))) { aPanelList=itsPanelHelper.getPanels(LofarUtils.keyName(aNode.name)); @@ -418,19 +403,7 @@ public class ResultBrowserPanel extends javax.swing.JPanel logger.debug("Getting panel for: "+aPanelName); try { p = (JPanel) Class.forName(aPanelName).newInstance(); - } catch (ClassNotFoundException ex) { - String aS="Error during getPanel: "+ ex; - logger.error(aS); - itsMainFrame.setNormalCursor(); - LofarUtils.showErrorPanel(this,aS,new javax.swing.ImageIcon(getClass().getResource("/nl/astron/lofar/sas/otb/icons/16_warn.gif"))); - return; - } catch (InstantiationException ex) { - String aS="Error during getPanel: "+ ex; - logger.error(aS); - itsMainFrame.setNormalCursor(); - LofarUtils.showErrorPanel(this,aS,new javax.swing.ImageIcon(getClass().getResource("/nl/astron/lofar/sas/otb/icons/16_warn.gif"))); - return; - } catch (IllegalAccessException ex) { + } catch ( ClassNotFoundException | InstantiationException | IllegalAccessException ex) { String aS="Error during getPanel: "+ ex; logger.error(aS); itsMainFrame.setNormalCursor(); @@ -539,10 +512,10 @@ public class ResultBrowserPanel extends javax.swing.JPanel private void buttonPanel1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPanel1ActionPerformed logger.debug("actionPerformed: " + evt); - - if(evt.getActionCommand().equals("Query Panel")) { - // ToDo - } else if(evt.getActionCommand().equals("Schedule")) { + switch (evt.getActionCommand()) { + case "Query Panel": + break; + case "Schedule": if (itsTreeID > 0) { if (viewInfo() ) { logger.debug("Tree has been changed, reloading table line"); @@ -550,14 +523,15 @@ public class ResultBrowserPanel extends javax.swing.JPanel itsMainFrame.setChanged(this.getFriendlyName(),true); } } - } else if(evt.getActionCommand().equals("Exit")) { + break; + case "Exit": if (!userAccount.isObserver() || itsTreeType.equalsIgnoreCase("hardware")){ ResultTreeManager treeManager = ResultTreeManager.getInstance(itsMainFrame.getUserAccount()); treeManager.removeTreeModelListener(parmDBTreelistener); } itsMainFrame.unregisterPlugin(this.getFriendlyName()); itsMainFrame.showPanel(MainPanel.getFriendlyNameStatic()); - + break; } }//GEN-LAST:event_buttonPanel1ActionPerformed diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/SamplePanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/SamplePanel.form index 22899b4e965..1864f6fb2d6 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/SamplePanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/SamplePanel.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/SamplePanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/SamplePanel.java index e0c78381826..7568e25aae8 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/SamplePanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/SamplePanel.java @@ -41,7 +41,7 @@ import nl.astron.lofar.sas.otb.util.treenodes.TreeNode; * @version $Id$ * @updated */ -public class SamplePanel extends javax.swing.JPanel +public final class SamplePanel extends javax.swing.JPanel implements IPluginPanel { static Logger logger = Logger.getLogger(SamplePanel.class); @@ -371,21 +371,20 @@ public class SamplePanel extends javax.swing.JPanel private void buttonPanelActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPanelActionPerformed logger.debug("actionPerformed: " + evt); - - if(evt.getActionCommand().equals("New Tree")) { + switch (evt.getActionCommand()) { + case "New Tree": // initialize the tree // create a sample root node. This should be retrieved from the OTDB of course. jOTDBnode otdbNode = new jOTDBnode(0,0,0,0); otdbNode.name = "Node_" + treeCounter++; - // put the OTDBnode in a wrapper for the tree TreeNode otdbTreeNode = new TreeNode(ResultTreeManager.getInstance(itsMainFrame.getUserAccount()),otdbNode); - // and create a new root treePanel.newRootNode(otdbTreeNode); - } - else if(evt.getActionCommand().equals("Back to Main")) { + break; + case "Back to Main": itsMainFrame.showPanel(MainPanel.getFriendlyNameStatic()); + break; } }//GEN-LAST:event_buttonPanelActionPerformed diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/TemplateMaintenancePanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/TemplateMaintenancePanel.java index 6882292fc1d..60dc5902f24 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/TemplateMaintenancePanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/panels/TemplateMaintenancePanel.java @@ -22,9 +22,9 @@ package nl.astron.lofar.sas.otb.panels; import java.rmi.RemoteException; +import java.util.ArrayList; import java.util.Iterator; import java.util.Set; -import java.util.Vector; import javax.swing.JComponent; import javax.swing.JOptionPane; import javax.swing.JPanel; @@ -231,8 +231,8 @@ public class TemplateMaintenancePanel extends javax.swing.JPanel private void buttonPanel1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPanel1ActionPerformed logger.debug("actionPerformed: " + evt); logger.debug("Trigger: " + evt.getActionCommand()); - if (evt.getActionCommand().equals("Delete")) { - + switch (evt.getActionCommand()) { + case "Delete": //Check if the selected node isn't a leaf if (itsSelectedNode != null && !itsSelectedNode.leaf && itsSelectedNode.instances <= 1 ) { if (JOptionPane.showConfirmDialog(this, "Are you sure you want to delete this node ?", "Delete Tree", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE) == JOptionPane.YES_OPTION) { @@ -242,7 +242,7 @@ public class TemplateMaintenancePanel extends javax.swing.JPanel // We have to find the defaultNode for this deleted node and decrease the number of instances - Vector<jOTDBnode> aList = OtdbRmi.getRemoteMaintenance().getItemList(itsTreeID, itsSelectedNode.name); + ArrayList<jOTDBnode> aList = new ArrayList<>(OtdbRmi.getRemoteMaintenance().getItemList(itsTreeID, itsSelectedNode.name)); Iterator<jOTDBnode> it = aList.iterator (); jOTDBnode aDefaultNode=null; short maxIdx=0; @@ -268,8 +268,8 @@ public class TemplateMaintenancePanel extends javax.swing.JPanel } } } - } else if (evt.getActionCommand().equals("Duplicate")) { - + break; + case "Duplicate": //Check if the selected node isn't a leaf and it is a default node (index = -1) if (itsSelectedNode != null && !itsSelectedNode.leaf && itsSelectedNode.index==-1) { String answer = JOptionPane.showInputDialog(this, "What is the index for the new subtree?", "Enter indexNumber", JOptionPane.QUESTION_MESSAGE); @@ -302,9 +302,11 @@ public class TemplateMaintenancePanel extends javax.swing.JPanel } } } - } else if (evt.getActionCommand().equals("Exit")) { + break; + case "Exit": itsMainFrame.unregisterPlugin(this.getFriendlyName()); itsMainFrame.showPanel(MainPanel.getFriendlyNameStatic()); + break; } }//GEN-LAST:event_buttonPanel1ActionPerformed @@ -312,11 +314,11 @@ public class TemplateMaintenancePanel extends javax.swing.JPanel logger.debug("actionPerformed: " + evt); logger.debug("Trigger: " + evt.getActionCommand()); try { - Vector aL = OtdbRmi.getRemoteMaintenance().getItemList(itsTreeID, evt.getActionCommand()); + ArrayList<jOTDBnode> aL = new ArrayList<>(OtdbRmi.getRemoteMaintenance().getItemList(itsTreeID, evt.getActionCommand())); logger.debug("nr nodes found: " + aL.size()); logger.debug("nodes: " + aL); if (aL.size() > 0) { - changeSelection((jOTDBnode) aL.elementAt(0)); + changeSelection(aL.get(0)); } else { logger.warn("No panels for this choice"); } @@ -359,7 +361,7 @@ public class TemplateMaintenancePanel extends javax.swing.JPanel jTabbedPane1.removeAll(); // Check if the nodename uses specific panels and create them - Vector aPanelList = null; + ArrayList<String> aPanelList = null; if (itsPanelHelper.isKey(LofarUtils.keyName(aNode.name))) { aPanelList = itsPanelHelper.getPanels(LofarUtils.keyName(aNode.name)); } else { @@ -386,19 +388,7 @@ public class TemplateMaintenancePanel extends javax.swing.JPanel logger.debug("Getting panel for: " + aPanelName); try { p = (JPanel) Class.forName(aPanelName).newInstance(); - } catch (ClassNotFoundException ex) { - String aS="Error during getPanel: " + ex; - logger.error(aS); - itsMainFrame.setNormalCursor(); - LofarUtils.showErrorPanel(this,aS,new javax.swing.ImageIcon(getClass().getResource("/nl/astron/lofar/sas/otb/icons/16_warn.gif"))); - return; - } catch (InstantiationException ex) { - String aS="Error during getPanel: " + ex; - logger.error(aS); - itsMainFrame.setNormalCursor(); - LofarUtils.showErrorPanel(this,aS,new javax.swing.ImageIcon(getClass().getResource("/nl/astron/lofar/sas/otb/icons/16_warn.gif"))); - return; - } catch (IllegalAccessException ex) { + } catch ( ClassNotFoundException | InstantiationException | IllegalAccessException ex) { String aS="Error during getPanel: " + ex; logger.error(aS); itsMainFrame.setNormalCursor(); @@ -457,12 +447,12 @@ public class TemplateMaintenancePanel extends javax.swing.JPanel } try { // only deletion possible when no instances left - Vector<jOTDBnode> aList = OtdbRmi.getRemoteMaintenance().getItemList(itsTreeID, itsSelectedNode.name); + ArrayList<jOTDBnode> aList = new ArrayList<>(OtdbRmi.getRemoteMaintenance().getItemList(itsTreeID, itsSelectedNode.name)); // count all found nodes with then same parentid as the selected node int cnt=0; - for ( int i=0; i < aList.size(); i++ ) { - if (itsSelectedNode.parentID() == aList.elementAt(i).parentID()) cnt++; + for ( jOTDBnode anElement: aList) { + if (itsSelectedNode.parentID() == anElement.parentID()) cnt++; } if (aNode.index == -1 && cnt <= 1) { diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/CmdExec.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/CmdExec.java index b3236c48324..f056d3d62b3 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/CmdExec.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/CmdExec.java @@ -37,15 +37,13 @@ public class CmdExec { try { String line; Process p = Runtime.getRuntime().exec(cmdline); - BufferedReader input = - new BufferedReader(new InputStreamReader(p.getInputStream())); + try (BufferedReader input = new BufferedReader(new InputStreamReader(p.getInputStream()))) { while ((line = input.readLine()) != null) { System.out.println(line); } - input.close(); + } } catch (Exception err) { - err.printStackTrace(); } } } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/ConfigPanelHelper.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/ConfigPanelHelper.java index 2105ce1743e..fb1f3b57a92 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/ConfigPanelHelper.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/ConfigPanelHelper.java @@ -22,10 +22,10 @@ package nl.astron.lofar.sas.otb.util; +import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Set; -import java.util.Vector; /** * This (singleton) class maintains a list of available panels that can be shown on a given name in the TemplateMaintenanceBrowser. @@ -41,8 +41,8 @@ import java.util.Vector; */ public class ConfigPanelHelper { - private HashMap<String,Vector<String> > itsPanelMap; - private Vector<String> itsVector; + private HashMap<String,ArrayList<String> > itsPanelMap; + private ArrayList<String> itsArrayList; private static ConfigPanelHelper ref; /** Creates a new instance of ConfigPanelHelper */ @@ -63,12 +63,12 @@ public class ConfigPanelHelper { } private void initMap() { - itsPanelMap = new HashMap<String, Vector<String> >(); + itsPanelMap = new HashMap<>(); //generic panels - itsVector = new Vector<String>(); + itsArrayList = new ArrayList<>(); addBasePanels(); - itsPanelMap.put("*",itsVector); + itsPanelMap.put("*",itsArrayList); //BBS // itsVector = new Vector<String>(); @@ -84,47 +84,47 @@ public class ConfigPanelHelper { //OLAP - itsVector = new Vector<String>(); - itsVector.add("nl.astron.lofar.sas.otbcomponents.userpanels.OlapPanel"); - itsPanelMap.put("OLAP",itsVector); + itsArrayList = new ArrayList<>(); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.userpanels.OlapPanel"); + itsPanelMap.put("OLAP",itsArrayList); addParSetPanel(); // Observation - itsVector = new Vector<String>(); - itsVector.add("nl.astron.lofar.sas.otbcomponents.userpanels.ObservationPanel"); - itsPanelMap.put("Observation",itsVector); + itsArrayList = new ArrayList<>(); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.userpanels.ObservationPanel"); + itsPanelMap.put("Observation",itsArrayList); addParSetPanel(); //TBB - itsVector = new Vector<String>(); - itsVector.add("nl.astron.lofar.sas.otbcomponents.userpanels.TBBConfigPanel"); - itsPanelMap.put("TBB",itsVector); + itsArrayList = new ArrayList<>(); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.userpanels.TBBConfigPanel"); + itsPanelMap.put("TBB",itsArrayList); addParSetPanel(); //Imager - itsVector = new Vector<String>(); - itsVector.add("nl.astron.lofar.sas.otbcomponents.userpanels.ImagerPanel"); - itsPanelMap.put("Imager",itsVector); + itsArrayList = new ArrayList<>(); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.userpanels.ImagerPanel"); + itsPanelMap.put("Imager",itsArrayList); addParSetPanel(); } private void addBasePanels() { //generic node panel - itsVector.add("nl.astron.lofar.sas.otbcomponents.NodeViewPanel"); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.NodeViewPanel"); //generic parameter panel - itsVector.add("nl.astron.lofar.sas.otbcomponents.ParameterViewPanel"); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.ParameterViewPanel"); addParSetPanel(); } private void addParSetPanel() { //generic parset view panel - itsVector.add("nl.astron.lofar.sas.otbcomponents.ParSetViewPanel"); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.ParSetViewPanel"); } private void addParSetMetaPanel() { //generic parset view panel - itsVector.add("nl.astron.lofar.sas.otbcomponents.ParSetMetaViewPanel"); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.ParSetMetaViewPanel"); } /** * Returns the possible panels for this Key @@ -134,8 +134,8 @@ public class ConfigPanelHelper { * if aKey = "" all NON default panels are returned * @return the Vector that contains all panels for this key */ - public Vector getPanels(String aKey) { - Vector returnVector = null; + public ArrayList<String> getPanels(String aKey) { + ArrayList returnVector = null; Iterator i = itsPanelMap.keySet().iterator(); while(i.hasNext()){ String key = (String)i.next(); diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/OtdbRmi.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/OtdbRmi.java index ea978a7642f..162a25c43c0 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/OtdbRmi.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/OtdbRmi.java @@ -22,10 +22,11 @@ package nl.astron.lofar.sas.otb.util; +import java.rmi.NotBoundException; +import java.rmi.RemoteException; import java.rmi.registry.LocateRegistry; import java.rmi.registry.Registry; import java.util.TreeMap; -import nl.astron.lofar.lofarutils.LofarUtils; import nl.astron.lofar.lofarutils.remoteFileInterface; import nl.astron.lofar.sas.otb.MainFrame; import nl.astron.lofar.sas.otb.exceptions.ConnectionFailedException; @@ -55,7 +56,7 @@ import org.apache.log4j.Logger; * @updated coolen 27-02-2007, added support for server/port setting * @updated coolen 01-05-2010, added support for jotdb3 (multi user) */ -public class OtdbRmi { +public final class OtdbRmi { static Logger logger = Logger.getLogger(OtdbRmi.class); static String name = "OtdbRmi"; @@ -301,7 +302,7 @@ public class OtdbRmi { logger.debug("Connection to RemoteAccess succesful!"); return true; } - catch (Exception e) + catch (NumberFormatException | RemoteException | NotBoundException e) { String aS="Open Remote Access via RMI and JNI failed: " + e; logger.error(aS); @@ -335,7 +336,7 @@ public class OtdbRmi { logger.debug("Connection succesful!"); return true; } - catch (Exception e) + catch (RemoteException | NotBoundException e) { logger.error("Open Remote Connection via RMI and JNI failed: " + e); } @@ -361,7 +362,7 @@ public class OtdbRmi { logger.debug("Connection succesful!"); return true; } - catch (Exception e) + catch (RemoteException | NotBoundException e) { logger.error("Getting Remote Maintenance via RMI and JNI failed: " + e); } @@ -388,7 +389,7 @@ public class OtdbRmi { logger.debug("Connection succesful!"); return true; } - catch (Exception e) + catch (RemoteException | NotBoundException e) { logger.error("Getting Remote Campaign via RMI and JNI failed: " + e); } @@ -417,7 +418,7 @@ public class OtdbRmi { logger.debug("Connection succesful!"); return true; } - catch (Exception e) + catch (RemoteException | NotBoundException e) { logger.error("Getting Remote Value via RMI and JNI failed: " + e); } @@ -446,7 +447,7 @@ public class OtdbRmi { return true; } } - catch (Exception e) + catch (RemoteException | NotBoundException e) { logger.error("Getting remote Converter via RMI and JNI failed: " + e); } @@ -474,7 +475,7 @@ public class OtdbRmi { logger.debug("Connection succesful!"); return true; } - catch (Exception e) + catch (RemoteException | NotBoundException e) { logger.error("Getting RemoteFileTransfer via RMI and JNI failed: " + e); } @@ -484,11 +485,11 @@ public class OtdbRmi { private static boolean loadConversionTypes() { try { logger.debug("Get ConversionTypes"); - itsClassifs =new TreeMap<Short,String>(OtdbRmi.remoteTypes.getClassif()); - itsParamTypes =new TreeMap<Short,String>(OtdbRmi.remoteTypes.getParamType()); - itsTreeStates =new TreeMap<Short,String>(OtdbRmi.remoteTypes.getTreeState()); - itsTreeTypes =new TreeMap<Short,String>(OtdbRmi.remoteTypes.getTreeType()); - itsUnits =new TreeMap<Short,String>(OtdbRmi.remoteTypes.getUnit()); + itsClassifs =new TreeMap<>(OtdbRmi.remoteTypes.getClassif()); + itsParamTypes =new TreeMap<>(OtdbRmi.remoteTypes.getParamType()); + itsTreeStates =new TreeMap<>(OtdbRmi.remoteTypes.getTreeState()); + itsTreeTypes =new TreeMap<>(OtdbRmi.remoteTypes.getTreeType()); + itsUnits =new TreeMap<>(OtdbRmi.remoteTypes.getUnit()); logger.debug("Got all conversiontypes"); return true; } catch (Exception e) { diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/ParmDBConfigurationHelper.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/ParmDBConfigurationHelper.java index 2bf31c922cb..f660c0b023a 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/ParmDBConfigurationHelper.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/ParmDBConfigurationHelper.java @@ -86,7 +86,7 @@ public class ParmDBConfigurationHelper{ public HashMap<String,String> getParmDBServerInformation() throws ParmDBConfigurationException{ if(servers == null){ - servers = new HashMap<String,String>(); + servers = new HashMap<>(); String hostname = "lofar17.astron.nl"; String port = "10668"; String name = "ParmDB1"; diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/ResultPanelHelper.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/ResultPanelHelper.java index 904cbb7e1de..f10440e9e1c 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/ResultPanelHelper.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/ResultPanelHelper.java @@ -22,10 +22,10 @@ package nl.astron.lofar.sas.otb.util; +import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.Set; -import java.util.Vector; /** * This (singleton) class maintains a list of available panels that can be shown on a given (VIC)name in the ResultBrowser. @@ -41,8 +41,8 @@ import java.util.Vector; */ public class ResultPanelHelper { - private HashMap<String,Vector<String> > itsPanelMap; - private Vector<String> itsVector; + private HashMap<String,ArrayList<String> > itsPanelMap; + private ArrayList<String> itsArrayList; private static ResultPanelHelper ref; /** Creates a new instance of ResultPanelHelper */ @@ -63,63 +63,63 @@ public class ResultPanelHelper { } private void initMap() { - itsPanelMap = new HashMap<String, Vector<String> >(); + itsPanelMap = new HashMap< >(); //generic panels - itsVector = new Vector<String>(); + itsArrayList = new ArrayList<>(); addBasePanels(); - itsPanelMap.put("*",itsVector); + itsPanelMap.put("*",itsArrayList); //ParmDB - itsVector = new Vector<String>(); - itsVector.add("nl.astron.lofar.sas.otbcomponents.ParmDBConfigPanel"); - itsPanelMap.put("ParmDB",itsVector); - itsVector = new Vector<String>(); - itsVector.add("nl.astron.lofar.sas.otbcomponents.ParmDBPlotPanel"); - itsPanelMap.put("ParmDBValues",itsVector); + itsArrayList = new ArrayList<>(); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.ParmDBConfigPanel"); + itsPanelMap.put("ParmDB",itsArrayList); + itsArrayList = new ArrayList<>(); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.ParmDBPlotPanel"); + itsPanelMap.put("ParmDBValues",itsArrayList); // Observation - itsVector = new Vector<String>(); - itsVector.add("nl.astron.lofar.sas.otbcomponents.userpanels.ObservationPanel"); - itsPanelMap.put("Observation",itsVector); + itsArrayList = new ArrayList<>(); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.userpanels.ObservationPanel"); + itsPanelMap.put("Observation",itsArrayList); addParSetAndLogPanels(); //OLAP - itsVector = new Vector<String>(); - itsVector.add("nl.astron.lofar.sas.otbcomponents.userpanels.OlapPanel"); - itsPanelMap.put("OLAP",itsVector); + itsArrayList = new ArrayList<>(); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.userpanels.OlapPanel"); + itsPanelMap.put("OLAP",itsArrayList); addParSetAndLogPanels(); //TBB - itsVector = new Vector<String>(); - itsVector.add("nl.astron.lofar.sas.otbcomponents.userpanels.TBBConfigPanel"); - itsPanelMap.put("TBB",itsVector); + itsArrayList = new ArrayList<>(); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.userpanels.TBBConfigPanel"); + itsPanelMap.put("TBB",itsArrayList); addParSetAndLogPanels(); //Imager - itsVector = new Vector<String>(); - itsVector.add("nl.astron.lofar.sas.otbcomponents.userpanels.ImagerPanel"); - itsPanelMap.put("Imager",itsVector); + itsArrayList = new ArrayList<>(); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.userpanels.ImagerPanel"); + itsPanelMap.put("Imager",itsArrayList); addParSetAndLogPanels(); } private void addBasePanels() { //generic node panel - itsVector.add("nl.astron.lofar.sas.otbcomponents.NodeViewPanel"); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.NodeViewPanel"); //generic parameter & meta data panel - itsVector.add("nl.astron.lofar.sas.otbcomponents.ParameterViewPanel"); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.ParameterViewPanel"); addParSetAndLogPanels(); //generic parameter including Metadata panel } private void addParSetAndLogPanels() { //generic parset view panel - itsVector.add("nl.astron.lofar.sas.otbcomponents.ParSetViewPanel"); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.ParSetViewPanel"); //parset+ metadata view panel - itsVector.add("nl.astron.lofar.sas.otbcomponents.ParSetMetaViewPanel"); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.ParSetMetaViewPanel"); //generic logging panel - itsVector.add("nl.astron.lofar.sas.otbcomponents.LogParamPanel"); + itsArrayList.add("nl.astron.lofar.sas.otbcomponents.LogParamPanel"); } /** @@ -130,8 +130,8 @@ public class ResultPanelHelper { * if aKey = "" all NON default panels are returned * @return the Vector that contains all panels for this key */ - public Vector getPanels(String aKey) { - Vector returnVector = null; + public ArrayList<String> getPanels(String aKey) { + ArrayList<String> returnVector = null; Iterator i = itsPanelMap.keySet().iterator(); while(i.hasNext()){ String key = (String)i.next(); diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/SerializableFileContents.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/SerializableFileContents.java index 41612e80dd5..60a7e94adb1 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/SerializableFileContents.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/SerializableFileContents.java @@ -30,7 +30,7 @@ import java.io.Serializable; /** * This class provides a way to copy large files over RMI connections. - * based upoin code found on the java developers network written by ejs. + * based upon code found on the java developers network written by ejs. * @created 13-06-2006 * @author ejs * @version $Id$ @@ -52,7 +52,7 @@ public class SerializableFileContents implements Serializable throws IOException { out.defaultWriteObject(); - FileInputStream in = new FileInputStream(file); + try (FileInputStream in = new FileInputStream(file)) { byte[] buffer = new byte[8192]; int count; while ((count = in.read(buffer)) > 0) @@ -61,14 +61,14 @@ public class SerializableFileContents implements Serializable out.write(buffer,0,count); } out.writeInt(count); - in.close(); + } } private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { in.defaultReadObject(); - FileOutputStream out = new FileOutputStream(file); + try (FileOutputStream out = new FileOutputStream(file)) { int count; while ((count = in.readInt()) > 0) { @@ -76,7 +76,7 @@ public class SerializableFileContents implements Serializable in.readFully(buffer); out.write(buffer,0,count); } - out.close(); + } } } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/StorageLocation.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/StorageLocation.java index f629a8d6d5f..5295de35d56 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/StorageLocation.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/StorageLocation.java @@ -46,7 +46,7 @@ public class StorageLocation { } public String getMACInteractionMonitorPath() { - String path = new String("/tmp/OTB/MAC2OTB/"); + String path = "/tmp/OTB/MAC2OTB/"; if(itsOtdbRmi == null) { logger.info("Not using OTDB to get storage location"); } @@ -54,7 +54,7 @@ public class StorageLocation { } public String getMACInteractionWritePath() { - String path = new String("/tmp/OTB/OTB2MAC/"); + String path = "/tmp/OTB/OTB2MAC/"; if(itsOtdbRmi == null) { logger.info("Not using OTDB to get storage location"); } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotDataAccessParmDBImpl.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotDataAccessParmDBImpl.java index 911b2e92dbb..73fe9289073 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotDataAccessParmDBImpl.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotDataAccessParmDBImpl.java @@ -24,19 +24,20 @@ package nl.astron.lofar.sas.otb.util.plotter; import java.text.DecimalFormat; +import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.TimeZone; -import java.util.Vector; import java.util.regex.Matcher; import java.util.regex.Pattern; -import nl.astron.lofar.java.cep.jparmfacade.jParmFacadeInterface; import nl.astron.lofar.java.gui.plotter.IPlotDataAccess; import nl.astron.lofar.java.gui.plotter.PlotConstants; import nl.astron.lofar.java.gui.plotter.exceptions.PlotterDataAccessException; +import nl.astron.lofar.sas.otb.jparmfacade.jParmFacadeInterface; + import org.apache.log4j.Logger; /** @@ -44,7 +45,7 @@ import org.apache.log4j.Logger; * jParmFacade interface. It manages connections to that interface, and allows * the plotter framework to generate plots of data present in the ParmDB. * - * @see nl.astron.lofar.java.cep.jparmfacade.jParmFacadeInterface + * @see nl.astron.lofar.sas.otb.jparmfacade.jParmFacadeInterface * @created 19-04-2006, 11:00 * @author pompert * @version $Id$ @@ -73,6 +74,7 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ @Override public void finalize() throws Throwable { + super.finalize(); parmDB = null; } @@ -98,7 +100,7 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ * ----+constraints[6]= the numy variable (for example 5) (int)<br> * ----+constraints[7]= A string that will be put in front of every value. Empty string or null at least!<br> * @return the data set generated - * @see nl.astron.lofar.java.cep.jparmfacade.jParmFacadeInterface + * @see nl.astron.lofar.sas.otb.jparmfacade.jParmFacadeInterface * @see nl.astron.lofar.java.gui.plotter.PlotConstants * @throws PlotterDataAccessException will be thrown if anything goes wrong * with the ParmDB interface and calls to it. @@ -110,16 +112,16 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ } HashMap<String,Object> parameterConstraints = (HashMap<String,Object>)constraints; - String[] constraintsArray = (String[])parameterConstraints.get(new String("PARMDBCONSTRAINTS")); + String[] constraintsArray = (String[])parameterConstraints.get("PARMDBCONSTRAINTS"); - HashMap<String,Object> returnMap = new HashMap<String, Object>(); + HashMap<String,Object> returnMap = new HashMap<>(); if(parmDB != null){ if(constraintsArray.length == PlotDataAccessParmDBImpl.requiredDataConstraints){ String tableName = constraintsArray[7]; LinkedList<HashMap<String,Object>> values = null; - Vector<String> nameFilter = new Vector(); + ArrayList<String> nameFilter = new ArrayList<>(); nameFilter.add(constraintsArray[0]); if(tableName.equalsIgnoreCase("History")){ values = getParmHistoryValues(nameFilter,constraintsArray); @@ -207,7 +209,7 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ * ----+offset[0]= the offset value which you would like to remove from all values(String representation of double)<br> * <br> * @return the data set generated - * @see nl.astron.lofar.java.cep.jparmfacade.jParmFacadeInterface + * @see nl.astron.lofar.sas.otb.jparmfacade.jParmFacadeInterface * @see nl.astron.lofar.java.gui.plotter.PlotConstants * @throws PlotterDataAccessException will be thrown if anything goes wrong * with the ParmDB interface and calls to it. @@ -232,7 +234,7 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ String tableName = constraintsArray[7]; LinkedList<HashMap<String,Object>> newParmValues = null; - Vector<String> nameFilter = new Vector(); + ArrayList<String> nameFilter = new ArrayList<>(); nameFilter.add(constraintsArray[0]); if(tableName.equalsIgnoreCase("History")){ newParmValues = getParmHistoryValues(nameFilter,constraintsArray); @@ -241,7 +243,7 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ } if(newParmValues != null && newParmValues.size() > 0){ - HashSet<HashMap<String,Object>> toBeAddedValueObjects = new HashSet<HashMap<String,Object>>(); + HashSet<HashMap<String,Object>> toBeAddedValueObjects = new HashSet<>(); for(HashMap<String,Object> parmValue : newParmValues){ boolean addData = true; @@ -268,7 +270,7 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ String[] constraintsArray = (String[])operatorsOnDataset.get(PlotConstants.DATASET_OPERATOR_MODIFY); } else if(operatorsOnDataset.containsKey(PlotConstants.DATASET_OPERATOR_DELETE)){ - HashSet<HashMap<String,Object>> toBeDeletedValueObjects = new HashSet<HashMap<String,Object>>(); + HashSet<HashMap<String,Object>> toBeDeletedValueObjects = new HashSet<>(); String[] toBeDeletedValues = (String[])operatorsOnDataset.get(PlotConstants.DATASET_OPERATOR_DELETE); for(int i = 0; i < toBeDeletedValues.length; i++){ String aValueToBeDeleted = toBeDeletedValues[i]; @@ -360,11 +362,9 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ double[] originValueYArray = (double[])aValue.get(PlotConstants.DATASET_YVALUES); //create copy of value array to prevent subtracting by zero firstValueYArray = new double[originValueYArray.length]; - for(int i = 0; i < firstValueYArray.length; i++){ - firstValueYArray[i] = originValueYArray[i]; + System.arraycopy(originValueYArray, 0, firstValueYArray, 0, firstValueYArray.length); } } - } for(HashMap<String,Object> aValue : currentValuesInPlot){ @@ -418,12 +418,11 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ aValue.put(PlotConstants.DATASET_VALUELABEL,newTitle); } } - }catch(Exception e){ + }catch(PlotterDataAccessException | NumberFormatException e){ PlotterDataAccessException ex = new PlotterDataAccessException("An error occurred while updating the dataset! : "+e.getMessage()); ex.initCause(e); logger.error(ex); - e.printStackTrace(); throw ex; } @@ -449,7 +448,7 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ HashMap<String,Object> parameterConstraints = (HashMap<String,Object>)constraints; - parmDB = (jParmFacadeInterface)parameterConstraints.get(new String("PARMDBINTERFACE")); + parmDB = (jParmFacadeInterface)parameterConstraints.get("PARMDBINTERFACE"); } catch (Throwable e) { @@ -470,8 +469,8 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ *@param namefilter Name filter to be sent to ParmDB. *@return vector of Names */ - private Vector getNames(String namefilter) throws PlotterDataAccessException{ - Vector names; + private ArrayList<String> getNames(String namefilter) throws PlotterDataAccessException{ + ArrayList<String> names; try{ @@ -494,18 +493,18 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ /** * Helper method that generates a LinkedList with values from the jParmFacade interface * @param names filter to be sent to ParmDB. - * @return vector of Names + * @return arrayList of Names */ - private LinkedList<HashMap<String,Object>> getParmValues(Vector names, String[] constraintsArray) throws PlotterDataAccessException{ - LinkedList<HashMap<String,Object>> returnList = new LinkedList<HashMap<String,Object>>(); + private LinkedList<HashMap<String,Object>> getParmValues(ArrayList<String> names, String[] constraintsArray) throws PlotterDataAccessException{ + LinkedList<HashMap<String,Object>> returnList = new LinkedList<>(); - for(int n = 0; n < names.size();n++){ + for(String name:names){ - Vector paramValues; + ArrayList<Double> paramValues; try{ - paramValues = parmDB.getRange(names.get(n).toString()); + paramValues = parmDB.getRange(name); } catch (Exception ex) { @@ -543,11 +542,11 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ */ - HashMap<String, Vector<Double>> values = new HashMap<String,Vector<Double>>(); + HashMap<String, ArrayList<Double>> values = new HashMap<>(); try { - values = parmDB.getValues((names.get(n)).toString(), startx, endx, numx, starty, endy, numy); + values = parmDB.getValues(name, startx, endx, numx, starty, endy, numy); } catch (Exception ex) { @@ -565,7 +564,7 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ //Every parameter value for(String aValue : values.keySet()){ - HashMap<String,Object> aValueMap = new HashMap<String,Object>(); + HashMap<String,Object> aValueMap = new HashMap<>(); logger.debug("Parameter Value Found: "+aValue); @@ -575,7 +574,7 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ aValueMap.put(PlotConstants.DATASET_VALUELABEL,constraintsArray[7]+" - "+aValue); } - Vector<Double> valueDoubles = (Vector<Double>)values.get(aValue); + ArrayList<Double> valueDoubles = values.get(aValue); logger.debug("Parameter doubles inside " +aValue+": "+valueDoubles.size()+"x"); @@ -585,7 +584,7 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ - //Every parameter value double inside the vector + //Every parameter value double inside the arrayList for(int i = 0;(i<valueDoubles.size());i++){ @@ -610,18 +609,18 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ /** * Helper method that generates a LinkedList with values from the jParmFacade interface * @param names filter to be sent to ParmDB. - * @return vector of Names + * @return arrayList of Names */ - private LinkedList<HashMap<String,Object>> getParmHistoryValues(Vector names, String[] constraintsArray) throws PlotterDataAccessException{ - LinkedList<HashMap<String,Object>> returnList = new LinkedList<HashMap<String,Object>>(); + private LinkedList<HashMap<String,Object>> getParmHistoryValues(ArrayList<String> names, String[] constraintsArray) throws PlotterDataAccessException{ + LinkedList<HashMap<String,Object>> returnList = new LinkedList<>(); - for(int n = 0; n < names.size(); n++) { + for(String name : names) { /* - Vector paramValues; + ArrayList<Double> paramValues; try { - paramValues = parmDB.getRange(names.get(n).toString()); + paramValues = new ArrayList<>(parmDB.getRange(name)); } catch (Exception ex) { @@ -666,9 +665,9 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ */ - HashMap<String, Vector<Double>> values = new HashMap<String,Vector<Double>>(); + HashMap<String, ArrayList<Double>> values = new HashMap<>(); try { - values = parmDB.getHistory((names.get(n)).toString(), startx, endx, starty, endy, 0.0, 1e25); + values = parmDB.getHistory(name, startx, endx, starty, endy, 0.0, 1e25); } catch (Exception ex) { //TODO LOG! PlotterDataAccessException exx = new PlotterDataAccessException("An invalid getHistory() call was made to the ParmDB interface. Please check that all variables seem OK. Root cause: "+ex.getMessage()); @@ -679,14 +678,14 @@ public class PlotDataAccessParmDBImpl implements IPlotDataAccess{ //Every parameter value for(String aValue : values.keySet()) { - Vector<Double> valueDoubles = (Vector<Double>)values.get(aValue); + ArrayList<Double> valueDoubles = values.get(aValue); //int coefficientCount = valueDoubles.get(0).intValue(); //int iterationCount = (valueDoubles.size() - 1) / coefficientCount; //logger.debug(aValue + ": #coefficients=" + coefficientCount + " #iterations=" + iterationCount); - HashMap<String,Object> aValueMap = new HashMap<String,Object>(); + HashMap<String,Object> aValueMap = new HashMap<>(); logger.debug("Parameter Value Found: "+ aValue); diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlot.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlot.java index 5cd564c3495..9adf9a04380 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlot.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlot.java @@ -49,7 +49,7 @@ import org.apache.log4j.Logger; * @author pompert * @see nl.astron.lofar.java.gui.plotter.* */ -public class PlotSlot extends JPanel{ +public final class PlotSlot extends JPanel{ public static final String EMPTY_SLOT = "Empty Slot"; private static Logger logger = Logger.getLogger(PlotSlot.class); @@ -372,7 +372,7 @@ public class PlotSlot extends JPanel{ public void addSlotListener(PlotSlotListener listener) { if (myListenerList == null ) { - myListenerList = new LinkedList<PlotSlotListener>(); + myListenerList = new LinkedList<>(); } myListenerList.add(listener); } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotManager.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotManager.java index 031f4872435..67a604ef0c8 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotManager.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotManager.java @@ -38,7 +38,7 @@ import org.apache.log4j.Logger; * @created May 24, 2006, 11:12 AM * @author pompert */ -public class PlotSlotManager{ +public final class PlotSlotManager{ public static final String REFRESH_FULL = "REFRESHFULL"; public static final String REFRESH_SINGLE = "REFRESHSINGLE"; @@ -53,7 +53,7 @@ public class PlotSlotManager{ * @param amountOfSlots The amount of PlotSlots to be managed in the PlotSlot collection. */ public PlotSlotManager(int amountOfSlots) { - itsPlotSlots = new LinkedList<PlotSlot>(); + itsPlotSlots = new LinkedList<>(); setAmountOfSlots(amountOfSlots,true); } /** @@ -361,9 +361,9 @@ public class PlotSlotManager{ Object[] listeners = myListenerList.getListenerList(); ActionEvent action = null; if(id == -1){ - action = new ActionEvent(this,id,this.REFRESH_FULL); + action = new ActionEvent(this,id,PlotSlotManager.REFRESH_FULL); }else{ - action = new ActionEvent(this,id,this.REFRESH_SINGLE); + action = new ActionEvent(this,id,PlotSlotManager.REFRESH_SINGLE); } for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i]==java.awt.event.ActionListener.class) { diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotViewFrame.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotViewFrame.java index 8af91daa3c5..f9cd27cc073 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotViewFrame.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotViewFrame.java @@ -65,7 +65,7 @@ public class PlotSlotViewFrame extends JDialog{ this.getContentPane().add(viewSlot.getPlot().getLegendForPlot(),BorderLayout.CENTER); pack(); } catch (PlotterException ex) { - ex.printStackTrace(); + } } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotsPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotsPanel.form index 42d05778383..e87752585df 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotsPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotsPanel.form @@ -1,8 +1,10 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> + <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> + <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/> <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/> <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotsPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotsPanel.java index 6e0eb442073..56225e56781 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotsPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/plotter/PlotSlotsPanel.java @@ -115,8 +115,8 @@ public class PlotSlotsPanel extends javax.swing.JPanel { offsetS[0] = ""+offset; //Remove offsets if present to prevent gaps in the dataset. if(offset != 0.0 && !operation.equalsIgnoreCase("DATASET_OPERATOR_REMOVE_Y_OFFSET")){ - HashMap<String,Object> alterOffset = new HashMap<String,Object>(); - alterOffset.put(new String("PARMDBINTERFACE"),SharedVars.getJParmFacade()); + HashMap<String,Object> alterOffset = new HashMap<>(); + Object put = alterOffset.put("PARMDBINTERFACE",SharedVars.getJParmFacade()); alterOffset.put("DATASET_OPERATOR_REMOVE_Y_OFFSET",offsetS); itsSlotManager.modifyPlotInSlot(slotIndex,alterOffset); //update the data identifiers passed as the offset has been removed...Not necessary for additions! @@ -140,16 +140,16 @@ public class PlotSlotsPanel extends javax.swing.JPanel { } //Perform the actual addition or removal of data in the plot. - HashMap<String,Object> alterData = new HashMap<String,Object>(); - alterData.put(new String("PARMDBINTERFACE"),SharedVars.getJParmFacade()); + HashMap<String,Object> alterData = new HashMap<>(); + Object put = alterData.put("PARMDBINTERFACE",SharedVars.getJParmFacade()); alterData.put(operation,constraints); itsSlotManager.modifyPlotInSlot(slotIndex,alterData); //Reapply the offsets using the new values. Skips this step if the user wants to remove the offset. if(offset != 0.0 && !operation.equalsIgnoreCase("DATASET_OPERATOR_REMOVE_Y_OFFSET")){ - HashMap<String,Object> alterOffset = new HashMap<String,Object>(); - alterOffset.put(new String("PARMDBINTERFACE"),SharedVars.getJParmFacade()); + HashMap<String,Object> alterOffset = new HashMap<>(); + Object put1 = alterOffset.put("PARMDBINTERFACE",SharedVars.getJParmFacade()); alterOffset.put("DATASET_OPERATOR_ADD_Y_OFFSET",offsetS); itsSlotManager.modifyPlotInSlot(slotIndex,alterOffset); } @@ -162,14 +162,13 @@ public class PlotSlotsPanel extends javax.swing.JPanel { String[] valueArray = new String[1]; valueArray[0] = ""+itsSlotManager.getSlot(slotIndex).getOffset(); - HashMap<String,Object> alterOffset = new HashMap<String,Object>(); - alterOffset.put(new String("PARMDBINTERFACE"),SharedVars.getJParmFacade()); + HashMap<String,Object> alterOffset = new HashMap<>(); + Object put1 = alterOffset.put("PARMDBINTERFACE",SharedVars.getJParmFacade()); alterOffset.put("DATASET_OPERATOR_REMOVE_Y_OFFSET",valueArray); itsSlotManager.modifyPlotInSlot(slotIndex,alterOffset); itsSlotManager.getSlot(slotIndex).setOffset(0.0); } } catch (PlotterException ex) { - ex.printStackTrace(); } } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/BeamformerConfigurationTableModel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/BeamformerConfigurationTableModel.java index 12906ba8d19..0fdaa9cbde9 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/BeamformerConfigurationTableModel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/BeamformerConfigurationTableModel.java @@ -34,7 +34,6 @@ package nl.astron.lofar.sas.otb.util.tablemodels; import java.util.ArrayList; -import java.util.Vector; import org.apache.log4j.Logger; /** diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/ComponentTableModel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/ComponentTableModel.java index 9f9740ed44c..bfa32636e2e 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/ComponentTableModel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/ComponentTableModel.java @@ -23,7 +23,7 @@ package nl.astron.lofar.sas.otb.util.tablemodels; import java.rmi.RemoteException; -import java.util.Vector; +import java.util.ArrayList; import nl.astron.lofar.sas.otb.jotdb3.jVICnodeDef; import nl.astron.lofar.sas.otb.util.*; import org.apache.log4j.Logger; @@ -73,11 +73,11 @@ public class ComponentTableModel extends javax.swing.table.AbstractTableModel { return false; } data[row][0]=new Integer(tInfo.nodeID()); - data[row][1]=new String(tInfo.name); + data[row][1]=tInfo.name; data[row][2]=new Integer(tInfo.version); - data[row][3]=new String(OtdbRmi.getClassif().get(tInfo.classif)); - data[row][4]=new String(tInfo.constraints); - data[row][5]=new String(tInfo.description); + data[row][3]=OtdbRmi.getClassif().get(tInfo.classif); + data[row][4]=tInfo.constraints; + data[row][5]=tInfo.description; fireTableDataChanged(); } catch (RemoteException e) { logger.error("Remote OTDB via RMI and JNI failed: " + e); @@ -98,24 +98,25 @@ public class ComponentTableModel extends javax.swing.table.AbstractTableModel { return false; } // Get a list of all available Components (topnode) - Vector aComponentList=OtdbRmi.getRemoteMaintenance().getComponentList("%",false); + ArrayList<jVICnodeDef> aComponentList=new ArrayList<>(OtdbRmi.getRemoteMaintenance().getComponentList("%",false)); data = new Object[aComponentList.size()][headers.length]; logger.debug("Componentlist downloaded. Size: "+aComponentList.size()); - for (int k=0; k< aComponentList.size();k++) { - jVICnodeDef tInfo = (jVICnodeDef)aComponentList.elementAt(k); + int k=0; + for (jVICnodeDef tInfo:aComponentList) { if (tInfo == null) { logger.error("No such component found!"); } else { logger.debug("Gathered info for ID: "+tInfo.nodeID()); + data[k][0]=new Integer(tInfo.nodeID()); - data[k][1]=new String(tInfo.name); + data[k][1]=tInfo.name; data[k][2]=new Integer(tInfo.version); - data[k][3]=new String(OtdbRmi.getClassif().get(tInfo.classif)); - data[k][4]=new String(tInfo.constraints); - data[k][5]=new String(tInfo.description); - + data[k][3]=OtdbRmi.getClassif().get(tInfo.classif); + data[k][4]=tInfo.constraints; + data[k][5]=tInfo.description; + k++; /// ToDo Check if topcomponents can be marked or something // try { // if (OtdbRmi.getRemoteMaintenance().isTopComponent(tInfo.nodeID())) { diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/DefaultTemplatetableModel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/DefaultTemplatetableModel.java index 1881374348f..b0134ef1a0a 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/DefaultTemplatetableModel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/DefaultTemplatetableModel.java @@ -24,8 +24,6 @@ package nl.astron.lofar.sas.otb.util.tablemodels; import java.rmi.RemoteException; import java.util.ArrayList; -import java.util.Iterator; -import java.util.Vector; import nl.astron.lofar.sas.otb.jotdb3.jDefaultTemplate; import nl.astron.lofar.sas.otb.jotdb3.jOTDBtree; import nl.astron.lofar.sas.otb.util.*; diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/LogParamTableModel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/LogParamTableModel.java index c103f03f3ca..ea5f871a912 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/LogParamTableModel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/LogParamTableModel.java @@ -23,7 +23,7 @@ package nl.astron.lofar.sas.otb.util.tablemodels; import java.rmi.RemoteException; -import java.util.Vector; +import java.util.ArrayList; import nl.astron.lofar.sas.otb.MainFrame; import nl.astron.lofar.sas.otb.SharedVars; import nl.astron.lofar.sas.otb.jotdb3.jOTDBvalue; @@ -64,20 +64,22 @@ public class LogParamTableModel extends javax.swing.table.AbstractTableModel { } try { OtdbRmi.getRemoteValue().setTreeID(aMainFrame.getSharedVars().getTreeID()); - Vector aLogList=OtdbRmi.getRemoteValue().searchInPeriod(aNodeID, + ArrayList<jOTDBvalue> aLogList=new ArrayList<>(OtdbRmi.getRemoteValue().searchInPeriod(aNodeID, aMainFrame.getSharedVars().getLogParamLevel(), aMainFrame.getSharedVars().getLogParamStartTime(), aMainFrame.getSharedVars().getLogParamEndTime(), - aMainFrame.getSharedVars().getLogParamMostRecent()); + aMainFrame.getSharedVars().getLogParamMostRecent())); if (aLogList==null || aLogList.size()<1 ) { logger.warn("No matches for this searchInPeriod"); return true; } data = new Object[aLogList.size()][headers.length]; - for (int k=0; k< aLogList.size();k++) { - data[k][0]=((jOTDBvalue)aLogList.elementAt(k)).name; - data[k][1]=((jOTDBvalue)aLogList.elementAt(k)).value; - data[k][2]=((jOTDBvalue)aLogList.elementAt(k)).time; + int k=0; + for (jOTDBvalue log:aLogList) { + data[k][0]=log.name; + data[k][1]=log.value; + data[k][2]=log.time; + k++; } fireTableDataChanged(); } catch (RemoteException e) { diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/PICtableModel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/PICtableModel.java index a13cd1af71c..526f309b56a 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/PICtableModel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/PICtableModel.java @@ -23,7 +23,7 @@ package nl.astron.lofar.sas.otb.util.tablemodels; import java.rmi.RemoteException; -import java.util.Vector; +import java.util.ArrayList; import nl.astron.lofar.sas.otb.jotdb3.jOTDBtree; import nl.astron.lofar.sas.otb.util.*; import org.apache.log4j.Logger; @@ -39,7 +39,7 @@ import org.apache.log4j.Logger; * * @updated */ -public class PICtableModel extends javax.swing.table.AbstractTableModel { +public final class PICtableModel extends javax.swing.table.AbstractTableModel { private String headers[] = {"ID","Status","Classification","Creator","CreationTime","ObsoleteTime","Description"}; private OtdbRmi otdbRmi; @@ -77,12 +77,12 @@ public class PICtableModel extends javax.swing.table.AbstractTableModel { return false; } data[row][0]=new Integer(tInfo.treeID()); - data[row][1]=new String(OtdbRmi.getTreeState().get(tInfo.state)); - data[row][2]=new String(OtdbRmi.getClassif().get(tInfo.classification)); - data[row][3]=new String(tInfo.creator); - data[row][4]=new String(tInfo.starttime.replace("T", " ")); - data[row][5]=new String(tInfo.stoptime.replace("T", " ")); - data[row][6]=new String(tInfo.description); + data[row][1]=OtdbRmi.getTreeState().get(tInfo.state); + data[row][2]=OtdbRmi.getClassif().get(tInfo.classification); + data[row][3]=tInfo.creator; + data[row][4]=tInfo.starttime.replace("T", " "); + data[row][5]=tInfo.stoptime.replace("T", " "); + data[row][6]=tInfo.description; fireTableDataChanged(); } catch (RemoteException e) { logger.error("Remote OTDB getTreeInfo failed: " + e); @@ -103,23 +103,23 @@ public class PICtableModel extends javax.swing.table.AbstractTableModel { return false; } // Get a Treelist of all available PIC's - Vector aTreeList=OtdbRmi.getRemoteOTDB().getTreeList(OtdbRmi.getRemoteTypes().getTreeType("hardware"),(short)0); + ArrayList<jOTDBtree> aTreeList=new ArrayList<>(OtdbRmi.getRemoteOTDB().getTreeList(OtdbRmi.getRemoteTypes().getTreeType("hardware"),(short)0)); data = new Object[aTreeList.size()][headers.length]; logger.debug("Treelist downloaded. Size: "+aTreeList.size()); - - for (int k=0; k< aTreeList.size();k++) { - jOTDBtree tInfo = (jOTDBtree)aTreeList.elementAt(k); + int k=0; + for (jOTDBtree tInfo:aTreeList) { if (tInfo == null) { logger.warn("No such tree found!"); } else { logger.debug("Gathered info for ID: "+tInfo.treeID()); data[k][0]=new Integer(tInfo.treeID()); - data[k][1]=new String(OtdbRmi.getTreeState().get(tInfo.state)); - data[k][2]=new String(OtdbRmi.getClassif().get(tInfo.classification)); - data[k][3]=new String(tInfo.creator); - data[k][4]=new String(tInfo.starttime.replace("T", " ")); - data[k][5]=new String(tInfo.stoptime.replace("T", " ")); - data[k][6]=new String(tInfo.description); + data[k][1]=OtdbRmi.getTreeState().get(tInfo.state); + data[k][2]=OtdbRmi.getClassif().get(tInfo.classification); + data[k][3]=tInfo.creator; + data[k][4]=tInfo.starttime.replace("T", " "); + data[k][5]=tInfo.stoptime.replace("T", " "); + data[k][6]=tInfo.description; + k++; } } fireTableDataChanged(); diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/ParamExtensionTableModel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/ParamExtensionTableModel.java index 29b9084f23f..04b250b6cf6 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/ParamExtensionTableModel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/ParamExtensionTableModel.java @@ -33,7 +33,7 @@ package nl.astron.lofar.sas.otb.util.tablemodels; -import java.util.Vector; +import java.util.ArrayList; import nl.astron.lofar.lofarutils.LofarUtils; import org.apache.log4j.Logger; @@ -48,8 +48,8 @@ public class ParamExtensionTableModel extends javax.swing.table.DefaultTableMode private String itsTreeType = null; - private Vector<String> itsKeys = new Vector<String>(); - private Vector<String> itsValues = new Vector<String>(); + private ArrayList<String> itsKeys = new ArrayList<>(); + private ArrayList<String> itsValues = new ArrayList<>(); private boolean isChanged=false; @@ -97,7 +97,7 @@ public class ParamExtensionTableModel extends javax.swing.table.DefaultTableMode } else { itsValues.add(""); } - String[] newRow = {itsKeys.elementAt(i),itsValues.elementAt(i)}; + String[] newRow = {itsKeys.get(i),itsValues.get(i)}; this.addRow(newRow); } @@ -109,7 +109,7 @@ public class ParamExtensionTableModel extends javax.swing.table.DefaultTableMode /** get TableValues * - * @param anAngles1 Vector<String> of all direction 1 angles + * @param anAngles1 ArrayList<String> of all direction 1 angles * * @return True if succes else False */ @@ -142,8 +142,8 @@ public class ParamExtensionTableModel extends javax.swing.table.DefaultTableMode return true; } - itsKeys.addElement(aKey); - itsValues.addElement(aVal); + itsKeys.add(aKey); + itsValues.add(aVal); String[] newRow = {aKey, aVal}; this.addRow(newRow); @@ -160,10 +160,10 @@ public class ParamExtensionTableModel extends javax.swing.table.DefaultTableMode if (row < this.getRowCount() && row >= 0) { //Key this.setValueAt(newRow[0],row,0); - itsKeys.setElementAt(newRow[0], row); + itsKeys.set(row,newRow[0]); //Value this.setValueAt(newRow[1],row,1); - itsValues.setElementAt(newRow[1], row); + itsValues.set(row,newRow[1]); } else { logger.error("Error in updateRow, illegal rownumber supplied"); return false; @@ -196,8 +196,8 @@ public class ParamExtensionTableModel extends javax.swing.table.DefaultTableMode public void removeAllRows() { this.setRowCount(0); - itsKeys.removeAllElements(); - itsValues.removeAllElements(); + itsKeys.clear(); + itsValues.clear(); isChanged=true; } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/PencilConfigurationTableModel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/PencilConfigurationTableModel.java index 527215292a5..057cd2c8370 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/PencilConfigurationTableModel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/PencilConfigurationTableModel.java @@ -33,6 +33,7 @@ package nl.astron.lofar.sas.otb.util.tablemodels; +import java.util.ArrayList; import java.util.Vector; import org.apache.log4j.Logger; @@ -47,9 +48,9 @@ public class PencilConfigurationTableModel extends javax.swing.table.DefaultTabl private String itsTreeType = null; - private Vector<String> itsAngles1 = new Vector<String>(); - private Vector<String> itsAngles2 = new Vector<String>(); - private Vector<String> itsCoordTypes = new Vector<String>(); + private ArrayList<String> itsAngles1 = new ArrayList<>(); + private ArrayList<String> itsAngles2 = new ArrayList<>(); + private ArrayList<String> itsCoordTypes = new ArrayList<>(); private int offset=1; @@ -70,7 +71,7 @@ public class PencilConfigurationTableModel extends javax.swing.table.DefaultTabl * * @return True if succes else False */ - public boolean fillTable(String treeType, Vector<String> anAngles1,Vector<String> anAngles2,Vector<String> aCoordType,boolean refill){ + public boolean fillTable(String treeType, ArrayList<String> anAngles1,ArrayList<String> anAngles2,ArrayList<String> aCoordType,boolean refill){ // "clear" the table setRowCount(0); @@ -98,9 +99,9 @@ public class PencilConfigurationTableModel extends javax.swing.table.DefaultTabl // need to skip first entry because it is the default (dummy) TBBsetting for (int i=0; i<length-offset; i++) { - String[] newRow = { itsAngles1.elementAt(i+offset), - itsAngles2.elementAt(i+offset), - itsCoordTypes.elementAt(i+offset), + String[] newRow = { itsAngles1.get(i+offset), + itsAngles2.get(i+offset), + itsCoordTypes.get(i+offset), }; this.addRow(newRow); @@ -118,18 +119,27 @@ public class PencilConfigurationTableModel extends javax.swing.table.DefaultTabl * * @return True if succes else False */ - public boolean getTable(Vector<String> anAngles1,Vector<String> anAngles2,Vector<String> aCoordType) { + public boolean getTable(ArrayList<String> anAngles1,ArrayList<String> anAngles2,ArrayList<String> aCoordType) { // need to skip first entry because it is the default (dummy) TBBsetting // empty all elements except the default - anAngles1.setSize(1); - anAngles2.setSize(1); - aCoordType.setSize(1); + String def=""; + def = anAngles1.get(0); + anAngles1.clear(); + anAngles1.add(def); + + def = anAngles2.get(0); + anAngles2.clear(); + anAngles2.add(def); + + def = aCoordType.get(0); + aCoordType.clear(); + aCoordType.add(def); for (int i=0; i<getRowCount(); i++) { - anAngles1.addElement((String)getValueAt(i,0)); - anAngles2.addElement((String)getValueAt(i,1)); - aCoordType.addElement((String)getValueAt(i,2)); + anAngles1.add((String)getValueAt(i,0)); + anAngles2.add((String)getValueAt(i,1)); + aCoordType.add((String)getValueAt(i,2)); } return true; } @@ -169,13 +179,13 @@ public class PencilConfigurationTableModel extends javax.swing.table.DefaultTabl if (row < this.getRowCount() && row >= 0) { //Angle1 this.setValueAt(newRow[0],row,0); - itsAngles1.setElementAt(newRow[0], row+offset); + itsAngles1.set(row+offset,newRow[0]); //Angle2 this.setValueAt(newRow[1],row,1); - itsAngles2.setElementAt(newRow[1], row+offset); + itsAngles2.set(row+offset,newRow[1]); //CoordType this.setValueAt(newRow[2],row,2); - itsCoordTypes.setElementAt(newRow[2], row+offset); + itsCoordTypes.set( row+offset,newRow[2]); } else { logger.error("Error in updateRow, illegal rownumber supplied"); @@ -210,9 +220,9 @@ public class PencilConfigurationTableModel extends javax.swing.table.DefaultTabl public void removeAllRows() { this.setRowCount(0); - itsAngles1.removeAllElements(); - itsAngles2.removeAllElements(); - itsCoordTypes.removeAllElements(); + itsAngles1.clear(); + itsAngles2.clear(); + itsCoordTypes.clear(); isChanged=true; } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/StateChangeHistoryTableModel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/StateChangeHistoryTableModel.java index 67d3d884c82..6831e93bfa5 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/StateChangeHistoryTableModel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/StateChangeHistoryTableModel.java @@ -23,7 +23,7 @@ package nl.astron.lofar.sas.otb.util.tablemodels; import java.rmi.RemoteException; -import java.util.Vector; +import java.util.ArrayList; import nl.astron.lofar.sas.otb.jotdb3.jTreeState; import nl.astron.lofar.sas.otb.util.*; import org.apache.log4j.Logger; @@ -39,7 +39,7 @@ import org.apache.log4j.Logger; * * @updated */ -public class StateChangeHistoryTableModel extends javax.swing.table.DefaultTableModel { +public final class StateChangeHistoryTableModel extends javax.swing.table.DefaultTableModel { private String headers[] = {"ID","MomID","New State","UserName","TimeStamp"}; private OtdbRmi otdbRmi; @@ -54,7 +54,7 @@ public class StateChangeHistoryTableModel extends javax.swing.table.DefaultTable this.otdbRmi = otdbRmi; this.itsTreeID=treeID; - fillTable(); + boolean fillTable = fillTable(); } public void setTree(int treeID) { @@ -79,21 +79,21 @@ public class StateChangeHistoryTableModel extends javax.swing.table.DefaultTable this.setRowCount(0); // Get a stateList of all available changes - Vector<jTreeState> aStateList=OtdbRmi.getRemoteOTDB().getStateList(itsTreeID, false); + ArrayList<jTreeState> aStateList=new ArrayList(OtdbRmi.getRemoteOTDB().getStateList(itsTreeID, false)); data = new Object[aStateList.size()][headers.length]; logger.debug("Statelist downloaded. Size: "+aStateList.size()); for (int k=0; k< aStateList.size();k++) { - jTreeState tState = aStateList.elementAt(k); + jTreeState tState = aStateList.get(k); if (tState == null) { logger.warn("No such treeState found!"); } else { logger.debug("Gathered info for ID: "+tState.treeID); data[k][0]=new Integer(tState.treeID); data[k][1]=new Integer(tState.momID); - data[k][2]=new String(OtdbRmi.getTreeState().get(tState.newState)); - data[k][3]=new String(tState.username); - data[k][4]=new String(tState.timestamp.replace("T", " ")); + data[k][2]=OtdbRmi.getTreeState().get(tState.newState); + data[k][3]=tState.username; + data[k][4]=tState.timestamp.replace("T", " "); } } fireTableDataChanged(); diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/TBBConfigurationTableModel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/TBBConfigurationTableModel.java index 6864d49d683..4a46bb748a5 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/TBBConfigurationTableModel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/TBBConfigurationTableModel.java @@ -33,7 +33,7 @@ package nl.astron.lofar.sas.otb.util.tablemodels; -import java.util.Vector; +import java.util.ArrayList; import org.apache.log4j.Logger; /** @@ -45,6 +45,7 @@ public class TBBConfigurationTableModel extends javax.swing.table.DefaultTableMo static Logger logger = Logger.getLogger(TBBConfigurationTableModel.class); static String name = "TBBConfigurationTableModel"; + private String itsTreeType; private boolean isChanged=false; @@ -74,31 +75,31 @@ public class TBBConfigurationTableModel extends javax.swing.table.DefaultTableMo /** fills the table with the initial settings * - * @param aMode Vector<String> of all OperatingModes - * @param aTrigger Vector<String> of all TriggerModes - * @param aBase Vector<String> of all Baselevels - * @param aStart Vector<String> of all Startlevels - * @param aStop Vector<String> of all Stoplevels - * @param aFilter Vector<String> of all Filters - * @param aWindow Vector<String> of all Windows - * @param aF0C0 Vector<String> of all Filter0Coeff0s - * @param aF0C1 Vector<String> of all Filter0Coeff1s - * @param aF0C2 Vector<String> of all Filter0Coeff2s - * @param aF0C3 Vector<String> of all Filter0Coeff3s - * @param aF1C0 Vector<String> of all Filter1Coeff0s - * @param aF1C1 Vector<String> of all Filter1Coeff1s - * @param aF1C2 Vector<String> of all Filter1Coeff2s - * @param aF1C3 Vector<String> of all Filter1Coeff3s - * @param aRCUs Vector<String> of all RCUs involved - * @param aSubbandList Vector<String> of all subbands involved + * @param aMode ArrayList<String> of all OperatingModes + * @param aTrigger ArrayList<String> of all TriggerModes + * @param aBase ArrayList<String> of all Baselevels + * @param aStart ArrayList<String> of all Startlevels + * @param aStop ArrayList<String> of all Stoplevels + * @param aFilter ArrayList<String> of all Filters + * @param aWindow ArrayList<String> of all Windows + * @param aF0C0 ArrayList<String> of all Filter0Coeff0s + * @param aF0C1 ArrayList<String> of all Filter0Coeff1s + * @param aF0C2 ArrayList<String> of all Filter0Coeff2s + * @param aF0C3 ArrayList<String> of all Filter0Coeff3s + * @param aF1C0 ArrayList<String> of all Filter1Coeff0s + * @param aF1C1 ArrayList<String> of all Filter1Coeff1s + * @param aF1C2 ArrayList<String> of all Filter1Coeff2s + * @param aF1C3 ArrayList<String> of all Filter1Coeff3s + * @param aRCUs ArrayList<String> of all RCUs involved + * @param aSubbandList ArrayList<String> of all subbands involved * * @return True if succes else False */ - public boolean fillTable(String treeType,Vector<String> aMode,Vector<String> aTrigger,Vector<String> aBase,Vector<String> aStart, - Vector<String> aStop, Vector<String> aFilter, Vector<String> aWindow, Vector<String> aF0C0, - Vector<String> aF0C1, Vector<String> aF0C2, Vector<String> aF0C3, Vector<String> aF1C0, - Vector<String> aF1C1, Vector<String> aF1C2, Vector<String> aF1C3, Vector<String> aRCUs, - Vector<String> aSubbandList) { + public boolean fillTable(String treeType,ArrayList<String> aMode,ArrayList<String> aTrigger,ArrayList<String> aBase,ArrayList<String> aStart, + ArrayList<String> aStop, ArrayList<String> aFilter, ArrayList<String> aWindow, ArrayList<String> aF0C0, + ArrayList<String> aF0C1, ArrayList<String> aF0C2, ArrayList<String> aF0C3, ArrayList<String> aF1C0, + ArrayList<String> aF1C1, ArrayList<String> aF1C2, ArrayList<String> aF1C3, ArrayList<String> aRCUs, + ArrayList<String> aSubbandList) { itsTreeType=treeType; // "clear" the table @@ -116,23 +117,23 @@ public class TBBConfigurationTableModel extends javax.swing.table.DefaultTableMo offset=0; } for (int i=0; i<length-offset; i++) { - String[] newRow = { aMode.elementAt(i+offset), - aTrigger.elementAt(i+offset), - aBase.elementAt(i+offset), - aStart.elementAt(i+offset), - aStop.elementAt(i+offset), - aFilter.elementAt(i+offset), - aWindow.elementAt(i+offset), - aF0C0.elementAt(i+offset), - aF0C1.elementAt(i+offset), - aF0C2.elementAt(i+offset), - aF0C3.elementAt(i+offset), - aF1C0.elementAt(i+offset), - aF1C1.elementAt(i+offset), - aF1C2.elementAt(i+offset), - aF1C3.elementAt(i+offset), - aRCUs.elementAt(i+offset), - aSubbandList.elementAt(i+offset)}; + String[] newRow = { aMode.get(i+offset), + aTrigger.get(i+offset), + aBase.get(i+offset), + aStart.get(i+offset), + aStop.get(i+offset), + aFilter.get(i+offset), + aWindow.get(i+offset), + aF0C0.get(i+offset), + aF0C1.get(i+offset), + aF0C2.get(i+offset), + aF0C3.get(i+offset), + aF1C0.get(i+offset), + aF1C1.get(i+offset), + aF1C2.get(i+offset), + aF1C3.get(i+offset), + aRCUs.get(i+offset), + aSubbandList.get(i+offset)}; this.addRow(newRow); } // only initial settings added @@ -143,73 +144,129 @@ public class TBBConfigurationTableModel extends javax.swing.table.DefaultTableMo /** fills the table with the initial settings * - * @param aMode Vector<String> of all OperatingModes - * @param aTrigger Vector<String> of all triggerModes - * @param aBase Vector<String> of all Baselevels - * @param aStart Vector<String> of all Startlevels - * @param aStop Vector<String> of all Stoplevels - * @param aFilter Vector<String> of all Filters - * @param aWindow Vector<String> of all Windows - * @param aF0C0 Vector<String> of all Filter0Coeff0s - * @param aF0C1 Vector<String> of all Filter0Coeff1s - * @param aF0C2 Vector<String> of all Filter0Coeff2s - * @param aF0C3 Vector<String> of all Filter0Coeff3s - * @param aF1C0 Vector<String> of all Filter1Coeff0s - * @param aF1C1 Vector<String> of all Filter1Coeff1s - * @param aF1C2 Vector<String> of all Filter1Coeff2s - * @param aF1C3 Vector<String> of all Filter1Coeff3s - * @param aRCUs Vector<String> of all RCUs involved - * @param aSubbandList Vector<String> of all subbands involved + * @param aMode ArrayList<String> of all OperatingModes + * @param aTrigger ArrayList<String> of all triggerModes + * @param aBase ArrayList<String> of all Baselevels + * @param aStart ArrayList<String> of all Startlevels + * @param aStop ArrayList<String> of all Stoplevels + * @param aFilter ArrayList<String> of all Filters + * @param aWindow ArrayList<String> of all Windows + * @param aF0C0 ArrayList<String> of all Filter0Coeff0s + * @param aF0C1 ArrayList<String> of all Filter0Coeff1s + * @param aF0C2 ArrayList<String> of all Filter0Coeff2s + * @param aF0C3 ArrayList<String> of all Filter0Coeff3s + * @param aF1C0 ArrayList<String> of all Filter1Coeff0s + * @param aF1C1 ArrayList<String> of all Filter1Coeff1s + * @param aF1C2 ArrayList<String> of all Filter1Coeff2s + * @param aF1C3 ArrayList<String> of all Filter1Coeff3s + * @param aRCUs ArrayList<String> of all RCUs involved + * @param aSubbandList ArrayList<String> of all subbands involved * * @return True if succes else False */ - public boolean getTable(Vector<String> aMode,Vector<String> aTrigger,Vector<String> aBase,Vector<String> aStart, - Vector<String> aStop, Vector<String> aFilter, Vector<String> aWindow, Vector<String> aF0C0, - Vector<String> aF0C1, Vector<String> aF0C2, Vector<String> aF0C3, Vector<String> aF1C0, - Vector<String> aF1C1, Vector<String> aF1C2, Vector<String> aF1C3, Vector<String> aRCUs, - Vector<String> aSubbandList) { + public boolean getTable(ArrayList<String> aMode,ArrayList<String> aTrigger,ArrayList<String> aBase,ArrayList<String> aStart, + ArrayList<String> aStop, ArrayList<String> aFilter, ArrayList<String> aWindow, ArrayList<String> aF0C0, + ArrayList<String> aF0C1, ArrayList<String> aF0C2, ArrayList<String> aF0C3, ArrayList<String> aF1C0, + ArrayList<String> aF1C1, ArrayList<String> aF1C2, ArrayList<String> aF1C3, ArrayList<String> aRCUs, + ArrayList<String> aSubbandList) { int length = aMode.size(); // need to skip first entry because it is the default (dummy) TBBsetting // empty all elements except the default - aMode.setSize(1); - aTrigger.setSize(1); - aBase.setSize(1); - aStart.setSize(1); - aStop.setSize(1); - aFilter.setSize(1); - aWindow.setSize(1); - aF0C0.setSize(1); - aF0C1.setSize(1); - aF0C2.setSize(1); - aF0C3.setSize(1); - aF1C0.setSize(1); - aF1C1.setSize(1); - aF1C2.setSize(1); - aF1C3.setSize(1); - aRCUs.setSize(1); - aSubbandList.setSize(1); + String def =""; + if (!itsTreeType.equals("VHtree")) { + + def = aMode.get(0); + aMode.clear(); + aMode.add(def); + + def = aTrigger.get(0); + aTrigger.clear(); + aTrigger.add(def); + + def = aBase.get(0); + aBase.clear(); + aBase.add(def); + + def = aStart.get(0); + aStart.clear(); + aStart.add(def); + + def = aStop.get(0); + aStop.clear(); + aStop.add(def); + + def = aFilter.get(0); + aFilter.clear(); + aFilter.add(def); + + def = aWindow.get(0); + aWindow.clear(); + aWindow.add(def); + + def = aF0C0.get(0); + aF0C0.clear(); + aF0C0.add(def); + + def = aF0C1.get(0); + aF0C1.clear(); + aF0C1.add(def); + + def = aF0C2.get(0); + aF0C2.clear(); + aF0C2.add(def); + + def = aF0C3.get(0); + aF0C3.clear(); + aF0C3.add(def); + + def = aF1C0.get(0); + aF1C0.clear(); + aF1C0.add(def); + + def = aF1C1.get(0); + aF1C1.clear(); + aF1C1.add(def); + + def = aF1C2.get(0); + aF1C2.clear(); + aF1C2.add(def); + + def = aF1C3.get(0); + aF1C3.clear(); + aF1C3.add(def); + + def = aRCUs.get(0); + aRCUs.clear(); + aRCUs.add(def); + + def = aSubbandList.get(0); + aSubbandList.clear(); + aSubbandList.add(def); + + + } for (int i=0; i<getRowCount(); i++) { - aMode.addElement((String)getValueAt(i,0)); - aTrigger.addElement((String)getValueAt(i,1)); - aBase.addElement((String)getValueAt(i,2)); - aStart.addElement((String)getValueAt(i,3)); - aStop.addElement((String)getValueAt(i,4)); - aFilter.addElement((String)getValueAt(i,5)); - aWindow.addElement((String)getValueAt(i,6)); - aF0C0.addElement((String)getValueAt(i,7)); - aF0C1.addElement((String)getValueAt(i,8)); - aF0C2.addElement((String)getValueAt(i,9)); - aF0C3.addElement((String)getValueAt(i,10)); - aF1C0.addElement((String)getValueAt(i,11)); - aF1C1.addElement((String)getValueAt(i,12)); - aF1C2.addElement((String)getValueAt(i,13)); - aF1C3.addElement((String)getValueAt(i,14)); - aRCUs.addElement((String)getValueAt(i,15)); - aSubbandList.addElement((String)getValueAt(i,16)); + aMode.add((String)getValueAt(i,0)); + aTrigger.add((String)getValueAt(i,1)); + aBase.add((String)getValueAt(i,2)); + aStart.add((String)getValueAt(i,3)); + aStop.add((String)getValueAt(i,4)); + aFilter.add((String)getValueAt(i,5)); + aWindow.add((String)getValueAt(i,6)); + aF0C0.add((String)getValueAt(i,7)); + aF0C1.add((String)getValueAt(i,8)); + aF0C2.add((String)getValueAt(i,9)); + aF0C3.add((String)getValueAt(i,10)); + aF1C0.add((String)getValueAt(i,11)); + aF1C1.add((String)getValueAt(i,12)); + aF1C2.add((String)getValueAt(i,13)); + aF1C3.add((String)getValueAt(i,14)); + aRCUs.add((String)getValueAt(i,15)); + aSubbandList.add((String)getValueAt(i,16)); } return true; } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/TemplatetableModel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/TemplatetableModel.java index 87e533cf2e1..a68b81b9f7c 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/TemplatetableModel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/TemplatetableModel.java @@ -23,7 +23,7 @@ package nl.astron.lofar.sas.otb.util.tablemodels; import java.rmi.RemoteException; -import java.util.Vector; +import java.util.ArrayList; import nl.astron.lofar.sas.otb.jotdb3.jOTDBtree; import nl.astron.lofar.sas.otb.util.*; import org.apache.log4j.Logger; @@ -75,13 +75,13 @@ public class TemplatetableModel extends javax.swing.table.AbstractTableModel { return false; } data[row][0]=new Integer(tInfo.treeID()); - data[row][1]=new String(OtdbRmi.getTreeState().get(tInfo.state)); - data[row][2]=new String(tInfo.processType); - data[row][3]=new String(tInfo.processSubtype); - data[row][4]=new String(tInfo.strategy); - data[row][5]=new String(OtdbRmi.getClassif().get(tInfo.classification)); - data[row][6]=new String(tInfo.campaign); - data[row][7]=new String(tInfo.description); + data[row][1]=OtdbRmi.getTreeState().get(tInfo.state); + data[row][2]=tInfo.processType; + data[row][3]=tInfo.processSubtype; + data[row][4]=tInfo.strategy; + data[row][5]=OtdbRmi.getClassif().get(tInfo.classification); + data[row][6]=tInfo.campaign; + data[row][7]=tInfo.description; fireTableDataChanged(); } catch (RemoteException e) { logger.debug("Remote OTDB getTreeInfo failed: " + e); @@ -101,24 +101,24 @@ public class TemplatetableModel extends javax.swing.table.AbstractTableModel { return false; } // Get a Treelist of all available VItemplate's - Vector aTreeList=OtdbRmi.getRemoteOTDB().getTreeList(OtdbRmi.getRemoteTypes().getTreeType("VItemplate"),(short)0); + ArrayList aTreeList=new ArrayList(OtdbRmi.getRemoteOTDB().getTreeList(OtdbRmi.getRemoteTypes().getTreeType("VItemplate"),(short)0)); data = new Object[aTreeList.size()][headers.length]; logger.debug("Treelist downloaded. Size: "+aTreeList.size()); for (int k=0; k< aTreeList.size();k++) { - jOTDBtree tInfo = (jOTDBtree)aTreeList.elementAt(k); + jOTDBtree tInfo = (jOTDBtree)aTreeList.get(k); if (tInfo.treeID()==0) { logger.warn("No such tree found!"); } else { logger.debug("Gathered info for ID: "+tInfo.treeID()); data[k][0]=new Integer(tInfo.treeID()); - data[k][1]=new String(OtdbRmi.getTreeState().get(tInfo.state)); - data[k][2]=new String(tInfo.processType); - data[k][3]=new String(tInfo.processSubtype); - data[k][4]=new String(tInfo.strategy); - data[k][5]=new String(OtdbRmi.getClassif().get(tInfo.classification)); - data[k][6]=new String(tInfo.campaign); - data[k][7]=new String(tInfo.description); + data[k][1]=OtdbRmi.getTreeState().get(tInfo.state); + data[k][2]=tInfo.processType; + data[k][3]=tInfo.processSubtype; + data[k][4]=tInfo.strategy; + data[k][5]=OtdbRmi.getClassif().get(tInfo.classification); + data[k][6]=tInfo.campaign; + data[k][7]=tInfo.description; } } fireTableDataChanged(); diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/VICtableModel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/VICtableModel.java index 491f0c6b426..0c39d5130a3 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/VICtableModel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/tablemodels/VICtableModel.java @@ -11,7 +11,7 @@ package nl.astron.lofar.sas.otb.util.tablemodels; import java.rmi.RemoteException; -import java.util.Vector; +import java.util.ArrayList; import nl.astron.lofar.sas.otb.jotdb3.jOTDBtree; import nl.astron.lofar.sas.otb.util.*; import org.apache.log4j.Logger; @@ -63,14 +63,14 @@ public class VICtableModel extends javax.swing.table.AbstractTableModel { return false; } data[row][0]=new Integer(tInfo.treeID()); - data[row][1]=new String(OtdbRmi.getTreeState().get(tInfo.state)); - data[row][2]=new String(tInfo.processType); - data[row][3]=new String(tInfo.processSubtype); - data[row][4]=new String(tInfo.strategy); - data[row][5]=new String(tInfo.campaign); - data[row][6]=new String(tInfo.starttime.replace("T", " ")); - data[row][7]=new String(tInfo.stoptime.replace("T", " ")); - data[row][8]=new String(tInfo.description); + data[row][1]=OtdbRmi.getTreeState().get(tInfo.state); + data[row][2]=tInfo.processType; + data[row][3]=tInfo.processSubtype; + data[row][4]=tInfo.strategy; + data[row][5]=tInfo.campaign; + data[row][6]=tInfo.starttime.replace("T", " "); + data[row][7]=tInfo.stoptime.replace("T", " "); + data[row][8]=tInfo.description; fireTableDataChanged(); } catch (RemoteException e) { logger.debug("Remote OTDB getTreeInfo failed: " + e); @@ -90,25 +90,25 @@ public class VICtableModel extends javax.swing.table.AbstractTableModel { return false; } // Get a Treelist of all available VHtree's - Vector aTreeList=OtdbRmi.getRemoteOTDB().getTreeList(OtdbRmi.getRemoteTypes().getTreeType("VHtree"),(short)0); + ArrayList aTreeList=new ArrayList(OtdbRmi.getRemoteOTDB().getTreeList(OtdbRmi.getRemoteTypes().getTreeType("VHtree"),(short)0)); data = new Object[aTreeList.size()][headers.length]; logger.debug("Treelist downloaded. Size: "+aTreeList.size()); for (int k=0; k< aTreeList.size();k++) { - jOTDBtree tInfo = (jOTDBtree)aTreeList.elementAt(k); + jOTDBtree tInfo = (jOTDBtree)aTreeList.get(k); if (tInfo.treeID()==0) { logger.error("No such tree found!"); } else { logger.debug("Gathered info for ID: "+tInfo.treeID()); data[k][0]=new Integer(tInfo.treeID()); - data[k][1]=new String(OtdbRmi.getTreeState().get(tInfo.state)); - data[k][2]=new String(tInfo.processType); - data[k][3]=new String(tInfo.processSubtype); - data[k][4]=new String(tInfo.strategy); - data[k][5]=new String(tInfo.campaign); - data[k][6]=new String(tInfo.starttime.replace("T", " ")); - data[k][7]=new String(tInfo.stoptime.replace("T", " ")); - data[k][8]=new String(tInfo.description); + data[k][1]=OtdbRmi.getTreeState().get(tInfo.state); + data[k][2]=tInfo.processType; + data[k][3]=tInfo.processSubtype; + data[k][4]=tInfo.strategy; + data[k][5]=tInfo.campaign; + data[k][6]=tInfo.starttime.replace("T", " "); + data[k][7]=tInfo.stoptime.replace("T", " "); + data[k][8]=tInfo.description; } } fireTableDataChanged(); diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/OTDBParamTreeManager.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/OTDBParamTreeManager.java index 0b7fc02cdfc..dcc5316b687 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/OTDBParamTreeManager.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/OTDBParamTreeManager.java @@ -23,8 +23,7 @@ package nl.astron.lofar.sas.otb.util.treemanagers; import java.rmi.RemoteException; -import java.util.Enumeration; -import java.util.Vector; +import java.util.ArrayList; import javax.swing.event.TreeModelEvent; import nl.astron.lofar.sas.otb.jotdb3.jOTDBparam; import nl.astron.lofar.sas.otb.jotdb3.jVICnodeDef; @@ -105,7 +104,7 @@ public class OTDBParamTreeManager extends GenericTreeManager implements ITreeMan try { - Vector<jVICnodeDef> nodes = OtdbRmi.getRemoteMaintenance().getComponentList(aNodeName,false); + ArrayList<jVICnodeDef> nodes = new ArrayList(OtdbRmi.getRemoteMaintenance().getComponentList(aNodeName,false)); if (nodes.size() > 0) { logger.debug("Found "+ nodes.size()+ " nr of matches for node "+aNodeName); } else { @@ -113,10 +112,8 @@ public class OTDBParamTreeManager extends GenericTreeManager implements ITreeMan return; } - Vector<jOTDBparam> params = OtdbRmi.getRemoteMaintenance().getComponentParams(((jVICnodeDef)nodes.elementAt(0)).nodeID()); - Enumeration e = params.elements(); - while( e.hasMoreElements() ) { - jOTDBparam item = (jOTDBparam)e.nextElement(); + ArrayList<jOTDBparam> params = new ArrayList(OtdbRmi.getRemoteMaintenance().getComponentParams(((jVICnodeDef)nodes.get(0)).nodeID())); + for (jOTDBparam item:params) { TreeNode newNode = new TreeNode(OTDBParamTreeManager.instance,item,item.name); aNode.add(newNode); //testcode to add parmdb diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/ParmDBTreeManager.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/ParmDBTreeManager.java index 9eb9264b68b..f3df191aac1 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/ParmDBTreeManager.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/ParmDBTreeManager.java @@ -23,8 +23,8 @@ package nl.astron.lofar.sas.otb.util.treemanagers; import java.rmi.RemoteException; +import java.util.ArrayList; import java.util.Enumeration; -import java.util.Vector; import javax.swing.event.TreeModelEvent; import nl.astron.lofar.sas.otb.SharedVars; import nl.astron.lofar.sas.otb.util.UserAccount; @@ -96,18 +96,16 @@ public class ParmDBTreeManager extends GenericTreeManager implements ITreeManage // once for the root node and never thereafter. if(userNode.isRootNode()){ logger.trace("ParmDBtreeNode calling getNames("+userNode.getNodeID().substring(userNode.getParmDBIdentifier().length())+"*)"); - Vector children = SharedVars.getJParmFacade().getNames("*"); + ArrayList<String> children = SharedVars.getJParmFacade().getNames("*"); logger.trace("ParmDBtreeNode gets "+children.size()+" names"); - if(children.size() == 0) + if(children.isEmpty()) { userNode.setLeaf(true); } else { - Enumeration e = children.elements(); - while( e.hasMoreElements() ) { - String pathString = (String) e.nextElement(); + for (String pathString:children) { logger.trace("definePath: " + pathString); definePath(aNode, pathString.split(PARMDB_TREENODE_SEPARATOR_CHAR), 0); } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/ResultTreeManager.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/ResultTreeManager.java index c14f24e7c02..75c3e2d4b6c 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/ResultTreeManager.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/ResultTreeManager.java @@ -23,8 +23,7 @@ package nl.astron.lofar.sas.otb.util.treemanagers; import java.rmi.RemoteException; -import java.util.Enumeration; -import java.util.Vector; +import java.util.ArrayList; import javax.swing.event.TreeModelEvent; import nl.astron.lofar.sas.otb.jotdb3.jOTDBnode; import nl.astron.lofar.sas.otb.util.OtdbRmi; @@ -108,12 +107,10 @@ public class ResultTreeManager extends GenericTreeManager implements ITreeManage aNode.areChildrenDefined = true; try { - Vector childs = - OtdbRmi.getRemoteMaintenance().getItemList(((jOTDBnode)aNode.getUserObject()).treeID(), ((jOTDBnode)aNode.getUserObject()).nodeID(), 1); + ArrayList<jOTDBnode> childs = new ArrayList( + OtdbRmi.getRemoteMaintenance().getItemList(((jOTDBnode)aNode.getUserObject()).treeID(), ((jOTDBnode)aNode.getUserObject()).nodeID(), 1)); - Enumeration e = childs.elements(); - while( e.hasMoreElements() ) { - jOTDBnode item = (jOTDBnode)e.nextElement(); + for (jOTDBnode item:childs) { logger.trace("Node name selected :"+item.name); TreeNode newNode = new TreeNode(ResultTreeManager.instance,item,item.name); aNode.add(newNode); diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/TemplateTreeManager.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/TemplateTreeManager.java index f87b0577a57..5a9fa1078dd 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/TemplateTreeManager.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otb/util/treemanagers/TemplateTreeManager.java @@ -23,8 +23,7 @@ package nl.astron.lofar.sas.otb.util.treemanagers; import java.rmi.RemoteException; -import java.util.Enumeration; -import java.util.Vector; +import java.util.ArrayList; import javax.swing.event.TreeModelEvent; import nl.astron.lofar.sas.otb.jotdb3.jOTDBnode; import nl.astron.lofar.sas.otb.util.OtdbRmi; @@ -108,12 +107,9 @@ public class TemplateTreeManager extends GenericTreeManager implements ITreeMana aNode.areChildrenDefined = true; try { - Vector childs = - OtdbRmi.getRemoteMaintenance().getItemList(((jOTDBnode)aNode.getUserObject()).treeID(), ((jOTDBnode)aNode.getUserObject()).nodeID(), 1); - - Enumeration e = childs.elements(); - while( e.hasMoreElements() ) { - jOTDBnode item = (jOTDBnode)e.nextElement(); + ArrayList<jOTDBnode> childs = new ArrayList( + OtdbRmi.getRemoteMaintenance().getItemList(((jOTDBnode)aNode.getUserObject()).treeID(), ((jOTDBnode)aNode.getUserObject()).nodeID(), 1)); + for (jOTDBnode item:childs) { logger.trace("Node name selected :"+item.name); TreeNode newNode = new TreeNode(TemplateTreeManager.instance,item,item.name); aNode.add(newNode); diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ButtonPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ButtonPanel.form index a7410490586..ff3471b0ced 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ButtonPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ButtonPanel.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ButtonPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ButtonPanel.java index 10ccb4578c6..7b3de11c2a1 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ButtonPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ButtonPanel.java @@ -36,14 +36,14 @@ import org.apache.log4j.Logger; * * @updated */ -public class ButtonPanel extends javax.swing.JPanel { +public final class ButtonPanel extends javax.swing.JPanel { static Logger logger = Logger.getLogger(ButtonPanel.class); static String name = "ButtonPanel"; /** Creates new form BeanForm */ public ButtonPanel() { - buttons = new HashMap<String,JButton>(); + buttons = new HashMap<>(); initComponents(); hasPlaceHolder=true; } @@ -139,7 +139,7 @@ public class ButtonPanel extends javax.swing.JPanel { jPanelButtons.remove(buttons.get(aKey)); buttons.remove(aKey); } - if (buttons.size() == 0) { + if (buttons.isEmpty()) { jPanelButtons.add(buttonsPlaceHolder); hasPlaceHolder=true; } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/CampaignInfo.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/CampaignInfo.form index 89f497de692..22ab9ecfc07 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/CampaignInfo.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/CampaignInfo.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.2" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/CampaignInfo.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/CampaignInfo.java index 58860084bb6..a650784f061 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/CampaignInfo.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/CampaignInfo.java @@ -13,7 +13,7 @@ package nl.astron.lofar.sas.otbcomponents; import java.rmi.RemoteException; import java.util.Iterator; -import java.util.Vector; +import java.util.ArrayList; import nl.astron.lofar.lofarutils.LofarUtils; import nl.astron.lofar.sas.otb.MainFrame; import nl.astron.lofar.sas.otb.jotdb3.jCampaignInfo; @@ -106,7 +106,7 @@ public class CampaignInfo extends javax.swing.JPanel { // get all existing campaigns to fill the combobox, set default to original CampainName // only possible for Campaigns that have NoCampaign if (isEditable) { - itsCampaignList=OtdbRmi.getRemoteCampaign().getCampaignList(); + itsCampaignList=new ArrayList(OtdbRmi.getRemoteCampaign().getCampaignList()); if (itsCampaignList.size() > 0) { Iterator itr = itsCampaignList.iterator(); while (itr.hasNext()){ @@ -174,7 +174,7 @@ public class CampaignInfo extends javax.swing.JPanel { private jCampaignInfo itsCampaignInfo = null; private boolean isEditable=false; private boolean isChanged=false; - Vector<jCampaignInfo> itsCampaignList=null; + ArrayList<jCampaignInfo> itsCampaignList=null; /** This method is called from within the constructor to * initialize the form. diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LogParamPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LogParamPanel.form index 02fd93a0ccb..1ed560ef41a 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LogParamPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LogParamPanel.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.3" maxVersion="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> @@ -20,8 +20,8 @@ <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> <Component id="jPanel1" alignment="1" max="32767" attributes="0"/> - <Component id="titleText" alignment="0" pref="983" max="32767" attributes="3"/> - <Component id="tablePanel1" alignment="0" pref="983" max="32767" attributes="0"/> + <Component id="titleText" alignment="0" pref="1033" max="32767" attributes="3"/> + <Component id="tablePanel1" alignment="0" pref="1033" max="32767" attributes="0"/> </Group> <EmptySpace max="-2" attributes="0"/> </Group> @@ -79,7 +79,7 @@ <Group type="103" groupAlignment="0" attributes="0"> <Group type="102" attributes="0"> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="LogParamNameText" alignment="0" pref="884" max="32767" attributes="1"/> + <Component id="LogParamNameText" alignment="0" pref="909" max="32767" attributes="1"/> <Group type="102" alignment="0" attributes="0"> <Group type="103" groupAlignment="1" max="-2" attributes="0"> <Component id="LogParamEndTimeText" alignment="0" max="32767" attributes="1"/> @@ -103,7 +103,7 @@ </Group> <Group type="102" alignment="0" attributes="0"> <Component id="LogParamRecentOnlyCheckbox" min="-2" max="-2" attributes="0"/> - <EmptySpace pref="862" max="32767" attributes="0"/> + <EmptySpace pref="872" max="32767" attributes="0"/> </Group> </Group> </Group> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LogParamPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LogParamPanel.java index c78f39e5000..7506058ca58 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LogParamPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LogParamPanel.java @@ -510,19 +510,21 @@ public class LogParamPanel extends javax.swing.JPanel implements IViewPanel { public void composeTimeString(String time) { // Set the dateformat OTDB takes SimpleDateFormat id = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm",itsLocale); - if (time.equals("start")) { - if (itsStartTime != null) { - LogParamStartTimeText.setText(id.format(itsStartTime).replace("T", " ")); - } else { - LogParamStartTimeText.setText("not-a-date-time"); - } - - } else if (time.equals("stop")) { - if (itsStopTime != null) { - LogParamEndTimeText.setText(id.format(itsStopTime).replace("T", " ")); - } else { - LogParamEndTimeText.setText("not-a-date-time"); - } + switch (time) { + case "start": + if (itsStartTime != null) { + LogParamStartTimeText.setText(id.format(itsStartTime).replace("T", " ")); + } else { + LogParamStartTimeText.setText("not-a-date-time"); + } + break; + case "stop": + if (itsStopTime != null) { + LogParamEndTimeText.setText(id.format(itsStopTime).replace("T", " ")); + } else { + LogParamEndTimeText.setText("not-a-date-time"); + } + break; } } private void setTime() { diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LoginDialog.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LoginDialog.form index 7b46506b5ea..cf5e332fa33 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LoginDialog.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LoginDialog.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JDialogFormInfo"> <Properties> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LoginDialog.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LoginDialog.java index e7370c58b1a..ede60c9e06f 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LoginDialog.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/LoginDialog.java @@ -157,7 +157,7 @@ public class LoginDialog extends javax.swing.JDialog { * @return Value of property userName. */ public String getUserName() { - return new String(jUserNameField.getText()); + return jUserNameField.getText(); } /** @@ -173,6 +173,6 @@ public class LoginDialog extends javax.swing.JDialog { * @return Value of property databaseName. */ public String getDBName() { - return new String(jDatabaseField.getText()); + return jDatabaseField.getText(); } } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParameterViewPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParameterViewPanel.form index 9dbc394542d..5c7fddd550c 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParameterViewPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParameterViewPanel.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.3" maxVersion="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParameterViewPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParameterViewPanel.java index ca91f998a04..01240a57910 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParameterViewPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParameterViewPanel.java @@ -213,10 +213,13 @@ public class ParameterViewPanel extends javax.swing.JPanel implements IViewPanel */ public void popupMenuHandler(java.awt.event.ActionEvent evt) { /// TEST ONLY /// - if (evt.getActionCommand().equals("Choice 1")) { - logger.debug("Param Choice 1 chosen"); - } else if (evt.getActionCommand().equals("Choice 2")) { - logger.debug("Param Choice 2 chosen"); + switch (evt.getActionCommand()) { + case "Choice 1": + logger.debug("Param Choice 1 chosen"); + break; + case "Choice 2": + logger.debug("Param Choice 2 chosen"); + break; } } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBConfigPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBConfigPanel.form index 3a68f19a397..6999b08d81f 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBConfigPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBConfigPanel.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBConfigPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBConfigPanel.java index ef32de486b5..414b286b242 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBConfigPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBConfigPanel.java @@ -24,8 +24,7 @@ package nl.astron.lofar.sas.otbcomponents; import java.awt.Component; import java.rmi.RemoteException; -import java.util.Enumeration; -import java.util.Vector; +import java.util.ArrayList; import javax.swing.JMenuItem; import javax.swing.JPanel; import javax.swing.JPopupMenu; @@ -88,13 +87,12 @@ public class ParmDBConfigPanel extends javax.swing.JPanel implements IViewPanel{ jOTDBparam aParam=null; try { //we need to get all the childs from this node. - Vector childs = OtdbRmi.getRemoteMaintenance().getItemList(itsNode.treeID(), itsNode.nodeID(), 1); + ArrayList<jOTDBnode> childs = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(itsNode.treeID(), itsNode.nodeID(), 1)); + // get all the params per child - Enumeration e = childs.elements(); - while( e.hasMoreElements() ) { + for (jOTDBnode aNode:childs) { aParam=null; - jOTDBnode aNode = (jOTDBnode)e.nextElement(); // We need to keep all the nodes needed by this panel // if the node is a leaf we need to get the pointed to value via Param. @@ -209,30 +207,34 @@ public class ParmDBConfigPanel extends javax.swing.JPanel implements IViewPanel{ String parentName = LofarUtils.keyName(parent.name); if(parentName.equals("ParmDB")){ - if (aKeyName.equals("Instrument")) { - this.ParmDBInstrumentText.setToolTipText(aParam.description); - this.ParmDBInstrument=aNode; - if (isRef && aParam != null) { - ParmDBInstrumentText.setText(aNode.limits + " : " + aParam.limits); - } else { - ParmDBInstrumentText.setText(aNode.limits); - } - }else if (aKeyName.equals("LocalSky")) { - this.ParmDBLocalSkyText.setToolTipText(aParam.description); - this.ParmDBLocalSky=aNode; - if (isRef && aParam != null) { - ParmDBLocalSkyText.setText(aNode.limits + " : " + aParam.limits); - } else { - ParmDBLocalSkyText.setText(aNode.limits); - } - }else if (aKeyName.equals("History")) { - this.ParmDBHistoryText.setToolTipText(aParam.description); - this.ParmDBHistory=aNode; - if (isRef && aParam != null) { - ParmDBHistoryText.setText(aNode.limits + " : " + aParam.limits); - } else { - ParmDBHistoryText.setText(aNode.limits); - } + switch (aKeyName) { + case "Instrument": + this.ParmDBInstrumentText.setToolTipText(aParam.description); + this.ParmDBInstrument=aNode; + if (isRef && aParam != null) { + ParmDBInstrumentText.setText(aNode.limits + " : " + aParam.limits); + } else { + ParmDBInstrumentText.setText(aNode.limits); + } + break; + case "LocalSky": + this.ParmDBLocalSkyText.setToolTipText(aParam.description); + this.ParmDBLocalSky=aNode; + if (isRef && aParam != null) { + ParmDBLocalSkyText.setText(aNode.limits + " : " + aParam.limits); + } else { + ParmDBLocalSkyText.setText(aNode.limits); + } + break; + case "History": + this.ParmDBHistoryText.setToolTipText(aParam.description); + this.ParmDBHistory=aNode; + if (isRef && aParam != null) { + ParmDBHistoryText.setText(aNode.limits + " : " + aParam.limits); + } else { + ParmDBHistoryText.setText(aNode.limits); + } + break; } } } @@ -349,16 +351,19 @@ public class ParmDBConfigPanel extends javax.swing.JPanel implements IViewPanel{ }// </editor-fold>//GEN-END:initComponents private void buttonPanel1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPanel1ActionPerformed - if (evt.getActionCommand().equals("Apply")) { - saveInput(); - } else if(evt.getActionCommand().equals("Restore")) { - this.restoreBBSGlobalSettingsPanel(); + switch (evt.getActionCommand()) { + case "Apply": + saveInput(); + break; + case "Restore": + this.restoreBBSGlobalSettingsPanel(); + break; } }//GEN-LAST:event_buttonPanel1ActionPerformed private jOTDBnode itsNode = null; private MainFrame itsMainFrame; - private Vector<jOTDBparam> itsParamList; + private ArrayList<jOTDBparam> itsParamList; private jOTDBnode ParmDBInstrument; private jOTDBnode ParmDBLocalSky; diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBPlotPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBPlotPanel.form index d204651e267..1e17114070c 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBPlotPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBPlotPanel.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBPlotPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBPlotPanel.java index 8b0e02b9c70..163884c8456 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBPlotPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/ParmDBPlotPanel.java @@ -25,8 +25,8 @@ package nl.astron.lofar.sas.otbcomponents; import java.awt.Component; import java.awt.Dimension; import java.rmi.RemoteException; +import java.util.ArrayList; import java.util.HashMap; -import java.util.Vector; import javax.swing.JMenu; import javax.swing.JMenuItem; import javax.swing.JOptionPane; @@ -203,8 +203,8 @@ public class ParmDBPlotPanel extends javax.swing.JPanel implements IViewPanel{ * @return HashMap<String,Object> object that can be passed on to PlotDataAccessParmDBImpl. */ private Object constructPlotterConstraints(String aParamName,String itsParamTableName){ - HashMap<String,Object> parameterConstraints = new HashMap<String,Object>(); - parameterConstraints.put(new String("PARMDBINTERFACE"), SharedVars.getJParmFacade()); + HashMap<String,Object> parameterConstraints = new HashMap<>(); + parameterConstraints.put("PARMDBINTERFACE", SharedVars.getJParmFacade()); String[] passToDataAccess = null; @@ -224,7 +224,7 @@ public class ParmDBPlotPanel extends javax.swing.JPanel implements IViewPanel{ try{ passToDataAccess = new String[8]; - Vector paramValues; + ArrayList<Double> paramValues; paramValues = SharedVars.getJParmFacade().getRange(cloneParamName); //paramValues = SharedVars.getJParmFacade().getRange("*"); @@ -252,7 +252,7 @@ public class ParmDBPlotPanel extends javax.swing.JPanel implements IViewPanel{ passToDataAccess[5] = ""+endy; passToDataAccess[6] = ""+numy; passToDataAccess[7] = itsParamTableName; - }catch(Exception ex){ + }catch(RemoteException | NumberFormatException ex){ JOptionPane.showMessageDialog(itsMainFrame, ex.getMessage(), "Error detected", JOptionPane.ERROR_MESSAGE); @@ -479,7 +479,7 @@ public class ParmDBPlotPanel extends javax.swing.JPanel implements IViewPanel{ }else{ double squareRoot = Math.sqrt(Double.parseDouble(""+successfulNumberOfSlots)); int wishedIndex = (Integer.parseInt(""+(int)squareRoot))-1; - cSlotsAmount.setSelectedItem(new String(""+successfulNumberOfSlots)); + cSlotsAmount.setSelectedItem((""+successfulNumberOfSlots)); } } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/PencilDialog.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/PencilDialog.form index b7586de4ccc..a25fc04f853 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/PencilDialog.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/PencilDialog.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.3" maxVersion="1.3" type="org.netbeans.modules.form.forminfo.JDialogFormInfo"> <Properties> @@ -73,7 +73,7 @@ <Component id="saveButton" min="-2" max="-2" attributes="0"/> </Group> </Group> - <EmptySpace pref="576" max="32767" attributes="0"/> + <EmptySpace pref="533" max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> @@ -102,7 +102,7 @@ <Component id="coordTypeChange" min="-2" max="-2" attributes="0"/> </Group> </Group> - <EmptySpace pref="85" max="32767" attributes="0"/> + <EmptySpace pref="90" max="32767" attributes="0"/> </Group> </Group> </DimensionLayout> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/PencilDialog.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/PencilDialog.java index 2923f080a6d..dd9e4cd552e 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/PencilDialog.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/PencilDialog.java @@ -228,15 +228,21 @@ public class PencilDialog extends javax.swing.JDialog { } try { if (!inputAngle1.getText().isEmpty()) { - if (ch.equals("dmsdms")) { - tmpch = "dms"; - } else if (ch.equals("hmsdms")) { - tmpch = "hms"; + switch (ch) { + case "dmsdms": + tmpch = "dms"; + break; + case "hmsdms": + tmpch = "hms"; + break; } - if (itsCoordType.equals("hmsdms")) { - tmpcoord="hms"; - } else if (itsCoordType.equals("dmsdms")) { - tmpcoord="dms"; + switch (itsCoordType) { + case "hmsdms": + tmpcoord="hms"; + break; + case "dmsdms": + tmpcoord="dms"; + break; } inputAngle1.setText(LofarUtils.changeCoordinate(tmpcoord, tmpch, inputAngle1.getText())); } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/RoundButton.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/RoundButton.java index 27433bebebc..5d1c029cd5a 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/RoundButton.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/RoundButton.java @@ -24,7 +24,7 @@ import javax.swing.JButton; * you can see the backgtest of the container behind these areas. * */ -public class RoundButton extends JButton { +public final class RoundButton extends JButton { Shape shape; diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/SquareButton.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/SquareButton.java index da4f19bc73e..7e23a8ad2ba 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/SquareButton.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/SquareButton.java @@ -24,7 +24,7 @@ import javax.swing.JButton; * you can see the background of the container behind these areas. * */ -public class SquareButton extends JButton { +public final class SquareButton extends JButton { Shape shape; diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/StorageSelectionPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/StorageSelectionPanel.form index 6568f72443e..1c9d22ee681 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/StorageSelectionPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/StorageSelectionPanel.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.3" maxVersion="1.3" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <Properties> @@ -34,10 +34,10 @@ <Component id="jScrollPane1" min="-2" pref="76" max="-2" attributes="1"/> <EmptySpace max="-2" attributes="0"/> <Group type="103" groupAlignment="0" attributes="0"> - <Component id="AddAllButton" pref="105" max="32767" attributes="1"/> - <Component id="RemoveButton" pref="105" max="32767" attributes="1"/> + <Component id="AddAllButton" pref="130" max="32767" attributes="1"/> + <Component id="RemoveButton" pref="130" max="32767" attributes="1"/> <Component id="RemoveAllButton" max="32767" attributes="1"/> - <Component id="AddButton" alignment="0" pref="105" max="32767" attributes="1"/> + <Component id="AddButton" alignment="0" pref="130" max="32767" attributes="1"/> </Group> <EmptySpace max="-2" attributes="0"/> </Group> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/StorageSelectionPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/StorageSelectionPanel.java index 47ea7652fa2..b540652df8b 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/StorageSelectionPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/StorageSelectionPanel.java @@ -24,7 +24,7 @@ package nl.astron.lofar.sas.otbcomponents; import java.rmi.RemoteException; import java.util.Enumeration; -import java.util.Vector; +import java.util.ArrayList; import javax.swing.DefaultListModel; import javax.swing.border.TitledBorder; import nl.astron.lofar.lofarutils.LofarUtils; @@ -34,7 +34,7 @@ import nl.astron.lofar.sas.otb.util.OtdbRmi; import org.apache.log4j.Logger; /** * Panel to view (and edit) lists - * The lists are being send and retained from the panel via a Vector like string: + * The lists are being send and retained from the panel via a ArrayList like string: * [item1,item2,item3] * * @created 13-07-2006, 14:50 @@ -43,7 +43,7 @@ import org.apache.log4j.Logger; * * @version $Id$ */ -public class StorageSelectionPanel extends javax.swing.JPanel { +public final class StorageSelectionPanel extends javax.swing.JPanel { static Logger logger = Logger.getLogger(StorageSelectionPanel.class); @@ -90,19 +90,19 @@ public class StorageSelectionPanel extends javax.swing.JPanel { private DefaultListModel itsUsedModel = new DefaultListModel(); private DefaultListModel itsAvailableModel = new DefaultListModel(); private jOTDBtree itsTree = null; - private Vector<String> itsStorageNodeList = new Vector<String>(); - private Vector<String> itsUsedStorageNodeList = new Vector<String>(); - private Vector<String> itsAvailableStorageNodeList = new Vector<String>(); + private ArrayList<String> itsStorageNodeList = new ArrayList<>(); + private ArrayList<String> itsUsedStorageNodeList = new ArrayList<>(); + private ArrayList<String> itsAvailableStorageNodeList = new ArrayList<>(); public void init() { AvailableStorageNodeList.setModel(itsAvailableModel); UsedStorageNodeList.setModel(itsUsedModel); try { - Vector aTreeList = OtdbRmi.getRemoteOTDB().getTreeList(OtdbRmi.getRemoteTypes().getTreeType("hardware"), - OtdbRmi.getRemoteTypes().getClassif("operational")); + ArrayList<jOTDBtree> aTreeList = new ArrayList(OtdbRmi.getRemoteOTDB().getTreeList(OtdbRmi.getRemoteTypes().getTreeType("hardware"), + OtdbRmi.getRemoteTypes().getClassif("operational"))); for (int k = 0; k < aTreeList.size(); k++) { - jOTDBtree tInfo = (jOTDBtree) aTreeList.elementAt(k); + jOTDBtree tInfo = aTreeList.get(k); if (OtdbRmi.getTreeState().get(tInfo.state).equals("active")) { itsTree = tInfo; break; @@ -116,16 +116,11 @@ public class StorageSelectionPanel extends javax.swing.JPanel { } // Now we have the operational PIC tree, we need to search for the available StorageNodes - Vector storagenodes = OtdbRmi.getRemoteMaintenance().getItemList(itsTree.treeID(), "LOFAR_PermSW_Storage"); - Enumeration e = storagenodes.elements(); - while (e.hasMoreElements()) { - - jOTDBnode aRingNode = (jOTDBnode) e.nextElement(); - Vector childs = OtdbRmi.getRemoteMaintenance().getItemList(itsTree.treeID() ,aRingNode.nodeID(), 1); - - Enumeration ec = childs.elements(); - while (ec.hasMoreElements()) { - jOTDBnode aNode = (jOTDBnode) ec.nextElement(); + ArrayList<jOTDBnode> storagenodes = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(itsTree.treeID(), "LOFAR_PermSW_Storage")); + for (jOTDBnode aRingNode:storagenodes) { + ArrayList<jOTDBnode> childs = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(itsTree.treeID() ,aRingNode.nodeID(), 1)); + + for (jOTDBnode aNode:childs) { if (!aNode.leaf) { // split the name @@ -407,14 +402,14 @@ public class StorageSelectionPanel extends javax.swing.JPanel { /** * @return the itsUsedStorageNodeList */ - public Vector<String> getUsedStorageNodeList() { + public ArrayList<String> getUsedStorageNodeList() { return itsUsedStorageNodeList; } /** * @param itsUsedStorageNodeList the itsUsedStorageNodeList to set */ - public void setUsedStorageNodeList(Vector<String> itsUsedStorageNodeList) { + public void setUsedStorageNodeList(ArrayList<String> itsUsedStorageNodeList) { this.itsUsedStorageNodeList = itsUsedStorageNodeList; this.itsUsedModel.clear(); for (int i=0; i<itsUsedStorageNodeList.size();i++) { diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/TBBControlPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/TBBControlPanel.form index 2f96882ae3b..83a6d3df36c 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/TBBControlPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/TBBControlPanel.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.3" maxVersion="1.7" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/TBBControlPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/TBBControlPanel.java index e914d778860..396e34280b9 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/TBBControlPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/TBBControlPanel.java @@ -13,8 +13,7 @@ package nl.astron.lofar.sas.otbcomponents; import java.awt.Component; import java.rmi.RemoteException; -import java.util.Enumeration; -import java.util.Vector; +import java.util.ArrayList; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.ListSelectionModel; @@ -109,7 +108,7 @@ public class TBBControlPanel extends javax.swing.JPanel implements IViewPanel{ try { //we need to get all the childs from this node. // So we get the node itself and look for its childs - Vector<jOTDBnode> TBBnode = OtdbRmi.getRemoteMaintenance().getItemList(itsNode.treeID(), "%TBBControl"); + ArrayList<jOTDBnode> TBBnode = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(itsNode.treeID(), "%TBBControl")); if (TBBnode.isEmpty() ) { logger.error("TBBControl not found, no content"); @@ -118,12 +117,10 @@ public class TBBControlPanel extends javax.swing.JPanel implements IViewPanel{ itsNode=TBBnode.get(0); - Vector <jOTDBnode> childs = OtdbRmi.getRemoteMaintenance().getItemList(itsNode.treeID(), itsNode.nodeID(),1); + ArrayList <jOTDBnode> childs = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(itsNode.treeID(), itsNode.nodeID(),1)); // get all the params per child - Enumeration<jOTDBnode> e = childs.elements(); - while( e.hasMoreElements() ) { + for (jOTDBnode aNode:childs) { aParam=null; - jOTDBnode aNode = e.nextElement(); // We need to keep all the nodes needed by this panel // if the node is a leaf we need to get the pointed to value via Param. @@ -386,29 +383,36 @@ public class TBBControlPanel extends javax.swing.JPanel implements IViewPanel{ } if(parentName.equals("TBBControl")){ - // TBBControl parameters - if (aKeyName.equals("NoCoincChann")) { - noCoincChann.setToolTipText(aParam.description); - itsNoCoincChann=aNode; - } else if (aKeyName.equals("CoincidenceTime")) { - coincidenceTime.setToolTipText(aParam.description); - itsCoincidenceTime=aNode; - } else if (aKeyName.equals("DoDirectionFit")) { - doDirectionFit.setToolTipText(aParam.description); - LofarUtils.setPopupComboChoices(doDirectionFit,aParam.limits); - itsDoDirectionFit=aNode; - if (!aNode.limits.equals("")) { - doDirectionFit.setSelectedItem(aNode.limits); - } - } else if (aKeyName.equals("MinElevation")) { - minElevation.setToolTipText(aParam.description); - itsMinElevation=aNode; - } else if (aKeyName.equals("MaxFitVariance")) { - maxFitVariance.setToolTipText(aParam.description); - itsMaxFitVariance=aNode; - } else if (aKeyName.equals("ParamExtension")) { - paramExtensionTable.setToolTipText(aParam.description); - itsParamExtension=aNode; + // TBBControl parameters + switch (aKeyName) { + case "NoCoincChann": + noCoincChann.setToolTipText(aParam.description); + itsNoCoincChann=aNode; + break; + case "CoincidenceTime": + coincidenceTime.setToolTipText(aParam.description); + itsCoincidenceTime=aNode; + break; + case "DoDirectionFit": + doDirectionFit.setToolTipText(aParam.description); + LofarUtils.setPopupComboChoices(doDirectionFit,aParam.limits); + itsDoDirectionFit=aNode; + if (!aNode.limits.equals("")) { + doDirectionFit.setSelectedItem(aNode.limits); + } + break; + case "MinElevation": + minElevation.setToolTipText(aParam.description); + itsMinElevation=aNode; + break; + case "MaxFitVariance": + maxFitVariance.setToolTipText(aParam.description); + itsMaxFitVariance=aNode; + break; + case "ParamExtension": + paramExtensionTable.setToolTipText(aParam.description); + itsParamExtension=aNode; + break; } } } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/TreeInfoDialog.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/TreeInfoDialog.java index bb3e9728636..6283e23e56f 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/TreeInfoDialog.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/TreeInfoDialog.java @@ -32,9 +32,7 @@ import java.util.Locale; import java.util.TimeZone; import java.util.TreeMap; import javax.swing.DefaultComboBoxModel; -import javax.swing.Icon; import javax.swing.JOptionPane; -import javax.swing.JTextField; import nl.astron.lofar.lofarutils.DateTimeChooser; import nl.astron.lofar.lofarutils.LofarUtils; import nl.astron.lofar.sas.otb.MainFrame; @@ -53,7 +51,7 @@ import org.apache.log4j.Logger; * * @version $Id$ */ -public class TreeInfoDialog extends javax.swing.JDialog { +public final class TreeInfoDialog extends javax.swing.JDialog { static Logger logger = Logger.getLogger(TreeInfoDialog.class); static String name = "TreeInfoDialog"; diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/VerticalButtonPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/VerticalButtonPanel.form index 58784c0c6b7..7bd66172b3e 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/VerticalButtonPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/VerticalButtonPanel.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/VerticalButtonPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/VerticalButtonPanel.java index a0d99210cf2..2a9621e84ef 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/VerticalButtonPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/VerticalButtonPanel.java @@ -43,7 +43,7 @@ public class VerticalButtonPanel extends javax.swing.JPanel { /** Creates new form BeanForm */ public VerticalButtonPanel() { - buttons = new HashMap<String,JButton>(); + buttons = new HashMap<>(); initComponents(); hasPlaceHolder=true; } @@ -107,7 +107,7 @@ public class VerticalButtonPanel extends javax.swing.JPanel { jPanelButtons.remove(buttons.get(aKey)); buttons.remove(aKey); } - if (buttons.size() == 0) { + if (buttons.isEmpty()) { jPanelButtons.add(buttonsPlaceHolder); hasPlaceHolder=true; } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.form index 717bfe33234..125cbe46d04 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.java index 3a5b0f780f7..dca180ef8df 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSPanel.java @@ -24,8 +24,7 @@ package nl.astron.lofar.sas.otbcomponents.bbs; import java.awt.Component; import java.rmi.RemoteException; -import java.util.Enumeration; -import java.util.Vector; +import java.util.ArrayList; import javax.swing.JPanel; import nl.astron.lofar.lofarutils.LofarUtils; import nl.astron.lofar.sas.otb.MainFrame; @@ -50,7 +49,7 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ private jOTDBnode itsNode = null; private MainFrame itsMainFrame; - private Vector<jOTDBparam> itsParamList; + private ArrayList<jOTDBparam> itsParamList; // Global Settings parameters private jOTDBnode dataSet; @@ -123,13 +122,10 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ jOTDBparam aParam=null; try { //we need to get all the childs from this node. - Vector childs = OtdbRmi.getRemoteMaintenance().getItemList(itsNode.treeID(), itsNode.nodeID(), 1); + ArrayList<jOTDBnode> childs = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(itsNode.treeID(), itsNode.nodeID(), 1)); - // get all the params per child - Enumeration e = childs.elements(); - while( e.hasMoreElements() ) { + for (jOTDBnode aNode:childs) { aParam=null; - jOTDBnode aNode = (jOTDBnode)e.nextElement(); // We need to keep all the nodes needed by this panel // if the node is a leaf we need to get the pointed to value via Param. @@ -207,12 +203,9 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ private void retrieveAndDisplayChildDataForNode(jOTDBnode aNode){ jOTDBparam aParam=null; try { - Vector HWchilds = OtdbRmi.getRemoteMaintenance().getItemList(aNode.treeID(), aNode.nodeID(), 1); + ArrayList<jOTDBnode> HWchilds = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(aNode.treeID(), aNode.nodeID(), 1)); // get all the params per child - Enumeration e1 = HWchilds.elements(); - while( e1.hasMoreElements() ) { - - jOTDBnode aHWNode = (jOTDBnode)e1.nextElement(); + for (jOTDBnode aHWNode:HWchilds) { aParam=null; // We need to keep all the params needed by this panel if (aHWNode.leaf) { @@ -297,25 +290,26 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ boolean isRef = LofarUtils.isReference(aNode.limits); String aKeyName = LofarUtils.keyName(aNode.name); String parentName = LofarUtils.keyName(String.valueOf(parent.name)); - - if(parentName.equals("BBSControl")){ - if (aKeyName.equals("DataSet")) { - this.BBSDatasetText.setToolTipText(aParam.description); - this.dataSet=aNode; - - if (isRef && aParam != null) { - this.BBSDatasetDeRefText.setVisible(true); - BBSDatasetText.setText(aNode.limits); - BBSDatasetDeRefText.setText(aParam.limits); - } else { - BBSDatasetDeRefText.setVisible(false); - BBSDatasetDeRefText.setText(""); - BBSDatasetText.setText(aNode.limits); + switch (parentName) { + case "BBSControl": + if (aKeyName.equals("DataSet")) { + this.BBSDatasetText.setToolTipText(aParam.description); + this.dataSet=aNode; + + if (isRef && aParam != null) { + this.BBSDatasetDeRefText.setVisible(true); + BBSDatasetText.setText(aNode.limits); + BBSDatasetDeRefText.setText(aParam.limits); + } else { + BBSDatasetDeRefText.setVisible(false); + BBSDatasetDeRefText.setText(""); + BBSDatasetText.setText(aNode.limits); + } } - } - } else if(parentName.equals("BBDB")){ - - if (aKeyName.equals("DBName")) { + break; + case "BBDB": + switch (aKeyName) { + case "DBName": this.BBDBDBNameText.setToolTipText(aParam.description); this.BBDBDBName=aNode; if (isRef && aParam != null) { @@ -323,7 +317,8 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ } else { BBDBDBNameText.setText(aNode.limits); } - }else if (aKeyName.equals("Host")) { + break; + case "Host": this.BBDBHostText.setToolTipText(aParam.description); this.BBDBHost=aNode; if (isRef && aParam != null) { @@ -331,7 +326,8 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ } else { BBDBHostText.setText(aNode.limits); } - }else if (aKeyName.equals("Port")) { + break; + case "Port": this.BBDBPortText.setToolTipText(aParam.description); this.BBDBPort=aNode; if (isRef && aParam != null) { @@ -339,7 +335,8 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ } else { BBDBPortText.setText(aNode.limits); } - }else if (aKeyName.equals("UserName")) { + break; + case "UserName": this.BBDBDBUsernameText.setToolTipText(aParam.description); this.BBDBUsername=aNode; if (isRef && aParam != null) { @@ -347,7 +344,8 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ } else { BBDBDBUsernameText.setText(aNode.limits); } - }else if (aKeyName.equals("PassWord")) { + break; + case "PassWord": this.BBDBDBPasswordText.setToolTipText(aParam.description); this.BBDBPassword=aNode; if (isRef && aParam != null) { @@ -355,9 +353,12 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ } else { BBDBDBPasswordText.setText(aNode.limits); } - } - } else if(parentName.equals("ParmDB")){ - if (aKeyName.equals("Instrument")) { + break; + } + break; + case "ParmDB": + switch (aKeyName) { + case "Instrument": this.ParmDBInstrumentText.setToolTipText(aParam.description); this.ParmDBInstrument=aNode; if (isRef && aParam != null) { @@ -365,7 +366,8 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ } else { ParmDBInstrumentText.setText(aNode.limits); } - }else if (aKeyName.equals("LocalSky")) { + break; + case "LocalSky": this.ParmDBLocalSkyText.setToolTipText(aParam.description); this.ParmDBLocalSky=aNode; if (isRef && aParam != null) { @@ -373,7 +375,8 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ } else { ParmDBLocalSkyText.setText(aNode.limits); } - }else if (aKeyName.equals("History")) { + break; + case "History": this.ParmDBHistoryText.setToolTipText(aParam.description); this.ParmDBHistory=aNode; if (isRef && aParam != null) { @@ -381,9 +384,12 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ } else { ParmDBHistoryText.setText(aNode.limits); } - } - } else if (parentName.equals("Controller")) { - if (aKeyName.equals("Host")) { + break; + } + break; + case "Controller": + switch (aKeyName) { + case "Host": this.ControllerHostText.setToolTipText(aParam.description); this.ControllerHost=aNode; if (isRef && aParam != null) { @@ -391,7 +397,8 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ } else { ControllerHostText.setText(aNode.limits); } - } else if (aKeyName.equals("Port")) { + break; + case "Port": this.ControllerPortText.setToolTipText(aParam.description); this.ControllerPort=aNode; if (isRef && aParam != null) { @@ -399,7 +406,9 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ } else { ControllerPortText.setText(aNode.limits); } - } + break; + } + break; } } /** @@ -660,10 +669,13 @@ public class BBSPanel extends javax.swing.JPanel implements IViewPanel{ }// </editor-fold>//GEN-END:initComponents private void buttonPanel1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPanel1ActionPerformed - if(evt.getActionCommand().equals("Apply")) { - saveInput(); - }else if(evt.getActionCommand().equals("Restore")) { - this.restoreBBSGlobalSettingsPanel(); + switch (evt.getActionCommand()) { + case "Apply": + saveInput(); + break; + case "Restore": + this.restoreBBSGlobalSettingsPanel(); + break; } }//GEN-LAST:event_buttonPanel1ActionPerformed diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStrategyPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStrategyPanel.form index 1b7e7e64fc1..a59bc679f1c 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStrategyPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStrategyPanel.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStrategyPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStrategyPanel.java index 272e42197f5..b3f4ebda98e 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStrategyPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/BBSStrategyPanel.java @@ -26,7 +26,7 @@ import java.awt.Color; import java.awt.Component; import java.rmi.RemoteException; import java.util.Enumeration; -import java.util.Vector; +import java.util.ArrayList; import javax.swing.DefaultComboBoxModel; import javax.swing.DefaultListModel; import javax.swing.JList; @@ -65,7 +65,7 @@ public class BBSStrategyPanel extends javax.swing.JPanel implements IViewPanel{ private jOTDBnode itsNode = null; private MainFrame itsMainFrame; - private Vector<jOTDBparam> itsParamList; + private ArrayList<jOTDBparam> itsParamList; // BBS Strategy parameters private jOTDBnode StrategySteps; @@ -132,13 +132,11 @@ public class BBSStrategyPanel extends javax.swing.JPanel implements IViewPanel{ jOTDBparam aParam=null; try { //we need to get all the childs from this node. - Vector childs = OtdbRmi.getRemoteMaintenance().getItemList(itsNode.treeID(), itsNode.nodeID(), 1); + ArrayList<jOTDBnode> childs = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(itsNode.treeID(), itsNode.nodeID(), 1)); // get all the params per child - Enumeration e = childs.elements(); - while( e.hasMoreElements() ) { + for (jOTDBnode aNode:childs) { aParam=null; - jOTDBnode aNode = (jOTDBnode)e.nextElement(); // We need to keep all the nodes needed by this panel // if the node is a leaf we need to get the pointed to value via Param. @@ -216,12 +214,9 @@ public class BBSStrategyPanel extends javax.swing.JPanel implements IViewPanel{ private void retrieveAndDisplayChildDataForNode(jOTDBnode aNode){ jOTDBparam aParam=null; try { - Vector HWchilds = OtdbRmi.getRemoteMaintenance().getItemList(aNode.treeID(), aNode.nodeID(), 1); + ArrayList<jOTDBnode> HWchilds = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(aNode.treeID(), aNode.nodeID(), 1)); // get all the params per child - Enumeration e1 = HWchilds.elements(); - while( e1.hasMoreElements() ) { - - jOTDBnode aHWNode = (jOTDBnode)e1.nextElement(); + for (jOTDBnode aHWNode:HWchilds) { aParam=null; // We need to keep all the params needed by this panel if (aHWNode.leaf) { @@ -321,25 +316,24 @@ public class BBSStrategyPanel extends javax.swing.JPanel implements IViewPanel{ boolean isRef = LofarUtils.isReference(aNode.limits); String aKeyName = LofarUtils.keyName(aNode.name); String parentName = String.valueOf(parent.name); - - if(parentName.equals("Strategy")){ - //Setup step tree - this.setupStepTree(parent); - this.setupStepsList(BBSStepDataManager.getInstance().getStepNames()); - - if (aKeyName.equals("InputData")) { + switch (parentName) { + case "Strategy": + //Setup step tree + this.setupStepTree(parent); + this.setupStepsList(BBSStepDataManager.getInstance().getStepNames()); + switch (aKeyName) { + case "InputData": this.inputDataText.setToolTipText(aParam.description); this.StrategyInputData=aNode; - if (isRef && aParam != null) { inputDataText.setText(aNode.limits + " : " + aParam.limits); } else { inputDataText.setText(aNode.limits); } - }else if (aKeyName.equals("Stations")) { + break; + case "Stations": this.stationsList.setToolTipText(aParam.description); this.StrategyStations = aNode; - //set the checkbox correctly when no stations are provided in the data if(StrategyStations.limits == null || StrategyStations.limits.equals("[]")){ this.stationsUseAllCheckbox.setSelected(true); @@ -355,54 +349,62 @@ public class BBSStrategyPanel extends javax.swing.JPanel implements IViewPanel{ LofarUtils.fillList(stationsList,aNode.limits,true); } } - } - } else if(parentName.equals("WorkDomainSize")){ - if (aKeyName.equals("Freq")) { + break; + } + break; + case "WorkDomainSize": + switch (aKeyName) { + case "Freq": this.wdsFrequencyText.setToolTipText(aParam.description); this.StrategyWDSFrequency=aNode; - if (isRef && aParam != null) { wdsFrequencyText.setText(aNode.limits + " : " + aParam.limits); } else { wdsFrequencyText.setText(aNode.limits); } - } else if (aKeyName.equals("Time")) { + break; + case "Time": this.wdsTimeText.setToolTipText(aParam.description); this.StrategyWDSTime=aNode; - if (isRef && aParam != null) { wdsTimeText.setText(aNode.limits + " : " + aParam.limits); } else { wdsTimeText.setText(aNode.limits); } - } - } else if(parentName.equals("Integration")){ - if (aKeyName.equals("Freq")) { + break; + } + break; + case "Integration": + switch (aKeyName) { + case "Freq": this.integrationFrequencyText.setToolTipText(aParam.description); this.StrategyIntegrationFrequency=aNode; - if (isRef && aParam != null) { integrationFrequencyText.setText(aNode.limits + " : " + aParam.limits); } else { integrationFrequencyText.setText(aNode.limits); } - } else if (aKeyName.equals("Time")) { + break; + case "Time": this.integrationTimeText.setToolTipText(aParam.description); this.StrategyIntegrationTime=aNode; - if (isRef && aParam != null) { integrationTimeText.setText(aNode.limits + " : " + aParam.limits); } else { integrationTimeText.setText(aNode.limits); } - } - } else if(parentName.equals("Correlation")){ - if (aKeyName.equals("Selection")) { + break; + } + break; + case "Correlation": + switch (aKeyName) { + case "Selection": this.correlationSelectionBox.setToolTipText(aParam.description); this.StrategyCorrelationSelection=aNode; this.correlationSelectionBox.setSelectedItem(aNode.limits); logger.trace("Correlation selection will be :"+this.correlationSelectionBox.getSelectedItem().toString()); - } else if (aKeyName.equals("Type")) { + break; + case "Type": this.correlationTypeList.setToolTipText(aParam.description); this.StrategyCorrelationType=aNode; if (isRef && aParam != null) { @@ -410,7 +412,9 @@ public class BBSStrategyPanel extends javax.swing.JPanel implements IViewPanel{ } else { LofarUtils.fillSelectionListFromString(correlationTypeList,aNode.limits,true); } - } + break; + } + break; } } /** @@ -502,18 +506,16 @@ public class BBSStrategyPanel extends javax.swing.JPanel implements IViewPanel{ try { //Add steps that make up the strategy to the steps tree browser //fetch the BBS root Container node, which is the parent of the BBS Strategy node given in strategyRootNode - Vector steps = OtdbRmi.getRemoteMaintenance().getItemList(strategyRootNode.treeID(), strategyRootNode.parentID(), 1); + ArrayList<jOTDBnode> steps = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(strategyRootNode.treeID(), strategyRootNode.parentID(), 1)); // get all the params per child - Enumeration se = steps.elements(); - while( se.hasMoreElements() ) { - jOTDBnode aNode2 = (jOTDBnode)se.nextElement(); + for (jOTDBnode aNode2:steps) { if (aNode2.leaf) { //retrieve the BBS Step Container node, which holds all steps (BBS.Step) }else if (LofarUtils.keyName(aNode2.name).equals("Step")) { //Add steps to tree Object[] rootNodeArgs = new Object[3]; - rootNodeArgs[0]= new String("Strategy Steps"); + rootNodeArgs[0]= "Strategy Steps"; rootNodeArgs[1]=aNode2; TreeNode newStepRootNode = BBSStepTreeManager.getInstance(itsMainFrame.getUserAccount()).getRootNode(rootNodeArgs); this.stepsTreePanel.newRootNode(newStepRootNode); @@ -535,7 +537,7 @@ public class BBSStrategyPanel extends javax.swing.JPanel implements IViewPanel{ * * @param items the String items to be added to the combobox. */ - private void setupStepsList(Vector<String> items){ + private void setupStepsList(ArrayList<String> items){ DefaultComboBoxModel itsModel = new DefaultComboBoxModel(); stepsList.setModel(itsModel); for(String anItem : items){ @@ -1097,7 +1099,7 @@ public class BBSStrategyPanel extends javax.swing.JPanel implements IViewPanel{ this.removeStepButton.setEnabled(true); //show a somewhat (not completely) limited list of steps that can be added to prevent infinite loops //remove all steps that are part of the step tree all the way to the strategy... - Vector<String> items = BBSStepDataManager.getInstance().getStepNames(); + ArrayList<String> items = BBSStepDataManager.getInstance().getStepNames(); Object[] treeForThisNode = selectedPath.getPath(); for(int i = 0; i < treeForThisNode.length; i++){ @@ -1150,7 +1152,7 @@ public class BBSStrategyPanel extends javax.swing.JPanel implements IViewPanel{ this.stepMoveUpButton.setEnabled(false); this.stepMoveDownButton.setEnabled(false); //show full list of steps that can be added - Vector<String> items = BBSStepDataManager.getInstance().getStepNames(); + ArrayList<String> items = BBSStepDataManager.getInstance().getStepNames(); this.setupStepsList(items); } @@ -1200,7 +1202,7 @@ public class BBSStrategyPanel extends javax.swing.JPanel implements IViewPanel{ theStationModel.remove(selectedIndices[0]); selectedIndices = stationsList.getSelectedIndices(); } - if(theStationModel.size()==0){ + if(theStationModel.isEmpty()){ this.deleteStationButton.setEnabled(false); } }//GEN-LAST:event_deleteStationButtonActionPerformed @@ -1214,81 +1216,82 @@ public class BBSStrategyPanel extends javax.swing.JPanel implements IViewPanel{ }//GEN-LAST:event_addStationButtonActionPerformed private void buttonPanel1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPanel1ActionPerformed - if(evt.getActionCommand().equals("Apply")) { - boolean warning = false; - //perform input validation on the double values in the form - String integrationTime = this.integrationTimeText.getText(); - String integrationFrequency = this.integrationFrequencyText.getText(); - String wdsTime = this.wdsTimeText.getText(); - String wdsFrequency = this.wdsFrequencyText.getText(); - - if(!integrationTime.equals("")){ - try { - Double itime = Double.parseDouble(integrationTime); - integrationTimeText.setBackground(Color.WHITE); - } catch (NumberFormatException ex) { + switch (evt.getActionCommand()) { + case "Apply": + boolean warning = false; + //perform input validation on the double values in the form + String integrationTime = this.integrationTimeText.getText(); + String integrationFrequency = this.integrationFrequencyText.getText(); + String wdsTime = this.wdsTimeText.getText(); + String wdsFrequency = this.wdsFrequencyText.getText(); + if(!integrationTime.equals("")){ + try { + Double itime = Double.parseDouble(integrationTime); + integrationTimeText.setBackground(Color.WHITE); + } catch (NumberFormatException ex) { + integrationTimeText.setBackground(Color.RED); + warning=true; + } + }else{ integrationTimeText.setBackground(Color.RED); warning=true; } - }else{ - integrationTimeText.setBackground(Color.RED); - warning=true; - } - if(!integrationFrequency.equals("")){ - try { - Double itime = Double.parseDouble(integrationFrequency); - integrationFrequencyText.setBackground(Color.WHITE); - } catch (NumberFormatException ex) { + if(!integrationFrequency.equals("")){ + try { + Double itime = Double.parseDouble(integrationFrequency); + integrationFrequencyText.setBackground(Color.WHITE); + } catch (NumberFormatException ex) { + warning=true; + integrationFrequencyText.setBackground(Color.RED); + } + }else{ warning=true; integrationFrequencyText.setBackground(Color.RED); } - }else{ - warning=true; - integrationFrequencyText.setBackground(Color.RED); - } - if(!wdsFrequency.equals("")){ - try { - Double itime = Double.parseDouble(wdsFrequency); - wdsFrequencyText.setBackground(Color.WHITE); - } catch (NumberFormatException ex) { - + if(!wdsFrequency.equals("")){ + try { + Double itime = Double.parseDouble(wdsFrequency); + wdsFrequencyText.setBackground(Color.WHITE); + } catch (NumberFormatException ex) { + + wdsFrequencyText.setBackground(Color.RED); + } + }else{ + warning=true; wdsFrequencyText.setBackground(Color.RED); } - }else{ - warning=true; - wdsFrequencyText.setBackground(Color.RED); - } - if(!wdsTime.equals("")){ - try { - Double itime = Double.parseDouble(wdsTime); - wdsTimeText.setBackground(Color.WHITE); - } catch (NumberFormatException ex) { + if(!wdsTime.equals("")){ + try { + Double itime = Double.parseDouble(wdsTime); + wdsTimeText.setBackground(Color.WHITE); + } catch (NumberFormatException ex) { + warning=true; + wdsTimeText.setBackground(Color.RED); + } + }else{ warning=true; wdsTimeText.setBackground(Color.RED); } - }else{ - warning=true; - wdsTimeText.setBackground(Color.RED); - } - if(!warning){ - itsMainFrame.setHourglassCursor(); - saveInput(); - BBSStepDataManager.getInstance().persistStrategy(); - this.setupStepTree(StrategySteps); - this.setupStepsList(BBSStepDataManager.getInstance().getStepNames()); - itsMainFrame.setNormalCursor(); - } - - } else if(evt.getActionCommand().equals("Revert")) { - String message = "Are you sure you want to revert all strategy attributes, including the step tree?"; - message+="\n\nThis 'Revert' action will remove all changes you have made in the step tree since the last 'Save Settings' action!"; - String[] buttons = {"Yes","No"}; - int choice = JOptionPane.showOptionDialog(this,message, "Please confirm", JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null,buttons,buttons[0]); - if(choice == 0){ - itsMainFrame.setHourglassCursor(); - this.restoreBBSStrategyPanel(); - itsMainFrame.setNormalCursor(); - } + if(!warning){ + itsMainFrame.setHourglassCursor(); + saveInput(); + BBSStepDataManager.getInstance().persistStrategy(); + this.setupStepTree(StrategySteps); + this.setupStepsList(BBSStepDataManager.getInstance().getStepNames()); + itsMainFrame.setNormalCursor(); + } + break; + case "Revert": + String message = "Are you sure you want to revert all strategy attributes, including the step tree?"; + message+="\n\nThis 'Revert' action will remove all changes you have made in the step tree since the last 'Save Settings' action!"; + String[] buttons = {"Yes","No"}; + int choice = JOptionPane.showOptionDialog(this,message, "Please confirm", JOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null,buttons,buttons[0]); + if(choice == 0){ + itsMainFrame.setHourglassCursor(); + this.restoreBBSStrategyPanel(); + itsMainFrame.setNormalCursor(); + } + break; } }//GEN-LAST:event_buttonPanel1ActionPerformed diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStep.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStep.java index e0a0e8066a6..b44f04209ed 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStep.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStep.java @@ -23,7 +23,7 @@ package nl.astron.lofar.sas.otbcomponents.bbs.stepmanagement; -import java.util.Vector; +import java.util.ArrayList; /** * The BBSStep represents an instance of a BBS Step with a given name. For each @@ -41,7 +41,7 @@ public class BBSStep implements Cloneable, Comparable{ //Possible parent step private BBSStep parentStep = null; //Contained substeps - private Vector<BBSStep> childSteps; + private ArrayList<BBSStep> childSteps; //Step Name private String name; @@ -52,7 +52,7 @@ public class BBSStep implements Cloneable, Comparable{ */ public BBSStep(String name) { this.name=name; - childSteps = new Vector<BBSStep>(); + childSteps = new ArrayList<>(); parentStep = null; } /** @@ -96,13 +96,13 @@ public class BBSStep implements Cloneable, Comparable{ return parentStep != null; } /** - * Returns a Vector of BBSStep objects that are childs of this BBSStep<br><br> + * Returns a ArrayList of BBSStep objects that are childs of this BBSStep<br><br> * -Returns null if the child steps have never been set<br> - * -Returns empty vector is no child steps are associated. + * -Returns empty ArrayList is no child steps are associated. * - * @return Vector of BBSStep objects that are children of this BBSStep + * @return ArrayList of BBSStep objects that are children of this BBSStep */ - public Vector<BBSStep> getChildSteps(){ + public ArrayList<BBSStep> getChildSteps(){ return childSteps; } /** @@ -213,7 +213,7 @@ public class BBSStep implements Cloneable, Comparable{ if(indexOfChild >= 0 && indexOfChild < childSteps.size()){ BBSStep currentStepInIndex = childSteps.get(indexOfChild); if(child.getName().equals(currentStepInIndex.getName())){ - this.childSteps.removeElementAt(indexOfChild); + BBSStep remove = this.childSteps.remove(indexOfChild); childSteps.trimToSize(); } } @@ -240,7 +240,7 @@ public class BBSStep implements Cloneable, Comparable{ if(oldIndexOfChild >= 0 && oldIndexOfChild < childSteps.size()){ BBSStep currentStepInIndex = childSteps.get(oldIndexOfChild); if(child.getName().equals(currentStepInIndex.getName())){ - this.childSteps.removeElementAt(oldIndexOfChild); + BBSStep remove = this.childSteps.remove(oldIndexOfChild); this.childSteps.add(newIndexOfChild,currentStepInIndex); childSteps.trimToSize(); } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepData.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepData.java index 01d0fe680eb..9dd917c5052 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepData.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepData.java @@ -24,7 +24,7 @@ package nl.astron.lofar.sas.otbcomponents.bbs.stepmanagement; import java.util.HashMap; -import java.util.Vector; +import java.util.ArrayList; /** * BBS Step Data object, which serves as a data structure for a given BBS Step with a unique name. @@ -39,19 +39,19 @@ import java.util.Vector; public class BBSStepData{ //Step Baseline Selection - private Vector<String> station1Selection = null; - private Vector<String> station2Selection = null; + private ArrayList<String> station1Selection = null; + private ArrayList<String> station2Selection = null; //Step Sources - private Vector<String> sources = null; - private Vector<String> extraSources = null; + private ArrayList<String> sources = null; + private ArrayList<String> extraSources = null; //Step Instrument Model - private Vector<String> instrumentModel = null; + private ArrayList<String> instrumentModel = null; //Step Integration private double integrationFrequency = -1.0; private double integrationTime = -1.0; //Step Correlation private String correlationSelection = null; - private Vector<String> correlationType = null; + private ArrayList<String> correlationType = null; //Step Output Data Column private String outputDataColumn = null; //Step Operation name @@ -65,41 +65,41 @@ public class BBSStepData{ public BBSStepData() { } - public Vector<String> getStation1Selection(){ + public ArrayList<String> getStation1Selection(){ return station1Selection; } - public void setStation1Selection(Vector<String> station1Selection){ + public void setStation1Selection(ArrayList<String> station1Selection){ this.station1Selection = station1Selection; } - public Vector<String> getStation2Selection(){ + public ArrayList<String> getStation2Selection(){ return station2Selection; } - public void setStation2Selection(Vector<String> station2Selection){ + public void setStation2Selection(ArrayList<String> station2Selection){ this.station2Selection = station2Selection; } - public Vector<String> getSources(){ + public ArrayList<String> getSources(){ return sources; } - public void setSources(Vector<String> sources){ + public void setSources(ArrayList<String> sources){ this.sources = sources; } - public Vector<String> getExtraSources(){ + public ArrayList<String> getExtraSources(){ return extraSources; } - public void setExtraSources(Vector<String> extraSources){ + public void setExtraSources(ArrayList<String> extraSources){ this.extraSources = extraSources; } - public Vector<String> getInstrumentModel(){ + public ArrayList<String> getInstrumentModel(){ return instrumentModel; } - public void setInstrumentModel(Vector<String> instrumentModel){ + public void setInstrumentModel(ArrayList<String> instrumentModel){ this.instrumentModel = instrumentModel; } @@ -127,11 +127,11 @@ public class BBSStepData{ this.correlationSelection = correlationSelection; } - public Vector<String> getCorrelationType(){ + public ArrayList<String> getCorrelationType(){ return correlationType; } - public void setCorrelationType(Vector<String> correlationType){ + public void setCorrelationType(ArrayList<String> correlationType){ this.correlationType = correlationType; } @@ -169,7 +169,7 @@ public class BBSStepData{ public synchronized void addOperationAttribute(String key, String value){ if(operationAttributes==null){ - operationAttributes=new HashMap<String,String>(); + operationAttributes=new HashMap<>(); } this.operationAttributes.put(key,value); } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepDataManager.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepDataManager.java index 82175b6588e..7228237e7ee 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepDataManager.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepDataManager.java @@ -24,10 +24,9 @@ package nl.astron.lofar.sas.otbcomponents.bbs.stepmanagement; import java.rmi.RemoteException; -import java.util.Enumeration; import java.util.HashMap; import java.util.HashSet; -import java.util.Vector; +import java.util.ArrayList; import nl.astron.lofar.lofarutils.LofarUtils; import nl.astron.lofar.sas.otb.jotdb3.jOTDBnode; import nl.astron.lofar.sas.otb.jotdb3.jVICnodeDef; @@ -46,7 +45,7 @@ public class BBSStepDataManager{ private static BBSStepDataManager instance; private static Logger logger = Logger.getLogger(BBSStepDataManager.class); private static jOTDBnode stepContainerNode = null; - private static Vector OTDBcomponentCache = null; + private static ArrayList<jVICnodeDef> OTDBcomponentCache = null; private BBSStrategy theStrategy = null; private HashMap<String,BBSStepData> stepsCollection = null; private HashSet<BBSStep> stepStructureCollection = null; @@ -55,8 +54,8 @@ public class BBSStepDataManager{ * Creates a new instance of BBSStepDataManager, protected by a singleton pattern */ private BBSStepDataManager() { - stepsCollection = new HashMap<String,BBSStepData> (); - stepStructureCollection = new HashSet<BBSStep>(); + stepsCollection = new HashMap<> (); + stepStructureCollection = new HashSet<>(); } /** * Returns a static instance of the BBSStepDataManager class. @@ -84,12 +83,12 @@ public class BBSStepDataManager{ * * @return the unique names of all the steps being managed. */ - public synchronized Vector<String> getStepNames(){ - Vector<String> returnVector = new Vector<String>(); + public synchronized ArrayList<String> getStepNames(){ + ArrayList<String> returnArrayList = new ArrayList<>(); for(String aStep : stepsCollection.keySet()){ - returnVector.add(aStep); + returnArrayList.add(aStep); } - return returnVector; + return returnArrayList; } /** * Returns a BBSStep with a given name, and attaches it to a given parent @@ -221,17 +220,15 @@ public class BBSStepDataManager{ if(strategyStepsParameter!=null){ //retrieve the step names mentioned in the strategy steps parameter (Strategy.Steps) - Vector<String> strategySteps = this.getVectorFromString(strategyStepsParameter.limits,true); + ArrayList<String> strategySteps = this.getArrayListFromString(strategyStepsParameter.limits,true); if(strategySteps.size()>0){ - Vector stepsVector; + ArrayList<jOTDBnode> stepsArrayList; try { - stepsVector = OtdbRmi.getRemoteMaintenance().getItemList(rootNode.treeID(), rootNode.nodeID(), 1); + stepsArrayList = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(rootNode.treeID(), rootNode.nodeID(), 1)); //loop through steps for(String aStep : strategySteps){ - Enumeration se = stepsVector.elements(); - while( se.hasMoreElements() ) { - jOTDBnode aHWNode = (jOTDBnode)se.nextElement(); + for(jOTDBnode aHWNode:stepsArrayList) { //limiting the search for steps that are mentioned in the strategy steps parameter (Strategy.Steps) if (aHWNode.name.equals(aStep)) { //Create a new step and build it (with its substeps as well) @@ -266,13 +263,13 @@ public class BBSStepDataManager{ jOTDBnode parentStepsNode = this.getStrategyStepsNode(this.getStepContainerNode()); //determine the Parent children as defined by the BBS Step Parent object - Vector<BBSStep> currentParentChildren = theStrategy.getChildSteps(); + ArrayList<BBSStep> currentParentChildren = new ArrayList(theStrategy.getChildSteps()); - Vector<String> currentParentChildrenList = new Vector<String>(); + ArrayList<String> currentParentChildrenList = new ArrayList<>(); for(BBSStep someStep : currentParentChildren){ currentParentChildrenList.add(someStep.getName()); } - String newList = this.getStringFromVector(currentParentChildrenList,true); + String newList = this.getStringFromArrayList(currentParentChildrenList,true); parentStepsNode.limits=newList; try{ OtdbRmi.getRemoteMaintenance().saveNode(parentStepsNode); @@ -295,12 +292,9 @@ public class BBSStepDataManager{ jOTDBnode strategyStepsParameter=null; //retrieve 1 levels of parameters to locate Step.XXX.Steps - Vector HWchilds = OtdbRmi.getRemoteMaintenance().getItemList(parentOTDBnode.treeID(), parentOTDBnode.nodeID(), 1); + ArrayList<jOTDBnode> HWchilds = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(parentOTDBnode.treeID(), parentOTDBnode.nodeID(), 1)); // get all the params per child - Enumeration e1 = HWchilds.elements(); - while( e1.hasMoreElements() ) { - - jOTDBnode aHWNode = (jOTDBnode)e1.nextElement(); + for(jOTDBnode aHWNode:HWchilds) { strategyStepsParameter=null; //retrieving Steps if (aHWNode.leaf && aHWNode.name.equals("Steps")) { @@ -308,15 +302,15 @@ public class BBSStepDataManager{ logger.trace("Strategy Steps defined :"+strategyStepsParameter.limits); } else if (aHWNode.leaf && aHWNode.name.equals("Sources")) { if(!aHWNode.limits.equals("")){ - stepDataObject.setSources(this.getVectorFromString(aHWNode.limits,true)); + stepDataObject.setSources(this.getArrayListFromString(aHWNode.limits,true)); } } else if (aHWNode.leaf && aHWNode.name.equals("ExtraSources")) { if(!aHWNode.limits.equals("")){ - stepDataObject.setExtraSources(this.getVectorFromString(aHWNode.limits,true)); + stepDataObject.setExtraSources(this.getArrayListFromString(aHWNode.limits,true)); } } else if (aHWNode.leaf && aHWNode.name.equals("InstrumentModel")) { if(!aHWNode.limits.equals("")){ - stepDataObject.setInstrumentModel(this.getVectorFromString(aHWNode.limits,true)); + stepDataObject.setInstrumentModel(this.getArrayListFromString(aHWNode.limits,true)); } } else if (aHWNode.leaf && aHWNode.name.equals("OutputData")) { stepDataObject.setOutputDataColumn(aHWNode.limits); @@ -331,11 +325,9 @@ public class BBSStepDataManager{ stepDataObject.setOperationName(value); } } else if (!aHWNode.leaf && aHWNode.name.equals("Correlation")) { - Vector correlationParms = this.retrieveChildDataForNode(aHWNode); + ArrayList<jOTDBnode> correlationParms = this.retrieveChildDataForNode(aHWNode); - Enumeration ce = correlationParms.elements(); - while( ce.hasMoreElements() ) { - jOTDBnode aCENode = (jOTDBnode)ce.nextElement(); + for (jOTDBnode aCENode:correlationParms) { if (aCENode.leaf && aCENode.name.equals("Selection")) { if(!aCENode.limits.equals("")){ @@ -343,33 +335,29 @@ public class BBSStepDataManager{ } } else if (aCENode.leaf && aCENode.name.equals("Type")) { if(!aCENode.limits.equals("")){ - stepDataObject.setCorrelationType(this.getVectorFromString(aCENode.limits,true)); + stepDataObject.setCorrelationType(this.getArrayListFromString(aCENode.limits,true)); } } } } else if (!aHWNode.leaf && aHWNode.name.equals("Baselines")) { - Vector baselinesParms = this.retrieveChildDataForNode(aHWNode); + ArrayList<jOTDBnode> baselinesParms = this.retrieveChildDataForNode(aHWNode); - Enumeration ce = baselinesParms.elements(); - while( ce.hasMoreElements() ) { - jOTDBnode aCENode = (jOTDBnode)ce.nextElement(); + for (jOTDBnode aCENode:baselinesParms) { if (aCENode.leaf && aCENode.name.equals("Station1")) { if(!aCENode.limits.equals("")){ - stepDataObject.setStation1Selection(this.getVectorFromString(aCENode.limits,true)); + stepDataObject.setStation1Selection(this.getArrayListFromString(aCENode.limits,true)); } } else if (aCENode.leaf && aCENode.name.equals("Station2")) { if(!aCENode.limits.equals("")){ - stepDataObject.setStation2Selection(this.getVectorFromString(aCENode.limits,true)); + stepDataObject.setStation2Selection(this.getArrayListFromString(aCENode.limits,true)); } } } } else if (!aHWNode.leaf && aHWNode.name.equals("Integration")) { - Vector baselinesParms = this.retrieveChildDataForNode(aHWNode); + ArrayList<jOTDBnode> baselinesParms = this.retrieveChildDataForNode(aHWNode); - Enumeration ce = baselinesParms.elements(); - while( ce.hasMoreElements() ) { - jOTDBnode aCENode = (jOTDBnode)ce.nextElement(); + for (jOTDBnode aCENode: baselinesParms) { if (aCENode.leaf && aCENode.name.equals("Time")) { if(!aCENode.limits.equals("")){ @@ -386,17 +374,14 @@ public class BBSStepDataManager{ if(strategyStepsParameter!=null){ //retrieve the step names mentioned in the steps parameter (XXX.Steps) - Vector<String> strategySteps = this.getVectorFromString(strategyStepsParameter.limits,true); + ArrayList<String> strategySteps = this.getArrayListFromString(strategyStepsParameter.limits,true); if(strategySteps.size()>0){ //Get all the steps present in the BBS Step Container - Vector stepsVector = OtdbRmi.getRemoteMaintenance().getItemList(parentOTDBnode.treeID(), parentOTDBnode.parentID(), 1); + ArrayList<jOTDBnode> stepsArrayList = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(parentOTDBnode.treeID(), parentOTDBnode.parentID(), 1)); for(String aStep : strategySteps){ - Enumeration se = stepsVector.elements(); - //loop through steps - while( se.hasMoreElements() ) { - jOTDBnode aHWNode = (jOTDBnode)se.nextElement(); + for (jOTDBnode aHWNode:stepsArrayList) { //limiting the search for steps that are mentioned in the strategy steps parameter (Strategy.Steps) if (!aHWNode.leaf && aHWNode.name.equals(aStep)) { //Create a new step and build it (with its substeps as well) @@ -414,12 +399,9 @@ public class BBSStepDataManager{ //another iteration to collect operation type attributes if(stepDataObject.getOperationName() !=null){ - Vector HWchilds2 = OtdbRmi.getRemoteMaintenance().getItemList(parentOTDBnode.treeID(), parentOTDBnode.nodeID(), 1); + ArrayList<jOTDBnode> HWchilds2 = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(parentOTDBnode.treeID(), parentOTDBnode.nodeID(), 1)); // get all the params per child - Enumeration e2 = HWchilds2.elements(); - while( e2.hasMoreElements() ) { - - jOTDBnode aHWNode = (jOTDBnode)e2.nextElement(); + for (jOTDBnode aHWNode:HWchilds2) { /* * This operation only supports operation node attributes of up to two levels deep. * @@ -427,22 +409,18 @@ public class BBSStepDataManager{ * Predict.DomainSize.Integration.Freq is NOT supported... */ if (!aHWNode.leaf && aHWNode.name.equals(stepDataObject.getOperationName())){ - Vector operationParms = this.retrieveChildDataForNode(aHWNode); + ArrayList<jOTDBnode> operationParms = this.retrieveChildDataForNode(aHWNode); - Enumeration ce = operationParms.elements(); - while( ce.hasMoreElements() ) { - jOTDBnode aCENode = (jOTDBnode)ce.nextElement(); + for (jOTDBnode aCENode:operationParms) { if (aCENode.leaf){ if(!aCENode.limits.equals("")){ stepDataObject.addOperationAttribute(LofarUtils.keyName(aCENode.name),aCENode.limits); } } else { - Vector operationSubParms = this.retrieveChildDataForNode(aCENode); + ArrayList<jOTDBnode> operationSubParms = this.retrieveChildDataForNode(aCENode); - Enumeration cse = operationSubParms.elements(); - while( cse.hasMoreElements() ) { - jOTDBnode aCSENode = (jOTDBnode)cse.nextElement(); + for (jOTDBnode aCSENode:operationSubParms) { if (aCSENode.leaf){ if(!aCSENode.limits.equals("")){ stepDataObject.addOperationAttribute(LofarUtils.keyName(aCENode.name)+"."+LofarUtils.keyName(aCSENode.name),aCSENode.limits); @@ -473,12 +451,8 @@ public class BBSStepDataManager{ jOTDBnode existingStepNode = null; //check if the step is present in the Step Container - Vector stepsVector = retrieveChildDataForNode(stepsNode); - Enumeration se = stepsVector.elements(); - - //loop through steps - while( se.hasMoreElements() ) { - jOTDBnode aHWNode = (jOTDBnode)se.nextElement(); + ArrayList<jOTDBnode> stepsArrayList = retrieveChildDataForNode(stepsNode); + for (jOTDBnode aHWNode:stepsArrayList) { //delete the standard bbs step found in the template tree if(aHWNode.name.equals("DefaultBBSStep")){ @@ -529,7 +503,7 @@ public class BBSStepDataManager{ //collect components that are part of the operation type... if(currentDataForStep.getOperationAttributes() != null){ - Vector<String> toBeAddedSubComponents = new Vector<String>(); + ArrayList<String> toBeAddedSubComponents = new ArrayList<>(); for(String someOperationAttribute : currentDataForStep.getOperationAttributes().keySet()){ String[] splitter = someOperationAttribute.split("[.]"); if(splitter.length>1){ @@ -546,18 +520,15 @@ public class BBSStepDataManager{ } newStepNode = OtdbRmi.getRemoteMaintenance().getNode(stepContainerNode.treeID(),newStepNodeID); - Vector stepParametersVector = retrieveChildDataForNode(newStepNode); - Enumeration spe = stepParametersVector.elements(); - - while( spe.hasMoreElements() ) { - jOTDBnode aHWNode = (jOTDBnode)spe.nextElement(); + ArrayList<jOTDBnode> stepParametersArrayList = retrieveChildDataForNode(newStepNode); + for (jOTDBnode aHWNode:stepParametersArrayList) { //do all BBS Step parameters //sources if(aHWNode.name.equals("Sources")){ if ( currentDataForStep.getSources() != null){ - aHWNode.limits = this.getStringFromVector(currentDataForStep.getSources(),true); + aHWNode.limits = this.getStringFromArrayList(currentDataForStep.getSources(),true); OtdbRmi.getRemoteMaintenance().saveNode(aHWNode); }else{ OtdbRmi.getRemoteMaintenance().deleteNode(aHWNode); @@ -566,7 +537,7 @@ public class BBSStepDataManager{ //extra sources else if(aHWNode.name.equals("ExtraSources")){ if ( currentDataForStep.getExtraSources() != null){ - aHWNode.limits = this.getStringFromVector(currentDataForStep.getExtraSources(),true); + aHWNode.limits = this.getStringFromArrayList(currentDataForStep.getExtraSources(),true); OtdbRmi.getRemoteMaintenance().saveNode(aHWNode); }else{ OtdbRmi.getRemoteMaintenance().deleteNode(aHWNode); @@ -585,7 +556,7 @@ public class BBSStepDataManager{ //instrument data model else if(aHWNode.name.equals("InstrumentModel")){ if ( currentDataForStep.getInstrumentModel() != null){ - aHWNode.limits = this.getStringFromVector(currentDataForStep.getInstrumentModel(),true); + aHWNode.limits = this.getStringFromArrayList(currentDataForStep.getInstrumentModel(),true); OtdbRmi.getRemoteMaintenance().saveNode(aHWNode); }else{ OtdbRmi.getRemoteMaintenance().deleteNode(aHWNode); @@ -595,11 +566,9 @@ public class BBSStepDataManager{ //Integration else if (!aHWNode.leaf && aHWNode.name.equals("Integration")) { - Vector baselinesParms = this.retrieveChildDataForNode(aHWNode); + ArrayList<jOTDBnode> baselinesParms = this.retrieveChildDataForNode(aHWNode); int presentParams = 0; - Enumeration ce = baselinesParms.elements(); - while( ce.hasMoreElements() ) { - jOTDBnode aCENode = (jOTDBnode)ce.nextElement(); + for (jOTDBnode aCENode:baselinesParms) { //Time @@ -633,17 +602,15 @@ public class BBSStepDataManager{ //Correlation else if (!aHWNode.leaf && aHWNode.name.equals("Correlation")) { - Vector baselinesParms = this.retrieveChildDataForNode(aHWNode); + ArrayList<jOTDBnode> baselinesParms = this.retrieveChildDataForNode(aHWNode); int presentParams = 0; - Enumeration ce = baselinesParms.elements(); - while( ce.hasMoreElements() ) { - jOTDBnode aCENode = (jOTDBnode)ce.nextElement(); + for (jOTDBnode aCENode:baselinesParms) { //Type if (aCENode.leaf && aCENode.name.equals("Type")) { if ( currentDataForStep.getCorrelationType() != null){ - aCENode.limits = this.getStringFromVector(currentDataForStep.getCorrelationType(),true); + aCENode.limits = this.getStringFromArrayList(currentDataForStep.getCorrelationType(),true); OtdbRmi.getRemoteMaintenance().saveNode(aCENode); presentParams++; }else{ @@ -670,17 +637,15 @@ public class BBSStepDataManager{ //Baseline Selection else if (!aHWNode.leaf && aHWNode.name.equals("Baselines")) { - Vector baselinesParms = this.retrieveChildDataForNode(aHWNode); + ArrayList<jOTDBnode> baselinesParms = this.retrieveChildDataForNode(aHWNode); int presentParams = 0; - Enumeration ce = baselinesParms.elements(); - while( ce.hasMoreElements() ) { - jOTDBnode aCENode = (jOTDBnode)ce.nextElement(); + for (jOTDBnode aCENode:baselinesParms) { //Time if (aCENode.leaf && aCENode.name.equals("Station1")) { if ( currentDataForStep.getStation1Selection() != null){ - aCENode.limits = getStringFromVector(currentDataForStep.getStation1Selection(),true); + aCENode.limits = getStringFromArrayList(currentDataForStep.getStation1Selection(),true); OtdbRmi.getRemoteMaintenance().saveNode(aCENode); presentParams++; }else{ @@ -691,7 +656,7 @@ public class BBSStepDataManager{ } else if (aCENode.leaf && aCENode.name.equals("Station2")) { if ( currentDataForStep.getStation2Selection() != null){ - aCENode.limits = getStringFromVector(currentDataForStep.getStation2Selection(),true); + aCENode.limits = getStringFromArrayList(currentDataForStep.getStation2Selection(),true); OtdbRmi.getRemoteMaintenance().saveNode(aCENode); presentParams++; }else{ @@ -718,10 +683,8 @@ public class BBSStepDataManager{ else if (!aHWNode.leaf && aHWNode.name.equals(currentDataForStep.getOperationName())) { int presentParams = 0; if(currentDataForStep.getOperationAttributes()!=null){ - Vector attributeParms = this.retrieveChildDataForNode(aHWNode); - Enumeration ce = attributeParms.elements(); - while( ce.hasMoreElements() ) { - jOTDBnode aCENode = (jOTDBnode)ce.nextElement(); + ArrayList<jOTDBnode> attributeParms = this.retrieveChildDataForNode(aHWNode); + for (jOTDBnode aCENode:attributeParms) { /* * This operation only supports operation node attributes of up to two levels deep. * @@ -740,11 +703,9 @@ public class BBSStepDataManager{ } //parameter node inside Operation } else if (!aCENode.leaf){ - Vector attributeSubParms = this.retrieveChildDataForNode(aCENode); + ArrayList<jOTDBnode> attributeSubParms = this.retrieveChildDataForNode(aCENode); int presentSubParams = 0; - Enumeration cse = attributeSubParms.elements(); - while( cse.hasMoreElements() ) { - jOTDBnode aCSENode = (jOTDBnode)cse.nextElement(); + for (jOTDBnode aCSENode:attributeSubParms) { String toBeInsertedSubValue = currentDataForStep.getOperationAttribute(LofarUtils.keyName(aCENode.name)+"."+LofarUtils.keyName(aCSENode.name)); if ( toBeInsertedSubValue != null){ aCSENode.limits = toBeInsertedSubValue; @@ -770,13 +731,13 @@ public class BBSStepDataManager{ //add other variables... //add name pointers to the child steps else if(aHWNode.name.equals("Steps")){ - Vector<BBSStep> itsChildSteps = aBBSStep.getChildSteps(); + ArrayList<BBSStep> itsChildSteps = aBBSStep.getChildSteps(); if(itsChildSteps != null && itsChildSteps.size() > 0){ - Vector<String> childStepNames = new Vector<String>(); + ArrayList<String> childStepNames = new ArrayList<>(); for(BBSStep aChildStep : itsChildSteps){ childStepNames.add(aChildStep.getName()); } - aHWNode.limits = this.getStringFromVector(childStepNames,true); + aHWNode.limits = this.getStringFromArrayList(childStepNames,true); OtdbRmi.getRemoteMaintenance().saveNode(aHWNode); }else{ OtdbRmi.getRemoteMaintenance().deleteNode(aHWNode); @@ -814,11 +775,9 @@ public class BBSStepDataManager{ } //remove all steps - Vector parentParmVector = this.retrieveChildDataForNode(this.getStepContainerNode()); - Enumeration ppe = parentParmVector.elements(); + ArrayList<jOTDBnode> parentParmArrayList = this.retrieveChildDataForNode(this.getStepContainerNode()); //loop through steps and delete the step that matches with the step provided - while( ppe.hasMoreElements() ) { - jOTDBnode aHWNode = (jOTDBnode)ppe.nextElement(); + for (jOTDBnode aHWNode:parentParmArrayList) { try { OtdbRmi.getRemoteMaintenance().deleteNode(aHWNode); } catch (RemoteException ex) { @@ -915,14 +874,14 @@ public class BBSStepDataManager{ return returnData; } /** - * Helper method that retrieves a Vector of strings out of a String representation thereof. + * Helper method that retrieves a ArrayList of strings out of a String representation thereof. * - * @parm theList the String representation of a Vector to convert + * @parm theList the String representation of a ArrayList to convert * @parm removeQuotes tells if quotes are/are not present in the String and should/should not be removed in the process. - * @return Vector of Strings extrapolated from theList. + * @return ArrayList of Strings extrapolated from theList. */ - private Vector<String> getVectorFromString(String theList,boolean removeQuotes) { - Vector<String> listItems = new Vector<String>(); + private ArrayList<String> getArrayListFromString(String theList,boolean removeQuotes) { + ArrayList<String> listItems = new ArrayList<>(); String aList = theList; if (aList.startsWith("[")) { aList = aList.substring(1,aList.length()); @@ -943,17 +902,17 @@ public class BBSStepDataManager{ return listItems; } /** - * Helper method that retrieves a String representation of a Vector of strings. + * Helper method that retrieves a String representation of a ArrayList of strings. * - * @parm aStringVector the String Vector to convert to a String representation. + * @parm aStringArrayList the String ArrayList to convert to a String representation. * @parm createQuotes tells if quotes should/should not be added in the process. - * @return String representation of aStringVector. + * @return String representation of aStringArrayList. */ - private String getStringFromVector(Vector<String> aStringVector,boolean createQuotes) { + private String getStringFromArrayList(ArrayList<String> aStringArrayList,boolean createQuotes) { String aList="["; - if (aStringVector.size() > 0) { + if (aStringArrayList.size() > 0) { int i = 0; - for (String aString : aStringVector){ + for (String aString : aStringArrayList){ if(i>0) aList+= ","; if(createQuotes){ aList += "\""; @@ -969,15 +928,15 @@ public class BBSStepDataManager{ return aList; } /** - * Helper method that retrieves a Vector of jOTDBnode objects that are the child of aNode. + * Helper method that retrieves a ArrayList of jOTDBnode objects that are the child of aNode. * * @parm aNode the jOTDBnode to retrieve the child nodes for. - * @return Vector of child jOTDBnode objects. + * @return ArrayList of child jOTDBnode objects. */ - private Vector retrieveChildDataForNode(jOTDBnode aNode){ - Vector HWchilds = new Vector(); + private ArrayList retrieveChildDataForNode(jOTDBnode aNode){ + ArrayList HWchilds = new ArrayList(); try { - HWchilds = OtdbRmi.getRemoteMaintenance().getItemList(aNode.treeID(), aNode.nodeID(), 1); + HWchilds = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(aNode.treeID(), aNode.nodeID(), 1)); // get all the params per child } catch (RemoteException ex) { logger.error("Error during retrieveChildDataForNode!", ex); @@ -993,13 +952,10 @@ public class BBSStepDataManager{ private jOTDBnode getStrategyStepsNode(jOTDBnode stepContainerNode){ jOTDBnode strategyStepsParameter=null; try { - Vector HWchilds = null; - HWchilds = OtdbRmi.getRemoteMaintenance().getItemList(stepContainerNode.treeID(), stepContainerNode.parentID(), 2); + ArrayList<jOTDBnode> HWchilds = null; + HWchilds = new ArrayList(OtdbRmi.getRemoteMaintenance().getItemList(stepContainerNode.treeID(), stepContainerNode.parentID(), 2)); // get all the params per child - Enumeration e1 = HWchilds.elements(); - while( e1.hasMoreElements() ) { - - jOTDBnode aHWNode = (jOTDBnode)e1.nextElement(); + for (jOTDBnode aHWNode: HWchilds) { strategyStepsParameter=null; //retrieving Strategy.Steps if (aHWNode.leaf && aHWNode.name.equals("Steps")) { @@ -1024,11 +980,9 @@ public class BBSStepDataManager{ int returnId = 0; try { if(BBSStepDataManager.OTDBcomponentCache==null){ - OTDBcomponentCache = OtdbRmi.getRemoteMaintenance().getComponentList("%",false); + OTDBcomponentCache = new ArrayList(OtdbRmi.getRemoteMaintenance().getComponentList("%",false)); } - Enumeration ce = OTDBcomponentCache.elements(); - while (ce.hasMoreElements()){ - jVICnodeDef aDef = (jVICnodeDef)ce.nextElement(); + for (jVICnodeDef aDef:OTDBcomponentCache) { if(aDef.name.equals(nodeName)){ returnId = aDef.nodeID(); } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.form index 011db908170..72c59e90695 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <AuxValues> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.java index 826acffae9b..0d49e6b4802 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStepExplorerPanel.java @@ -25,7 +25,7 @@ package nl.astron.lofar.sas.otbcomponents.bbs.stepmanagement; import java.awt.Color; import java.awt.event.ActionEvent; import java.util.HashMap; -import java.util.Vector; +import java.util.ArrayList; import javax.swing.DefaultListModel; import javax.swing.JList; import javax.swing.JOptionPane; @@ -52,7 +52,7 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ public final static Color NOT_INHERITED_FROM_PARENT = new Color(204,255,204); public final static Color DEFAULT = Color.WHITE; - private static HashMap<String,String> stepOperationPanels = new HashMap<String,String>(); + private static HashMap<String,String> stepOperationPanels = new HashMap<>(); private IBBSStepOperationPanel currentStepOperationsPanel = null; private BBSStep itsBBSStep = null; @@ -184,7 +184,7 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ //sources stepExplorerNSources.setBackground(DEFAULT); - this.fillList(this.stepExplorerNSourcesList,new Vector<String>()); + this.fillList(this.stepExplorerNSourcesList,new ArrayList<String>()); if(stepData.getSources() != null){ if(stepData.getSources().size()>0){ this.useAllSourcesCheckbox.setSelected(false); @@ -214,7 +214,7 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ //instrument model stepExplorerInstrumentModel.setBackground(DEFAULT); - this.fillList(this.stepExplorerInstrumentModelList,new Vector<String>()); + this.fillList(this.stepExplorerInstrumentModelList,new ArrayList<String>()); if(stepData.getInstrumentModel() != null){ if(stepData.getInstrumentModel().size()>0){ this.noInstrumentModelCheckbox.setSelected(false); @@ -245,7 +245,7 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ // //extra sources // stepExplorerESources.setBackground(DEFAULT); // this.stepExplorerModifyESourceText.setText(""); -// this.fillList(this.stepExplorerESourcesList,new Vector<String>()); +// this.fillList(this.stepExplorerESourcesList,new ArrayList<String>()); // if(stepData.getExtraSources() != null){ // if(stepData.getExtraSources().size()>0){ // this.useExtraSourcesCheckbox.setSelected(true); @@ -337,16 +337,16 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ //type this.stepExplorerCorrelationTypeList.setBackground(DEFAULT); if(stepData.getCorrelationType() != null){ - this.fillSelectionListFromVector(stepExplorerCorrelationTypeList,stepData.getCorrelationType()); + this.fillSelectionListFromArrayList(stepExplorerCorrelationTypeList,stepData.getCorrelationType()); this.stepExplorerCorrelationTypeList.setBackground(NOT_INHERITED_FROM_PARENT); }else{ if(inheritedData.getCorrelationType() != null){ - this.fillSelectionListFromVector(stepExplorerCorrelationTypeList,inheritedData.getCorrelationType()); + this.fillSelectionListFromArrayList(stepExplorerCorrelationTypeList,inheritedData.getCorrelationType()); stepExplorerCorrelationTypeList.setBackground(INHERITED_FROM_PARENT); }else{ - this.fillSelectionListFromVector(stepExplorerCorrelationTypeList,new Vector<String>()); + this.fillSelectionListFromArrayList(stepExplorerCorrelationTypeList,new ArrayList<String>()); stepExplorerCorrelationTypeList.setBackground(NOT_DEFINED); } } @@ -369,25 +369,25 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ this.BaselineSelectionPanel.setBackground(DEFAULT); this.baselineStation1Text.setText(""); this.baselineStation2Text.setText(""); - this.fillBaselineTableFromVectors(new Vector<String>(),new Vector<String>()); + this.fillBaselineTableFromArrayLists(new ArrayList<String>(),new ArrayList<String>()); if(stepData.getStation1Selection() != null && stepData.getStation2Selection() != null){ - Vector<String> station1 = stepData.getStation1Selection(); - Vector<String> station2 = stepData.getStation2Selection(); + ArrayList<String> station1 = stepData.getStation1Selection(); + ArrayList<String> station2 = stepData.getStation2Selection(); if(station1.size()>0 && station2.size()>0){ this.baselineUseAllCheckbox.setSelected(false); - this.fillBaselineTableFromVectors(station1,station2); + this.fillBaselineTableFromArrayLists(station1,station2); }else{ this.baselineUseAllCheckbox.setSelected(true); } this.BaselineSelectionPanel.setBackground(NOT_INHERITED_FROM_PARENT); }else{ if(inheritedData.getStation1Selection() != null && inheritedData.getStation2Selection() != null){ - Vector<String> station1 = inheritedData.getStation1Selection(); - Vector<String> station2 = inheritedData.getStation2Selection(); + ArrayList<String> station1 = inheritedData.getStation1Selection(); + ArrayList<String> station2 = inheritedData.getStation2Selection(); if(station1.size()>0 && station2.size()>0){ this.baselineUseAllCheckbox.setSelected(false); - this.fillBaselineTableFromVectors(station1,station2); + this.fillBaselineTableFromArrayLists(station1,station2); }else{ this.baselineUseAllCheckbox.setSelected(true); } @@ -429,18 +429,18 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ BBSStepData inheritedData = BBSStepDataManager.getInstance().getInheritedStepData(aStep); //normal sources - Vector<String> sources = createList(stepExplorerNSourcesList); + ArrayList<String> sources = createList(stepExplorerNSourcesList); if(this.useAllSourcesCheckbox.isSelected()){ - sources = new Vector<String>(); + sources = new ArrayList<>(); } if(sources.equals(inheritedData.getSources())){ aStepData.setSources(null); }else{ if(this.useAllSourcesCheckbox.isSelected()){ - aStepData.setSources(new Vector<String>()); + aStepData.setSources(new ArrayList<String>()); }else{ if(sources.size()>0){ - aStepData.setSources(new Vector<String>()); + aStepData.setSources(new ArrayList<String>()); }else{ aStepData.setSources(null); } @@ -455,18 +455,18 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ //instrument model - Vector<String> imodels = createList(stepExplorerInstrumentModelList); + ArrayList<String> imodels = createList(stepExplorerInstrumentModelList); if(this.noInstrumentModelCheckbox.isSelected()){ - imodels = new Vector<String>(); + imodels = new ArrayList<>(); } if(imodels.equals(inheritedData.getInstrumentModel())){ aStepData.setInstrumentModel(null); }else{ if(this.noInstrumentModelCheckbox.isSelected()){ - aStepData.setInstrumentModel(new Vector<String>()); + aStepData.setInstrumentModel(new ArrayList<String>()); }else{ if(imodels.size()>0){ - aStepData.setInstrumentModel(new Vector<String>()); + aStepData.setInstrumentModel(new ArrayList<String>()); }else{ aStepData.setInstrumentModel(null); } @@ -481,18 +481,18 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ /* //instrument model - Vector<String> imodels = createVectorFromSelectionList(stepExplorerInstrumentModelList); + ArrayList<String> imodels = createArrayListFromSelectionList(stepExplorerInstrumentModelList); if(this.noInstrumentModelCheckbox.isSelected()){ - imodels = new Vector<String>(); + imodels = new ArrayList<String>(); } if(imodels.equals(inheritedData.getInstrumentModel())){ aStepData.setInstrumentModel(null); }else{ if(this.noInstrumentModelCheckbox.isSelected()){ - aStepData.setInstrumentModel(new Vector<String>()); + aStepData.setInstrumentModel(new ArrayList<String>()); }else{ if(imodels.size()>0){ - aStepData.setInstrumentModel(new Vector<String>()); + aStepData.setInstrumentModel(new ArrayList<String>()); }else{ aStepData.setInstrumentModel(null); } @@ -507,18 +507,18 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ */ //extra sources -// Vector<String> esources = createList(stepExplorerESourcesList); +// ArrayList<String> esources = createList(stepExplorerESourcesList); // if(!this.useExtraSourcesCheckbox.isSelected()){ -// esources = new Vector<String>(); +// esources = new ArrayList<String>(); // } // if(esources.equals(inheritedData.getExtraSources())){ // aStepData.setExtraSources(null); // }else{ // if(!this.useExtraSourcesCheckbox.isSelected()){ -// aStepData.setExtraSources(new Vector<String>()); +// aStepData.setExtraSources(new ArrayList<String>()); // }else{ // if(esources.size()>0){ -// aStepData.setExtraSources(new Vector<String>()); +// aStepData.setExtraSources(new ArrayList<String>()); // }else{ // aStepData.setExtraSources(null); // } @@ -591,18 +591,18 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ //Correlation //Type - if(this.createVectorFromSelectionList(this.stepExplorerCorrelationTypeList).size()==0){ + if(this.createArrayListFromSelectionList(this.stepExplorerCorrelationTypeList).isEmpty()){ aStepData.setCorrelationType(null); }else{ - if(createVectorFromSelectionList(stepExplorerCorrelationTypeList).equals(inheritedData.getCorrelationType())){ + if(createArrayListFromSelectionList(stepExplorerCorrelationTypeList).equals(inheritedData.getCorrelationType())){ aStepData.setCorrelationType(null); }else{ - aStepData.setCorrelationType(new Vector<String>()); + aStepData.setCorrelationType(new ArrayList<String>()); } } if(aStepData.getCorrelationType()!=null){ - if(!createVectorFromSelectionList(stepExplorerCorrelationTypeList).equals(aStepData.getCorrelationType())){ - aStepData.setCorrelationType(createVectorFromSelectionList(stepExplorerCorrelationTypeList)); + if(!createArrayListFromSelectionList(stepExplorerCorrelationTypeList).equals(aStepData.getCorrelationType())){ + aStepData.setCorrelationType(createArrayListFromSelectionList(stepExplorerCorrelationTypeList)); } } //Selection @@ -630,21 +630,21 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ } //baseline selection - Vector<Vector<String>> baselines = createVectorsFromBaselineTable(); - Vector<String> station1 = baselines.get(0); - Vector<String> station2 = baselines.get(1); + ArrayList<ArrayList<String>> baselines = createArrayListsFromBaselineTable(); + ArrayList<String> station1 = baselines.get(0); + ArrayList<String> station2 = baselines.get(1); if(this.baselineUseAllCheckbox.isSelected()){ - station1 = new Vector<String>(); - station2 = new Vector<String>(); + station1 = new ArrayList<>(); + station2 = new ArrayList<>(); } if(station1.equals(inheritedData.getStation1Selection()) && station2.equals(inheritedData.getStation2Selection())){ aStepData.setStation1Selection(null); }else{ if(this.baselineUseAllCheckbox.isSelected()){ - aStepData.setStation1Selection(new Vector<String>()); + aStepData.setStation1Selection(new ArrayList<String>()); }else{ if(station1.size()>0 && station2.size()>0){ - aStepData.setStation1Selection(new Vector<String>()); + aStepData.setStation1Selection(new ArrayList<String>()); }else{ aStepData.setStation1Selection(null); } @@ -657,10 +657,10 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ aStepData.setStation2Selection(null); }else{ if(this.baselineUseAllCheckbox.isSelected()){ - aStepData.setStation2Selection(new Vector<String>()); + aStepData.setStation2Selection(new ArrayList<String>()); }else{ if(station1.size()>0 && station2.size()>0){ - aStepData.setStation2Selection(new Vector<String>()); + aStepData.setStation2Selection(new ArrayList<String>()); }else{ aStepData.setStation2Selection(null); } @@ -713,7 +713,7 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ HashMap<String,String> oldValuesFromStep = aStepData.getOperationAttributes(); - if(oldValuesFromStep == null) oldValuesFromStep = new HashMap<String,String>(); + if(oldValuesFromStep == null) oldValuesFromStep = new HashMap<>(); for(String aKey : valuesFromForm.keySet()){ if(oldValuesFromStep.containsKey(aKey)){ @@ -751,13 +751,13 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ } /** - * Helper method that builds a String Vector representation of the contents of a JList. + * Helper method that builds a String ArrayList representation of the contents of a JList. * - * @parm aListComponent the JList component to build a String Vector representation for. - * @return String Vector representation of the contents of the given JList. + * @parm aListComponent the JList component to build a String ArrayList representation for. + * @return String ArrayList representation of the contents of the given JList. */ - private Vector<String> createList(JList aListComponent) { - Vector<String> aList = new Vector<String>(); + private ArrayList<String> createList(JList aListComponent) { + ArrayList<String> aList = new ArrayList<>(); if (aListComponent.getModel().getSize() > 0) { for (int i=0; i < aListComponent.getModel().getSize();i++) { aList.add(aListComponent.getModel().getElementAt(i).toString()); @@ -767,12 +767,12 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ } /** - * Helper method that fills a JList with a String Vector representation of a JList. + * Helper method that fills a JList with a String ArrayList representation of a JList. * * @parm aListComponent the JList to fill - * @parm theList the String Vector to fill the JList with. + * @parm theList the String ArrayList to fill the JList with. */ - private void fillList(JList aListComponent,Vector<String> theList) { + private void fillList(JList aListComponent,ArrayList<String> theList) { DefaultListModel itsModel = new DefaultListModel(); aListComponent.setModel(itsModel); for(String anItem : theList){ @@ -782,13 +782,13 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ } /** - * Helper method that builds a String Vector representation of the <i>selected</i> contents of a JList. + * Helper method that builds a String ArrayList representation of the <i>selected</i> contents of a JList. * - * @parm aListComponent the JList component to build a String Vector representation for. - * @return String Vector representation of the <i>selected</i> contents of the given JList. + * @parm aListComponent the JList component to build a String ArrayList representation for. + * @return String ArrayList representation of the <i>selected</i> contents of the given JList. */ - private Vector<String> createVectorFromSelectionList(JList aListComponent) { - Vector<String> aList= new Vector<String>(); + private ArrayList<String> createArrayListFromSelectionList(JList aListComponent) { + ArrayList<String> aList= new ArrayList<>(); int[] selectedIndices = aListComponent.getSelectedIndices(); if (selectedIndices.length > 0) { for (int i=0; i < selectedIndices.length;i++) { @@ -799,12 +799,12 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ } /** - * Helper method that selects items in a JList with a String Vector representation of the selected items of a JList. + * Helper method that selects items in a JList with a String ArrayList representation of the selected items of a JList. * * @parm aListComponent the JList to select items in. - * @parm theList the String Vector to select items in the JList with. + * @parm theList the String ArrayList to select items in the JList with. */ - private void fillSelectionListFromVector(JList aListComponent,Vector<String> theList) { + private void fillSelectionListFromArrayList(JList aListComponent,ArrayList<String> theList) { int[] toBeSelectedIndices = new int[theList.size()]; int aValueIndex = 0; if(theList.size()>0){ @@ -826,12 +826,12 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ } /** - * Helper method that fills the Baseline table with the Station1 and Station2 Vectors + * Helper method that fills the Baseline table with the Station1 and Station2 ArrayLists * - * @parm station1 the Station1 part of the Baseline pair of Vectors. - * @parm station2 the Station2 part of the Baseline pair of Vectors. + * @parm station1 the Station1 part of the Baseline pair of ArrayLists. + * @parm station2 the Station2 part of the Baseline pair of ArrayLists. */ - private void fillBaselineTableFromVectors(Vector<String> station1,Vector<String> station2) { + private void fillBaselineTableFromArrayLists(ArrayList<String> station1,ArrayList<String> station2) { baselineStationsTable.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { @@ -853,37 +853,37 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ if(station1.size() == station2.size()){ for(int i = 0; i<station1.size();i++){ - Vector<String> newRow = new Vector<String>(); + ArrayList<String> newRow = new ArrayList<>(); newRow.add(station1.get(i)); newRow.add(station2.get(i)); - bsltm.addRow(newRow); + bsltm.addRow(newRow.toArray()); } } } /** - * Helper method that creates the Station1 and Station2 vectors out of the items in the Baseline table + * Helper method that creates the Station1 and Station2 ArrayLists out of the items in the Baseline table * - * @return Vector containing 2 String Vectors : Station1 (index 0) and Station2 (index 1). + * @return ArrayList containing 2 String ArrayLists : Station1 (index 0) and Station2 (index 1). */ - private Vector<Vector<String>> createVectorsFromBaselineTable(){ - Vector<Vector<String>> returnVector = new Vector<Vector<String>>(); - Vector<String> station1Vector = new Vector<String>(); - Vector<String> station2Vector = new Vector<String>(); + private ArrayList<ArrayList<String>> createArrayListsFromBaselineTable(){ + ArrayList<ArrayList<String>> returnArrayList = new ArrayList<>(); + ArrayList<String> station1ArrayList = new ArrayList<>(); + ArrayList<String> station2ArrayList = new ArrayList<>(); DefaultTableModel bsltm = (DefaultTableModel)baselineStationsTable.getModel(); if(bsltm.getRowCount()>0){ for(int i = 0; i<bsltm.getRowCount();i++){ - String station1 = ((Vector)bsltm.getDataVector().elementAt(i)).elementAt(0).toString(); - String station2 = ((Vector)bsltm.getDataVector().elementAt(i)).elementAt(1).toString(); - station1Vector.add(station1); - station2Vector.add(station2); + String station1 = ((ArrayList)bsltm.getDataVector().elementAt(i)).get(0).toString(); + String station2 = ((ArrayList)bsltm.getDataVector().elementAt(i)).get(1).toString(); + station1ArrayList.add(station1); + station2ArrayList.add(station2); } } - returnVector.add(station1Vector); - returnVector.add(station2Vector); + returnArrayList.add(station1ArrayList); + returnArrayList.add(station2ArrayList); - return returnVector; + return returnArrayList; } /** * Helper method that checks if the Baseline input text fields are filled @@ -912,17 +912,7 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ if(name!=null){ try { newPanel = (JPanel) Class.forName(name).newInstance(); - } catch (ClassNotFoundException ex) { - String aS="Error during getPanel: "+ ex; - logger.error(aS); - LofarUtils.showErrorPanel(this,aS,new javax.swing.ImageIcon(getClass().getResource("/nl/astron/lofar/sas/otb/icons/16_warn.gif"))); - return; - } catch (InstantiationException ex) { - String aS="Error during getPanel: "+ ex; - logger.error(aS); - LofarUtils.showErrorPanel(this,aS,new javax.swing.ImageIcon(getClass().getResource("/nl/astron/lofar/sas/otb/icons/16_warn.gif"))); - return; - } catch (IllegalAccessException ex) { + } catch ( ClassNotFoundException | InstantiationException | IllegalAccessException ex) { String aS="Error during getPanel: "+ ex; logger.error(aS); LofarUtils.showErrorPanel(this,aS,new javax.swing.ImageIcon(getClass().getResource("/nl/astron/lofar/sas/otb/icons/16_warn.gif"))); @@ -1554,7 +1544,7 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ selectedIndices = stepExplorerInstrumentModelList.getSelectedIndices(); stepExplorerInstrumentModel.setBackground(NOT_INHERITED_FROM_PARENT); } - if(theInstrumentModel.size()==0){ + if(theInstrumentModel.isEmpty()){ this.deleteInstrumentButton.setEnabled(false); } }//GEN-LAST:event_deleteInstrumentButtonActionPerformed @@ -1695,10 +1685,10 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ DefaultTableModel bsltm = (DefaultTableModel)this.baselineStationsTable.getModel(); String typedText=baselineStation1Text.getText(); String typedText2=baselineStation2Text.getText(); - Vector<String> baselinePair = new Vector<String>(); + ArrayList<String> baselinePair = new ArrayList<>(); baselinePair.add(typedText); baselinePair.add(typedText2); - bsltm.addRow(baselinePair); + bsltm.addRow(baselinePair.toArray()); this.BaselineSelectionPanel.setBackground(NOT_INHERITED_FROM_PARENT); }//GEN-LAST:event_addBaseLineButtonActionPerformed @@ -1779,7 +1769,7 @@ public class BBSStepExplorerPanel extends javax.swing.JPanel{ selectedIndices = stepExplorerNSourcesList.getSelectedIndices(); stepExplorerNSources.setBackground(NOT_INHERITED_FROM_PARENT); } - if(theSourceModel.size()==0){ + if(theSourceModel.isEmpty()){ this.deleteNSourceButton.setEnabled(false); } }//GEN-LAST:event_deleteNSourceButtonActionPerformed diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStrategy.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStrategy.java index 719b868d27d..5ecc2a3d03c 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStrategy.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/BBSStrategy.java @@ -23,7 +23,7 @@ package nl.astron.lofar.sas.otbcomponents.bbs.stepmanagement; -import java.util.Vector; +import java.util.ArrayList; /** * Representation of the BBS Strategy to contain all BBS Strategy steps. @@ -35,13 +35,13 @@ import java.util.Vector; public class BBSStrategy{ //Contained substeps - private Vector<BBSStep> childSteps; + private ArrayList<BBSStep> childSteps; /** * Creates a new instance of BBSStrategy */ public BBSStrategy() { - childSteps = new Vector<BBSStep>(); + childSteps = new ArrayList<>(); } /** @@ -51,7 +51,7 @@ public class BBSStrategy{ * * @return Vector of BBSStep objects that are children of this BBSStep */ - public Vector<BBSStep> getChildSteps(){ + public ArrayList<BBSStep> getChildSteps(){ return childSteps; } @@ -122,7 +122,7 @@ public class BBSStrategy{ if(indexOfChild >= 0 && indexOfChild < childSteps.size()){ BBSStep currentStepInIndex = childSteps.get(indexOfChild); if(child.getName().equals(currentStepInIndex.getName())){ - this.childSteps.removeElementAt(indexOfChild); + this.childSteps.remove(indexOfChild); childSteps.trimToSize(); } } @@ -149,7 +149,7 @@ public class BBSStrategy{ if(oldIndexOfChild >= 0 && oldIndexOfChild < childSteps.size()){ BBSStep currentStepInIndex = childSteps.get(oldIndexOfChild); if(child.getName().equals(currentStepInIndex.getName())){ - this.childSteps.removeElementAt(oldIndexOfChild); + this.childSteps.remove(oldIndexOfChild); this.childSteps.add(newIndexOfChild,currentStepInIndex); childSteps.trimToSize(); } diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/operations/BBSStepOperationPanelSolveImpl.form b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/operations/BBSStepOperationPanelSolveImpl.form index 6b47fe0f29c..5ef4a1ca8f3 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/operations/BBSStepOperationPanelSolveImpl.form +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/operations/BBSStepOperationPanelSolveImpl.form @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="UTF-8" ?> +<?xml version="1.1" encoding="UTF-8" ?> <Form version="1.2" maxVersion="1.2" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> <Properties> diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/operations/BBSStepOperationPanelSolveImpl.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/operations/BBSStepOperationPanelSolveImpl.java index 52ef784d2e8..e395213199d 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/operations/BBSStepOperationPanelSolveImpl.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/bbs/stepmanagement/operations/BBSStepOperationPanelSolveImpl.java @@ -39,8 +39,8 @@ import nl.astron.lofar.sas.otbcomponents.bbs.stepmanagement.BBSStepExplorerPanel */ public class BBSStepOperationPanelSolveImpl extends javax.swing.JPanel implements IBBSStepOperationPanel{ - private HashMap<String,String> itsOperationParameters = new HashMap<String,String>(); - private HashMap<String,String> itsInheritedOperationParameters = new HashMap<String,String>(); + private HashMap<String,String> itsOperationParameters = new HashMap<>(); + private HashMap<String,String> itsInheritedOperationParameters = new HashMap<>(); /** @@ -211,7 +211,7 @@ public class BBSStepOperationPanelSolveImpl extends javax.swing.JPanel implement } public HashMap<String,String> getBBSStepOperationAttributes(){ - HashMap<String,String> returnMap = new HashMap<String,String>(); + HashMap<String,String> returnMap = new HashMap<>(); //Max iterations if(this.maxIterationsText.getText().equals("")){ @@ -724,7 +724,7 @@ public class BBSStepOperationPanelSolveImpl extends javax.swing.JPanel implement selectedIndices = excludedParmsList.getSelectedIndices(); excludedParmsGroupPanel.setBackground(BBSStepExplorerPanel.NOT_INHERITED_FROM_PARENT); } - if(theSourceModel.size()==0){ + if(theSourceModel.isEmpty()){ this.deleteExcludedParmButton.setEnabled(false); } }//GEN-LAST:event_deleteExcludedParmButtonActionPerformed @@ -764,7 +764,7 @@ public class BBSStepOperationPanelSolveImpl extends javax.swing.JPanel implement selectedIndices = solvableParmsList.getSelectedIndices(); this.solvableParmsGroupPanel.setBackground(BBSStepExplorerPanel.NOT_INHERITED_FROM_PARENT); } - if(theSourceModel.size()==0){ + if(theSourceModel.isEmpty()){ this.deleteSolvableParmButton.setEnabled(false); } }//GEN-LAST:event_deleteSolvableParmButtonActionPerformed diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/userpanels/ObservationPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/userpanels/ObservationPanel.java index 6e503b5f538..22b4a2d522a 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/userpanels/ObservationPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/userpanels/ObservationPanel.java @@ -34,7 +34,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.BitSet; import java.util.Collection; -import java.util.Vector; import javax.swing.DefaultListModel; import javax.swing.JFileChooser; import javax.swing.JMenuItem; @@ -189,7 +188,7 @@ public class ObservationPanel extends javax.swing.JPanel implements IViewPanel{ // AnaBeam childs finished, add to AnaBeamArrayList itsAnaBeamList.add(itsActiveAnaBeam); }else if (LofarUtils.keyName(aNode.name).contains("Beamformer")) { - itsBeamformers.addElement(aNode); + itsBeamformers.add(aNode); this.retrieveAndDisplayChildDataForNode(aNode); } else if (LofarUtils.keyName(aNode.name).equals("VirtualInstrument")) { this.retrieveAndDisplayChildDataForNode(aNode); @@ -1336,7 +1335,7 @@ public class ObservationPanel extends javax.swing.JPanel implements IViewPanel{ - jOTDBnode aDefaultBFNode= itsBeamformers.elementAt(0); + jOTDBnode aDefaultBFNode= itsBeamformers.get(0); // validate table // same for beamformer if (itsBeamformerConfigurationTableModel.changed()) { @@ -1346,7 +1345,7 @@ public class ObservationPanel extends javax.swing.JPanel implements IViewPanel{ // Keep the 1st one, it's the default Beam try { for (i=1; i< itsBeamformers.size(); i++) { - OtdbRmi.getRemoteMaintenance().deleteNode(itsBeamformers.elementAt(i)); + OtdbRmi.getRemoteMaintenance().deleteNode(itsBeamformers.get(i)); } } catch (RemoteException ex) { String aS="Error during deletion of defaultNode: "+ex; @@ -2797,7 +2796,7 @@ public class ObservationPanel extends javax.swing.JPanel implements IViewPanel{ private TiedArrayBeam itsActiveTAB; // Beamformers - private Vector<jOTDBnode> itsBeamformers = new Vector<>(); + private ArrayList<jOTDBnode> itsBeamformers = new ArrayList<>(); private ArrayList<String> itsStations = new ArrayList<>(); // Observation Virtual Instrument parameters diff --git a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/userpanels/TBBConfigPanel.java b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/userpanels/TBBConfigPanel.java index 8c77e21b533..fed7ed40457 100644 --- a/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/userpanels/TBBConfigPanel.java +++ b/SAS/OTB/OTB/src/nl/astron/lofar/sas/otbcomponents/userpanels/TBBConfigPanel.java @@ -30,10 +30,8 @@ import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.rmi.RemoteException; -import java.util.ArrayList; import java.util.BitSet; -import java.util.Enumeration; -import java.util.Vector; +import java.util.ArrayList; import javax.swing.JFileChooser; import javax.swing.JMenuItem; import javax.swing.JOptionPane; @@ -455,7 +453,7 @@ public class TBBConfigPanel extends javax.swing.JPanel implements IViewPanel { } /** - * Fills the StringVectors with the values from the Database + * Fills the StringArrayLists with the values from the Database * Also does some base GUI settings on the Input fields * @param parent the parent node of the node to be displayed * @param aParam the parameter of the node to be displayed if applicable @@ -690,60 +688,60 @@ public class TBBConfigPanel extends javax.swing.JPanel implements IViewPanel { int index=0; // OperatingMode - if (!itsOperatingModes.elementAt(index).equals("")) { - inputOperatingMode.setSelectedItem(itsOperatingModes.elementAt(index)); + if (!itsOperatingModes.get(index).equals("")) { + inputOperatingMode.setSelectedItem(itsOperatingModes.get(index)); } // TriggerMode - if (!itsTriggerModes.elementAt(index).equals("")) { - inputTriggerMode.setSelectedItem(itsTriggerModes.elementAt(index)); + if (!itsTriggerModes.get(index).equals("")) { + inputTriggerMode.setSelectedItem(itsTriggerModes.get(index)); } // Baselevel - inputBaselevel.setText(itsBaselevels.elementAt(index)); + inputBaselevel.setText(itsBaselevels.get(index)); // Startlevel - inputStartlevel.setText(itsStartlevels.elementAt(index)); + inputStartlevel.setText(itsStartlevels.get(index)); // Stoplevel - inputStoplevel.setText(itsStoplevels.elementAt(index)); + inputStoplevel.setText(itsStoplevels.get(index)); // Filter - if (!itsFilters.elementAt(index).equals("")) { - inputFilter.setSelectedItem(itsFilters.elementAt(index)); + if (!itsFilters.get(index).equals("")) { + inputFilter.setSelectedItem(itsFilters.get(index)); } // Window - if (!itsWindows.elementAt(index).equals("")) { - inputWindow.setSelectedItem(itsWindows.elementAt(index)); + if (!itsWindows.get(index).equals("")) { + inputWindow.setSelectedItem(itsWindows.get(index)); } // Coeff0 - inputFilter0Coeff0.setText(itsFilter0Coeff0s.elementAt(index)); + inputFilter0Coeff0.setText(itsFilter0Coeff0s.get(index)); // Coeff1 - inputFilter0Coeff1.setText(itsFilter0Coeff1s.elementAt(index)); + inputFilter0Coeff1.setText(itsFilter0Coeff1s.get(index)); // Coeff2 - inputFilter0Coeff2.setText(itsFilter0Coeff2s.elementAt(index)); + inputFilter0Coeff2.setText(itsFilter0Coeff2s.get(index)); // Coeff3 - inputFilter0Coeff3.setText(itsFilter0Coeff3s.elementAt(index)); + inputFilter0Coeff3.setText(itsFilter0Coeff3s.get(index)); // Coeff0 - inputFilter1Coeff0.setText(itsFilter1Coeff0s.elementAt(index)); + inputFilter1Coeff0.setText(itsFilter1Coeff0s.get(index)); // Coeff1 - inputFilter1Coeff1.setText(itsFilter1Coeff1s.elementAt(index)); + inputFilter1Coeff1.setText(itsFilter1Coeff1s.get(index)); // Coeff2 - inputFilter1Coeff2.setText(itsFilter1Coeff2s.elementAt(index)); + inputFilter1Coeff2.setText(itsFilter1Coeff2s.get(index)); // Coeff3 - inputFilter1Coeff3.setText(itsFilter1Coeff3s.elementAt(index)); + inputFilter1Coeff3.setText(itsFilter1Coeff3s.get(index)); // RCUs - inputRCUs.setText(itsRCUs.elementAt(index)); + inputRCUs.setText(itsRCUs.get(index)); // subbandList - inputSubbandList.setText(itsSubbandList.elementAt(index)); + inputSubbandList.setText(itsSubbandList.get(index)); } /** fill the RCU bitset to see what RCU's have been set. To be able to determine later if a given RCU is indeed free. @@ -751,7 +749,7 @@ public class TBBConfigPanel extends javax.swing.JPanel implements IViewPanel { private void fillRCUBitset() { itsUsedRCUList.clear(); for (int i=1;i<itsRCUs.size();i++) { - BitSet aNewBitSet=rcuToBitSet(LofarUtils.expandedArrayString(itsRCUs.elementAt(i))); + BitSet aNewBitSet=rcuToBitSet(LofarUtils.expandedArrayString(itsRCUs.get(i))); // check if no duplication between the two bitsets if (itsUsedRCUList.intersects(aNewBitSet)) { @@ -975,7 +973,7 @@ public class TBBConfigPanel extends javax.swing.JPanel implements IViewPanel { // Keep the 1st one, it's the default TBBsetting try { for (i=1; i< itsTBBsettings.size(); i++) { - OtdbRmi.getRemoteMaintenance().deleteNode(itsTBBsettings.elementAt(i)); + OtdbRmi.getRemoteMaintenance().deleteNode(itsTBBsettings.get(i)); } } catch (RemoteException ex) { logger.error("Error during deletion of defaultNode: "+ex); @@ -1010,55 +1008,55 @@ public class TBBConfigPanel extends javax.swing.JPanel implements IViewPanel { String aKeyName = LofarUtils.keyName(aHWNode.name); switch (aKeyName) { case "operatingMode": - aHWNode.limits=itsOperatingModes.elementAt(i); + aHWNode.limits=itsOperatingModes.get(i); break; case "triggerMode": - aHWNode.limits=itsTriggerModes.elementAt(i); + aHWNode.limits=itsTriggerModes.get(i); break; case "baselevel": - aHWNode.limits=itsBaselevels.elementAt(i); + aHWNode.limits=itsBaselevels.get(i); break; case "startlevel": - aHWNode.limits=itsStartlevels.elementAt(i); + aHWNode.limits=itsStartlevels.get(i); break; case "stoplevel": - aHWNode.limits=itsStoplevels.elementAt(i); + aHWNode.limits=itsStoplevels.get(i); break; case "filter": - aHWNode.limits=itsFilters.elementAt(i); + aHWNode.limits=itsFilters.get(i); break; case "window": - aHWNode.limits=itsWindows.elementAt(i); + aHWNode.limits=itsWindows.get(i); break; case "filter0_coeff0": - aHWNode.limits=itsFilter0Coeff0s.elementAt(i); + aHWNode.limits=itsFilter0Coeff0s.get(i); break; case "filter0_coeff1": - aHWNode.limits=itsFilter0Coeff1s.elementAt(i); + aHWNode.limits=itsFilter0Coeff1s.get(i); break; case "filter0_coeff2": - aHWNode.limits=itsFilter0Coeff2s.elementAt(i); + aHWNode.limits=itsFilter0Coeff2s.get(i); break; case "filter0_coeff3": - aHWNode.limits=itsFilter0Coeff3s.elementAt(i); + aHWNode.limits=itsFilter0Coeff3s.get(i); break; case "filter1_coeff0": - aHWNode.limits=itsFilter1Coeff0s.elementAt(i); + aHWNode.limits=itsFilter1Coeff0s.get(i); break; case "filter1_coeff1": - aHWNode.limits=itsFilter1Coeff1s.elementAt(i); + aHWNode.limits=itsFilter1Coeff1s.get(i); break; case "filter1_coeff2": - aHWNode.limits=itsFilter1Coeff2s.elementAt(i); + aHWNode.limits=itsFilter1Coeff2s.get(i); break; case "filter1_coeff3": - aHWNode.limits=itsFilter1Coeff3s.elementAt(i); + aHWNode.limits=itsFilter1Coeff3s.get(i); break; case "RCUs": - aHWNode.limits=itsRCUs.elementAt(i); + aHWNode.limits=itsRCUs.get(i); break; case "subbandList": - aHWNode.limits=itsSubbandList.elementAt(i); + aHWNode.limits=itsSubbandList.get(i); break; } saveNode(aHWNode); @@ -1656,25 +1654,25 @@ public class TBBConfigPanel extends javax.swing.JPanel implements IViewPanel { // TBBsettings - private Vector<jOTDBnode> itsTBBsettings = new Vector<>(); + private ArrayList<jOTDBnode> itsTBBsettings = new ArrayList<>(); // All TBBsetting nodes - private Vector<String> itsOperatingModes = new Vector<>(); - private Vector<String> itsTriggerModes = new Vector<>(); - private Vector<String> itsBaselevels= new Vector<>(); - private Vector<String> itsStartlevels= new Vector<>(); - private Vector<String> itsStoplevels= new Vector<>(); - private Vector<String> itsFilters= new Vector<>(); - private Vector<String> itsWindows= new Vector<>(); - private Vector<String> itsFilter0Coeff0s= new Vector<>(); - private Vector<String> itsFilter0Coeff1s= new Vector<>(); - private Vector<String> itsFilter0Coeff2s= new Vector<>(); - private Vector<String> itsFilter0Coeff3s= new Vector<>(); - private Vector<String> itsFilter1Coeff0s= new Vector<>(); - private Vector<String> itsFilter1Coeff1s= new Vector<>(); - private Vector<String> itsFilter1Coeff2s= new Vector<>(); - private Vector<String> itsFilter1Coeff3s= new Vector<>(); - private Vector<String> itsRCUs= new Vector<>(); - private Vector<String> itsSubbandList= new Vector<>(); + private ArrayList<String> itsOperatingModes = new ArrayList<>(); + private ArrayList<String> itsTriggerModes = new ArrayList<>(); + private ArrayList<String> itsBaselevels= new ArrayList<>(); + private ArrayList<String> itsStartlevels= new ArrayList<>(); + private ArrayList<String> itsStoplevels= new ArrayList<>(); + private ArrayList<String> itsFilters= new ArrayList<>(); + private ArrayList<String> itsWindows= new ArrayList<>(); + private ArrayList<String> itsFilter0Coeff0s= new ArrayList<>(); + private ArrayList<String> itsFilter0Coeff1s= new ArrayList<>(); + private ArrayList<String> itsFilter0Coeff2s= new ArrayList<>(); + private ArrayList<String> itsFilter0Coeff3s= new ArrayList<>(); + private ArrayList<String> itsFilter1Coeff0s= new ArrayList<>(); + private ArrayList<String> itsFilter1Coeff1s= new ArrayList<>(); + private ArrayList<String> itsFilter1Coeff2s= new ArrayList<>(); + private ArrayList<String> itsFilter1Coeff3s= new ArrayList<>(); + private ArrayList<String> itsRCUs= new ArrayList<>(); + private ArrayList<String> itsSubbandList= new ArrayList<>(); // Variables declaration - do not modify//GEN-BEGIN:variables diff --git a/SAS/OTB/OTB/src/no/geosoft/cc/io/FileMonitor.java b/SAS/OTB/OTB/src/no/geosoft/cc/io/FileMonitor.java index d6303bec84f..4ea588048ae 100644 --- a/SAS/OTB/OTB/src/no/geosoft/cc/io/FileMonitor.java +++ b/SAS/OTB/OTB/src/no/geosoft/cc/io/FileMonitor.java @@ -55,8 +55,8 @@ public class FileMonitor */ public FileMonitor (long pollingInterval) { - files_ = new HashMap<File,Long>(); - listeners_ = new ArrayList<WeakReference>(); + files_ = new HashMap<>(); + listeners_ = new ArrayList<>(); timer_ = new Timer (true); timer_.schedule (new FileMonitorNotifier(), 0, pollingInterval); @@ -119,10 +119,9 @@ public class FileMonitor if (listener == fileListener) return; } - - // Use WeakReference to avoid memory leak if this becomes the - // sole reference to the object. - listeners_.add (new WeakReference<FileListener> (fileListener)); + // Use WeakReference to avoid memory leak if this becomes the + // sole reference to the object. + boolean add = listeners_.add (new WeakReference<> (fileListener)); } @@ -158,7 +157,7 @@ public class FileMonitor // Loop over the registered files and see which have changed. // Use a copy of the list in case listener wants to alter the // list within its fileChanged method. - Collection files = new ArrayList<File> (files_.keySet()); + Collection files = new ArrayList<> (files_.keySet()); for (Iterator i = files.iterator(); i.hasNext(); ) { File file = (File) i.next(); diff --git a/JAVA/GUI/MAC/jRSP/.cvsignore b/SAS/OTB/RSP/.cvsignore similarity index 100% rename from JAVA/GUI/MAC/jRSP/.cvsignore rename to SAS/OTB/RSP/.cvsignore diff --git a/SAS/OTB/RSP/pom.xml b/SAS/OTB/RSP/pom.xml new file mode 100644 index 00000000000..d5b9d3b11d0 --- /dev/null +++ b/SAS/OTB/RSP/pom.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <name>Lofar OTB :: RSP</name> + + <parent> + <groupId>nl.astron.lofar.sas.otb</groupId> + <artifactId>otb-parent</artifactId> + <version>1.8.2-SNAPSHOT</version> + </parent> + + <artifactId>RSP</artifactId> + + <!-- Specification for the SCM used by the project, such as CVS, Subversion, etc. --> + <scm> + <connection>scm:svn:https://svn.astron.nl/LOFAR/trunk/SAS/OTB/RSP</connection> + <developerConnection>scm:svn:https://svn.astron.nl/LOFAR/trunk/SAS/OTB/RSP</developerConnection> + </scm> + + + <!-- Information required to build a project. --> + <build> + + <sourceDirectory>src</sourceDirectory> + + <resources> + <resource> + <directory>src</directory> + <excludes> + <exclude>**/*.java</exclude> + <exclude>**/*.form</exclude> + </excludes> + </resource> + </resources> + + </build> + + <dependencies> + + <!-- Sibling dependencies --> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>jRSP</artifactId> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>OTB</artifactId> + </dependency> + + <!-- Internal dependencies --> + <dependency> + <groupId>nl.astron.lofar.lib</groupId> + <artifactId>plotter</artifactId> + </dependency> + + <!-- External dependencies --> + <dependency> + <groupId>org.swinglabs</groupId> + <artifactId>swing-layout</artifactId> + </dependency> + + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </dependency> + + + + </dependencies> + +</project> diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/ControlPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/ControlPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/ControlPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/ControlPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/ControlPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/ControlPanel.java similarity index 99% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/ControlPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/ControlPanel.java index b8c86a8cd42..63947a441c5 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/ControlPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/ControlPanel.java @@ -22,10 +22,11 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp; +package nl.astron.lofar.java.sas.otb.rsp; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; + import javax.swing.JPanel; import javax.swing.event.EventListenerList; diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/ITabPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/ITabPanel.java similarity index 97% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/ITabPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/ITabPanel.java index 42da6e4d556..a5ca8eddc69 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/ITabPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/ITabPanel.java @@ -22,7 +22,7 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp; +package nl.astron.lofar.java.sas.otb.rsp; /** * This interface declares some methods that are needed for interaction with the diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/ListPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/ListPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/ListPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/ListPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/ListPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/ListPanel.java similarity index 99% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/ListPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/ListPanel.java index 67c4b4f6834..0bffe8b12b6 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/ListPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/ListPanel.java @@ -22,7 +22,7 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp; +package nl.astron.lofar.java.sas.otb.rsp; import javax.swing.JPanel; import javax.swing.event.EventListenerList; diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/MainPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/MainPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/MainPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/MainPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/MainPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/MainPanel.java similarity index 94% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/MainPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/MainPanel.java index 510e78a9906..11b672422c0 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/MainPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/MainPanel.java @@ -22,14 +22,17 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp; +package nl.astron.lofar.java.sas.otb.rsp; import java.awt.Cursor; + import javax.swing.JOptionPane; import javax.swing.JPanel; -import nl.astron.lofar.java.mac.jrsp.Board; + import nl.astron.lofar.sas.otb.MainFrame; +import nl.astron.lofar.sas.otb.jrsp.Board; import nl.astron.lofar.sas.otb.panels.IPluginPanel; + import org.apache.log4j.Logger; /** @@ -380,12 +383,12 @@ public class MainPanel extends JPanel implements IPluginPanel, Runnable // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents private void initComponents() { jTabbedPane = new javax.swing.JTabbedPane(); - statusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.StatusPanel(); - subbandStatsPanel = new nl.astron.lofar.java.gui.mac.jrsp.subbandstats.SubbandStatsPanel(); - itsRSPControlPanel = new nl.astron.lofar.java.gui.mac.jrsp.control.RSPControlPanel(); - beamletStatsPanel1 = new nl.astron.lofar.java.gui.mac.jrsp.beamletstats.BeamletStatsPanel(); - controlPanel = new nl.astron.lofar.java.gui.mac.jrsp.ControlPanel(); - listPanel = new nl.astron.lofar.java.gui.mac.jrsp.ListPanel(); + statusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.StatusPanel(); + subbandStatsPanel = new nl.astron.lofar.java.sas.otb.rsp.subbandstats.SubbandStatsPanel(); + itsRSPControlPanel = new nl.astron.lofar.java.sas.otb.rsp.control.RSPControlPanel(); + beamletStatsPanel1 = new nl.astron.lofar.java.sas.otb.rsp.beamletstats.BeamletStatsPanel(); + controlPanel = new nl.astron.lofar.java.sas.otb.rsp.ControlPanel(); + listPanel = new nl.astron.lofar.java.sas.otb.rsp.ListPanel(); jTabbedPane.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent evt) { @@ -555,13 +558,13 @@ public class MainPanel extends JPanel implements IPluginPanel, Runnable // Variables declaration - do not modify//GEN-BEGIN:variables - private nl.astron.lofar.java.gui.mac.jrsp.beamletstats.BeamletStatsPanel beamletStatsPanel1; - private nl.astron.lofar.java.gui.mac.jrsp.ControlPanel controlPanel; - private nl.astron.lofar.java.gui.mac.jrsp.control.RSPControlPanel itsRSPControlPanel; + private nl.astron.lofar.java.sas.otb.rsp.beamletstats.BeamletStatsPanel beamletStatsPanel1; + private nl.astron.lofar.java.sas.otb.rsp.ControlPanel controlPanel; + private nl.astron.lofar.java.sas.otb.rsp.control.RSPControlPanel itsRSPControlPanel; private javax.swing.JTabbedPane jTabbedPane; - private nl.astron.lofar.java.gui.mac.jrsp.ListPanel listPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.StatusPanel statusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.subbandstats.SubbandStatsPanel subbandStatsPanel; + private nl.astron.lofar.java.sas.otb.rsp.ListPanel listPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.StatusPanel statusPanel; + private nl.astron.lofar.java.sas.otb.rsp.subbandstats.SubbandStatsPanel subbandStatsPanel; // End of variables declaration//GEN-END:variables } diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/MaskSelectionPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/MaskSelectionPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/MaskSelectionPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/MaskSelectionPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/MaskSelectionPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/MaskSelectionPanel.java similarity index 99% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/MaskSelectionPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/MaskSelectionPanel.java index 09dfdf7e149..361d7105af3 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/MaskSelectionPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/MaskSelectionPanel.java @@ -22,12 +22,14 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp; +package nl.astron.lofar.java.sas.otb.rsp; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; + import javax.swing.event.EventListenerList; -import nl.astron.lofar.java.mac.jrsp.RCUMask; + +import nl.astron.lofar.sas.otb.jrsp.RCUMask; /** * diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/PlotContainer.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/PlotContainer.java similarity index 98% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/PlotContainer.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/PlotContainer.java index a0390d212b7..59345c7408e 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/PlotContainer.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/PlotContainer.java @@ -22,15 +22,18 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp; +package nl.astron.lofar.java.sas.otb.rsp; import java.awt.BorderLayout; import java.awt.Color; import java.util.HashMap; + import javax.swing.JPanel; + import nl.astron.lofar.java.gui.plotter.PlotConstants; import nl.astron.lofar.java.gui.plotter.PlotPanel; import nl.astron.lofar.java.gui.plotter.exceptions.PlotterException; + import org.apache.log4j.Logger; /** diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/PlotDataModel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/PlotDataModel.java similarity index 99% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/PlotDataModel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/PlotDataModel.java index 0dfd72a2eed..4adddce285b 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/PlotDataModel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/PlotDataModel.java @@ -22,10 +22,11 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp; +package nl.astron.lofar.java.sas.otb.rsp; import java.util.HashMap; import java.util.LinkedList; + import nl.astron.lofar.java.gui.plotter.IPlotDataAccess; import nl.astron.lofar.java.gui.plotter.PlotConstants; import nl.astron.lofar.java.gui.plotter.exceptions.PlotterDataAccessException; diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/beamletstats/BeamletStatsPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/beamletstats/BeamletStatsPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/beamletstats/BeamletStatsPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/beamletstats/BeamletStatsPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/beamletstats/BeamletStatsPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/beamletstats/BeamletStatsPanel.java similarity index 91% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/beamletstats/BeamletStatsPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/beamletstats/BeamletStatsPanel.java index 3a62346cd08..55139bcd370 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/beamletstats/BeamletStatsPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/beamletstats/BeamletStatsPanel.java @@ -22,14 +22,16 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.beamletstats; +package nl.astron.lofar.java.sas.otb.rsp.beamletstats; import java.util.HashMap; + import javax.swing.JPanel; -import nl.astron.lofar.java.gui.mac.jrsp.ITabPanel; -import nl.astron.lofar.java.gui.mac.jrsp.MainPanel; -import nl.astron.lofar.java.gui.mac.jrsp.PlotDataModel; -import nl.astron.lofar.java.mac.jrsp.RSPMask; + +import nl.astron.lofar.java.sas.otb.rsp.ITabPanel; +import nl.astron.lofar.java.sas.otb.rsp.MainPanel; +import nl.astron.lofar.java.sas.otb.rsp.PlotDataModel; +import nl.astron.lofar.sas.otb.jrsp.RSPMask; /** * @@ -104,7 +106,7 @@ public class BeamletStatsPanel extends JPanel implements ITabPanel { */ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents private void initComponents() { - plotContainer = new nl.astron.lofar.java.gui.mac.jrsp.PlotContainer(); + plotContainer = new nl.astron.lofar.java.sas.otb.rsp.PlotContainer(); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); @@ -126,7 +128,7 @@ public class BeamletStatsPanel extends JPanel implements ITabPanel { // Variables declaration - do not modify//GEN-BEGIN:variables - private nl.astron.lofar.java.gui.mac.jrsp.PlotContainer plotContainer; + private nl.astron.lofar.java.sas.otb.rsp.PlotContainer plotContainer; // End of variables declaration//GEN-END:variables } diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/control/RSPControlPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/control/RSPControlPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/control/RSPControlPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/control/RSPControlPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/control/RSPControlPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/control/RSPControlPanel.java similarity index 97% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/control/RSPControlPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/control/RSPControlPanel.java index 3d6f17df041..894871acc98 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/control/RSPControlPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/control/RSPControlPanel.java @@ -22,13 +22,14 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.control; +package nl.astron.lofar.java.sas.otb.rsp.control; import javax.swing.JOptionPane; -import nl.astron.lofar.java.mac.jrsp.RCUMask; -import nl.astron.lofar.java.mac.jrsp.RSPMask; -import nl.astron.lofar.java.gui.mac.jrsp.ITabPanel; -import nl.astron.lofar.java.gui.mac.jrsp.MainPanel; + +import nl.astron.lofar.java.sas.otb.rsp.ITabPanel; +import nl.astron.lofar.java.sas.otb.rsp.MainPanel; +import nl.astron.lofar.sas.otb.jrsp.RCUMask; +import nl.astron.lofar.sas.otb.jrsp.RSPMask; /** * @@ -120,7 +121,7 @@ public class RSPControlPanel extends javax.swing.JPanel implements ITabPanel { btnSync = new javax.swing.JButton(); jLabel2 = new javax.swing.JLabel(); RCUModePanel = new javax.swing.JPanel(); - itsMaskSelectionPanel = new nl.astron.lofar.java.gui.mac.jrsp.MaskSelectionPanel(); + itsMaskSelectionPanel = new nl.astron.lofar.java.sas.otb.rsp.MaskSelectionPanel(); cmbRCUMode = new javax.swing.JComboBox(); lblRCUMode = new javax.swing.JLabel(); btnSetFilter = new javax.swing.JButton(); @@ -384,7 +385,7 @@ public class RSPControlPanel extends javax.swing.JPanel implements ITabPanel { private javax.swing.JButton btnSetFilter; private javax.swing.JButton btnSync; private javax.swing.JComboBox cmbRCUMode; - private nl.astron.lofar.java.gui.mac.jrsp.MaskSelectionPanel itsMaskSelectionPanel; + private nl.astron.lofar.java.sas.otb.rsp.MaskSelectionPanel itsMaskSelectionPanel; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/ADOStatusPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/ADOStatusPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/ADOStatusPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/ADOStatusPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/ADOStatusPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/ADOStatusPanel.java similarity index 98% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/ADOStatusPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/ADOStatusPanel.java index f2f666881f7..65a1a15d181 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/ADOStatusPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/ADOStatusPanel.java @@ -22,10 +22,11 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.status; +package nl.astron.lofar.java.sas.otb.rsp.status; import javax.swing.border.TitledBorder; -import nl.astron.lofar.java.mac.jrsp.ADOStatus; + +import nl.astron.lofar.sas.otb.jrsp.ADOStatus; /** * A panel that displays the ADO status data. This panel is used by the diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/DIAGStatusPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/DIAGStatusPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/DIAGStatusPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/DIAGStatusPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/DIAGStatusPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/DIAGStatusPanel.java similarity index 99% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/DIAGStatusPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/DIAGStatusPanel.java index 2cbde40e9dd..1c3c0655b97 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/DIAGStatusPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/DIAGStatusPanel.java @@ -22,9 +22,9 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.status; +package nl.astron.lofar.java.sas.otb.rsp.status; -import nl.astron.lofar.java.mac.jrsp.BoardStatus; +import nl.astron.lofar.sas.otb.jrsp.BoardStatus; /** * A panel that displays the DIAG status data. This panel is used by the diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/ETHStatusPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/ETHStatusPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/ETHStatusPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/ETHStatusPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/ETHStatusPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/ETHStatusPanel.java similarity index 98% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/ETHStatusPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/ETHStatusPanel.java index 2720dbdbb0a..3ae6aae133e 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/ETHStatusPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/ETHStatusPanel.java @@ -22,9 +22,9 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.status; +package nl.astron.lofar.java.sas.otb.rsp.status; -import nl.astron.lofar.java.mac.jrsp.BoardStatus; +import nl.astron.lofar.sas.otb.jrsp.BoardStatus; /** * A panel that displays the ETH status data. This panel is used by the diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/MEPStatusPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/MEPStatusPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/MEPStatusPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/MEPStatusPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/MEPStatusPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/MEPStatusPanel.java similarity index 98% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/MEPStatusPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/MEPStatusPanel.java index cdebc74c018..c677a47ef62 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/MEPStatusPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/MEPStatusPanel.java @@ -22,9 +22,9 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.status; +package nl.astron.lofar.java.sas.otb.rsp.status; -import nl.astron.lofar.java.mac.jrsp.BoardStatus; +import nl.astron.lofar.sas.otb.jrsp.BoardStatus; /** * A panel that displays the MEP status data. This panel is used by the diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/RCUStatusPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/RCUStatusPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/RCUStatusPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/RCUStatusPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/RCUStatusPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/RCUStatusPanel.java similarity index 98% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/RCUStatusPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/RCUStatusPanel.java index 8396675cbf8..4234a86ae6c 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/RCUStatusPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/RCUStatusPanel.java @@ -22,10 +22,11 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.status; +package nl.astron.lofar.java.sas.otb.rsp.status; import javax.swing.border.TitledBorder; -import nl.astron.lofar.java.mac.jrsp.RCUStatus; + +import nl.astron.lofar.sas.otb.jrsp.RCUStatus; /** * A panel that displays the RCU status data. This panel is used by the diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/RSPStatusPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/RSPStatusPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/RSPStatusPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/RSPStatusPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/RSPStatusPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/RSPStatusPanel.java similarity index 99% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/RSPStatusPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/RSPStatusPanel.java index 2d1908fb313..79cfd3b36ba 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/RSPStatusPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/RSPStatusPanel.java @@ -22,10 +22,11 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.status; +package nl.astron.lofar.java.sas.otb.rsp.status; import java.text.NumberFormat; -import nl.astron.lofar.java.mac.jrsp.BoardStatus; + +import nl.astron.lofar.sas.otb.jrsp.BoardStatus; /** * A panel that displays the ADO status data. This panel is used by the diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/RSUStatusPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/RSUStatusPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/RSUStatusPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/RSUStatusPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/RSUStatusPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/RSUStatusPanel.java similarity index 98% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/RSUStatusPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/RSUStatusPanel.java index 329951321dd..f214b2b2b41 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/RSUStatusPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/RSUStatusPanel.java @@ -22,9 +22,9 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.status; +package nl.astron.lofar.java.sas.otb.rsp.status; -import nl.astron.lofar.java.mac.jrsp.BoardStatus; +import nl.astron.lofar.sas.otb.jrsp.BoardStatus; /** * A panel that displays the ADO status data. This panel is used by the diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/StatusPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/StatusPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/StatusPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/StatusPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/StatusPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/StatusPanel.java similarity index 81% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/StatusPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/StatusPanel.java index 19c0bbd9ec9..b99e9416b0b 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/StatusPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/StatusPanel.java @@ -22,12 +22,15 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.status; +package nl.astron.lofar.java.sas.otb.rsp.status; import javax.swing.JPanel; -import nl.astron.lofar.java.mac.jrsp.BoardStatus; -import nl.astron.lofar.java.mac.jrsp.RSPMask; -import nl.astron.lofar.java.gui.mac.jrsp.*; + +import nl.astron.lofar.java.sas.otb.rsp.ITabPanel; +import nl.astron.lofar.java.sas.otb.rsp.MainPanel; +import nl.astron.lofar.sas.otb.jrsp.BoardStatus; +import nl.astron.lofar.sas.otb.jrsp.RSPMask; + import org.apache.log4j.Logger; /** @@ -139,23 +142,23 @@ public class StatusPanel extends JPanel implements ITabPanel */ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents private void initComponents() { - rspStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.RSPStatusPanel(); - diagStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.DIAGStatusPanel(); - blp0SyncStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.SyncStatusPanel(); - blp1SyncStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.SyncStatusPanel(); - blp2SyncStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.SyncStatusPanel(); - blp3SyncStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.SyncStatusPanel(); - blp0RcuStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.RCUStatusPanel(); - blp1RcuStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.RCUStatusPanel(); - blp2RcuStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.RCUStatusPanel(); - blp3RcuStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.RCUStatusPanel(); - rsuStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.RSUStatusPanel(); - blp0AdoStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.ADOStatusPanel(); - blp1AdoStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.ADOStatusPanel(); - blp2AdoStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.ADOStatusPanel(); - blp3AdoStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.ADOStatusPanel(); - ethStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.ETHStatusPanel(); - mepStatusPanel = new nl.astron.lofar.java.gui.mac.jrsp.status.MEPStatusPanel(); + rspStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.RSPStatusPanel(); + diagStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.DIAGStatusPanel(); + blp0SyncStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.SyncStatusPanel(); + blp1SyncStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.SyncStatusPanel(); + blp2SyncStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.SyncStatusPanel(); + blp3SyncStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.SyncStatusPanel(); + blp0RcuStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.RCUStatusPanel(); + blp1RcuStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.RCUStatusPanel(); + blp2RcuStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.RCUStatusPanel(); + blp3RcuStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.RCUStatusPanel(); + rsuStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.RSUStatusPanel(); + blp0AdoStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.ADOStatusPanel(); + blp1AdoStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.ADOStatusPanel(); + blp2AdoStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.ADOStatusPanel(); + blp3AdoStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.ADOStatusPanel(); + ethStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.ETHStatusPanel(); + mepStatusPanel = new nl.astron.lofar.java.sas.otb.rsp.status.MEPStatusPanel(); org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this); this.setLayout(layout); @@ -241,22 +244,22 @@ public class StatusPanel extends JPanel implements ITabPanel }// </editor-fold>//GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables - private nl.astron.lofar.java.gui.mac.jrsp.status.ADOStatusPanel blp0AdoStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.RCUStatusPanel blp0RcuStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.SyncStatusPanel blp0SyncStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.ADOStatusPanel blp1AdoStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.RCUStatusPanel blp1RcuStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.SyncStatusPanel blp1SyncStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.ADOStatusPanel blp2AdoStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.RCUStatusPanel blp2RcuStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.SyncStatusPanel blp2SyncStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.ADOStatusPanel blp3AdoStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.RCUStatusPanel blp3RcuStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.SyncStatusPanel blp3SyncStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.DIAGStatusPanel diagStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.ETHStatusPanel ethStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.MEPStatusPanel mepStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.RSPStatusPanel rspStatusPanel; - private nl.astron.lofar.java.gui.mac.jrsp.status.RSUStatusPanel rsuStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.ADOStatusPanel blp0AdoStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.RCUStatusPanel blp0RcuStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.SyncStatusPanel blp0SyncStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.ADOStatusPanel blp1AdoStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.RCUStatusPanel blp1RcuStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.SyncStatusPanel blp1SyncStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.ADOStatusPanel blp2AdoStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.RCUStatusPanel blp2RcuStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.SyncStatusPanel blp2SyncStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.ADOStatusPanel blp3AdoStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.RCUStatusPanel blp3RcuStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.SyncStatusPanel blp3SyncStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.DIAGStatusPanel diagStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.ETHStatusPanel ethStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.MEPStatusPanel mepStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.RSPStatusPanel rspStatusPanel; + private nl.astron.lofar.java.sas.otb.rsp.status.RSUStatusPanel rsuStatusPanel; // End of variables declaration//GEN-END:variables } diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/SyncStatusPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/SyncStatusPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/SyncStatusPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/SyncStatusPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/SyncStatusPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/SyncStatusPanel.java similarity index 98% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/SyncStatusPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/SyncStatusPanel.java index 73a17044428..312b9ad569d 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/status/SyncStatusPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/status/SyncStatusPanel.java @@ -22,10 +22,11 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.status; +package nl.astron.lofar.java.sas.otb.rsp.status; import javax.swing.border.TitledBorder; -import nl.astron.lofar.java.mac.jrsp.SyncStatus; + +import nl.astron.lofar.sas.otb.jrsp.SyncStatus; /** * A panel that displays the ADO status data. This panel is used by the diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/.cvsignore b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/.cvsignore similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/.cvsignore rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/.cvsignore diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/SubbandStatsPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/SubbandStatsPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/SubbandStatsPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/SubbandStatsPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/SubbandStatsPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/SubbandStatsPanel.java similarity index 94% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/SubbandStatsPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/SubbandStatsPanel.java index f65be310471..d93f88cb63d 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/SubbandStatsPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/SubbandStatsPanel.java @@ -22,17 +22,19 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.subbandstats; +package nl.astron.lofar.java.sas.otb.rsp.subbandstats; -import com.sun.org.apache.xerces.internal.parsers.JAXPConfiguration; import java.awt.event.ActionEvent; import java.util.ArrayList; + import javax.swing.JOptionPane; import javax.swing.JPanel; -import nl.astron.lofar.java.mac.jrsp.RCUMask; -import nl.astron.lofar.java.mac.jrsp.WGRegisterType; -import nl.astron.lofar.java.gui.mac.jrsp.ITabPanel; -import nl.astron.lofar.java.gui.mac.jrsp.MainPanel; + +import nl.astron.lofar.java.sas.otb.rsp.ITabPanel; +import nl.astron.lofar.java.sas.otb.rsp.MainPanel; +import nl.astron.lofar.sas.otb.jrsp.RCUMask; +import nl.astron.lofar.sas.otb.jrsp.WGRegisterType; + import org.apache.log4j.Logger; public class SubbandStatsPanel extends JPanel implements ITabPanel @@ -188,9 +190,9 @@ public class SubbandStatsPanel extends JPanel implements ITabPanel */ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents private void initComponents() { - plotRight = new nl.astron.lofar.java.gui.mac.jrsp.subbandstats.SubbandStatsPlotPanel(); - plotLeft = new nl.astron.lofar.java.gui.mac.jrsp.subbandstats.SubbandStatsPlotPanel(); - settingsPanel = new nl.astron.lofar.java.gui.mac.jrsp.subbandstats.WaveformSettingsPanel(); + plotRight = new nl.astron.lofar.java.sas.otb.rsp.subbandstats.SubbandStatsPlotPanel(); + plotLeft = new nl.astron.lofar.java.sas.otb.rsp.subbandstats.SubbandStatsPlotPanel(); + settingsPanel = new nl.astron.lofar.java.sas.otb.rsp.subbandstats.WaveformSettingsPanel(); plotRight.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -360,8 +362,8 @@ itsLogger.debug("inputPanelActionPerformed"); } // Variables declaration - do not modify//GEN-BEGIN:variables - private nl.astron.lofar.java.gui.mac.jrsp.subbandstats.SubbandStatsPlotPanel plotLeft; - private nl.astron.lofar.java.gui.mac.jrsp.subbandstats.SubbandStatsPlotPanel plotRight; - private nl.astron.lofar.java.gui.mac.jrsp.subbandstats.WaveformSettingsPanel settingsPanel; + private nl.astron.lofar.java.sas.otb.rsp.subbandstats.SubbandStatsPlotPanel plotLeft; + private nl.astron.lofar.java.sas.otb.rsp.subbandstats.SubbandStatsPlotPanel plotRight; + private nl.astron.lofar.java.sas.otb.rsp.subbandstats.WaveformSettingsPanel settingsPanel; // End of variables declaration//GEN-END:variables } diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/SubbandStatsPlotPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/SubbandStatsPlotPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/SubbandStatsPlotPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/SubbandStatsPlotPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/SubbandStatsPlotPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/SubbandStatsPlotPanel.java similarity index 93% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/SubbandStatsPlotPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/SubbandStatsPlotPanel.java index 41287dc5285..dc582032990 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/SubbandStatsPlotPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/SubbandStatsPlotPanel.java @@ -22,18 +22,19 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.subbandstats; +package nl.astron.lofar.java.sas.otb.rsp.subbandstats; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.HashMap; + import javax.swing.JPanel; import javax.swing.event.EventListenerList; -import nl.astron.lofar.java.gui.plotter.PlotConstants; -import nl.astron.lofar.java.gui.plotter.exceptions.PlotterException; -import nl.astron.lofar.java.mac.jrsp.RCUMask; -import nl.astron.lofar.java.gui.mac.jrsp.MaskSelectionPanel; -import nl.astron.lofar.java.gui.mac.jrsp.PlotDataModel; + +import nl.astron.lofar.java.sas.otb.rsp.MaskSelectionPanel; +import nl.astron.lofar.java.sas.otb.rsp.PlotDataModel; +import nl.astron.lofar.sas.otb.jrsp.RCUMask; + import org.apache.log4j.Logger; public class SubbandStatsPlotPanel extends JPanel @@ -195,8 +196,8 @@ public class SubbandStatsPlotPanel extends JPanel // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents private void initComponents() { cmbBoard = new javax.swing.JComboBox(); - itsMaskSelectionPanel = new nl.astron.lofar.java.gui.mac.jrsp.MaskSelectionPanel(); - itsPlotContainer = new nl.astron.lofar.java.gui.mac.jrsp.PlotContainer(); + itsMaskSelectionPanel = new nl.astron.lofar.java.sas.otb.rsp.MaskSelectionPanel(); + itsPlotContainer = new nl.astron.lofar.java.sas.otb.rsp.PlotContainer(); setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createTitledBorder("Subband Statistics Plot"))); cmbBoard.addActionListener(new java.awt.event.ActionListener() { @@ -248,7 +249,7 @@ public class SubbandStatsPlotPanel extends JPanel // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JComboBox cmbBoard; - private nl.astron.lofar.java.gui.mac.jrsp.MaskSelectionPanel itsMaskSelectionPanel; - private nl.astron.lofar.java.gui.mac.jrsp.PlotContainer itsPlotContainer; + private nl.astron.lofar.java.sas.otb.rsp.MaskSelectionPanel itsMaskSelectionPanel; + private nl.astron.lofar.java.sas.otb.rsp.PlotContainer itsPlotContainer; // End of variables declaration//GEN-END:variables } diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsInputPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformSettingsInputPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsInputPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformSettingsInputPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsInputPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformSettingsInputPanel.java similarity index 99% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsInputPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformSettingsInputPanel.java index c31bbd0b4a1..743fb1546bb 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsInputPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformSettingsInputPanel.java @@ -22,10 +22,11 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.subbandstats; +package nl.astron.lofar.java.sas.otb.rsp.subbandstats; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; + import javax.swing.JPanel; import javax.swing.event.EventListenerList; diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsListPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformSettingsListPanel.java similarity index 94% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsListPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformSettingsListPanel.java index bf4441e9118..989f99da47f 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsListPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformSettingsListPanel.java @@ -24,15 +24,15 @@ -package nl.astron.lofar.java.gui.mac.jrsp.subbandstats; +package nl.astron.lofar.java.sas.otb.rsp.subbandstats; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.ArrayList; + import javax.swing.event.EventListenerList; -import nl.astron.lofar.java.mac.jrsp.RCUMask; -import nl.astron.lofar.java.mac.jrsp.WGRegisterType; -import nl.astron.lofar.java.gui.mac.jrsp.ITabPanel; + +import nl.astron.lofar.sas.otb.jrsp.WGRegisterType; /** * @@ -140,7 +140,7 @@ public class WaveformSettingsListPanel extends javax.swing.JPanel btnRemove = new javax.swing.JButton(); setBorder(javax.swing.BorderFactory.createTitledBorder("List")); - jTable.setModel(new nl.astron.lofar.java.gui.mac.jrsp.subbandstats.WaveformTableModel()); + jTable.setModel(new nl.astron.lofar.java.sas.otb.rsp.subbandstats.WaveformTableModel()); jScrollPane.setViewportView(jTable); btnRemove.setText("Remove"); diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsPanel.form b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformSettingsPanel.form similarity index 100% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsPanel.form rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformSettingsPanel.form diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsPanel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformSettingsPanel.java similarity index 88% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsPanel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformSettingsPanel.java index 1ce49bc7e70..687d9a9dd51 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformSettingsPanel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformSettingsPanel.java @@ -22,11 +22,9 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.subbandstats; +package nl.astron.lofar.java.sas.otb.rsp.subbandstats; -import javax.swing.JOptionPane; import javax.swing.JPanel; -import nl.astron.lofar.java.mac.jrsp.RCUMask; /** * @@ -63,8 +61,8 @@ public class WaveformSettingsPanel extends JPanel */ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents private void initComponents() { - inputPanel = new nl.astron.lofar.java.gui.mac.jrsp.subbandstats.WaveformSettingsInputPanel(); - listPanel = new nl.astron.lofar.java.gui.mac.jrsp.subbandstats.WaveformSettingsListPanel(); + inputPanel = new nl.astron.lofar.java.sas.otb.rsp.subbandstats.WaveformSettingsInputPanel(); + listPanel = new nl.astron.lofar.java.sas.otb.rsp.subbandstats.WaveformSettingsListPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); @@ -102,9 +100,9 @@ public class WaveformSettingsPanel extends JPanel }// </editor-fold>//GEN-END:initComponents // Variables declaration - do not modify//GEN-BEGIN:variables - private nl.astron.lofar.java.gui.mac.jrsp.subbandstats.WaveformSettingsInputPanel inputPanel; + private nl.astron.lofar.java.sas.otb.rsp.subbandstats.WaveformSettingsInputPanel inputPanel; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; - private nl.astron.lofar.java.gui.mac.jrsp.subbandstats.WaveformSettingsListPanel listPanel; + private nl.astron.lofar.java.sas.otb.rsp.subbandstats.WaveformSettingsListPanel listPanel; // End of variables declaration//GEN-END:variables } diff --git a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformTableModel.java b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformTableModel.java similarity index 96% rename from JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformTableModel.java rename to SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformTableModel.java index 6fe72306151..c8b6aafe16c 100644 --- a/JAVA/GUI/MAC/jRSP/src/nl/astron/lofar/java/gui/mac/jrsp/subbandstats/WaveformTableModel.java +++ b/SAS/OTB/RSP/src/nl/astron/lofar/java/sas/otb/rsp/subbandstats/WaveformTableModel.java @@ -22,12 +22,14 @@ * $Id$ */ -package nl.astron.lofar.java.gui.mac.jrsp.subbandstats; +package nl.astron.lofar.java.sas.otb.rsp.subbandstats; import java.util.ArrayList; + import javax.swing.event.TableModelEvent; import javax.swing.table.AbstractTableModel; -import nl.astron.lofar.java.mac.jrsp.WGRegisterType; + +import nl.astron.lofar.sas.otb.jrsp.WGRegisterType; /** * diff --git a/SAS/OTB/jOTDB3/assembly.xml b/SAS/OTB/jOTDB3/assembly.xml index 31634202bb9..19949d2b30a 100644 --- a/SAS/OTB/jOTDB3/assembly.xml +++ b/SAS/OTB/jOTDB3/assembly.xml @@ -1,49 +1,49 @@ -<assembly - xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> - - <id>deployment</id> - - <formats> - <format>tar.gz</format> - </formats> - - <fileSets> - - <fileSet> - <directory>${project.build.directory}</directory> - <outputDirectory>.</outputDirectory> - <includes> - <include>*.jar</include> - </includes> - </fileSet> - - <fileSet> - <directory>${project.build.directory}/native/javah</directory> - <outputDirectory>include</outputDirectory> - <includes> - <include>**/*.*</include> - </includes> - </fileSet> - - <fileSet> - <directory>${project.build.directory}/lib</directory> - <outputDirectory>lib</outputDirectory> - <includes> - <include>**/*.*</include> - </includes> - </fileSet> - - <fileSet> - <directory>${basedir}/dist-src</directory> - <outputDirectory>.</outputDirectory> - <includes> - <include>**/*</include> - </includes> - </fileSet> - - </fileSets> - - +<assembly + xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> + + <id>deployment</id> + + <formats> + <format>tar.gz</format> + </formats> + + <fileSets> + + <fileSet> + <directory>${project.build.directory}</directory> + <outputDirectory>.</outputDirectory> + <includes> + <include>*.jar</include> + </includes> + </fileSet> + + <fileSet> + <directory>${project.build.directory}/native/javah</directory> + <outputDirectory>include</outputDirectory> + <includes> + <include>**/*.*</include> + </includes> + </fileSet> + + <fileSet> + <directory>${project.build.directory}/lib</directory> + <outputDirectory>lib</outputDirectory> + <includes> + <include>**/*.*</include> + </includes> + </fileSet> + + <fileSet> + <directory>${basedir}/dist-src</directory> + <outputDirectory>.</outputDirectory> + <includes> + <include>**/*</include> + </includes> + </fileSet> + + </fileSets> + + </assembly> \ No newline at end of file diff --git a/SAS/OTB/jOTDB3/dist-src/startServerOTB b/SAS/OTB/jOTDB3/dist-src/startServerOTB index 49f8eaf2779..2a9ffb964ac 100644 --- a/SAS/OTB/jOTDB3/dist-src/startServerOTB +++ b/SAS/OTB/jOTDB3/dist-src/startServerOTB @@ -1,6 +1,6 @@ #!/bin/sh -export OTB_DIR=/opt/sas/otb +export OTB_DIR=/opt/sas/otb/server export JAVA_HOME=/usr/java/jdk1.7.0_02 echo @@ -12,7 +12,7 @@ export CLASSPATH=$OTB_APP for JAR_DEPENDENCY in $OTB_DIR/lib/*.jar do - echo -- Adding `basename $JAR_DEPENDENCY` dependency to Java Classpath + echo -- Adding dependency to CLASSPATH: `basename $JAR_DEPENDENCY` export CLASSPATH=$CLASSPATH:$JAR_DEPENDENCY done @@ -25,4 +25,4 @@ if [ $? -ne 0 ]; then serverpid=$! fi -echo OTB Server stopped. \ No newline at end of file +echo OTB Server stopped. diff --git a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jCampaign.h b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jCampaign.h index 60f79b70f58..d6341392ac9 100644 --- a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jCampaign.h +++ b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jCampaign.h @@ -1,61 +1,24 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include <jni.h> -/* Header for class nl_astron_lofar_sas_otb_jotdb3_jCampaign */ - -#ifndef _Included_nl_astron_lofar_sas_otb_jotdb3_jCampaign -#define _Included_nl_astron_lofar_sas_otb_jotdb3_jCampaign -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jCampaign - * Method: initCampaign - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jCampaign_initCampaign - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jCampaign - * Method: getCampaign - * Signature: (Ljava/lang/String;)Lnl/astron/lofar/sas/otb/jotdb3/jCampaignInfo; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jCampaign_getCampaign__Ljava_lang_String_2 - (JNIEnv *, jobject, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jCampaign - * Method: getCampaign - * Signature: (I)Lnl/astron/lofar/sas/otb/jotdb3/jCampaignInfo; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jCampaign_getCampaign__I - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jCampaign - * Method: getCampaignList - * Signature: ()Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jCampaign_getCampaignList - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jCampaign - * Method: saveCampaign - * Signature: (Lnl/astron/lofar/sas/otb/jotdb3/jCampaignInfo;)I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jCampaign_saveCampaign - (JNIEnv *, jobject, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jCampaign - * Method: errorMsg - * Signature: ()Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jCampaign_errorMsg - (JNIEnv *, jobject); - -#ifdef __cplusplus -} -#endif -#endif +/* DO NOT EDIT THIS FILE - it is machine generated */ + +#ifndef __nl_astron_lofar_sas_otb_jotdb3_jCampaign__ +#define __nl_astron_lofar_sas_otb_jotdb3_jCampaign__ + +#include <jni.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jCampaign_initCampaign (JNIEnv *env, jobject); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jCampaign_getCampaign__Ljava_lang_String_2 (JNIEnv *env, jobject, jstring); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jCampaign_getCampaign__I (JNIEnv *env, jobject, jint); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jCampaign_getCampaignList (JNIEnv *env, jobject); +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jCampaign_saveCampaign (JNIEnv *env, jobject, jobject); +JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jCampaign_errorMsg (JNIEnv *env, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __nl_astron_lofar_sas_otb_jotdb3_jCampaign__ */ diff --git a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jClassifConv.h b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jClassifConv.h index e22c8386d64..07a5de4613e 100644 --- a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jClassifConv.h +++ b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jClassifConv.h @@ -1,61 +1,22 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include <jni.h> -/* Header for class nl_astron_lofar_sas_otb_jotdb3_jClassifConv */ - -#ifndef _Included_nl_astron_lofar_sas_otb_jotdb3_jClassifConv -#define _Included_nl_astron_lofar_sas_otb_jotdb3_jClassifConv -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jClassifConv - * Method: initClassifConv - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jClassifConv_initClassifConv - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jClassifConv - * Method: get - * Signature: (Ljava/lang/String;)S - */ -JNIEXPORT jshort JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jClassifConv_get__Ljava_lang_String_2 - (JNIEnv *, jobject, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jClassifConv - * Method: get - * Signature: (S)Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jClassifConv_get__S - (JNIEnv *, jobject, jshort); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jClassifConv - * Method: getTypes - * Signature: ()Ljava/util/HashMap; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jClassifConv_getTypes - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jClassifConv - * Method: top - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jClassifConv_top - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jClassifConv - * Method: next - * Signature: ()Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jClassifConv_next - (JNIEnv *, jobject); - -#ifdef __cplusplus -} -#endif -#endif +#ifndef __nl_astron_lofar_sas_otb_jotdb3_jClassifConv__ +#define __nl_astron_lofar_sas_otb_jotdb3_jClassifConv__ + +#include <jni.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jClassifConv_initClassifConv (JNIEnv *env, jobject); +JNIEXPORT jshort JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jClassifConv_get__Ljava_lang_String_2 (JNIEnv *env, jobject, jstring); +JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jClassifConv_get__S (JNIEnv *env, jobject, jshort); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jClassifConv_getTypes (JNIEnv *env, jobject); +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jClassifConv_top (JNIEnv *env, jobject); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jClassifConv_next (JNIEnv *env, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __nl_astron_lofar_sas_otb_jotdb3_jClassifConv__ */ diff --git a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jInitCPPLogger.h b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jInitCPPLogger.h index 3ca5af5f737..21389863ae9 100644 --- a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jInitCPPLogger.h +++ b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jInitCPPLogger.h @@ -1,21 +1,17 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include <jni.h> -/* Header for class nl_astron_lofar_sas_otb_jotdb3_jInitCPPLogger */ - -#ifndef _Included_nl_astron_lofar_sas_otb_jotdb3_jInitCPPLogger -#define _Included_nl_astron_lofar_sas_otb_jotdb3_jInitCPPLogger -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jInitCPPLogger - * Method: initLogger - * Signature: (Ljava/lang/String;)V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jInitCPPLogger_initLogger - (JNIEnv *, jobject, jstring); - -#ifdef __cplusplus -} -#endif -#endif +#ifndef __nl_astron_lofar_sas_otb_jotdb3_jInitCPPLogger__ +#define __nl_astron_lofar_sas_otb_jotdb3_jInitCPPLogger__ + +#include <jni.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jInitCPPLogger_initLogger (JNIEnv *env, jobject, jstring); + +#ifdef __cplusplus +} +#endif + +#endif /* __nl_astron_lofar_sas_otb_jotdb3_jInitCPPLogger__ */ diff --git a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection.h b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection.h index 15fbeb3906f..c44f43426a0 100644 --- a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection.h +++ b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection.h @@ -1,229 +1,43 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include <jni.h> -/* Header for class nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection */ - -#ifndef _Included_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection -#define _Included_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: initOTDBconnection - * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_initOTDBconnection - (JNIEnv *, jobject, jstring, jstring, jstring, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: isConnected - * Signature: ()Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_isConnected - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: connect - * Signature: ()Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_connect - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: disconnect - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_disconnect - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getTreeInfo - * Signature: (IZ)Lnl/astron/lofar/sas/otb/jotdb3/jOTDBtree; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeInfo__IZ - (JNIEnv *, jobject, jint, jboolean); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getTreeInfo - * Signature: (I)Lnl/astron/lofar/sas/otb/jotdb3/jOTDBtree; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeInfo__I - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getTreeList - * Signature: (SSILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeList__SSILjava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2 - (JNIEnv *, jobject, jshort, jshort, jint, jstring, jstring, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getTreeList - * Signature: (SSILjava/lang/String;Ljava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeList__SSILjava_lang_String_2Ljava_lang_String_2 - (JNIEnv *, jobject, jshort, jshort, jint, jstring, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getTreeList - * Signature: (SSILjava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeList__SSILjava_lang_String_2 - (JNIEnv *, jobject, jshort, jshort, jint, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getTreeList - * Signature: (SSI)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeList__SSI - (JNIEnv *, jobject, jshort, jshort, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getTreeList - * Signature: (SS)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeList__SS - (JNIEnv *, jobject, jshort, jshort); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getTreeList - * Signature: (S)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeList__S - (JNIEnv *, jobject, jshort); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getStateList - * Signature: (IZLjava/lang/String;Ljava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getStateList__IZLjava_lang_String_2Ljava_lang_String_2 - (JNIEnv *, jobject, jint, jboolean, jstring, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getStateList - * Signature: (IZLjava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getStateList__IZLjava_lang_String_2 - (JNIEnv *, jobject, jint, jboolean, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getStateList - * Signature: (IZ)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getStateList__IZ - (JNIEnv *, jobject, jint, jboolean); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getStateList - * Signature: (I)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getStateList__I - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getDefaultTemplates - * Signature: ()Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getDefaultTemplates - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getExecutableTrees - * Signature: (S)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getExecutableTrees__S - (JNIEnv *, jobject, jshort); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getExecutableTrees - * Signature: ()Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getExecutableTrees__ - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getTreeGroup - * Signature: (SS)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeGroup - (JNIEnv *, jobject, jshort, jshort); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getTreesInPeriod - * Signature: (SLjava/lang/String;Ljava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreesInPeriod__SLjava_lang_String_2Ljava_lang_String_2 - (JNIEnv *, jobject, jshort, jstring, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getTreesInPeriod - * Signature: (SLjava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreesInPeriod__SLjava_lang_String_2 - (JNIEnv *, jobject, jshort, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getTreesInPeriod - * Signature: (S)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreesInPeriod__S - (JNIEnv *, jobject, jshort); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: newGroupID - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_newGroupID - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: errorMsg - * Signature: ()Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_errorMsg - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getAuthToken - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getAuthToken - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection - * Method: getDBName - * Signature: ()Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getDBName - (JNIEnv *, jobject); - -#ifdef __cplusplus -} -#endif -#endif +#ifndef __nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection__ +#define __nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection__ + +#include <jni.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_initOTDBconnection (JNIEnv *env, jobject, jstring, jstring, jstring, jstring); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_isConnected (JNIEnv *env, jobject); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_connect (JNIEnv *env, jobject); +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_disconnect (JNIEnv *env, jobject); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeInfo__IZ (JNIEnv *env, jobject, jint, jboolean); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeInfo__I (JNIEnv *env, jobject, jint); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeList__SSILjava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject, jshort, jshort, jint, jstring, jstring, jstring); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeList__SSILjava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject, jshort, jshort, jint, jstring, jstring); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeList__SSILjava_lang_String_2 (JNIEnv *env, jobject, jshort, jshort, jint, jstring); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeList__SSI (JNIEnv *env, jobject, jshort, jshort, jint); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeList__SS (JNIEnv *env, jobject, jshort, jshort); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeList__S (JNIEnv *env, jobject, jshort); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getStateList__IZLjava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject, jint, jboolean, jstring, jstring); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getStateList__IZLjava_lang_String_2 (JNIEnv *env, jobject, jint, jboolean, jstring); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getStateList__IZ (JNIEnv *env, jobject, jint, jboolean); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getStateList__I (JNIEnv *env, jobject, jint); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getDefaultTemplates (JNIEnv *env, jobject); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getExecutableTrees__S (JNIEnv *env, jobject, jshort); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getExecutableTrees__ (JNIEnv *env, jobject); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreeGroup (JNIEnv *env, jobject, jshort, jshort); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreesInPeriod__SLjava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject, jshort, jstring, jstring); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreesInPeriod__SLjava_lang_String_2 (JNIEnv *env, jobject, jshort, jstring); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getTreesInPeriod__S (JNIEnv *env, jobject, jshort); +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_newGroupID (JNIEnv *env, jobject); +JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_errorMsg (JNIEnv *env, jobject); +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getAuthToken (JNIEnv *env, jobject); +JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection_getDBName (JNIEnv *env, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __nl_astron_lofar_sas_otb_jotdb3_jOTDBconnection__ */ diff --git a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv.h b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv.h index 12bbda58a2a..76774da8a49 100644 --- a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv.h +++ b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv.h @@ -1,61 +1,22 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include <jni.h> -/* Header for class nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv */ - -#ifndef _Included_nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv -#define _Included_nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv - * Method: initParamTypeConv - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv_initParamTypeConv - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv - * Method: get - * Signature: (Ljava/lang/String;)S - */ -JNIEXPORT jshort JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv_get__Ljava_lang_String_2 - (JNIEnv *, jobject, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv - * Method: get - * Signature: (S)Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv_get__S - (JNIEnv *, jobject, jshort); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv - * Method: getTypes - * Signature: ()Ljava/util/HashMap; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv_getTypes - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv - * Method: top - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv_top - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv - * Method: next - * Signature: ()Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv_next - (JNIEnv *, jobject); - -#ifdef __cplusplus -} -#endif -#endif +#ifndef __nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv__ +#define __nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv__ + +#include <jni.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv_initParamTypeConv (JNIEnv *env, jobject); +JNIEXPORT jshort JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv_get__Ljava_lang_String_2 (JNIEnv *env, jobject, jstring); +JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv_get__S (JNIEnv *env, jobject, jshort); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv_getTypes (JNIEnv *env, jobject); +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv_top (JNIEnv *env, jobject); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv_next (JNIEnv *env, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __nl_astron_lofar_sas_otb_jotdb3_jParamTypeConv__ */ diff --git a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance.h b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance.h index c200fe2d7a7..6aae1dfc7e9 100644 --- a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance.h +++ b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance.h @@ -1,381 +1,62 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include <jni.h> -/* Header for class nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance */ - -#ifndef _Included_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance -#define _Included_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: initTreeMaintenance - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_initTreeMaintenance - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: loadMasterFile - * Signature: (Ljava/lang/String;)I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_loadMasterFile - (JNIEnv *, jobject, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: loadComponentFile - * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_loadComponentFile__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2 - (JNIEnv *, jobject, jstring, jstring, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: loadComponentFile - * Signature: (Ljava/lang/String;Ljava/lang/String;)I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_loadComponentFile__Ljava_lang_String_2Ljava_lang_String_2 - (JNIEnv *, jobject, jstring, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: loadComponentFile - * Signature: (Ljava/lang/String;)I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_loadComponentFile__Ljava_lang_String_2 - (JNIEnv *, jobject, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: getComponentList - * Signature: (Ljava/lang/String;Z)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getComponentList__Ljava_lang_String_2Z - (JNIEnv *, jobject, jstring, jboolean); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: getComponentList - * Signature: (Ljava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getComponentList__Ljava_lang_String_2 - (JNIEnv *, jobject, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: getComponentList - * Signature: ()Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getComponentList__ - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: getComponentNode - * Signature: (I)Lnl/astron/lofar/sas/otb/jotdb3/jVICnodeDef; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getComponentNode - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: getComponentParams - * Signature: (I)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getComponentParams - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: saveComponentNode - * Signature: (Lnl/astron/lofar/sas/otb/jotdb3/jVICnodeDef;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_saveComponentNode - (JNIEnv *, jobject, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: isTopComponent - * Signature: (I)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_isTopComponent - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: deleteComponentNode - * Signature: (I)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_deleteComponentNode - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: getFullComponentName - * Signature: (Lnl/astron/lofar/sas/otb/jotdb3/jVICnodeDef;)Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getFullComponentName - (JNIEnv *, jobject, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: buildTemplateTree - * Signature: (IS)I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_buildTemplateTree - (JNIEnv *, jobject, jint, jshort); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: newTemplateTree - * Signature: ()I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_newTemplateTree - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: copyTemplateTree - * Signature: (I)I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_copyTemplateTree - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: assignTemplateName - * Signature: (ILjava/lang/String;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_assignTemplateName - (JNIEnv *, jobject, jint, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: assignProcessType - * Signature: (ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_assignProcessType - (JNIEnv *, jobject, jint, jstring, jstring, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: getNode - * Signature: (II)Lnl/astron/lofar/sas/otb/jotdb3/jOTDBnode; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getNode - (JNIEnv *, jobject, jint, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: getParam - * Signature: (II)Lnl/astron/lofar/sas/otb/jotdb3/jOTDBparam; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getParam__II - (JNIEnv *, jobject, jint, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: getParam - * Signature: (Lnl/astron/lofar/sas/otb/jotdb3/jOTDBnode;)Lnl/astron/lofar/sas/otb/jotdb3/jOTDBparam; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getParam__Lnl_astron_lofar_sas_otb_jotdb3_jOTDBnode_2 - (JNIEnv *, jobject, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: saveParam - * Signature: (Lnl/astron/lofar/sas/otb/jotdb3/jOTDBparam;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_saveParam - (JNIEnv *, jobject, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: getItemList - * Signature: (III)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getItemList__III - (JNIEnv *, jobject, jint, jint, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: getItemList - * Signature: (ILjava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getItemList__ILjava_lang_String_2 - (JNIEnv *, jobject, jint, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: dupNode - * Signature: (IIS)I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_dupNode - (JNIEnv *, jobject, jint, jint, jshort); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: addComponent - * Signature: (IIILjava/lang/String;)I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_addComponent__IIILjava_lang_String_2 - (JNIEnv *, jobject, jint, jint, jint, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: addComponent - * Signature: (III)I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_addComponent__III - (JNIEnv *, jobject, jint, jint, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: saveNode - * Signature: (Lnl/astron/lofar/sas/otb/jotdb3/jOTDBnode;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_saveNode - (JNIEnv *, jobject, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: saveNodeList - * Signature: (Ljava/util/Vector;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_saveNodeList - (JNIEnv *, jobject, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: deleteNode - * Signature: (Lnl/astron/lofar/sas/otb/jotdb3/jOTDBnode;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_deleteNode - (JNIEnv *, jobject, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: deleteNodeList - * Signature: (Ljava/util/Vector;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_deleteNodeList - (JNIEnv *, jobject, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: checkTreeConstraints - * Signature: (II)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_checkTreeConstraints__II - (JNIEnv *, jobject, jint, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: checkTreeConstraints - * Signature: (I)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_checkTreeConstraints__I - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: instanciateTree - * Signature: (I)I - */ -JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_instanciateTree - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: pruneTree - * Signature: (IS)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_pruneTree - (JNIEnv *, jobject, jint, jshort); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: exportTree - * Signature: (IILjava/lang/String;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_exportTree - (JNIEnv *, jobject, jint, jint, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: exportResultTree - * Signature: (IILjava/lang/String;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_exportResultTree - (JNIEnv *, jobject, jint, jint, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: deleteTree - * Signature: (I)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_deleteTree - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: getTopNode - * Signature: (I)Lnl/astron/lofar/sas/otb/jotdb3/jOTDBnode; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getTopNode - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: setMomInfo - * Signature: (IIILjava/lang/String;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_setMomInfo - (JNIEnv *, jobject, jint, jint, jint, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: setClassification - * Signature: (IS)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_setClassification - (JNIEnv *, jobject, jint, jshort); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: setTreeState - * Signature: (IS)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_setTreeState - (JNIEnv *, jobject, jint, jshort); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: setDescription - * Signature: (ILjava/lang/String;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_setDescription - (JNIEnv *, jobject, jint, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: setSchedule - * Signature: (ILjava/lang/String;Ljava/lang/String;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_setSchedule - (JNIEnv *, jobject, jint, jstring, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance - * Method: errorMsg - * Signature: ()Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_errorMsg - (JNIEnv *, jobject); - -#ifdef __cplusplus -} -#endif -#endif +#ifndef __nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance__ +#define __nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance__ + +#include <jni.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_initTreeMaintenance (JNIEnv *env, jobject); +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_loadMasterFile (JNIEnv *env, jobject, jstring); +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_loadComponentFile__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject, jstring, jstring, jstring); +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_loadComponentFile__Ljava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject, jstring, jstring); +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_loadComponentFile__Ljava_lang_String_2 (JNIEnv *env, jobject, jstring); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getComponentList__Ljava_lang_String_2Z (JNIEnv *env, jobject, jstring, jboolean); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getComponentList__Ljava_lang_String_2 (JNIEnv *env, jobject, jstring); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getComponentList__ (JNIEnv *env, jobject); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getComponentNode (JNIEnv *env, jobject, jint); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getComponentParams (JNIEnv *env, jobject, jint); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_saveComponentNode (JNIEnv *env, jobject, jobject); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_isTopComponent (JNIEnv *env, jobject, jint); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_deleteComponentNode (JNIEnv *env, jobject, jint); +JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getFullComponentName (JNIEnv *env, jobject, jobject); +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_buildTemplateTree (JNIEnv *env, jobject, jint, jshort); +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_newTemplateTree (JNIEnv *env, jobject); +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_copyTemplateTree (JNIEnv *env, jobject, jint); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_assignTemplateName (JNIEnv *env, jobject, jint, jstring); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_assignProcessType (JNIEnv *env, jobject, jint, jstring, jstring, jstring); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getNode (JNIEnv *env, jobject, jint, jint); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getParam__II (JNIEnv *env, jobject, jint, jint); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getParam__Lnl_astron_lofar_sas_otb_jotdb3_jOTDBnode_2 (JNIEnv *env, jobject, jobject); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_saveParam (JNIEnv *env, jobject, jobject); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getItemList__III (JNIEnv *env, jobject, jint, jint, jint); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getItemList__ILjava_lang_String_2 (JNIEnv *env, jobject, jint, jstring); +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_dupNode (JNIEnv *env, jobject, jint, jint, jshort); +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_addComponent__IIILjava_lang_String_2 (JNIEnv *env, jobject, jint, jint, jint, jstring); +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_addComponent__III (JNIEnv *env, jobject, jint, jint, jint); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_saveNode (JNIEnv *env, jobject, jobject); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_saveNodeList (JNIEnv *env, jobject, jobject); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_deleteNode (JNIEnv *env, jobject, jobject); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_deleteNodeList (JNIEnv *env, jobject, jobject); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_checkTreeConstraints__II (JNIEnv *env, jobject, jint, jint); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_checkTreeConstraints__I (JNIEnv *env, jobject, jint); +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_instanciateTree (JNIEnv *env, jobject, jint); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_pruneTree (JNIEnv *env, jobject, jint, jshort); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_exportTree (JNIEnv *env, jobject, jint, jint, jstring); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_exportResultTree (JNIEnv *env, jobject, jint, jint, jstring); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_deleteTree (JNIEnv *env, jobject, jint); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_getTopNode (JNIEnv *env, jobject, jint); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_setMomInfo (JNIEnv *env, jobject, jint, jint, jint, jstring); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_setClassification (JNIEnv *env, jobject, jint, jshort); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_setTreeState (JNIEnv *env, jobject, jint, jshort); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_setDescription (JNIEnv *env, jobject, jint, jstring); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_setSchedule (JNIEnv *env, jobject, jint, jstring, jstring); +JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance_errorMsg (JNIEnv *env, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __nl_astron_lofar_sas_otb_jotdb3_jTreeMaintenance__ */ diff --git a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv.h b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv.h index 2ecc0a42417..f5f8b3d937e 100644 --- a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv.h +++ b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv.h @@ -1,61 +1,22 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include <jni.h> -/* Header for class nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv */ - -#ifndef _Included_nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv -#define _Included_nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv - * Method: initTreeStateConv - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv_initTreeStateConv - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv - * Method: get - * Signature: (Ljava/lang/String;)S - */ -JNIEXPORT jshort JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv_get__Ljava_lang_String_2 - (JNIEnv *, jobject, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv - * Method: get - * Signature: (S)Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv_get__S - (JNIEnv *, jobject, jshort); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv - * Method: getTypes - * Signature: ()Ljava/util/HashMap; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv_getTypes - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv - * Method: top - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv_top - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv - * Method: next - * Signature: ()Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv_next - (JNIEnv *, jobject); - -#ifdef __cplusplus -} -#endif -#endif +#ifndef __nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv__ +#define __nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv__ + +#include <jni.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv_initTreeStateConv (JNIEnv *env, jobject); +JNIEXPORT jshort JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv_get__Ljava_lang_String_2 (JNIEnv *env, jobject, jstring); +JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv_get__S (JNIEnv *env, jobject, jshort); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv_getTypes (JNIEnv *env, jobject); +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv_top (JNIEnv *env, jobject); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv_next (JNIEnv *env, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __nl_astron_lofar_sas_otb_jotdb3_jTreeStateConv__ */ diff --git a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv.h b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv.h index febd45b64cc..47974d09479 100644 --- a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv.h +++ b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv.h @@ -1,61 +1,22 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include <jni.h> -/* Header for class nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv */ - -#ifndef _Included_nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv -#define _Included_nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv - * Method: initTreeTypeConv - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv_initTreeTypeConv - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv - * Method: get - * Signature: (Ljava/lang/String;)S - */ -JNIEXPORT jshort JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv_get__Ljava_lang_String_2 - (JNIEnv *, jobject, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv - * Method: get - * Signature: (S)Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv_get__S - (JNIEnv *, jobject, jshort); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv - * Method: getTypes - * Signature: ()Ljava/util/HashMap; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv_getTypes - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv - * Method: top - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv_top - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv - * Method: next - * Signature: ()Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv_next - (JNIEnv *, jobject); - -#ifdef __cplusplus -} -#endif -#endif +#ifndef __nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv__ +#define __nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv__ + +#include <jni.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv_initTreeTypeConv (JNIEnv *env, jobject); +JNIEXPORT jshort JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv_get__Ljava_lang_String_2 (JNIEnv *env, jobject, jstring); +JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv_get__S (JNIEnv *env, jobject, jshort); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv_getTypes (JNIEnv *env, jobject); +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv_top (JNIEnv *env, jobject); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv_next (JNIEnv *env, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __nl_astron_lofar_sas_otb_jotdb3_jTreeTypeConv__ */ diff --git a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeValue.h b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeValue.h index ff2875e8c97..a62006bfab9 100644 --- a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeValue.h +++ b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jTreeValue.h @@ -1,101 +1,28 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include <jni.h> -/* Header for class nl_astron_lofar_sas_otb_jotdb3_jTreeValue */ - -#ifndef _Included_nl_astron_lofar_sas_otb_jotdb3_jTreeValue -#define _Included_nl_astron_lofar_sas_otb_jotdb3_jTreeValue -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeValue - * Method: addKVT - * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_addKVT__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2 - (JNIEnv *, jobject, jstring, jstring, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeValue - * Method: addKVT - * Signature: (Lnl/astron/lofar/sas/otb/jotdb3/jOTDBvalue;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_addKVT__Lnl_astron_lofar_sas_otb_jotdb3_jOTDBvalue_2 - (JNIEnv *, jobject, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeValue - * Method: addKVTlist - * Signature: (Ljava/util/Vector;)Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_addKVTlist - (JNIEnv *, jobject, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeValue - * Method: getBrokenHardware - * Signature: (Ljava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_getBrokenHardware__Ljava_lang_String_2 - (JNIEnv *, jobject, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeValue - * Method: getBrokenHardware - * Signature: ()Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_getBrokenHardware__ - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeValue - * Method: searchInPeriod - * Signature: (IILjava/lang/String;Ljava/lang/String;Z)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_searchInPeriod__IILjava_lang_String_2Ljava_lang_String_2Z - (JNIEnv *, jobject, jint, jint, jstring, jstring, jboolean); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeValue - * Method: searchInPeriod - * Signature: (IILjava/lang/String;Ljava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_searchInPeriod__IILjava_lang_String_2Ljava_lang_String_2 - (JNIEnv *, jobject, jint, jint, jstring, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeValue - * Method: searchInPeriod - * Signature: (IILjava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_searchInPeriod__IILjava_lang_String_2 - (JNIEnv *, jobject, jint, jint, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeValue - * Method: searchInPeriod - * Signature: (II)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_searchInPeriod__II - (JNIEnv *, jobject, jint, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeValue - * Method: getSchedulableItems - * Signature: (I)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_getSchedulableItems__I - (JNIEnv *, jobject, jint); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeValue - * Method: getSchedulableItems - * Signature: ()Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_getSchedulableItems__ - (JNIEnv *, jobject); - -#ifdef __cplusplus -} -#endif -#endif +#ifndef __nl_astron_lofar_sas_otb_jotdb3_jTreeValue__ +#define __nl_astron_lofar_sas_otb_jotdb3_jTreeValue__ + +#include <jni.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_addKVT__Ljava_lang_String_2Ljava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject, jstring, jstring, jstring); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_addKVT__Lnl_astron_lofar_sas_otb_jotdb3_jOTDBvalue_2 (JNIEnv *env, jobject, jobject); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_addKVTlist (JNIEnv *env, jobject, jobject); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_getBrokenHardware__Ljava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject, jstring, jstring); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_getBrokenHardware__Ljava_lang_String_2 (JNIEnv *env, jobject, jstring); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_getBrokenHardware__ (JNIEnv *env, jobject); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_searchInPeriod__IILjava_lang_String_2Ljava_lang_String_2Z (JNIEnv *env, jobject, jint, jint, jstring, jstring, jboolean); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_searchInPeriod__IILjava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject, jint, jint, jstring, jstring); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_searchInPeriod__IILjava_lang_String_2 (JNIEnv *env, jobject, jint, jint, jstring); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_searchInPeriod__II (JNIEnv *env, jobject, jint, jint); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_getSchedulableItems__I (JNIEnv *env, jobject, jint); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_getSchedulableItems__ (JNIEnv *env, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __nl_astron_lofar_sas_otb_jotdb3_jTreeValue__ */ diff --git a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jUnitConv.h b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jUnitConv.h index 7bf1eaa4d4d..a9102b783e1 100644 --- a/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jUnitConv.h +++ b/SAS/OTB/jOTDB3/include/jOTDB3/nl_astron_lofar_sas_otb_jotdb3_jUnitConv.h @@ -1,61 +1,22 @@ -/* DO NOT EDIT THIS FILE - it is machine generated */ -#include <jni.h> -/* Header for class nl_astron_lofar_sas_otb_jotdb3_jUnitConv */ - -#ifndef _Included_nl_astron_lofar_sas_otb_jotdb3_jUnitConv -#define _Included_nl_astron_lofar_sas_otb_jotdb3_jUnitConv -#ifdef __cplusplus -extern "C" { -#endif -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jUnitConv - * Method: initUnitConv - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jUnitConv_initUnitConv - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jUnitConv - * Method: get - * Signature: (Ljava/lang/String;)S - */ -JNIEXPORT jshort JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jUnitConv_get__Ljava_lang_String_2 - (JNIEnv *, jobject, jstring); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jUnitConv - * Method: get - * Signature: (S)Ljava/lang/String; - */ -JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jUnitConv_get__S - (JNIEnv *, jobject, jshort); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jUnitConv - * Method: getTypes - * Signature: ()Ljava/util/HashMap; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jUnitConv_getTypes - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jUnitConv - * Method: top - * Signature: ()V - */ -JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jUnitConv_top - (JNIEnv *, jobject); - -/* - * Class: nl_astron_lofar_sas_otb_jotdb3_jUnitConv - * Method: next - * Signature: ()Z - */ -JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jUnitConv_next - (JNIEnv *, jobject); - -#ifdef __cplusplus -} -#endif -#endif +#ifndef __nl_astron_lofar_sas_otb_jotdb3_jUnitConv__ +#define __nl_astron_lofar_sas_otb_jotdb3_jUnitConv__ + +#include <jni.h> + +#ifdef __cplusplus +extern "C" +{ +#endif + +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jUnitConv_initUnitConv (JNIEnv *env, jobject); +JNIEXPORT jshort JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jUnitConv_get__Ljava_lang_String_2 (JNIEnv *env, jobject, jstring); +JNIEXPORT jstring JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jUnitConv_get__S (JNIEnv *env, jobject, jshort); +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jUnitConv_getTypes (JNIEnv *env, jobject); +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jUnitConv_top (JNIEnv *env, jobject); +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jUnitConv_next (JNIEnv *env, jobject); + +#ifdef __cplusplus +} +#endif + +#endif /* __nl_astron_lofar_sas_otb_jotdb3_jUnitConv__ */ diff --git a/SAS/OTB/jOTDB3/pom.xml b/SAS/OTB/jOTDB3/pom.xml index 6e4805eca00..90b9e21db50 100644 --- a/SAS/OTB/jOTDB3/pom.xml +++ b/SAS/OTB/jOTDB3/pom.xml @@ -1,215 +1,153 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<project - xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - <groupId>nl.astron.lofar.sas</groupId> - <artifactId>jOTDB3</artifactId> - <name>lib Object Tree Browser</name> - <version>1.0.2</version> - - <organization> - <name>Astron</name> - <url>http://www.astron.nl</url> - </organization> - - <properties> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <project.test.sourceEncoding>UTF-8</project.test.sourceEncoding> - </properties> - - <build> - - <sourceDirectory>src</sourceDirectory> - <testSourceDirectory>test</testSourceDirectory> - - <resources> - <resource> - <directory>${basedir}</directory> - <includes> - <include>*.log_prop</include> - </includes> - </resource> - - <resource> - <directory>src</directory> - <excludes> - <exclude>**/*.java</exclude> - <exclude>**/*.cc</exclude> - </excludes> - </resource> - </resources> - - <plugins> - - <!-- Java Compiler settings --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-compiler-plugin</artifactId> - <version>2.3.2</version> - <configuration> - <source>1.6</source> - <target>1.6</target> - </configuration> - </plugin> - - <!-- Generate HEADER files from JNI Java classes --> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>native-maven-plugin</artifactId> - <version>1.0-alpha-7</version> - - <configuration> - <javahClassNames> - <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jCampaign</javahClassName> - <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jClassifConv</javahClassName> - <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jInitCPPLogger</javahClassName> - <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jOTDBconnection</javahClassName> - <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jParamTypeConv</javahClassName> - <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jTreeMaintenance</javahClassName> - <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jTreeStateConv</javahClassName> - <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jTreeTypeConv</javahClassName> - <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jUnitConv</javahClassName> - <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jTreeValue</javahClassName> - </javahClassNames> - </configuration> - - <executions> - <execution> - <phase>process-classes</phase> - <goals> - <goal>javah</goal> - </goals> - </execution> - </executions> - </plugin> - - - <!-- Set the main class in the manifest file --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-jar-plugin</artifactId> - <version>2.4</version> - - <configuration> - <archive> - <manifest> - <mainClass>nl.astron.lofar.sas.otb.jotdb3.jOTDBserver</mainClass> - <addDefaultImplementationEntries>true</addDefaultImplementationEntries> - <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries> - </manifest> - </archive> - </configuration> - </plugin> - - - <!-- Create a /target/lib directory with ALL dependencies --> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>2.4</version> - <executions> - <execution> - <phase>package</phase> - <goals> - <goal>copy-dependencies</goal> - </goals> - <configuration> - <outputDirectory>${project.build.directory}/lib</outputDirectory> - </configuration> - </execution> - </executions> - </plugin> - - <!-- Create an TAR.GZ file --> - <plugin> - <artifactId>maven-assembly-plugin</artifactId> - <version>2.3</version> - <configuration> - <descriptor>assembly.xml</descriptor> - <appendAssemblyId>false</appendAssemblyId> - </configuration> - - <executions> - <execution> - <id>make-assembly</id> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - - <pluginManagement> - <plugins> - <!-- - This plugin's configuration is used to store Eclipse m2e settings only. - It has no influence on the Maven build itself. - --> - <plugin> - <groupId>org.eclipse.m2e</groupId> - <artifactId>lifecycle-mapping</artifactId> - <version>1.0.0</version> - <configuration> - <lifecycleMappingMetadata> - <pluginExecutions> - <pluginExecution> - <pluginExecutionFilter> - <groupId>org.codehaus.mojo</groupId> - <artifactId>native-maven-plugin</artifactId> - <versionRange>[1.0-alpha-7,)</versionRange> - <goals> - <goal>javah</goal> - </goals> - </pluginExecutionFilter> - <action><ignore /></action> - </pluginExecution> - <pluginExecution> - <pluginExecutionFilter> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <versionRange>[1.0.0,)</versionRange> - <goals> - <goal>copy-dependencies</goal> - </goals> - </pluginExecutionFilter> - <action><ignore /></action> - </pluginExecution> - </pluginExecutions> - </lifecycleMappingMetadata> - </configuration> - </plugin> - </plugins> - </pluginManagement> - </build> - - <dependencies> - - <dependency> - <groupId>nl.astron.lofar</groupId> - <artifactId>lofarutils</artifactId> - <version>1.0.2</version> - </dependency> - - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - <version>1.2.16</version> - </dependency> - - </dependencies> - - <distributionManagement> - <snapshotRepository> - <id>snapshots</id> - <name>Astron Nexus Repository</name> - <url>https://support.astron.nl/nexus/content/repositories/snapshots/</url> - </snapshotRepository> - </distributionManagement> - -</project> +<?xml version="1.0" encoding="UTF-8"?> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <name>Lofar OTB :: jOTDB3</name> + <description>Object Tree Browser Client/Server - jOTDB3</description> + + <parent> + <groupId>nl.astron.lofar.sas.otb</groupId> + <artifactId>otb-parent</artifactId> + <version>1.8.2-SNAPSHOT</version> + </parent> + + <artifactId>jOTDB3</artifactId> + + <!-- Specification for the SCM used by the project, such as CVS, Subversion, etc. --> + <scm> + <connection>scm:svn:https://svn.astron.nl/LOFAR/trunk/SAS/OTB/jOTDB3</connection> + <developerConnection>scm:svn:https://svn.astron.nl/LOFAR/trunk/SAS/OTB/jOTDB3</developerConnection> + </scm> + + + <!-- Information required to build a project. --> + <build> + + <sourceDirectory>src</sourceDirectory> + <testSourceDirectory>test</testSourceDirectory> + + <resources> + <resource> + <directory>${basedir}</directory> + <includes> + <include>*.log_prop</include> + </includes> + </resource> + + <resource> + <directory>src</directory> + <excludes> + <exclude>**/*.java</exclude> + <exclude>**/*.cc</exclude> + </excludes> + </resource> + </resources> + + <plugins> + + <!-- Generate HEADER files from JNI Java classes --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>native-maven-plugin</artifactId> + + <configuration> + <javahClassNames> + <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jCampaign</javahClassName> + <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jClassifConv</javahClassName> + <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jInitCPPLogger</javahClassName> + <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jOTDBconnection</javahClassName> + <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jParamTypeConv</javahClassName> + <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jTreeMaintenance</javahClassName> + <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jTreeStateConv</javahClassName> + <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jTreeTypeConv</javahClassName> + <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jUnitConv</javahClassName> + <javahClassName>nl.astron.lofar.sas.otb.jotdb3.jTreeValue</javahClassName> + </javahClassNames> + </configuration> + + <executions> + <execution> + <phase>process-classes</phase> + <goals> + <goal>javah</goal> + </goals> + </execution> + </executions> + </plugin> + + + <!-- Set the main class in the manifest file --> + <plugin> + <artifactId>maven-jar-plugin</artifactId> + + <configuration> + <archive> + <manifest> + <mainClass>nl.astron.lofar.sas.otb.jotdb3.jOTDBserver</mainClass> + <addDefaultImplementationEntries>true</addDefaultImplementationEntries> + <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries> + </manifest> + </archive> + </configuration> + </plugin> + + + <!-- Create a /target/lib directory with ALL dependencies --> + <plugin> + <artifactId>maven-dependency-plugin</artifactId> + + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <outputDirectory>${project.build.directory}/lib</outputDirectory> + </configuration> + </execution> + </executions> + </plugin> + + <!-- Create an TAR.GZ file --> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <descriptor>assembly.xml</descriptor> + <appendAssemblyId>false</appendAssemblyId> + </configuration> + + <executions> + <execution> + <id>make-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + + </build> + + <dependencies> + + <!-- Local dependencies --> + <dependency> + <groupId>nl.astron.lofar.lib</groupId> + <artifactId>lofarutils</artifactId> + </dependency> + + <!-- External dependencies --> + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </dependency> + + </dependencies> + + +</project> diff --git a/SAS/OTB/jOTDB3/src/nl/astron/lofar/sas/otb/jotdb3/jTreeValue.java b/SAS/OTB/jOTDB3/src/nl/astron/lofar/sas/otb/jotdb3/jTreeValue.java index 77aec77c24d..52e47272bea 100644 --- a/SAS/OTB/jOTDB3/src/nl/astron/lofar/sas/otb/jotdb3/jTreeValue.java +++ b/SAS/OTB/jOTDB3/src/nl/astron/lofar/sas/otb/jotdb3/jTreeValue.java @@ -39,10 +39,12 @@ public class jTreeValue implements jTreeValueInterface itsTreeID=0; } + @Override public void setTreeID(int aTreeID) { itsTreeID=aTreeID; } + @Override public int TreeID() { return itsTreeID; } @@ -50,16 +52,23 @@ public class jTreeValue implements jTreeValueInterface // PVSS will continuously add value-changes to the offline PIC. // There two ways PVSS can do this. // The function returns false if the PIC node can not be found. + @Override public native boolean addKVT( String key, String value, String time) throws RemoteException; + @Override public native boolean addKVT(jOTDBvalue aKVT) throws RemoteException; // Note: This form will probably be used by SAS and OTB when committing // a list of modified node. + @Override public native boolean addKVTlist(Vector<jOTDBvalue> aValueList) throws RemoteException; // public native boolean addKVTparamSet(jParamterSet aPS) throws Exception; - // Query for getting list of broken hardware on a certain time. - public native Vector<jOTDBvalue> getBrokenHardware (String atTime) throws RemoteException; + // Query for getting list of broken hardware on a certain time, or between a certain time range + @Override + public native Vector<jOTDBvalue> getBrokenHardware (String aStartTime, String aStopTime) throws RemoteException; + @Override + public native Vector<jOTDBvalue> getBrokenHardware (String aStartTime) throws RemoteException; + @Override public native Vector<jOTDBvalue> getBrokenHardware () throws RemoteException; //# SHM queries @@ -70,14 +79,18 @@ public class jTreeValue implements jTreeValueInterface // When the endDate is not specified all value changes from beginDate // till 'now' are retrieved, otherwise the selection is limited to // [beginDate..endDate>. + @Override public native Vector<jOTDBvalue> searchInPeriod (int topNode, int depth, String beginDate, String endDate, boolean mostRecentlyOnly) throws RemoteException; + @Override public native Vector<jOTDBvalue> searchInPeriod (int topNode, int depth, String beginDate, String endDate) throws RemoteException; + @Override public native Vector<jOTDBvalue> searchInPeriod (int topNode, int depth, String beginDate) throws RemoteException; + @Override public native Vector<jOTDBvalue> searchInPeriod (int topNode, int depth) throws RemoteException; //# SAS queries @@ -85,11 +98,14 @@ public class jTreeValue implements jTreeValueInterface // resources exist in the OTDB tree. This list can be retrieved with // this function. // TBW: Is this realy what SAS needs??? + @Override public native Vector<jOTDBvalue> getSchedulableItems (int topNode) throws RemoteException; + @Override public native Vector<jOTDBvalue> getSchedulableItems () throws RemoteException; // Whenever an error occurs in one the OTDB functions the message can // be retrieved with this function. + @Override public String errorMsg() { return itsErrorMsg; } diff --git a/SAS/OTB/jOTDB3/src/nl/astron/lofar/sas/otb/jotdb3/jTreeValueInterface.java b/SAS/OTB/jOTDB3/src/nl/astron/lofar/sas/otb/jotdb3/jTreeValueInterface.java index 1b8a8252397..43cf15a83b2 100644 --- a/SAS/OTB/jOTDB3/src/nl/astron/lofar/sas/otb/jotdb3/jTreeValueInterface.java +++ b/SAS/OTB/jOTDB3/src/nl/astron/lofar/sas/otb/jotdb3/jTreeValueInterface.java @@ -47,8 +47,9 @@ public interface jTreeValueInterface extends Remote // public boolean addKVTparamSet(jParamterSet aPS) throws RemoteException; - // Query for getting list of broken hardware on a certain time. - public Vector<jOTDBvalue> getBrokenHardware (String atTime) throws RemoteException; + // Query for getting list of broken hardware on a certain time, or between a certain time range + public Vector<jOTDBvalue> getBrokenHardware (String aStartTime, String aStopTime) throws RemoteException; + public Vector<jOTDBvalue> getBrokenHardware (String aStartTime) throws RemoteException; public Vector<jOTDBvalue> getBrokenHardware () throws RemoteException; diff --git a/SAS/OTB/jOTDB3/src/nl_astron_lofar_sas_otb_jotdb3_jTreeValue.cc b/SAS/OTB/jOTDB3/src/nl_astron_lofar_sas_otb_jotdb3_jTreeValue.cc index d98152703f9..95df2ce4e02 100644 --- a/SAS/OTB/jOTDB3/src/nl_astron_lofar_sas_otb_jotdb3_jTreeValue.cc +++ b/SAS/OTB/jOTDB3/src/nl_astron_lofar_sas_otb_jotdb3_jTreeValue.cc @@ -146,6 +146,54 @@ JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_addKVT return succes; } +/* + * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeValue + * Method: getBrokenHardware + * Signature: (Ljava/lang/String,Ljava/lang/String)Ljava/util/Vector; + */ +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jotdb3_jTreeValue_getBrokenHardware__Ljava_lang_String_2Ljava_lang_String_2 (JNIEnv *env, jobject jTreeValue, jstring aStartTime, jstring aStopTime) { + // create the connection with the c++ TreeVal + setTreeValConnection(env,jTreeValue); + + const char* aStart = env->GetStringUTFChars (aStartTime, 0); + const string startTime (aStart); + const ptime tStart (time_from_string (startTime)); + + const char* aStop = env->GetStringUTFChars (aStopTime, 0); + const string stopTime (aStop); + const ptime tStop (time_from_string (stopTime)); + + jobject valueVector; + + try { + vector<OTDBvalue> valueList = ((TreeValue*)getCObjectPtr(env,jTreeValue,"_TreeValue"))->getBrokenHardware (tStart,tStop); + vector<OTDBvalue>::iterator valueIterator; + + + // Construct java Vector + jclass class_Vector = env->FindClass("java/util/Vector"); + jmethodID mid_Vector_cons = env->GetMethodID(class_Vector, "<init>", "()V"); + valueVector = env->NewObject(class_Vector, mid_Vector_cons); + jmethodID mid_Vector_add = env->GetMethodID(class_Vector, "add", "(Ljava/lang/Object;)Z"); + + for (valueIterator = valueList.begin(); valueIterator != valueList.end(); valueIterator++) + env->CallObjectMethod(valueVector, mid_Vector_add, convertOTDBvalue (env, *valueIterator)); + + env->ReleaseStringUTFChars (aStartTime, aStart); + env->ReleaseStringUTFChars (aStopTime, aStop); + + setErrorMsg(env,jTreeValue); + } catch (exception &ex) { + cout << "Exception during treeValue::getBrokenHardware(" << tStart << "," << tStop << ") "<< ex.what() << endl; + + env->ReleaseStringUTFChars (aStartTime, aStart); + env->ReleaseStringUTFChars (aStopTime, aStop); + env->ThrowNew(env->FindClass("java/lang/Exception"),ex.what()); + + } + return valueVector; +} + /* * Class: nl_astron_lofar_sas_otb_jotdb3_jTreeValue * Method: getBrokenHardware diff --git a/JAVA/CEP/jParmFacade/conf/Plotter-config-jparmfacade.jar b/SAS/OTB/jParmFacade/conf/Plotter-config-jparmfacade.jar similarity index 100% rename from JAVA/CEP/jParmFacade/conf/Plotter-config-jparmfacade.jar rename to SAS/OTB/jParmFacade/conf/Plotter-config-jparmfacade.jar diff --git a/JAVA/CEP/jParmFacade/include/Makefile.am b/SAS/OTB/jParmFacade/include/Makefile.am similarity index 100% rename from JAVA/CEP/jParmFacade/include/Makefile.am rename to SAS/OTB/jParmFacade/include/Makefile.am diff --git a/JAVA/CEP/jParmFacade/include/jParmFacade/Makefile.am b/SAS/OTB/jParmFacade/include/jParmFacade/Makefile.am similarity index 100% rename from JAVA/CEP/jParmFacade/include/jParmFacade/Makefile.am rename to SAS/OTB/jParmFacade/include/jParmFacade/Makefile.am diff --git a/SAS/OTB/jParmFacade/include/jParmFacade/nl_astron_lofar_sas_otb_jparmfacade_jParmFacade.h b/SAS/OTB/jParmFacade/include/jParmFacade/nl_astron_lofar_sas_otb_jparmfacade_jParmFacade.h new file mode 100644 index 00000000000..5809eec9023 --- /dev/null +++ b/SAS/OTB/jParmFacade/include/jParmFacade/nl_astron_lofar_sas_otb_jparmfacade_jParmFacade.h @@ -0,0 +1,45 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include <jni.h> +/* Header for class nl_astron_lofar_sas_otb_jparmfacade_jParmFacade */ + +#ifndef _Included_nl_astron_lofar_sas_otb_jparmfacade_jParmFacade +#define _Included_nl_astron_lofar_sas_otb_jparmfacade_jParmFacade +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: nl_astron_lofar_sas_otb_jparmfacade_jParmFacade + * Method: getRange + * Signature: (Ljava/lang/String;)Ljava/util/Vector; + */ +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jparmfacade_jParmFacade_getRange + (JNIEnv *, jobject, jstring); + +/* + * Class: nl_astron_lofar_sas_otb_jparmfacade_jParmFacade + * Method: getNames + * Signature: (Ljava/lang/String;)Ljava/util/Vector; + */ +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jparmfacade_jParmFacade_getNames + (JNIEnv *, jobject, jstring); + +/* + * Class: nl_astron_lofar_sas_otb_jparmfacade_jParmFacade + * Method: getValues + * Signature: (Ljava/lang/String;DDIDDI)Ljava/util/HashMap; + */ +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jparmfacade_jParmFacade_getValues + (JNIEnv *, jobject, jstring, jdouble, jdouble, jint, jdouble, jdouble, jint); + +/* + * Class: nl_astron_lofar_sas_otb_jparmfacade_jParmFacade + * Method: getHistory + * Signature: (Ljava/lang/String;DDDDDD)Ljava/util/HashMap; + */ +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_sas_otb_jparmfacade_jParmFacade_getHistory + (JNIEnv *, jobject, jstring, jdouble, jdouble, jdouble, jdouble, jdouble, jdouble); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/SAS/OTB/jParmFacade/pom.xml b/SAS/OTB/jParmFacade/pom.xml new file mode 100644 index 00000000000..2c38cb4aa21 --- /dev/null +++ b/SAS/OTB/jParmFacade/pom.xml @@ -0,0 +1,83 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <name>Lofar OTB :: jParmFacade</name> + <description>Object Tree Browser Client/Server - jParmFacade</description> + + <parent> + <groupId>nl.astron.lofar.sas.otb</groupId> + <artifactId>otb-parent</artifactId> + <version>1.8.2-SNAPSHOT</version> + </parent> + + <artifactId>jParmFacade</artifactId> + + <!-- Specification for the SCM used by the project, such as CVS, Subversion, etc. --> + <scm> + <connection>scm:svn:https://svn.astron.nl/LOFAR/trunk/SAS/OTB/jParmFacade</connection> + <developerConnection>scm:svn:https://svn.astron.nl/LOFAR/trunk/SAS/OTB/jParmFacade</developerConnection> + </scm> + + + <!-- Information required to build a project. --> + <build> + + <sourceDirectory>src</sourceDirectory> + <testSourceDirectory>test</testSourceDirectory> + + <resources> + <resource> + <directory>src</directory> + <excludes> + <exclude>**/*.java</exclude> + <exclude>**/*.cc</exclude> + </excludes> + </resource> + </resources> + + <plugins> + + <!-- Generate HEADER files from JNI Java classes --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>native-maven-plugin</artifactId> + + <configuration> + <javahClassNames> + <javahClassName>nl.astron.lofar.sas.otb.jparmfacade.jParmFacade</javahClassName> + </javahClassNames> + </configuration> + + <executions> + <execution> + <phase>process-classes</phase> + <goals> + <goal>javah</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + + </build> + + + <dependencies> + <dependency> + <groupId>nl.astron.lofar.sas.otb</groupId> + <artifactId>jOTDB3</artifactId> + </dependency> + + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </dependency> + </dependencies> + +</project> + + diff --git a/JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/jParmFacade.java b/SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb/jparmfacade/jParmFacade.java similarity index 82% rename from JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/jParmFacade.java rename to SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb/jparmfacade/jParmFacade.java index 86882361b7a..8bd4b078175 100644 --- a/JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/jParmFacade.java +++ b/SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb/jparmfacade/jParmFacade.java @@ -21,10 +21,10 @@ */ -package nl.astron.lofar.java.cep.jparmfacade; +package nl.astron.lofar.sas.otb.jparmfacade; +import java.util.ArrayList; import java.util.HashMap; -import java.util.Vector; /** * @created 18-04-2006, 9:54 @@ -33,7 +33,7 @@ import java.util.Vector; */ public class jParmFacade { private String itsParmFacadeDB=""; - + /** Creates a new instance of jParmFacade */ public jParmFacade() { itsParmFacadeDB=""; @@ -41,31 +41,31 @@ public class jParmFacade { public void setParmFacadeDB(String tableName) { itsParmFacadeDB=tableName; } - - + + // Get the domain range (as startx,endx,starty,endy) of the given // parameters in the table. // This is the minimum start value and maximum end value for all parameters. // An empty name pattern is the same as * (all parm names). - public native Vector<Double> getRange(String parmNamePattern) throws Exception; - + public native ArrayList<Double> getRange(String parmNamePattern) throws Exception; + // Get parameter names in the table matching the pattern. // An empty name pattern is the same as * (all parm names). - public native Vector<String> getNames(String parmNamePattern) throws Exception; - + public native ArrayList<String> getNames(String parmNamePattern) throws Exception; + // Get the parameter values for the given parameters and domain. // The domain is given by the start and end values, while the grid is // given by nx and ny. - public native HashMap<String,Vector<Double>> getValues(String parmNamePattern, + public native HashMap<String,ArrayList<Double>> getValues(String parmNamePattern, double startx, double endx, int nx, double starty, double endy, int ny) throws Exception; - + // Get the parameter values for the given parameters and timeframe. // The domain is given by the start and end values, while the time is // given by startSolvTime and endSolveTime. - public native HashMap<String,Vector<Double>> getHistory(String parmNamePattern, - double startx, double endx, double starty, + public native HashMap<String,ArrayList<Double>> getHistory(String parmNamePattern, + double startx, double endx, double starty, double endy, double startSolveTime, double endSolveTime) throws Exception; - + } diff --git a/JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/jParmFacade.log_prop b/SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb/jparmfacade/jParmFacade.log_prop similarity index 100% rename from JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/jParmFacade.log_prop rename to SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb/jparmfacade/jParmFacade.log_prop diff --git a/JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/jParmFacadeAdapter.java b/SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb/jparmfacade/jParmFacadeAdapter.java similarity index 79% rename from JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/jParmFacadeAdapter.java rename to SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb/jparmfacade/jParmFacadeAdapter.java index 8cf75d5e93a..e07ff4eeed6 100644 --- a/JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/jParmFacadeAdapter.java +++ b/SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb/jparmfacade/jParmFacadeAdapter.java @@ -19,11 +19,11 @@ //# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //# -package nl.astron.lofar.java.cep.jparmfacade; +package nl.astron.lofar.sas.otb.jparmfacade; -import java.util.Vector; import java.rmi.server.UnicastRemoteObject; import java.rmi.RemoteException; +import java.util.ArrayList; import java.util.HashMap; public class jParmFacadeAdapter extends UnicastRemoteObject implements jParmFacadeInterface @@ -34,6 +34,7 @@ public class jParmFacadeAdapter extends UnicastRemoteObject implements jParmFaca this.adaptee = adaptee; } + @Override public void setParmFacadeDB(String tableName) throws RemoteException { adaptee.setParmFacadeDB(tableName); } @@ -42,28 +43,26 @@ public class jParmFacadeAdapter extends UnicastRemoteObject implements jParmFaca // parameters in the table. // This is the minimum start value and maximum end value for all parameters. // An empty name pattern is the same as * (all parm names). - public Vector<Double> getRange(String parmNamePattern) throws RemoteException { - Vector<Double> aV=null; + @Override + public ArrayList<Double> getRange(String parmNamePattern) throws RemoteException { + ArrayList<Double> aV=null; try { aV=adaptee.getRange(parmNamePattern); } catch (Exception ex) { - RemoteException anEx=new RemoteException("JNI getRange error"); - anEx.initCause(ex); - throw anEx; + throw new RemoteException("JNI getRange error", ex); } return aV; } // Get parameter names in the table matching the pattern. // An empty name pattern is the same as * (all parm names). - public Vector<String> getNames(String parmNamePattern) throws RemoteException { - Vector<String> aV=null; + @Override + public ArrayList<String> getNames(String parmNamePattern) throws RemoteException { + ArrayList<String> aV=null; try { aV= adaptee.getNames(parmNamePattern); } catch (Exception ex) { - RemoteException anEx=new RemoteException("JNI getNames error"); - anEx.initCause(ex); - throw anEx; + throw new RemoteException("JNI getNames error", ex); } return aV; } @@ -72,10 +71,11 @@ public class jParmFacadeAdapter extends UnicastRemoteObject implements jParmFaca // Get the parameter values for the given parameters and domain. // The domain is given by the start and end values, while the grid is // given by nx and ny. - public HashMap<String,Vector<Double>> getValues(String parmNamePattern, + @Override + public HashMap<String,ArrayList<Double>> getValues(String parmNamePattern, double startx, double endx, int nx, double starty, double endy, int ny) throws RemoteException { - HashMap<String,Vector<Double>> aM=null; + HashMap<String,ArrayList<Double>> aM=null; try { aM=adaptee.getValues(parmNamePattern,startx,endx,nx,starty,endy,ny); } catch (Exception ex) { @@ -89,10 +89,11 @@ public class jParmFacadeAdapter extends UnicastRemoteObject implements jParmFaca // Get the parameter values for the given parameters and timeframe. // The domain is given by the start and end values, while the time is // given by startSolvTime and endSolveTime. - public HashMap<String,Vector<Double>> getHistory(String parmNamePattern, + @Override + public HashMap<String,ArrayList<Double>> getHistory(String parmNamePattern, double startx, double endx, double starty, double endy, double startSolveTime, double endSolveTime) throws RemoteException { - HashMap<String,Vector<Double>> aM=null; + HashMap<String,ArrayList<Double>> aM=null; try { aM=adaptee.getHistory(parmNamePattern,startx,endx,starty,endy,startSolveTime,endSolveTime); } catch (Exception ex) { @@ -102,5 +103,7 @@ public class jParmFacadeAdapter extends UnicastRemoteObject implements jParmFaca } return aM; } - protected jParmFacade adaptee; + protected jParmFacade adaptee; + + } diff --git a/JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/jParmFacadeInterface.java b/SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb/jparmfacade/jParmFacadeInterface.java similarity index 85% rename from JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/jParmFacadeInterface.java rename to SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb/jparmfacade/jParmFacadeInterface.java index 6e2da4e3fa6..4df6058ba9f 100644 --- a/JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/jParmFacadeInterface.java +++ b/SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb/jparmfacade/jParmFacadeInterface.java @@ -19,13 +19,13 @@ //# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //# -package nl.astron.lofar.java.cep.jparmfacade; +package nl.astron.lofar.sas.otb.jparmfacade; import java.rmi.Remote; import java.rmi.RemoteException; +import java.util.ArrayList; import java.util.HashMap; -import java.util.Vector; public interface jParmFacadeInterface extends Remote { @@ -38,23 +38,23 @@ public interface jParmFacadeInterface extends Remote // parameters in the table. // This is the minimum start value and maximum end value for all parameters. // An empty name pattern is the same as * (all parm names). - public Vector<Double> getRange(String parmNamePattern) throws RemoteException; + public ArrayList<Double> getRange(String parmNamePattern) throws RemoteException; // Get parameter names in the table matching the pattern. // An empty name pattern is the same as * (all parm names). - public Vector<String> getNames(String parmNamePattern) throws RemoteException; + public ArrayList<String> getNames(String parmNamePattern) throws RemoteException; // Get the parameter values for the given parameters and domain. // The domain is given by the start and end values, while the grid is // given by nx and ny. - public HashMap<String,Vector<Double>> getValues(String parmNamePattern, + public HashMap<String,ArrayList<Double>> getValues(String parmNamePattern, double startx, double endx, int nx, double starty, double endy, int ny) throws RemoteException; // Get the parameter values for the given parameters and timeframe. // The domain is given by the start and end values, while the time is // given by startSolveTime and endSolveTime. - public HashMap<String,Vector<Double>> getHistory(String parmNamePattern, + public HashMap<String,ArrayList<Double>> getHistory(String parmNamePattern, double startx, double endx, double starty, double endy, double startSolveTime, double endSolveTime) throws RemoteException; } diff --git a/JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/jParmFacadeServer.java b/SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb/jparmfacade/jParmFacadeServer.java similarity index 98% rename from JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/jParmFacadeServer.java rename to SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb/jparmfacade/jParmFacadeServer.java index ffb1355d642..9c8264d3320 100644 --- a/JAVA/CEP/jParmFacade/src/nl/astron/lofar/java/cep/jparmfacade/jParmFacadeServer.java +++ b/SAS/OTB/jParmFacade/src/nl/astron/lofar/sas/otb/jparmfacade/jParmFacadeServer.java @@ -19,7 +19,7 @@ //# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //# -package nl.astron.lofar.java.cep.jparmfacade; +package nl.astron.lofar.sas.otb.jparmfacade; import java.rmi.registry.*; import java.rmi.server.RMISocketFactory; import nl.astron.lofar.sas.otb.jotdb3.jInitCPPLogger; @@ -61,7 +61,7 @@ public class jParmFacadeServer { } - String aHostName = new String(args[0]); + String aHostName = args[0]; logger.info("Running on: "+aHostName); System.setProperty("java.rmi.server.hostname", aHostName); diff --git a/JAVA/CEP/jParmFacade/src/nl_astron_lofar_java_cep_jparmfacade_jParmFacade.cc b/SAS/OTB/jParmFacade/src/nl_astron_lofar_otb_jparmfacade_jParmFacade.cc similarity index 78% rename from JAVA/CEP/jParmFacade/src/nl_astron_lofar_java_cep_jparmfacade_jParmFacade.cc rename to SAS/OTB/jParmFacade/src/nl_astron_lofar_otb_jparmfacade_jParmFacade.cc index 37e6946a402..dbafddcd7a0 100644 --- a/JAVA/CEP/jParmFacade/src/nl_astron_lofar_java_cep_jparmfacade_jParmFacade.cc +++ b/SAS/OTB/jParmFacade/src/nl_astron_lofar_otb_jparmfacade_jParmFacade.cc @@ -1,309 +1,308 @@ -//# nl_astron_lofar_java_cep_jparmfacade_jParmFacade.cc: Manages the -//# connection with the parameter database. -//# -//# Copyright (C) 2005-2007 -//# ASTRON (Netherlands Foundation for Research in Astronomy) -//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl -//# -//# This program is free software; you can redistribute it and/or modify -//# it under the terms of the GNU General Public License as published by -//# the Free Software Foundation; either version 2 of the License, or -//# (at your option) any later version. -//# -//# This program is distributed in the hope that it will be useful, -//# but WITHOUT ANY WARRANTY; without even the implied warranty of -//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -//# GNU General Public License for more details. -//# -//# You should have received a copy of the GNU General Public License -//# along with this program; if not, write to the Free Software -//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -//# - -//# Always #include <lofar_config.h> first! -#include <lofar_config.h> - -#include <jni.h> -#include <jParmFacade/nl_astron_lofar_java_cep_jparmfacade_jParmFacade.h> -#include <jParmFacade/nl_astron_lofar_java_cep_jparmfacade_jCommon.h> -#include <ParmFacade/ParmFacade.h> -#include <iostream> -#include <string> - -using namespace LOFAR::ParmDB; -using namespace std; - -ParmFacade* theirPF; - - -/* - * Class: nl_astron_lofar_java_cep_jparmfacade_jParmFacade - * Method: getRange - * Signature: (Ljava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_java_cep_jparmfacade_jParmFacade_getRange (JNIEnv *env, jobject obj, jstring parmNamePattern) { - - jboolean isCopy; - jobject rangeVector; - - // create the connection with the ParmDB - setParmDBConnection(env,obj); - - const char* pattern = env->GetStringUTFChars (parmNamePattern, &isCopy); - vector<double> rangeList; - try { - rangeList = theirPF->getRange(pattern); - - env->ReleaseStringUTFChars (parmNamePattern, pattern); - - vector<double>::iterator rangeIterator; - - // Construct java Vector - jclass class_Vector = env->FindClass("java/util/Vector"); - jmethodID mid_Vector_cons = env->GetMethodID(class_Vector, "<init>", "()V"); - rangeVector = env->NewObject(class_Vector, mid_Vector_cons); - jmethodID mid_Vector_add = env->GetMethodID(class_Vector, "add", "(Ljava/lang/Object;)Z"); - - // Double - jobject jDouble; - jclass class_Double = env->FindClass ("java/lang/Double"); - jmethodID mid_Double_cons = env->GetMethodID (class_Double, "<init>", "(D)V"); - - for (rangeIterator = rangeList.begin(); rangeIterator != rangeList.end(); rangeIterator++) { - jDouble = env->NewObject (class_Double, mid_Double_cons, *rangeIterator); - - env->CallObjectMethod(rangeVector, mid_Vector_add, jDouble); - } - } catch (exception &ex) { - string aStr= (string)ex.what(); - cout << "Exception during getRange("<< pattern << "): "<< ex.what() << endl; - env->ThrowNew(env->FindClass("java/lang/Exception"),aStr.c_str()); - } - - - return rangeVector; -} - - -/* - * Class: nl_astron_lofar_java_cep_jParmFacade_jparmfacade - * Method: getNames - * Signature: (Ljava/lang/String;)Ljava/util/Vector; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_java_cep_jparmfacade_jParmFacade_getNames (JNIEnv *env, jobject obj, jstring parmNamePattern) { - - jboolean isCopy; - jobject nameVector; - - // create the connection with the ParmDB - setParmDBConnection(env,obj); - - const char* pattern = env->GetStringUTFChars (parmNamePattern, &isCopy); - vector<string> nameList; - try { - nameList = theirPF->getNames(pattern); - - env->ReleaseStringUTFChars (parmNamePattern, pattern); - - vector<string>::iterator nameIterator; - - // Construct java Vector - jclass class_Vector = env->FindClass("java/util/Vector"); - jmethodID mid_Vector_cons = env->GetMethodID(class_Vector, "<init>", "()V"); - nameVector = env->NewObject(class_Vector, mid_Vector_cons); - jmethodID mid_Vector_add = env->GetMethodID(class_Vector, "add", "(Ljava/lang/Object;)Z"); - - jstring jstr; - for (nameIterator = nameList.begin(); nameIterator != nameList.end(); nameIterator++) { - jstr = env->NewStringUTF (((string)*nameIterator).c_str()); - env->CallObjectMethod(nameVector, mid_Vector_add, jstr); - } - } catch (exception &ex) { - string aStr= (string)ex.what(); - cout << "Exception during getNames("<< pattern << "): "<< ex.what() << endl; - env->ThrowNew(env->FindClass("java/lang/Exception"),aStr.c_str()); - } - - return nameVector; -} - -/* - * Class: nl_astron_lofar_java_cep_jparmfacade_jParmFacade - * Method: getValues - * Signature: (Ljava/lang/String;DDIDDI)Ljava/util/HashMap; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_java_cep_jparmfacade_jParmFacade_getValues (JNIEnv *env, jobject obj, jstring parmNamePattern, jdouble startx, jdouble endx, jint nx, jdouble starty, jdouble endy, jint ny) { - - jboolean isCopy; - jobject result; - - // create the connection with the ParmDB - setParmDBConnection(env,obj); - - - const char* pattern = env->GetStringUTFChars (parmNamePattern, &isCopy); - map<string,vector<double> > valMap; - try { - valMap = theirPF->getValues(pattern,startx,endx,nx,starty,endy,ny); - env->ReleaseStringUTFChars (parmNamePattern, pattern); - - // Construct java Map - jclass mapClass, doubleClass, vectorClass; - jmethodID mapInit, mapPut, vectorAdd, doubleInit, vectorInit; - - mapClass = env->FindClass("java/util/HashMap"); - mapInit = env->GetMethodID(mapClass, "<init>", "()V"); - result = env->NewObject(mapClass, mapInit); - mapPut= env->GetMethodID(mapClass, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"); - - // Construct java Double - jobject jDouble; - doubleClass = env->FindClass ("java/lang/Double"); - doubleInit = env->GetMethodID (doubleClass, "<init>", "(D)V"); - - - // Loop through map and convert to HashMap - - for (map<string,vector<double> >::const_iterator valIter=valMap.begin(); - valIter != valMap.end(); - valIter++) { - - // Construct java Vector - jobject valVector; - vectorClass = env->FindClass("java/util/Vector"); - vectorInit = env->GetMethodID(vectorClass, "<init>", "()V"); - valVector = env->NewObject(vectorClass, vectorInit); - vectorAdd = env->GetMethodID(vectorClass, "add", "(Ljava/lang/Object;)Z"); - - - for (vector<double>::const_iterator iter=valIter->second.begin(); - iter != valIter->second.end(); - iter++) { - - jDouble = env->NewObject (doubleClass, doubleInit, *iter); - - env->CallObjectMethod(valVector, vectorAdd, jDouble); - } - - - env->CallObjectMethod(result, mapPut, env->NewStringUTF(valIter->first.c_str()),valVector); - - } - } catch (exception &ex) { - cout << "Exception during getValues("<< pattern << "," << startx << "," - << endx << "," << nx << "," << starty << "," << endy << "," << ny - << ") : "<< ex.what() << endl; - string aStr= (string)ex.what(); - jclass newExcCls = env->FindClass("java/lang/Exception"); - if (newExcCls == 0) { - cout << "Unable to find the new exception class, give up." << endl; - // env->ReleaseStringUTFChars (parmNamePattern, pattern); - return result; - } - - env->ThrowNew(newExcCls,aStr.c_str()); - } - - return result; -} - -/* - * Class: nl_astron_lofar_java_cep_jparmfacade_jParmFacade - * Method: getHistory - * Signature: (Ljava/lang/String;DDIDDI)Ljava/util/HashMap; - */ -JNIEXPORT jobject JNICALL Java_nl_astron_lofar_java_cep_jparmfacade_jParmFacade_getHistory (JNIEnv *env, jobject obj, jstring parmNamePattern, jdouble startx, jdouble endx, jdouble starty, jdouble endy, jdouble startSolveTime, jdouble endSolveTime) { - - jboolean isCopy; - jobject result; - - // create the connection with the ParmDB - setParmDBConnection(env,obj); - - - const char* pattern = env->GetStringUTFChars (parmNamePattern, &isCopy); - map<string,vector<double> > valMap; - try { - valMap = theirPF->getHistory(pattern,startx,endx,starty,endy,startSolveTime,endSolveTime); - env->ReleaseStringUTFChars (parmNamePattern, pattern); - - // Construct java Map - jclass mapClass, doubleClass, vectorClass; - jmethodID mapInit, mapPut, vectorAdd, doubleInit, vectorInit; - - mapClass = env->FindClass("java/util/HashMap"); - mapInit = env->GetMethodID(mapClass, "<init>", "()V"); - result = env->NewObject(mapClass, mapInit); - mapPut= env->GetMethodID(mapClass, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"); - - // Construct java Double - jobject jDouble; - doubleClass = env->FindClass ("java/lang/Double"); - doubleInit = env->GetMethodID (doubleClass, "<init>", "(D)V"); - - - // Loop through map and convert to HashMap - - for (map<string,vector<double> >::const_iterator valIter=valMap.begin(); - valIter != valMap.end(); - valIter++) { - - // Construct java Vector - jobject valVector; - vectorClass = env->FindClass("java/util/Vector"); - vectorInit = env->GetMethodID(vectorClass, "<init>", "()V"); - valVector = env->NewObject(vectorClass, vectorInit); - vectorAdd = env->GetMethodID(vectorClass, "add", "(Ljava/lang/Object;)Z"); - - - for (vector<double>::const_iterator iter=valIter->second.begin(); - iter != valIter->second.end(); - iter++) { - - jDouble = env->NewObject (doubleClass, doubleInit, *iter); - - env->CallObjectMethod(valVector, vectorAdd, jDouble); - } - - - env->CallObjectMethod(result, mapPut, env->NewStringUTF(valIter->first.c_str()),valVector); - - } - } catch (exception &ex) { - cout << "Exception during getHistory("<< pattern << "," << startx << "," - << endx << "," << starty << "," << endy << "," << startSolveTime << "," - << endSolveTime << ") : "<< ex.what() << endl; - string aStr= (string)ex.what(); - jclass newExcCls = env->FindClass("java/lang/Exception"); - if (newExcCls == 0) { - cout << "Unable to find the new exception class, give up." << endl; - // env->ReleaseStringUTFChars (parmNamePattern, pattern); - return result; - } - - env->ThrowNew(newExcCls,aStr.c_str()); - } - - return result; -} - - -void setParmDBConnection(JNIEnv *env, jobject callerObject) { - - // get the callerclass - jclass jPF=env->GetObjectClass(callerObject); - - // get the methodID - jfieldID id_PFID = env->GetFieldID (jPF, "itsParmFacadeDB","Ljava/lang/String;"); - - // get the value - jstring nstr = (jstring)env->GetObjectField (callerObject, id_PFID); - - const char* n = env->GetStringUTFChars (nstr, 0); - const string name (n); - // create the connection with the c++ ParmFacade - cout << "Connect to :" << name << endl; - theirPF=new ParmFacade(name); - env->ReleaseStringUTFChars (nstr, n); -} - +//# nl_astron_lofar_java_cep_jparmfacade_jParmFacade.cc: Manages the +//# connection with the parameter database. +//# +//# Copyright (C) 2005-2007 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# + +//# Always #include <lofar_config.h> first! +#include <lofar_config.h> + +#include <jni.h> +#include <jParmFacade/nl_astron_lofar_java_cep_jparmfacade_jParmFacade.h> +#include <jParmFacade/nl_astron_lofar_java_cep_jparmfacade_jCommon.h> +#include <ParmFacade/ParmFacade.h> +#include <iostream> +#include <string> + +using namespace LOFAR::ParmDB; +using namespace std; + +ParmFacade* theirPF; + + +/* + * Class: nl_astron_lofar_java_cep_jparmfacade_jParmFacade + * Method: getRange + * Signature: (Ljava/lang/String;)Ljava/util/ArrayList; + */ +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_java_cep_jparmfacade_jParmFacade_getRange (JNIEnv *env, jobject obj, jstring parmNamePattern) { + + jboolean isCopy; + jobject rangeArrayList; + + // create the connection with the ParmDB + setParmDBConnection(env,obj); + + const char* pattern = env->GetStringUTFChars (parmNamePattern, &isCopy); + vector<double> rangeList; + try { + rangeList = theirPF->getRange(pattern); + + env->ReleaseStringUTFChars (parmNamePattern, pattern); + + vector<double>::iterator rangeIterator; + + // Construct java Vector + jclass class_ArrayList = env->FindClass("java/util/ArrayList"); + jmethodID mid_ArrayList_cons = env->GetMethodID(class_ArrayList, "<init>", "()V"); + rangeArrayList = env->NewObject(class_ArrayList, mid_ArrayList_cons); + jmethodID mid_ArrayList_add = env->GetMethodID(class_ArrayList, "add", "(Ljava/lang/Object;)Z"); + + // Double + jobject jDouble; + jclass class_Double = env->FindClass ("java/lang/Double"); + jmethodID mid_Double_cons = env->GetMethodID (class_Double, "<init>", "(D)V"); + + for (rangeIterator = rangeList.begin(); rangeIterator != rangeList.end(); rangeIterator++) { + jDouble = env->NewObject (class_Double, mid_Double_cons, *rangeIterator); + + env->CallObjectMethod(rangeArrayList, mid_ArrayList_add, jDouble); + } + } catch (exception &ex) { + string aStr= (string)ex.what(); + cout << "Exception during getRange("<< pattern << "): "<< ex.what() << endl; + env->ThrowNew(env->FindClass("java/lang/Exception"),aStr.c_str()); + } + + + return rangeArrayList; +} + + +/* + * Class: nl_astron_lofar_java_cep_jParmFacade_jparmfacade + * Method: getNames + * Signature: (Ljava/lang/String;)Ljava/util/ArrayList; + */ +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_java_cep_jparmfacade_jParmFacade_getNames (JNIEnv *env, jobject obj, jstring parmNamePattern) { + + jboolean isCopy; + jobject nameArrayList; + + // create the connection with the ParmDB + setParmDBConnection(env,obj); + + const char* pattern = env->GetStringUTFChars (parmNamePattern, &isCopy); + vector<string> nameList; + try { + nameList = theirPF->getNames(pattern); + + env->ReleaseStringUTFChars (parmNamePattern, pattern); + + vector<string>::iterator nameIterator; + + // Construct java ArrayList + jclass class_ArrayList = env->FindClass("java/util/ArrayList"); + jmethodID mid_ArrayList_cons = env->GetMethodID(class_ArrayList, "<init>", "()V"); + nameArrayList = env->NewObject(class_ArrayList, mid_ArrayList_cons); + jmethodID mid_ArrayList_add = env->GetMethodID(class_ArrayList, "add", "(Ljava/lang/Object;)Z"); + + jstring jstr; + for (nameIterator = nameList.begin(); nameIterator != nameList.end(); nameIterator++) { + jstr = env->NewStringUTF (((string)*nameIterator).c_str()); + env->CallObjectMethod(nameArrayList, mid_ArrayList_add, jstr); + } + } catch (exception &ex) { + string aStr= (string)ex.what(); + cout << "Exception during getNames("<< pattern << "): "<< ex.what() << endl; + env->ThrowNew(env->FindClass("java/lang/Exception"),aStr.c_str()); + } + + return nameArrayList; +} + +/* + * Class: nl_astron_lofar_java_cep_jparmfacade_jParmFacade + * Method: getValues + * Signature: (Ljava/lang/String;DDIDDI)Ljava/util/HashMap; + */ +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_java_cep_jparmfacade_jParmFacade_getValues (JNIEnv *env, jobject obj, jstring parmNamePattern, jdouble startx, jdouble endx, jint nx, jdouble starty, jdouble endy, jint ny) { + + jboolean isCopy; + jobject result; + + // create the connection with the ParmDB + setParmDBConnection(env,obj); + + + const char* pattern = env->GetStringUTFChars (parmNamePattern, &isCopy); + map<string,vector<double> > valMap; + try { + valMap = theirPF->getValues(pattern,startx,endx,nx,starty,endy,ny); + env->ReleaseStringUTFChars (parmNamePattern, pattern); + + // Construct java Map + jclass mapClass, doubleClass, ArrayListClass; + jmethodID mapInit, mapPut, ArrayListAdd, doubleInit, ArrayListInit; + + mapClass = env->FindClass("java/util/HashMap"); + mapInit = env->GetMethodID(mapClass, "<init>", "()V"); + result = env->NewObject(mapClass, mapInit); + mapPut= env->GetMethodID(mapClass, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"); + + // Construct java Double + jobject jDouble; + doubleClass = env->FindClass ("java/lang/Double"); + doubleInit = env->GetMethodID (doubleClass, "<init>", "(D)V"); + + + // Loop through map and convert to HashMap + + for (map<string,vector<double> >::const_iterator valIter=valMap.begin(); + valIter != valMap.end(); + valIter++) { + + // Construct java ArrayList + jobject valArrayList; + ArrayListClass = env->FindClass("java/util/ArrayList"); + ArrayListInit = env->GetMethodID(ArrayListClass, "<init>", "()V"); + valArrayList = env->NewObject(ArrayListClass, ArrayListInit); + ArrayListAdd = env->GetMethodID(ArrayListClass, "add", "(Ljava/lang/Object;)Z"); + + + for (vector<double>::const_iterator iter=valIter->second.begin(); + iter != valIter->second.end(); + iter++) { + + jDouble = env->NewObject (doubleClass, doubleInit, *iter); + + env->CallObjectMethod(valArrayList, ArrayListAdd, jDouble); + } + + + env->CallObjectMethod(result, mapPut, env->NewStringUTF(valIter->first.c_str()),valArrayList); + + } + } catch (exception &ex) { + cout << "Exception during getValues("<< pattern << "," << startx << "," + << endx << "," << nx << "," << starty << "," << endy << "," << ny + << ") : "<< ex.what() << endl; + string aStr= (string)ex.what(); + jclass newExcCls = env->FindClass("java/lang/Exception"); + if (newExcCls == 0) { + cout << "Unable to find the new exception class, give up." << endl; + // env->ReleaseStringUTFChars (parmNamePattern, pattern); + return result; + } + + env->ThrowNew(newExcCls,aStr.c_str()); + } + + return result; +} + +/* + * Class: nl_astron_lofar_java_cep_jparmfacade_jParmFacade + * Method: getHistory + * Signature: (Ljava/lang/String;DDIDDI)Ljava/util/HashMap; + */ +JNIEXPORT jobject JNICALL Java_nl_astron_lofar_java_cep_jparmfacade_jParmFacade_getHistory (JNIEnv *env, jobject obj, jstring parmNamePattern, jdouble startx, jdouble endx, jdouble starty, jdouble endy, jdouble startSolveTime, jdouble endSolveTime) { + + jboolean isCopy; + jobject result; + + // create the connection with the ParmDB + setParmDBConnection(env,obj); + + + const char* pattern = env->GetStringUTFChars (parmNamePattern, &isCopy); + map<string,vector<double> > valMap; + try { + valMap = theirPF->getHistory(pattern,startx,endx,starty,endy,startSolveTime,endSolveTime); + env->ReleaseStringUTFChars (parmNamePattern, pattern); + + // Construct java Map + jclass mapClass, doubleClass, ArrayListClass; + jmethodID mapInit, mapPut, ArrayListAdd, doubleInit, ArrayListInit; + + mapClass = env->FindClass("java/util/HashMap"); + mapInit = env->GetMethodID(mapClass, "<init>", "()V"); + result = env->NewObject(mapClass, mapInit); + mapPut= env->GetMethodID(mapClass, "put", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"); + + // Construct java Double + jobject jDouble; + doubleClass = env->FindClass ("java/lang/Double"); + doubleInit = env->GetMethodID (doubleClass, "<init>", "(D)V"); + + + // Loop through map and convert to HashMap + + for (map<string,vector<double> >::const_iterator valIter=valMap.begin(); + valIter != valMap.end(); + valIter++) { + + // Construct java ArrayList + jobject valArrayList + ArrayListClass = env->FindClass("java/util/ArrayList"); + ArrayListInit = env->GetMethodID(ArrayListClass, "<init>", "()V"); + valArrayList = env->NewObject(ArrayListClass, ArrayListInit); + ArrayListAdd = env->GetMethodID(ArrayListClass, "add", "(Ljava/lang/Object;)Z"); + + + for (vector<double>::const_iterator iter=valIter->second.begin(); + iter != valIter->second.end(); + iter++) { + + jDouble = env->NewObject (doubleClass, doubleInit, *iter); + + env->CallObjectMethod(valArrayList, ArrayListAdd, jDouble); + } + + + env->CallObjectMethod(result, mapPut, env->NewStringUTF(valIter->first.c_str()),valArrayList); + + } + } catch (exception &ex) { + cout << "Exception during getHistory("<< pattern << "," << startx << "," + << endx << "," << starty << "," << endy << "," << startSolveTime << "," + << endSolveTime << ") : "<< ex.what() << endl; + string aStr= (string)ex.what(); + jclass newExcCls = env->FindClass("java/lang/Exception"); + if (newExcCls == 0) { + cout << "Unable to find the new exception class, give up." << endl; + // env->ReleaseStringUTFChars (parmNamePattern, pattern); + return result; + } + + env->ThrowNew(newExcCls,aStr.c_str()); + } + + return result; +} + + +void setParmDBConnection(JNIEnv *env, jobject callerObject) { + + // get the callerclass + jclass jPF=env->GetObjectClass(callerObject); + + // get the methodID + jfieldID id_PFID = env->GetFieldID (jPF, "itsParmFacadeDB","Ljava/lang/String;"); + + // get the value + jstring nstr = (jstring)env->GetObjectField (callerObject, id_PFID); + + const char* n = env->GetStringUTFChars (nstr, 0); + const string name (n); + // create the connection with the c++ ParmFacade + cout << "Connect to :" << name << endl; + theirPF=new ParmFacade(name); + env->ReleaseStringUTFChars (nstr, n); +} diff --git a/JAVA/CEP/jParmFacade/test/tParmFacade.java b/SAS/OTB/jParmFacade/test/nl/astron/lofar/sas/otb/jparmfacade/test/tParmFacade.java similarity index 86% rename from JAVA/CEP/jParmFacade/test/tParmFacade.java rename to SAS/OTB/jParmFacade/test/nl/astron/lofar/sas/otb/jparmfacade/test/tParmFacade.java index a072ae3d941..bdadb58f463 100644 --- a/JAVA/CEP/jParmFacade/test/tParmFacade.java +++ b/SAS/OTB/jParmFacade/test/nl/astron/lofar/sas/otb/jparmfacade/test/tParmFacade.java @@ -1,3 +1,4 @@ +package nl.astron.lofar.sas.otb.jparmfacade.test; /* * tParmFacade.java: test program for class jParmFacade * @@ -23,11 +24,11 @@ * */ +import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; -import java.util.Vector; -import nl.astron.lofar.java.cep.jparmfacade.jParmFacade; +import nl.astron.lofar.sas.otb.jparmfacade.jParmFacade; /** * * @author coolen @@ -67,13 +68,13 @@ public class tParmFacade { return; } - Vector<String> names = aPF.getNames(""); + ArrayList<String> names = aPF.getNames(""); System.out.println("Names: " + names); - Vector<Double> range = aPF.getRange(""); + ArrayList<Double> range = aPF.getRange(""); System.out.println("Range: " + range); - HashMap<String,Vector<Double> > values = aPF.getValues ("*", - range.elementAt(0), range.elementAt(1), 4, - range.elementAt(2), range.elementAt(3), 2); + HashMap<String,ArrayList<Double> > values = aPF.getValues ("*", + range.get(0), range.get(1), 4, + range.get(2), range.get(3), 2); Iterator it = values.keySet().iterator(); diff --git a/JAVA/CEP/jParmFacade/test/tRemoteParmFacade.java b/SAS/OTB/jParmFacade/test/nl/astron/lofar/sas/otb/jparmfacade/test/tRemoteParmFacade.java similarity index 88% rename from JAVA/CEP/jParmFacade/test/tRemoteParmFacade.java rename to SAS/OTB/jParmFacade/test/nl/astron/lofar/sas/otb/jparmfacade/test/tRemoteParmFacade.java index 0f255998dd3..081c036569f 100644 --- a/JAVA/CEP/jParmFacade/test/tRemoteParmFacade.java +++ b/SAS/OTB/jParmFacade/test/nl/astron/lofar/sas/otb/jparmfacade/test/tRemoteParmFacade.java @@ -1,3 +1,4 @@ +package nl.astron.lofar.sas.otb.jparmfacade.test; /* * tRemoteParmFacade.java: test program for class jParmFacade via RMI * @@ -24,10 +25,11 @@ */ import java.rmi.Naming; +import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; -import java.util.Vector; -import nl.astron.lofar.java.cep.jparmfacade.jParmFacadeInterface; + +import nl.astron.lofar.sas.otb.jparmfacade.jParmFacadeInterface; /** * @@ -71,19 +73,19 @@ public class tRemoteParmFacade { System.out.println(parmTable); System.out.println("Getting names: "); - Vector<String> names = aPF.getNames(""); + ArrayList<String> names = aPF.getNames(""); System.out.println("Found " + names); System.out.println("Getting Range: "); - Vector<Double> range = aPF.getRange(""); + ArrayList<Double> range = aPF.getRange(""); System.out.println("Found " + range); System.out.println("Getting Values: "); - HashMap<String,Vector<Double> > values = aPF.getValues ("*", - range.elementAt(0), range.elementAt(1), 4, - range.elementAt(2), range.elementAt(3), 2); + HashMap<String,ArrayList<Double> > values = aPF.getValues ("*", + range.get(0), range.get(1), 4, + range.get(2), range.get(3), 2); Iterator it = values.keySet().iterator(); System.out.println("Found: "); diff --git a/JAVA/MAC/jRSP/.cvsignore b/SAS/OTB/jRSP/.cvsignore similarity index 100% rename from JAVA/MAC/jRSP/.cvsignore rename to SAS/OTB/jRSP/.cvsignore diff --git a/JAVA/MAC/jRSP/include/Makefile.am b/SAS/OTB/jRSP/include/Makefile.am similarity index 100% rename from JAVA/MAC/jRSP/include/Makefile.am rename to SAS/OTB/jRSP/include/Makefile.am diff --git a/JAVA/MAC/jRSP/include/jRSP/Makefile.am b/SAS/OTB/jRSP/include/jRSP/Makefile.am similarity index 100% rename from JAVA/MAC/jRSP/include/jRSP/Makefile.am rename to SAS/OTB/jRSP/include/jRSP/Makefile.am diff --git a/SAS/OTB/jRSP/include/jRSP/nl_astron_lofar_sas_otb_jrsp_Board.h b/SAS/OTB/jRSP/include/jRSP/nl_astron_lofar_sas_otb_jrsp_Board.h new file mode 100644 index 00000000000..d801124a21b --- /dev/null +++ b/SAS/OTB/jRSP/include/jRSP/nl_astron_lofar_sas_otb_jrsp_Board.h @@ -0,0 +1,125 @@ +/* DO NOT EDIT THIS FILE - it is machine generated */ +#include <jni.h> +/* Header for class nl_astron_lofar_sas_otb_jrsp_Board */ + +#ifndef _Included_nl_astron_lofar_sas_otb_jrsp_Board +#define _Included_nl_astron_lofar_sas_otb_jrsp_Board +#ifdef __cplusplus +extern "C" { +#endif +/* + * Class: nl_astron_lofar_sas_otb_jrsp_Board + * Method: init + * Signature: (Ljava/lang/String;)I + */ +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jrsp_Board_init + (JNIEnv *, jobject, jstring); + +/* + * Class: nl_astron_lofar_sas_otb_jrsp_Board + * Method: delete + * Signature: (I)V + */ +JNIEXPORT void JNICALL Java_nl_astron_lofar_sas_otb_jrsp_Board_delete + (JNIEnv *, jobject, jint); + +/* + * Class: nl_astron_lofar_sas_otb_jrsp_Board + * Method: retrieveStatus + * Signature: (II)[Lnl/astron/lofar/sas/otb/jrsp/BoardStatus; + */ +JNIEXPORT jobjectArray JNICALL Java_nl_astron_lofar_sas_otb_jrsp_Board_retrieveStatus + (JNIEnv *, jobject, jint, jint); + +/* + * Class: nl_astron_lofar_sas_otb_jrsp_Board + * Method: setWaveformSettings + * Signature: (IIDSII)Z + */ +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jrsp_Board_setWaveformSettings + (JNIEnv *, jobject, jint, jint, jdouble, jshort, jint, jint); + +/* + * Class: nl_astron_lofar_sas_otb_jrsp_Board + * Method: getSubbandStats + * Signature: (II)[D + */ +JNIEXPORT jdoubleArray JNICALL Java_nl_astron_lofar_sas_otb_jrsp_Board_getSubbandStats + (JNIEnv *, jobject, jint, jint); + +/* + * Class: nl_astron_lofar_sas_otb_jrsp_Board + * Method: getWaveformSettings + * Signature: (II)[Lnl/astron/lofar/sas/otb/jrsp/WGRegisterType; + */ +JNIEXPORT jobjectArray JNICALL Java_nl_astron_lofar_sas_otb_jrsp_Board_getWaveformSettings + (JNIEnv *, jobject, jint, jint); + +/* + * Class: nl_astron_lofar_sas_otb_jrsp_Board + * Method: getNrRCUs + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jrsp_Board_getNrRCUs + (JNIEnv *, jobject, jint); + +/* + * Class: nl_astron_lofar_sas_otb_jrsp_Board + * Method: getNrRSPBoards + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jrsp_Board_getNrRSPBoards + (JNIEnv *, jobject, jint); + +/* + * Class: nl_astron_lofar_sas_otb_jrsp_Board + * Method: getMaxRSPBoards + * Signature: (I)I + */ +JNIEXPORT jint JNICALL Java_nl_astron_lofar_sas_otb_jrsp_Board_getMaxRSPBoards + (JNIEnv *, jobject, jint); + +/* + * Class: nl_astron_lofar_sas_otb_jrsp_Board + * Method: setFilter + * Signature: (III)Z + */ +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jrsp_Board_setFilter + (JNIEnv *, jobject, jint, jint, jint); + +/* + * Class: nl_astron_lofar_sas_otb_jrsp_Board + * Method: sendClear + * Signature: (II)Z + */ +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jrsp_Board_sendClear + (JNIEnv *, jobject, jint, jint); + +/* + * Class: nl_astron_lofar_sas_otb_jrsp_Board + * Method: sendReset + * Signature: (II)Z + */ +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jrsp_Board_sendReset + (JNIEnv *, jobject, jint, jint); + +/* + * Class: nl_astron_lofar_sas_otb_jrsp_Board + * Method: sendSync + * Signature: (II)Z + */ +JNIEXPORT jboolean JNICALL Java_nl_astron_lofar_sas_otb_jrsp_Board_sendSync + (JNIEnv *, jobject, jint, jint); + +/* + * Class: nl_astron_lofar_sas_otb_jrsp_Board + * Method: getBeamletStats + * Signature: (II)[D + */ +JNIEXPORT jdoubleArray JNICALL Java_nl_astron_lofar_sas_otb_jrsp_Board_getBeamletStats + (JNIEnv *, jobject, jint, jint); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/SAS/OTB/jRSP/pom.xml b/SAS/OTB/jRSP/pom.xml new file mode 100644 index 00000000000..56f087cd3a7 --- /dev/null +++ b/SAS/OTB/jRSP/pom.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <name>Lofar OTB :: jRSP</name> + + <parent> + <groupId>nl.astron.lofar.sas.otb</groupId> + <artifactId>otb-parent</artifactId> + <version>1.8.2-SNAPSHOT</version> + </parent> + + <artifactId>jRSP</artifactId> + + <!-- Specification for the SCM used by the project, such as CVS, Subversion, etc. --> + <scm> + <connection>scm:svn:https://svn.astron.nl/LOFAR/trunk/SAS/OTB/jRSP</connection> + <developerConnection>scm:svn:https://svn.astron.nl/LOFAR/trunk/SAS/OTB/jRSP</developerConnection> + </scm> + + + <!-- Information required to build a project. --> + <build> + + <sourceDirectory>src</sourceDirectory> + + <resources> + <resource> + <directory>src</directory> + <excludes> + <exclude>**/*.java</exclude> + <exclude>**/*.cc</exclude> + </excludes> + </resource> + </resources> + + <plugins> + + <!-- Generate HEADER files from JNI Java classes --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>native-maven-plugin</artifactId> + + <configuration> + <javahClassNames> + <javahClassName>nl.astron.lofar.sas.otb.jrsp.Board</javahClassName> + </javahClassNames> + </configuration> + + <executions> + <execution> + <phase>process-classes</phase> + <goals> + <goal>javah</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + + </build> + + <dependencies> + + <dependency> + <groupId>log4j</groupId> + <artifactId>log4j</artifactId> + </dependency> + + </dependencies> + +</project> diff --git a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/ADOStatus.java b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/ADOStatus.java similarity index 96% rename from JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/ADOStatus.java rename to SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/ADOStatus.java index 1c32bf62f5c..7b6443e411b 100644 --- a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/ADOStatus.java +++ b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/ADOStatus.java @@ -22,7 +22,7 @@ * $Id$ */ -package nl.astron.lofar.java.mac.jrsp; +package nl.astron.lofar.sas.otb.jrsp; /** * This class is used by BoardStatus to store data about the ADO status. diff --git a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/Board.java b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/Board.java similarity index 99% rename from JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/Board.java rename to SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/Board.java index 590e289a8bf..146b0b5106b 100644 --- a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/Board.java +++ b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/Board.java @@ -22,7 +22,7 @@ * $Id$ */ -package nl.astron.lofar.java.mac.jrsp; +package nl.astron.lofar.sas.otb.jrsp; import org.apache.log4j.Logger; diff --git a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/BoardStatus.java b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/BoardStatus.java similarity index 99% rename from JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/BoardStatus.java rename to SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/BoardStatus.java index 39584e72968..b1def5cf512 100644 --- a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/BoardStatus.java +++ b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/BoardStatus.java @@ -22,7 +22,7 @@ * $Id$ */ -package nl.astron.lofar.java.mac.jrsp; +package nl.astron.lofar.sas.otb.jrsp; /** * This class keeps hold of the Board Status information. All member variables are public so there is no diff --git a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/IMask.java b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/IMask.java similarity index 98% rename from JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/IMask.java rename to SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/IMask.java index 9d0ab813b36..c756d05947e 100644 --- a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/IMask.java +++ b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/IMask.java @@ -22,7 +22,7 @@ * $Id$ */ -package nl.astron.lofar.java.mac.jrsp; +package nl.astron.lofar.sas.otb.jrsp; /** * The IMask interface has to be implemented by Mask classes. These classes are diff --git a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/RCUMask.java b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/RCUMask.java similarity index 98% rename from JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/RCUMask.java rename to SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/RCUMask.java index 0e6d798d5ef..832952f0588 100644 --- a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/RCUMask.java +++ b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/RCUMask.java @@ -22,7 +22,7 @@ * $Id$ */ -package nl.astron.lofar.java.mac.jrsp; +package nl.astron.lofar.sas.otb.jrsp; import java.util.BitSet; diff --git a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/RCUStatus.java b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/RCUStatus.java similarity index 96% rename from JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/RCUStatus.java rename to SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/RCUStatus.java index b509ae00cd0..ba812ed5ccf 100644 --- a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/RCUStatus.java +++ b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/RCUStatus.java @@ -22,7 +22,7 @@ * $Id$ */ -package nl.astron.lofar.java.mac.jrsp; +package nl.astron.lofar.sas.otb.jrsp; /** * This class is used by BoardStatus to store data about the RCU status. diff --git a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/RSPMask.java b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/RSPMask.java similarity index 98% rename from JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/RSPMask.java rename to SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/RSPMask.java index 54a355c083f..c193faba415 100644 --- a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/RSPMask.java +++ b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/RSPMask.java @@ -22,7 +22,7 @@ * $Id$ */ -package nl.astron.lofar.java.mac.jrsp; +package nl.astron.lofar.sas.otb.jrsp; /** * diff --git a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/SyncStatus.java b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/SyncStatus.java similarity index 97% rename from JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/SyncStatus.java rename to SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/SyncStatus.java index d8f0080b42a..bad400251b4 100644 --- a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/SyncStatus.java +++ b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/SyncStatus.java @@ -22,7 +22,7 @@ * $Id$ */ -package nl.astron.lofar.java.mac.jrsp; +package nl.astron.lofar.sas.otb.jrsp; /** * This class is used by BoardStatus to store data about the Sync status. diff --git a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/WGRegisterType.java b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/WGRegisterType.java similarity index 98% rename from JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/WGRegisterType.java rename to SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/WGRegisterType.java index 2b26c6e51ef..56b357c9c5c 100644 --- a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/WGRegisterType.java +++ b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/WGRegisterType.java @@ -22,7 +22,7 @@ * $Id$ */ -package nl.astron.lofar.java.mac.jrsp; +package nl.astron.lofar.sas.otb.jrsp; /** * Waveform Generator Register Type diff --git a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/tools/CodeGenerator.java b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/tools/CodeGenerator.java similarity index 97% rename from JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/tools/CodeGenerator.java rename to SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/tools/CodeGenerator.java index 3f963594581..39c5d489eb8 100644 --- a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/tools/CodeGenerator.java +++ b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/tools/CodeGenerator.java @@ -1,4 +1,4 @@ -package nl.astron.lofar.java.mac.jrsp.tools; +package nl.astron.lofar.sas.otb.jrsp.tools; /** * This class is just a quick and dirty way of making the jni code. diff --git a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/tools/SubbandStatsTest.java b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/tools/SubbandStatsTest.java similarity index 86% rename from JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/tools/SubbandStatsTest.java rename to SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/tools/SubbandStatsTest.java index 00140c14a30..874591006ec 100644 --- a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/tools/SubbandStatsTest.java +++ b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/tools/SubbandStatsTest.java @@ -1,6 +1,6 @@ -package nl.astron.lofar.java.mac.jrsp.tools; +package nl.astron.lofar.sas.otb.jrsp.tools; -import nl.astron.lofar.java.mac.jrsp.Board; +import nl.astron.lofar.sas.otb.jrsp.Board; public class SubbandStatsTest { diff --git a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/tools/TestClass.java b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/tools/TestClass.java similarity index 86% rename from JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/tools/TestClass.java rename to SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/tools/TestClass.java index 101d87d6937..8ccdc29f5d1 100644 --- a/JAVA/MAC/jRSP/src/nl/astron/lofar/java/mac/jrsp/tools/TestClass.java +++ b/SAS/OTB/jRSP/src/nl/astron/lofar/sas/otb/jrsp/tools/TestClass.java @@ -1,7 +1,7 @@ -package nl.astron.lofar.java.mac.jrsp.tools; +package nl.astron.lofar.sas.otb.jrsp.tools; -import nl.astron.lofar.java.mac.jrsp.Board; -import nl.astron.lofar.java.mac.jrsp.RCUMask; +import nl.astron.lofar.sas.otb.jrsp.Board; +import nl.astron.lofar.sas.otb.jrsp.RCUMask; public class TestClass { diff --git a/JAVA/MAC/jRSP/src/nl_astron_lofar_java_mac_jrsp_Board.cc b/SAS/OTB/jRSP/src/nl_astron_lofar_java_mac_jrsp_Board.cc similarity index 100% rename from JAVA/MAC/jRSP/src/nl_astron_lofar_java_mac_jrsp_Board.cc rename to SAS/OTB/jRSP/src/nl_astron_lofar_java_mac_jrsp_Board.cc diff --git a/JAVA/MAC/jRSP/test/Makefile.am b/SAS/OTB/jRSP/test/Makefile.am similarity index 100% rename from JAVA/MAC/jRSP/test/Makefile.am rename to SAS/OTB/jRSP/test/Makefile.am diff --git a/SAS/OTB/pom.xml b/SAS/OTB/pom.xml new file mode 100644 index 00000000000..931bdccf5af --- /dev/null +++ b/SAS/OTB/pom.xml @@ -0,0 +1,190 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + + <modelVersion>4.0.0</modelVersion> + + <name>Lofar OTB :: Parent</name> + <description>Object Tree Browser Client/Server - Parent</description> + + <parent> + <groupId>nl.astron</groupId> + <artifactId>parent</artifactId> + <version>2.0.0</version> + </parent> + + <groupId>nl.astron.lofar.sas.otb</groupId> + <artifactId>otb-parent</artifactId> + <version>1.8.2-SNAPSHOT</version> + <packaging>pom</packaging> + + + <!-- Properties that can be used throughout the POM as a substitution, + and are used as filters in resources if enabled. --> + <properties> + <lofar.lib.version>1.8.1</lofar.lib.version> + </properties> + + + <!-- Specification for the SCM used by the project, such as CVS, Subversion, etc. --> + <scm> + <connection>scm:svn:http://svn.astron.nl/LOFAR/trunk/SAS/OTB</connection> + <developerConnection>scm:svn:https://svn.astron.nl/LOFAR/trunk/SAS/OTB</developerConnection> + </scm> + + + <!-- Information required to build a project. --> + <build> + + <!-- Default plugin information to be made available for reference by + projects derived from this one. This plugin configuration will not be resolved + or bound to the lifecycle unless referenced. Any local configuration for + a given plugin will override the plugin's entire definition here. --> + <pluginManagement> + <plugins> + + <!-- This plugin's configuration is used to store Eclipse m2e settings + only. It has no influence on the Maven build itself. --> + <plugin> + <groupId>org.eclipse.m2e</groupId> + <artifactId>lifecycle-mapping</artifactId> + <version>1.0.0</version> + <configuration> + <lifecycleMappingMetadata> + <pluginExecutions> + <pluginExecution> + <pluginExecutionFilter> + <groupId>org.codehaus.mojo</groupId> + <artifactId>native-maven-plugin</artifactId> + <versionRange>[1.0-alpha-7,)</versionRange> + <goals> + <goal>javah</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore /> + </action> + </pluginExecution> + <pluginExecution> + <pluginExecutionFilter> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <versionRange>[1.0.0,)</versionRange> + <goals> + <goal>copy-dependencies</goal> + <goal>unpack</goal> + </goals> + </pluginExecutionFilter> + <action> + <ignore /> + </action> + </pluginExecution> + </pluginExecutions> + </lifecycleMappingMetadata> + </configuration> + </plugin> + + </plugins> + </pluginManagement> + + </build> + + + <!-- The modules (sometimes called subprojects) to build as a part of this + project. Each module listed is a relative path to the directory containing + the module. --> + <modules> + <module>jRSP</module> + <module>RSP</module> + <module>jOTDB3</module> + <module>jParmFacade</module> + <module>OTB</module> + <module>OTB-distribution</module> + </modules> + + + <!-- Default dependency information for projects that inherit from this + one. The dependencies in this section are not immediately resolved. Instead, + when a POM derived from this one declares a dependency described by a matching + groupId and artifactId, the version and other values from this section are + used for that dependency if they were not already specified. --> + <dependencyManagement> + <dependencies> + + <!-- Child dependencies, childs use the same group-ID and version by default. --> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>jRSP</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>RSP</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>jParmFacade</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>jOTDB3</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>OTB</artifactId> + <version>${project.version}</version> + </dependency> + + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>OTB-distribution</artifactId> + <version>${project.version}</version> + </dependency> + + <!-- Import the group 'nl.astron.lofar.lib' --> + <dependency> + <groupId>nl.astron.lofar.lib</groupId> + <artifactId>lofar-lib-parent</artifactId> + <version>${lofar.lib.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + + <!-- External dependencies --> + <dependency> + <groupId>org.swinglabs</groupId> + <artifactId>swing-layout</artifactId> + <version>1.0.3</version> + </dependency> + + <dependency> + <groupId>org.netbeans.external</groupId> + <artifactId>AbsoluteLayout</artifactId> + <version>RELEASE72</version> + </dependency> + + </dependencies> + </dependencyManagement> + + + <!-- The lists of the remote repositories for discovering dependencies + and extensions. --> + <repositories> + + <!-- Extra maven repository for the Netbeans AbsoluteLayout dependency --> + <repository> + <id>netbeans</id> + <name>NetBeans IDE Repos</name> + <url>http://bits.netbeans.org/maven2</url> + </repository> + + </repositories> + +</project> diff --git a/SAS/OTDB/SPRINT_1.8 b/SAS/OTDB/SPRINT_1.8 new file mode 100644 index 00000000000..680b99357b5 --- /dev/null +++ b/SAS/OTDB/SPRINT_1.8 @@ -0,0 +1,25 @@ +== C++ == +*) TreeValue.getFailedHardware(...) is integrated with TreeValue.getBrokenHardware(...). + getBrokenHardware has 2 arguments now iso 1, both optional. + getFailedHardware is removed. + +*) Software of Ger van Diepen needs this change. + +*) in MAC/Deployment a new PICtree must be generated and loaded into the database and set to active/operational. + This new tree will contain the status fields of the LBA and HBA antenna's also. + + +== SQL == +Remove old getBrokenHardware function from database using psql: +DROP FUNCTION getbrokenhardware(TIMESTAMP); + +Load new function: +\i getBrokenHardware_func.sql + + +== JAVA == +libjOTDB must be build. + + + + diff --git a/SAS/OTDB/include/OTDB/TreeValue.h b/SAS/OTDB/include/OTDB/TreeValue.h index fdddfad4d83..ad59242d723 100644 --- a/SAS/OTDB/include/OTDB/TreeValue.h +++ b/SAS/OTDB/include/OTDB/TreeValue.h @@ -84,10 +84,9 @@ public: bool mostRecentOnly=false); // Query for getting list of broken hardware on a certain time. - vector<OTDBvalue> getBrokenHardware(const ptime& atTime = ptime(max_date_time)); - // Query for getting list of broken hardware within time interval - vector<OTDBvalue> getFailedHardware(const ptime& startTime, - const ptime& endTime=ptime(max_date_time)); + vector<OTDBvalue> getBrokenHardware(const ptime& fromTime = ptime(not_a_date_time), + const ptime& toTime = ptime(not_a_date_time)); + //# SAS queries // For scheduling the VIC tree on the OTDB tree SAS must know what // resources exist in the OTDB tree. This list can be retrieved with diff --git a/SAS/OTDB/sql/getBrokenHardware_func.sql b/SAS/OTDB/sql/getBrokenHardware_func.sql index c15a9cb012d..01708428053 100644 --- a/SAS/OTDB/sql/getBrokenHardware_func.sql +++ b/SAS/OTDB/sql/getBrokenHardware_func.sql @@ -45,24 +45,34 @@ CREATE OR REPLACE FUNCTION nextPICkvt(int,timestamp) LIMIT 1; $$ LANGUAGE SQL; -CREATE OR REPLACE FUNCTION getBrokenHardware(TIMESTAMP) +CREATE OR REPLACE FUNCTION getBrokenHardware(VARCHAR(20), VARCHAR(20)) RETURNS SETOF OTDBvalue AS $$ DECLARE vRecord RECORD; vRecord2 RECORD; vStartTime TIMESTAMP; + vStopTime TIMESTAMP; + vWhere TEXT; BEGIN - IF $1 IS NULL THEN - vStartTime = now(); + IF $1 = '' THEN + vStartTime := now(); ELSE - vStartTime = $1; + vStartTime := $1; END IF; + IF $2 = '' THEN + vStopTime := now(); + vWhere := 'WHERE time < ' || chr(39) || vStartTime || chr(39); + ELSE + vStopTime := $2; + vWhere := 'WHERE time >= ' || chr(39) || vStartTime || chr(39) || ' AND time < ' || chr(39) || vStopTime || chr(39); + END IF; +RAISE WARNING '% - % - %:' , vStartTime, vStopTime, vWhere; FOR vRecord IN - SELECT p.paramid,r.pvssname,p.value,p.time - FROM pktemp p - LEFT JOIN PICparamref r ON r.paramid = p.paramid - WHERE time < vStartTime + EXECUTE ' + SELECT p.paramid,r.pvssname,p.value,p.time + FROM pktemp p + LEFT JOIN PICparamref r ON r.paramid = p.paramid ' || vWhere LOOP FOR vRecord2 IN SELECT p.paramid,r.pvssname,p.value,p.time diff --git a/SAS/OTDB/src/TreeValue.cc b/SAS/OTDB/src/TreeValue.cc index 8ee228128c7..0a88ff474f1 100644 --- a/SAS/OTDB/src/TreeValue.cc +++ b/SAS/OTDB/src/TreeValue.cc @@ -252,7 +252,7 @@ vector<OTDBvalue> TreeValue::getSchedulableItems (nodeIDType TODO_topNode) // // getBrokenHardware([timestamp]) // -vector<OTDBvalue> TreeValue::getBrokenHardware(const ptime& atTime) +vector<OTDBvalue> TreeValue::getBrokenHardware(const ptime& fromTime, const ptime& toTime) { vector<OTDBvalue> resultVec; @@ -262,12 +262,15 @@ vector<OTDBvalue> TreeValue::getBrokenHardware(const ptime& atTime) return (resultVec); } - LOG_TRACE_FLOW_STR("TV:getBrokenHardware(" << to_simple_string(atTime) << ")"); + string startTime((fromTime.is_not_a_date_time()) ? "" : to_simple_string(fromTime)); + string endTime ((toTime.is_not_a_date_time()) ? "" : to_simple_string(toTime)); + + LOG_TRACE_FLOW_STR("TV:getBrokenHardware(" << startTime << "," << endTime << ")"); // construct a query that calls a stored procedure. work xAction(*(itsConn->getConn()), "getBrokenHardware"); try { - string query("SELECT * from getBrokenHardware('" + to_simple_string(atTime) + "')"); + string query("SELECT * from getBrokenHardware('" + startTime + "','" + endTime + "')"); result res = xAction.exec(query); // check result result::size_type nrRecords = res.size(); @@ -278,15 +281,22 @@ vector<OTDBvalue> TreeValue::getBrokenHardware(const ptime& atTime) // list contains single records [A] or double records[B]: // [A] value always > 10 : its still broken // [B] 1st record value <= 10, 2nd record (always same name) always > 10 - // if timestamp 1st record < atTime 'its OK skip this and next line' else is broken skip this line + // if timestamp 1st record < checkTime 'its OK skip this and next line' else is broken skip this line + + // first determine checkTime: + // - broken AT ... : second time is not given --> we must check against the begintime + // - broken in period ... : secondtime is given --> we should use that time for checking + ptime checkTime((toTime.is_not_a_date_time()) ? fromTime : toTime); + + // loop over the records. for (result::size_type i = 0; i < nrRecords; ++i) { OTDBvalue theKVT(res[i]); if (atoi(theKVT.value.c_str()) > 10) { // [A] resultVec.push_back(theKVT); } else { // [B] - if (++i < nrRecords) { - if (theKVT.time > atTime) { + if (++i < nrRecords) { // next record + if (theKVT.time > checkTime) { OTDBvalue nextKVT(res[i]); ASSERTSTR(nextKVT.nodeID() == theKVT.nodeID(), "Expected same paramID: " << nextKVT.nodeID() << "!=" << theKVT.nodeID()); @@ -307,63 +317,5 @@ vector<OTDBvalue> TreeValue::getBrokenHardware(const ptime& atTime) } -// -// getBrokenHardware([timestamp1], [timestamp2]) between startTime and endTime -// -vector<OTDBvalue> TreeValue::getFailedHardware(const ptime& startTime, const ptime& endTime) -{ - vector<OTDBvalue> resultVec; - - // Check connection - if (!itsConn->connect()) { - itsError = itsConn->errorMsg(); - return (resultVec); - } - - LOG_TRACE_FLOW_STR("TV:getFailedHardware(" << to_simple_string(startTime) << ", "<< to_simple_string(endTime) << ")"); - - // construct a query that calls a stored procedure. - work xAction(*(itsConn->getConn()), "getBrokenHardware"); - try { - string query("SELECT * from getFailedHardware('" + to_simple_string(startTime) + "','" + to_simple_string(endTime) + "')"); - result res = xAction.exec(query); - // check result - result::size_type nrRecords = res.size(); - if (!nrRecords) { - return (resultVec); - } - - // list contains single records [A] or double records[B]: - // [A] value always > 10 : its still broken - // [B] 1st record value <= 10, 2nd record (always same name) always > 10 - // if timestamp 1st record < atTime 'its OK skip this and next line' else is broken skip this line - for (result::size_type i = 0; i < nrRecords; ++i) { - OTDBvalue theKVT(res[i]); - if (atoi(theKVT.value.c_str()) > 10) { // [A] - resultVec.push_back(theKVT); - } - else { // [B] - if (++i < nrRecords) { - if (theKVT.time > endTime) { - OTDBvalue nextKVT(res[i]); - ASSERTSTR(nextKVT.nodeID() == theKVT.nodeID(), - "Expected same paramID: " << nextKVT.nodeID() << "!=" << theKVT.nodeID()); - resultVec.push_back(nextKVT); - } - } - } - } // for - } - catch (std::exception& ex) { - itsError = string("Exception during getBrokenHardware:") + ex.what(); - LOG_FATAL(itsError); - vector<OTDBvalue> empty; - return (empty); - } - - return (resultVec); -} - - } // namespace OTDB } // namespace LOFAR diff --git a/SAS/OTDB/test/CMakeLists.txt b/SAS/OTDB/test/CMakeLists.txt index fd76342a4b7..260c0ce9da6 100644 --- a/SAS/OTDB/test/CMakeLists.txt +++ b/SAS/OTDB/test/CMakeLists.txt @@ -5,6 +5,7 @@ include(LofarCTest) lofar_add_test(tCampaign tCampaign.cc) lofar_add_test(tPICtree tPICtree.cc) lofar_add_test(tPICvalue tPICvalue.cc) +lofar_add_executable(tBrokenHardware tBrokenHardware.cc) lofar_add_test(tQueryPIC tQueryPIC.cc) lofar_add_test(tVICcomp tVICcomp.cc) lofar_add_test(tVTtree tVTtree.cc) diff --git a/SAS/OTDB/test/tBrokenHardware.cc b/SAS/OTDB/test/tBrokenHardware.cc new file mode 100644 index 00000000000..a66c1a5adba --- /dev/null +++ b/SAS/OTDB/test/tBrokenHardware.cc @@ -0,0 +1,201 @@ +//# tBrokenHardware: test the actions on the PIC database +//# +//# Copyright (C) 2002-2004 +//# ASTRON (Netherlands Foundation for Research in Astronomy) +//# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands, seg@astron.nl +//# +//# This program is free software; you can redistribute it and/or modify +//# it under the terms of the GNU General Public License as published by +//# the Free Software Foundation; either version 2 of the License, or +//# (at your option) any later version. +//# +//# This program is distributed in the hope that it will be useful, +//# but WITHOUT ANY WARRANTY; without even the implied warranty of +//# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +//# GNU General Public License for more details. +//# +//# You should have received a copy of the GNU General Public License +//# along with this program; if not, write to the Free Software +//# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +//# +//# $Id: tBrokenHardware.cc 19419 2011-12-01 16:36:10Z schoenmakers $ + +//# Always #include <lofar_config.h> first! +#include <lofar_config.h> + +//# Includes +#include <Common/LofarLogger.h> +#include <Common/lofar_fstream.h> +#include <Common/lofar_datetime.h> +#include <Common/ParameterSet.h> +#include <OTDB/TreeMaintenance.h> +#include <OTDB/TreeValue.h> +#include <OTDB/OTDBtypes.h> +#include <OTDB/OTDBnode.h> +#include <OTDB/TreeTypeConv.h> +#include <OTDB/TreeStateConv.h> +#include <OTDB/ClassifConv.h> +#include <libgen.h> // for basename + +using namespace LOFAR; +using namespace LOFAR::OTDB; + + +// +// showTreeList +// +void showTreeList(const vector<OTDBtree>& trees) { + + + cout << "treeID|Classif|Creator |Creationdate |Type|Campaign|Starttime" << endl; + cout << "------+-------+----------+--------------------+----+--------+------------------" << endl; + for (uint32 i = 0; i < trees.size(); ++i) { + string row(formatString("%6d|%7d|%-10.10s|%-20.20s|%4d|%-8.8s|%s", + trees[i].treeID(), + trees[i].classification, + trees[i].creator.c_str(), + to_simple_string(trees[i].creationDate).c_str(), + trees[i].type, + trees[i].campaign.c_str(), + to_simple_string(trees[i].starttime).c_str())); + cout << row << endl; + } + + cout << trees.size() << " records" << endl << endl; +} + +// +// showNodeList +// +void showNodeList(const vector<OTDBnode>& nodes) { + + + cout << "treeID|nodeID|parent|par.ID|name |index|leaf|inst|descr." << endl; + cout << "------+------+------+------+-------------------------+-----+----+----+---------" << endl; + for (uint32 i = 0; i < nodes.size(); ++i) { + string row(formatString("%6d|%6d|%6d|%6d|%-25.25s|%5d|%s|%4d|%s", + nodes[i].treeID(), + nodes[i].nodeID(), + nodes[i].parentID(), + nodes[i].paramDefID(), + nodes[i].name.c_str(), + nodes[i].index, + nodes[i].leaf ? " T " : " F ", + nodes[i].instances, + nodes[i].description.c_str())); + cout << row << endl; + } + + cout << nodes.size() << " records" << endl << endl; +} + +// +// show the resulting list of Values +// +void showValueList(const vector<OTDBvalue>& items) { + + + cout << "name |value |time" << endl; + cout << "-----------------------------------+------+--------------------" << endl; + for (uint32 i = 0; i < items.size(); ++i) { + string row(formatString("%-35.35s|%-7.7s|%s", + items[i].name.c_str(), + items[i].value.c_str(), + to_simple_string(items[i].time).c_str())); + cout << row << endl; + } + + cout << items.size() << " records" << endl << endl; +} + +// +// MAIN +// +int main (int argc, char* argv[]) { + + INIT_LOGGER(basename(argv[0])); + LOG_INFO_STR("Starting " << argv[0]); + + if (argc != 1) { + cout << "Usage: tBrokenHardware " << endl; + return (1); + } + + // try to resolve the database name + string dbName("TESTLOFAR_4"); + string hostName("rs005.astron.nl"); + int32 sleeptime = 1; + LOG_INFO_STR("### Using database " << dbName << " on host " << hostName << " ###"); + sleep (sleeptime); + + // Open the database connection + OTDBconnection conn("paulus", "boskabouter", dbName, hostName); + + TreeMaintenance tm(&conn); + + // Use converters in this testprogram + TreeTypeConv TTconv(&conn); + TreeStateConv TSconv(&conn); + ClassifConv CTconv(&conn); + + try { + + LOG_INFO("Trying to connect to the database"); + ASSERTSTR(conn.connect(), "Connnection failed"); + LOG_INFO_STR("Connection succesful: " << conn); + + LOG_INFO("Searching for a Hardware tree"); + vector<OTDBtree> treeList = + conn.getTreeList(TTconv.get("hardware"), CTconv.get("operational")); + showTreeList(treeList); + ASSERTSTR(treeList.size(),"No hardware tree found, run tPICtree first"); + + treeIDType treeID = treeList[treeList.size()-1].treeID(); + LOG_INFO_STR ("Using tree " << treeID << " for the tests"); + OTDBtree treeInfo = conn.getTreeInfo(treeID); + LOG_INFO_STR(treeInfo); + + LOG_INFO("Trying to construct a TreeValue object"); + TreeValue tv(&conn, treeID); + + { + LOG_INFO ("getBrokenHardware()"); + vector<OTDBvalue> valueList=tv.getBrokenHardware(); + showValueList(valueList); + } + + { + LOG_INFO ("getBrokenHardware('2012-10-15 09:00:00')"); + vector<OTDBvalue> valueList=tv.getBrokenHardware(time_from_string("2012-10-15 09:00:00")); + showValueList(valueList); + } + + { + LOG_INFO ("getBrokenHardware('2012-10-15 12:00:00')"); + vector<OTDBvalue> valueList=tv.getBrokenHardware(time_from_string("2012-10-15 12:00:00")); + showValueList(valueList); + } + + { + LOG_INFO ("getBrokenHardware('2012-10-15 12:00:00', '2012-10-16 12:00:00')"); + vector<OTDBvalue> valueList=tv.getBrokenHardware(time_from_string("2012-10-15 12:00:00"), + time_from_string("2012-10-16 12:00:00")); + showValueList(valueList); + } + + { + LOG_INFO ("getBrokenHardware('2012-10-14 12:00:00', '2012-10-15 12:00:00')"); + vector<OTDBvalue> valueList=tv.getBrokenHardware(time_from_string("2012-10-14 12:00:00"), + time_from_string("2012-10-15 12:00:00")); + showValueList(valueList); + } + } + catch (std::exception& ex) { + LOG_FATAL_STR("Unexpected exception: " << ex.what()); + return (1); // return !0 on failure + } + + LOG_INFO_STR ("Terminated succesfully: " << argv[0]); + + return (0); // return 0 on succes +} diff --git a/SubSystems/LCU_MAC/CMakeLists.txt b/SubSystems/LCU_MAC/CMakeLists.txt index 7c70ffad437..091e99b0dfa 100644 --- a/SubSystems/LCU_MAC/CMakeLists.txt +++ b/SubSystems/LCU_MAC/CMakeLists.txt @@ -2,4 +2,4 @@ lofar_package(LCU_MAC DEPENDS StationCU PIC PAC CUDaemons CURTDBDaemons - AMC Firmware-Tools MACTools StaticMetaData) + Firmware-Tools MACTools StaticMetaData) -- GitLab