Documentation

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


Feedback sender filter

The feedback sender filter closes the feedback loop with a preceding filter implementing the scgms::IFilter_Feedback_Receiver interface. This could be e.g., an Signal generator filter.

The filter loops any incoming level event with given signal GUID to the feedback receiver.

Configuration

  • Signal_Src_Id (GUID) - signal GUID, that should be looped back to the feedback receiver
  • Remove_From_Source (boolean) - should this filter remove the event from the chain upon sending to the feedback loop?
  • Feedback_Name (string) - feedback link identifier; this should be identical to the feedback receiver identifier

Supported interfaces

  • scgms::IFilter_Feedback_Sender

General function

Once all the filters are instantiated, the SmartCGMS factory library links all the feedback loops based on the configured feedback names (Feedback_Name configuration parameter). When a pair with matching names is found, it calls the HRESULT Sink(scgms::IFilter_Feedback_Receiver *receiver) method on the sender instance to establish the feedback link.

If the feedback link is successfully established, every time an event with the configured GUID passes this filter, the filter sends it to the linked feedback receiver. Please, be aware, that the original event and the event passing through the feedback link cannot be distinguished, as the feedback sender calls the Execute method on the receiver.

An usual setup assumes, that the feedback link passes an event with signal GUID, that is later changed in filters between the linked filters. For example, if one filter calculates the requested insulin bolus dosage, it emits the device event with scgms::signal_Requested_Insulin_Bolus. The event passes through the feedback link and reaches the feedback receiver, e.g., the insulin pump controller. The controller then changes the requested insulin bolus dosage to delivered insulin bolus, i.e, scgms::signal_Delivered_Insulin_Bolus, so that the event does not pass the feedback loop again.

If the event passes through the feedback loop multiple times, it is not necessarily considered an error. As the feedback link is executed synchronously, every time the event passes, a recursive call is invoked. If the recursion would reach the level of 10, i.e., the same event loops 10 times, an error is indicated and the event does not loop again.