Skip to content
Snippets Groups Projects
Commit db12ca1f authored by Jan David Mol's avatar Jan David Mol
Browse files

L2SS-391: Renamed station_control -> boot

parent 7bab7ba9
No related branches found
No related tags found
1 merge request!144L2SS-391: Add boot device
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
} }
} }
}, },
"station_control": { "boot": {
"LTS": { "LTS": {
"StationControl": { "Boot": {
"LTS/StationControl/1": {} "LTS/Boot/1": {}
} }
} }
}, },
......
...@@ -120,18 +120,18 @@ Futhermore, there are some low-level interfaces: ...@@ -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: Initially, all the devices controlling the station are down. To boot everything up, go to Jupyter (port 8888) and run:
``` ```
# start station control device # start boot device
sc.initialise() boot.initialise()
sc.on() boot.on()
# this should report as DevState.ON # this should report as DevState.ON
sc.status() boot.status()
# boot station # boot station
sc.initialise_station() boot.initialise_station()
# wait until this reports the initialisation is done (or was stopped half way): # 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. Then, in Grafana (port 3000), you should see the devices reaching the ON state.
...@@ -7,7 +7,9 @@ ...@@ -7,7 +7,9 @@
# Distributed under the terms of the APACHE license. # Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info. # 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() ...@@ -37,7 +39,7 @@ logger = logging.getLogger()
from threading import Thread from threading import Thread
__all__ = ["StationControl", "main"] __all__ = ["Boot", "main"]
class InitialisationException(Exception): class InitialisationException(Exception):
...@@ -102,7 +104,7 @@ class DevicesInitialiser(Thread): ...@@ -102,7 +104,7 @@ class DevicesInitialiser(Thread):
logger.info(status) logger.info(status)
def initialise_devices(self): def boot_devices(self):
""" """
Initialise or re-initialise all devices on the station. Initialise or re-initialise all devices on the station.
...@@ -181,7 +183,7 @@ class DevicesInitialiser(Thread): ...@@ -181,7 +183,7 @@ class DevicesInitialiser(Thread):
self.set_status(f"[restarting {device_name}] Succesfully started.") self.set_status(f"[restarting {device_name}] Succesfully started.")
@device_logging_to_python() @device_logging_to_python()
class StationControl(hardware_device): class Boot(hardware_device):
""" """
**Properties:** **Properties:**
...@@ -302,7 +304,7 @@ def main(args=None, **kwargs): ...@@ -302,7 +304,7 @@ def main(args=None, **kwargs):
from common.lofar_logging import configure_logger from common.lofar_logging import configure_logger
configure_logger() configure_logger()
return run((StationControl,), args=args, **kwargs) return run((Boot,), args=args, **kwargs)
if __name__ == '__main__': if __name__ == '__main__':
......
...@@ -12,15 +12,15 @@ ...@@ -12,15 +12,15 @@
version: '2' version: '2'
services: services:
device-station_control: device-boot:
image: device-station_control image: device-boot
# build explicitly, as docker-compose does not understand a local image # build explicitly, as docker-compose does not understand a local image
# being shared among services. # being shared among services.
build: build:
context: lofar-device-base context: lofar-device-base
args: args:
SOURCE_IMAGE: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}-tango-itango:${TANGO_ITANGO_VERSION} 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: networks:
- control - control
ports: ports:
...@@ -37,5 +37,5 @@ services: ...@@ -37,5 +37,5 @@ services:
- -- - --
# configure CORBA to _listen_ on 0:port, but tell others we're _reachable_ through ${HOSTNAME}:port, since CORBA # 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 # 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 restart: unless-stopped
...@@ -4,7 +4,7 @@ sdp = DeviceProxy("LTS/SDP/1") ...@@ -4,7 +4,7 @@ sdp = DeviceProxy("LTS/SDP/1")
sst = DeviceProxy("LTS/SST/1") sst = DeviceProxy("LTS/SST/1")
xst = DeviceProxy("LTS/XST/1") xst = DeviceProxy("LTS/XST/1")
unb2 = DeviceProxy("LTS/UNB2/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 # 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]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment