#define DOMAINID_TYPE_NATIVE long
#define HANDLE_TYPE_NATIVE long
#define HANDLE_NIL_NATIVE 0
#define BUILTIN_TOPIC_KEY_TYPE_NATIVE long
#define TheParticipantFactory
#define PARTICIPANT_QOS_DEFAULT
#define TOPIC_QOS_DEFAULT
#define PUBLISHER_QOS_DEFAULT
#define SUBSCRIBER_QOS_DEFAULT
#define DATAWRITER_QOS_DEFAULT
#define DATAREADER_QOS_DEFAULT
#define DATAWRITER_QOS_USE_TOPIC_QOS
#define DATAREADER_QOS_USE_TOPIC_QOS

#pragma prefix "omg.org"
module dds {
        typedef DOMAINID_TYPE_NATIVE DomainId_t;
	typedef   HANDLE_TYPE_NATIVE  InstanceHandle_t;
	typedef   BUILTIN_TOPIC_KEY_TYPE_NATIVE BuiltinTopicKey_t[3];
	typedef   sequence<InstanceHandle_t> InstanceHandleSeq;
	typedef long   ReturnCode_t;
	typedef   long QosPolicyId_t;
	typedef sequence<string> StringSeq;

	struct Duration_t {
	  long sec;
	   unsigned long nanosec;
	};

	struct Time_t {
  	  long sec;
	  unsigned long nanosec;
	};
	// ----------------------------------------------------------------------
	// Pre-defined values
	
	// ----------------------------------------------------------------------
	const InstanceHandle_t HANDLE_NIL = HANDLE_NIL_NATIVE;
	const long LENGTH_UNLIMITED = -1;
	const long DURATION_INFINITY_SEC = 0x7ffffff;
	const unsigned long DURATION_INFINITY_NSEC = 0x7ffffff;
	const long DURATION_ZERO_SEC = 0;
	const unsigned long DURATION_ZERO_NSEC = 0;
	const long TIMESTAMP_INVALID_SEC = -1;
	const unsigned long TIMESTAMP_INVALID_NSEC = 0xffffffff;
	// ----------------------------------------------------------------------
	// Return codes
	// ----------------------------------------------------------------------
	const ReturnCode_t RETCODE_OK = 0;
	const ReturnCode_t RETCODE_ERROR = 1;
	const ReturnCode_t RETCODE_UNSUPPORTED = 2;
	const ReturnCode_t   RETCODE_BAD_PARAMETER =   3;
	const ReturnCode_t   RETCODE_PRECONDITION_NOT_MET =   4;
	const ReturnCode_t   RETCODE_OUT_OF_RESOURCES =   5;
	const ReturnCode_t   RETCODE_NOT_ENABLED =   6;
	const ReturnCode_t   RETCODE_IMMUTABLE_POLICY =  7;
	const ReturnCode_t   RETCODE_INCONSISTENT_POLICY =  8;
	const ReturnCode_t   RETCODE_ALREADY_DELETED =   9;
	const ReturnCode_t   RETCODE_TIMEOUT =  10;
	const ReturnCode_t   RETCODE_NO_DATA =   11;
	// ----------------------------------------------------------------------
	// Status to support listeners and conditions
	// ----------------------------------------------------------------------
	typedef unsigned long StatusKind;
	typedef unsigned long StatusKindMask; // bit-mask StatusKind
	const StatusKind INCONSISTENT_TOPIC_STATUS = 0x0001 << 0;
	const StatusKind OFFERED_DEADLINE_MISSED_STATUS = 0x0001 << 1;
	const StatusKind   REQUESTED_DEADLINE_MISSED_STATUS = 0x0001 <<   2;
	const StatusKind   OFFERED_INCOMPATIBLE_QOS_STATUS = 0x0001 <<   5;
	const StatusKind   REQUESTED_INCOMPATIBLE_QOS_STATUS = 0x0001 <<   6;
	const StatusKind   SAMPLE_LOST_STATUS= 0x0001 <<   7;
	const StatusKind   SAMPLE_REJECTED_STATUS = 0x0001 <<   8;
		  
