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/BagValveMask.proto";
import "pulse/cdm/bind/Actions.proto";

message BagValveMaskActionData
{
  EquipmentActionData    EquipmentAction                = 1;
}

/** @brief The configuration of the bag valve mask to use. */
message BagValveMaskConfigurationData
{
  BagValveMaskActionData    BagValveMaskAction          = 1;
  oneof Option
  {
    BagValveMaskData        Configuration               = 2;/**<< @brief A BVM object with properties to set in the system object. */
    string                  ConfigurationFile           = 3;/**<< @brief File containing a BVM object with properties to set in the system object. */
  }
  eMergeType                MergeType                   = 4;/**<< @brief How to apply provided configuration to internal data model. */
}

/** @brief Specify a single squeeze cycle of the bag. Repeat as needed. Newly added actions will override a previous unfinished squeeze cycle. */
message BagValveMaskAutomatedData
{
  BagValveMaskActionData    BagValveMaskAction          = 1;
  
  ScalarFrequencyData       BreathFrequency             = 2;/**<< @brief Bag squeeze rate, translates to respiration rate. */
  ScalarData                InspiratoryExpiratoryRatio  = 3;/**<< @brief The ratio of the length of time of inspiration to the length of time of expiration.*/
  oneof Option
  {
    ScalarPressureData      SqueezePressure             = 4;/**<< @brief Maximum extrinsic pressure above atmosphere during inhalation. */
    ScalarVolumeData        SqueezeVolume               = 5;/**<< @brief The volume of air moved into or out of the lungs during normal respiration.*/
 
  }
}

/** @brief Specify a single squeeze cycle of the bag. Repeat as needed. Newly added actions will override a previous unfinished squeeze cycle. */
message BagValveMaskSqueezeData
{
  BagValveMaskActionData    BagValveMaskAction          = 1;
  oneof Option
  {
    ScalarPressureData      SqueezePressure             = 2;/**<< @brief Maximum extrinsic pressure above atmosphere during inhalation. */
    ScalarVolumeData        SqueezeVolume               = 3;/**<< @brief The volume of air moved into or out of the lungs during normal respiration.*/
 
  }
  
  ScalarTimeData            ExpiratoryPeriod            = 4;/**<< @brief Total length of expiration phase. */
  ScalarTimeData            InspiratoryPeriod           = 5;/**<< @brief Total length of inspiration phase. */
}

/** @brief BVM action to be used when connecting to hardware sensors or specifying your own waveform. Values will remain constant until explicitly changed*/
message BagValveMaskInstantaneousData
{
  BagValveMaskActionData    BagValveMaskAction          = 1;
  oneof Option
  {
    ScalarPressureData      Pressure                    = 2;/**<< @brief Instantaneous pressure at the bag. */
    ScalarVolumePerTimeData Flow                        = 3;/**<< @brief Instantaneous flow at the bag. */
  }
}
