// $Id: SHS_DataModel.idl 91982 2010-09-23 20:43:54Z wotte $
#ifndef SHS_DataModel_IDL
#define SHS_DataModel_IDL

#include "dance/Deployment/Deployment_Base.idl"

module DAnCE
{
  module SHS
  {
    module Constants
    {
      /// Diagnostic message
      const string SHS_DIAGNOSTIC = "edu.vanderbilt.dre.DAnCE.SHS.Diagnostic";
      /// Process ID
      const string SHS_PID = "edu.vanderbilt.dre.DAnCE.SHS.PID";
      /// Process or thread priority
      const string SHS_PRIORITY = "edu.vanderbilt.dre.DAnCE.SHS.Priority";
      /// Process affinity mask
      const string SHS_AFFINITY = "edu.vanderbilt.dre.DAnCE.SHS.Affinity";
      /// Number of threads configured with the reactor
      const string SHS_TPOOL = "edu.vanderbilt.dre.DAnCE.SHS.ThreadPool";
      /// IDs of hosted instances
      const string SHS_HOSTED_INSTANCES = "edu.vanderbilt.dre.DAnCE.SHS.HostedInstances";

      /********** INSTANCE META DATA **********/
      /// Memory footprint of the instance
      const string SHS_MEM_FP = "edu.vanderbilt.dre.DAnCE.SHS.MemoryFootprint";
      /// Reference to instance (Appropriate reference type)
      const string SHS_INSTANCE_REF = "edu.vanderbilt.dre.DAnCE.SHS.InstanceReference";
      /// Sequence of properties found in the deployment plan.

      /********** CONNECTION META DATA **********/
      /// Instance type indicating a connection status update
      const string SHS_CONNECTION = "edu.vanderbilt.dre.DAnCE.SHS.Connection";
      /// ID of 'provider' instance, if present (string, format component_id:port_name)
      const string SHS_CONN_PROVIDER = "edu.vanderbilt.dre.DAnCE.SHS.Connection.Provider";
      /// ID of non-'provider' instance, if present (string, format component_id:port_name)
      const string SHS_CONN_RECIPIENT =  "edu.vanderbilt.dre.DAnCE.SHS.Connection.Recipient";
      /// Connection type (appropriate port kind, e.g. CCMComponentPortKind)
      const string SHS_CONN_PORT_KIND = "edu.vanderbilt.dre.DAnCE.SHS.Connection.Kind";
      /// External endpoint (::Deployment::ExternalReferenceEndpoint)
      const string SHS_CONN_EXTERNAL_ENDPOINT = "edu.vanderbilt.dre.DAnCE.SHS.Connection.ExternalEndpoint";
    };

    /// Enumberation describing liveness status of event
    enum Instance_Status
    {
      /**
       * The instance has been loaded into memory
       */
      INST_INSTALLED,
      /**
       * The process or element is actively executing
       */
      INST_ACTIVE,
      /**
       * The process or element is loaded in memory but not active.
       */
      INST_PASSIVE,
      /**
       * The process or element encountered an error condition
       */
      INST_ERROR,
      /**
       * The process or element is now defunct
       */
      INST_DEFUNCT
    };

    struct Status_Update
    {
      /// Name assigned to instance
      string id;

      /// Instance type
      string type;

      /// New status of instance
      Instance_Status new_status;

      /// Additional information about instance
      ::Deployment::Properties instance_info;
    };
  };
};

#endif