	const StatusKind   DATA_ON_READERS_STATUS = 0x0001 <<   9;
	const StatusKind   DATA_AVAILABLE_STATUS = 0x0001 <<   10;
	const StatusKind   LIVELINESS_LOST_STATUS = 0x0001 <<  11;
	const StatusKind   LIVELINESS_CHANGED_STATUS = 0x0001 <<   12;
	const StatusKind   PUBLICATION_MATCH_STATUS = 0x0001 <<   13;
	const StatusKind   SUBSCRIPTION_MATCH_STATUS = 	0x0001 <<   14;

	struct InconsistentTopicStatus {
		long total_count;
		long total_count_change;
	};
	struct SampleLostStatus {
		long total_count;
		long total_count_change;
	};
	enum SampleRejectedStatusKind {
		REJECTED_BY_INSTANCE_LIMIT,
		REJECTED_BY_TOPIC_LIMIT
	};

	struct SampleRejectedStatus {
 	long total_count;
	long total_count_change;
	SampleRejectedStatusKind last_reason;
	InstanceHandle_t last_instance_handle;
	};
	struct LivelinessLostStatus {
		long total_count;
		long total_count_change;
	};
	struct LivelinessChangedStatus {
		long active_count;
		long inactive_count;
		long active_count_change;
		long inactive_count_change;
	};
	struct OfferedDeadlineMissedStatus {
		long total_count;
		long total_count_change;
		InstanceHandle_t last_instance_handle;
	};
		
	struct RequestedDeadlineMissedStatus {
		long total_count;
		long total_count_change;
		InstanceHandle_t last_instance_handle;
	};
	struct QosPolicyCount {
		QosPolicyId_t policy_id;
		long count;
	};
	typedef sequence<QosPolicyCount> QosPolicyCountSeq;
	struct OfferedIncompatibleQosStatus {
		long total_count;
		long total_count_change;
		QosPolicyId_t last_policy_id;
		  QosPolicyCountSeq policies;
	};

	struct RequestedIncompatibleQosStatus {
		long total_count;
		long total_count_change;
		QosPolicyId_t last_policy_id;
		  QosPolicyCountSeq policies;
	};
		struct PublicationMatchStatus {
		long total_count;
		long total_count_change;
		InstanceHandle_t last_subscription_handle;
		};
		struct SubscriptionMatchStatus {
		long total_count;
		long total_count_change;
		InstanceHandle_t last_publication_handle;
		};
		// ----------------------------------------------------------------------
		// Listeners
		// ----------------------------------------------------------------------
		interface Listener;
		interface   Entity;
		interface   TopicDescription;
		interface Topic;
		interface ContentFilteredTopic;
		interface MultiTopic;
		interface DataWriter;
		interface DataReader;
		interface Subscriber;
		interface Publisher;
		
		typedef sequence<Topic> TopicSeq;
		typedef sequence<DataReader> DataReaderSeq;
		interface Listener {};
		interface TopicListener : Listener {
		void on_inconsistent_topic(in Topic   the_topic,
		in InconsistentTopicStatus status);
		};
		interface DataWriterListener : Listener {
		void on_offered_deadline_missed(in DataWriter writer,
		in OfferedDeadlineMissedStatus status);
		void   on_offered_incompatible_qos(in DataWriter writer,
		in   OfferedIncompatibleQosStatus status);
		void   on_liveliness_lost(in DataWriter writer,
		in   LivelinessLostStatus status);
		void   on_publication_match(in DataWriter writer,
		in   PublicationMatchStatus status);
		};
		interface PublisherListener : DataWriterListener {
		};
		interface DataReaderListener : Listener {
		void on_requested_deadline_missed(in DataReader reader,
		in RequestedDeadlineMissedStatus status);
		void   on_requested_incompatible_qos(in DataReader reader,
		in   RequestedIncompatibleQosStatus status);
		void   on_sample_rejected(in DataReader reader  ,
		in   SampleRejectedStatus status);
		void   on_liveliness_changed(in DataReader reader  ,
		in   LivelinessChangedStatus status);
		void   on_data_available(in DataReader reader  );
		void on_subscription_match(in   DataReader
		reader,
		  in   SubscriptionMatchStatus status);
		void on_sample_lost(in DataReader reader,
		in SampleLostStatus status);
		};
		interface SubscriberListener : DataReaderListener {
		  void on_data_on_readers(in Subscriber subs);
		};
		interface DomainParticipantListener : TopicListener,
		PublisherListener,
		SubscriberListener {
		};
		// ----------------------------------------------------------------------
		
