Oct 16 – 19, 2016
Copenhagen University
Europe/Copenhagen timezone

Plankton: A Stateful Device Simulation Framework

Oct 19, 2016, 11:30 AM
5m
Marble Hall (Copenhagen University)

Marble Hall

Copenhagen University

Thorvaldsensvej 40

Speaker

Mr Michael Hart (STFC)

Description

User-facing instrument control software will be a critical component to the operation of the European Spallation Source (ESS) under construction in Sweden. The control software must be robust, proven, and well tested for day-one operations. A sequential approach to development, whereby the target hardware is procured, installed and made operational prior to the development of the control software will undoubtedly result in late delivery and schedule blockages further down the line. To avoid a schedule conflict, the control software must be developed in parallel to the target hardware and drivers. Furthermore, deep testing of the control software will involve driving the hardware to its limits, such that critical error handling mechanisms can be exercised. For expensive hardware, testing of this form would be undesirable, even if the target devices are available. The distributed nature of the software team, also presents a challenge, given that full replicas of all hardware will not be made available at all development locations. Given these challenges, in order to progress development of control software for the ESS, a way to simulate devices and controllers is required. To enable simulating complex behaviour of many devices using a standardised approach, we have developed a deterministic, statemachine-based device simulation framework. This ensures that common functionality is implemented once and thoroughly tested, encourages simulators to follow a common design, and allows capturing device behaviour in great detail with relatively little development effort. We chose to develop in Python for speed of implementation and accessibility, to allow users to easily extend functionality, and add their own devices. Implementation of device behaviour has been separated from communication protocol to allow simulation both at the controller level via EPICS[1], and at the device level using various low-level protocols. It is often useful to vary aspects of device behaviour for a particular use-case, and we have therefore provided a simple way to extend and customise a device based on an existing one. Docker[2] images are provided for easy deployment and to simulate a network of devices on a single machine. Our primary aim is to accelerate initial development of control software, in absence of hardware to test against. A library of simulators will also be useful for automated unit and system tests as development progresses. It may also prove useful for validating user scripts by performing a simulated dry run in more detail that would otherwise be possible. References: - [1] EPICS: http://www.aps.anl.gov/epics/ - [2] Docker: https://www.docker.com/

Primary authors

Mr Michael Hart (STFC) Michael Wedel (European Spallation Source ERIC)

Presentation materials