values¶
Parameterization of variables and values
Data
Values to control but not monitor. |
|
Values that should be displayed in the GUI. |
|
Values that should be displayed in the GUI. |
|
Values that are dependent on other values: |
|
Values to monitor but not control. |
Classes
|
Definition of a value. |
|
An enumeration. |
-
class
pvp.common.values.
ValueName
(value)[source]¶ Bases:
enum.Enum
An enumeration.
Attributes
int([x]) -> integer
int([x]) -> integer
int([x]) -> integer
int([x]) -> integer
int([x]) -> integer
int([x]) -> integer
int([x]) -> integer
int([x]) -> integer
int([x]) -> integer
int([x]) -> integer
int([x]) -> integer
-
PIP
= 1¶
-
PIP_TIME
= 2¶
-
PEEP
= 3¶
-
PEEP_TIME
= 4¶
-
BREATHS_PER_MINUTE
= 5¶
-
INSPIRATION_TIME_SEC
= 6¶
-
IE_RATIO
= 7¶
-
FIO2
= 8¶
-
VTE
= 9¶
-
PRESSURE
= 10¶
-
FLOWOUT
= 11¶
-
-
class
pvp.common.values.
Value
(name: str, units: str, abs_range: tuple, safe_range: tuple, decimals: int, control: bool, sensor: bool, display: bool, plot: bool = False, plot_limits: Union[None, Tuple[pvp.common.values.ValueName]] = None, control_type: Union[None, str] = None, group: Union[None, dict] = None, default: (<class 'int'>, <class 'float'>) = None)[source]¶ Bases:
object
Definition of a value.
Used by the GUI and control module to set defaults.
- Parameters
name (str) – Human-readable name of the value
units (str) – Human-readable description of units
abs_range (tuple) – tuple of ints or floats setting the logical limit of the value, eg. a percent between 0 and 100, (0, 100)
safe_range (tuple) –
tuple of ints or floats setting the safe ranges of the value,
note:
this is not the same thing as the user-set alarm values, though the user-set alarm values are initialized as ``safe_range``.
decimals (int) – the number of decimals of precision used when displaying the value
display (bool) – whether the value should be displayed in the monitor. if
control == True
, automatically set toFalse
because all controls have their own numerical displaysplot (bool) – whether or not the value is plottable int he center plot window
plot_limits (None, tuple(ValueName)) – If plottable, and the plotted value has some alarm limits for another value, plot those limits as horizontal lines in the plot. eg. the PIP alarm range limits should be plotted on the Pressure plot
Methods
__init__
(name, units, abs_range, safe_range, …)Definition of a value.
to_dict
()Attributes
-
__init__
(name: str, units: str, abs_range: tuple, safe_range: tuple, decimals: int, control: bool, sensor: bool, display: bool, plot: bool = False, plot_limits: Union[None, Tuple[pvp.common.values.ValueName]] = None, control_type: Union[None, str] = None, group: Union[None, dict] = None, default: (<class 'int'>, <class 'float'>) = None)[source]¶ Definition of a value.
Used by the GUI and control module to set defaults.
- Parameters
name (str) – Human-readable name of the value
units (str) – Human-readable description of units
abs_range (tuple) – tuple of ints or floats setting the logical limit of the value, eg. a percent between 0 and 100, (0, 100)
safe_range (tuple) –
tuple of ints or floats setting the safe ranges of the value,
note:
this is not the same thing as the user-set alarm values, though the user-set alarm values are initialized as ``safe_range``.
decimals (int) – the number of decimals of precision used when displaying the value
display (bool) – whether the value should be displayed in the monitor. if
control == True
, automatically set toFalse
because all controls have their own numerical displaysplot (bool) – whether or not the value is plottable int he center plot window
plot_limits (None, tuple(ValueName)) – If plottable, and the plotted value has some alarm limits for another value, plot those limits as horizontal lines in the plot. eg. the PIP alarm range limits should be plotted on the Pressure plot
-
property
name
¶
-
property
abs_range
¶
-
property
safe_range
¶
-
property
decimals
¶
-
property
default
¶
-
property
control
¶
-
property
sensor
¶
-
property
display
¶
-
property
control_type
¶
-
property
group
¶
-
property
plot
¶
-
property
plot_limits
¶
-
pvp.common.values.
SENSOR
= OrderedDict([(<ValueName.PIP: 1>, <pvp.common.values.Value object>), (<ValueName.PEEP: 3>, <pvp.common.values.Value object>), (<ValueName.BREATHS_PER_MINUTE: 5>, <pvp.common.values.Value object>), (<ValueName.INSPIRATION_TIME_SEC: 6>, <pvp.common.values.Value object>), (<ValueName.PRESSURE: 10>, <pvp.common.values.Value object>), (<ValueName.VTE: 9>, <pvp.common.values.Value object>), (<ValueName.FLOWOUT: 11>, <pvp.common.values.Value object>), (<ValueName.FIO2: 8>, <pvp.common.values.Value object>)])¶ Values to monitor but not control.
Used to set alarms for out-of-bounds sensor values. These should be sent from the control module and not computed.:
{ 'name' (str): Human readable name, 'units' (str): units string, (like degrees or %), 'abs_range' (tuple): absolute possible range of values, 'safe_range' (tuple): range outside of which a warning will be raised, 'decimals' (int): The number of decimals of precision this number should be displayed with }
-
pvp.common.values.
CONTROL
= OrderedDict([(<ValueName.PIP: 1>, <pvp.common.values.Value object>), (<ValueName.PEEP: 3>, <pvp.common.values.Value object>), (<ValueName.BREATHS_PER_MINUTE: 5>, <pvp.common.values.Value object>), (<ValueName.INSPIRATION_TIME_SEC: 6>, <pvp.common.values.Value object>), (<ValueName.IE_RATIO: 7>, <pvp.common.values.Value object>), (<ValueName.PIP_TIME: 2>, <pvp.common.values.Value object>), (<ValueName.PEEP_TIME: 4>, <pvp.common.values.Value object>)])¶ Values to control but not monitor.
Sent to control module to control operation of ventilator.:
{ 'name' (str): Human readable name, 'units' (str): units string, (like degrees or %), 'abs_range' (tuple): absolute possible range of values, 'safe_range' (tuple): range outside of which a warning will be raised, 'default' (int, float): the default value of the parameter, 'decimals' (int): The number of decimals of precision this number should be displayed with }
-
pvp.common.values.
DISPLAY_MONITOR
= OrderedDict([(<ValueName.PIP: 1>, <pvp.common.values.Value object>), (<ValueName.PEEP: 3>, <pvp.common.values.Value object>), (<ValueName.BREATHS_PER_MINUTE: 5>, <pvp.common.values.Value object>), (<ValueName.INSPIRATION_TIME_SEC: 6>, <pvp.common.values.Value object>), (<ValueName.PRESSURE: 10>, <pvp.common.values.Value object>), (<ValueName.VTE: 9>, <pvp.common.values.Value object>), (<ValueName.FLOWOUT: 11>, <pvp.common.values.Value object>), (<ValueName.FIO2: 8>, <pvp.common.values.Value object>)])¶ Values that should be displayed in the GUI. If a value is also a CONTROL it will always have the measured value displayed, these values are those that are sensor values that are uncontrolled and should be displayed.
-
pvp.common.values.
DISPLAY_CONTROL
= OrderedDict([(<ValueName.PIP: 1>, <pvp.common.values.Value object>), (<ValueName.PEEP: 3>, <pvp.common.values.Value object>), (<ValueName.BREATHS_PER_MINUTE: 5>, <pvp.common.values.Value object>), (<ValueName.INSPIRATION_TIME_SEC: 6>, <pvp.common.values.Value object>), (<ValueName.IE_RATIO: 7>, <pvp.common.values.Value object>), (<ValueName.PIP_TIME: 2>, <pvp.common.values.Value object>)])¶ Values that should be displayed in the GUI. If a value is also a CONTROL it will always have the measured value displayed, these values are those that are sensor values that are uncontrolled and should be displayed.
-
pvp.common.values.
LIMITS
= {}¶ Values that are dependent on other values:
{ "dependent_value": ( ['value_1', 'value_2'], callable_returning_boolean } }
Where the first argument in the tuple is a list of the values that will be given as argument to the
callable_returning_boolean
which will return whether (True
) or not (False
) a value is allowed.