From 27fd20447dcee95234349fafef2513a2299b99cd Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Thu, 7 Oct 2021 10:06:57 +0200 Subject: [PATCH] L2SS-434: Add ReST API description, link to monitoring, updated titles. --- docs/source/control.rst | 19 +++++++++++++++++-- docs/source/index.rst | 1 + docs/source/monitoring.rst | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/docs/source/control.rst b/docs/source/control.rst index 19c933255..646df84db 100644 --- a/docs/source/control.rst +++ b/docs/source/control.rst @@ -1,4 +1,4 @@ -Control access +Monitoring & Control ======================== The main API to control the station is through the `Tango Controls https://tango-controls.readthedocs.io/en/latest/` API we expose on port 10000, which is most easily accessed using a `PyTango https://pytango.readthedocs.io/en/stable/client_api/index.html` client. @@ -18,7 +18,6 @@ For example, you can start a new *Station Control* notebook (File->New Notebook- .. image:: jupyter_basic_example.png - Python ------------------------ @@ -61,3 +60,19 @@ To obtain a list of all devices, we need to access the database:: # Print the device's state. print(any_device.state()) + +ReST API +------------------------ + +We also provide a ReST API to allow the station to be controlled without needing to use the Tango API. The root access point is http://localhost:8080/tango/rest/v10/hosts/databaseds;port=10000/ (credentials: tango-cs/tango). This API allows for: + +- getting and setting attribute values, +- calling commands, +- retrieving the device state, +- and more. + +For example, retrieving http://localhost:8080/tango/rest/v10/hosts/databaseds;port=10000/devices/LTS/SDP/1/state returns the following JSON document:: + + {"state":"ON","status":"The device is in ON state."} + +For a full description of this API, see https://tango-rest-api.readthedocs.io/en/latest/. diff --git a/docs/source/index.rst b/docs/source/index.rst index 7b4569146..2705e130a 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -15,6 +15,7 @@ Welcome to LOFAR2.0 Station Control's documentation! devices/devices devices/recv control + monitoring Indices and tables diff --git a/docs/source/monitoring.rst b/docs/source/monitoring.rst index 00b417b0c..faf71d364 100644 --- a/docs/source/monitoring.rst +++ b/docs/source/monitoring.rst @@ -1,4 +1,4 @@ -Monitoring +Monitoring GUIs ======================== Each device exposes a list of monitoring points as attributes with the `_R` prefix. These can be accessed interactively from a controle console (such as Jupyter), but that will not scale. -- GitLab