		// Conditions
		// ----------------------------------------------------------------------
		interface Condition {
		boolean get_trigger_value();
		};
		typedef sequence<Condition> ConditionSeq;
		interface WaitSet {
		ReturnCode_t wait(out ConditionSeq active_conditions,
		in Duration_t timeout);
		ReturnCode_t attach_condition(in Condition cond);
		ReturnCode_t detach_condition(in Condition cond);
		ReturnCode_t get_conditions(out ConditionSeq attached_conditions);
		};
		interface GuardCondition : Condition {
		void set_trigger_value(in boolean value);
		};
		interface StatusCondition : Condition {
		  StatusKindMask   get_enabled_statuses();
		  ReturnCode_t set_enabled_statuses(in StatusKindMask
		  mask);
		  Entity get_entity(  );
		};
		//   Sample states to support reads
		typedef unsigned long SampleStateKind;
		typedef sequence <SampleStateKind> SampleStateSeq;
		const SampleStateKind READ_SAMPLE_STATE = 0x0001 << 0;
		const SampleStateKind NOT_READ_SAMPLE_STATE = 0x0001 << 1;
		// This is a bit-mask SampleStateKind
		typedef unsigned long SampleStateMask;
		const SampleStateMask ANY_SAMPLE_STATE = 0xffff;
		// View states to support reads
		  typedef unsigned long ViewStateKind;
		typedef   sequence<ViewStateKind> ViewStateSeq;
		const ViewStateKind NEW_VIEW_STATE = 0x0001 << 0;
		const ViewStateKind NOT_NEW_VIEW_STATE = 0x0001 << 1;
		// This is a bit-mask ViewStateKind
		typedef   unsigned long ViewStateMask;
		const   ViewStateMask ANY_VIEW_STATE =
		  0xffff;
		// Instance states to support reads
		typedef unsigned long InstanceStateKind;
		typedef sequence<InstanceStateKind> InstanceStateSeq;
		const   InstanceStateKind
		ALIVE_INSTANCE_STATE = 0x0001 <<   0;
		
