From 82141053cf0e20b6fd54504f9080f0291ab2edad Mon Sep 17 00:00:00 2001
From: lukken <lukken@astron.nl>
Date: Fri, 4 Nov 2022 06:23:18 +0000
Subject: [PATCH] Ignore cover directory for start-ds

---
 bin/start-ds.sh              |  2 +-
 tangostationcontrol/start.py | 25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
 create mode 100644 tangostationcontrol/start.py

diff --git a/bin/start-ds.sh b/bin/start-ds.sh
index fcbbb2a5e..105cbe86a 100755
--- a/bin/start-ds.sh
+++ b/bin/start-ds.sh
@@ -37,7 +37,7 @@ else
   rm -rf /tmp/tangostationcontrol
   # Ideally we would use git copy but it can't copy on subdirectory level
   # DO NOT PUT SPACES IN THE EXCLUDE LIST!
-  rsync -av --progress --exclude={".tox","*.egg-info","dist","build",".git","*.pyc"} /opt/lofar/tango/tangostationcontrol /tmp/
+  rsync -av --progress --exclude={".tox","*.egg-info","dist","build",".git","*.pyc","cover","docs/build"} /opt/lofar/tango/tangostationcontrol /tmp/
   cd /tmp/tangostationcontrol || exit 1
   pip -vvv install --upgrade --force-reinstall ./
 fi
diff --git a/tangostationcontrol/start.py b/tangostationcontrol/start.py
new file mode 100644
index 000000000..e6fd41c77
--- /dev/null
+++ b/tangostationcontrol/start.py
@@ -0,0 +1,25 @@
+from tango import DeviceProxy
+
+devices = [
+    # "STAT/Docker/1", # Docker controls the device containers, so it goes before anything else
+    "STAT/PSOC/1",  # PSOC boot early to detect power delivery failure as fast as possible
+    "STAT/PCON/1",  # PCON boot early because it is responsible for power delivery.
+    "STAT/APSPU/1",  # APS Power Units control other hardware we want to initialise
+    "STAT/APSCT/1",
+    "STAT/CCD/1",
+    "STAT/RECV/1",   # RCUs are input for SDP, so initialise them first
+    "STAT/UNB2/1",   # Uniboards host SDP, so initialise them first
+    "STAT/SDP/1",    # SDP controls the mask for SST/XST/BST/Beamlet, so initialise it first
+    "STAT/BST/1",
+    "STAT/SST/1",
+    "STAT/XST/1",
+    "STAT/Beamlet/1",
+    "STAT/AntennaField/1", # Accesses RECV
+    "STAT/TileBeam/1",     # Accesses AntennaField
+    "STAT/DigitalBeam/1",  # Accessed SDP and Beamlet
+    "STAT/TemperatureManager/1",
+]
+
+for device in devices:
+    d = DeviceProxy(device)
+    d.start_coverage()
-- 
GitLab