syntax = "proto3";
package pulse.cdm.bind;
option java_package = "com.kitware.pulse.cdm.bind";
option csharp_namespace = "pulse.cdm.bind";
option optimize_for = SPEED;

import "pulse/cdm/bind/Properties.proto";
import "pulse/cdm/bind/Substance.proto";

message MechanicalVentilatorData
{

  enum eConnection
  {
    NullConnection = 0;/**<< Signals not provided, or no change */
    Off            = 1;
    Mask           = 2;
    Tube           = 3;
  }
  
  enum eDriverWaveform
  {
    NullDriverWaveform = 0;/**<< Signals not provided, or no change */
    Square             = 1;/**<<  */
    Exponential        = 2;/**<<  */
    Ramp               = 3;/**<<  */
    Sinusoidal         = 4;/**<<  */
    Sigmoidal          = 5;/**<<  */
  }
  
  eConnection                         Connection                    = 1; /**<< @brief @ref MechanicalVentilatorData_eControlTable */
  ScalarPressureTimePerVolumeData     EndotrachealTubeResistance    = 2; /**<< @brief Total connection resistance. */
  
  oneof ExpiratoryBaseline
  {
    ScalarPressureData                PositiveEndExpiredPressure    = 3; /**<< @brief Extrinsic pressure above atmosphere at the end of exhalation. */
    ScalarPressureData                FunctionalResidualCapacity    = 4; /**<< @brief Total lung volume at the end of exhalation. */
  }
  oneof ExpirationCycle
  {
    ScalarVolumePerTimeData           ExpirationCycleFlow           = 5; /**<< @brief Ventilator sensor flow value to trigger expiration phase. */
    ScalarPressureData                ExpirationCyclePressure       = 6; /**<< @brief Ventilator sensor pressure value to trigger expiration phase. */
    ScalarVolumeData                  ExpirationCycleVolume         = 7; /**<< @brief Ventilator sensor volume change (i.e., tidal volume) to trigger expiration phase. */
    ScalarTimeData                    ExpirationCycleTime           = 8; /**<< @brief Total length of inspiration phase to trigger expiration phase. */
  }
  
  ScalarPressureTimePerVolumeData     ExpirationTubeResistance      = 9; /**<< @brief Total resistance of expiratory limb tubing. */
  ScalarPressureTimePerVolumeData     ExpirationValveResistance     = 10;/**<< @brief Total resistance of expiratory valves. */
  eDriverWaveform                     ExpirationWaveform            = 11;/**<< @brief @ref MechanicalVentilatorData_eDriverWaveformTable */
  
  oneof InspirationLimit
  {
    ScalarVolumePerTimeData           InspirationLimitFlow          = 12;/**<< @brief Ventilator sensor flow cutoff/maximum. */
    ScalarPressureData                InspirationLimitPressure      = 13;/**<< @brief Ventilator sensor pressure cutoff/maximum. */
    ScalarVolumeData                  InspirationLimitVolume        = 14;/**<< @brief Total lung volume cutoff/maximum. */
  }
  
  ScalarTimeData                      InspirationPauseTime          = 15;/**<< @brief Time of plateau (i.e., constant driver pressure) between inspiration and expiration. */
  
  oneof InspiratoryTarget
  {
    ScalarPressureData                PeakInspiratoryPressure       = 16;/**<< @brief Extrinsic pressure above atmosphere at the end of inhalation. */
    ScalarVolumePerTimeData           InspirationTargetFlow         = 17;/**<< @brief Air flow at end of inhalation. */
  }
  
  oneof InspirationMachineTrigger
  {
    ScalarTimeData                    InspirationMachineTriggerTime        = 18;/**<< @brief Total length of expiration phase to trigger inspiration phase. */
  }
  
  oneof InspirationPatientTrigger
  {
    ScalarVolumePerTimeData           InspirationPatientTriggerFlow        = 19;/**<< @brief Ventilator sensor volume change value to trigger inspiration phase. */
    ScalarPressureData                InspirationPatientTriggerPressure    = 20;/**<< @brief Ventilator sensor pressure value to trigger inspiration phase. */
  }
  
  ScalarPressureTimePerVolumeData     InspirationTubeResistance     = 21;/**<< @brief Total resistance of inspiratory limb tubing. */
  ScalarPressureTimePerVolumeData     InspirationValveResistance    = 22;/**<< @brief Total resistance of inspiratory valves. */
  eDriverWaveform                     InspirationWaveform           = 23;/**<< @brief @ref MechanicalVentilatorData_eDriverWaveformTable */
  
  repeated SubstanceFractionData      FractionInspiredGas           = 24;/**<< @brief Break down of the gases, such as FiO2. */
  repeated SubstanceConcentrationData ConcentrationInspiredAerosol  = 25;/**<< @brief Concentration of added aerosolized substances. */
}