		const   InstanceStateKind
		NOT_ALIVE_DISPOSED_INSTANCE_STATE = 0x0001 <<   1;
		const   InstanceStateKind
		NOT_ALIVE_NO_WRITERS_INSTANCE_STATE = 0x0001 <<   2;
		// This is a bit-mask   InstanceStateKind
		typedef unsigned long   InstanceStateMask;
		const   InstanceStateMask ANY_INSTANCE_STATE
		= 0xffff;
		const InstanceStateMask NOT_ALIVE_INSTANCE_STATE= 0x006;
		interface ReadCondition : Condition {
		  SampleStateMask
		get_sample_state_mask();
		  ViewStateMask
		get_view_state_mask();
		InstanceStateMask get_instance_state_mask();
		DataReader get_datareader();
		  };
		  interface QueryCondition : ReadCondition {
		  string   get_query_expression();
		  StringSeq   get_query_arguments();
		ReturnCode_t set_query_arguments(in StringSeq query_arguments);
		};
		// ----------------------------------------------------------------------
		// Qos
		// ----------------------------------------------------------------------
		const string USERDATA_QOS_POLICY_NAME = "UserData";
		const string DURABILITY_QOS_POLICY_NAME = "Durability";
		const string PRESENTATION_QOS_POLICY_NAME = "Presentation";
		const string DEADLINE_QOS_POLICY_NAME = "Deadline";
		const string LATENCYBUDGET_QOS_POLICY_NAME = "LatencyBudget";
		const string OWNERSHIP_QOS_POLICY_NAME = "Ownership";
		const string OWNERSHIPSTRENGTH_QOS_POLICY_NAME = "OwnershipStrength";
		const string   LIVELINESS_QOS_POLICY_NAME = "  Liveliness";
		const string   TIMEBASEDFILTER_QOS_POLICY_NAME ="  TimeBasedFilter";
		const string   PARTITION_QOS_POLICY_NAME = "  Partition";
		const string   RELIABILITY_QOS_POLICY_NAME = "  Reliability";
		const string   DESTINATIONORDER_QOS_POLICY_NAME= "  DestinationOrder";
		const string   HISTORY_QOS_POLICY_NAME = "  History";
		const string   RESOURCELIMITS_QOS_POLICY_NAME = "  Resource-Limits";
		const string   ENTITYFACTORY_QOS_POLICY_NAME ="  EntityFactory";
		const string   WRITERDATALIFECYCLE_QOS_POLICY_NAME = "  WriterDataLifecycle";
		const string   READERDATALIFECYCLE_QOS_POLICY_NAME= "  ReaderDataLifecycle";
		const string   TOPICDATA_QOS_POLICY_NAME = "  TopicData";
		const string   GROUPDATA_QOS_POLICY_NAME ="  GroupData";
		const string   TRANSPORTPRIORITY_QOS_POLICY_NAME ="  TransportPriority";
		const string   LIFESPAN_QOS_POLICY_NAME ="  Lifespan";
		const QosPolicyId_t USERDATA_QOS_POLICY_ID = 1;
		const QosPolicyId_t DURABILITY_QOS_POLICY_ID = 2;
		const QosPolicyId_t PRESENTATION_QOS_POLICY_ID = 3;
		const QosPolicyId_t DEADLINE_QOS_POLICY_ID = 4;
		const QosPolicyId_t LATENCYBUDGET_QOS_POLICY_ID = 5;
		const QosPolicyId_t OWNERSHIP_QOS_POLICY_ID = 6;
		const QosPolicyId_t OWNERSHIPSTRENGTH_QOS_POLICY_ID = 7;
		const QosPolicyId_t   LIVELINESS_QOS_POLICY_ID =   8;
		const QosPolicyId_t   TIMEBASEDFILTER_QOS_POLICY_ID =9;
		const QosPolicyId_t   PARTITION_QOS_POLICY_ID =   10;
		const QosPolicyId_t   RELIABILITY_QOS_POLICY_ID =   11;
		const QosPolicyId_t   DESTINATIONORDER_QOS_POLICY_ID =   12;
		const QosPolicyId_t   HISTORY_QOS_POLICY_ID =   13;
		const QosPolicyId_t   RESOURCELIMITS_QOS_POLICY_ID =   14;
		const QosPolicyId_t   ENTITYFACTORY_QOS_POLICY_ID =15;
		const QosPolicyId_t   WRITERDATALIFECYCLE_QOS_POLICY_ID =   16;
		const QosPolicyId_t   READERDATALIFECYCLE_QOS_POLICY_ID =   17;
		const QosPolicyId_t   TOPICDATA_QOS_POLICY_ID =   18;
		const QosPolicyId_t   GROUPDATA_QOS_POLICY_ID =19;
		const QosPolicyId_t   TRANSPORTPRIORITY_QOS_POLICY_ID = 20;
		const QosPolicyId_t   LIFESPAN_QOS_POLICY_ID=   21;
		struct UserDataQosPolicy {
		sequence<octet>   value;
		};
		  struct TopicDataQosPolicy {
		sequence<octet> value;
		};
		struct GroupDataQosPolicy {
		
		sequence<octet> value;
		};
		struct TransportPriorityQosPolicy {
		long value;
		};
		struct LifespanQosPolicy {
		Duration_t duration;
		};
		enum DurabilityQosPolicyKind {
		VOLATILE_DURABILITY_QOS,
		  TRANSIENT_LOCAL_DURABILITY_QOS,
		  TRANSIENT_DURABILITY_QOS,
		PERSISTENT_DURABILITY_QOS
		};
		struct DurabilityQosPolicy {
		DurabilityQosPolicyKind kind;
		  Duration_t service_cleanup_delay;
		};
		enum PresentationQosPolicyAccessScopeKind {
		INSTANCE_PRESENTATION_QOS,
		TOPIC_PRESENTATION_QOS,
		GROUP_PRESENTATION_QOS
		};
		struct PresentationQosPolicy {
		PresentationQosPolicyAccessScopeKind access_scope;
		boolean coherent_access;
		boolean ordered_access;
		};
		struct DeadlineQosPolicy {
		Duration_t period;
		};
		struct LatencyBudgetQosPolicy {
		Duration_t duration;
		};
		enum OwnershipQosPolicyKind {
		SHARED_OWNERSHIP_QOS,
		EXCLUSIVE_OWNERSHIP_QOS
		};
		struct OwnershipQosPolicy {
		OwnershipQosPolicyKind kind;
		};
		struct OwnershipStrengthQosPolicy {
		long value;
		};
		enum LivelinessQosPolicyKind {
		AUTOMATIC_LIVELINESS_QOS,
		
