diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8437f0727d43d009280282235e589254b42d74c0..eef96688ba969a95709f27c6b0d96e226662d1e3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -99,6 +99,7 @@ docker_build_image_all: - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-apspu latest - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-tilebeam latest - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-beamlet latest + - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-digitalbeam latest - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-boot latest - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-docker latest - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-observation_control latest @@ -274,6 +275,17 @@ docker_build_image_device_beamlet: script: # Do not remove 'bash' or statement will be ignored by primitive docker shell - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-beamlet $tag +docker_build_image_device_digitalbeam: + extends: .base_docker_images_except + only: + refs: + - merge_requests + changes: + - docker-compose/device-digitalbeam.yml + - docker-compose/lofar-device-base/* + script: +# Do not remove 'bash' or statement will be ignored by primitive docker shell + - bash $CI_PROJECT_DIR/sbin/tag_and_push_docker_image.sh device-digitalbeam $tag docker_build_image_device_boot: extends: .base_docker_images_except only: diff --git a/CDB/LOFAR_ConfigDb.json b/CDB/LOFAR_ConfigDb.json index a2ed6f1742c94908c4080e8e47b9e8bfad078461..75da3c1142f40bb4034d7100812bd5dbe3ecf983 100644 --- a/CDB/LOFAR_ConfigDb.json +++ b/CDB/LOFAR_ConfigDb.json @@ -49,6 +49,16 @@ } } }, + "DigitalBeam": { + "STAT": { + "DigitalBeam": { + "STAT/DigitalBeam/1": { + "properties": { + } + } + } + } + }, "boot": { "STAT": { "Boot": { diff --git a/CDB/stations/simulators_ConfigDb.json b/CDB/stations/simulators_ConfigDb.json index 1418898b75769065c36611615bd6d7e74ca3feb1..59fcdee54cef6d9947419e839805e9851c539f65 100644 --- a/CDB/stations/simulators_ConfigDb.json +++ b/CDB/stations/simulators_ConfigDb.json @@ -106,6 +106,16 @@ } } }, + "DigitalBeam": { + "STAT": { + "DigitalBeam": { + "STAT/DigitalBeam/1": { + "properties": { + } + } + } + } + }, "RECV": { "STAT": { "RECV": { diff --git a/CDB/thijs_ConfigDb.json b/CDB/thijs_ConfigDb.json deleted file mode 100644 index 6361533704fa01dc373b6c35f608772e89e9bdbc..0000000000000000000000000000000000000000 --- a/CDB/thijs_ConfigDb.json +++ /dev/null @@ -1,137 +0,0 @@ -{ - "servers": { - "RECV": { - "1": { - "RECV": { - "STAT/RECV/1": { - "properties": { - "OPC_Server_Name": [ - "host.docker.internal" - ] - } - } - } - } - }, - "SDP": { - "1": { - "SDP": { - "STAT/SDP/1": { - "properties": { - "OPC_Server_Name": [ - "dop36.astron.nl" - ], - "OPC_Server_Port": [ - "4840" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "example_device": { - "1": { - "example_device": { - "STAT/example_device/1": { - "properties": { - "OPC_Server_Name": [ - "host.docker.internal" - ], - "OPC_Server_Port": [ - "4842" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "ini_device": { - "1": { - "ini_device": { - "STAT/ini_device/1": { - "properties": { - "OPC_Server_Name": [ - "host.docker.internal" - ], - "OPC_Server_Port": [ - "4844" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "APSCTL": { - "1": { - "APSCTL": { - "STAT/APSCTL/1": { - "properties": { - "OPC_Server_Name": [ - "ltspi.astron.nl" - ], - "OPC_Server_Port": [ - "4844" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "SST": { - "1": { - "SST": { - "STAT/SST/1": { - "properties": { - "Statistics_Client_UDP_Port": [ - "5001" - ], - "Statistics_Client_TCP_Port": [ - "5101" - ], - "OPC_Server_Name": [ - "dop36.astron.nl" - ], - "OPC_Server_Port": [ - "4840" - ], - "OPC_Time_Out": [ - "5.0" - ] - } - } - } - } - }, - "SNMP": { - "1": { - "SNMP": { - "STAT/SNMP/1": { - "properties": { - "SNMP_community": [ - "public" - ], - "SNMP_host": [ - "192.168.178.17" - ], - "SNMP_timeout": [ - "5.0" - ] - } - } - } - } - } - } -} diff --git a/docker-compose/device-digitalbeam.yml b/docker-compose/device-digitalbeam.yml new file mode 100644 index 0000000000000000000000000000000000000000..81930a0f297cf882b98c3d8bbafacefa2b1affcb --- /dev/null +++ b/docker-compose/device-digitalbeam.yml @@ -0,0 +1,47 @@ +# +# Docker compose file that launches an interactive iTango session. +# +# Connect to the interactive session with 'docker attach itango'. +# Disconnect with the Docker deattach sequence: <CTRL>+<P> <CTRL>+<Q> +# +# Defines: +# - itango: iTango interactive session +# +# Requires: +# - lofar-device-base.yml +# +version: '2' + +services: + device-digitalbeam: + image: device-digitalbeam + # build explicitly, as docker-compose does not understand a local image + # being shared among services. + build: + context: .. + dockerfile: docker-compose/lofar-device-base/Dockerfile + args: + SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION} + container_name: ${CONTAINER_NAME_PREFIX}device-digitalbeam + logging: + driver: "json-file" + options: + max-size: "100m" + max-file: "10" + networks: + - control + ports: + - "5713:5713" # unique port for this DS + extra_hosts: + - "host.docker.internal:host-gateway" + volumes: + - ..:/opt/lofar/tango:rw + environment: + - TANGO_HOST=${TANGO_HOST} + working_dir: /opt/lofar/tango + entrypoint: + - bin/start-ds.sh + # configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA + # can't know about our Docker port forwarding + - l2ss-digitalbeam DigitalBeam STAT -v -ORBendPoint giop:tcp:0:5713 -ORBendPointPublish giop:tcp:${HOSTNAME}:5713 + restart: unless-stopped diff --git a/docker-compose/jupyter/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py b/docker-compose/jupyter/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py index 82afee40e570b375aec7339ddfa81013d9b39f61..cf3e092e8f3b8a58ada27252a7862a00f49ad870 100644 --- a/docker-compose/jupyter/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py +++ b/docker-compose/jupyter/ipython-profiles/stationcontrol-jupyter/startup/01-devices.py @@ -9,7 +9,8 @@ unb2 = DeviceProxy("STAT/UNB2/1") boot = DeviceProxy("STAT/Boot/1") tilebeam = DeviceProxy("STAT/TileBeam/1") beamlet = DeviceProxy("STAT/Beamlet/1") +digitalbeam = DeviceProxy("STAT/DigitalBeam/1") docker = DeviceProxy("STAT/Docker/1") # Put them in a list in case one wants to iterate -devices = [apsct, apspu, recv, sdp, sst, xst, unb2, boot, tilebeam, beamlet, docker] +devices = [apsct, apspu, recv, sdp, sst, xst, unb2, boot, tilebeam, beamlet, digitalbeam, docker] diff --git a/sbin/run_integration_test.sh b/sbin/run_integration_test.sh index c3351457189b36495fb5f1738098e9b947e41c1b..780faa73fc2d0b42bc53d7903ef07b40e0f94081 100755 --- a/sbin/run_integration_test.sh +++ b/sbin/run_integration_test.sh @@ -14,13 +14,13 @@ cd "$LOFAR20_DIR/docker-compose" || exit 1 # Build only the required images, please do not build everything that makes CI # take really long to finish, especially grafana / jupyter / prometheus. # jupyter is physically large > 2.5gb and overlayfs is really slow. -make build device-sdp device-recv device-sst device-unb2 device-xst device-beamlet device-tilebeam +make build device-sdp device-recv device-sst device-unb2 device-xst device-beamlet device-digitalbeam device-tilebeam make build sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim make build databaseds dsconfig elk integration-test make build archiver-timescale hdbppts-cm hdbppts-es # Start and stop sequence -make stop device-boot device-docker device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-beamlet device-tilebeam sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim hdbppts-es hdbppts-cm archiver-timescale +make stop device-boot device-docker device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-beamlet device-digitalbeam device-tilebeam sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim hdbppts-es hdbppts-cm archiver-timescale make start databaseds dsconfig elk # Give dsconfig and databaseds time to start @@ -38,7 +38,7 @@ make start sdptr-sim recv-sim unb2-sim apsct-sim apspu-sim # Give the simulators time to start sleep 5 -make start device-boot device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-tilebeam device-beamlet +make start device-boot device-apsct device-apspu device-sdp device-recv device-sst device-unb2 device-xst device-tilebeam device-beamlet device-digitalbeam # Archive devices -> starting order is important make start archiver-timescale hdbppts-cm hdbppts-es diff --git a/tangostationcontrol/docs/source/devices/digitalbeam.rst b/tangostationcontrol/docs/source/devices/digitalbeam.rst new file mode 100644 index 0000000000000000000000000000000000000000..332e47993e3000259749e58be5840d0ae7f778ab --- /dev/null +++ b/tangostationcontrol/docs/source/devices/digitalbeam.rst @@ -0,0 +1,4 @@ +digitalbeam +==================== + +``digitalbeam == DeviceProxy("STAT/DigitalBeam/1")`` diff --git a/tangostationcontrol/docs/source/index.rst b/tangostationcontrol/docs/source/index.rst index 0fd199ad8648ca1783d0565cd9f9c336ac4f0ab3..97f8272100311a1b4cb758a4b47d3b9fc93d4e28 100644 --- a/tangostationcontrol/docs/source/index.rst +++ b/tangostationcontrol/docs/source/index.rst @@ -21,6 +21,7 @@ Even without having access to any LOFAR2.0 hardware, you can install the full st devices/using devices/tilebeam devices/beamlet + devices/digitalbeam devices/boot devices/docker devices/recv diff --git a/tangostationcontrol/setup.cfg b/tangostationcontrol/setup.cfg index a1fe2672594f706a8c58e0a652c8c814c021180c..e9d1b0ada4513e0973785c5e2f99e5d78ada9350 100644 --- a/tangostationcontrol/setup.cfg +++ b/tangostationcontrol/setup.cfg @@ -37,6 +37,7 @@ console_scripts = l2ss-apspu = tangostationcontrol.devices.apspu:main l2ss-tilebeam = tangostationcontrol.devices.tilebeam:main l2ss-beamlet = tangostationcontrol.devices.sdp.beamlet:main + l2ss-digitalbeam = tangostationcontrol.devices.sdp.digitalbeam:main l2ss-boot = tangostationcontrol.devices.boot:main l2ss-docker-device = tangostationcontrol.devices.docker_device:main l2ss-observation = tangostationcontrol.devices.observation:main diff --git a/tangostationcontrol/tangostationcontrol/devices/boot.py b/tangostationcontrol/tangostationcontrol/devices/boot.py index ba9279092ba0fc3685eb3401b78e630f9ea5cd2a..0b496636fbd30550255c488ef458e294468c07aa 100644 --- a/tangostationcontrol/tangostationcontrol/devices/boot.py +++ b/tangostationcontrol/tangostationcontrol/devices/boot.py @@ -242,6 +242,7 @@ class Boot(lofar_device): "STAT/XST/1", "STAT/Beamlet/1", "STAT/TileBeam/1", # Accesses RECV and Beamlet + "STAT/DigitalBeam/1", ], ) diff --git a/tangostationcontrol/tangostationcontrol/devices/sdp/digitalbeam.py b/tangostationcontrol/tangostationcontrol/devices/sdp/digitalbeam.py new file mode 100644 index 0000000000000000000000000000000000000000..147b0a6237d14b70683f778f220f304ffb2e3b86 --- /dev/null +++ b/tangostationcontrol/tangostationcontrol/devices/sdp/digitalbeam.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# +# Distributed under the terms of the APACHE license. +# See LICENSE.txt for more info. + +""" DigitalBeam Device Server for LOFAR2.0 + +""" + +# PyTango imports +#from tango.server import device_property +#from tango import AttrWriteType +# Additional import + +from tangostationcontrol.common.entrypoint import entry +#from tangostationcontrol.clients.attribute_wrapper import attribute_wrapper +from tangostationcontrol.devices.lofar_device import lofar_device + +#import numpy + +__all__ = ["DigitalBeam", "main"] + + +class DigitalBeam(lofar_device): + pass + # ----------------- + # Device Properties + # ----------------- + + # ---------- + # Attributes + # ---------- + + # ---------- + # Summarising Attributes + # ---------- + + # -------- + # Overloaded functions + # -------- + + # -------- + # Commands + # -------- + +# ---------- +# Run server +# ---------- +def main(**kwargs): + """Main function of the SST Device module.""" + return entry(DigitalBeam, **kwargs) diff --git a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_digitalbeam.py b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_digitalbeam.py new file mode 100644 index 0000000000000000000000000000000000000000..c023f256b1bdcb8cf5a935053fcba493fe2546dd --- /dev/null +++ b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_digitalbeam.py @@ -0,0 +1,16 @@ + +# -*- coding: utf-8 -*- +# +# This file is part of the LOFAR 2.0 Station Software +# +# +# +# Distributed under the terms of the APACHE license. +# See LICENSE.txt for more info. +from .base import AbstractTestBases + +class TestDeviceDigitalBeam(AbstractTestBases.TestDeviceBase): + + def setUp(self): + """Intentionally recreate the device object in each test""" + super().setUp("STAT/DigitalBeam/1")