diff --git a/CDB/LOFAR_ConfigDb.json b/CDB/LOFAR_ConfigDb.json index 89ec942edab469d8833f393a01bfa02204009514..b28c57984889d07dd0544702d6712861bdb72903 100644 --- a/CDB/LOFAR_ConfigDb.json +++ b/CDB/LOFAR_ConfigDb.json @@ -21,10 +21,10 @@ } } }, - "station_control": { + "boot": { "LTS": { - "StationControl": { - "LTS/StationControl/1": {} + "Boot": { + "LTS/Boot/1": {} } } }, diff --git a/README.md b/README.md index 8f636d910248ebe348cc47211404025702a17a04..81b708abe4c846826bd6ea283b34fbdfd6834dbd 100644 --- a/README.md +++ b/README.md @@ -120,18 +120,18 @@ Futhermore, there are some low-level interfaces: Initially, all the devices controlling the station are down. To boot everything up, go to Jupyter (port 8888) and run: ``` -# start station control device -sc.initialise() -sc.on() +# start boot device +boot.initialise() +boot.on() # this should report as DevState.ON -sc.status() +boot.status() # boot station -sc.initialise_station() +boot.initialise_station() # wait until this reports the initialisation is done (or was stopped half way): -print(f"Still initialising: {sc.initialising_station_R}. Completeness: {sc.initialisation_progress_R}%. State: {sc.initialisation_status_R}") +print(f"Still initialising: {boot.initialising_station_R}. Completeness: {boot.initialisation_progress_R}%. State: {boot.initialisation_status_R}") ``` Then, in Grafana (port 3000), you should see the devices reaching the ON state. diff --git a/devices/devices/station_control.py b/devices/devices/boot.py similarity index 97% rename from devices/devices/station_control.py rename to devices/devices/boot.py index bf7c711d6cafa189d1758f2561d83f31c62718af..c90c66ce65752da8f7d1da1d30e20616c11c04f9 100644 --- a/devices/devices/station_control.py +++ b/devices/devices/boot.py @@ -7,7 +7,9 @@ # Distributed under the terms of the APACHE license. # See LICENSE.txt for more info. -""" StationControl Device Server for LOFAR2.0 +""" Boot Device Server for LOFAR2.0 + +Boots the rest of the station software. """ @@ -37,7 +39,7 @@ logger = logging.getLogger() from threading import Thread -__all__ = ["StationControl", "main"] +__all__ = ["Boot", "main"] class InitialisationException(Exception): @@ -102,7 +104,7 @@ class DevicesInitialiser(Thread): logger.info(status) - def initialise_devices(self): + def boot_devices(self): """ Initialise or re-initialise all devices on the station. @@ -181,7 +183,7 @@ class DevicesInitialiser(Thread): self.set_status(f"[restarting {device_name}] Succesfully started.") @device_logging_to_python() -class StationControl(hardware_device): +class Boot(hardware_device): """ **Properties:** @@ -302,7 +304,7 @@ def main(args=None, **kwargs): from common.lofar_logging import configure_logger configure_logger() - return run((StationControl,), args=args, **kwargs) + return run((Boot,), args=args, **kwargs) if __name__ == '__main__': diff --git a/docker-compose/device-station_control.yml b/docker-compose/device-boot.yml similarity index 83% rename from docker-compose/device-station_control.yml rename to docker-compose/device-boot.yml index d95e9ca492894de6c044a8d43ef3e05b50e8a0ab..e0f804d28ac671a638e1e9e419abae8bfe10c26d 100644 --- a/docker-compose/device-station_control.yml +++ b/docker-compose/device-boot.yml @@ -12,15 +12,15 @@ version: '2' services: - device-station_control: - image: device-station_control + device-boot: + image: device-boot # build explicitly, as docker-compose does not understand a local image # being shared among services. build: context: lofar-device-base args: SOURCE_IMAGE: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}-tango-itango:${TANGO_ITANGO_VERSION} - container_name: ${CONTAINER_NAME_PREFIX}device-station_control + container_name: ${CONTAINER_NAME_PREFIX}device-boot networks: - control ports: @@ -37,5 +37,5 @@ services: - -- # 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 - - python3 -u ${TANGO_LOFAR_CONTAINER_DIR}/devices/devices/station_control.py LTS -v -ORBendPoint giop:tcp:0:5708 -ORBendPointPublish giop:tcp:${HOSTNAME}:5708 + - python3 -u ${TANGO_LOFAR_CONTAINER_DIR}/devices/devices/boot.py LTS -v -ORBendPoint giop:tcp:0:5708 -ORBendPointPublish giop:tcp:${HOSTNAME}:5708 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 ba7ade76a915001e8ded8d7b3474c73fc2d25a1c..fc4fd663d7a25ad5c3d6ebfc24e3cf26ba642d79 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 @@ -4,7 +4,7 @@ sdp = DeviceProxy("LTS/SDP/1") sst = DeviceProxy("LTS/SST/1") xst = DeviceProxy("LTS/XST/1") unb2 = DeviceProxy("LTS/UNB2/1") -sc = DeviceProxy("LTS/StationControl/1") +boot = DeviceProxy("LTS/Boot/1") # Put them in a list in case one wants to iterate -devices = [recv, sdp, sst, xst, unb2, sc] +devices = [recv, sdp, sst, xst, unb2, boot]