SEMechanicalVentilatorSettings.h
1/* Distributed under the Apache License, Version 2.0.
2 See accompanying NOTICE file for details.*/
3
4#pragma once
5#include "cdm/CommonDefs.h"
6#include "cdm/substance/SESubstanceManager.h"
7#include "cdm/substance/SESubstanceConcentration.h"
8#include "cdm/substance/SESubstanceFraction.h"
9
11
13{
14 friend class PBMechanicalVentilator;//friend the serialization class
15public:
16
19
20 virtual void Clear();
21
22 bool SerializeToString(std::string& output, eSerializationFormat m) const;
23 bool SerializeToFile(const std::string& filename) const;
24 bool SerializeFromString(const std::string& src, eSerializationFormat m, const SESubstanceManager& subMgr);
25 bool SerializeFromFile(const std::string& filename, const SESubstanceManager& subMgr);
26
27 virtual void Merge(const SEMechanicalVentilatorSettings& from, SESubstanceManager& subMgr);
28 virtual void ProcessConfiguration(SEMechanicalVentilatorConfiguration& config, SESubstanceManager& subMgr);
29
30 virtual const SEScalar* GetScalar(const std::string& name);
31
32 virtual bool HasConnection() const;
33 virtual eSwitch GetConnection() const;
34 virtual void SetConnection(eSwitch c);
35
36 virtual bool HasConnectionVolume() const;
37 virtual SEScalarVolume& GetConnectionVolume();
38 virtual double GetConnectionVolume(const VolumeUnit& unit) const;
39
40 virtual bool HasCompliance() const;
41 virtual SEScalarVolumePerPressure& GetCompliance();
42 virtual double GetCompliance(const VolumePerPressureUnit& unit) const;
43
44 virtual bool HasDriverDampingParameter() const;
45 virtual SEScalarFrequency& GetDriverDampingParameter();
46 virtual double GetDriverDampingParameter(const FrequencyUnit& unit) const;
47
48 virtual bool HasPositiveEndExpiratoryPressure() const;
49 virtual SEScalarPressure& GetPositiveEndExpiratoryPressure();
50 virtual double GetPositiveEndExpiratoryPressure(const PressureUnit& unit) const;
51
52 virtual bool HasFunctionalResidualCapacity() const;
53 virtual SEScalarPressure& GetFunctionalResidualCapacity();
54 virtual double GetFunctionalResidualCapacity(const PressureUnit& unit) const;
55
56 virtual bool HasExpirationCycleFlow() const;
57 virtual SEScalarVolumePerTime& GetExpirationCycleFlow();
58 virtual double GetExpirationCycleFlow(const VolumePerTimeUnit& unit) const;
59
60 virtual bool HasExpirationCyclePressure() const;
61 virtual SEScalarPressure& GetExpirationCyclePressure();
62 virtual double GetExpirationCyclePressure(const PressureUnit& unit) const;
63
64 virtual bool HasExpirationCycleVolume() const;
65 virtual SEScalarVolume& GetExpirationCycleVolume();
66 virtual double GetExpirationCycleVolume(const VolumeUnit& unit) const;
67
68 virtual bool HasExpirationCycleTime() const;
69 virtual SEScalarTime& GetExpirationCycleTime();
70 virtual double GetExpirationCycleTime(const TimeUnit& unit) const;
71
72 virtual bool HasExpirationCycleRespiratoryModel() const;
73 virtual eSwitch GetExpirationCycleRespiratoryModel() const;
74 virtual void SetExpirationCycleRespiratoryModel(eSwitch c);
75
76 virtual bool HasExpirationTubeResistance() const;
77 virtual SEScalarPressureTimePerVolume& GetExpirationTubeResistance();
78 virtual double GetExpirationTubeResistance(const PressureTimePerVolumeUnit& unit) const;
79
80 virtual bool HasExpirationValveResistance() const;
81 virtual SEScalarPressureTimePerVolume& GetExpirationValveResistance();
82 virtual double GetExpirationValveResistance(const PressureTimePerVolumeUnit& unit) const;
83
84 virtual bool HasExpirationWaveform() const;
85 virtual eDriverWaveform GetExpirationWaveform() const;
86 virtual void SetExpirationWaveform(eDriverWaveform w);
87
88 virtual bool HasExpirationWaveformPeriod() const;
89 virtual SEScalarTime& GetExpirationWaveformPeriod();
90 virtual double GetExpirationWaveformPeriod(const TimeUnit& unit) const;
91
92 virtual bool HasInspirationLimitFlow() const;
93 virtual SEScalarVolumePerTime& GetInspirationLimitFlow();
94 virtual double GetInspirationLimitFlow(const VolumePerTimeUnit& unit) const;
95
96 virtual bool HasInspirationLimitPressure() const;
97 virtual SEScalarPressure& GetInspirationLimitPressure();
98 virtual double GetInspirationLimitPressure(const PressureUnit& unit) const;
99
100 virtual bool HasInspirationLimitVolume() const;
101 virtual SEScalarVolume& GetInspirationLimitVolume();
102 virtual double GetInspirationLimitVolume(const VolumeUnit& unit) const;
103
104 virtual bool HasInspirationPauseTime() const;
105 virtual SEScalarTime& GetInspirationPauseTime();
106 virtual double GetInspirationPauseTime(const TimeUnit& unit) const;
107
108 virtual bool HasPeakInspiratoryPressure() const;
109 virtual SEScalarPressure& GetPeakInspiratoryPressure();
110 virtual double GetPeakInspiratoryPressure(const PressureUnit& unit) const;
111
112 virtual bool HasInspirationTargetFlow() const;
113 virtual SEScalarVolumePerTime& GetInspirationTargetFlow();
114 virtual double GetInspirationTargetFlow(const VolumePerTimeUnit& unit) const;
115
116 virtual bool HasInspirationMachineTriggerTime() const;
117 virtual SEScalarTime& GetInspirationMachineTriggerTime();
118 virtual double GetInspirationMachineTriggerTime(const TimeUnit& unit) const;
119
120 virtual bool HasInspirationPatientTriggerFlow() const;
121 virtual SEScalarVolumePerTime& GetInspirationPatientTriggerFlow();
122 virtual double GetInspirationPatientTriggerFlow(const VolumePerTimeUnit& unit) const;
123
124 virtual bool HasInspirationPatientTriggerPressure() const;
125 virtual SEScalarPressure& GetInspirationPatientTriggerPressure();
126 virtual double GetInspirationPatientTriggerPressure(const PressureUnit& unit) const;
127
128 virtual bool HasInspirationPatientTriggerRespiratoryModel() const;
129 virtual eSwitch GetInspirationPatientTriggerRespiratoryModel() const;
130 virtual void SetInspirationPatientTriggerRespiratoryModel(eSwitch c);
131
132 virtual bool HasInspirationTubeResistance() const;
133 virtual SEScalarPressureTimePerVolume& GetInspirationTubeResistance();
134 virtual double GetInspirationTubeResistance(const PressureTimePerVolumeUnit& unit) const;
135
136 virtual bool HasInspirationValveResistance() const;
137 virtual SEScalarPressureTimePerVolume& GetInspirationValveResistance();
138 virtual double GetInspirationValveResistance(const PressureTimePerVolumeUnit& unit) const;
139
140 virtual bool HasExpirationLimbVolume() const;
141 virtual SEScalarVolume& GetExpirationLimbVolume();
142 virtual double GetExpirationLimbVolume(const VolumeUnit& unit) const;
143
144 virtual bool HasExpirationValveVolume() const;
145 virtual SEScalarVolume& GetExpirationValveVolume();
146 virtual double GetExpirationValveVolume(const VolumeUnit& unit) const;
147
148 virtual bool HasInspirationLimbVolume() const;
149 virtual SEScalarVolume& GetInspirationLimbVolume();
150 virtual double GetInspirationLimbVolume(const VolumeUnit& unit) const;
151
152 virtual bool HasInspirationValveVolume() const;
153 virtual SEScalarVolume& GetInspirationValveVolume();
154 virtual double GetInspirationValveVolume(const VolumeUnit& unit) const;
155
156 virtual bool HasReliefValveThreshold() const;
157 virtual SEScalarPressure& GetReliefValveThreshold();
158 virtual double GetReliefValveThreshold(const PressureUnit& unit) const;
159
160 virtual bool HasYPieceVolume() const;
161 virtual SEScalarVolume& GetYPieceVolume();
162 virtual double GetYPieceVolume(const VolumeUnit& unit) const;
163
164 virtual bool HasInspirationWaveform() const;
165 virtual eDriverWaveform GetInspirationWaveform() const;
166 virtual void SetInspirationWaveform(eDriverWaveform w);
167
168 virtual bool HasInspirationWaveformPeriod() const;
169 virtual SEScalarTime& GetInspirationWaveformPeriod();
170 virtual double GetInspirationWaveformPeriod(const TimeUnit& unit) const;
171
172 bool HasFractionInspiredGas() const;
173 bool HasFractionInspiredGas(const SESubstance& substance) const;
174 const std::vector<SESubstanceFraction*>& GetFractionInspiredGases();
175 const std::vector<const SESubstanceFraction*>& GetFractionInspiredGases() const;
176 SESubstanceFraction& GetFractionInspiredGas(const SESubstance& substance);
177 const SESubstanceFraction* GetFractionInspiredGas(const SESubstance& substance) const;
178 void RemoveFractionInspiredGas(const SESubstance& substance);
179 void RemoveFractionInspiredGases();
180
181 bool HasConcentrationInspiredAerosol() const;
182 bool HasConcentrationInspiredAerosol(const SESubstance& substance) const;
183 const std::vector<SESubstanceConcentration*>& GetConcentrationInspiredAerosols();
184 const std::vector<const SESubstanceConcentration*>& GetConcentrationInspiredAerosols() const;
185 SESubstanceConcentration& GetConcentrationInspiredAerosol(const SESubstance& substance);
186 const SESubstanceConcentration* GetConcentrationInspiredAerosol(const SESubstance& substance) const;
187 void RemoveConcentrationInspiredAerosol(const SESubstance& substance);
188 void RemoveConcentrationInspiredAerosols();
189
190protected:
191
196
197 // Expiratory Baseline Properties (Only set 1)
200
201 // Expriatory Cycle Properties (Only Set 1)
207
212 eDriverWaveform m_ExpirationWaveform;
214
215 // Inspiratory Limit Properties (Only set 1)
219
221
222 // Inspiratory Target Properties (Only set 1)
225
226 // Inspiratory Machine Trigger Properties (Only set 1)
228
229 // Inspiratory Patient Trigger Properties (Only set 1)
233
238 eDriverWaveform m_InspirationWaveform;
240
243
244 std::vector<SESubstanceFraction*> m_FractionInspiredGases;
245 std::vector<const SESubstanceFraction*> m_cFractionInspiredGases;
246
247 std::vector<SESubstanceConcentration*> m_ConcentrationInspiredAerosols;
248 std::vector<const SESubstanceConcentration*> m_cConcentrationInspiredAerosols;
249};
Definition: SEScalarFrequency.h:8
Definition: Logger.h:23
Definition: Logger.h:71
Definition: PBMechanicalVentilator.h:10
static bool SerializeFromFile(const std::string &filename, SEMechanicalVentilatorSettings &dst, const SESubstanceManager &subMgr)
Definition: PBMechanicalVentilator.cpp:388
static bool SerializeFromString(const std::string &src, SEMechanicalVentilatorSettings &dst, eSerializationFormat m, const SESubstanceManager &subMgr)
Definition: PBMechanicalVentilator.cpp:380
static bool SerializeToFile(const SEMechanicalVentilatorSettings &src, const std::string &filename)
Definition: PBMechanicalVentilator.cpp:373
static bool SerializeToString(const SEMechanicalVentilatorSettings &src, std::string &output, eSerializationFormat m)
Definition: PBMechanicalVentilator.cpp:367
Definition: SEScalarPressureTimePerVolume.h:8
Definition: SEScalarPressure.h:8
Definition: SEMechanicalVentilatorConfiguration.h:9
Definition: SEMechanicalVentilatorSettings.h:13
eSwitch m_Connection
Definition: SEMechanicalVentilatorSettings.h:192
SEScalarFrequency * m_DriverDampingParameter
Definition: SEMechanicalVentilatorSettings.h:195
SEScalarVolumePerPressure * m_Compliance
Definition: SEMechanicalVentilatorSettings.h:194
SEScalarVolume * m_InspirationLimbVolume
Definition: SEMechanicalVentilatorSettings.h:236
std::vector< const SESubstanceConcentration * > m_cConcentrationInspiredAerosols
Definition: SEMechanicalVentilatorSettings.h:248
SEScalarVolumePerTime * m_InspirationLimitFlow
Definition: SEMechanicalVentilatorSettings.h:216
SEScalarPressure * m_ReliefValveThreshold
Definition: SEMechanicalVentilatorSettings.h:242
SEScalarPressureTimePerVolume * m_InspirationTubeResistance
Definition: SEMechanicalVentilatorSettings.h:234
eDriverWaveform m_ExpirationWaveform
Definition: SEMechanicalVentilatorSettings.h:212
SEScalarPressure * m_PositiveEndExpiratoryPressure
Definition: SEMechanicalVentilatorSettings.h:198
SEScalarPressure * m_FunctionalResidualCapacity
Definition: SEMechanicalVentilatorSettings.h:199
SEScalarVolume * m_ExpirationLimbVolume
Definition: SEMechanicalVentilatorSettings.h:210
std::vector< const SESubstanceFraction * > m_cFractionInspiredGases
Definition: SEMechanicalVentilatorSettings.h:245
eSwitch m_InspirationPatientTriggerRespiratoryModel
Definition: SEMechanicalVentilatorSettings.h:232
SEScalarTime * m_ExpirationCycleTime
Definition: SEMechanicalVentilatorSettings.h:205
SEScalarTime * m_InspirationWaveformPeriod
Definition: SEMechanicalVentilatorSettings.h:239
SEScalarVolume * m_InspirationValveVolume
Definition: SEMechanicalVentilatorSettings.h:237
SEScalarTime * m_InspirationMachineTriggerTime
Definition: SEMechanicalVentilatorSettings.h:227
SEScalarTime * m_InspirationPauseTime
Definition: SEMechanicalVentilatorSettings.h:220
SEScalarVolume * m_InspirationLimitVolume
Definition: SEMechanicalVentilatorSettings.h:218
SEScalarVolumePerTime * m_InspirationTargetFlow
Definition: SEMechanicalVentilatorSettings.h:224
SEScalarVolume * m_YPieceVolume
Definition: SEMechanicalVentilatorSettings.h:241
std::vector< SESubstanceFraction * > m_FractionInspiredGases
Definition: SEMechanicalVentilatorSettings.h:244
SEScalarPressure * m_PeakInspiratoryPressure
Definition: SEMechanicalVentilatorSettings.h:223
SEScalarVolume * m_ExpirationValveVolume
Definition: SEMechanicalVentilatorSettings.h:211
SEScalarVolume * m_ConnectionVolume
Definition: SEMechanicalVentilatorSettings.h:193
SEScalarPressureTimePerVolume * m_InspirationValveResistance
Definition: SEMechanicalVentilatorSettings.h:235
SEScalarPressure * m_InspirationLimitPressure
Definition: SEMechanicalVentilatorSettings.h:217
SEScalarVolumePerTime * m_ExpirationCycleFlow
Definition: SEMechanicalVentilatorSettings.h:202
SEScalarPressure * m_ExpirationCyclePressure
Definition: SEMechanicalVentilatorSettings.h:203
std::vector< SESubstanceConcentration * > m_ConcentrationInspiredAerosols
Definition: SEMechanicalVentilatorSettings.h:247
eSwitch m_ExpirationCycleRespiratoryModel
Definition: SEMechanicalVentilatorSettings.h:206
SEScalarPressureTimePerVolume * m_ExpirationValveResistance
Definition: SEMechanicalVentilatorSettings.h:209
SEScalarVolume * m_ExpirationCycleVolume
Definition: SEMechanicalVentilatorSettings.h:204
SEScalarPressureTimePerVolume * m_ExpirationTubeResistance
Definition: SEMechanicalVentilatorSettings.h:208
SEScalarVolumePerTime * m_InspirationPatientTriggerFlow
Definition: SEMechanicalVentilatorSettings.h:230
eDriverWaveform m_InspirationWaveform
Definition: SEMechanicalVentilatorSettings.h:238
SEScalarPressure * m_InspirationPatientTriggerPressure
Definition: SEMechanicalVentilatorSettings.h:231
SEScalarTime * m_ExpirationWaveformPeriod
Definition: SEMechanicalVentilatorSettings.h:213
Definition: SEScalarFrequency.h:26
Definition: SEScalar.h:19
Definition: SEScalarPressure.h:29
Definition: SEScalarPressureTimePerVolume.h:29
Definition: SEScalarTime.h:28
Definition: SEScalarVolume.h:28
Definition: SEScalarVolumePerPressure.h:28
Definition: SEScalarVolumePerTime.h:32
Definition: SESubstanceConcentration.h:11
Definition: SESubstanceFraction.h:10
Definition: SESubstance.h:15
Definition: SESubstanceManager.h:9
Definition: SEScalarTime.h:8
Definition: SEScalarVolumePerPressure.h:8
Definition: SEScalarVolumePerTime.h:8
Definition: SEScalarVolume.h:8

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.