Introduction

About this project

DISCOS Simulators: a framework for writing hardware simulators for the DISCOS control software

This document describes the DISCOS Simulators framework. This framework was designed with the purpose of providing a means to integrate several hardware simulators of the three Italian radio telescopes (especially the Sardinia Radio Telescope) under the same environment.

Writing a simulator helps the developers in writing good code for the actual control software of the radio telescope, the DISCOS control software. Being able to test the control software code without having to rely on the hardware represents a huge advantage in the development and maintenance processes, it provides a way to test each new addition or modification to the code, making sure that the control software keeps behaving as expected. Furthermore, the framework allows to test how the control software code reacts under expected error conditions, in fact, it provides an easy way to simulate unlikely scenarios that are very difficult or, in some cases, impossible to replicate by only using the hardware. This allows the developers to write more reliable and robust code, that is likely capable to allow the user to recover from an error condition without having to resort to a complete reboot of the system.

Having a fast way to write a simulator of a new incoming device, also allows to easily verify that the communication protocol on which the software developing team and the provider of the new device agreed upon, is working as expected. In case some of the tests yield different results between the simulator and the real hardware, it is easier to understand which one of the two parties committed an implementation error, whether it is a bug in the code of the control software or in the firmware of the device (or just in an update of one of the two).

In order to do so, it is necessary to have a simulator for each critical component of the radio telescope. Since the vast majority of the communications between the control software and the devices (or the simulator, in this case) are carried on via network, under similar circumstances, having a framework already capable of handling these kind of communications on its own, is priceless. It allows the developers to focus on the simulator code and communication protocol, without having to re-write anything related to the communication infrastructure, providing the same simple architecture for all the simulators.

Another important aim of this project is that it opens the possibility of performing automated tests of the control software code. A suite of simulators, capable of reproducing various different scenarios, can be exploited to write and execute a great variety of tests whenever a modification to the control software code gets pushed to the main online repository. This workflow is called continuous integration. [1]

The DISCOS Control Software

The following paragraph describes the DISCOS control software. These lines were taken from the official DISCOS documentation. [2]

DISCOS (Development of the Italian Single-dish COntrol System) is the control software produced for the Italian radio telescopes. It is a distributed system based on ACS (ALMA Common Software) [3] commanding all the devices of the telescope and allowing the user to perform single-dish observations in the most common modes. As of today, the code specifically implemented for the telescopes (i.e. excluding the huge ACS framework) amounts to about 650000 lines. Even VLBI (or guest-backend) observations partly rely on DISCOS, as it must be used to perform the focus selection and the frontend setup.”

../_images/console-1.png

Fig. 1 The DISCOS console user interface.

../_images/console-2.png

Fig. 2 The SRT Active Surface and Weather Client user interfaces.