		MANUAL_BY_PARTICIPANT_LIVELINESS_QOS,
		MANUAL_BY_TOPIC_LIVELINESS_QOS
		};
		struct LivelinessQosPolicy {
		LivelinessQosPolicyKind kind;
		Duration_t lease_duration;
		};
		struct TimeBasedFilterQosPolicy {
		Duration_t minimum_separation;
		};
		struct PartitionQosPolicy {
		StringSeq name;
		};
		enum ReliabilityQosPolicyKind {
		BEST_EFFORT_RELIABILITY_QOS,
		RELIABLE_RELIABILITY_QOS
		};
		struct ReliabilityQosPolicy {
		ReliabilityQosPolicyKind kind;
		  Duration_t max_blocking_time;
		};
		enum DestinationOrderQosPolicyKind {
		BY_RECEPTION_TIMESTAMP_DESTINATIONORDER_QOS,
		BY_SOURCE_TIMESTAMP_DESTINATIONORDER_QOS
		};
		struct DestinationOrderQosPolicy {
		DestinationOrderQosPolicyKind kind;
		};
		enum HistoryQosPolicyKind {
		KEEP_LAST_HISTORY_QOS,
		KEEP_ALL_HISTORY_QOS
		};
		struct HistoryQosPolicy {
		HistoryQosPolicyKind kind;
		long depth;
		};
		struct ResourceLimitsQosPolicy {
		long max_samples;
		long max_instances;
		long   max_samples_per_instance;
		};
		struct EntityFactoryQosPolicy {
		  boolean autoenable_created_entities;
		};
		struct WriterDataLifecycleQosPolicy {
		
		boolean autodispose_unregistered_instances;
		};
		struct ReaderDataLifecycleQosPolicy {
		  Duration_t autopurge_nowriter_samples_delay;
		};
		struct DomainParticipantQos {
		UserDataQosPolicy user_data;
		  EntityFactoryQosPolicy entity_factory;
		};
		struct TopicQos {
		TopicDataQosPolicy topic_data;
		DurabilityQosPolicy durability;
		DeadlineQosPolicy deadline;
		  LatencyBudgetQosPolicy   latency_budget;
		  LivelinessQosPolicy   liveliness;
		  ReliabilityQosPolicy   reliability;
		  DestinationOrderQosPolicy   destination_order;
		  HistoryQosPolicy   history;
		  ResourceLimitsQosPolicy   resource_limits;
		  TransportPriorityQosPolicy  transport_priority;
		  LifespanQosPolicy  lifespan;
		OwnershipQosPolicy ownership;
		};
		struct DataWriterQos {
		DurabilityQosPolicy durability;
		DeadlineQosPolicy deadline;
		  LatencyBudgetQosPolicy   latency_budget;
		  LivelinessQosPolicy   liveliness;
		  ReliabilityQosPolicy   reliability;
		  DestinationOrderQosPolicy   destination_order;
		  HistoryQosPolicy   history;
		  ResourceLimitsQosPolicy   resource_limits;
		  TransportPriorityQosPolicy  transport_priority;
		  LifespanQosPolicy  lifespan;
		UserDataQosPolicy user_data;
		  OwnershipStrengthQosPolicy   ownership_strength;
		  WriterDataLifecycleQosPolicy
		  writer_data_lifecycle;
		};
		struct PublisherQos {
		  PresentationQosPolicy   presentation;
		  PartitionQosPolicy   partition;
		  GroupDataQosPolicy   group_data;
		  EntityFactoryQosPolicy   entity_factory;
		};
		struct DataReaderQos {
		DurabilityQosPolicy durability;
		
		DeadlineQosPolicy deadline;
		LatencyBudgetQosPolicy   latency_budget;
		LivelinessQosPolicy liveliness;
		ReliabilityQosPolicy reliability;
		DestinationOrderQosPolicy destination_order;
		HistoryQosPolicy history;
		ResourceLimitsQosPolicy resource_limits;
		UserDataQosPolicy user_data;
		TimeBasedFilterQosPolicy time_based_filter;
		ReaderDataLifecycleQosPolicy reader_data_lifecycle;
		};
		struct SubscriberQos {
		PresentationQosPolicy presentation;
		  PartitionQosPolicy   partition;
		  GroupDataQosPolicy   group_data;
		  EntityFactoryQosPolicy   entity_factory;
		};
		// ----------------------------------------------------------------------
		  struct ParticipantBuiltinTopicData {
		BuiltinTopicKey_t key;
		UserDataQosPolicy user_data;
		};
		struct TopicBuiltinTopicData {
		BuiltinTopicKey_t key;
		string name;
		string type_name;
		DurabilityQosPolicy durability;
		DeadlineQosPolicy deadline;
		LatencyBudgetQosPolicy latency_budget;
		LivelinessQosPolicy liveliness;
		ReliabilityQosPolicy reliability;
		TransportPriorityQosPolicy transport_priority;
		LifespanQosPolicy lifespan;
		DestinationOrderQosPolicy destination_order;
		HistoryQosPolicy history;
		ResourceLimitsQosPolicy resource_limits;
		OwnershipQosPolicy ownership;
		TopicDataQosPolicy topic_data;
		};
		struct PublicationBuiltinTopicData {
		BuiltinTopicKey_t key;
		BuiltinTopicKey_t participant_key;
		string topic_name;
		string type_name;
		DurabilityQosPolicy durability;
		DeadlineQosPolicy deadline;
		LatencyBudgetQosPolicy latency_budget;
		LivelinessQosPolicy liveliness;
		
		ReliabilityQosPolicy reliability;
		LifespanQosPolicy lifespan;
		UserDataQosPolicy user_data;
		OwnershipStrengthQosPolicy ownership_strength;
		PresentationQosPolicy presentation;
		PartitionQosPolicy partition;
		TopicDataQosPolicy topic_data;
		GroupDataQosPolicy group_data;
		};
		struct SubscriptionBuiltinTopicData {
		BuiltinTopicKey_t key;
		BuiltinTopicKey_t participant_key;
		string topic_name;
		string type_name;
		DurabilityQosPolicy durability;
		DeadlineQosPolicy deadline;
		LatencyBudgetQosPolicy latency_budget;
		LivelinessQosPolicy liveliness;
		ReliabilityQosPolicy reliability;
		DestinationOrderQosPolicy destination_order;
		UserDataQosPolicy user_data;
		TimeBasedFilterQosPolicy time_based_filter;
		PresentationQosPolicy presentation;
		PartitionQosPolicy partition;
		TopicDataQosPolicy topic_data;
		GroupDataQosPolicy group_data;
		};
		// ----------------------------------------------------------------------
		interface Entity {
		// ReturnCode_t set_qos(in   EntityQos qos);
		// void get_qos(inout   EntityQos qos);
		// ReturnCode_t set_listener(in Listener l, in StatusKindMask mask);
		// Listener get_listener();
		ReturnCode_t enable();
		  StatusCondition get_statuscondition();
		  StatusKindMask get_status_changes();
		};
		
		// ----------------------------------------------------------------------
		interface DomainParticipant : Entity {
		// Factory interfaces
		Publisher create_publisher(in PublisherQos qos,
		in PublisherListener   a_listener);
		ReturnCode_t delete_publisher(in Publisher p);
		Subscriber create_subscriber(in SubscriberQos qos,
		in SubscriberListener   a_listener);
		ReturnCode_t delete_subscriber(in Subscriber s);
		Subscriber get_builtin_subscriber();
		Topic create_topic(in string topic_name, in string type_name,
		  in   TopicQos qos,   in   TopicListener a_listener);
		ReturnCode_t delete_topic(in   Topic a_topic);
		  Topic find_topic(in string topic_name, in   Duration_t
		timeout);
		  TopicDescription lookup_topicdescription(in string   name);
		ContentFilteredTopic create_contentfilteredtopic(in string name,in Topic related_topic,in string filter_expression,in StringSeq filter_parameters);
		ReturnCode_t   delete_contentfilteredtopic(in ContentFilteredTopic a_contentfilteredtopic);
		MultiTopic create_multitopic(in string name,in string   type_name,in string   subscription_expression,in   StringSeq expression_parameters);
		ReturnCode_t delete_multitopic(in MultiTopic a_multitopic);
		  ReturnCode_t delete_contained_entities();
		ReturnCode_t set_qos(in DomainParticipantQos qos);
		  void get_qos(  inout DomainParticipantQos
		qos);
		ReturnCode_t   set_listener(in   DomainParticipantListener
		a_listener,
		in StatusKindMask mask);
		  DomainParticipantListener get_listener(  );
		ReturnCode_t ignore_participant(in InstanceHandle_t handle);
		ReturnCode_t ignore_topic(in InstanceHandle_t handle);
		ReturnCode_t ignore_publication(in InstanceHandle_t handle);
		ReturnCode_t ignore_subscription(in InstanceHandle_t handle);
		DomainId_t get_domain_id();
		  void assert_liveliness();
		ReturnCode_t set_default_publisher_qos(in PublisherQos qos);
		void get_default_publisher_qos(out PublisherQos qos);
		ReturnCode_t set_default_subscriber_qos(in SubscriberQos qos);
		
