This page hosts the documentation of the SmartCGMS software architecture and all of its components.

The documentation is being updated to acommodate the recent improvements. Please, be patient, we are working on it...

Developer zone

Welcome to SmartCGMS developer zone. This is the home of SmartCGMS documentation.

SmartCGMS is a software architecture and framework for signal processing. It comprises a set of configurable, interchangable modules, which may be used for signal synthesis, analysis, error calculation and much more. Each configuration connects a number of top-level modules called filters. Filters are connected in a linear uni-directional chain, where each subsequent filters communicate by sending messages in forward direction. The message passes from message source to the end of the chain. Each filter may read, modify or consume (destroy) the message, depending on its implementation. In SmartCGMS architecture, we refer to the message as to a device event. The device event structure is further described in a separate page.

Every entity (filter, signal, ...) is identified by an unique GUID. It also has to export a descriptor via standard library interface. This descriptor contains all information needed to create an entity and pass a set of parameters, if needed.

A common scenario typically includes one device event source at the beginning of the chain. Then, a number of signal processing filters follow. Usually, there are one or more output filters at the end of the chain, which generates outputs (e.g. drawings), stores the simulation result into a log file and so on.

One such example of a scenario may be the following setup:

Simplified scenario

This is a very simplified scenario, where one filter reads previously measured CGM profile from database (regulated with insulin pump only), the following filter calculating the signal of a LGS controller algorithm, and the next filter evaluating the average differences between the profile-recorded treatment and newly calculated treatment. Also, the whole simulation is rendered into SVG drawings and logged into a file.

What is a typical device event source?

  • a database reading filter, which reads a set of previously measured (CGM) values from database
  • a log replay filter, which replays previously stored simulation state
  • an asynchronous signal generator filter with a given discrete model (e.g. a metabolism model)
  • and so on...

What is a typical signal processing filter?

  • a synchronous signal generator filter, synchronized to a source signal
  • a signal mapping filter, changing the GUID of signal (and as a result, changes its meaning)
  • a signal masking filter, masking the signal values using a bit mask, to create training/testing dataset
  • a calculated signal filter, calculating another signal value based on newly received signal level
  • and so on...

What is a typical output filter?

  • a drawing filter, creating plots and figures of available signals
  • a log filter, storing all device events to a log file
  • an error metric filter, calculating error metric between a reference and an error signal
  • and so on...

What other kind of filters can I use?

  • a native scripting filter, running a custom C++ script from a file
  • a noise generator filter, enhancing a signal with noise
  • a feedback sender filter, to create a feedback loop, obtaining e.g.; closed loop control system
  • and any other filter you develop