software:firmware
MakAir Firmware
PC_AC_Controller Class Referencefinal

Controller for the AC mode. More...

#include <pc_ac_controller.h>

+ Inheritance diagram for PC_AC_Controller:

Public Member Functions

void exhale () override
 Control the exhalation. More...
 
struct Alarms enabledAlarms () const override
 List of alarms that must be enabled for this mode. More...
 
- Public Member Functions inherited from PC_CMV_Controller
 PC_CMV_Controller ()
 Default constructor. More...
 
void setup () override
 Initialize controller. More...
 
void initCycle () override
 Begin a new breathing cycle. More...
 
void inhale () override
 Control the inhalation. More...
 
void exhale () override
 Control the exhalation. More...
 
void endCycle () override
 End the current breathing cycle. More...
 
struct Alarms enabledAlarms () const override
 List of alarms that must be enabled for this mode. More...
 

Detailed Description

Controller for the AC mode.

Definition at line 14 of file pc_ac_controller.h.

Member Function Documentation

◆ enabledAlarms()

struct Alarms PC_AC_Controller::enabledAlarms ( ) const
inlineoverridevirtual

List of alarms that must be enabled for this mode.

Implements VentilationController.

Definition at line 17 of file pc_ac_controller.h.

20  {
25  RCM_SW_23};
26  return a;
27  }
#define RCM_SW_11
#define RCM_SW_20
#define RCM_SW_12
#define RCM_SW_15
#define RCM_SW_3
#define RCM_SW_5
#define RCM_SW_18
#define RCM_SW_23
#define RCM_SW_19
#define RCM_SW_6
#define RCM_SW_16
#define RCM_SW_1
#define RCM_SW_9
#define RCM_SW_14
#define RCM_SW_8
#define RCM_SW_4
#define RCM_SW_21
#define RCM_SW_2
#define RCM_SW_22
#define RCM_SW_7
List of alarms (named by their code)

◆ exhale()

void PC_AC_Controller::exhale ( )
overridevirtual

Control the exhalation.

Implements VentilationController.

Definition at line 28 of file pc_ac_controller.cpp.

28  {
30 
31  // Calculate max pressure for the last samples
33  for (uint8_t i = 0u; i < MAX_PRESSURE_SAMPLES; i++) {
36  }
37  }
38 
39  // In case the pressure trigger mode is enabled, check if inspiratory trigger is raised
40  if ((mainController.tick()
42  // m_peakPressure > CONST_MIN_PEAK_PRESSURE ensures that the patient is plugged on the
43  // machine
44  if (((mainController.pressure())
49  }
50  }
51 }
int16_t * lastPressureValues()
Get last pressure values.
uint32_t tick() const
Get the tick number of the current cycle.
int16_t pressure() const
Get the current measured pressure.
int16_t peakPressureMeasure() const
Get the measured peak pressure.
const int16_t pressureTriggerOffsetCommand() const
Get the value of the inspiratory trigger pressure command.
uint32_t ticksPerInhalation() const
Get the duration of an inhalation in ticks.
const void setTrigger(bool triggerValue)
Reset the trigger to false.
void exhale() override
Control the exhalation.
int32_t maxPressureValue
MainController mainController
#define MAX_PRESSURE_SAMPLES
Number of values to aggregate when computing plateau pressure.
uint16_t i
#define MAIN_CONTROLLER_COMPUTE_PERIOD_MS
Definition: parameters.h:28
#define CONST_MIN_PEAK_PRESSURE
Definition: parameters.h:34

The documentation for this class was generated from the following files: