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

Generated on 10 Aug 2018 for OpenDDS by  doxygen 1.6.1