Parlay Firmware design

Design Overview 

The Parlaytm firmware codebase uses a C++ object oriented, single threaded, architecture. It has a clear and repeated and extensible design pan for easy project implementation and maintenance. This single threaded architecture prevents the threading and blocking perils that can cause intermittent instabilities. It also supports full software instrumentation - with external control and visibility throughout.

The Parlay instrumentation is accomplished by providing message based interface to the functions and variables of the C++ class. A preprocessor identifies those functions and variables that should be accessible, and generates the code to interface. In this manner, the internal member functions and variables can be called, set and streamed.

Main Elements

There are 4 main design elements:

  • Items - C++ object that can receive messages.  The codebase is comprised of items - from controllers to drivers.
  • Messages - a structure of data that is passed between items. Messages are of type order, response, and notification. Messages can be sent to/from remote or internal items.
  • Message Pump - A special singleton item that handles the message queue, and routes the messages to the proper recipient.  This item also manages timed events, and routing responses to callback functions.
  • Preprocessor - Scans the codebase to generate the discovery information of commands and properties of Items.

The Message Pump

Messages provide the intra-communications between items in the system. For example, a controller will send a message to a SPI based sensor driver to read an ADC. When the data is received a response message is sent back to the original caller with the data. 

message pump

Instrumentation Built In

Communications between sub-systems, and the Parlay test tool. The functions and variables of each Item of each subsystem are "discovered", and made accessible as commands and properties respectively. This allows for external control of components, and monitoring of data - i.e. instrumentation.

The items in a subsystem are hierarchical - generally each item controls the items of the next level. However from Parlay test UI, all items can be accessed. For example,  a temperature control item can be started with a chosen target temperature. The subsequent thermistor sensor response can be streamed and graphed live on the PC.

Software Instrumentation Built In


The embedded codebase communicates with the above described message which is the same over all communications links. The packaging of the message may change from protocol to protocol, but the content is always a messages. Unless the codebase is communicating to other embedded system, the communications on the other side will handle the discovery of items and translation of the message structure to a JSON message.  For example, a typical system would look like the following:

 embedded codebase communicates

For Bluetooth BLE communications, the BLE characteristics are translated into the message protocol of the firmware, making simple, discoverable controls from a mobile device.

For multiple subsystems in a system, the following scheme could be applied:

 embedded codebase communicates
Parlay screenshot

No matter the complexity of the system, the commands and properties of all system Items are accessible and controllable from the Parlay UI and scripting.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Promenade Software, Inc. specializes in software development for medical devices and other safety-critical applications.
Promenade is ISO 13485, and CypherMed Cloud is SOC2 Type II certified.

© 2022 Promenade Software, Inc.