Parlay is the development and test framework developed by Promenade Software for the purpose of making a software system that not only is robust in its functionality, but provides for the test, tuning, manufacturing needs, and field diagnostics of a medical device. It is particularly useful for the development of systems with physical aspects, such as mechanical and fluidic movement, feedback controls, and physical state. It provides for the monitoring and tuning in development, testing, error simulation, manufacturing support, and field diagnostics. Parlay is extremely well suited for medium to high complexity devices, such as in-vitro diagnostic instruments or drug delivery devices. For simple devices, our Parlay driven Hardware-in-the-Loop test platform (named PHiL) is used to characterize and drive behavior via the electronics.
Below describes the connectivity of protocols, applications, and code to the Parlay broker:
Parlay includes the following components:
1. A Cross Platform communications Broker in Python - this is the message traffic director. Having a Pub/Sub architecture, a discovery process will allow the broker to direct JSON messages without the publisher needing to know the subscribers.
2. A browser-based User Interface with drag-and-drop elements, and configurable widgets with on-screen Python scripting. The UI collects from the broker the "Items" in the system and their controls. Items are the controllable units of the system, such as a motor, valve, camera, etc.
3. Python, Windows .NET, QT, and JS code frameworks so that custom applications easily and naturally communicate across the broker.
4. A C++ firmware codebase (currently on STM32f4, L4, and F7) that interfaces through the broker via USB, CAN, Serial, Ethernet, etc., designed for self-instrumentation and customization. The firmware codebase is broken into 3 main groups, each in separate repositories:
The Parlay Broker is a message broker at the center of communications. Via a discovery process, the broker holds the discovered information from each connected application adapter and protocol so that each JSON message can be routed to its associated target. Targets are Items with ID's, and each Item has Commands and Properties. Any Item in the system can communicate to another Item because of the Broker.
Parlay breaks down communications to the following:
1. Items - In an object-oriented world, this would be the object - the component or unit you are controlling or monitoring, such as a controller, camera, motor, or pump.
2. Commands - These are the Item's accessible functions.
3. Properties - These are the Item's data/variables that can be read, written, or streamed.
Messages are JSON objects which indicate the source and destination of the message, type of message, and data. For differing protocols, messages are converted to the Parlay JSON protocol with a Python Protocol Adapter.
When writing an Item in Python/C++/C#, the framework makes it natural for Items or scripts to call other Items. Below are snippets of code from a Python item and C++ that is accessible via a Parlay Item. Simple decorators and macros make the Item and its functions accessible via Parlay.
The Parlay UI provides a dashboard for seeing and controlling each part of the system. It has a drag-and-drop canvas with both pre-canned "Item Cards" and customizable "Widgets." Item Cards provide access to all of a specific Item's data and controls, and Widgets are more user-friendly screen elements that can be configured to monitor or control Items.
Below are some of the very basic screen shots from Parlay. The first shows the list of Items and some selected Item Cards:
On the left panel are the Items that are available on the Promenade PHiL board. Items can be selected for control and data display. Item cards let you execute commands, get or set properties, and graph properties as they change in real time.
Item cards also let you create a widget from that Item, or copy the equivalent Python code for the command displayed.
Widgets give you the ability to monitor and control the system in a user-friendly display. Widgets can monitor properties, have Python code executed on their events (such as button press).
Watch our introductory video for these concepts.
The following is our most popular and powerful implementation of Parlay that provides a full user application, plenty of IO, and the ability to poke and prod, tune, and test thoroughly.
Embedded Linux SOC (ex:iMX8) is used with a separate MPU (ex: ST32F407) for the IO running Free RTOS and Parlay Firmware. MPU communicates to the SBC via USB.
In this scenario, the Linux SOC hosts the Parlay broker, the Parlay UI, and custom UI. The embedded codebase is on the STM MPU driving the system IO such as valves, motors, temperature, and flow control.
This architecture provides for both the PC-like capabilities of Linux, and device level IO control of a MPU.
The Linux system handles the outside connectivity, User Interface, database and analysis. It will call the firmware system controller for high level commands. The system controller handles the system real-time activity to fulfill the commands, generally in a top-down approach.
All of the Items are individually accessible via Parlay, as indicated by the dotted lines.
The Parlay system includes BLE on RTOS to mobile, with a React Native framework.
Drug delivery devices are increasingly using off-the-shelf mobile units for their control, especially for home use. In this case the mobile unit is running a light Parlay version, communicating to the embedded MPU in the same manner as via USB.
The Parlay Framework is fully extensible to any complexity. Lab instruments often use a Windows front end, with multiple MPUs driving the IO subsystems with real-time control.
With the Parlay system, a test Item can communicate with any Item in the system, no matter where they are in the hierarchy. For example, temperature can be monitored and PID loop tuned as part of a scripted test.
The Parlay framework provides the much-needed framework for medical device development. It provides the development framework, simplified connectivity, and robust test capabilities. It is flexible from small hand-held devices, to point-of-care devices, to floor-top instruments.