From 1c3fb1eb8ebe09fe6836e3a85901970b69fcd966 Mon Sep 17 00:00:00 2001 From: Giuseppe Carboni Date: Mon, 18 Oct 2021 18:20:11 +0200 Subject: [PATCH] Fix #614, fix #615. See changelog below. (#616) * Fix #614, fix #615. See changelog below. Issue #614: added the simulation .xml file for the ACS command center. It is automatically used when the testing CDB is in use. Issue #615: changed output directory for Sardara NODATA files when the testing CDB is in use. * Fix #614, now the correct environment is always loaded even when started graphically This fixes a wrong behavior that showed up when launching discos from a .desktop file The .desktop file loaded the environment variables at graphical session startup, so any environment update made by the discos-set command was simply ignored. --- Common/Misc/Scripts/src/discos | 19 +- .../alma/DataBlock/Equipment/Equipment.xml | 2 +- .../app-defaults/simulationStartup.xml | 329 ++++++++++++++++++ SRT/Misc/SRTScripts/src/Makefile | 7 +- 4 files changed, 352 insertions(+), 5 deletions(-) create mode 100644 SRT/Misc/SRTScripts/app-defaults/simulationStartup.xml diff --git a/Common/Misc/Scripts/src/discos b/Common/Misc/Scripts/src/discos index fe5786d47..5132d0c77 100644 --- a/Common/Misc/Scripts/src/discos +++ b/Common/Misc/Scripts/src/discos @@ -69,13 +69,28 @@ if [ "$CL_HELP" ] ; then exit fi +# Load current DISCOS environment +# =============================== +if [ -f /discos-sw/config/misc/load_branch ]; then + source /discos-sw/config/misc/load_branch +fi + +STARTUP_SCRIPT="$INTROOT/app-defaults/discosStartup.xml" + +if [ "$CDB" == "test" ] ; then + SIMULATION_SCRIPT="$INTROOT/app-defaults/simulationStartup.xml" + if [ -f "$SIMULATION_SCRIPT" ] ; then + STARTUP_SCRIPT="$SIMULATION_SCRIPT" + fi +fi + if [ "$CL_START" ] ; then - acscommandcenter -g $GEOMETRY -r $INTROOT/app-defaults/discosStartup.xml & + acscommandcenter -g $GEOMETRY -r $STARTUP_SCRIPT & exit fi if [ "$CL_VIEW" ] ; then - acscommandcenter -g $GEOMETRY -r $INTROOT/app-defaults/discosStartup.xml $MANAGER & + acscommandcenter -g $GEOMETRY -r $STARTUP_SCRIPT $MANAGER & fi diff --git a/SRT/CDB/alma/DataBlock/Equipment/Equipment.xml b/SRT/CDB/alma/DataBlock/Equipment/Equipment.xml index 4e1342187..ca995a652 100644 --- a/SRT/CDB/alma/DataBlock/Equipment/Equipment.xml +++ b/SRT/CDB/alma/DataBlock/Equipment/Equipment.xml @@ -22,7 +22,7 @@ - + diff --git a/SRT/Misc/SRTScripts/app-defaults/simulationStartup.xml b/SRT/Misc/SRTScripts/app-defaults/simulationStartup.xml new file mode 100644 index 000000000..fc00b44c7 --- /dev/null +++ b/SRT/Misc/SRTScripts/app-defaults/simulationStartup.xml @@ -0,0 +1,329 @@ + + + remote_native + + 0 + MASTERHOST + discos + + false + + + + + + + + + + + + AntennaBossContainer + cpp + + true + 0 + MASTERHOST + discos + + + AntennaContainer + cpp + + true + 0 + MASTERHOST + discos + + + CalibrationToolContainer + cpp + + true + 0 + MASTERHOST + discos + + + DerotatorContainer + py + + true + 0 + MASTERHOST + discos + + + DerotatorPositionerContainer + py + + true + 0 + MASTERHOST + discos + + + FitsZillaContainer + cpp + + true + 0 + MASTERHOST + discos + + + LocalOscillatorLPContainer + py + + true + 0 + MASTERHOST + discos + + + LocalOscillatorCContainer + py + + true + 0 + MASTERHOST + discos + + + LocalOscillatorKContainer + py + + true + 0 + MASTERHOST + discos + + + LoggerContainer + cpp + + true + 0 + MASTERHOST + discos + + + ManagementContainer + cpp + + true + 0 + MASTERHOST + discos + + + MinorServoBossContainer + cpp + + true + 0 + MASTERHOST + discos + + + MinorServoContainer + cpp + + true + 0 + MASTERHOST + discos + + + MountContainer + cpp + + true + 0 + MASTERHOST + discos + + + PointContainer + cpp + + true + 0 + MASTERHOST + discos + + + ReceiversContainer + cpp + + true + 0 + MASTERHOST + discos + + + PyCalmuxContainer + py + + true + 0 + MASTERHOST + discos + + + SardaraContainer + cpp + + true + 0 + MASTERHOST + discos + + + SRT7GHzContainer + cpp + + true + 0 + MASTERHOST + discos + + + SRTKBandContainer + cpp + + true + 0 + MASTERHOST + discos + + + SRTLPBandContainer + cpp + + true + 0 + MASTERHOST + discos + + + TotalPowerContainer + cpp + + true + 0 + MASTERHOST + discos + + + WeatherStationContainer + cpp + + true + 0 + MASTERHOST + discos + + + ExternalClientsContainer + cpp + + true + 0 + MASTERHOST + discos + + + RFIMonitoringContainer + cpp + + true + 0 + MASTERHOST + discos + + + SRTActiveSurfaceContainer + cpp + + true + 0 + MASTERHOST + discos + + + SRTActiveSurfaceContainer01 + cpp + + true + 0 + MASTERHOST + discos + + + SRTActiveSurfaceContainer02 + cpp + + true + 0 + MASTERHOST + discos + + + SRTActiveSurfaceContainer03 + cpp + + true + 0 + MASTERHOST + discos + + + SRTActiveSurfaceContainer04 + cpp + + true + 0 + MASTERHOST + discos + + + SRTActiveSurfaceContainer05 + cpp + + true + 0 + MASTERHOST + discos + + + SRTActiveSurfaceContainer06 + cpp + + true + 0 + MASTERHOST + discos + + + SRTActiveSurfaceContainer07 + cpp + + true + 0 + MASTERHOST + discos + + + SRTActiveSurfaceContainer08 + cpp + + true + 0 + MASTERHOST + discos + + + diff --git a/SRT/Misc/SRTScripts/src/Makefile b/SRT/Misc/SRTScripts/src/Makefile index 7adcfaf6f..714173ccb 100644 --- a/SRT/Misc/SRTScripts/src/Makefile +++ b/SRT/Misc/SRTScripts/src/Makefile @@ -172,7 +172,7 @@ ASCII_TO_MIF = # other files to be installed #---------------------------- #INSTALL_FILES = ../app-defaults/nuragheStartup.xml -INSTALL_FILES = ../app-defaults/discosStartup.xml +INSTALL_FILES = ../app-defaults/discosStartup.xml ../app-defaults/simulationStartup.xml # # list of all possible C-sources (used to create automatic dependencies) @@ -210,6 +210,7 @@ all: do_all clean : clean_all @rm -f $(INTROOT)/app-defaults/discosStartup.xml + @rm -f $(INTROOT)/app-defaults/simulationStartup.xml @echo " . . . clean done" clean_dist : clean_all clean_dist_all @@ -222,7 +223,9 @@ install : install_all # @chmod 764 $(INTROOT)/bin/nuraghe # @chmod 764 $(INTROOT)/app-defaults/nuragheStartup.xml @sed -i 's/MASTERHOST/$(MASTER)/g' $(INTROOT)/app-defaults/discosStartup.xml - @chmod 700 $(INTROOT)/app-defaults/discosStartup.xml + @chmod 700 $(INTROOT)/app-defaults/discosStartup.xml + @sed -i 's/MASTERHOST/$(MASTER)/g' $(INTROOT)/app-defaults/simulationStartup.xml + @chmod 700 $(INTROOT)/app-defaults/simulationStartup.xml @chmod 700 $(INTROOT)/bin/discosdown @chmod 700 $(INTROOT)/bin/discosup @chmod 700 $(INTROOT)/bin/receiversmonitor.py -- GitLab