<
The Pulse Team is excited to announce the Pulse Physiology Engine 4.1.0 release. Upgrade now to get the best in dynamic simulation.
×
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 
12 // Keep enums in sync with appropriate schema/cdm/MechanicalVentilator.proto file !!
13 enum class eMechanicalVentilator_DriverWaveform { NullDriverWaveform = 0, Square, Exponential, Ramp, Sinusoidal, Sigmoidal };
14 extern const std::string& eMechanicalVentilator_DriverWaveform_Name(eMechanicalVentilator_DriverWaveform m);
15 
17 {
18  friend class PBMechanicalVentilator;//friend the serialization class
19 public:
20 
23 
24  virtual void Clear();
25 
26  bool SerializeToString(std::string& output, eSerializationFormat m) const;
27  bool SerializeToFile(const std::string& filename) const;
28  bool SerializeFromString(const std::string& src, eSerializationFormat m, const SESubstanceManager& subMgr);
29  bool SerializeFromFile(const std::string& filename, const SESubstanceManager& subMgr);
30 
31  virtual void Merge(const SEMechanicalVentilatorSettings& from, SESubstanceManager& subMgr);
32  virtual void ProcessConfiguration(SEMechanicalVentilatorConfiguration& config, SESubstanceManager& subMgr);
33 
34  virtual const SEScalar* GetScalar(const std::string& name);
35 
36  virtual eSwitch GetConnection() const;
37  virtual void SetConnection(eSwitch c);
38 
39  virtual bool HasConnectionVolume() const;
40  virtual SEScalarVolume& GetConnectionVolume();
41  virtual double GetConnectionVolume(const VolumeUnit& unit) const;
42 
43  virtual bool HasCompliance() const;
44  virtual SEScalarVolumePerPressure& GetCompliance();
45  virtual double GetCompliance(const VolumePerPressureUnit& unit) const;
46 
47  virtual bool HasDriverDampingParameter() const;
48  virtual SEScalarFrequency& GetDriverDampingParameter();
49  virtual double GetDriverDampingParameter(const FrequencyUnit& unit) const;
50 
51  virtual bool HasPositiveEndExpiredPressure() const;
52  virtual SEScalarPressure& GetPositiveEndExpiredPressure();
53  virtual double GetPositiveEndExpiredPressure(const PressureUnit& unit) const;
54 
55  virtual bool HasFunctionalResidualCapacity() const;
56  virtual SEScalarPressure& GetFunctionalResidualCapacity();
57  virtual double GetFunctionalResidualCapacity(const PressureUnit& unit) const;
58 
59  virtual bool HasExpirationCycleFlow() const;
60  virtual SEScalarVolumePerTime& GetExpirationCycleFlow();
61  virtual double GetExpirationCycleFlow(const VolumePerTimeUnit& unit) const;
62 
63  virtual bool HasExpirationCyclePressure() const;
64  virtual SEScalarPressure& GetExpirationCyclePressure();
65  virtual double GetExpirationCyclePressure(const PressureUnit& unit) const;
66 
67  virtual bool HasExpirationCycleVolume() const;
68  virtual SEScalarVolume& GetExpirationCycleVolume();
69  virtual double GetExpirationCycleVolume(const VolumeUnit& unit) const;
70 
71  virtual bool HasExpirationCycleTime() const;
72  virtual SEScalarTime& GetExpirationCycleTime();
73  virtual double GetExpirationCycleTime(const TimeUnit& unit) const;
74 
75  virtual eSwitch GetExpirationCycleRespiratoryModel() const;
76  virtual void SetExpirationCycleRespiratoryModel(eSwitch c);
77 
78  virtual bool HasExpirationTubeResistance() const;
79  virtual SEScalarPressureTimePerVolume& GetExpirationTubeResistance();
80  virtual double GetExpirationTubeResistance(const PressureTimePerVolumeUnit& unit) const;
81 
82  virtual bool HasExpirationValveResistance() const;
83  virtual SEScalarPressureTimePerVolume& GetExpirationValveResistance();
84  virtual double GetExpirationValveResistance(const PressureTimePerVolumeUnit& unit) const;
85 
86  virtual eMechanicalVentilator_DriverWaveform GetExpirationWaveform() const;
87  virtual void SetExpirationWaveform(eMechanicalVentilator_DriverWaveform w);
88 
89  virtual bool HasExpirationWaveformPeriod() const;
90  virtual SEScalarTime& GetExpirationWaveformPeriod();
91  virtual double GetExpirationWaveformPeriod(const TimeUnit& unit) const;
92 
93  virtual bool HasInspirationLimitFlow() const;
94  virtual SEScalarVolumePerTime& GetInspirationLimitFlow();
95  virtual double GetInspirationLimitFlow(const VolumePerTimeUnit& unit) const;
96 
97  virtual bool HasInspirationLimitPressure() const;
98  virtual SEScalarPressure& GetInspirationLimitPressure();
99  virtual double GetInspirationLimitPressure(const PressureUnit& unit) const;
100 
101  virtual bool HasInspirationLimitVolume() const;
102  virtual SEScalarVolume& GetInspirationLimitVolume();
103  virtual double GetInspirationLimitVolume(const VolumeUnit& unit) const;
104 
105  virtual bool HasInspirationPauseTime() const;
106  virtual SEScalarTime& GetInspirationPauseTime();
107  virtual double GetInspirationPauseTime(const TimeUnit& unit) const;
108 
109  virtual bool HasPeakInspiratoryPressure() const;
110  virtual SEScalarPressure& GetPeakInspiratoryPressure();
111  virtual double GetPeakInspiratoryPressure(const PressureUnit& unit) const;
112 
113  virtual bool HasInspirationTargetFlow() const;
114  virtual SEScalarVolumePerTime& GetInspirationTargetFlow();
115  virtual double GetInspirationTargetFlow(const VolumePerTimeUnit& unit) const;
116 
117  virtual bool HasInspirationMachineTriggerTime() const;
118  virtual SEScalarTime& GetInspirationMachineTriggerTime();
119  virtual double GetInspirationMachineTriggerTime(const TimeUnit& unit) const;
120 
121  virtual bool HasInspirationPatientTriggerFlow() const;
122  virtual SEScalarVolumePerTime& GetInspirationPatientTriggerFlow();
123  virtual double GetInspirationPatientTriggerFlow(const VolumePerTimeUnit& unit) const;
124 
125  virtual bool HasInspirationPatientTriggerPressure() const;
126  virtual SEScalarPressure& GetInspirationPatientTriggerPressure();
127  virtual double GetInspirationPatientTriggerPressure(const PressureUnit& unit) const;
128 
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 eMechanicalVentilator_DriverWaveform GetInspirationWaveform() const;
165  virtual void SetInspirationWaveform(eMechanicalVentilator_DriverWaveform w);
166 
167  virtual bool HasInspirationWaveformPeriod() const;
168  virtual SEScalarTime& GetInspirationWaveformPeriod();
169  virtual double GetInspirationWaveformPeriod(const TimeUnit& unit) const;
170 
171  bool HasFractionInspiredGas() const;
172  bool HasFractionInspiredGas(const SESubstance& substance) const;
173  const std::vector<SESubstanceFraction*>& GetFractionInspiredGases();
174  const std::vector<const SESubstanceFraction*>& GetFractionInspiredGases() const;
175  SESubstanceFraction& GetFractionInspiredGas(const SESubstance& substance);
176  const SESubstanceFraction* GetFractionInspiredGas(const SESubstance& substance) const;
177  void RemoveFractionInspiredGas(const SESubstance& substance);
178  void RemoveFractionInspiredGases();
179 
180  bool HasConcentrationInspiredAerosol() const;
181  bool HasConcentrationInspiredAerosol(const SESubstance& substance) const;
182  const std::vector<SESubstanceConcentration*>& GetConcentrationInspiredAerosols();
183  const std::vector<const SESubstanceConcentration*>& GetConcentrationInspiredAerosols() const;
184  SESubstanceConcentration& GetConcentrationInspiredAerosol(const SESubstance& substance);
185  const SESubstanceConcentration* GetConcentrationInspiredAerosol(const SESubstance& substance) const;
186  void RemoveConcentrationInspiredAerosol(const SESubstance& substance);
187  void RemoveConcentrationInspiredAerosols();
188 
189 protected:
190 
191  eSwitch m_Connection;
195 
196  // Expiratory Baseline Properties (Only set 1)
199 
200  // Expriatory Cycle Properties (Only Set 1)
206 
211  eMechanicalVentilator_DriverWaveform m_ExpirationWaveform;
213 
214  // Inspiratory Limit Properties (Only set 1)
218 
220 
221  // Inspiratory Target Properties (Only set 1)
224 
225  // Inspiratory Machine Trigger Properties (Only set 1)
227 
228  // Inspiratory Patient Trigger Properties (Only set 1)
232 
237  eMechanicalVentilator_DriverWaveform m_InspirationWaveform;
239 
242 
243  std::vector<SESubstanceFraction*> m_FractionInspiredGases;
244  std::vector<const SESubstanceFraction*> m_cFractionInspiredGases;
245 
246  std::vector<SESubstanceConcentration*> m_ConcentrationInspiredAerosols;
247  std::vector<const SESubstanceConcentration*> m_cConcentrationInspiredAerosols;
248 };
Definition: SESubstanceManager.h:8
SEScalarVolumePerTime * m_InspirationTargetFlow
Definition: SEMechanicalVentilatorSettings.h:223
SEScalarPressure * m_ExpirationCyclePressure
Definition: SEMechanicalVentilatorSettings.h:202
Definition: SESubstanceFraction.h:9
std::vector< const SESubstanceFraction * > m_cFractionInspiredGases
Definition: SEMechanicalVentilatorSettings.h:244
Definition: SEScalar.h:18
Definition: SEScalarVolume.h:7
SEScalarVolumePerPressure * m_Compliance
Definition: SEMechanicalVentilatorSettings.h:193
SEScalarTime * m_ExpirationWaveformPeriod
Definition: SEMechanicalVentilatorSettings.h:212
SEScalarVolume * m_InspirationLimbVolume
Definition: SEMechanicalVentilatorSettings.h:235
Definition: SEScalarVolume.h:27
std::vector< SESubstanceFraction * > m_FractionInspiredGases
Definition: SEMechanicalVentilatorSettings.h:243
Definition: Logger.h:66
SEScalarTime * m_ExpirationCycleTime
Definition: SEMechanicalVentilatorSettings.h:204
SEScalarPressureTimePerVolume * m_ExpirationTubeResistance
Definition: SEMechanicalVentilatorSettings.h:207
Definition: SEScalarPressure.h:28
eSwitch m_ExpirationCycleRespiratoryModel
Definition: SEMechanicalVentilatorSettings.h:205
SEScalarPressure * m_FunctionalResidualCapacity
Definition: SEMechanicalVentilatorSettings.h:198
SEScalarTime * m_InspirationPauseTime
Definition: SEMechanicalVentilatorSettings.h:219
eSwitch m_InspirationPatientTriggerRespiratoryModel
Definition: SEMechanicalVentilatorSettings.h:231
SEScalarPressure * m_InspirationLimitPressure
Definition: SEMechanicalVentilatorSettings.h:216
SEScalarVolume * m_ExpirationLimbVolume
Definition: SEMechanicalVentilatorSettings.h:209
static bool SerializeFromString(const std::string &src, SEMechanicalVentilatorSettings &dst, eSerializationFormat m, const SESubstanceManager &subMgr)
Definition: PBMechanicalVentilator.cpp:364
SEScalarFrequency * m_DriverDampingParameter
Definition: SEMechanicalVentilatorSettings.h:194
SEScalarVolume * m_ConnectionVolume
Definition: SEMechanicalVentilatorSettings.h:192
Definition: SEScalarVolumePerTime.h:7
Definition: SEScalarVolumePerPressure.h:7
Definition: SEScalarTime.h:7
static bool SerializeToString(const SEMechanicalVentilatorSettings &src, std::string &output, eSerializationFormat m)
Definition: PBMechanicalVentilator.cpp:351
Definition: Logger.h:18
Definition: SEScalarPressure.h:7
Definition: SEScalarVolumePerPressure.h:27
SEScalarVolume * m_ExpirationValveVolume
Definition: SEMechanicalVentilatorSettings.h:210
eMechanicalVentilator_DriverWaveform m_InspirationWaveform
Definition: SEMechanicalVentilatorSettings.h:237
SEScalarPressure * m_PositiveEndExpiredPressure
Definition: SEMechanicalVentilatorSettings.h:197
std::vector< SESubstanceConcentration * > m_ConcentrationInspiredAerosols
Definition: SEMechanicalVentilatorSettings.h:246
SEScalarPressure * m_InspirationPatientTriggerPressure
Definition: SEMechanicalVentilatorSettings.h:230
static bool SerializeToFile(const SEMechanicalVentilatorSettings &src, const std::string &filename)
Definition: PBMechanicalVentilator.cpp:357
Definition: SESubstanceConcentration.h:10
Definition: SEScalarPressureTimePerVolume.h:7
Definition: SEScalarVolumePerTime.h:30
SEScalarVolume * m_YPieceVolume
Definition: SEMechanicalVentilatorSettings.h:240
Definition: SEMechanicalVentilatorConfiguration.h:8
std::vector< const SESubstanceConcentration * > m_cConcentrationInspiredAerosols
Definition: SEMechanicalVentilatorSettings.h:247
Definition: PBMechanicalVentilator.h:9
Definition: SEScalarFrequency.h:7
Definition: SEScalarTime.h:27
SEScalarPressureTimePerVolume * m_ExpirationValveResistance
Definition: SEMechanicalVentilatorSettings.h:208
SEScalarPressure * m_ReliefValveThreshold
Definition: SEMechanicalVentilatorSettings.h:241
SEScalarVolume * m_InspirationLimitVolume
Definition: SEMechanicalVentilatorSettings.h:217
SEScalarVolumePerTime * m_ExpirationCycleFlow
Definition: SEMechanicalVentilatorSettings.h:201
SEScalarVolumePerTime * m_InspirationLimitFlow
Definition: SEMechanicalVentilatorSettings.h:215
static bool SerializeFromFile(const std::string &filename, SEMechanicalVentilatorSettings &dst, const SESubstanceManager &subMgr)
Definition: PBMechanicalVentilator.cpp:372
Definition: SEScalarFrequency.h:25
SEScalarVolume * m_ExpirationCycleVolume
Definition: SEMechanicalVentilatorSettings.h:203
eSwitch m_Connection
Definition: SEMechanicalVentilatorSettings.h:191
SEScalarPressure * m_PeakInspiratoryPressure
Definition: SEMechanicalVentilatorSettings.h:222
Definition: SESubstance.h:14
SEScalarVolume * m_InspirationValveVolume
Definition: SEMechanicalVentilatorSettings.h:236
Definition: SEScalarPressureTimePerVolume.h:28
Definition: SEMechanicalVentilatorSettings.h:16
eMechanicalVentilator_DriverWaveform m_ExpirationWaveform
Definition: SEMechanicalVentilatorSettings.h:211
SEScalarTime * m_InspirationMachineTriggerTime
Definition: SEMechanicalVentilatorSettings.h:226
SEScalarPressureTimePerVolume * m_InspirationTubeResistance
Definition: SEMechanicalVentilatorSettings.h:233
SEScalarPressureTimePerVolume * m_InspirationValveResistance
Definition: SEMechanicalVentilatorSettings.h:234
SEScalarVolumePerTime * m_InspirationPatientTriggerFlow
Definition: SEMechanicalVentilatorSettings.h:229
SEScalarTime * m_InspirationWaveformPeriod
Definition: SEMechanicalVentilatorSettings.h:238

Distributed under the Apache License, Version 2.0.

See accompanying NOTICE file for details.