		void get_default_subscriber_qos(out SubscriberQos qos);
		ReturnCode_t set_default_topic_qos(in TopicQos qos);
		void get_default_topic_qos(out TopicQos qos);
		};
		interface DomainParticipantFactory {
		DomainParticipant create_participant(in DomainId_t domainId,
		in DomainParticipantQos qos,
		in DomainParticipantListener   a_listener);
		ReturnCode_t delete_participant(in DomainParticipant a_participant);
		DomainParticipant lookup_participant(in DomainId_t domainId);
		ReturnCode_t set_default_participant_qos(in DomainParticipantQos qos);
		void get_default_participant_qos(out DomainParticipantQos qos);
		};

		interface   TypeSupport {
		  // ReturnCode_t register_type(in DomainParticipant domain, in string type_name);
		};
		// ----------------------------------------------------------------------
		interface TopicDescription {
		  string   get_type_name();
		  string   get_name();
		DomainParticipant get_participant();
		};
		interface Topic : Entity, TopicDescription {
		  // Access the status
		  InconsistentTopicStatus
		  get_inconsistent_topic_status();
		};
		interface ContentFilteredTopic : TopicDescription {
		string get_filter_expression();
		  StringSeq get_expression_parameters();
		ReturnCode_t set_expression_parameters(in StringSeq expression_parameters);
		  Topic get_related_topic();
		};
		interface MultiTopic : TopicDescription {
		string get_subscription_expression();
		  StringSeq get_expression_parameters();
		  ReturnCode_t set_expression_parameters(in StringSeq expression_parameters);
		};
		// ----------------------------------------------------------------------
		interface Publisher : Entity {
		DataWriter create_datawriter(in Topic   a_topic, in DataWriterQos qos,
		in DataWriterListener a_listener);
		
		ReturnCode_t delete_datawriter(in   DataWriter
		a_datawriter);
		  DataWriter lookup_datawriter(in   string topic_name);
		  ReturnCode_t delete_contained_entities(  );
		ReturnCode_t set_qos(in PublisherQos qos);
		void get_qos(inout PublisherQos qos);
		ReturnCode_t set_listener(in PublisherListener a_listener, in StatusKindMask mask);
		PublisherListener get_listener();
		ReturnCode_t suspend_publications();
		ReturnCode_t resume_publications();
		ReturnCode_t begin_coherent_changes();
		  ReturnCode_t end_coherent_changes();
		  DomainParticipant get_participant();
		ReturnCode_t set_default_datawriter_qos(in DataWriterQos qos);
		  void get_default_datawriter_qos(out DataWriterQos qos);
		ReturnCode_t   copy_from_topic_qos(  inout DataWriterQos
		a_datawriter_qos,
		in TopicQos a_topic_qos);
		};
		interface DataWriter : Entity {
		// InstanceHandle_t register(in Data instance_data);
		// InstanceHandle_t register_w_timestamp(in Data instance_data,
		// in Time_t source_timestamp);
		//   ReturnCode_t unregister(in Data instance_data  ,
		//   in   InstanceHandle_t handle);
		// ReturnCode_t unregister_w_timestamp(in   Data
		//instance_data,
		//   in InstanceHandle_t handle  ,
		//   in   Time_t source_timestamp);
		// ReturnCode_t write(in Data instance_data, in InstanceHandle_t handle  );
		// ReturnCode_t write_w_timestamp(in   Data
		//instance_data,
		//   in   InstanceHandle_t handle,
		// in   Time_t source_timestamp);
		// ReturnCode_t dispose(in   Data instance_data,
		//   in   InstanceHandle_t
		//instance_handle);
		// ReturnCode_t dispose_w_timestamp(in   Data
		//instance_data,
		// in   InstanceHandle_t instance_handle,
		//   in   Time_t
		//source_timestamp);
		// ReturnCode_t get_key_value(inout Data key_holder, in InstanceHandle_t handle);
		
