
#define BUILTIN_TOPIC_KEY_TYPE_NATIVE	long

module DDS {
    typedef BUILTIN_TOPIC_KEY_TYPE_NATIVE BuiltinTopicKey_t[3];
	typedef sequence<string> StringSeq;
	
    struct Duration_t {
		long sec;
		unsigned long nanosec;
    };

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

    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;
		boolean synchronous;
    };

    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 DurabilityServiceQosPolicy {
	Duration_t service_cleanup_delay;
	HistoryQosPolicyKind history_kind;
        long history_depth;
        long max_samples;
        long max_instances;
        long max_samples_per_instance;
    };

    struct ParticipantBuiltinTopicData {
		BuiltinTopicKey_t key;
		UserDataQosPolicy user_data;
    };
#pragma keylist ParticipantBuiltinTopicData key

    struct TopicBuiltinTopicData {
		BuiltinTopicKey_t key;
		string name;
		string type_name;
		DurabilityQosPolicy durability;
		DurabilityServiceQosPolicy durability_service;
		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;
    };
#pragma keylist TopicBuiltinTopicData key

    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;
		OwnershipQosPolicy ownership;
		OwnershipStrengthQosPolicy ownership_strength;
		PresentationQosPolicy presentation;
		PartitionQosPolicy partition;
		TopicDataQosPolicy topic_data;
		GroupDataQosPolicy group_data;
    };
#pragma keylist PublicationBuiltinTopicData key

    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;
		OwnershipQosPolicy ownership;
		DestinationOrderQosPolicy destination_order;
		UserDataQosPolicy user_data;
		TimeBasedFilterQosPolicy time_based_filter;
		PresentationQosPolicy presentation;
		PartitionQosPolicy partition;
		TopicDataQosPolicy topic_data;
		GroupDataQosPolicy group_data;
    };
#pragma keylist SubscriptionBuiltinTopicData key
};
