The Parlay Framework

by:
Frances Cohen

Overview

Parlay is the framework developed by Promenade Software for the purpose of making a software system that not only is robust in its functionality, but provides other necessary components of making complex medical devices, including it’s test, tuning, manufacturing needs, and field diagnostics. 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 particularly well suite for complex 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.

The Parlay Components

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.

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… designed for self instrumentation and customization.

The ParlayArchitecture

Below describes the connectivity of protocols, applications, and code to the Parlay broker:

Items, Commands, andProperties

Parlay breaks down communications to the following:

1.    Items. In an object oriented world, this would be the object - the item you are controlling or monitoring, such as a controller, camera, motor, 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.

The Framework makes it Easy

When writing an Item in Python, C++, C# the framework makes it natural to call. Below are snippet of code from a Python item and c++ that is accessible via an Parlay Item. Simple decorators and macros make the item and its functions accessible via Parlay.

Python Parlay Item and command ceclaration using a Decorator
C++ Item, command, and property declarations using Macros in the header
Python Script calling C++ Item Command and Property

The Parlay UI

Below are some of the very basic screen shots from Parlay.

Item Cards

On the left panel are the Items that are available on the Promenade PHiL board. Items can be selected, and an Item Card displayed for control of the item. 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).

Widgets for ease of us

Below is an introduction video for these concepts:

https://promenade.atlassian.net/wiki/x/e4VhN

Use Cases

Table-top Molecular Diagnostic Instrument

The following is our most popular and powerful implementation of Parlay that provides a full user application, plenty of IO, anf the ability to poke and prod, tune, and test thoroughly.

Table-top Diagnostic Use Case

Embedded Linux SOC (ex:iMX8), with a separate MPU (ex: ST32F407) for the IO running Free RTOS and Parlay Firmware. MPU communicates to the SOC 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.

Architecture of system components

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 the items are individually accessible via Parlay, as indicated by the dotted lines.

Drug DeliveryDevice for at-home use

The Parlay system includes BLE on RTOS to mobile, with a React Native framework.

Class III Drug Delivery System

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.

LaboratoryDiagnostic Instrument

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.

Complex Laboratory IVD Instrument

With the Parlay system, a test item can communicate with any item in the system, no matter where are are in the hierarchy. For example, temperature can be monitored and PID loop tuned as part of a scripted test.

Conclusion

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.

Frances is President of Promenade Software and a leading expert on Software for Medical Devices.
frances@promenadesoftware.com
https://www.linkedin.com/in/francescohen
About Promenade Software

Promenade Software, Inc. specializes in software development for medical devices and other safety-critical applications.
Promenade is ISO 13485 and 9001 certified.

Contact

Promenade Software, Inc.
16 Technology Drive, Suite 100
Irvine, CA 92618, U.S.A.
email: info@promenadesoftware.com
phone: (949) 333-4634
Contact Form

© 2020 Promenade Software, Inc.