Let us assume a device having three different modes that can (and most likely will) be selected during the surgery:
a) normal working mode
b) working mode for special situation 1
c) working mode for special situation 2
Only one mode a, b, and c can be selected at any point of time.
The mode may be manufacturer specific.
To make things easy, let us assume that there are two parameters influences by these three modes:
What I like to model is which different parameters values are active and which parameter values will be active if another mode is selected. The parameter values shall be configurable no matter whether the mode is selected or not.
For example:
a) normal mode: pressure = 15mmHg; flow = 10l/min
b) high flow mode: pressure = 16mmHg; flow = 20 l/min
c) high pressure mode: pressure = 25mmHg; flow = 8l/min
In my opinion, manufacturer-specific, proprietary codes shall be avoided as much as possible.
Consequently, I see the following design questions:
My idea
Advantages:
Disadvantages:
Idea to cope with disadvantage "having on/off-metrics"
Group the pre-settings into channels and use the activation state of the channel to model the mode on/off
** disadvantages **
I read the whole ticket again and I am still 100% convinced that this is exactly what we intended to solve with the "program" pattern.
@martinuro: Please elaborate on the difference (or we can schedule a call).