RtpsCore.idl

Go to the documentation of this file.
00001 /*
00002  *
00003  *
00004  * Distributed under the OpenDDS License.
00005  * See: http://www.opendds.org/license.html
00006  */
00007 
00008 #ifndef RTPS_RTPSCORE_IDL
00009 #define RTPS_RTPSCORE_IDL
00010 
00011 #include "dds/DdsDcpsInfoUtils.idl"
00012 
00013 module OpenDDS {
00014   module RTPS {
00015 
00016     typedef octet OctetArray2[2];
00017     typedef octet OctetArray4[4];
00018 
00019     /* A list of filters that were applied to the sample.
00020        See section 9.6.3.1 for the signature-generation algorithm. */
00021     typedef long FilterSignature_t[4];
00022 
00023     /* For each filter signature, the results indicate whether the
00024        sample passed the filter. */
00025     typedef sequence<long> FilterResult_t;
00026 
00027     typedef sequence<FilterSignature_t> FilterSignatureSeq;
00028 
00029     struct ContentFilterInfo_t {
00030       FilterResult_t filterResult;
00031       FilterSignatureSeq filterSignatures;
00032     };
00033 
00034     struct Property_t {
00035       string name;
00036       string value;
00037     };
00038 
00039     typedef sequence<Property_t> PropertySeq;
00040 
00041     struct EntityName_t {
00042       string name;
00043     };
00044 
00045     /* Type used to encapsulate a count that is incremented monotonically, used
00046        to identify message duplicates. */
00047     struct Count_t {
00048       long value;
00049     };
00050 
00051     /* Type used to hold sequence numbers. */
00052     struct SequenceNumber_t {
00053       long high;
00054       unsigned long low;
00055     };
00056     // see SEQUENCENUMBER_UNKNOWN constant in BaseMessageTypes.h
00057 
00058     typedef sequence<long, 8> LongSeq8;
00059 
00060     /* SequenceNumberSet SubmessageElements are used as parts of several
00061        messages to provide binary information about individual sequence numbers
00062        within a range. */
00063     /* custom de/serializer implemented in opendds_idl: see 9.4.2.6 */
00064     struct SequenceNumberSet {
00065       SequenceNumber_t bitmapBase;
00066       unsigned long numBits;
00067       LongSeq8 bitmap;
00068     };
00069 
00070     /* LocatorList is used to specify a list of locators. */
00071     typedef sequence<OpenDDS::DCPS::Locator_t, 8> LocatorList;
00072 
00073 
00074     // OMG Specification formal/2010-11-01 DDS-RTPS v2.1
00075     // Section 9.3: "Mapping of the RTPS Types"
00076 
00077     /* Type used to hold a timestamp. */
00078     struct Time_t { // IETF RFC 1305: time = seconds + fraction / 2^32
00079       long seconds;
00080       unsigned long fraction;
00081     };
00082 
00083     // see TIME_* constants in BaseMessageTypes.h
00084     typedef Time_t Timestamp_t;
00085 
00086     /* Duration_t isn't defined in the PSM. It is used to hold time-differences.
00087        Should have at least nano-second resolution.  Table 9.13's row for
00088        PID_PARTICIPANT_LEASE_DURATION indicates this a 2-item struct or array,
00089        just like Time_t (which does have the needed resolution).  So we'll use
00090        Time_t for the Duration_t datatype. */
00091     typedef Time_t Duration_t;
00092 
00093     const long LOCATOR_KIND_INVALID = -1;
00094     const long LOCATOR_KIND_RESERVED = 0;
00095     const long LOCATOR_KIND_UDPv4 = 1;
00096     const long LOCATOR_KIND_UDPv6 = 2;
00097     const unsigned long LOCATOR_PORT_INVALID = 0;
00098     // see LOCATOR_* constants in BaseMessageTypes.h
00099 
00100     /* Specialization of Locator_t used to hold UDP IPv4 locators using a more
00101        compact representation. */
00102     struct LocatorUDPv4_t {
00103       unsigned long address;
00104       unsigned long _port;
00105     };
00106     // see LOCATORUDPv4_INVALID constant in BaseMessageTypes.h
00107 
00108     /* Enumeration used to distinguish whether a Topic has defined some fields
00109        within to be used as the 'key' that identifies data-instances within the
00110        Topic. */
00111     struct TopicKind_t {
00112       long value;
00113     };
00114 
00115     // Constants for the TopicKind_t::value field
00116     const short NO_KEY = 1;
00117     const short WITH_KEY = 2;
00118 
00119     /* Enumeration used to indicate the level of the reliability used for
00120        communications. */
00121     struct ReliabilityKind_t {
00122       long value;
00123     };
00124 
00125     // Constants for the ReliabilityKind_t::value field
00126     const short BEST_EFFORT = 1;
00127     const short RELIABLE = 3;
00128 
00129     struct KeyHash_t {
00130       DCPS::OctetArray16 value;
00131     };
00132 
00133     struct StatusInfo_t {
00134       OctetArray4 value;
00135     };
00136 
00137     /* Identifies the version of the RTPS protocol. */
00138     struct ProtocolVersion_t {
00139       octet major;
00140       octet minor;
00141     };
00142     // see PROTOCOLVERSION* constants in BaseMessageTypes.h
00143 
00144     /* Type used to represent the vendor of the service
00145        implementing the RTPS protocol. */
00146     struct VendorId_t {
00147       OctetArray2 vendorId;
00148     };
00149     // see VENDORID_* constants in BaseMessageTypes.h
00150 
00151     typedef unsigned long BuiltinEndpointSet_t;
00152     const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PARTICIPANT_ANNOUNCER =
00153       1 << 0;
00154     const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PARTICIPANT_DETECTOR =
00155       1 << 1;
00156     const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PUBLICATION_ANNOUNCER =
00157       1 << 2;
00158     const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PUBLICATION_DETECTOR =
00159       1 << 3;
00160     const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_ANNOUNCER =
00161       1 << 4;
00162     const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_SUBSCRIPTION_DETECTOR =
00163       1 << 5;
00164     const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PARTICIPANT_PROXY_ANNOUNCER =
00165       1 << 6;
00166     const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PARTICIPANT_PROXY_DETECTOR =
00167       1 << 7;
00168     const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PARTICIPANT_STATE_ANNOUNCER =
00169       1 << 8;
00170     const BuiltinEndpointSet_t DISC_BUILTIN_ENDPOINT_PARTICIPANT_STATE_DETECTOR =
00171       1 << 9;
00172     const BuiltinEndpointSet_t BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_WRITER =
00173       1 << 10;
00174     const BuiltinEndpointSet_t BUILTIN_ENDPOINT_PARTICIPANT_MESSAGE_DATA_READER =
00175       1 << 11;
00176 
00177     union Parameter;
00178 
00179     /* contains a list of Parameters, terminated with a sentinel */
00180     /* custom de/serializer implemented in opendds_idl: see 9.4.2.11 */
00181     typedef sequence<Parameter> ParameterList;
00182 
00183     struct OriginalWriterInfo_t {
00184       DCPS::GUID_t originalWriterGUID;
00185       SequenceNumber_t originalWriterSN;
00186       ParameterList originalWriterQos;
00187     };
00188 
00189     typedef unsigned short ParameterId_t;
00190 
00191     // see Table 9.12 "ParameterId Values" and 9.14 "Inline QoS Parameters"
00192     //   (the following constants are in the same order as Table 9.12)
00193     const ParameterId_t PID_PAD = 0x0000;
00194     const ParameterId_t PID_SENTINEL = 0x0001;
00195     const ParameterId_t PID_USER_DATA = 0x002c;
00196     const ParameterId_t PID_TOPIC_NAME = 0x0005;
00197     const ParameterId_t PID_TYPE_NAME = 0x0007;
00198     const ParameterId_t PID_GROUP_DATA = 0x002d;
00199     const ParameterId_t PID_TOPIC_DATA = 0x002e;
00200     const ParameterId_t PID_DURABILITY = 0x001d;
00201     const ParameterId_t PID_DURABILITY_SERVICE = 0x001e;
00202     const ParameterId_t PID_DEADLINE = 0x0023;
00203     const ParameterId_t PID_LATENCY_BUDGET = 0x0027;
00204     const ParameterId_t PID_LIVELINESS = 0x001b;
00205     const ParameterId_t PID_RELIABILITY = 0x001a;
00206     const ParameterId_t PID_LIFESPAN = 0x002b;
00207     const ParameterId_t PID_DESTINATION_ORDER = 0x0025;
00208     const ParameterId_t PID_HISTORY = 0x0040;
00209     const ParameterId_t PID_RESOURCE_LIMITS = 0x0041;
00210     const ParameterId_t PID_OWNERSHIP = 0x001f;
00211     const ParameterId_t PID_OWNERSHIP_STRENGTH = 0x0006;
00212     const ParameterId_t PID_PRESENTATION = 0x0021;
00213     const ParameterId_t PID_PARTITION = 0x0029;
00214     const ParameterId_t PID_TIME_BASED_FILTER = 0x0004;
00215     const ParameterId_t PID_TRANSPORT_PRIORITY = 0x0049;
00216     const ParameterId_t PID_PROTOCOL_VERSION = 0x0015;
00217     const ParameterId_t PID_VENDORID = 0x0016;
00218     const ParameterId_t PID_UNICAST_LOCATOR = 0x002f;
00219     const ParameterId_t PID_MULTICAST_LOCATOR = 0x0030;
00220     const ParameterId_t PID_MULTICAST_IPADDRESS = 0x0011;
00221     const ParameterId_t PID_DEFAULT_UNICAST_LOCATOR = 0x0031;
00222     const ParameterId_t PID_DEFAULT_MULTICAST_LOCATOR = 0x0048;
00223     const ParameterId_t PID_METATRAFFIC_UNICAST_LOCATOR = 0x0032;
00224     const ParameterId_t PID_METATRAFFIC_MULTICAST_LOCATOR = 0x0033;
00225     const ParameterId_t PID_DEFAULT_UNICAST_IPADDRESS = 0x000c;
00226     const ParameterId_t PID_DEFAULT_UNICAST_PORT = 0x000e;
00227     const ParameterId_t PID_METATRAFFIC_UNICAST_IPADDRESS = 0x0045;
00228     const ParameterId_t PID_METATRAFFIC_UNICAST_PORT = 0x000d;
00229     const ParameterId_t PID_METATRAFFIC_MULTICAST_IPADDRESS = 0x000b;
00230     const ParameterId_t PID_METATRAFFIC_MULTICAST_PORT = 0x0046;
00231     const ParameterId_t PID_EXPECTS_INLINE_QOS = 0x0043;
00232     const ParameterId_t PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT = 0x0034;
00233     const ParameterId_t PID_PARTICIPANT_BUILTIN_ENDPOINTS = 0x0044;
00234     const ParameterId_t PID_PARTICIPANT_LEASE_DURATION = 0x0002;
00235     const ParameterId_t PID_CONTENT_FILTER_PROPERTY = 0x0035;
00236     const ParameterId_t PID_PARTICIPANT_GUID = 0x0050;
00237     const ParameterId_t PID_PARTICIPANT_ENTITYID = 0x0051;
00238     const ParameterId_t PID_GROUP_GUID = 0x0052;
00239     const ParameterId_t PID_GROUP_ENTITYID = 0x0053;
00240     const ParameterId_t PID_BUILTIN_ENDPOINT_SET = 0x0058;
00241     const ParameterId_t PID_PROPERTY_LIST = 0x0059;
00242     const ParameterId_t PID_TYPE_MAX_SIZE_SERIALIZED = 0x0060;
00243     const ParameterId_t PID_ENTITY_NAME = 0x0062;
00244     const ParameterId_t PID_KEY_HASH = 0x0070;
00245     const ParameterId_t PID_STATUS_INFO = 0x0071;
00246     //   (the following constant is not in the spec but is needed for SEDP)
00247     const ParameterId_t PID_ENDPOINT_GUID = 0x005a;
00248     //   (the following constants are in the same order as Table 9.14)
00249     const ParameterId_t PID_CONTENT_FILTER_INFO = 0x0055;
00250     const ParameterId_t PID_COHERENT_SET = 0x0056;
00251     const ParameterId_t PID_DIRECTED_WRITE = 0x0057;
00252     const ParameterId_t PID_ORIGINAL_WRITER_INFO = 0x0061;
00253 
00254     // ParameterId Bitmask values (Table 9.11)
00255     const ParameterId_t PIDMASK_VENDOR_SPECIFIC = 0x8000;
00256     const ParameterId_t PIDMASK_INCOMPATIBLE = 0x4000;
00257 
00258     // Vendor-specific parameters
00259     // PID_OPENDDS_BASE won't be used as an actual PID, it's just the starting
00260     // point for ones we assign.  This is deliberately a larger number so as
00261     // not to overlap ones that other vendors are using and are in the Wireshark
00262     // dissector (they could overlap, but it would confuse Wireshark).
00263     const ParameterId_t PID_OPENDDS_BASE = PIDMASK_VENDOR_SPECIFIC + 0x3000;
00264     const ParameterId_t PID_OPENDDS_LOCATOR           = PID_OPENDDS_BASE + 1;
00265     const ParameterId_t PID_OPENDDS_ASSOCIATED_WRITER = PID_OPENDDS_BASE + 2;
00266 
00267     /* Always used inside a ParameterList */
00268     /* custom de/serializer implemented in opendds_idl */
00269     union Parameter switch (ParameterId_t) {
00270       case PID_TOPIC_NAME:
00271       case PID_TYPE_NAME:
00272         OpenDDS::DCPS::String256 string_data;
00273 
00274       // DDS Quality-of-Service (QoS) structs
00275       case PID_USER_DATA:
00276         DDS::UserDataQosPolicy user_data;
00277       case PID_GROUP_DATA:
00278         DDS::GroupDataQosPolicy group_data;
00279       case PID_TOPIC_DATA:
00280         DDS::TopicDataQosPolicy topic_data;
00281       case PID_DURABILITY:
00282         DDS::DurabilityQosPolicy durability;
00283       case PID_DURABILITY_SERVICE:
00284         DDS::DurabilityServiceQosPolicy durability_service;
00285       case PID_DEADLINE:
00286         DDS::DeadlineQosPolicy deadline;
00287       case PID_LATENCY_BUDGET:
00288         DDS::LatencyBudgetQosPolicy latency_budget;
00289       case PID_LIVELINESS:
00290         DDS::LivelinessQosPolicy liveliness;
00291       case PID_RELIABILITY:
00292         DDS::ReliabilityQosPolicy reliability;
00293       case PID_LIFESPAN:
00294         DDS::LifespanQosPolicy lifespan;
00295       case PID_DESTINATION_ORDER:
00296         DDS::DestinationOrderQosPolicy destination_order;
00297       case PID_HISTORY:
00298         DDS::HistoryQosPolicy history;
00299       case PID_RESOURCE_LIMITS:
00300         DDS::ResourceLimitsQosPolicy resource_limits;
00301       case PID_OWNERSHIP:
00302         DDS::OwnershipQosPolicy ownership;
00303       case PID_OWNERSHIP_STRENGTH:
00304         DDS::OwnershipStrengthQosPolicy ownership_strength;
00305       case PID_PRESENTATION:
00306         DDS::PresentationQosPolicy presentation;
00307       case PID_PARTITION:
00308         DDS::PartitionQosPolicy partition;
00309       case PID_TIME_BASED_FILTER:
00310         DDS::TimeBasedFilterQosPolicy time_based_filter;
00311       case PID_TRANSPORT_PRIORITY:
00312         DDS::TransportPriorityQosPolicy transport_priority;
00313 
00314       // RTPS-defined data types
00315       case PID_PROTOCOL_VERSION:
00316         ProtocolVersion_t version;
00317 
00318       case PID_VENDORID:
00319         VendorId_t vendor;
00320 
00321       case PID_UNICAST_LOCATOR:
00322       case PID_MULTICAST_LOCATOR:
00323       case PID_DEFAULT_UNICAST_LOCATOR:
00324       case PID_DEFAULT_MULTICAST_LOCATOR:
00325       case PID_METATRAFFIC_UNICAST_LOCATOR:
00326       case PID_METATRAFFIC_MULTICAST_LOCATOR:
00327         DCPS::Locator_t locator;
00328 
00329       case PID_MULTICAST_IPADDRESS:
00330       case PID_DEFAULT_UNICAST_IPADDRESS:
00331       case PID_METATRAFFIC_UNICAST_IPADDRESS:
00332       case PID_METATRAFFIC_MULTICAST_IPADDRESS:
00333         unsigned long ipv4_address;
00334         //NOTE: the spec uses "IPv4Address_t" which is not defined anywhere.
00335         //      We have chosen unsigned long to match the type of
00336         //      the address field in the LocatorUDPv4_t struct.
00337 
00338       case PID_DEFAULT_UNICAST_PORT:
00339       case PID_METATRAFFIC_UNICAST_PORT:
00340       case PID_METATRAFFIC_MULTICAST_PORT:
00341         unsigned long udpv4_port;
00342         //NOTE: the spec uses "Port_t" which is not defined anywhere.
00343         //      We have chosen unsigned long to match the type of
00344         //      the port field in the LocatorUDPv4_t struct.
00345 
00346       case PID_EXPECTS_INLINE_QOS:
00347         boolean expects_inline_qos;
00348 
00349       case PID_PARTICIPANT_MANUAL_LIVELINESS_COUNT:
00350         Count_t count;
00351 
00352       case PID_PARTICIPANT_BUILTIN_ENDPOINTS:
00353         unsigned long participant_builtin_endpoints;
00354 
00355       case PID_PARTICIPANT_LEASE_DURATION:
00356         Duration_t duration;
00357 
00358       case PID_CONTENT_FILTER_PROPERTY:
00359         DCPS::ContentFilterProperty_t content_filter_property;
00360 
00361       case PID_PARTICIPANT_GUID:
00362       case PID_ENDPOINT_GUID:
00363       case PID_GROUP_GUID:
00364       case PID_OPENDDS_ASSOCIATED_WRITER:
00365         DCPS::GUID_t guid;
00366 
00367       case PID_PARTICIPANT_ENTITYID:
00368       case PID_GROUP_ENTITYID:
00369         DCPS::EntityId_t entity_id;
00370 
00371       case PID_BUILTIN_ENDPOINT_SET:
00372         BuiltinEndpointSet_t builtin_endpoints;
00373 
00374       case PID_PROPERTY_LIST:
00375         PropertySeq properties;
00376 
00377       case PID_TYPE_MAX_SIZE_SERIALIZED:
00378         long type_max_size_serialized;
00379 
00380       case PID_ENTITY_NAME:
00381         EntityName_t entity_name;
00382 
00383       case PID_KEY_HASH:
00384         KeyHash_t key_hash;
00385 
00386       case PID_STATUS_INFO:
00387         StatusInfo_t status_info;
00388 
00389       case PID_CONTENT_FILTER_INFO:
00390         ContentFilterInfo_t content_filter_info;
00391 
00392       case PID_COHERENT_SET:
00393         SequenceNumber_t coherent_set;
00394 
00395       case PID_DIRECTED_WRITE:
00396         DCPS::GUIDSeq directed_write;
00397 
00398       case PID_ORIGINAL_WRITER_INFO:
00399         OriginalWriterInfo_t original_writer_info;
00400 
00401       case PID_OPENDDS_LOCATOR:
00402         DCPS::TransportLocator opendds_locator;
00403 
00404       default:
00405         DDS::OctetSeq unknown_data;
00406     };
00407 
00408     /* all Submessages are composed of a leading SubmessageHeader */
00409     struct SubmessageHeader {
00410       octet submessageId;
00411       octet flags;           // E = flags & 1 (EndiannessFlag)
00412       unsigned short submessageLength; /* octetsToNextHeader */
00413     };
00414     // Valid constants for the submessageId field are the enumerators
00415     // of the SubmessageKind enum in MessageTypes.h.
00416     // The least-significant bit of "flags" is E, the endianness flag:
00417     // pseudoenum E { BIG_ENDIAN = 0, LITTLE_ENDIAN = 1};
00418 
00419     /* Type used to hold fragment numbers. */
00420     struct FragmentNumber_t {
00421       unsigned long value;
00422     };
00423 
00424     /* FragmentNumberSet SubmessageElements are used to provide binary
00425        information about individual fragment numbers within a range. */
00426     /* custom de/serializer implemented in opendds_idl: see 9.4.2.8 */
00427     struct FragmentNumberSet {
00428       FragmentNumber_t bitmapBase;
00429       unsigned long numBits;
00430       LongSeq8 bitmap;
00431     };
00432 
00433     /* Provides information on the state of a Reader to a Writer. AckNack
00434        messages are sent by a Reader to one or more Writers. */
00435     struct AckNackSubmessage {
00436       SubmessageHeader smHeader;
00437         // F = smHeader.flags & 2 (FinalFlag)
00438       DCPS::EntityId_t readerId;
00439       DCPS::EntityId_t writerId;
00440       SequenceNumberSet readerSNState;
00441       Count_t count;
00442     };
00443 
00444     /* Sent from an RTPS Writer to an RTPS Reader. Indicates to the RTPS
00445        Reader that a range of sequence numbers is no longer relevant. */
00446     struct GapSubmessage {
00447       SubmessageHeader smHeader;
00448       DCPS::EntityId_t readerId;
00449       DCPS::EntityId_t writerId;
00450       SequenceNumber_t gapStart;
00451       SequenceNumberSet gapList;
00452     };
00453 
00454     /* Sent from an RTPS Reader to an RTPS Writer. It contains explicit
00455        information on where to send a reply to the Submessages that follow it
00456        within the same message. */
00457     struct InfoReplySubmessage {
00458       SubmessageHeader smHeader;
00459         // M = smHeader.flags & 2 (MulticastFlag)
00460       LocatorList unicastLocatorList;
00461       LocatorList multicastLocatorList; // if M
00462     };
00463 
00464     /* The NackFrag Submessage is used to communicate the state of a Reader to a
00465        Writer. */
00466     struct NackFragSubmessage {
00467       SubmessageHeader smHeader;
00468       DCPS::EntityId_t readerId;
00469       DCPS::EntityId_t writerId;
00470       SequenceNumber_t writerSN;
00471       FragmentNumberSet fragmentNumberState;
00472       Count_t count;
00473     };
00474 
00475     struct ParticipantProxy_t {
00476       ProtocolVersion_t protocolVersion;
00477       DCPS::GuidPrefix_t guidPrefix;  // optional in SPDPdiscoveredParticipantData
00478       VendorId_t vendorId;
00479       boolean expectsInlineQos;
00480       BuiltinEndpointSet_t availableBuiltinEndpoints;
00481       DCPS::LocatorSeq metatrafficUnicastLocatorList;
00482       DCPS::LocatorSeq metatrafficMulticastLocatorList;
00483       DCPS::LocatorSeq defaultMulticastLocatorList;
00484       DCPS::LocatorSeq defaultUnicastLocatorList;
00485       Count_t manualLivelinessCount;
00486     };
00487 
00488     // top-level data type for SPDP
00489     struct SPDPdiscoveredParticipantData {
00490       DDS::ParticipantBuiltinTopicData ddsParticipantData;
00491       ParticipantProxy_t participantProxy;
00492       Duration_t leaseDuration;
00493     };
00494 
00495     /* Type used to hold data exchanged between Participants.
00496        This is used for the BuiltinParticipantMessage{Writer,Reader}
00497        to implement the Writer Liveliness Protocol (8.4.13). */
00498     struct ParticipantMessageData {
00499       DCPS::GUID_t participantGuid;
00500       DDS::OctetSeq data;
00501     };
00502     // See PARTICIPANT_MESSAGE_DATA_KIND_* constants for the 'kind'
00503     // field of ParticipantMessageData, in MessageTypes.h.
00504 
00505     // OMG Specification formal/2010-11-01 DDS-RTPS v2.1
00506     // Section 9.4: "Mapping of the RTPS Messages"
00507 
00508 
00509     // ======== 9.4.2 SubmessageElements ========
00510     // Many SubmessageElements are already defined in RtpsBaseMessageTypes.idl.
00511     // The others follow directly here.
00512     // Note that we are not doing "typedef Foo_t Foo;" -- no need for it.
00513 
00514     // ======== 9.4.4 Header ========
00515 
00516     /* All messages should include a leading RTPS Header. */
00517     struct Header {
00518       OctetArray4 prefix;
00519       ProtocolVersion_t version;
00520       VendorId_t vendorId;
00521       DCPS::GuidPrefix_t guidPrefix;
00522     };
00523 
00524 
00525     // ======== 9.4.5 Submessages ========
00526 
00527     /* Sent from an RTPS Writer to an RTPS Reader. Notifies the RTPS Reader of a
00528        change to a data-object belonging to the RTPS Writer */
00529     struct DataSubmessage {
00530       SubmessageHeader smHeader;
00531         // Q = smHeader.flags & 2 (InlineQosFlag)
00532         // D = smHeader.flags & 4 (DataFlag)
00533         // K = smHeader.flags & 8 (KeyFlag)
00534       unsigned short extraFlags;
00535       unsigned short octetsToInlineQos; // used by serializer
00536       DCPS::EntityId_t readerId;
00537       DCPS::EntityId_t writerId;
00538       SequenceNumber_t writerSN;
00539       ParameterList inlineQos; // if Q
00540       // SerializedPayload payload; // if D||K
00541       //   These Submessages correspond to the OpenDDS::DCPS::DataSampleHeader,
00542       //   so they do not contain any payload data.
00543     };
00544 
00545     /* Sent from an RTPS Writer to an RTPS Reader. Extends the Data Submessage
00546        by enabling the serializedData to be fragmented and sent as multiple
00547        DataFrag Submessages. */
00548     struct DataFragSubmessage {
00549       SubmessageHeader smHeader;
00550         // Q = smHeader.flags & 2 (InlineQosFlag)
00551         // K = smHeader.flags & 4 (KeyFlag)
00552       unsigned short extraFlags;
00553       unsigned short octetsToInlineQos; // used by serializer
00554       DCPS::EntityId_t readerId;
00555       DCPS::EntityId_t writerId;
00556       SequenceNumber_t writerSN;
00557       FragmentNumber_t fragmentStartingNum;
00558       unsigned short fragmentsInSubmessage;
00559       unsigned short fragmentSize;
00560       unsigned long sampleSize;
00561       ParameterList inlineQos; // if Q
00562       // SerializedPayload payload;  // unconditional
00563       //   These Submessages correspond to the OpenDDS::DCPS::DataSampleHeader,
00564       //   so they do not contain any payload data.
00565     };
00566 
00567     /* Sent from an RTPS Writer to an RTPS Reader to communicate the sequence
00568        numbers of changes that the Writer has available. */
00569     struct HeartBeatSubmessage {
00570       SubmessageHeader smHeader;
00571         // F = smHeader.flags & 2 (FinalFlag)
00572         // L = smHeader.flags & 4 (LivelinessFlag)
00573       DCPS::EntityId_t readerId;
00574       DCPS::EntityId_t writerId;
00575       SequenceNumber_t firstSN;
00576       SequenceNumber_t lastSN;
00577       Count_t count;
00578     };
00579 
00580     /* Sent from an RTPS Writer to an RTPS Reader to communicate which fragments
00581        the Writer has available. */
00582     struct HeartBeatFragSubmessage {
00583       SubmessageHeader smHeader;
00584       DCPS::EntityId_t readerId;
00585       DCPS::EntityId_t writerId;
00586       SequenceNumber_t writerSN;
00587       FragmentNumber_t lastFragmentNum;
00588       Count_t count;
00589     };
00590 
00591     /* Sent from an RTPS Writer to an RTPS Reader to modify the GuidPrefix used
00592        to interpret the Reader entityIds appearing in the Submessages that follow it. */
00593     struct InfoDestinationSubmessage {
00594       SubmessageHeader smHeader;
00595       DCPS::GuidPrefix_t guidPrefix;
00596     };
00597 
00598     /* This message modifies the logical source of the Submessages that follow. */
00599     struct InfoSourceSubmessage {
00600       SubmessageHeader smHeader;
00601       long unused;
00602       ProtocolVersion_t version;
00603       VendorId_t vendorId;
00604       DCPS::GuidPrefix_t guidPrefix;
00605     };
00606 
00607     /* This Submessage is used to send a timestamp which applies to the Submessages
00608        that follow within the same message. */
00609     struct InfoTimestampSubmessage {
00610       SubmessageHeader smHeader;
00611         // I = smHeader.flags & 2 (InvalidateFlag)
00612       Timestamp_t timestamp; // if !I (watch the negation)
00613     };
00614 
00615     /* The purpose of the Pad Submessage is to allow the introduction of any padding
00616        necessary to meet any desired memory-alignment requirements. Its body is
00617        empty */
00618     struct PadSubmessage {
00619       SubmessageHeader smHeader;
00620     };
00621 
00622     /* InfoReplyIp4 is provided for efficiency reasons and can be used instead
00623        of the InfoReply Submessage to provide a more compact representation. */
00624     struct InfoReplyIp4Submessage {
00625       SubmessageHeader smHeader;
00626         // M = smHeader.flags & 2 (MulticastFlag)
00627       LocatorUDPv4_t unicastLocator;
00628       LocatorUDPv4_t multicastLocator; // if M
00629     };
00630 
00631     enum SubmessageKind {
00632       RESERVED_0,
00633       PAD,            /* = 0x01, Pad */
00634       RESERVED_2,
00635       RESERVED_3,
00636       RESERVED_4,
00637       RESERVED_5,
00638       ACKNACK,        /* = 0x06, AckNack */
00639       HEARTBEAT,      /* = 0x07, Heartbeat */
00640       GAP,            /* = 0x08, Gap */
00641       INFO_TS,        /* = 0x09, InfoTimestamp */
00642       RESERVED_10,
00643       RESERVED_11,
00644       INFO_SRC,       /* = 0x0c, InfoSource */
00645       INFO_REPLY_IP4, /* = 0x0d, InfoReplyIp4 */
00646       INFO_DST,       /* = 0x0e, InfoDestination */
00647       INFO_REPLY,     /* = 0x0f, InfoReply */
00648       RESERVED_16,
00649       RESERVED_17,
00650       NACK_FRAG,      /* = 0x12, NackFrag */
00651       HEARTBEAT_FRAG, /* = 0x13, HeartbeatFrag */
00652       RESERVED_20,
00653       DATA,           /* = 0x15, Data */
00654       DATA_FRAG       /* = 0x16, DataFrag */
00655     };
00656 
00657     union Submessage switch (SubmessageKind) {
00658       case PAD:
00659         PadSubmessage pad_sm;
00660 
00661       case ACKNACK:
00662         AckNackSubmessage acknack_sm;
00663 
00664       case HEARTBEAT:
00665         HeartBeatSubmessage heartbeat_sm;
00666 
00667       case GAP:
00668         GapSubmessage gap_sm;
00669 
00670       case INFO_TS:
00671         InfoTimestampSubmessage info_ts_sm;
00672 
00673       case INFO_SRC:
00674         InfoSourceSubmessage info_src_sm;
00675 
00676       case INFO_REPLY_IP4:
00677         InfoReplyIp4Submessage info_reply_ipv4_sm;
00678 
00679       case INFO_DST:
00680         InfoDestinationSubmessage info_dst_sm;
00681 
00682       case INFO_REPLY:
00683         InfoReplySubmessage info_reply_sm;
00684 
00685       case NACK_FRAG:
00686         NackFragSubmessage nack_frag_sm;
00687 
00688       case HEARTBEAT_FRAG:
00689         HeartBeatFragSubmessage hb_frag_sm;
00690 
00691       case DATA:
00692         DataSubmessage data_sm;
00693 
00694       case DATA_FRAG:
00695         DataFragSubmessage data_frag_sm;
00696 
00697       default:
00698         SubmessageHeader unknown_sm;
00699     };
00700 
00701     typedef sequence<Submessage> SubmessageSeq;
00702 
00703     // Section 9.6: "Mapping of the RTPS Protocol"
00704     // ======== 9.6.2 Data for Built-in Endpoints ========
00705 
00706     /* The following structs are used for the serializedData of
00707      * the SPDP/SEDP discovery protocol writers & readers.
00708      * They are serialized as a ParameterList, not CDR (see section 9.6.2.2).
00709      * Each of the fields should have a PID_* in Tables 9.12 and 9.13.
00710      */
00711 
00712     // top-level data type for SEDPbuiltinTopics
00713     struct DiscoveredTopicData {
00714       DDS::TopicBuiltinTopicData ddsTopicData;
00715     };
00716   };
00717 };
00718 
00719 #endif /* RTPS_RTPSCORE_IDL */

Generated on Fri Feb 12 20:05:25 2016 for OpenDDS by  doxygen 1.4.7