syntax = "proto3";
package pulse.multiplex_ventilator.bind;
option java_package = "pulse.multiplex_ventilator.bind";
option csharp_namespace = "pulse.multiplex_ventilator.bind";
option optimize_for = SPEED;

import "pulse/cdm/bind/Engine.proto";
import "pulse/cdm/bind/Properties.proto";
import "pulse/cpm/bind/PulseConfiguration.proto";

message MultiplexVentilatorData
{
  message LungResistanceData
  {
    pulse.cdm.bind.ScalarPressureTimePerVolumeData   LeftLungResistance               = 1;
    pulse.cdm.bind.ScalarPressureTimePerVolumeData   RightLungResistance              = 2;
  }
  
  message BronchiAlveoliResistanceData
  {
    pulse.cdm.bind.ScalarPressureTimePerVolumeData   LeftBronchiResistance            = 1;
    pulse.cdm.bind.ScalarPressureTimePerVolumeData   LeftAlveoliResistance            = 2;
    pulse.cdm.bind.ScalarPressureTimePerVolumeData   RightBronchiResistance           = 3;
    pulse.cdm.bind.ScalarPressureTimePerVolumeData   RightAlveoliResistance           = 4;
  }
  
  message SideComplianceData
  {
    pulse.cdm.bind.ScalarVolumePerPressureData       LeftSideCompliance               = 1;
    pulse.cdm.bind.ScalarVolumePerPressureData       RightSideCompliance              = 2;
  }
  
  message LungComplianceData
  {
    pulse.cdm.bind.ScalarVolumePerPressureData       LeftChestWallCompliance          = 1;
    pulse.cdm.bind.ScalarVolumePerPressureData       LeftLungCompliance               = 2;
    pulse.cdm.bind.ScalarVolumePerPressureData       RightLungCompliance              = 3;
    pulse.cdm.bind.ScalarVolumePerPressureData       RightChestWallCompliance         = 4;
  }
  
  message PatientConfigurationData
  {
    uint32                                           ID                               = 1;
    pulse.cdm.bind.EngineInitializationData          EngineInitialization             = 2;
    pulse.cdm.bind.Scalar0To1Data                    DyspneaSeverity                  = 3;
    pulse.cdm.bind.Scalar0To1Data                    ImpairedAlveolarExchangeFraction = 4;
    
    pulse.cdm.bind.ScalarPressureTimePerVolumeData   AirwayResistance                 = 5;
    pulse.cdm.bind.ScalarPressureTimePerVolumeData   ExpiratoryLimbResistance         = 6;
    pulse.cdm.bind.ScalarPressureTimePerVolumeData   InspiratoryLimbResistance        = 7;
    
    oneof ResistancesData
    {
       LungResistanceData                            LungResistance                   = 8;
       BronchiAlveoliResistanceData                  BronchiAlveoliResistance         = 9;
    }
    
    oneof ComplianceData
    {
       SideComplianceData                            SideCompliance                   = 10;
       LungComplianceData                            LungCompliance                   = 11;
    }
  }
  
  message ScenarioData
  {
    repeated PatientConfigurationData                PatientConfiguration             = 1;
    pulse.cdm.bind.DataRequestManagerData            DataRequestManager               = 2;
    pulse.cpm.bind.ConfigurationData                 Configuration                    = 3;
  }
}

