Software Overview

Gui Overview - modular design, alarm cards, multiple modalities of input, alarm limits represented consistently across ui

PVP is modularly designed to facilitate future adaptation to new hardware configurations and ventilation modes. APIs were designed for each of the modules to a) make them easily inspected and configured and b) make it clear to future developers how to adapt the system to their needs.

PVP runs as multiple independent processes The GUI provides an interface to control and monitor ventilation, and the controller process handles the ventilation logic and interfaces with the hardware. Inter-process communication is mediated by a coordinator module via xml-rpc. Several ’common’ modules facilitate system configuration and constitute the inter-process API. We designed the API around a uni-fied, configurablevaluesmodule that allow the GUI andcontroller to be reconfigured while also ensuring system robustness and simplicity.

PVP is configured by

  • The Values module parameterizes the different sensor and control values displayed by the GUI and used by the controller

  • The Prefs module creates a prefs.json file in ~/pvp that defines user-specific preferences.

PVP is launched like:

python3 -m pvp.main

And launch options can be displayed with the --help flag.

PVP Modules

GUI

A modular GUI with intuitive controls and a clear alarm system that can be configured to control any parameter or display values from any sensor.

Controller

A module to handle the ventilation logic, build around a gain-adjusted PID controller.

IO

A hardware abstraction layer powered by pigpio that can read/write at >300 Hz

Alarm

Define complex and responsive alarm triggering criteria with human-readable Alarm Rules

Common

Modules that provide the API between the GUI and controller, user preferences, and other utilities