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";


/** @brief Enumeration for how to apply action data (Such as configurations). */
enum eMergeType
{
  Append  = 0;/**<< @brief Only change what is provided. All data on target object not in the associated message will be preserved. */
  Replace = 1;/**<< @brief Clear all data on target object, and then apply the data provided in the associated message. */
}

/** @brief Enumeration for when to apply actions related to the respiratory cycle. */
enum eAppliedRespiratoryCycle
{
  Expiration     = 0;/**<< @brief Wait to apply  until the beginning of the expiration. */
  Inspiration    = 1;/**<< @brief Wait to apply  until the beginning of the inspiration. */
  Instantaneous  = 2;/**<< @brief Apply once the action is received */
}

message ActionData
{
  string                 Comment  = 1;
}

message EquipmentActionData
{
  ActionData             Action   = 1;
}

message AdvanceTimeData
{
  ActionData             Action   = 1;
  ScalarTimeData         Time     = 2;
}

message AdvanceUntilStableData
{
  ActionData             Action   = 1;
  string                 Criteria = 2;
}

message SerializeStateData
{
  enum eMode
  {
    Save = 0;
    Load = 1;
  }
  ActionData             Action     = 1;
  eMode                  Mode       = 2;
  string                 Filename   = 3;
}

message SerializeRequestedData
{
  
  ActionData             Action     = 1;
  bool                   ClearCache = 2;/**<< @brief If false, all previous requested times are kept and provided in requested file, default is true (Only the data of the engine at the time this actions is processed is in the file.) */
  string                 Filename   = 3;
  int32                  ID         = 4;/**<< @brief Give an ID to the segment of data, useful when writing more than one time set */
}

message OverridesData
{
  ActionData             Action           = 1;
  map<string,ScalarData> ScalarProperties = 2;
}
