Generating EPICS Screens Through Assembling Layout Templates
Gestalt is a Python tool that generates EPICS control system GUI screens from YAML layout files. Write your screen layout once, then generate output for caQtDM, CSS-Phoebus, or PyDM.
- Python >= 3.9
- lxml
- PyYAML
Optional:
- phoebusgen -- required for generating CSS-Phoebus
.bobfiles - PyQt5 -- required for the GUI mode
- tkinter -- used for font measurement (included with most Python installations)
Install dependencies:
pip install lxml pyyamlCreate a layout file (hello.yml):
#include colors.yml
#include widgets.yml
Form: !Form
title: "$(P) Status"
Header: !Apply:ScreenHeader { title: "Device Status" }
Controls: !VFlow
geometry: 0x35 x 0x0
padding: 5
children:
- !Apply:PVReadWrite
label: "Setpoint:"
entry-pv: "$(P)$(R)Setpoint"
read-pv: "$(P)$(R)Setpoint:RBV"
units: "mm"
- !Apply:PVReadWrite
label: "Speed:"
menu-pv: "$(P)$(R)Speed"
read-pv: "$(P)$(R)Speed:RBV"Generate a screen:
# caQtDM
python gestalt.py --to ui --output hello.ui hello.yml
# CSS-Phoebus (requires phoebusgen)
python gestalt.py --to bob --output hello.bob hello.yml
# PyDM
python gestalt.py --to pydm --output hello_pydm.ui hello.ymlRunning gestalt without arguments launches the GUI, which provides a set of predefined layouts with interactive data editing and file generation:
python gestalt.pyThe GUI requires PyQt5 (pip install pyqt5).