		ReturnCode_t set_qos(in DataWriterQos qos);
		void get_qos(inout DataWriterQos qos);
		ReturnCode_t set_listener(in DataWriterListener a_listener, in StatusKindMask mask);
		  DataWriterListener get_listener();
		  Topic get_topic();
		  Publisher
		get_publisher();
		  // Access the status
		LivelinessLostStatus get_liveliness_lost_status();
		OfferedDeadlineMissedStatus get_offered_deadline_missed_status();
		OfferedIncompatibleQosStatus get_offered_incompatible_qos_status();
		PublicationMatchStatus get_publication_match_status();
		void assert_liveliness();
		ReturnCode_t get_matched_subscriptions(
		inout InstanceHandleSeq subscription_handles);
		ReturnCode_t get_matched_subscription_data(
		inout SubscriptionBuiltinTopicData subscription_data,
		in InstanceHandle_t subscription_handle);
		};
		// ----------------------------------------------------------------------
		interface Subscriber : Entity {
		DataReader create_datareader(in TopicDescription a_topic,
		  in   DataReaderQos qos,
		in   DataReaderListener a_listener);
		ReturnCode_t delete_datareader(in   DataReader
		a_datareader);
		ReturnCode_t   delete_contained_entities(  );
		DataReader lookup_datareader(in string topic_name);
		ReturnCode_t get_datareaders(out DataReaderSeq readers,
		in SampleStateMask sample_states,
		in   ViewStateMask view_states,
		in   InstanceStateMask instance_states);
		void notify_datareaders(  );
		ReturnCode_t set_qos(in   SubscriberQos qos);
		void get_qos(inout SubscriberQos qos);
		ReturnCode_t   set_listener(in SubscriberListener a_listener, in   StatusKindMask mask);
		  SubscriberListener get_listener(  );
		ReturnCode_t begin_access();
		ReturnCode_t end_access();
		  DomainParticipant
		get_participant();
		ReturnCode_t set_default_datareader_qos(in DataReaderQos qos);
		
		void get_default_datareader_qos(out DataReaderQos qos);
		ReturnCode_t copy_from_topic_qos(inout DataReaderQos a_datareader_qos,
		in TopicQos a_topic_qos);
		};
		interface DataReader : Entity {
		
		ReadCondition create_readcondition(in SampleStateMask   sample_states,in ViewStateMask view_states,in   InstanceStateMask instance_states);
		QueryCondition create_querycondition(in SampleStateMask   sample_states,in ViewStateMask view_states,in InstanceStateMask instance_states,in   string query_expression,in   StringSeq query_parameters);
		ReturnCode_t delete_readcondition(in   ReadCondition a_condition);
		ReturnCode_t   delete_contained_entities(  );
		ReturnCode_t set_qos(in DataReaderQos qos);
		void get_qos(inout DataReaderQos qos);
		ReturnCode_t set_listener(in DataReaderListener a_listener, in StatusKindMask mask);
		DataReaderListener get_listener();
		TopicDescription get_topicdescription();
		Subscriber get_subscriber();
		SampleRejectedStatus get_sample_rejected_status();
		LivelinessChangedStatus get_liveliness_changed_status();
		RequestedDeadlineMissedStatus get_requested_deadline_missed_status();
		RequestedIncompatibleQosStatus get_requested_incompatible_qos_status();
		SubscriptionMatchStatus get_subscription_match_status();
		SampleLostStatus get_sample_lost_status();
		ReturnCode_t wait_for_historical_data(in Duration_t max_wait);
		ReturnCode_t get_matched_publications(inout InstanceHandleSeq publication_handles);
		ReturnCode_t get_matched_publication_data(inout PublicationBuiltinTopicData publication_data,in InstanceHandle_t publication_handle);
		
		void take_instance_from_subscriber() ;
		
		};
		struct SampleInfo {
		SampleStateKind sample_state;
		ViewStateKind view_state;
		InstanceStateKind instance_state;
		Time_t source_timestamp;
		InstanceHandle_t instance_handle;
		long disposed_generation_count;
		long no_writers_generation_count;
		long sample_rank;
		long generation_rank;
		long absolute_generation_rank;
		};
		typedef sequence<SampleInfo> SampleInfoSeq;
};	
		
		
		
