Home

3.x to 4.0 Transition Guide - Community RTI Connext Users

image

Contents

1. NddsSubscriptionStatusGet Section 5 4 4 Issue Listener Routines NDDSlssueListener See Section 5 8 3 for further details NddsSubscriptionlssueListenerDefaultGet Allows the Subscripton s default Listener hooks to be retrieved In RTI Data Distribution Service 4 0 a DataReader s default listener can be obtained by using the DDS_DataReader_get_listener routine prior to creating the DataReader object NddsSubscriptionlssuelistenerGet Retrieves the Subscription s Listener In RTI Data Distribution Service 4 0 the DDS_DataReader_get_listener routine can be used to retrieve the DataReader s listener NddsSubscriptionlssueListenerSet Modifies the Subscription s Listener In RTI Data Distribution Service 4 0 the DDS_DataReader_set_listener routine can be used to modify the DataReader s listener Proprietary Information of Real Time Innovations Inc 5 4 Subscription API 5 4 2 Subscription Create Delete Routines NddsSubscriptionCreateAtomic Allows the user to create a new subscription and pro vide all the associated subscription parameters at once In RTI Data Distribution Service 4 0 the equivalent functionality is supported by creating both a DataReader and a Subscriber So an indirect mapping to RTI Data Distribution Ser vice 4 0 exists in that a DataReader would need to be created after the creation of a Subscriber So both the DDS_DomainParticipant_create_subscriber an
2. Number of unreliable Subscriptions subscribed to this Publication This information is not available in RTI Data Distribution Service 4 0 L unacknowledgedlssues Number of unacknowledged issues This information is not available in RTI Data Distribution Service 4 0 6 3 5 Publication Methods for Sending Waiting Send Sends or writes the publication issue In RTI Data Distribution Service 4 0 the equivalent functionality would be to use the DDSDataWriter class write method SubscriptionWait Waits for the existence of Subscriptions There is no RTI Data Distri bution Service 4 0 DataWriter or Publisher method that will perform this specific functionality Proprietary Information of Real Time Innovations Inc 6 17 IdV 5 9 Chapter 6 Comparing the C APIs 6 4 Table 6 6 6 4 1 6 18 Wait Waits for send queue level to reach the same or lower level specified within the Wait method There is no RTI Data Distribution Service 4 0 DataWriter or Publisher method that will perform this specific functionality Publisher Methods This section discusses the RTI Data Distribution Service 3 x publisher methods and how they map to the RTI Data Distribution Service 4 0 functionality Some of the methods will map directly others will require redesign of the application Table 6 6 lists the Publisher class methods in alphabetical order Next we will look at how they map to RTI Data Distribution Service 4 0 functio
3. 6 6 6 7 6 8 6 2 2 Domain Method for Retrieving a Domain Handle 6 12 6 2 3 Domain Methods for Creating Destroying Publications 6 12 6 2 4 Domain Methods for Creating Destroying Publishers 6 12 6 2 5 Domain Methods for Creating Destroying Subscriptions 6 13 6 2 6 Domain Methods for Creating Destroying Subscribers 6 13 6 2 7 Domain Methods for Getting Setting Properties 6 14 6 2 8 Domain Methods for Clients and Servers ss 6 14 Publication Methods etre enirn it euentu eie a P egens 6 15 6 3 1 Publication Listener Methods sss 6 15 6 3 2 Publication Methods for Retrieving Instances and Topics 6 16 6 3 3 Publication Methods for Getting Setting Properties 6 16 6 3 4 Publication Method for Getting Status 6 16 6 3 5 Publication Methods for Sending Waiting sss 6 17 Publisher Metkiods iren iei tte rene De ebrei 6 18 6 4 1 Publisher Methods for Adding Removing Publications 6 18 6 4 2 Publisher Methods for Finding Publications 6 19 6 4 3 Publisher Methods for Sending Waiting sss 6 19 6 4 4 Publisher Methods for Iterating sse 6 19 Subscription MEE OS certe edite Ee o EAE 6 20 6 5 1 Subscription Method for Getting Instances and Topics
4. Ai1puJuungs g Chapter 8 Summary 8 2 Proprietary Information of Real Time Innovations Inc Appendix A Buildable Source Code Examples The projects listed below can be downloaded from the same URL used to download this document The projects include publish subscribe examples using the RTI Data Distri bution Service 3 1a and 4 0 APIs in C and C Note The project files for the RTI Data Distribution Service 3 1 examples are compatible with Visual Studio NET 2002 Visual C 7 0 The RTI Data Distribution Service 4 0 examples project files are compatible with Visual C 6 0 Makefiles for additional environments can be made available upon request Table A 1 RTI Data Distribution Service 3 1a C and C API Examples Delivery Mode Description Best effort Unicast Unicast with Publisher Subscriber Multicast Multicast with Multicast Meta traffic Reliable Unicast Multicast Table A 2 RTI Data Distribution Service 4 0 C and C API Examples Delivery Mode Description Best effort Unicast Reliable Unicast Proprietary Information of Real Time Innovations Inc A 1 sojduupx3 v Appendix A Buildable Source Code Examples A 2 Proprietary Information of Real Time Innovations Inc Index A Alarm Thread 2 10 B built in topics 5 32 C Clients 2 10 D database routines 5 16 Database Thread 2 11 to 2 12 datagram properties 4 4 DataReaders defined
5. 3 x Reference to 4 0 Information SerializeMethodType Section 5 2 7 1 DeserializeMethodType PrintMethodType Section 5 2 7 2 FreeMethodType Section 5 2 7 3 MaxSizeMethodType ScopeRegisterMethodType Section 5 2 7 4 NddsTypeRegister Section 5 2 7 3 NddsTypeScopeRegister Section 5 2 7 4 NddsTypeDestroy Section 5 2 7 3 See Appendix A for examples of both the data type definition and resulting source code generated by the nddsgen utility for both RTI Data Distribution Service 3 x and 4 0 Proprietary Information of Real Time Innovations Inc 5 2 Domain API 5 2 1 5 2 2 5 27 3 In both RTI Data Distribution Service 3 x and 4 0 use of the provided nddsgen utility is optional You may choose to write the data type routines yourself if so desired Serialization Routines SerializeMethodType Provides the prototype for the serialize routine required to seri alize an object instance into the NDDSCDRStream when sending a message to a peer All data types must provide this functionality when a data type is registered In RTI Data Distribution Service 3 x nddsgen automatically creates this routine and provides the source code In RTI Data Distribution Service 4 0 nddsgen will create the equivalent serialization source code DeserializeMethodType Provides the prototype for the deserialize routine required to deserialize the incoming data in the NDDSCDRStream into the object instance when receiving a message fro
6. Determines when RTI Data Distri bution Service invokes the Sub scription Listener For an IMMEDIATE Subscription RII Data Distribution Service 3 x invokes the Listener when the issue is received The Listener is invoked in the context of an RTI Data Dis tribution Service internal thread For a POLLED Subscription the Listener is only invoked when the application polls the Subscription The immediate mode is supported by using the listener The polling mode is not supported in RTI Data Distribution Service 4 0 In a future version polling will be imple mented by using the DDS concept of Conditions and Wait sets deadline Guaranteed time by which the pro vided callback will be invoked The deadline parameter is not specified when creating the Subscription or DataReader Deadline is a QoS policy and can be established on a per DataWriter DataReader basis by setting DDS_DataWriterQos deadline period and DDS_DataReaderQos deadline period minimumSepa ration Minimum amount of time between invocations of a Subscription s call back routine Similar to the deadline property in RTI Data Distribution Service 4 0 the mini mumSeparation is not specified when creating the Subscription or DataReader The time_based_filter QoS policy can be set for a DataReader DDS_DataReaderQos time_based_filter minimum_separation Proprietary Information of Real Time Innovations Inc Seliedo
7. QoS policy along with the Subscriber In RTI Data Distribution Service 3 x the deadline QoS was a policy associated only with the Subscription TIME_BASED_FILTER RTI Data Distribution Service 40 also supports the separation TIME BASED FILTER QoS policy for reliable communications In RTT Data Distribution Service 3 x the minimum separation QoS policy only applied to best effort communication persistence LIVELINESS LEASE DURATION reliability RELIABILITY OWNERSHIP STRENGTH OWNERSHIP can be either EXCLUSIVE or SHARED The application can achieve RTI Data Distribution Service 3 x publication strength strength behavior by using OWNERSHIP STRENGTH and OWNERSHIP EXCLUSIVE policies on DataWriters If the application selects OWNERSHIP SHARED then multiple DataWriters may alter the Topic issue and the DataReader will receive all instances of the Topic regardless of ownership strength n DURABILITY HISTORY and LIFESPAN sendqueuesize DAP timetokeepperiod RTI Data Distribution Service 4 0 QoS are more general and accommodate additional use cases Proprietary Information of Real Time Innovations Inc 3 3 SIOJOWUDIDd Chapter 3 Configuration Parameters Table 3 1 Controlling Service Behavior 3 x Parameter 4 0 QoS Policy DATA_READER_ PROTOCOL DATA READER RESOURCE LIMITS DATA WRITER PROTOCOL DATA WRITER RESOURCE LIMITS DATABASE DESTINATIONOR
8. RTI Data Distribution Service 4 0 a Topic type can have multiple instances distinguishable by a user supplied key In summary the concept of a Topic in RTI Data Distribution Service 3 x and RTI Data Distribution Service 4 0 is very similar and is identi fied by a string name and its associated type The main difference is that in RTI Data Distribution Service 4 0 there is an explicit Topic object that represents the association of the name and the type and can also have QoS and listeners associated with it Proprietary Information of Real Time Innovations Inc 2 7 lepow 12e qo Z Chapter 2 Object Model Comparative Analysis 2 8 2 9 2 10 2 8 DataTypes The concept of a DataType in RTI Data Distribution Service 3 x and 4 0 is very similar In both cases it represents the format of the data structure that the application wants to publish subscribe The format is represented by a name and described to the middle ware by means of a set of functions that encode how to marshal unmarshal the type These functions are auto generated by the bundled utility nddsgen from a text docu ment that describes the type in a platform neutral language Properties Parameters and QoS In RTI Data Distribution Service 3 x we use the terms Properties and Parameters in RTI Data Distribution Service 4 0 we refer to Quality of Service QoS and QoS policies The overall QoS of the system is comprised of individual QoS policies f
9. case the DDSPublisher delete datawriter method would be used Publisher Methods for Finding Publications PublicationFind Finds the Publication of a supplied Topic string that is managed by the Publisher In RTI Data Distribution Service 4 0 the DDSPublisher class supports the lookup datawriter method This method allows the application to supply a Topic string so that the associated DataWriter handle can be retrieved Publisher Methods for Sending Waiting Send Takes a snapshot of all the Publications managed by the Publisher and then sends the issues at once coalescing individual Publications into a single message to maximum network bandwidth utilization In RTI Data Distribution Service 4 0 the NDDSPublisher class does not provide equivalent functionality Each DataWriter s write method must be used to actually send the data SubscriptionWait Forces the calling thread to wait for at least the number of Subscrip tions to appear for each Publication managed by the Publisher There is no RTI Data Distribution Service 4 0 DataWriter or Publisher method that will perform this specific functionality Publisher Methods for Iterating Iterate Iterates over all managed Publications This functionality is supported within the DDS Specification but will not be implemented within the RTI Data Distribu tion Service 4 0 release OnMatch This is a method of the NDDSPublisherlter class It is called for each publi cation
10. e D T ETE 7 1 7 3 Retirement Pha se iocn aerae tdi evertit eek EEEE HEP NIE L REEL E ETE dates 7 3 SUMMO gs 0st eed E E E 8 1 Buildable Source Code Examples sese A 1 Index ee nels re et SP E Ln IPTE Index 1 vii viii Chapter 1 Overview What is RTI Data Distribution Service RTI Data Distribution Service is a software infrastructure that provides transparent net work connectivity that enables the efficient design of highly complex distributed appli cations RTI Data Distribution Service implements a publish subscribe communications model and allows distributed processes to share data without concern for the actual physical location and architecture of their peers The RTI Data Distribution Service 4 0 architecture implements the Data Centric Publish Subscribe DCPS layer of the OMG Data Distribution Service DDS for Real Time Sys tems The goal of DCPS is to provide efficient data movement within a distributed real time system With RTI Data Distribution Service system architects and programmers can create fault tolerant and flexible communication systems that will function over a wide variety of computer hardware operating systems languages and networking transport protocols Purpose of this Document This document has been written to facilitate the understanding and use of the 4 0 DDS API for those familiar with the 3 0 API formerly known as NDDS After reading this document a 3 x user should
11. 2 1 RTI Data Distribution Service 3 x Object Model Identified by means Identified by means of a Topic of a Topic TOP I Data values Note Publishers and Subscribers are optional Proprietary Information of Real Time Innovations Inc 2 3 Chapter 2 Object Model Comparative Analysis Figure 2 2 RTI Data Distribution Service 4 0 DDS Object Model 2 3 2 4 Identified by means Identified by means of a Topic of a Topic Subscription Publication Subscription Data values a a a ee a ee ee Publications and DataWriters In RTI Data Distribution Service 3 x the Publication is used by an application to write instances of data for publication and has parameters and properties associated with it that dictate behavior A Publication is created for each Topic to be published and can stand alone or be added to a Publisher In RTI Data Distribution Service 4 0 a DataWriter is very similar to a Publication in RTI Data Distribution Service 3 x from a functional perspective and acts as a liaison between an application and a Publisher with which it is always associated The DataWriter Proprietary Information of Real Time Innovations Inc 2 4 Subscriptions and DataReaders 2 4 informs the Publisher about the Topic name data type existence and provides the Publisher with each data sam
12. 2 5 DataTypes 2 8 DataWriters defined 2 4 DDS specification 8 1 DEADLINE 3 3 deadline 3 3 deserialization 5 15 domain base properties 4 7 Domain Listeners callbacks 5 32 Domain Participants 2 2 DomainParticipantListener 2 9 Proprietary Information of Real Time Innovations Inc Domains creation example C 5 2 creation example C 6 2 defined 2 2 dropped issues 5 25 5 38 DURABILITY 3 3 4 11 E entities list of 3 2 Event Thread 2 11 H HISTORY 3 3 issue listener routines 5 22 issues 5 35 issues dropped 5 25 5 38 L LAR 7 1 LEASE_DURATION 3 3 LIFESPAN 3 3 4 11 Limited Access Release 7 1 Listeners 2 8 defined 2 5 Index 1 hierarchical organization 2 9 issues 5 22 5 35 publications 6 15 reliable subscriptions 5 37 LIVELINESS 3 3 M manager 2 9 4 9 minimum separation 3 3 Multicast 4 3 N NDDS manager 2 9 4 9 NDDSAppManagerProperties 4 9 NDDSDeclProperties 4 5 NDDSDGramProperties 4 4 NDDSDomainBaseProperties 4 7 NDDSDomainProperties 4 1 JDDSInit 5 3 YDDSNICProperties 4 5 iDDSPublicationProperties 4 11 NDDSTasksProperties 4 1 O OWNERSHIP_STRENGTH 3 3 P patterns 5 29 persistence 3 3 platforms 1 2 polling 5 30 print routine 5 15 product retirement 7 3 protocol properties 4 8 Publications change in terminology 2 5 listener related routines 5 21 listeners 6 15 properties 4 11 status methods 6 16 status routines 5 19 Publishers change in terminology 2 6 defined 2 5 Q
13. 3 x Domain Listener In order for an RTI Data Distribution Service 4 0 based application to implement similar RTI Data Distribution Service 3 x Domain Listener functionality the built in Topic must be used The DDS specification introduces a set of Built in Topics Proprietary Information of Real Time Innovations Inc 5 31 IdV O S Chapter 5 Comparing the C APIs 5 8 1 1 5 32 and corresponding DataReader objects that can be used by the application to monitor and keep track of new DCPS entities as they are discovered The Built in Topics can then be accessed Domain Listener Callback Routines There is no direct mapping of these routines to RTI Data Distribution Service 4 0 but equivalent functionality can be implemented using RTI Data Distribution Service 4 0 as described below NDDSOnApplicationRemoteNewHook Equivalent functionality can be provided by subscribing to the built in Topic DCPSParticipant The application can then gain access to the built in Subscriber and associated DataReaders by using the DDS DomainParticipant get builtin subscriber routine provided by the DomainParticipant The built in DataReader objects can then be retrieved by using the DDS Subscriber get datareaders routine This allows the application to make decisions based on the remote Participant s activity such as not allowing the remote participant to participate within the network by using the DDS DomainParticipant ignore participant routin
14. DDS DataWriterQos 8 strength allows the Subscriber the abil ownership strength value ity to arbitrate among multiple Publica tions Allows custom information to be ET passed to the serialization routine it is serializeOption not interpreted by RTI Data Distribu Not s pported tion Service The ability to set the publishing queue size is facilitated by setting DDS_DataWriterQos resource limits max samples sendQueueSize Number of previous issues to save Note the HISTORY and RESOURCE LIMITS QoS policies must also be considered when set ting up instance sizing Proprietary Information of Real Time Innovations Inc seiuedoidq 12efqo p Chapter 4 Object Properties Table 4 9 Mapping NDDSPublicationProperties 3 x Field Name Description 4 0 Equivalent Exnhque thread n d each pu heaton Not required when using multiple threadId thread within a Publisher this guaran i DataWriters in a single Publisher tees thread safe operation sendSocketHandle Socket handle to be used by RTI Data Distribution Service Point at which RTI Data Distribution oues sek Service should indicate that the reliable publication s send queue s low water Notsunoorted mark has been reached BP Point at which RTI Data Distribution Service should indicate that the reliable highWaterMark publication s send queue s high water mark has been reached How often to send a heart beat message heartB
15. Data Distribution Service 4 0 Subscription Reliable Listeners The RTI Data Distribution Service 3 x Subscription Reliable Listener provides the ability for the application to tailor its behavior in response to activity associated with individ ual reliable subscription events The Reliable Subscription Listener interface defines the following function prototype Proprietary Information of Real Time Innovations Inc 5 37 IdV D S Chapter 5 Comparing the C APIs 5 8 5 5 38 NDDSSubscriptionReliableStatusRtn Provides the ability to monitor the status of a reli able stream on the subscribing node If you register a subscription reliable status routine in RTI Data Distribution Service 3 x RTI Data Distribution Service will invoke the routine upon occurrence of events pertaining to the reliable communi cation on the subscription side The NDDSSubscriptionReliableStatusRtn pro vides access to the following information l event Provides the event concerning the reliable subscription The event can be either e NDDS ISSUES DROPPED One or more issues have been missed by the subscription In RTI Data Distribution Service 4 0 the application can employ the Subscriber Listener on sample lost routine to determine infor mation pertaining to dropped data issues e NDDS PUBLICATION NEW The reliable issue is coming from a publication different from the one that sent the previous issue This functionality is not curren
16. Fixes EONPS End of New Product Sales End of web shipments and design win sales EOTS End of Technical Support Product is retired Services Customer can purchase a service agreement to further maintain the retired release Each version of RTI Data Distribution Service will have a table similar Table 7 1 which will be available from your local RTI Sales Team Each version s retirement table will differ since each product supports a slightly differ ent OS compiler configuration If you have further questions concerning product retire ment or would like further clarification please contact sales rti com for additional details Proprietary Information of Real Time Innovations Inc 7 3 o 5A29Jr Jonpoud Z Chapter 7 RTI Data Distribution Service Product Lifecycle Table 7 1 Sample Retirement Schedule Template Version N x D Windows NT Windows 2000 Windows XP Solaris 2 7 Solaris 2 8 Solaris 2 9 LynxOs x86 LynxOs PPC VxWorks 5 4 x86 VxWorks 5 4 PPC VxWorks 5 4 ARM StrongArm VxWorks 5 5 x86 VxWorks 5 5 PPC Proprietary Information of Real Time Innovations Inc Chapter 8 Summary The goal of this document is to provide sufficient information so that an application developer familiar with the 3 x API can assess the level of effort necessary to port an existing application to the RTI Data Di
17. Publisher object in RTI Data Distribution Service 3 x also supported Signaled and Asynchronous modes of operation these are not supported in RTI Data Distribution Ser vice 4 0 Publisher Create Delete Routines NddsPublisherCreate A Publisher manages a group of Publications In RTI Data Dis tribution Service 4 0 the DDS DomainParticipant create publisher routine can be used to create a Publisher The application would then need to further create a DataWriter to allow the application to publish data NddsCustomSocketPublisherCreate Allows the application to create a publisher using a socket provided as a parameter No such functionality currently exists within RTI Data Distribution Service 4 0 NddsPublisherDestroy In RTI Data Distribution Service 3 x this function destroys a pub lisher It is important to note that Publications within the Publisher are NOT destroyed so they ll have to be destroyed separately The actual deallocation of memory for the publisher may not occur immediately to ensure safety among the different tasks After calling this function the Publisher is invalid and should not be used In RTI Data Distribution Service 4 0 the DDS DomainParticipant delete publisher routine would be used after all associated DataWriter entities were destroyed via the DDS Publisher delete datawriter Note that within RTI Data Distribution Ser vice 4 0 DataWriter s cannot exist without a Publisher unlike RTI Data Distrib
18. QOS DEFAULT NULL return RTI FALSE retcode HelloMsgTypeSupport register type participant HelloMsgTYPENAME if retcode DDS RETCODE OK return RTI FALSE if topic DDS DomainParticipant create topic participant Example HelloMsg HelloMsgTYPENAME DDS TOPIC QOS DEFAULT NULL return RTI FALSE listener on requested deadline missed MyListener on requested deadline missed listener on requested incompatible qos MyListener on requested incompatible qos listener on sample rejected MyListener on sample rejected listener on liveliness changed MyListener on liveliness changed listener on sample lost MyListener on sample lost listener on subscription match MyListener on subscription match listener on data available MyListener on data available if reader HelloMsgDataReader DDS Subscriber create datareader subscriber DDS Topic as TopicDescription topic DDS DATAREADER QOS DEFAULT amp listener return RTI FALSE for count 0 count gt 0 count RtiDebugPrint Sleeping for s sec n RtiNtpTimeToString amp receive period sec deadlineString RtiThreadSleep amp receive period sec return RTI_TRUE F The RTI Data Distribution Service 3 x and 4 0 routines used in the above example are shown in Table 5 3 for comparison purposes Compilable versions of both the RTI Data Distribution Service 3 x and 4 0 source code shown a
19. RTI Data Distribution Service 4 0 class MyListener public DDSDataReaderListener 77 public virtual void on data available DDSDataReader reader void MyListener on data available DDSDataReader reader 6 8 HelloMsgDataReader HelloMsgreader HelloMsgDataReader reader HelloMsgSeq data seq DDS SampleInfoSeq info seq DDS ReturnCode t retcode int i retcode HelloMsgreader take data seq info seq DDS LENGTH UNLIMITED DDS ANY SAMPLE STATE DDS ANY VIEW STATE DDS ANY INSTANCE STATE if retcode DDS RETCODE OK return for i 0 i lt data_seq length i HelloMsgTypeSupport printX amp data_seq i HelloMsgreader gt return_loan data_seq info_seq Proprietary Information of Real Time Innovations Inc 6 1 Examples extern C int subscriberMain int nddsDomain int participantIndex const char peerHost int peerMaxIndex DDSDomainParticipantFactory factory NULL DDS DomainParticipantQos participant qos DDSDomainParticipant participant NULL DDSSubscriber subscriber NULL DDSTopic topic NULL MyListener listener NULL HelloMsgDataReader reader NULL DDS ReturnCode t retcode RTINtpTime receive period sec 0 0 Char deadlineString RTI NTP TIME STRING LEN int count 0 RtiNtpTimePackFromNanosec receive period sec 4 0 4 seconds if factory DDSDomainParticipantFactory get instance
20. automatically created through Pattern Subscription are destroyed In RTI Data Distribution Service 4 0 use the DDSDomainParticipant class delete_subscriber method after all associated DataReader entities are destroyed Proprietary Information of Real Time Innovations Inc 6 13 IdV 5 9 Chapter 6 Comparing the C APIs 6 2 7 6 2 8 6 14 via the DDSSubscriber class delete datareader method In RTI Data Distribution Service 4 0 DataReaders cannot exist without a Subscriber unlike RTI Data Distri bution Service 3 x where a Subscription can exist with or without a Subscriber Domain Methods for Getting Setting Properties PublicationPropertiesGet This routine retrieves the publication s property structure The properties associated with a Publication in RTI Data Distribution Service 3 x do not map directly to DataWriter properties in RTI Data Distribution Service 4 0 but object QoS properties can be retrieved by using the DDSPublisher class get_default_datawriter_qos method PublicationPropertiesSet The properties associated with a Publication in RTI Data Dis tribution Service 3 x do not map directly to DataWriter properties in RTI Data Dis tribution Service 4 0 but object QoS policies can be established for a given DataWriter by using the DDSPublisher class set default datawriter qos method SubscriptionPropertiesGet This routine retrieves the Subscription s property structure The properties associated with a Su
21. be able to port a 3 x based application to RTI Data Distribu tion Service 4 0 The object models of both products are quite similar both address the real time autono mous publish subscribe communication paradigm While several RTI Data Distribution Service 3 x configuration and tuning parameters map directly to QoS policies supported in RTI Data Distribution Service 4 0 several new policies are introduced as well The API Proprietary Information of Real Time Innovations Inc 1 1 MBIAIOAO Chapter 1 Overview has changed between the products as a result of the introduction of the DDS Specifica tion Appendix A provides a list of available source code examples that represent use cases using both the 3 x and 4 0 APIs These buildable projects are available from the same URL used to download this document For information on which platforms are supported in RTI Data Distribution Service 4 0 contact your local RTI Sales Team or see the RTI Data Distribution Service 4 0 Release Notes a separate document that is part of the RTI Data Distribution Service 4 0 distribution Proprietary Information of Real Time Innovations Inc Chapter 2 Object Model Comparative Analysis The object model of both products is similar in that an application instantiates a Domain or DomainParticipant and proceeds to create objects that allow the sending and or receiving of Topic data The discovery information is fully distributed without cen tral
22. creates this routine and pro vides the source code NddsTypeScopeRegister Provides the prototype to register an NDDSType to NDDSS cope which is a graphical debug tool This routine binds the optional scope regis ter routine to an NDDSType In RTI Data Distribution Service 3 x if you use nddsgen you don t have to use this function directly because nddsgen gener ates the required routines and creates a wrapper function to register the scope reg ister routine of the type Database API The RTI Data Distribution Service C API provides a set of functions that allow you to manipulate the RTI Data Distribution Service internal database if so desired These rou tines are not supported in RTI Data Distribution Service 4 0 NddsDBaseRemove Provides the prototype to retrieve and remove an object from the RTI Data Distribution Service internal database Proprietary Information of Real Time Innovations Inc 5 3 Publication API 5 3 Table 5 6 Proprietary Information of Real Time Innovations Inc NddsDBaseFind Provides the prototype to locate an object in the RTI Data Distribution Service internal database NddsDBaseAdd Provides the prototype to add an object to the RTI Data Distribution Service internal database Publication API This section discusses the RTI Data Distribution Service 3 x publication function calls and how they map to the RTI Data Distribution Service 4 0 functionality As in
23. destroyed the manager process propagates the event information to all other remote managers within the Domain The manager is a separate process on operating systems with a process model such as UNIX and Windows NT Windows 2000 and Windows XP or a task VxWorks Under normal circumstances RTI Data Distribution Service applications automatically start the manager Each Domain will have a separate man ager process In RTI Data Distribution Service 4 0 there is no separate manager process The responsi bilities previously performed by the manager process are automatically managed by the RTI Data Distribution Service libraries linked to each application Proprietary Information of Real Time Innovations Inc 2 9 lepow 12e qo z Chapter 2 Object Model Comparative Analysis 2 12 2 13 2 13 1 2 10 Client Server RTI Data Distribution Service 4 0 does not provide Client Server functionality it is not specified within the DDS Specification Client Server functionality will be introduced in a future release of the product Applications and Threads Threads in RTI Data Distribution Service 3 X In RTI Data Distribution Service 3 x an application is comprised of user threads as well as several RTI Data Distribution Service specific threads There can be several applications active on a single computing node as well as distributed throughout the network Each RTI Data Distribution Service application will consist
24. fresh issue received This information is not available in RTI Data Distribution Service 4 0 The status of any DomainParticipant entity can be obtained via the StatusCondi tion class Further status can be ascertained by using the DataReader s get liveliness changed status get requested deadline missed status get requested incomptibile qos status and get sample rejected status meth ods 6 6 Subscriber Methods This section examines the RTI Data Distribution Service 3 x Subscriber methods and how they map to RTI Data Distribution Service 4 0 functionality Some of the methods will map directly others will require redesign of the application Table 6 8 lists the NDDS Subscriber class methods in alphabetical order Table 6 8 Subscriber C Methods 3 x Method Reference to 4 0 Information Iterate Section 6 6 4 PatternAdd Section 6 6 5 PatternRemove Poll Section 6 6 3 Proprietary Information of Real Time Innovations Inc 6 23 IdV 5 9 Chapter 6 Comparing the C APIs Table 6 8 Subscriber C Methods 6 6 1 6 6 2 6 6 3 6 24 3 x Method Reference to 4 0 Information SubscriptionAdd Section 6 6 1 SubscriptionFind Section 6 6 2 SubscriptionRemove Section 6 6 1 Subscriber Methods for Adding Removing Subscriptions SubscriptionAdd Adds a Subscription to the Subscriber In RTI Data Distribution Ser vice 4 0 since a DataReader canno
25. gt ListenerGet Publication gt NddsInstanceGet Section 6 3 2 Publication gt NddsTopicGet Publication gt PropertiesGet Section 6 3 3 Publication gt PropertiesSet Publication gt ReliableStatusGet Section 6 3 4 Publication gt Send Publication gt SubscriptionWait Section 6 3 5 Publication gt Wait 6 3 1 Publication Listener Methods ListenerGet Retrieves the Publication s Listener In RTI Data Distribution Service 4 0 a DataWriter s Listener can be obtained by using the DDSDataWriter class get_listener method ListenerSet Allows the Publication s Listener to be modified In RTI Data Distribution Service 4 0 a DataWriter s Listener can be modified by using the DDSDatatWriter class set_listener method Proprietary Information of Real Time Innovations Inc 6 15 IdV 5 9 Chapter 6 Comparing the C APIs 6 3 2 Publication Methods for Retrieving Instances and Topics InstanceGet Obtains a pointer to the Publication instance In RTI Data Distribution Service 4 0 a Publication can use the DDSPublisher class lookup datawriter method to obtain the DataWriter s instance NddsTopicGet Retrieves the Publication s Topic The DDSDomainParticipant class provides the find_topic method which gives access to an existing enabled Topic based on its name The method expects two arguments name of the Topic and a time out value 6 3 3 X Publication Methods for Getting Settin
26. matching the NDDSTopic and NDDSType specified in the NDDSPublisher Class Iterate This functionality is supported in the DDS Specification but will not be supported in RTI Data Distribution Service 4 0 Proprietary Information of Real Time Innovations Inc 6 19 IdV 5 9 Chapter 6 Comparing the C APIs 6 5 Subscription Methods This section examines the RTI Data Distribution Service 3 x Subscription methods and how they map to RTI Data Distribution Service 4 0 functionality Some of the methods will map directly others will require redesign of the application Table 6 7 lists the RTI Data Distribution Service 3 x NDDSSubscription class methods in alphabetical order Table6 7 Subscription C Methods 3 x Method Reference to 4 0 Information InstanceGet Section 6 5 1 IsReliable Section 6 5 2 IssueListenerGet Section 6 5 3 IssueListenerSet NddsTopicGet Section 6 5 1 Poll Section 6 5 4 PropertiesGet Section 6 5 1 PropertiesSet PublicationWait Section 6 5 4 6 5 1 Subscription Method for Getting Instances and Topics InstanceGet Obtains a pointer to a Subscription s instance In RTI Data Distribution Service 4 0 use the DDSSubscriber class lookup datareader method to retrieve the instance of a DataReader attached to a Topic NddsTopicGet Returns the Topic subscribed to In RTI Data Distribution Service 4 0 use the DDSDomainParticipant s find topic method to acc
27. not a supported DDS feature Subscription Methods for Getting Setting Properties PropertiesGet Retrieves the current properties of a Subscription The properties asso ciated with a Subscription in RTI Data Distribution Service 3 x do not map directly to DataReader properties in RTI Data Distribution Service 4 0 but object QoS poli cies can be retrieved for a given DataReader by using the DDSDataReader class get qos method PropertiesSet Modifies the current Subscription properties The properties associated with a Subscription in RTI Data Distribution Service 3 x do not map directly to DataReader properties in RTI Data Distribution Service 4 0 but object properties can be established for a given DataReader by using the DDSDataReader class set qos method Subscription Methods for Getting Status RecvStatusGet Allows you to enquire to the subscriptions current status Returns the following Proprietary Information of Real Time Innovations Inc 6 2 IdV 25 9 Chapter 6 Comparing the C APIs 6 22 J localTimeWhenReceived Local time when the issue was received This infor mation is not available in RTI Data Distribution Service 4 0 I nddsTopic Topic of the Subscription receiving the issue In RTI Data Distribu tion Service 4 0 the DDSDataReader class get topicdescription method can be used to determine the DataReader s topic L nddsType Type of the Subscription receiving the issue This informati
28. of valid IP addresses in discoveryX multicast groups count numNics the nicIPAddress field DDS DomainParticipantQoS discoveryX initial peer locators count Not required there is no manager pro cess As mentioned in Section 4 1 6 nic Valid IP addresses the NDDS DDS DomainParticipantQoS manager should use discoveryX initial peer locators can be used to specify the available network interfaces on the computing node Proprietary Information of Real Time Innovations Inc 4 2 Publication and Subscription Properties 4 2 4 2 1 NDDSPublicationProperties Publication and Subscription Properties Table 4 9 provides information on how to map the fields in an NDDSPublicationProper ties structure Table 4 9 Mapping NDDSPublicationProperties 3 x Field Name Description 4 0 Equivalent timeToKeepPeriod How long a Publication should keep issues it has already published Similar functionality is available in the DURABILITY TRANSIENT LOCAL and LIFESPAN QoS poli cies Expiration time Before this time expires a Subscription ignores issues from redundant Publications of lesser DDS DataWriterQos liveliness persistence strength After this time a Subscription lease duration will accept the next lower strength Pub lication as the valid data source Controls arbitration among multiple Publishers of the same RTI Data Dis oe tribution Service Topic Publication
29. or changes in status RTI Data Distribu tion Service invokes the appropriate object s Listener method Each object has just one Listener which is used to process all incoming events Of course that Listener can be designed to have its own set of callback routines to further refine event processing Similar listener functionality was supported in RTI Data Distribution Service 3 x The data is accessed by invoking the appropriate operation such as read or take on the related DataReader The read method leaves the data in place whereas take removes the issue from RTI Data Distribution Service s queue A future version of the product will implement Conditions and Wait sets which will provide a way for an application to block until specific events occur This mechanism will allow the application to process events synchronously within its own execution thread Publishers In RTI Data Distribution Service 3 x an application may create several Publications Man aging each Publication separately can be cumbersome and inefficient Publishers are optional but allow applications to manage several Publications and provide additional modes of configuration in order to support the real time requirements of multi threaded applications i e Signaled and Asynchronous publishing Once a Publisher is created and Publications are added they are managed as a group and the published messages are coalesced when disseminated for network
30. probes for a given number of Publications for this Subscription This functionality is not currently supported in RTI Data Distribution Service 4 0 Subscription Topic and InstanceRoutines NddsSubscriptionTopicGet Returns the Topic subscribed to In RTI Data Distribution Service 4 0 the DataReader provides the DDS DataReader get topicdescription routine which returns the topic description associated with the DataReader NddsSubscriptionInstanceGet Obtains a pointer to a Subscription s instance In RTI Data Distribution Service 4 0 the DDS Subscriber lookup datareader can be used to retrieve the instance of a DataReader attached to a Topic Reliable Subscription Routines NDDSSubscriptionReliableStatusRtn Provides the ability to monitor the status of the reliable stream on the subscription side If one registers a subscription reliable sta tus routine RTI Data Distribution Service 3 1x will invoke the routine upon occur rence of events pertaining to the reliable communication on the subscription side You can then take appropriate actions based on the event and other parameters The routine provides the following event can be either Proprietary Information of Real Time Innovations Inc 5 4 Subscription API e NDDS ISSUES DROPPED One or more issues have been missed by the subscription In RTI Data Distribution Service 4 0 the application can employ the Subscriber Listener on sample lost routine to determi
31. subscribing to the built in Topic DCPSSubscription The application can gain access to the built in Subscriber and associated DataReaders by using the DomainParticipant get_builtin_subscriber and get_datareader methods to gain access to the built in DCPSSubscription Topic and monitor all traffic related to remote DataWriter activity Domain Listeners for NDDS Managers There is no NDDS Manager in RTI Data Distribution Service 4 0 so there are no equiva lent methods for the RTI Data Distribution Service 3 x Manager Listeners OnManagerRe moteNew and OnManagerRemoteDelete Domain Listeners for Servers Client Server functionality is not supported in RTI Data Distribution Service 4 0 There is no equivalent functionality for the RTI Data Distribution Service 3 x Server Listener meth ods OnServerRemoteNew and OnServerRemoteDelete Publication Listeners The RTI Data Distribution Service 3 x Publication Listener provides the ability for the application to tailor its behavior in response to middleware activity associated with individual publication events The Publication Listener interface provides the following virtual methods there is no equivalent functionality in RTI Data Distribution Service 4 0 for any of these OnAfterlssueSent This method if implemented by the application is invoked by RTI Data Distribution Service directly after an issue is sent Proprietary Information of Real Time Innovations Inc 6 8 Liste
32. the following callback function prototype Proprietary Information of Real Time Innovations Inc 5 35 IdV D S Chapter 5 Comparing the C APIs 5 36 NDDSRecvCallBackRin this routine is provided by the application and is registered when the subscription is created and is invoked by RTI Data Distribution Service at different times depending on the subscription mode If configured for IMMEDI ATE Subscription this routine is invoked as soon as the data issue is received If configured for POLLED Subscription this routine is invoked when the receiving application explicitly polls If there are more than one issues received since the last poll this routine will be executed multiple times for each issue In RTI Data Distribution Service 4 0 the DataReaderListener s on data available routine would be used to receive incoming data The NDDSRecvCallBackRtn s function prototype provides access to both received issue data and issue data status The status that is available on a per issue basis is listed below LJ localTimeWhenReceived Local time when the issue was received This infor mation is unavailable in RTI Data Distribution Service 4 0 I nddsTopic tTopic of the Subscription receiving the issue In RTI Data Distribu tion Service 4 0 the DDS DataReader get topicdescription routine can be used to determine the DataReader s topic 1 nddsType Type of the Subscription receiving the issue This information is not current
33. to be dissemi nated by the NDDS manager multicast Whether or not the manager should send and received using multicast addressing and if so with what properties purgePeriod Rate at which the NDDS manager will clean up stale objects within the internal database at this spec ified rate refreshPeriod Rate at which the NDDS man ager s presence is updated expirationTime NDDS manager s expiration time pushDelayMax Maximum delay the NDDS man ager will wait prior to pushing manager changes to fellow man agers pushAttempMax Number of times to push changes in the NDDS manager to fellow managers Not required there is no RTI Data Distribution Service manager process wire RIPS wire protocol properties See Section 4 1 8 See Section 4 1 8 Proprietary Information of Real Time Innovations Inc seiuedoidq 12e qo p Chapter 4 Object Properties Table 4 8 Mapping NDDSAppManagerProperties 3 x Field Name Description 4 0 Equivalent Fellow managers that should be communicated with for inter hostList manager protocol communica tion Not required there is no RTI Data Enables or disables firing off the Distribution Service manager process 21 announcement of the local appli initialAnnounceEn de abled cation s existence to all the other a managers prior to executing the local application DDS DomainParticipantQoS Number
34. 6 20 6 5 2 Subscription Method for Checking Reliability 6 20 6 5 3 Subscription Methods for Getting Setting Listeners 6 21 6 5 4 Subscription Methods for Polling and Waiting 6 21 6 5 5 Subscription Methods for Getting Setting Properties 6 21 6 5 6 Subscription Methods for Getting Status 6 21 Subscriber Methods ere ri rerit ertet te diets 6 23 6 6 1 Subscriber Methods for Adding Removing Subscriptions 6 24 6 6 2 Subscriber Methods for Finding Subscriptions 6 24 6 6 3 Subscriber Method for Polling Subscriptions 6 24 6 6 4 Subscriber Method for Iterating sss 6 25 6 6 5 Subscriber Methods for Adding Removing Patterns 6 25 Client and Server Methods 6 25 WEISEONNOLS RERO 6 25 6 8 1 Domain L1Steners 23 ado ripetere quitte reps er deore tsa a Poir E PU eene 6 26 6 8 2 Publication Listeners eter itii enter ree 6 28 6 8 3 ISDEM M 6 29 6 8 4 Subscription Reliable Listeners esses 6 29 6 8 5 Publisher and Subscriber Listeners eese 6 30 6 8 6 Client and Server Listeners sees 6 30 RTI Data Distribution Service Product Lifecycle 7 1 7 1 Barly Access Phase etin itt i ose roce erba asias 7 1 7 2 Prod ucton Phase ceret teet eee feos epi cts eee
35. 8 5 6 1 Subscriber Create Delete Routines eee 5 29 5 6 2 Subscriber Pattern Routines esses nre 5 29 5 6 3 Subscriber Add Remove Routines eee 5 30 5 6 4 Subscriber Poll Routine eese 5 30 5 6 5 Subscriber Find and Iterate Routines sese 5 30 5 7 Client and Server APIS troie aer Foe e Peu ue Eve EYE i 5 31 5 8 LAStenefSs eerte meer ito e deve ERR Pea de Pe e vae PERSE E DRE 5 31 5 8 1 Domain Listeners tc et eR tane Peer e ea E ANEAN 5 31 5 8 2 Publication Listeners ccccccsccscesscessecessecsseecsseeseecsseceseecsseeeseceeeees 5 34 5 8 3 Issue ois tener iere tere respec toL exar ote ESTNE Pe LEER E ERE Ee PERE E GENRE E S 5 35 5 8 4 Subscription Reliable Listeners sss 5 37 5 8 5 Publisher and Subscriber Listeners sese 5 38 5 8 6 Client and Server Listeners esent 5 39 Comparing the C APIS uie atet cinta erotic rosae u died edd 6 1 6 1 Examples etant tidie tenhptetetueroDet iu A ie 6 2 6 1 1 Domain Instantiation eesssessesseeseeee eene nnne nennen 6 2 6 1 2 Publishitrig Data itid ete rete cie rete ed 6 3 6 1 3 Subscribing to Data sssssssssssseeeeeeneneeee nentes 6 7 6 2 Domnoain Methods rre rere teret rore ta lp reo Pen ordeo PEE ERE 6 11 6 2 1 Methods for Creating Destroying Domains 6 11 vi 6 3 6 4 6 5
36. DER DISCOVERY CONFIG DISCOVERY DOMAIN PARTICIPANT RESOURCE LIMITS ENTITYFACTORY EVENT EXCLUSIVE AREA GROUPDATA No Direct HISTORY Mapping LATENCYBUDGET LIFESPAN PARTITION PRESENTATION READERDATALIFECYCLE RECEIVER POOL RESOURCELIMITS SYSTEM RESOURCE LIMITS TOPICDATA TRANSPORT TRANSPORTPRIORITY USERDATA WIRE PROTOCOL WRITERDATALIFECYCLE Proprietary Information of Real Time Innovations Inc 41 Domain and Infrastructure Properties Chapter 4 Object Properties 4 1 In addition to the parameters explicitly set when creating a Publisher or Subscriber like the strength persistence and deadline parameters discussed in Chapter 3 RTI Data Distribution Service 3 x also allows you to modify properties that control the infrastruc ture s internal behavior As a result more performance can be tuned into the system depending on the topology of the application s specific requirements These object properties are set when the object is created This chapter lists the properties you can set for each object in RTI Data Distribution Ser vice 3 x and how they map to associated RTI Data Distribution Service 4 0 QoS policies This chapter includes the following sections L Domain and Infrastructure Properties Section 4 1 1 Publication and Subscription Properties Section 4 2 1 Client and Server Prop
37. LISHER QOS DEFAULT NULL return RTI FALSE retcode HelloMsgTypeSupport register type participant HelloMsgTYPENAME if retcode DDS RETCODE OK return RTI FALSE if topic DDS DomainParticipant create topic participant Example Hel loMsg HelloMsgTYPENAME DDS TOPIC QOS DEFAULT NULL return RTI FALSE if writer HelloMsgDataWriter DDS_Publisher_create_datawriter pub lisher topic DDS_DATAWRITER_QOS_DEFAULT NULL return RTI_FALSE if instance HelloMsgTypeSupport createX return RTI_FALSE for count 0 count gt 0 count RtiDebugPrint C API Publishing best effort unicast example count d n count Modify data to be published sprintf instance gt msg C API Publishing best effort unicast example count d count Proprietary Information of Real Time Innovations Inc 5 5 IdV O S Chapter 5 Comparing the C APIs retcode HelloMsgDataWriter write writer instance amp instance handle if retcode DDS RETCODE OK return RTI FALSE RtiThreadSleep amp send period sec return RTI_TRUE Ju The RTI Data Distribution Service 3 x and 4 0 routines used in the above example are shown in Table 5 2 for comparison purposes Table 5 2 C Routines for Publishing Data 3 x routines 4 0 routines DDS DomainParticipantFactory get instance NDDSInit DD
38. QoS policies compatibility 3 2 defined 3 2 ZZZ Index 2 introduction 2 8 R Receive Thread 2 10 2 12 receiving data example C 5 6 example C 6 7 Release Notes 1 2 RELIABILITY 3 3 reliability 3 3 retirement 7 3 RTPSWireProtocolProperties 4 8 S Send Thread 2 10 sending data example C 5 3 example C 6 3 sendqueuesize 3 3 serialization 5 15 Servers 2 10 shared memory 4 3 shared memory message queues 4 4 socket buffers 4 4 strength 3 3 Subscribers change in terminology 2 7 defined 2 5 Subscriptions change in terminology 2 5 reliable listeners 5 37 supported platforms 1 2 T Threads 3 x 2 10 4 0 2 11 TIME_BASED_FILTER 3 3 timetokeepperiod 3 3 Topics 2 7 Listeners for 2 9 U unacknowledged issues 5 35 User Thread 2 11 2 13 W water marks 5 35 6 17 WaveScope 5 16 Proprietary Information of Real Time Innovations Inc
39. R MARK The send queue level fell to the low water mark If the low water mark is 0 only NDDS QUEUE EMPTY will be called when the queue becomes empty This information is not available in RTI Data Distribution Service 4 0 e NDDS HIGH WATER MARK The send queue level rose to the high water mark If the high water mark is the same as the send queue size only NDDS QUEUE FULL will be called when the queue becomes full This information is not available in RTI Data Distribution Service 4 0 e NDDS QUEUE FULL The send queue is full This information is not avail able in RTI Data Distribution Service 4 0 e NDDS SUBSCRIPTION NEW A new reliable subscription has appeared The Built in Topics feature in RTI Data Distribution Service 4 0 can provide this information e NDDS SUBSCRIPTION DELETE A reliable Subscription disappeared Note that the Publication only detects the disappearance of a reliable Subscrip tion after the expirationTime of the last refreshed subscription declaration expires and the Publication checks its database The Built in Topics feature in RTI Data Distribution Service 4 0 can provide this information I nddsTopic NDDSTopic of the Publication This information is not available in RTI Data Distribution Service 4 0 l subscriptionReliable Number of reliable Subscriptions subscribed to this pub lication This information is not available in RTI Data Distribution Service 4 0 1 subscriptionUnreliable
40. RII Data Distribution Service The Real Time Publish Subscribe Middleware 3 x to 4 0 Transition Guide Version 4 0d RTD 2004 2008 Real Time Innovations Inc All rights reserved Printed in U S A Second po RTI TS Trademarks Real Time Innovations NDDS and RTI are registered trademarks of Real Time Innovations Inc Microsoft Windows Windows NT MS DOS Visual C and Visual Studio are registered trademarks of Microsoft Corporation in the United States and or other countries All other trademarks used in this document are the property of their respective owners Copy and Use Restrictions No part of this publication may be reproduced stored in a retrieval system or transmitted in any form including electronic mechanical photocopy and facsimile without the prior written permission of Real Time Innovations Inc The software described in this document is furnished under and subject to the RTI software license agreement The software may be used or copied only under the terms of the license agreement Technical Support Real Time Innovations Inc 385 Moffett Park Drive Sunnyvale CA 94089 Phone 617 623 2570 x208 Fax 617 623 2574 Email supportGrti com Website http www rti com Contents 1 e LS REM 1 1 2 Object Model Comparative Analysis 1er 1eseerisresreireenn 2 1 2 1 Basic Models a HD E e e dr v Hd ere dE eet 2 2 22 Domains and DomainParticipants c ccccseecceccecsescst
41. RTI Data Distribution Service 4 0 There is no equivalent functionality for the RTI Data Distribution Service 3 x Server Listener meth ods or the Client Listener method Proprietary Information of Real Time Innovations Inc 7 1 Early Access Phase Chapter 7 RTI Data Distribution Service Product Lifecycle The RTI Data Distribution Service product lifecycle is composed of three phases 1 Early Access Phase Section 7 1 LJ Production Phase Section 7 2 J Retirement Phase Section 7 3 7 1 Early Access Phase This phase of product development provides key customers access to pre production product with Limited Access Releases LARs as well as a Beta cycle defined by C Months The chart below is not to scale and the specific time frames associated with A B and C will vary depending on the specific version of the product in question Figure 7 1 represents the early access phase of product development 7 2 Production Phase This phase of product development provides customer with access to maintenance releases introduced roughly every 6 months Maintenance releases include bug fixes and new compiler support for support operating systems as well as new features when appropriate At the end of product production a retirement letter will be sent to each customer articulating the retirement schedule and maintenance options available to the customer Figure 7 2 shows the production phase of product development Pr
42. Reference to 4 0 Information NDDSSubscriberCreate Section 5 6 1 NDDSSubscriberDestroy NDDSSubscriberIterate Section 5 6 5 NDDSSubscriberPatternAdd NDDSSubscriberPatternRemove Section 5 6 2 NDDSSubscriberPoll Section 5 6 4 NDDSSubscriberSubscriptionAdd Section 5 6 3 NDDSSubscriberSubscriptionFind Section 5 6 5 NDDSSubscriberSubscriptionRemove Section 5 6 3 5 6 1 Subscriber Create Delete Routines NDDSSubscriberCreate A Subscriber manages a group of Subscriptions In RTI Data Distribution Service 4 0 the DDS_DomainParticipant_create_subscriber routine would be used The application would then need to further create a DataReader to allow the application to subscribe to the data of interest NDDSSubscriberDestroy Destroys a Subscriber Subscriptions that have been added with the NDDSSubscriberSubscriptionAdd routine are not destroyed but Sub scriptions automatically created through Pattern Subscription are destroyed In RTI Data Distribution Service 4 0 the DDS_DomainParticipant_delete_subscriber routine would be used after all associated DataReader entities were destroyed via the DDS_Subscriber_delete_datareader routine In RTI Data Distribution Service 4 0 DataReaders cannot exist without a Subscriber unlike RTI Data Distribution Service 3 x where a Subscription can exist with or without a Subscriber 5 6 2 Subscriber Pattern Routines These routines have no equivalent mapping in R
43. S Chapter 5 Comparing the C APIs Table 5 4 Domain C API 3 x Reference to 4 0 Information NddsClientPropertiesDefaultGet Section 5 2 6 NddsDBaseRemove NddsDBaseFind Section 5 2 8 NddsDBaseAdd NddsDestroy Section 5 2 1 NddsDomainHandleGet NddsDomainIndexGet posue NDDSDomainListener Section 5 8 1 Nddslnit Section 5 2 1 NddsPublicationPropertiesDefaultGet NddsServerPropertiesDefaultGet Section 5 2 6 NddsSubscriptionPropertiesDefaultGet 5 2 1 Domain Create Delete Routines NddsDestroy Destroys the domain specified In RTI Data Distribution Service 4 0 use DDS_DomainParticipantFactory_delete_participant Nddslnit Initializes RTI Data Distribution Service instantiates a domain of a specified index returns a domain handle given a domain number In RTI Data Distribution Service 4 0 use these routines I DDS DomainParticipantFactory get instance I DDS DomainParticipantFactory get default participant qos L DDS DomainParticipantFactory create participant 5 2 2 Domain Index and Handle Retrieval Routines NddsDomainIndexGet Returns the Domain s index In RTI Data Distribution Service 4 0 use DDS DomainParticipant get domain id 5 12 Proprietary Information of Real Time Innovations Inc 5 2 Domain API 5 2 3 5 2 4 5 2 5 5 2 6 NddsDomainHandleGet Returns a domain handle given a domain number and pro vides a convenient means f
44. S_DomainParticipantFactory_get_default_participant_qos DDS_DomainParticipantFactory_create_participant NddsPublisherCreate DDS_DomainParticipant_create_publisher NddsPublicationCreate HelloMsgTypeSupport_register_type HelloMsgNddsRegister DDS_DomainParticipant_create_topic NddsPublisherPublicati ni DDS Publisher create datawriter Add HelloMsgDataType createX NddsPublisherSend HelloMsgDataWriter write Compilable versions of both the RTI Data Distribution Service 3 x and 4 0 source code shown above as well as other 5 1 3 Subscribing To Data examples are available for download see Appendix A In RTI Data Distribution Service 3 x a Subscription can stand alone It can also be added to a Subscriber if so desired As you ll see in the RTI Data Distribution Service 4 0 source code the Subscriber is instantiated first followed by the DataReader Proprietary Information of Real Time Innovations Inc 5 1 Examples RTI Data Distribution Service 3 x RTIBool HelloMsgCallback const NDDSRecvinfo issue NDDSInstance instance void callBackRtnParam if issue gt status NDDS_FRESH_DATA HelloMsg item HelloMsg instance HelloMsgPrint item 0 return RTI_TRUE J int subscriberMain int nddsDomain int nddsVerbosity RTINtpTime deadline 0 0 RTINtpTime min_separation 0 0 NDDSSubscription subscription NDDSSubscriber subscriber NDDSSubscriptionProperti
45. TI Data Distribution Service 4 0 NDDSSubscriberPatternAdd Adds a Pattern Subscription to the Subscriber Patterns allow users to subscribe to a large set of publications Pattern Subscriptions differ from single Subscriptions in that the topicPattern and typePattern are string pat terns Patterns usually contain wild characters such as If you specify the sub Proprietary Information of Real Time Innovations Inc 5 29 IdV D S Chapter 5 Comparing the C APIs 5 6 3 5 6 4 5 6 5 5 30 scription type NDDS SUBSCRIPTION POLLED then you must call NddsSubscriberPoll to receive the issues OnMatch is called if the subscriber doesn t already contain the subscription NDDSSubscriberPatternRemove Removes a previously added pattern but does not delete the pattern listener passed in during the pattern registration Subscriber Add Remove Routines NDDSSubscriberSubscriptionAdd Adds a Subscription to the Subscriber In RTI Data Distribution Service 4 0 since a DataReader cannot be instantiated independent of a Subscriber the equivalent routine would be to use the DDS_Subscriber_create_datareader routine This not only creates the DataReader object but automatically adds it to the Subscriber NDDSSubscriberSubscriptionRemove Removes a Subscription from being managed by a Subscriber In RTI Data Distribution Service 4 0 since a DataReader must be asso ciated with a Subscriber this functionality is not supported
46. Type returned an error This information is not currently available in RTI Data Distribution Service 4 0 e NDDS FRESH DATA A new issue received In RTI Data Distribution Service 4 0 the application can determine the status of the received issue by inspecting the information provided by SampleInfo SampleInfo informa tion is provided along with each data issue and provides detailed informa tion pertaining to that data instance You can determine the state of the arriving issue by taking advantage of the information provided by the Proprietary Information of Real Time Innovations Inc 6 6 Subscriber Methods sample state READ or NOT READ view state NEW or NOT NEW and instance state ALIVE NOT ALIVE DISPOSED Or NOT ALIVE NO WRITERS NDDS NEVER RECEIVED DATA Never received an issue but a deadline occurred In RTI Data Distribution Service 4 0 use the DataReader Listener on requested deadline missed routine RTI Data Distribution Service will invoke this operation when the deadline has been missed The application can also consult the entities status by directly using the DDSDataReader class get requested deadline missed status method NDDS NO NEW DATA Received at least one issue and a deadline has occurred since the last issue was received Use a combination of the fea tures described above NDDS UPDATE OF OLD DATA Received a new issue whose time stamp is the same or older than the time stamp of the last
47. _TRUE ys The RTI Data Distribution Service 3 x and 4 0 methods used are shown in Table 6 3 for comparison purposes Table 6 3 C Methods for Subscribing to Data 3 x Method 4 0 Method DDSDomainParticipantFactory get instance factory get default participant qos NDDSDomainClass Create factory gt create_participant domain gt SubscriptionPropertiesGet domain gt SubscriptionCreate domain gt SubscriberCreate participant gt create_subscriber HelloMsgTypeSupport register_type participant gt create_topic publisher gt SubscriptionAdd subscriber gt create_datareader Compilable versions of both the RTI Data Distribution Service 3 x and 4 0 source code shown above as well as other examples are available for download at the RTI website A list of example fully compilable source code projects is available in Appendix A 6 10 Proprietary Information of Real Time Innovations Inc 6 2 Domain Methods 6 2 Table 6 4 6 2 1 Proprietary Information of Real Time Innovations Inc Domain Methods Recall that a domain is a distributed concept that links all applications that are able to communicate with each other and represents a communication plane Only the Publish ers and the Subscribers attached to the same domain may interact A Domain is a man ager or factory of every RTI Data Distribution Service object Domains are global in nature and represent
48. a Distribution Service 4 0 DataWriter or Publisher routine that will perform this specific functionality Publication Status Routines NddsPublicationReliableStatusGet When a Publication is publishing to a reliable Sub scription NddsPublicationReliableStatusGet provides detailed information per taining to the reliable status of the Publication typedef struct NDDSPublicationReliableStatus NDDSPublicationReliableEvent event The reliable event const char nddsTopic int unacknowledgedIssues Number of unacknowledged issues int subscriptionReliable number of reliable subscriptions int subscriptionUnreliable number of unreliable subscriptions NDDSPublicationReliableStatus LJ event Provides the latest event on the publication s reliable stream where the events are defined as e NDDS BEFORERTN VETOED The sendBeforeRtn vetoed the Publication Data was not serialized This information is unavailable in RTI Data Distri bution Service 4 0 Proprietary Information of Real Time Innovations Inc 5 19 IdV D S Chapter 5 Comparing the C APIs 5 3 5 5 20 e NDDS QUEUE EMPTY The send queue is empty This information is unavailable in RTI Data Distribution Service 4 0 e NDDS LOW WATER MARK The send queue level fell to the low water mark This information is unavailable in RTI Data Distribution Service 4 0 e NDDS HIGH WATER MARK The send queue level rose to the high water mark This informatio
49. a communication plane Table 6 4 lists the RTI Data Distribution Service 3 x methods for a Domain in alphabetical order Next we will look at how they map to RTI Data Distribution Service 4 0 functional ity Domain C Methods 3 x Method Reference to 4 0 Information Domain gt ClientCreate Domain gt ClientDestroy Section 6 2 8 Domain gt Destroy Domain gt HandleGet Section 6 2 1 Section 6 2 2 Domain gt PublicationCreate Domain gt PublicationDestroy Section 6 2 3 Domain gt PublicationPropertiesGet Domain gt PublicationPropertiesSet Section 6 2 7 Domain gt PublisherCreate Domain gt PublisherDestroy Section 6 2 4 Domain gt ServerCreate Domain gt ServerDestroy Section 6 2 8 Methods for Creating Destroying Domains NDDSDomainClass Create Use the DDSDomainParticipantFactory get_instance and DDSDomainParticipantFactory create_participant methods to instantiate the DomainParticipant Destroy Use the DDSDomainParticipantFactory class delete_participant method 6 11 IdV 5 9 Chapter 6 Comparing the C APIs 6 2 2 6 2 3 6 2 4 6 12 Domain Method for Retrieving a Domain Handle HandleGet Use the DDSDomainParticipantFactory class get instance method Domain Methods for Creating Destroying Publications PublicationCreate As discussed in Section 2 3 a Publication is used by the application to writ
50. ads RT there are several receive threads created per application The number of receive threads needed depends on the number of Receive Resources required These resources are dependent on the transports installed and depend ing on the kind of transport the entry ports through which reception is expected For example the intra transport requires only a single receive resource regard less of how many entryports there are therefore a single RT is needed to handle all intra communications For the shared memory transport a receive resource is needed for each unique port so there may be multiple receive threads for shared memory For IP and IP multicast a receive resource is needed for each unique port and transport level QoS and thus we see multiple receive threads for IP and IP multicast e g user data and meta traffic as these are on different ports We have the following for the default IP transport Intra transport read thread handles same CPU pub sub communica tions Incoming IP meta traffic unicast handles unicast receive activity previ ously handled by the Manager and Database Thread in RTI Data Distribu tion Service 3 x Incoming IP user data unicast handles receive activity previously han dled by the Receive Thread in RTI Data Distribution Service 3 x All outgoing non application specific data traffic is handled by the Event Thread e g the responses to NACKs This also means some outgoing tr
51. affic may be handled by a Receive Thread depending on the extended QoS settings as mentioned above Outgoing application specific user data will be sent by the user s thread as a result of a write call however it is important to note that out going meta traffic is also sent by the user s thread as a result of creating a new local entity There is one additional point that should be considered We only mentioned the outgoing traffic as it pertains to actual application data RTPS ISSUEs and VARs There is also additional outgoing support traffic RTPS ACKs HBs and GAPs that applies for both metatraffic and user data although sometimes in dif ferent cases and are being sent by the Event Thread and Receive Threads Proprietary Information of Real Time Innovations Inc 2 13 Applications and Threads User Threads UT These represent the threads that are used by the application RTI Data Distribution Service 4 0 will use these threads when the application calls write on a DataWriter Proprietary Information of Real Time Innovations Inc 2 13 Chapter 2 Object Model Comparative Analysis 2 14 Proprietary Information of Real Time Innovations Inc Chapter 3 Configuration Parameters 3 1 Both RTI Data Distribution Service 3 x and 4 0 allow you to tailor the middleware s behavior to your application s specific requirements In RTI Data Distribution Service 3 x there are two places where you can specify ho
52. aseProperties Table 4 6 provides information on how to map the fields in an NDDSDomainBaseProp erties structure Table 4 6 Mapping NDDSDomainBaseProperties 3 x Field Name Description 4 0 Equivalent slowPeriod Period at which the Database Thread periodically parses the internal database looking for stale entries DDS DomainParticipantQos databaseX cleanup period fastPeriod Fastest rate at which the Data base Thread will verify the internal database state refreshPeriod How often to refresh the RTI Data Distribution Service manager s presence Not required expirationTime How long the application should be considered valid DDS DomainParticipantQos discovery configX participant liveliness lease duration appAnnounceRetries Maximum retries allowed to contact the application manager appAnnouncePeriod Period at which to contact the application manager publisherAsyncPeriod Period at which the RTI Data Distribution Service asynchro nous Publisher thread checks for new issues to publish Not required rtt Parameters related to the data base s round trip calculations Not supported spawnedManager See Section 4 1 9 See Section 4 1 9 Proprietary Information of Real Time Innovations Inc seiuedoidq 12ef qo p Chapter 4 Object Properties Table 4 7 RTPSWireProtocolProperties Table 4 7 provides information on how to ma
53. ata Distribution Service 4 0 there is currently no direct mapping of this functionality NddsPublicationReliableStatusRtn When a Publication is publishing to at least one reli able Subscription this routine provides detailed information pertaining to the reliable status of the Publication The following is a list of the status information the routine returns event provides the latest event on the publication s reliable stream where the events are defined as e NDDS BEFORERTN VETOED the sendBeforeRtn vetoed the Publication Data was not serialized This information is not available in RTI Data Dis tribution Service 4 0 e NDDS QUEUE EMPTY the send queue is empty This information is not available in RTI Data Distribution Service 4 0 Proprietary Information of Real Time Innovations Inc 5 8 Listeners 5 8 3 NDDS LOW WATER MARK the send queue level fell to the low water mark If the low water mark is 0 only NDDS QUEUE EMPTY will be called when the queue becomes empty This information is not available in RTI Data Distribution Service 4 0 NDDS_HIGH_WATER_MARK the send queue level rose to the high water mark If the high water mark is the same as the send queue size only NDDS_QUEUE_FULL will be called when the queue becomes full This information is not available in RTI Data Distribution Service 4 0 NDDS_QUEUE_FULL the send queue is full This information is not avail able in RTI Data Distrib
54. ata Distribution Service 4 0 functionality As indicated ear lier some of the routines will map directly others will require some redesign of the application Table 5 7 lists the RTI Data Distribution Service 3 x Subscription routines in alphabetical order Next we will look at how they map to RTI Data Distribution Service 4 0 functionality Subscription API 3 x Reference to 4 0 Information NDDsSlIssueListener Section 5 4 1 NddsSubscriptionDestroy Section 5 4 2 NddsSubscriptionInstanceGet Section 5 4 6 Proprietary Information of Real Time Innovations Inc 5 21 IdV O S Chapter 5 Comparing the C APIs Table 5 7 5 4 1 5 22 Subscription API 3 x Reference to 4 0 Information NddsSubscriptionIssueListenerGet Section 5 4 1 NddsSubscriptionIssueListenerSet NddsSubscriptionPublicationWait Section 5 4 5 NddsSubscriptionTopicGet Section 5 4 6 NddsSubscriptionCreate Section 5 4 2 NddsSubscriptionCreateAtomic NddsSubscriptionIssueListenerDefaultGet Section 5 4 1 NddsSubscriptionPoll Section 5 4 5 NddsSubscriptionPropertiesGet Section 5 4 3 NddsSubscriptionPropertiesSet Section 5 4 3 NddsSubscriptionReliableCreate NddsSubscriptionReliableCreateAtomic NDDSSubscriptionReliableListener NddsSubscriptionReliableListenerGet Section 5 4 7 NddsSubscriptionReliableListenerSet NddsSubscriptionReliableStatusGet NDDSSubscriptionReliableStatusRtn
55. avior in response to middleware activity associated with individual Client and Server events RTI Data Distribution Service 4 0 does not support a Client Server API Proprietary Information of Real Time Innovations Inc 5 39 IdV D S Chapter 5 Comparing the C APIs 5 40 Proprietary Information of Real Time Innovations Inc Chapter 6 Comparing the C APIs This chapter describes how the RTI Data Distribution Service 3 x C API maps to the RTI Data Distribution Service 4 0 API It focuses on how to port an RTI Data Distribution Service 3 x C application to RTI Data Distribution Service 4 0 This chapter addresses each RTI Data Distribution Service 3 x object and its supported routines and attempts to map the functionality to equivalent RTI Data Distribution Service 4 0 routines and or functionality Where direct or indirect mappings do not exist we ll recommend alter nate approaches for you to consider Example source code using both versions will be used and will assume best effort QoS and unicast network addressing For additional examples of reliable communications see Appendix A which lists the buildable exam ple source code that is available online This chapter includes the following sections I Examples Section 6 1 LJ Domain Methods Section 6 2 J Publication Methods Section 6 3 LJ Publisher Methods Section 6 4 1 Subscription Methods Section 6 5 LJ Subscriber Methods Section 6 6 LJ Client and Ser
56. b scription except the issues are received reliably and in the order in which they were published In RTI Data Distribution Service 4 0 there is no separate API call to create a reliable Subscriber DataReader Simply use the routines articulated above to instantiate a DataReader then use the DDS DataReader set qos routine to specify a QoS policy of DDS QOS RELIABILITY RELIABLE NddsSubscriptionReliableStatusGet See the NDDSSubscriptionReliableStatusRtn rou tine discussion above Publisher API This section discusses the RTI Data Distribution Service 3 x Publisher routines and how they map to the RTI Data Distribution Service 4 0 functionality Some of the routines will map directly others will require redesign of the application Table 5 8 lists the RTI Data Distribution Service 3 x Publisher routines in alphabetical order Next we will look at how they map to RTI Data Distribution Service 4 0 functionality Publisher API 3 x Reference to 4 0 Information NddsCustomSocketPublisherCreate NddsPublisherSubscriptionWait NddsPublisherCreate Section 5 5 1 NddsPublisherDestroy NddsPublisherlterate Section 5 5 4 NddsPublisherPublicationAdd Section 5 5 2 NddsPublisherPublicationFind Section 5 5 4 NddsPublisherPublicationRemove Section 5 5 2 NddsPublisherSend Section 5 5 3 Proprietary Information of Real Time Innovations Inc 5 5 Publisher API 5 5 1 5 5 2 The
57. bandwidth efficiency In RTI Data Distribution Service 4 0 a Publisher is an object responsible for sending data You can use the same Publisher to handle the publishing of multiple topics of different data types A Publisher is a mandatory object responsible for data distribution and allows applications to manage DataWriters as a group DataWriters are automatically associated with the Publisher when the DataWriter is created The Publisher acts on behalf of one or several DataWriter objects When it is informed of a change to the data associated with one of its DataWriter objects it is responsible for determining when to send and actually sending the data This behavior is driven by the attached QoS poli cies Note that DataWriters unlike Publications in RTI Data Distribution Service 3 x can not stand alone and must be associated with a Publisher In summary the concept of Publisher in 3 x and 4 0 is very similar Both play the same role Proprietary Information of Real Time Innovations Inc 2 6 Subscribers 2 6 2 7 Subscribers In RTI Data Distribution Service 3 x an application may create several Subscriptions Managing each Subscription individually can be cumbersome A Subscriber allows applications to manage several Subscriptions and can also support pattern Subscrip tions which allow an application to subscribe to a set of Topics RTI Data Distribution Service uses regular expression patterns and pattern matching rul
58. bove as well as other examples are available for download see Appendix A 5 10 Proprietary Information of Real Time Innovations Inc 5 2 Domain API Table 5 3 C Routines for Subscribing to Data 3 x 4 0 NDDSInit DDS DomainParticipantFactory get instance DDS DomainParticipantFactory get default participant qos DDS DomainParticipantFactory create participant HelloMsgNddsRegister NddsSubscriberCreate DDS DomainParticipant create subscriber NddsSubscriptionCreate HelloMsgTypeSupport register type NddsSubscriptionPropertiesGet DDS DomainParticipant create topic NddsSubscriptionPropertiesSet NddsSubscriberSubscriptionAdd DDS Subscriber create datareader 5 2 Domain API Recall that a domain is a distributed concept that links all applications that are able to communicate with each other and represents a communication plane Only the Publish ers and the Subscribers attached to the same domain may interact A Domain is a man ager or factory of every RTI Data Distribution Service object Domains are global in nature and represent a communication plane Table 5 4 lists the RTI Data Distribution Service 3 x domain routines in alphabetical order Next we will look at how they map to RTI Data Distribution Service 4 0 functional ity There are also several data type specific routines see Section 5 2 7 Proprietary Information of Real Time Innovations Inc 5 11 IdV O
59. bscription in RTI Data Distribution Service 3 x do not map directly to DataReader properties in RTI Data Distribution Service 4 0 but object QoS properties can be retrieved by using the extended QoS DDSSub scriber class get default datareader qos method One can also gain access to the DataReader s QoS policies by using the DDSDomainParticipant get default datareader qosX method SubscriptionPropertiesSet The properties associated with a Subscription in RTI Data Distribution Service 3 x do not map directly to DataReader properties in RTI Data Distribution Service 4 0 but object QoS properties can be established for a given DataReader by using the DDSSubscriber class set default datareader qos method Domain Methods for Clients and Servers None of the client or server methods in the Domain class are supported in RTI Data Dis tribution Service 4 0 Proprietary Information of Real Time Innovations Inc 6 3 Publication Methods 6 3 Publication Methods This section discusses the RTI Data Distribution Service 3 x publication methods and how they map to the RTI Data Distribution Service 4 0 functionality As indicated earlier some of the methods will map directly others will require redesign of the application Table 6 5 lists the Publication class methods in alphabetical order Table 6 5 Publication C Methods 3 x Method Reference to 4 0 Information Publication gt ListenerSet Section 6 3 1 Publication
60. ce factory gt get_default_participant_qos NDDSDomainClass Create factory gt create_participant domain gt PublicationPropertiesGet domain gt PublicationCreate domain gt PublisherCreate participant gt create_publisher HelloMsgTypeSupport register_type participant gt create_topic publisher gt get_default_datawriter_qos publisher gt PublicationAdd publisher gt create_datawriter HelloMsgTypeSupport createX publisher gt Send writer gt write Compilable versions of both the RTI Data Distribution Service 3 x and 4 0 source code shown above as well as other examples are available for download at the RTI website A list of example fully compilable source code projects is available in Appendix A 6 6 Proprietary Information of Real Time Innovations Inc 6 1 Examples 6 1 3 Subscribing to Data In RTI Data Distribution Service 3 x a Subscription can stand alone It can also be added to a Subscriber if so desired As you ll see in the RTI Data Distribution Service 4 0 source code the Subscriber is initially instantiated with the DataReader creation to follow RTI Data Distribution Service 3 x class MyListener public HelloMsgListener public virtual RTIBool OnIssueReceived const NDDSRecvInfo issue class NDDSTypeClass instance s RTIBool MyListener OnIssueReceived const NDDSRecvInfo issue class NDDSTypeClass instance if issue gt s
61. clProperties 3 x Field Name Description 4 0 Equivalent bytesPerPacket Maximum bytes of declaration data to Not supported send in a single message bytesPerFastPeriod Number of bytes to send out per appli cation per fastPeriod enabled Internal parameter for RTI Data Dis Nat iemuired tribution Service metatrafficPort Port that the Database Thread binds to P in order to send metatraffic data Whether or not declaration data are DDS_DataWriterQos push immediately distributed when they are ct ated protocolX push_on_write ackSuppression Time within which an ACK received is Not siporte Delta identical to a previous ACK PP 4 1 6 NDDSNICProperties Table 4 5 provides information on how to map the fields in an NDDSNICProperties structure Proprietary Information of Real Time Innovations Inc 4 5 seiuedoidq 12efqo p Chapter 4 Object Properties Table 4 5 Mapping NDDSNICProperties 3 x Field Name Description 4 0 Equivalent ifFla INEONUEM arer face Configured via the TransportConfig API nics card flag settings cat ame Rice oe Configured via the TransportConfig API Network 3nierfsce DDS_DomainParticipantQoS discoveryX ipAddress initial_peer_locators address card IP address can be used to specify the available network interfaces on the computing node Proprietary Information of Real Time Innovations Inc 41 Domain and Infrastructure Properties 4 1 7 NDDSDomainB
62. contain other DomainParticipants Several DomainParticipants can co exist on a single node computer within a single Domain domainld as long as their partici pantIndex is unique DomainParticipants belonging to the same domainlId on different computers can use the same participantIndex A DomainParticipant spawns several RTI Data Distribution Service specific threads The following threads will exist per Domain Participant Event Thread ET one ET is created per Application The ET performs several duties all related to periodic activity within the application The ET duties include but are not limited to the following Check for DataReader Writer Deadline expiration and call Listener when appropriate e Sending data issues in response to a NACK from a DataReader Note sending data issues in response to a NACK may be done by a Receive Thread if the extended QoS specifying the time to delay a response to a NACK is zero Check for Liveliness lapses Proprietary Information of Real Time Innovations Inc 2 11 Iepoi 12e qo Z Chapter 2 Object Model Comparative Analysis 2 12 The ET handles duties previously performed by the Alarm Thread NDDS Man ager and the Database Thread in RTI Data Distribution Service 3 x Database Thread DT is used solely for the purposes of cleaning up the database This thread no longer disseminates declaration data as it did in RTI Data Distribution Service 3 x Receive Thre
63. d DDS_Subscriber_create_datareader routines are required In RTI Data Distribution Service 4 0 atomic behavior is handled by default NddsSubscriptionCreate As discussed in Section 2 4 a Subscription is supported by creating both a DataReader and a Subscriber So an indirect mapping to RTI Data Distribution Service 4 0 exists in that a DataReader would need to be created after the Subscriber has been created So both the DDS_DomainParticipant_create_subscriber and DDS_Subscriber_create_datareader routines are required NddsSubscriptionDestroy As discussed in Section 2 4 an RTI Data Distribution Service 3 x Subscription can stand alone and refers to exactly one Topic that identifies the data to be read RTI Data Distribution Service 3 x also allows the application to manage a group of Subscriptions with a Subscriber If a Subscriber is used within the RTI Data Distribution Service 3 x application and one of the Subscription s is to be destroyed then one would use the DDS_Subscriber_delete_datareader routine If on the other hand the RTI Data Distribution Service 3 x application was not using a Subscriber only a Subscription then you would need to both delete the RTI Data Distribution Service 4 0 Subscriber and DataReader by using DDS_DomainParticipant_delete_subscriber and DDS_Subscriber_delete_datareader 5 4 3 Subscription Properties Routines NddsSubscriptionPropertiesSet Modifies the current Subscription properties The p
64. data to be sent here sprintf instance gt msg Hello Universe d count publisher gt Send NddsUtilitySleep send period sec return RTI_TRUE Fi RTI Data Distribution Service 4 0 extern C int publisherMain int nddsDomain int participantIndex const char peerHost int peerMaxIndex DDSDomainParticipantFactory factory NULL DDS_DomainParticipantQos participant_qos DDSDomainParticipant participant NULL DDSPublisher publisher NULL DDSTopic topic NULL HelloMsgDataWriter writer NULL HelloMsg instance NULL DDS_ReturnCode_t retcode DDS_InstanceHandle_t instance_handle DDS_HANDL E NIL 6 4 Proprietary Information of Real Time Innovations Inc 6 1 Examples int count 0 RTINtpTime send period sec 0 0 RtiNtpTimePackFromNanosec send period sec 4 0 4 seconds if factory DDSDomainParticipantFactory get instance return RTI FALSI E factory get default participant qos participant qos participant qos discoveryX participant index NULL RTINetioAddress_getIpv4AddressByName RTINetioAddress if peerHost if participantIndex amp participant qos discoveryX initial peer locators 0 address peerHost return RTI FALSE participant qos discov eryX initial peer locators 0 participant index limit peerMaxIndex participant qos discoveryX initial peer locators count 1 if part
65. dicated earlier some of the routines will map directly others will require some redesign of the applica tion Table 5 6 lists the RTI Data Distribution Service 3 x Publication routines in alphabet ical order Next we will look at how they map to RTI Data Distribution Service 4 0 functionality Publication C API 3 x Reference to 4 0 Information NddsPublicationCreate NddsPublicationCreateA tomic NddsPublicationDestroy Section 5 3 1 NddsPublicationInstanceGet Section 5 3 5 NddsPublicationListenerGet NddsPublicationListenerSet Section 5 3 6 NddsPublicationListenerDefaultGet NddsPublicationPropertiesGet NddsPublicationPropertiesSet icu dis NddsPublicationReliableStatusGet Section 5 3 4 NddsPublicationTopicGet Section 5 3 5 NddsPublicationSend NddsPublicationSubscriptionWait Section 5 3 3 NddsPublicationWait 5 17 IdV D S Chapter 5 Comparing the C APIs 5 3 1 5 3 2 5 18 Publication Create Delete Routines NddsPublicationCreateAtomic Allows you to create a new publication and provide all the associated publication parameters at once In RTI Data Distribution Service 4 0 the equivalent functionality is supported by using both a DataWriter and a Publisher So an indirect mapping to RTI Data Dis tribution Service 4 0 exists in that you create a DataWriter DDS Publisher create datawriter after you create a Publisher DDS DomainParticipan
66. e NDDSOnApplicationRemoteDeleteHook Equivalent functionality can be provided by subscribing to the built in Topic DCPSParticipant The application can then gain access to the built in Subscriber and associated DataReaders by using the DDS DomainParticipant get builtin subscriber routine provided by the DomainParticipant The built in DataReader objects can then be retrieved by using the DDS Subscriber get datareaders routine This allows the application to make decisions based on the remote Participant s activity such as not allowing the remote participant to participate within the network by using the DDS DomainParticipant ignore participant routine NDDSOnPublicationRemoteNewHook Equivalent functionality can be provided by subscribing to the built in Topic DCPSPublication The application can then gain access to the built in Subscriber and associated DataReaders by using the DDS DomainParticipant get builtin subscriber routine provided by the DomainParticipant The built in DataReader objects can then be retrieved by using the DDS Subscriber get datareaders routine This allows the application to gain access to the Built in DCPSPublication Topic and monitor all traffic related to remote DataWriter activity This allows the application to make decisions based on the remote Participant s activity such as not allowing the remote pub lisher to participate within the network by using the DDS_DomainParticipant_ignore_publication routi
67. e application to publish data PublisherDestroy In RTI Data Distribution Service 3 x this function destroys a publisher It is important to note that Publications within the Publisher are NOT destroyed so they will have to be destroyed separately The actual deallocation of memory for the publisher may not occur immediately to ensure safety among the different tasks After calling this function the Publisher is invalid and should not be used In RII Data Distribution Service 4 0 use the DDSDomainParticipant class delete publisher method after all associated DataWriter entities are destroyed via Proprietary Information of Real Time Innovations Inc 6 2 Domain Methods 6 2 5 6 2 6 the DDSPublisher class delete datawriter method Note that in RTI Data Distribu tion Service 4 0 DataWriters cannot exist without a Publisher unlike RTI Data Dis tribution Service 3 x where a Publication can exist with or without a Publisher Domain Methods for Creating Destroying Subscriptions SubscriptionCreate As discussed in Section 2 4 a Subscription is supported by using both a DataReader and a Subscriber So an indirect mapping to RTI Data Distribu tion Service 4 0 exists in that a DataReader will need to be created after the Sub scriber has been created So both the DDSDomainParticipant create subscriber and DDSSubscriber create datareader methods will be required SubscriptionDestroy As discussed in Section 2 4 an RTI Data D
68. e instances of data for publication In RTI Data Distribution Service 4 0 the equivalent functionality is supported by using both a DataWriter and a Publisher So an indirect mapping to RTI Data Distribution Service 4 0 exists in that a DataWriter will need to be created after the Publisher has been created So both the DDSDomainParticipant create publisher and DDSPublisher create datawriter methods will be required PublicationDestroy As discussed in Section 2 3 an RTI Data Distribution Service 3 x Publication is used by the application to write instances of data for publication In RTI Data Distribution Service 4 0 this is supported by using both a DataWriter and a Publisher If a Publisher is used within the RTI Data Distribution Service 3 x appli cation and only a specific Publication is to be destroyed then one would use the DDSPublisher delete datawriter method If on the other hand if the RTI Data Dis tribution Service 3 x application does not use a Publisher only a Publication then one would need to both delete the RTI Data Distribution Service 4 0 Publisher and DataWriter by using the DDSDomainParticipant delete publisher and DDSPub lisher delete datawriter Domain Methods for Creating Destroying Publishers PublisherCreate A Publisher manages a group of Publications In RTI Data Distribu tion Service 4 0 use the DDSDomainParticipant class create publisher method to create a Publisher then create a DataWriter to allow th
69. e introduced in a future release of the product Listeners Listeners provide a mechanism for RTI Data Distribution Service to asynchronously alert the application of the occurrence of relevant asynchronous events such as arrival of data corresponding to a Subscription Listeners are callback routines that the application implements Each dedicated listener presents a list of callback functions that correspond to relevant events that the application may wish to respond to To continue with our API comparison let s examine RTI Data Distribution Service listen ers Recall that in RTI Data Distribution Service 3 x Listeners can be associated with a Domain Publication and Subscription The DDS specification indicates that all DCPS entities support their own specialized listener so RTI Data Distribution Service 4 0 will provide Listener support for each Entity Domain Listeners The Domain Listener in RTI Data Distribution Service 3 x allows the application the abil ity to be notified upon the appearance and disappearance of Managers Applications Publications Subscriptions and Servers This section looks at the RTI Data Distribution Service 3 x Domain Listener callback functions and how they can be mapped into the RTI Data Distribution Service 4 0 functionality The DomainParticipant Listener in RTI Data Distribution Service 4 0 does not provide the same callback function prototypes that are provided in the RTI Data Distribution Service
70. e looks to determine di X initial r locators the list of hosts a d s ME e domainBase contre RTI Data Distribution See Section 4 1 7 Service s database properties internalMulti Multicast address reserved for Not reduired castAddress internal use uiis id Wire Properties to change RTPS proto Saofadiumd t8 col 1 0 functionality versioi Provides a way to retrieve the Not supported product version number Controls the function path in NDDSdBase IssueListAdd lowerCpuUsage If RTI FALSE ForAllMatches Not required Favored wil be used to achieve low NDDSMulticastProperties Multicast support is not available in RTI Data Distribution Service 4 0 Proprietary Information of Real Time Innovations Inc seiuedoiq 12efqo p Chapter 4 Object Properties Table 4 2 Mapping NDDSTaskProperties 3 x Field Name Description 4 0 Equivalent realTimeEn Kaabes Support for real time Not required abled threading atStackSize ee Tan 3 DDS DomainParticipantQoS eventX thread stack size stack size atPriority Alarm Thread s DDS_DomainParticipantQoS eventX thread priority priority rtStackSize Receive Thread s DDS DomainParticipantQoS receiver poolX stack size thread stack size uM Receive Thread s DDS DomainParticipantQoS receiver poolX rtPriority MP E priority thread priority stStackSize ds m radis stack size Not supported Sending Threads are no longer created Send Thread s stPr
71. e properties associated with a Publication in RTI Data Distribution Service 3 x do not map directly to DataWriter properties in RTI Data Distribution Service 4 0 but object QoS properties can be retrieved for a given DataWriter by using the extended QoS DDS_Publisher_get_default_datawriter_qos routine Proprietary Information of Real Time Innovations Inc 5 3 Publication API 5 3 3 5 3 4 NddsPublicationPropertiesSet The properties associated with a Publication in RTI Data Distribution Service 3 x do not map directly to DataWriter properties in RTI Data Distribution Service 4 0 but object QoS properties can be established for a given DataWriter by using the extended QoS DDS Publisher set default datawriter qos routine Publication Send and Wait Routines NddsPublicationsend Sends or writes the publication issue In RTI Data Distribution Service 4 0 for purposes of discussion we ll refer to a representative user defined data type topic named HelloMsg The application would then repeatedly call the HelloMsgDataWriter write routine to disseminate the publication NddsPublicationWait Waits for send queue level to reach the same or lower level spec ified within the Wait routine There is no RTI Data Distribution Service 4 0 DataWriter or Publisher routine that will perform this specific functionality NddsPublicationSubscriptionWait Waits for the existence of a specified number of Sub scriptions There is no RTI Dat
72. e the last poll this method will be executed multiple times for each issue In RTI Data Distribution Service 4 0 the DataReaderListener class on data available method would be used to receive incoming data Subscription Reliable Listeners The RTI Data Distribution Service 3 x Subscription Reliable Listener provides the ability for the application to tailor its behavior in response to activity associated with individ ual reliable subscription events The Reliable Subscription Listener interface provides the following virtual method OnReliableStatus This method handles reliable events on the Subscription side and provides the following information L event the event for a reliable Subscription The event parameter can be defined as one of the following Proprietary Information of Real Time Innovations Inc 6 29 IdV 5 9 Chapter 6 Comparing the C APIs 6 8 5 6 8 6 6 30 e NDDS ISSUES DROPPED one or more issues have been missed by the subscription In RTI Data Distribution Service 4 0 the application can employ the Subscriber Listener on sample lost method to determine information pertaining to dropped data issues One can also access the Sample Lost Status plain communication status type allowing the appli cation to determine the total cumulative count of all samples lost across all published instances of a specific Topic e NDDS PUBLICATION NEW the reliable issue is coming from a publication dif
73. eatTimiedut to the reliable Subscription at the nor DDS DataWriterQos mal rate when the send queue size is protocolX heartbeat period below the highWaterMark How often to send a heart beat message heartBeatFastTim to the reliable Subscription at the fast eout rate when the send queue size is above the highWaterMark Not supported Maximum time that a Publication can sendMaxWait be blocked while sending data N mb r of t iani to send a heart beat DDS_DataWriterQos protocolX heartBeatRetries without receiving a response from the na max heartbeat retries Subscription heartBeatPerSend Number JE BERHBEAES to insert m DDS_DataWriterQos protocolX NUN between issues each time sendQueue heartbeats per queue Size issues are published CEU DDS DataWriterQos protocolX Amount of time for which RTI Data min nack response delay nackReplySup adc E Distribution Service will suppress and pressionTime replying to a heartbeat already received DDS_DataWriterQos protocolX max_nack_response_delay Proprietary Information of Real Time Innovations Inc 4 2 Publication and Subscription Properties 4 2 2 NDDSSubscriptionProperties Table 4 10 provides information on how to map the fields in an NDDSSubscriptionProp erties structure Table 4 10 Mapping NDDSSubscriptionProperties 3 x Field Name Description 4 0 Equivalent mode Subscription s mode of operation either IMMEDIATE or POLLED
74. ed within the DDS Specification but will not be implemented within the RTI Data Distribution Service 4 0 release Subscriber Methods for Adding Removing Patterns The concept of patterns does not exist in RTI Data Distribution Service 4 0 so there is no equivalent functionality for these methods PatternAdd Adds a pattern Subscription to the Subscriber PatternRemove Removes a previously added pattern but does not delete the pattern listener passed in during the pattern registration Client and Server Methods Client Server functionality is not supported in RTI Data Distribution Service 4 0 There is no equivalent functionality for the RTI Data Distribution Service 3 x Client and Server methods Listeners Listeners provide a mechanism for RTI Data Distribution Service to asynchronously alert the application of the occurrence of relevant asynchronous events such as arrival of data corresponding to a Subscription Listeners are interfaces that the application imple ments Each dedicated listener class presents a list of pure virtual methods that corre spond to relevant events that the application may wish to respond to To continue with our API comparison let s examine RTI Data Distribution Service object listeners Recall that within RTI Data Distribution Service 3 x Listeners could be associ ated with a Domain Publication and Subscription The DDS specification indicates that all DCPS entities support their own
75. eee rrt reete ei e erba exeo dg 5 16 5 3 Publication API a ssscdesseaassessteessnd antena ien p EDITT win 5 17 5 3 1 Publication Create Delete Routines ccceceeeeeeceeseessesseeseenaes 5 18 5 3 2 Publication Properties Routines sse 5 18 5 3 3 Publication Send and Wait Routines sss 5 19 5 3 4 Publication Status Routines eese 5 19 5 8 5 Publication Topic and Instance Routines 0 0 0 eee 5 20 5 3 6 Publication Listener Routines eee nennen 5 21 5 4 subscription ARs uso E ag etes eode ede 521 5 4 1 Issue Listener Rou tines cd e ie 5 22 5 4 2 Subscription Create Delete Routines eee cesses 5 23 5 4 3 Subscription Properties Routines esses 5 23 5 4 4 Subscription Status Routine sse 5 24 5 4 5 Subscription Poll and Wait Routines sess 5 24 5 4 6 Subscription Topic and InstanceRoutines sus 5 24 5 4 7 Reliable Subscription Routines sss 5 24 5 5 Publisher AP tt ae teile tee tede ed Li e Ee phe lason 5 26 5 5 1 Publisher Create Delete Routines eee 5 27 5 5 2 Publisher Add Remove Routines eee 5 27 5 5 3 Publisher Send and Wait Routines esee 5 28 5 5 4 Publisher Find and Iterate Routines eee 5 28 5 6 Subscriber APT eee iee ern eeepc eee trente eee imet Dn 5 2
76. ener on sample rejected void listener data DDS DataReader reader const struct DDS SampleRejectedStatus status void MyListener on liveliness changed void listener data DDS DataReader reader const struct DDS LivelinessChangedStatus status void MyListener on sample lost void listener data DDS DataReader reader const struct DDS SampleLostStatus status void MyListener on subscription match void listener data DDS DataReader reader const struct DDS SubscriptionMatchStatus status void MyListener on data available void listener data DDS DataReader reader HelloMsgDataReader HelloMsgReader HelloMsgDataReader reader struct HelloMsgSeq data_seq DDS NEW EMPTY SEQUENCE struct DDS SampleInfoSeq info seq DDS NEW EMPTY SEQUENCE DDS ReturnCode t retcode int i retcode HelloMsgDataReader take HelloMsgReader amp data seq amp info seq DDS LENGTH UNLIMITED DDS ANY SAMPLE STATE DDS ANY VIEW STATE DDS ANY INSTANCE STATE if retcode DDS RETCODE OK return 5 8 Proprietary Information of Real Time Innovations Inc 5 1 Examples for i 0 i HelloMsgSeq get length amp data seq i HelloMsgTypeSupport printX HelloMsgSeq get address amp data seg i HelloMsgDataReader return loan HelloMsgReader amp data seq amp info seq int subscriberMain int nddsDomain int participantIndex const char peerHost int peerMaxI
77. ensesssneeetesesceeeseseseanaeneaes 2 2 2 3 Publications and DataWririters esses eren ener nennen 2 4 2 4 Subscriptions and DataReaders sss eee 2 5 2 5 Publishi ts ien nee tei D ORG HR EH EH EE B dei e 2 6 2 6 Subscribers ii e te ficere Co e d aa etd fed basa 2 7 2 7 Mn 2 7 2 8 Dataly M M S 2 8 2 9 Properties Parameters and QoS eren icri 2 8 2 10 Bae 2 8 2 11 The Manager s see extiterit at sna id trt ite RE denda 2 9 2 12 Clien EV 2 10 2 13 Applications and Threads c ccccccccceseseseststeseseseeseseecenesesescsnsensseseeseseseaaneney 2 10 2 13 1 Threads in RTI Data Distribution Service 3 x sss 2 10 2 13 2 Threads in RTI Data Distribution Service 4 0 s 2 11 3 Configuration Parameters sse entente 3 1 3 1 Object Parameters in RTI Data Distribution Service 3 x ssssss 3 1 3 2 Object Parameters in RTI Data Distribution Service 4 0 sss 3 2 4 OBIBCIPIBDOIBS scs nae 7 a er nen pod hine ure intr t tap 4 1 4 1 Domain and Infrastructure Properties sees 4 1 4 1 1 NDDSDomainProperties seeseeeeeeneee eene nnn 4 1 4 1 2 INIDDSTasksProperties nic esaet ten nete EEES 4 1 4 1 3 NDDSM
78. erties Section 4 3 Domain and Infrastructure Properties NDDSDomainProperties Table 4 1 provides information on how to map the fields in an NDDSDomainProperties structure NDDSTasksProperties Table 4 2 provides information on how to map the fields in an NDDSTasksProperties structure Proprietary Information of Real Time Innovations Inc 4 1 s do ld 12efqo v Chapter 4 Object Properties Table 4 1 Mapping NDDSDomainProperties 3 x Field Name Description 4 0 Equivalent tasks Stack size and priorities of the tasks automatically started by NDDS See Section 4 1 2 multicast Properties controlling the use of multicasting See Section 4 1 3 object Whether or not clients servers can create additional clients serv ers client Default properties for all clients the application creates server Default properties for all servers the application creates Not supported RTI Data Distribu tion Service 40 does not support a Client Server API This feature set will be introduced in a future version of the product publication Default properties for all publica tions the application creates See Section 4 2 1 subscription Default properties for all subscrip tions the application creates See Section 4 2 2 dgram Socket properties See Section 4 1 4 maxSizeSerialize Maximum size of any NDDS issue the application may send or recei
79. es by default The pat tern matching behavior is consistent with the filename expansion rules used by most UNIX shells In RTI Data Distribution Service 4 0 a Subscriber is an object responsible for receiving published data and making it available according to the Subscriber s QoS policies to the receiving application and may receive and dispatch data of different specified types To access the received data the application must use a typed DataReader attached to the Subscriber A Subscriber is associated with zero or more DataReaders In summary the concept of a Subscriber in 3 x and 4 0 is very similar as they both play the same role Topics In RTI Data Distribution Service 3 x Topics identify the publications in the distributed system and represent the information that other nodes subscribe to Topics are impor tant in that they are the primary means of connecting the information flow within your application Topics are user provided strings that identify both Publications and Sub scriptions In RTI Data Distribution Service 4 0 the Topic is an actual entity and not simply a string Topics allow Publications to be known in such a way that Subscriptions can refer to them unambiguously A Topic associates a name unique in the Domain a data type and QoS related to the data itself The Topic entity provides support for keys QoS poli cies and Listeners In RTI Data Distribution Service 3 x a Topic type instance was singu lar In
80. es properties HelloMsg xinstance NULL NDDSDomain domain char deadlineString RTI NTP TIME STRING LEN RtiNtpTimePackFromNanosec deadline 10 0 RtiNtpTimePackFromNanosec min separation 0 0 NddsVerbositySet nddsVerbosity domain NddsInit nddsDomain NULL NULL HelloMsgNddsRegister printf Allocate HelloMsg type n instance HelloMsgAllocate subscriber NddsSubscriberCreate domain subscription NddsSubscriptionCreate domain NDDS SUBSCRIPTION IMMEDIATE Example HelloMsg HelloMsgNDDSType instance deadline min separation HelloMsgCallback NULL NDDS USE UNICAST NddsSubscriptionPropertiesGet subscription amp properties properties receiveQueueSize 8 NddsSubscriptionPropertiesSet subscription amp properties NddsSubscriberSubscriptionAdd subscriber subscription Proprietary Information of Real Time Innovations Inc 5 7 IdV O S Chapter 5 Comparing the C APIs while 1 printf Sleeping for s sec n RtiNtpTimeToString amp deadline deadlineString NddsUtilitySleep deadline return RTI_TRUE p RTI Data Distribution Service 4 0 void MyListener on requested deadline missed void listener data DDS DataReader reader const struct DDS RequestedDeadlineMissedStatus status void MyListener on requested incompatible qos void listener data DDS DataReader reader const struct DDS RequestedIncompatibleQosStatus status void MyList
81. ess an existing enabled Topic based on its name The method expects two arguments name of the Topic and a time out value 6 5 2 Subscription Method for Checking Reliability IsReliable Sees if a given Subscription is reliable or best effort In RTI Data Distribution Service 4 0 use the DDSDataReader s get qos method to ascertain the QoS reli ability policies 6 20 Proprietary Information of Real Time Innovations Inc 6 5 Subscription Methods 6 5 3 6 5 4 6 5 5 6 5 6 Subscription Methods for Getting Setting Listeners IssueListenerGet Retrieves the Subscription s Listener In RTI Data Distribution Service 4 0 use the DDSDataReader s get listener method to retrieve the DataReader s listener IssueListenerSet Modifies the Subscription s Listener In RTI Data Distribution Service 4 0 use the DDSDataReader s set listener method to modify the DataReader s lis tener Subscription Methods for Polling and Waiting Poll Polls the Subscription for newly received issues since the last poll In RTI Data Distribution Service 4 0 you receive data by using Listeners Listeners provide asynchronous notification of data sample arrival In a future version you will be able to use Condition and Wait sets which will provide a way for an application to block until specific conditions are satisfied PublicationWait Actively probe for a give number of Publications for this Subscrip tion This functionality is
82. ferent from the one that sent the previous issue This is caused by a pub lication with a higher value of the strength parameter or by the expiration of the persistence of the current publication This information is not avail able in RTI Data Distribution Service 4 0 l issuesDropped the number of issues dropped In RTI Data Distribution Service 4 0 the application can use the Subscriber Listener on sample lost routine or the DDSDataReader class get sample lost status method to access both the total count and total count change data fields The total count provides the cumulative count of all samples lost across all instances of topics subscribed to by this Subscriber The total count change provides the incremental number of samples lost since the last time the Listener was called or the status was read These routines provided dropped issue counts for the entire Subscriber not on a DataReader basis nddsTopic the subscription s topic In RTI Data Distribution Service 4 0 once the Subscriber Listener on sample lost routine is invoked the information associ ated with dropped issues is provided only on a Subscriber basis There is cur rently no mechanism available to determine which dropped issues are associated with which Topic Publisher and Subscriber Listeners There are no Publisher or Subscriber Listeners in RTI Data Distribution Service 3 x Client and Server Listeners Client Server functionality is not supported in
83. g Properties PropertiesGet The properties associated with a Publication in RTI Data Distribution Service 3 x do not map directly to DataWriter properties in RTI Data Distribution Service 4 0 but QoS policies can be retrieved for a given DataWriter by using the DDSPublisher class get default datawriter qos method PropertiesSet The properties associated with a Publication in RTI Data Distribution Service 3 x do not map directly to DataWriter properties in RTI Data Distribution Service 4 0 but QoS policies can be established for a given DataWriter by using the DDSPublisher class set default datawriter qos method 6 3 4 Publication Method for Getting Status ReliableStatusGet When a Publication is publishing to at least one reliable Subscrip tion ReliableStatusGet provides detailed information pertaining to the reliable status of the Publication The following is a list of the information returned by the ReliableStatusGet method LJ event Provides the latest event on the publication s reliable stream where the events are defined as e NDDS BEFORERTN VETOED The sendBeforeRtn vetoed the Publication Data was not serialized This information is not available in RTI Data Dis tribution Service 4 0 e NDDS QUEUE EMPTY The send queue is empty This information is not available in RTI Data Distribution Service 4 0 6 16 Proprietary Information of Real Time Innovations Inc 6 3 Publication Methods e NDDS LOW WATE
84. hich lists the buildable example source code that is available online This chapter includes the following sections I Examples Section 5 1 LJ Domain API Section 5 2 LJ Publication API Section 5 3 1 Subscription API Section 5 4 LJ Publisher API Section 5 5 LJ Subscriber API Section 5 6 LJ Client and Server APIs Section 5 7 LJ Listeners Section 5 8 Proprietary Information of Real Time Innovations Inc 5 1 IdV O S Chapter 5 Comparing the C APIs 5 1 5 1 1 5 2 Examples We ll start with examples of how to instantiate a domain and send and receive data Domain Instantiation RTI Data Distribution Service 3 x int nddsDomain NDDS DOMAIN DEFAULT int nddsVerbosity NDDS VERBOSITY DEFAULT NDDSDomain domain NddsVerbositySet nddsVerbosity domain NddsInit nddsDomain NULL NULL RTI Data Distribution Service 4 0 DDS DomainParticipantFactory factory NULL struct DDS DomainParticipantQos participant qos DDS DomainParticipant participant NULL if factory DDS DomainParticipantFactory get instance return RTI FALSE DDS DomainParticipantFactory get default participant qgos factory amp participant qos participant qos discoveryX participant index participantIndex if peerHost NULL if RTINetioAddress getIpv4AddressByName RTINetioAddress amp participant qos discoveryX initial peer locators 0 address peerHost return RTI FALSE
85. iated with which Topic NDDSSubscriptionReliablelistener See the NDDSSubscriptionReliableStatusRtn rou tine discussion above NddsSubscriptionReliableListenerSet Allows the application to register a reliable lis tener class for a reliable subscription The functionality provided by this listener has been discussed above with the NDDSSubscriptionReliableStatusRtn routine NddsSubscriptionReliableListenerGet Retrieves the current reliable listener for a reli able subscription In RTI Data Distribution Service 4 0 the DataReader Listener functionality does not map directly to what was provided in RTI Data Distribution Service 3 x but nevertheless the Listener can be retrieved by using the DDS DataReader get listener routine NddsSubscriptionReliableCreateAtomic Creates a reliable subscription with the desired properties and listener In RTI Data Distribution Service 4 0 there is no sep arate API call to create a reliable Subscribers DataReader Simply use the routines identified above when instantiating a Subscription then employ the Proprietary Information of Real Time Innovations Inc 5 25 IdV D S Chapter 5 Comparing the C APIs 5 5 Table 5 8 5 26 DDS DataReader set qos routine to specify a QoS policy of DDS QOS RELIABILITY RELIABLE In RTI Data Distribution Service 4 0 atomic behavior is handled by default NddsSubscriptionReliableCreate A reliable subscription is similar to a regular su
86. icipant NULL return RTI FALSI if publisher return RTI FALSI a factory gt create_participant nddsDomain participant_qos participant gt create_publisher retcode HelloMsgTypeSupport register type participant if retcode DDS RETCODE OK return RTI FALSE if topic participant gt create_topic Example HelloMsg HelloMsgTYPE NAME return RTI_FALSE if writer HelloMsgDataWriter publisher gt create_datawriter topic m m return RTI FALSE if instance return RTI_FALSE Proprietary Information of Real Time Innovations Inc HelloMsgTypeSupport createX 6 5 IdV 5 9 Chapter 6 Comparing the C APIs for count 0 count gt 0 count RtiDebugPrint C API Publishing best effort unicast example count d n count modify the data to be sent here sprintf instance gt msg C API Publishing best effort unicast exam ple count d count retcode writer gt write instance instance_handle if retcode DDS RETCODE OK return RTI FALSE RtiThreadSleep amp send period sec return RTI_TRUE p The RTI Data Distribution Service 3 x and 4 0 methods used in the above example are shown in Table 6 2 for comparison purposes Table 6 2 C Methods for Publishing Data 3 x Method 4 0 Method DDSDomainParticipantFactory get_instan
87. iority ban priority dtStackSize Database Thread s DDS_DomainParticipantQoS databaseX thread stack_size stack size dtPriority s E Thread s DDS DomainParticipantQoS databaseX thread priority Asynchronous asyncStackSize Publisher s stack eae PUN Publishers do not support asynchronous size 4 1 4 NDDSDGramProperties The datagram properties allow the size of the OS socket send and receive buffers to be altered The application can reduce this number to conserve memory or increase to han dle large messages coming in at high repetition rate Note increase this value if the application is dropping declarations during a declaration storm The dgram field also specifies the size of the message queue used for communication over shared memory message queues used between applications running on the same node See Table 4 3 4 4 Proprietary Information of Real Time Innovations Inc 4 1 Domain and Infrastructure Properties Table 4 3 Mapping NDDSDGramProperties 3 x Field Name Description 4 0 Equivalent Size of the receive buffer associated DDS_DomainParticipantQoS recvBufferSize f with the operating systems stack queue receiver_poolX buffer_size sendBufferSize Size of the send buffer associated with Transport Config API the operating systems stack queue 4 1 5 NDDSDec IProperties Table 4 4 provides information on how to map the fields in an NDDSDeclProperties structure Table 4 4 Mapping NDDSDe
88. istribution Service 3 x Subscription can stand alone and refers to exactly one Topic that identifies the data to be read RTI Data Distribution Service 3 x also allows you to manage a group of Subscriptions with a Subscriber If a Subscriber is used within the RTI Data Distribution Service 3 x application and only the Subscription is to be destroyed then use the DDSSubscriber delete_datareader method If on the other hand that the RTI Data Distribution Service 3 x application was not using a Sub scriber only a Subscription then you need to delete both the RTI Data Distribu tion Service 4 0 Subscriber and DataReader by using the DDSDomainParticipant delete_subscriber and DDSSubscriber delete_datareader SubscriptionReliableCreate There is no direct mapping for this method You can use the DDSDomainParticipant create_subscriber and DDSSubscriber create_datareader methods and then set the RELIABLE QoS to support reliable communications Domain Methods for Creating Destroying Subscribers SubscriberCreate A Subscriber manages a group of Subscriptions In RTI Data Distri bution Service 4 0 use the DDSDomainParticipant class create_subscriber method to create a Subscriber then create a DataReader to allow the application to sub scribe to data of interest SubscriberDestroy This function destroys a Subscriber Subscriptions that have been added with the NDDSSubscriberSubscriptionAdd routine are not destroyed but Subscriptions
89. iter and Publisher all play a part in controlling how and when data samples are sent to RTI Data Distribution Service Sim ilaly on the subscribing side behavior is controlled by the QoS of the Topic DataReader and Subscriber These QoS policies control a variety of behavior such as how often a DataReader expects to see samples how to arbitrate when multiple DataWriters send updates for the same Topic and whether a Publisher should save sam ples in case new Subscriptions later join the network The QoS policies in RTI Data Distribution Service 4 0 provide a super set of the control features offered by the object properties in RTI Data Distribution Service 3 x As seen in Table 3 1 some QoS policies map directly from RTI Data Distribution Service 3 x parame ters to RTI Data Distribution Service 4 0 QoS policies You will note that RTI Data Distribu tion Service 4 0 has several more QoS policies that do not map directly to anything in RTI Data Distribution Service 3 x For more information on these new features see the RTT Data Distribution Service 4 0 User s Manual or online documentation Proprietary Information of Real Time Innovations Inc 3 2 Object Parameters in RTI Data Distribution Service 4 0 Table 3 1 Controlling Service Behavior via subscription api call 3 x Parameter 4 0 QoS Policy DEADLINE RTI Data Distribution Service 4 0 supports the notion of the Publisher deadline having a deadline
90. ivalent functionality can be provided by subscribing to the built in Topic DCPSPublication The application can gain access to the built in Subscriber and associated DataReaders by using the DomainParticipant get builtin subscriber and get datareader methods to gain access to the built in DCPSPublication Topic and monitor all traffic related to remote DataWriter activity Proprietary Information of Real Time Innovations Inc 6 27 IdV 5 9 Chapter 6 Comparing the C APIs 6 8 1 3 6 8 1 4 6 8 1 5 6 8 2 6 28 Domain Listener for New Deleted Subscriptions OnSubscriptionRemoteNew there is no direct mapping of this method to RTI Data Dis tribution Service 4 0 Equivalent functionality can be provided by subscribing to the built in Topic DCPSSubscription The application can gain access to the built in Subscriber and associated DataReaders by using the DomainParticipant get_builtin_subscriber and get_datareader methods to gain access to the built in DCPSSubscription Topic and monitor all traffic related to remote DataWriter activity This allows the application to make decisions based on the remote Partic ipant s activity such as not allowing the remote participant to participate within the network by using the ignore_subscription method OnSubscriptionRemoteDelete there is no direct mapping of this method to RTI Data Distribution Service 4 0 Equivalent functionality can be provided by
91. ized name servers resulting in a highly robust fault tolerant middleware architec ture with no single point of failure RTI Data Distribution Service 3 x supports the concept of Subscriptions and Publications within a domain These are the objects that allow the application the ability to actually publish or subscribe to the data Topic of choice Publishers and Subscribers allow publications and subscriptions to be managed and are optional This chapter describes the similarities and differences between the two products This chapter includes the following sections LJ Basic Models Section 2 1 J Domains and DomainParticipants Section 2 2 LJ Publications and DataWriters Section 2 3 1 Subscriptions and DataReaders Section 2 4 LJ Publishers Section 2 5 LJ Subscribers Section 2 6 I Topics Section 2 7 1 DataTypes Section 2 8 Proprietary Information of Real Time Innovations Inc 2 1 lepow 12e qo Z Chapter 2 Object Model Comparative Analysis 2 1 2 2 2 2 N Properties Parameters and QoS Section 2 9 LJ Listeners Section 2 10 I The Manager Section 2 11 LJ Client Server Section 2 12 1 Applications and Threads Section 2 13 Basic Models For an illustration of the basic object model for RTI Data Distribution Service 3 x see Figure 2 1 RTI Data Distribution Service 4 0 supports the concepts of DataWriters and DataReaders within a DomainParticipant These are the
92. l Each listener class pro vides specific methods appropriate for the object of interest A future version of RTI Data Distribution Service will include an additional mechanism for receiving data which will allow the application to block wait for the events of interest In RTI Data Distribution Service 4 0 Listeners are organized in a hierarchical manner where the SubscriberListener generalizes the DataReaderListener the PublisherListener generalizes the DataWriterListener and the DomainParticipantListener generalizes all other listeners The purpose of this hierarchical organization is to allow a more general listener to provide a default action in case the more specific Listener does not handle the event In this manner the DomainParticipantListener becomes the Listener of last resort that is notified of all status changes not captured by more specific listeners attached to the specific Domain Entity objects As an example when a relevant status change occurs associated with a DataReader RTI Data Distribution Service will first attempt to notify the Listener attached to the concerned DataReader if one is installed Otherwise RTI Data Distribution Service will notify the Listener attached to the Sub scriber or lastly the DomainParticipant The Manager In RTI Data Distribution Service 3 x the manager process called the NDDS Manager is responsible for discovering remote applications Each time an application is created or
93. l see in RTI Data Distribution Service 4 0 source code the Publisher is initially instantiated with the DataWriter creation to follow RTI Data Distribution Service 3 x extern C int publisherMain int nddsDomain int nddsVerbosity int count 0 RTINtpTime send period sec 0 0 NDDSPublicationProperties properties NDDSDomainClass domain NULL HelloMsg instance NULL NDDSPublicationClass publication NULL NDDSPublisherClass publisher NULL RtiNtpTimePackFromNanosec send period sec 4 0 4 seconds NddsVerbositySet nddsVerbosity Proprietary Information of Real Time Innovations Inc 6 3 IdV 5 9 Chapter 6 Comparing the C APIs Create the domain if domain NDDSDomainClass Create NDDS DOMAIN DEFAULT NULL NULL printf Unable to create domain n return RTI FALSE 3 if instance new HelloMsg return RTI_FALSE Fi domain gt PublicationPropertiesGet amp properties RtiNtpTimePackFromNanosec properties persistence 15 properties strength 1 0 LF 1 5 seconds if publication domain gt PublicationCreate Example HelloMsg instance amp properties printf Unable to create publication n return RTI_FALSE 3 publisher domain PublisherCreate NDDS PUBLISHER SIGNALLED publisher PublicationAdd publication for count 0 count printf Sampling publication count d n count modify the
94. ld 12efqo p Chapter 4 Object Properties Table 4 10 Mapping NDDSSubscriptionProperties 4 3 4 14 enabled 3 x Field Name Description 4 0 Equivalent DDS_DataReaderQos resource_limits receiveQueue Maximum number of issues the max_samples in conjunction with the Size Subscription should store HISTORY and RESOURCE_LIMITS QoS policies enabled Nne ten DE ob a subsdiption i Domain s enable operation Client and Server Properties RTI Data Distribution Service 4 0 does not support a Client Server API This feature set will be introduced in a future version of the product Proprietary Information of Real Time Innovations Inc Chapter 5 Comparing the C APIs This chapter describes how the RTI Data Distribution Service 3 x C API maps to the RTI Data Distribution Service 4 0 API It focuses on how to port an RTI Data Distribution Ser vice 3 x C application to RTI Data Distribution Service 4 0 This chapter addresses each RTI Data Distribution Service 3 x object and its supported routines and attempts to map the functionality to equivalent RTI Data Distribution Service 4 0 routines and or functional ity Where direct or indirect mappings do not exist we ll recommend alternate approaches for you to consider Example source code using both versions will be used and will assume best effort QoS and unicast network addressing For additional exam ples of reliable communications see Appendix A w
95. ll see in RTI Data Distribution Service 4 0 source code the Publisher is instantiated first followed by the DataWriter RTI Data Distribution Service 3 x int publisherMain int nddsDomain int nddsVerbosity Int count 0 RTINtpTime send_period_sec 0 0 RTINtpTime persistence 0 0 Int strength 1 NDDSPublication publication NDDSPublisher publisher HelloMsg instance NULL NDDSDomain domain RtiNtpTimePackFromNanosec send period sec 4 0 4 seconds RtiNtpTimePackFromNanosec persistence 15 0 15 seconds NddsVerbositySet nddsVerbosity domain NddsInit nddsDomain NULL NULL HelloMsgNddsRegister Proprietary Information of Real Time Innovations Inc 5 3 IdV O S Chapter 5 Comparing the C APIs printf Allocate HelloMsg type n instance HelloMsgAllocate publisher NddsPublisherCreate domain NDDS PUBLISHER SIGNALLED publication NddsPublicationCreate domain HelloMsgNDDSType NddsPublisherPublicationAdd publisher count 0 count printf Sampling publication for count d n Example HelloMsg instance persistence strength publication count Modify data to be published sprintf instance msg NddsPublisherSend publisher Hello Universe d count NddsUtilitySleep send period sec return RTI TRUE yi RTI Data Distribution Service 4 0 int publisherMain int nddsDomain in
96. ly available in RTI Data Distribution Service 4 0 publicationld Publication s unique ID This information is unavailable in RTI Data Distribution Service 4 0 l publSeqNumber Sending Publication high and low sequence number This information is unavailable in RTI Data Distribution Service 4 0 L recvseqNumber Receiving sequence high and low sequence number This information is unavailable in RTI Data Distribution Service 4 0 L remoteTimeWhenPublished Remote time when the issue was published Once the read or take routine is used within the DataReader to gain access to the received data issue the SampleInfo source timestamp routine can be employed which provides the time stamp provided by the DataWriter at the time the sam ple was produced J senderAppld Sender s application ID This information is unavailable in RTI Data Distribution Service 4 0 J senderHostld Sender s host ID This information is unavailablein RTI Data Dis tribution Service 4 0 senderNodelP Sender s IP address This information is unavailable in RTI Data Distribution Service 4 0 Proprietary Information of Real Time Innovations Inc 5 8 Listeners 5 8 4 validRemoteTimeWhenPublished Whether or not a valid remote time was received This information is unavailable in RTI Data Distribution Service 4 0 J status Status affects which fields are valid and returns e NDDS DESERIALIZATION ERROR Deserializati
97. m a peer In RTI Data Distribution Service 3 x ndds gen automatically creates this routine and provides the source code In RTI Data Distribution Service 4 0 nddsgen will create the equivalent deserialization source code Print Routine PrintMethodType Provides the prototype for the print routine used to print the con tents of the particular NDDSType In RTI Data Distribution Service 3 x the ndds gen utility automatically creates this routine and provides the source code In RTI Data Distribution Service 4 0 nddsgen will create the equivalent print source code Other Type Related Routines Unless otherwise noted the RTI Data Distribution Service 4 0 nddsgen utility will create the equivalent source code for each of the following functions FreeMethodType Provides the prototype for the routine required to free the instance of the particular NDDSType In RTI Data Distribution Service 3 x the nddsgen utility automatically creates this routine prototype and stubs out the routine The actual functionality of the call is left to the user to implement MaxSizeMethodType Provides the prototype for the maximum size routine used to determine the maximum size of an NDDSType object This routine is used to inform RTI Data Distribution Service how much buffer space to allocate for publica tions subscriptions servers and clients that will use this NDDSType In RTI Data Distribution Service 3 x RTI Data Distribution Ser
98. n is unavailable in RTI Data Distribution Service 4 0 e NDDS QUEUE FULL The send queue is full This information is unavail able in RTI Data Distribution Service 4 0 e NDDS SUBSCRIPTION NEW A new reliable subscription has appeared The Built in Topics feature in RTI Data Distribution Service 4 0 can provide this information See Section 5 8 1 e NDDS SUBSCRIPTION DELETE A reliable Subscription disappeared Note that the Publication only detects the disappearance of a reliable Subscrip tion after the expirationTime of the last refreshed subscription declaration expires and the Publication checks its database The Built in Topics feature in RTI Data Distribution Service 4 0 can provide this information See Section 5 8 1 L nddsTopic The NDDSTopic of the Publication This information is unavailable in RTI Data Distribution Service 4 0 1 subscriptionReliable The number of reliable Subscriptions subscribed to this publication This information is unavailable in RTI Data Distribution Service 4 0 I subscriptionUnreliable The number of unreliable Subscriptions subscribed to this Publication This information is unavailable in RTI Data Distribution Service 4 0 l unacknowledgedlssues The number of unacknowledged issues This informa tion is unavailable in RTI Data Distribution Service 4 0 Publication Topic and Instance Routines NddsPublicationTopicGet Retrieves the Publication s Topic In RTI Data Dist
99. n of Real Time Innovations Inc 5 13 IdV D S Chapter 5 Comparing the C APIs 5 2 7 NddsPublicationPropertiesDefaultGet Retrieves the publication s property structure so that modifications can be made to the properties and subsequently create a publi cation in one atomic action The properties associated with a Publication in RTI Data Distribution Service 3 x do not map directly to DataWriter properties in RTI Data Distribution Service 4 0 but object QoS can be retrieved for a given DataWriter by using the DDS DomainParticipant get default datawriter qosX routine NddsSubscriptionPropertiesDefaultGet Retrieves the Subscription s property structure so that modifications can be made to the properties and subsequently create a Subscription in one atomic action The properties associated with a Subscription in RTI Data Distribution Service 3 x do not map directly to DataReader properties in RTI Data Distribution Service 4 0 but object QoS can be retrieved for a given DataReader by calling the DDS DomainParticipant get default datareader qosX routine Type API The Type API provides a set of functions that allow data types to be registered with the RTI Data Distribution Service middleware infrastructure Table 5 5 lists the RTI Data Dis tribution Service 3 x data type routines Next we will look at how they map to RTI Data Distribution Service 4 0 functionality Table 5 5 Data Type Routines 5 14
100. nality Publisher C Methods 3 x Method Reference to 4 0 Information Publisher gt Iterate Section 6 4 4 Publisher gt PublicationAdd Section 6 4 1 Publisher gt PublicationFind Section 6 4 2 Publisher gt PublicationRemove Section 6 4 1 Publisher gt Send Section 6 4 3 Publisher gt SubscriptionWait Note The Publisher object in RTI Data Distribution Service 3 x also supported Signaled and Asynchronous modes of operation Neither of these is supported within the RTI Data Distribution Service 4 0 product at this time Publisher Methods for Adding Removing Publications PublicationAdd Adds a Publication to a Publisher In RTI Data Distribution Service 4 0 since a DataWriter cannot be instantiated independent of a Publisher the equiva lent method would be to use the DDSPublisher class create_datawriter method This not only creates the DataWriter object but adds it to the Publisher PublicationRemove Removes a Publication from being managed by a Publisher In RTI Data Distribution Service 3 x the notion of being able to remove a Publication from being managed by a Publisher was supported In RTI Data Distribution Ser Proprietary Information of Real Time Innovations Inc 6 4 Publisher Methods 6 4 2 6 4 3 6 4 4 vice 4 0 since a DataWriter must be associated with a Publisher this functionality is not supported unless multiple DataWriters exist within the Publisher In this
101. ndex DDS DomainParticipantFactory factory NULL struct DDS DomainParticipantQos participant qos DDS DomainParticipant participant NULL DDS Subscriber subscriber NULL DDS Topic topic NULL struct DDS DataReaderListener listener DDS DATAREADER LISTENER DEFAULT HelloMsgDataReader reader NULL DDS ReturnCode t retcode RTINtpTime receive period sec 0 0 char deadlineString RTI NTP TIME STRING LEN int count 0 RtiNtpTimePackFromNanosec receive period sec 4 0 4 seconds if factory DDS DomainParticipantFactory get instance return RTI FALSE DDS DomainParticipantFactory get default participant qos factory amp participant qos participant qos discoveryX participant index participantIndex if peerHost NULL if RTINetioAddress getIpv4AddressByName RTINetioAddress amp participant qos discoveryX initial peer locators 0 address peerHost return RTI_FALSE participant qos discov eryX initial peer locators 0 participant index limit peerMaxIndex participant qos discoveryX initial peer locators count 1 if participant DDS DomainParticipantFactory create participant factory nddsDomain amp participant qos NULL return RTI FALSE Proprietary Information of Real Time Innovations Inc 5 9 IdV D S Chapter 5 Comparing the C APIs if subscriber DDS DomainParticipant create subscriber participant DDS SUBSCRIBER
102. ne Proprietary Information of Real Time Innovations Inc 5 8 Listeners NDDSOnPublicationRemoteDeleteHook Equivalent functionality can be provided by subscribing to the built in Topic DCPSPublication The application can then gain access to the built in Subscriber and associated DataReaders by using the DDS DomainParticipant get builtin subscriber routine provided by the DomainParticipant The built in DataReader objects can then be retrieved by using the DDS Subscriber get datareaders routine This allows the application to gain access to the Built in DCPSPublication Topic and monitor all traffic related to remote DataWriter activity This allows the application to make decisions based on the remote Participant s activity such as not allowing the remote pub lisher to participate within the network by using the DDS DomainParticipant ignore publication routine NDDSOnServerRemoteNewHook There is no functionally equivalent capability within RTI Data Distribution Service 4 0 as client server is not support This feature set is planned for a future release NDDSOnServerRemoteDeleteHook There is no functionally equivalent capability within RTI Data Distribution Service 4 0 as client server is not support This feature set is planned for a future release NDDSOnSubscriptionRemoteNewHook Equivalent functionality can be provided by subscribing to the built in Topic DCPSSubscription The application can then gain access to
103. ne infor mation pertaining to dropped data issues One can also access the Sample Lost Status plain communication status type allowing the application to determine the total cumulative count of all samples lost across all pub lished instances of a specific Topic e NDDS PUBLICATION NEW the reliable issue is coming from a publication different from the one that sent the previous issue This functionality is not currently supported in RTI Data Distribution Service 4 0 1 issuesDropped Provides the number of issues dropped In RTI Data Distribu tion Service 4 0 the application can use the Subscriber Listener on sample lost routine or the DDS DataReader get sample lost status routine to access both the total count and total count change data fields The total count provides the cumulative count of all samples lost across all instances of topics subscribed to by this Subscriber The total count change provides the incremental number of samples lost since the last time the Listener was called or the status was read These routines provided dropped issue counts for the entire Subscriber not on a DataReader basis L nddsTopic Provides the subscription s topic In RTI Data Distribution Service 4 0 once the Subscriber Listener s on sample lost routine is invoked the infor mation associated with dropped issues is provided only on a Subscriber basis There is currently no mechanism available to determine which dropped issues are assoc
104. ners 6 8 3 6 8 4 OnBeforelssueSent This method if implemented by the application is invoked by RTI Data Distribution Service prior to an issue being sent OnReliableStatus This method if implemented by the application is invoked when publication events related to the send queue occur With this listener method an application can monitor a reliable Publication s send queue and control the send rate by responding to specific events Issue Listeners The RTI Data Distribution Service 3 x Issue Listener provides the ability for the applica tion to tailor its behavior in response to middleware activity associated with individual subscription events The Issue Listener interface provides the following virtual meth ods IssueTypeMatch The RTI Data Distribution Service 3 x product uses this method to check for type safety when creating a Subscription This is necessary to ensure that the Issue Listener can handle the NDDSType the Subscription expects In RTI Data Distribution Service 4 0 this functionality is not used within the user s code OnlssueReceived This method is invoked by RTI Data Distribution Service at different times depending on the subscription mode If configured for IMMEDIATE Sub scription this method is invoked as soon as the issue is received If configured for POLLED Subscription this method is invoked when the receiving application explicitly polls If there are more than one issues received sinc
105. objects that allow the application the ability to actually publish or subscribe to the data Topic of choice Publishers and Subscribers are directly associated with DataWriters and DataReaders respectively Publishers and Subscribers are required in RTI Data Distribution Service 4 0 For an illustration of the basic object model for RTI Data Distribution Service 4 0 see Figure 2 2 Domains and DomainParticipants A domain is a distributed concept that links all applications that are able to communicate with each other A domain represents a communication plane Domains partition appli cations into logical units or separate name spaces only the Publishers and the Subscrib ers attached to the same domain may interact The object representing an application s presence in a domain called a domain participant in RTI Data Distribution Service 4 0 and simply a Domain in 3 x is a manager or factory for every other DDS object Domains are global in nature configuring or changing a Domain s default behavior effects all of the objects created within the Domain It is important to point out that RTI Data Distribu tion Service 4 0 offers additional flexibility with respect to participating in multiple domains A single application can participant in multiple domains or can even create multiple DomainParticipants within the same domain Proprietary Information of Real Time Innovations Inc 2 2 Domains and DomainParticipants Figure
106. of Real Time Innovations Inc 5 33 IdV O S Chapter 5 Comparing the C APIs 5 8 1 2 5 8 2 5 34 Domain Listener Retrieval Routines NddsDomainListenerDefaultGet Retrieves the domain s default listener hooks Default callbacks are necessary to initialize the domain listener structure before one can modify the fields for application specific functionality In RTI Data Distribution Service 4 0 this domain listener functionality is supported via built in topics NddsDomainListenerGet Retrieves the default domain listener hooks Sets the hooks called whenever declarations for remote publications subscriptions clients and servers are received In RTI Data Distribution Service 4 0 this domain listener func tionality is supported via built in topics Publication Listeners The RTI Data Distribution Service 3 x Publication Listener allows an application to tailor its behavior in response to middleware activity associated with individual publication events The Publication Listener interface provides the following callback functions NDDSAfterSendRtn This routine if implemented by the application is invoked by RTI Data Distribution Service directly after an issue is sent In RTI Data Distribution Ser vice 4 0 there is currently no direct mapping of this functionality NDDSSendBeforeRin This routine if implemented by the application is invoked by RTI Data Distribution Service prior to an issue being sent In RTI D
107. of the following threads Alarm Thread AT The Alarm Thread AT is responsible for waking up other threads at periodic rates For example a subscription s deadline is a periodic event that can occur every 2 seconds There is only one AT thread per application per Domain As an example if one application instantiated three Domains three AT s would be created Conversely if two applications participated within one Domain two AT s would be created This thread never enters the user s context and is created during initialization Receive Thread RT The Receive Thread RT receives all user data sent by publica tions subscriptions clients and servers In the case of reliable subscriptions the RT will also be responsible for sending acknowledgements In the case of immedi ate subscriptions this is the thread that calls the user s issue listener There may be more than one RT depending on whether or not multicast or shared memory is enabled This thread is created during initialization Send Thread ST The Send Thread ST is responsible for sending user data An appli cation can have several STs depending on the number of Publishers and their modes Each signaled Publisher creates a separate ST An additional single ST is created for all asynchronous publishers This thread is created with the first asyn chronous publisher Note that Publications Clients and Servers and synchronous Publishers do not need an ST In these cases
108. on is not available in RTI Data Distribution Service 4 0 l publicationld Publication s unique ID This information is not currently avail able in RTI Data Distribution Service 4 0 l publSeqNumber Sending Publication high and low sequence number This information is not currently available in RTI Data Distribution Service 4 0 L recvSeqNumber Receiving sequence high and low sequence number This information is not currently available in RTI Data Distribution Service 4 0 L remoteTimeWhenPublished Remote time when the issue was published Once the read or take routine is used within the DataReader to gain access to the received data issue the SampleInfo class source timestamp method can be employed which provides the time stamp provided by the DataWriter at the time the sample was produced L senderAppld Sender s application ID This information is not available in RTI Data Distribution Service 4 0 L senderHostld Sender s host ID This information is not available in RTI Data Distribution Service 4 0 L senderNodelP Sender s IP address This information is not available in RTI Data Distribution Service 4 0 L validRemoteTimeWhenPublished Whether or not a valid remote time was received This information is not available in RTI Data Distribution Service 4 0 status Status affects which fields are valid and returns e NDDS DESERIALIZATION ERROR Deserialization method for the NDDS
109. on routine for the NDDS Type returned an error This information is not available in RTI Data Distri bution Service 4 0 NDDS FRESH DATA A new issue received In RTI Data Distribution Service 4 0 the application can determine the status of the received issue by inspecting the information provided by SampleInfo SampleInfo informa tion is provided along with each data issue and provides detailed informa tion pertaining to that data instance One can determine the state of the arriving issue by taking advantage of the information provided by the sample state READ or NOT READ view state NEW or NOT NEW and instance state ALIVE NOT ALIVE DISPOSED or NOT_ALIVE_NO_WRITERS NDDS_NEVER_RECEIVED_DATA Never received an issue but a deadline occurred In RTI Data Distribution Service 4 0 one would use the DataReader Listener on_requested_deadline_missed routine RTI Data Distribution Service will invoke this operation when the deadline has been missed The application can also consult the entities status by directly using the DDS_DataReader_get_requested_deadline_missed_status rou tine NDDS_NO_NEW_DATA Received at least one issue and a deadline has occurred since the last issue was received One can use a combination of features described above NDDS_UPDATE_OF_OLD_DATA Received a new issue whose time stamp is the same or older than the time stamp of the last fresh issue received This information is unavailable in RTI
110. oprietary Information of Real Time Innovations Inc 7 1 o6 5A29Jr Jonpoud Z Chapter 7 RTI Data Distribution Service Product Lifecycle Figure 7 1 Early Access Phase NDDS First Customer Ship NDDS Beta NDDS LAR 1 NDDS LAR 2 Release Pe p T a a p cer ue ce Time Months Months Months Early Access Phase of Product Development Figure 7 2 Production Phase NDDS FCS NDDS Retirement Letter a Maintenance Release Maintenance Release Issued For Version N x Version N Version N 0 1 Version N 0 1 a 7 E TE gt lt gt Time 6 Months 6 Months Production Phase of Product Development 7 2 Proprietary Information of Real Time Innovations Inc 7 3 Retirement Phase 7 3 Retirement Phase This phase of product development allows customers the ability to plan migration strat egies and factor in how long the product will be supported and maintained RIT s stan dard retirement policy will focus on older releases of RTI Data Distribution Service with particular focus on niche architectures all balanced with current customer usage and market demand Figure 7 3 represents the retirement phase of product development Figure 7 3 Retirement Phase NDDS Retirement Letter EOTS Product Issued For Version N x Version N x EOM EOBF EONPS Retired D Months E Months F Months G Months EOM End of Maintenance End of maintenance releases and feature enhancements EOBF End of Bug
111. or each object QoS policies allow developers to configure RTI Data Distribution Service to exhibit extremely flexible behavior QoS policies control many aspects of how and when data is distrib uted between applications See Chapter 3 Configuration Parameters and Chapter 4 Object Properties for more details Listeners Listeners provide a mechanism for RTI Data Distribution Service to asynchronously alert the application of the occurrence of relevant events such as arrival of data correspond ing to a Subscription or a remote application coming online Listeners are interfaces that the application implements Each object Listener class provides several virtual methods that correspond to relevant events that the application may wish to respond to It is the application s responsibility to implement the Listener methods functionality In RTI Data Distribution Service 3 x Listeners can be associated with Publications Sub scriptions and Domains Each Listener class provides specific virtual methods appro priate for the object of interest RTI Data Distribution Service 4 0 also provides the listener mechanism as a means to notify the application of relevant events Listeners can be associated with Topics DataWriters DataReaders Publishers Subscribers and DomainParticipants As men Proprietary Information of Real Time Innovations Inc 2 11 The Manager 2 11 tioned above Topics now support their own Listener as wel
112. or retrieving an already created domain In RTI Data Distribution Service 4 0 use DDS DomainParticipantFactory get instance Domain Wait Routine NddsDomainWait Internally RTI Data Distribution Service manages a database of all of the remote publications and subscriptions When the system with a complex architecture boots up the propagation of the database information can take some time This routine can be used to wait for internal states to settle This routine is not supported in RTI Data Distribution Service 4 0 Wire Protocol Properties Routine NddsWireProtocolPropertiesGet Returns the wire protocol properties See Section 4 1 8 Manager and Application Host Routines NddsManagerHostsGet Returns the list of NDDS Managers This is not required in RTI Data Distribution Service 4 0 NddsAppHostsSet Allows a list of application hosts to be defined In RTI Data Distri bution Service 4 0 use DDS_DiscoveryQosPolicyX discov eryX initial peer locators NddsAppHostsGet Retrieves the list of application hosts allowed to participate in the RTI Data Distribution Service enabled network In RTI Data Distribution Service 4 0 use DDS DiscoveryQosPolicyX discoveryX initial peer locators Default Properties Routines NddsServerPropertiesDefaultGet Not supported in RTI Data Distribution Service 4 0 NddsClientPropertiesDefaultGet Not supported in RTI Data Distribution Service 4 0 Proprietary Informatio
113. p the fields in an RTPSWireProtocolProper ties structure Mapping RTPSWireProtocolProperties fic multicast IP address 3 x Field Name Description 4 0 Equivalent ld Manually assigned application DDS_DomainParticipantQoS APP ID wire_protocolX rtps_app_id metaMulticastIP Manually assigns the metatraf DDS_DomainParticipantQoS discoveryX multicast groups ackMulticastApplicationEn abled Whether or not RTPS ACK message should contain a mul ticast IP address Not required Whether or not RTPS ACK ackMulticastManagerEnabled message should contain a mul ticast IP address multicastThreshold id ACKs HBs and VAS DIS Not supported appGroupRemoteProperties RTPS protocol functionality mgrGroupRemoteProperties RTPS protocol functionality Proprietary Information of Real Time Innovations Inc 4 1 Domain and Infrastructure Properties Table 4 8 NDDSAppManagerProperties Mapping NDDSAppManagerProperties Table 4 8 provides information on how to map the fields in an NDDSAppManagerProp erties structure 3 x Field Name Description 4 0 Equivalent stackSize NDDS manager s stack size priority Priority of the NDDS manager s thread terminate Whether or not the NDDS man ager spawned by the local appli cation will terminate sendBufferSize Size of received messages that the NDDS manager can receive recvBufferSize Size of messages
114. participant qos discoveryX initial peer locators 0 participant index limit peerMaxIndex participant qos discoveryX initial peer locators count 1 if participant DDS DomainParticipantFactory create participant factory nddsDomain amp participant qos NULL return RTI FALSE 27 Proprietary Information of Real Time Innovations Inc 5 1 Examples Table 5 1 Notice that there are a few more infrastructure calls that must be used in RTI Data Dis tribution Service 4 0 prior to the create participant routine that instantiates the actual DomainParticipant The RTI Data Distribution Service 3 x and 4 0 routines to instantiate a domain are shown in Table 5 1 for comparison purposes C Routines for Creating a Domain 3 x 4 0 DDS DomainParticipantFactory get instance NDDSInit DDS_DomainParticipantFactory_get_default_participant_qos DDS_DomainParticipantFactory_create_participant Only a few routines are required to actually create the Domain itself Once the Domain exists the application is provided a rich set of routines that can be used to support application functionality In the following sections you ll find example source code of how an application publishes and subscribes data using both RTI Data Distribution Ser vice 3 x and 4 0 Publishing Data In RTI Data Distribution Service 3 x a Publication can stand alone It can also be added to a Publisher if so desired As you
115. ple The Publisher is responsible for sending the data The application writes data using the write operation of the DataWriter which informs RTI Data Distribution Service that there is a new value for the data object It does not nec essarily cause any immediate network communications The actual generation of mes sages is controlled by the Publisher and the QoS The association of a DataWriter to a Publisher is called a Publication A Publication indi cates that the application intends to publish the data described by the DataWriter by using the Publisher What is referred to as a Publication in RTI Data Distribution Ser vice 4 0 is unlike the Publication object in RTI Data Distribution Service 3 x An RTI Data Distribution Service 3 x Publication is an actual object with which the user interacts In RTI Data Distribution Service 4 0 a publication is a logical concept only there is no object by that name Subscriptions and DataReaders In RTI Data Distribution Service 3 x a Subscription is used by an application to subscribe to an RTI Data Distribution Service Topic and thus declare the data it wishes to receive In essence it provides an interface with RTI Data Distribution Service in order to receive incoming published data A Subscription can stand alone and refers to exactly one Topic that identifies the data to be read An application may also manage a group of Subscrip tions with a Subscriber In RTI Data Distribution Ser
116. r locators count 1 6 2 Proprietary Information of Real Time Innovations Inc 6 1 Examples Table 6 1 if participant factory create participant nddsDomain participant qos NULL return RTI FALSE Notice that there are a few more infrastructure calls that must be used in RTI Data Dis tribution Service 4 0 prior to the create_participant method that instantiates the actual DomainParticipant The RTI Data Distribution Service 3 x and 4 0 methods used to instan tiate a domain are shown in Table 6 1 for comparison purposes C Methods for Creating a Domain 3 x Method 4 0 Method DDSDomainParticipantFactory get_instance NDDSDomainClass Create factory gt get_default_participant_qos factory gt create_participant Only a few methods are required to actually create the Domain itself Once the Domain exists the application is provided a rich set of methods that can be used to support application functionality Below you ll find example source code of how an application publishes and subscribes data using both RTI Data Distribution Service 3 x and 4 0 We ll cover each of the Domain methods available in RTI Data Distribution Service 3 x and dis cuss how they map to the RTI Data Distribution Service 4 0 DDS compliant product Publishing Data In RTI Data Distribution Service 3 x a Publication can stand alone It can also be added to a Publisher if so desired As you l
117. return RTI FALSE factory get default participant qos participant qos participant qos discoveryX participant index participantIndex if peerHost NULL if RTINetioAddress getIpv4AddressByName RTINetioAddress amp participant qos discoveryX initial peer locators 0 address peerHost return RTI FALSE participant_qos discov eryX initial_peer_locators 0 participant_index_limit peerMaxIndex participant qos discoveryX initial peer locators count 1 if participant factory create participant nddsDomain participant qos NULL return RTI FALSE if subscriber participant gt create_subscriber return RTI_FALSE retcode HelloMsgTypeSupport register_type participant if retcode DDS_RETCODE_OK return RTI_FALSE Proprietary Information of Real Time Innovations Inc 6 9 IdV 0 9 Chapter 6 Comparing the C APIs if topic participant create topic Example HelloMsg HelloMsgTYPENAME return RTI FALSE if listener new MyListener return RTI_FALSE if reader HelloMsgDataReader subscriber gt create_datareader topic DDS_DATAREADER_QOS_DEFAULT listener return RTI_FALSE for count 0 count gt 0 count RtiDebugPrint Sleeping for s sec n RtiNtpTimeTo String amp receive period sec deadlineString RtiThreadSleep amp receive period sec return RTI
118. ribution Service 4 0 the DataWriter provides the DDS DataWriter get topic routine which returns the Topic associated with the DataWriter This is the same Topic that was used to create the DataWriter Proprietary Information of Real Time Innovations Inc 5 4 Subscription API 5 3 6 5 4 Table 5 7 NddsPublicationInstanceGet Obtains a pointer to the Publication instance In RTI Data Distribution Service 4 0 a Publisher can use the DDS Publisher lookup datawriter routine to obtain the DataWriter s instance Publication Listener Routines NDDSPublicationListener See Section 5 8 1 2 for further details NddsPublicationListenerGet Retrieves the Publication s Listener hooks In RTI Data Distribution Service 4 0 a DataWriter s Listener can be obtained by using the DDS DataWriter get listener routine NddsPublicationListenerSet Allows the Publication s Listener to be modified In RTI Data Distribution Service 4 0 a DataWriter s Listener can be modified by using the DDSDataWriter set listener routine NddsPublicationListenerDefaultGet Allows the Publication s default Listener hooks to be retrieved In RTI Data Distribution Service 4 0 a DataWriter s default listener can be retrieved by invoking the DDS DataWriter get listener routine prior to creating the DataWriter object Subscription API This section discusses the RTI Data Distribution Service 3 x subscription function calls and how they map to the RTI D
119. roperties associated with a Subscription in RTI Data Distribution Service 3 x do not map directly to DataReader properties in RTI Data Distribution Service 4 0 but object QoS properties can be established for a given DataReader by using the DDS_Subscriber_set_default_datareader_qos routine NddsSubscriptionPropertiesGet The properties associated with a Subscription in RTI Data Distribution Service 3 x do not map directly to DataReader properties in RTI Data Distribution Service 4 0 but object QoS properties can be retrieved for a given DataReader by using the DDS Subscriber get default datareader qos routine Proprietary Information of Real Time Innovations Inc 5 23 IdV D S Chapter 5 Comparing the C APIs 5 4 4 5 4 5 5 4 6 5 4 7 5 24 Subscription Status Routine NddsSubscriptionStatusGet Allows the status of an issue received on a subscription to be examined The information provided by this call is the same information that is presented to the Subscription s callback routine This function simply allows the application to retrieve the Subscription s current status see Section 5 8 3 Subscription Poll and Wait Routines NddsSubscriptionPoll Polls the Subscription for newly received issues since the last poll In RTI Data Distribution Service 4 0 an application uses Listeners to receive data Listeners provide asynchronous notification of data sample arrival NddsSubscriptionPublicationWait Actively
120. sher NddsPublisherSubscriptionWait Forces the calling thread to wait for at least the num ber of Subscriptions to appear for each Publication managed by the Publisher There is no RTI Data Distribution Service 4 0 DataWriter or Publisher routine cur rently available that will perform this specific functionality Publisher Find and Iterate Routines NddsPublisherPublicationFind Finds the Publication of a supplied Topic string that is managed by the Publisher In RTI Data Distribution Service 4 0 the DDS Publisher lookup datawriter routine would be used This routine allows the application to supply a Topic string so that the associated DataWriter handle can be retrieved NddsPublisherlterate Iterates over all managed Publications This functionality is sup ported within the DDS Specification but will not be implemented in RTI Data Distribu tion Service 4 0 Subscriber API This section discusses the RTI Data Distribution Service 3 x Subscriber routines and how they map to the RTI Data Distribution Service 4 0 functionality Some of the routines will map directly others will require redesign of the application Table 5 9 lists the RTI Data Distribution Service 3 x Subscriber routines in alphabetical order Next we will look at how they map to RTI Data Distribution Service 4 0 functionality Proprietary Information of Real Time Innovations Inc 5 6 Subscriber API Table 5 9 Subscriber API 3 x
121. specialized listener thus RTI Data Distribution Ser vice 4 0 will provide Listener support for each Domain entity Proprietary Information of Real Time Innovations Inc 6 25 IdV 5 9 Chapter 6 Comparing the C APIs 6 8 1 Domain Listeners The Domain Listener in RTI Data Distribution Service 3 x allows the application the abil ity to be notified upon the appearance and disappearance of Managers Applications Publications Subscriptions and Servers We ll discuss the RTI Data Distribution Service 3 x Domain Listener virtual methods that are available and how they can potentially be mapped into the RTI Data Distribution Service 4 0 functionality but first we must address the concept of built in Topics in RTI Data Distribution Service 4 0 The DomainPartici pant Listener within RTI Data Distribution Service 4 0 does not provide the same virtual functions that are provided in the RTI Data Distribution Service 3 x Domain Listener In order for an RTI Data Distribution Service 4 0 application to implement similar RTI Data Distribution Service 3 x Domain Listener functionality the built in Topic must be used The DDS specification introduces a set of Built in Topics and corresponding DataReader objects that can be used by the application to monitor and keep track of new DCPS enti ties as they are discovered The Built in Topics can then be accessed as if it was normal application data Table 6 9 lists the RTI Data Distrib
122. stribution Service 4 0 API To that end the document reviewed the RTI Data Distribution Service 3 x API and mapped the methods to the 4 0 DDS API In those cases where a direct mapping was not possible an indirect mapping was presented In the cases where no direct or indirect mapping was available viable alternatives were suggested The document also addressed the extended QoS of the current RTI Data Distribution Service 3 x product and how one might transition some of RTI Data Distribution Service specific internal func tionality to the DDS compliant product It is important to keep in mind that the document took the vantage point of looking at the current RTI Data Distribution Service 3 x APIs and parameters Therefore some of the newly introduced DDS functionality was not addressed To gain a full perspective of the features provided by DDS download and review the DDS whitepapers available on the RII website www rti com see the Resources page The DDS specification is available at www omg org cgi bin doc ptc 2004 03 07 The example source code presented in this document for both RTI Data Distribution Ser vice 3 x and 4 0 is available from the same URL used to download this document The examples are provided as compilable source code We welcome your comments questions and suggestions concerning the document and source code examples Please email them to support rti com Proprietary Information of Real Time Innovations Inc 8 1
123. t be instantiated independent of a Subscriber the equivalent method would be to use the DDSSubscriber class create datareader method This not only creates the DataReader object but auto matically adds it to the Subscriber SubscriptionRemove removes a Subscription from being managed by a Subscriber In RTI Data Distribution Service 3 x the notion of being able to remove a Subscription from being managed by a Subscriber was supported In RTI Data Distribution Ser vice 40 you can remove a DataReader by using the Subscriber s delete datareader method Subscriber Methods for Finding Subscriptions SubscriptionFind Finds the Subscription of a supplied Topic string that is managed by the Subscriber In RTI Data Distribution Service 4 0 the DDSSubscriber class provides a lookup datareader method which retrieves a previously created DataReader belonging to the Subscriber that is attached to a Topic with a match ing Topic name Subscriber Method for Polling Subscriptions Poll Polls all Subscriptions There is no equivalent mechanism in RTI Data Distribution Service 4 0 In a future version similar functionality will be available by using DDS objects known as Conditions and Wait sets Proprietary Information of Real Time Innovations Inc 6 7 Client and Server Methods 6 6 4 6 6 5 6 7 6 8 Subscriber Method for Iterating lterate Iterates over all aggregated Subscriptions This functionality is support
124. t create publisher In RTI Data Distribution Service 4 0 atomic behavior is handled by default NddsPublicationCreate A Publication is used by the application to write instances of data for publication In RTI Data Distribution Service 4 0 the equivalent functionality is supported by using both a DataWriter and a Publisher So an indirect mapping to RTI Data Dis tribution Service 4 0 exists in that you create a DataWriter DDS Publisher create datawriter after you create a Publisher DDS_DomainParticipant_create_publisher NddsPublicationDestroy As discussed in Section 2 3 an RTI Data Distribution Service 3 x Publication is used by the application to write instances of data for publication and does not require being added to a Publisher In RTI Data Distribution Service 4 0 this same functionality is supported by using both a DataWriter and a Publisher If the RTI Data Distribution Service 3 x applica tion in question is employing a Publisher and only a specific Publication is to be destroyed then you need to used the DDS_Publisher_delete_datawriter routine If on the other hand the RTI Data Distribution Service 3 x application was not employing a Publisher only a Publication then you need to delete both the RTI Data Distribution Service 4 0 Publisher and DataWriter by using DDS_DomainParticipant_delete_publisher and DDSPublisher_delete_datawriter Publication Properties Routines NddsPublicationPropertiesGet Th
125. t peerMaxIndex DS DomainParticipantFactory truct DDS DomainParticipantQos DS DomainParticipant DS Publisher DS Topic elloMsgDataWriter elloMsg DS ReturnCode t DS InstanceHandle t int RTINtpTime UUmnmunuUuuunutu RtiNtpTimePackFromNanosec send period sec 4 0 int participantIndex const char peerHost factory NULL participant qos participant NULL publisher NULL topic NULL writer NULL instance NULL retcode instance handle DDS HANDLE NIL count 0 send period sec 0 0 4 seconds if factory DDS DomainParticipantFactory get instance return RTI FALSE DDS DomainParticipantFactory get default participant qos factory amp participant qos participant qos discoveryX participant index participantIndex if peerHost NULL 5 4 Proprietary Information of Real Time Innovations Inc 5 1 Examples if RTINetioAddress getIpv4AddressByName RTINetioAddress amp participant qos discoveryX initial peer locators 0 address peerHost return RTI FALSE participant qos discoveryX initial peer locators 0 participant index limit peerMaxIndex participant qos discoveryX initial peer locators count 1 if participant DDS DomainParticipantFactory create participant factory nddsDomain amp participant qos NULL return RTI FALSE Is if publisher DDS DomainParticipant create publisher participant DDS PUB
126. tatus NDDS FRESH DATA instance gt Print 0 return RTI_TRUE n extern C int subscriberMain int nddsDomain int nddsVerbosity t NDDSSubscriptionProperties properties NDDSSubscriptionClass subscription NULL MyListener listener NULL NDDSDomainClass domain NULL HelloMsg instance NULL NDDSSubscriberClass subscriber NULL char deadlineString RTI NTP TIME STRING LEN NddsVerbositySet nddsVerbosity if domain NDDSDomainClass Create NDDS DOMAIN DEFAULT NULL NULL printf Unable to create the domain n return RTI FALSE Ja domain gt SubscriptionPropertiesGet amp properties RtiNtpTimePackFromNanosec properties minimumSeparation 0 0 RtiNtpTimePackFromNanosec properties deadline 10 0 properties mode NDDS SUBSCRIPTION IMMEDIATE if instance new HelloMsg return RTI FALSE Proprietary Information of Real Time Innovations Inc 6 7 IdV 5 9 Chapter 6 Comparing the C APIs Hs if listener new MyListener return RTI FALSE if subscription domain gt SubscriptionCreate Example HelloMsg instance listener amp properties NDDS USE UNICAST return RTI FALSE subscriber domain SubscriberCreate subscriber gt SubscriptionAdd subscription while 1 printf Sleeping for s sec n RtiNtpTimeToString amp properties deadline deadlineString NddsUtilitySleep properties deadline return RTI_TRUE
127. the built in Subscriber and associated DataReaders by using the DDS DomainParticipant get builtin subscriber routine provided by the DomainParticipant The built in DataReader objects can then be retrieved by using the DDS Subscriber get datareaders routine This allows the application to gain access to the Built in DCPSSubscription Topic and monitor all traffic related to remote DataReader activity This allows the application to make deci sions based on the remote Participant s activity such as not allowing the remote subscriber to participate within the network by using the DDS DomainParticipant ignore subscription routine NDDSOnSubscriptionRemoteDeleteHook Equivalent functionality can be provided by subscribing to the built in Topic DCPSSubscription The application can then gain access to the built in Subscriber and associated DataReaders by using the DDS DomainParticipant get builtin subscriber routine provided by the DomainParticipant The built in DataReader objects can then be retrieved by using the DDS Subscriber get datareaders routine This allows the application to gain access to the Built in DCPSSubscription Topic and monitor all traffic related to remote DataReader activity This allows the application to make deci sions based on the remote Participant s activity such as not allowing the remote subscriber to participate within the network by using the DDS_DomainParticipant_ignore_subscription routine Proprietary Information
128. the data is sent in the user thread Proprietary Information of Real Time Innovations Inc 2 13 Applications and Threads 2 13 2 Database Thread DT The Database Thread DT propagates and manages RTI Data Distribution Service s internal database Each node maintains a database that reflects the entire distributed system This thread is responsible for ensuring that the internal database is consistent with its peers This thread is created during ini tialization User Thread UT These represent the application threads used by the user applica tions These threads may be used to send data in the case where the application sends information by means of a Publication or else if the application used a Pub lisher that has been configured as a SYNCHRONOUS Publisher In addition to these RTI Data Distribution Service specific threads each domain requires that an RTI Data Distribution Service manager process be spawned For operating sys tems that do not support the process model such as the VxWorks 5 x operating environ ment each thread is spawned as a task including the RTI Data Distribution Service manager Threads in RTI Data Distribution Service 4 0 In RTI Data Distribution Service 4 0 an application on a specific computer may instantiate one or more DomainParticipant objects within the same or in different domains DomainParticipants are associated with a specific domainld have a participantIndex and cannot
129. tly supported in RTI Data Distribution Service 4 0 l issuesDropped Number of issues dropped In RTI Data Distribution Service 4 0 the application can use the Subscriber Listener on sample lost routine or the DDS DataReader get sample lost status routine to access both the total count and total count change data fields The total count provides the cumulative count of all samples lost across all instances of topics subscribed to by this Sub scriber The total count change provides the incremental number of samples lost since the last time the Listener was called or the status was read These rou tines provided dropped issue counts for the entire Subscriber not on a DataReader basis LJ nddsTopic Subscription s topic In RTI Data Distribution Service 4 0 once either the Subscriber Listener on sample lost routine Or the DDS DataReader get sample lost status routine is invoked the information associated with dropped issues is provided only on a Subscriber basis There is currently no mechanism available to determine which dropped issues are associ ated with which Topic Publisher and Subscriber Listeners The RTI Data Distribution Service 3 x product does not support Publisher or Subscriber Listener interfaces Proprietary Information of Real Time Innovations Inc 5 8 Listeners 5 8 6 Client and Server Listeners The RTI Data Distribution Service 3 x Client and Server Listeners allow an application to tailor its beh
130. u tion Service 3 x where a Publication can exist with or without a Publisher Publisher Add Remove Routines NddsPublisherPublicationAdd Adds a Publication to a Publisher In RTI Data Distribu tion Service 4 0 since a DataWriter cannot be instantiated independent of a Pub lisher the equivalent functionality would be to use the DDS_Publisher_create_datawriter routine This not only creates the DataWriter object but adds it to the Publisher entity NddsPublisherPublicationRemove Removes a Publication from being managed by a Publisher In RTI Data Distribution Service 4 0 since a DataWriter must be associ ated with a Publisher this functionality is not supported unless multiple DataWriters exist within the Publisher If this is the case then one of the DataWriter s may be removed by using the DDS_Publisher_delete_datawriter routine Proprietary Information of Real Time Innovations Inc 5 27 ldv O S Chapter 5 Comparing the C APIs 5 5 3 5 5 4 5 6 5 28 Publisher Send and Wait Routines NddsPublisherSend Takes a snapshot of all the Publications managed by the Publisher and then sends the issues at once coalescing individual Publications into a single message to maximum network bandwidth utilization A direct mapping of this routine does not exist within RTI Data Distribution Service 4 0 Each DataWriter s write routine must be invoked individually to cause the Topic issue to be dissemi nated via the Publi
131. ulticastProperties sss 4 3 4 1 4 INIDDSDDGramiProperties o asit e deo eee den 4 4 4 1 5 NDDSDeclProperties tette tiet tte tete 4 5 4 1 6 INIDIDSNIG Properties assen an t oio tp imet 4 5 4 1 7 NDDSDomainBaseProperties essent 4 7 4 1 8 RIPSWireProtocolProperties esses 4 8 4 1 9 NDDSAppManagerProperties sse 4 9 42 Publication and Subscription Properties sss 4 11 4 2 1 NDDSPublicationProperties esses 4 11 4 2 2 NDDSSubscriptionProperties sse 4 13 4 3 Client and Server Properties eene teet ite ei eid 4 14 Comparing The C APIS sonoro ona eee er irte mini EEE 5 1 5 1 EXAM DIES E 5 2 5 1 1 Domain Instantiation essent eterne 5 2 5 1 2 Publishing Data aiam ea aeta na etat dites 5 3 5 1 3 Subscribing To Data cerent trees 5 6 5 2 Domain APT no Er D IR D a a 5 11 5 2 1 Domain Create Delete Routines eene 5 12 5 2 2 Domain Index and Handle Retrieval Routines 5 12 5 2 3 Domain Wait ROutine ccccccccccccccsscecessecessscecesesesesececnseeseseeeeneas 5 13 5 2 4 Wire Protocol Properties Routine sese 5 13 5 2 5 Manager and Application Host Routines sss 5 13 5 2 6 Default Properties Routines sss 5 13 5 2 7 Type ARM eccentric comido n etes 5 14 5 2 8 Database API iniert
132. unless there are mul tiple DataReaders created within the Subscriber If this is the case then one of the DataReader s may be removed by using the DDS Subscriber delete datareader routine Subscriber Poll Routine NDDSSubscriberPoll Polls all Subscriptions In RTI Data Distribution Service 4 0 there is no routine that provides this equivalent functionality directly The user could cre ate specific conditions to wait on and attach them to a Wait Set for each DataReader of interest The application could then achieve polling functionality by repeatedly invoking the DDS WaitSet wait routine with a specified timeout value Subscriber Find and Iterate Routines NDDSSubscriberSubscriptionFind Finds the Subscription of a supplied Topic string that is managed by the Subscriber In RTI Data Distribution Service 4 0 the DDS_Subscriber_lookup_datareader routine would be used This function allows the application to supply a Topic string so that the associated DataReader handle can be retrieved Proprietary Information of Real Time Innovations Inc 5 7 Client and Server APIs 5 7 5 8 5 8 1 NDDSSubscriberlterate Iterates over all aggregated Subscriptions This functionality is supported within the DDS Specification but will not be implemented in RTI Data Distri bution Service 4 0 Client and Server APIs None of the Client and Server APIs are supported in RTI Data Distribution Service 4 0 This feature set will b
133. ution Service 3 x Domain Listeners in alphabetical order Next we will look at how at how they map to RTI Data Distribution Service 4 0 functionality Table 6 9 Domain Listeners 6 26 3 x Method Reference to 4 0 Information OnApplicationRemoteNew Section 6 8 1 1 OnApplicationRemoteDelete OnManagerRemoteNew Section 6 8 1 4 OnManagerRemoteDelete OnPeerRemoteNew Section 6 8 1 1 OnPublicationRemoteNew OnPublicationRemoteDelete Section 6 8 1 2 OnServerRemoteNew OnServerRemoteDelete Section 6 8 1 5 OnSubscriptionRemoteNew Section 6 8 1 3 OnSubscriptionRemoteDelete Proprietary Information of Real Time Innovations Inc 6 8 Listeners 6 8 1 1 6 8 1 2 Domain Listeners for New Deleted Applications Peers OnApplicationRemoteNew There is no direct mapping of this method to RTI Data Dis tribution Service 4 0 Equivalent functionality can be provided by subscribing to the built in Topic DCPSParticipant The application can gain access to the built in Subscriber and associated DataReaders by using the DomainParticipant get builtin subscriber and get datareader methods to gain access to the built in DCPSParticipant Topic and monitor all traffic related to remote DomainPartici pant activity This allows the application to make decisions based on the remote Participant s activity such as not allowing the remote participant to participate within the net
134. ution Service 4 0 NDDS SUBSCRIPTION NEW a new reliable subscription has appeared The Built in Topics feature in RTI Data Distribution Service 4 0 can provide this information See Section 5 8 1 NDDS SUBSCRIPTION DELETE a reliable Subscription disappeared Note that the Publication only detects the disappearance of a reliable Subscrip tion after the expirationTime of the last refreshed subscription declaration expires and the Publication checks its database The Built in Topics feature in RTI Data Distribution Service 4 0 can provide this information L nddsTopic the NDDSTopic of the Publication This information is not available in RTI Data Distribution Service 4 0 1 subscriptionReliable the number of reliable Subscriptions subscribed to this publication This information is not available in RTI Data Distribution Service 4 0 1 subscriptionUnreliable the number of unreliable Subscriptions subscribed to this Publication This information is not available in RTI Data Distribution Service unacknowledgedlssues the number of unacknowledged issues This informa tion is not available in RTI Data Distribution Service 4 0 Issue Listeners The RTI Data Distribution Service 3 x Issue Listener provides the ability for the applica tion to tailor its behavior in response to middleware activity associated with individual subscription events including the reception of publications The Issue Listener interface provides
135. ve The Subscription dictates whether the communication is best effort or reliable unicast or multicast Object Parameters in RTI Data Distribution Service 4 0 In RTI Data Distribution Service 4 0 you control the behavior of an object by setting QoS policies QoS policies are set on all entities Topics DataWriters DataReaders Publish ers Subscribers and DomainParticipants In certain cases for communications to occur properly the QoS policy of the Publisher must be compatible with the corresponding policy of the Subscriber For example if a Subscriber requests to receive data reliably while the corresponding Publisher only Offers best effort communication will not be established To address this issue and maintain the desirable decoupling of Publication and Subscription the specification for QoS policy follows the Subscriber requested Publisher offered pattern In this pattern the Subscriber can specify an ordered list of requested values for a particular QoS pol icy in decreasing order of preference The Publisher specifies a set of offered values for that QoS policy RTI Data Distribution Service selects the most preferred value requested by the Subscriber that is offered by the Publisher or it may reject the estab lishment of communications between the two objects if the QoS requested and the QoS offered cannot be reconciled This is a new feature inherent within DDS On the publishing side the QoS of each Topic DataWr
136. ve This parameter is typi cally increased along with send BufferSize and recvBufferSize when sending large packets greater than 8k bytes Not required specific transports can be configured to handle messages of different sizes decl Controls declarations See Section 4 1 5 nackRetryMin Minimum time to wait before resending a NACK for a missing issue in reliable communication mode DDS_DataWriterQos protocolX rtps reliable_writer min_nack_response_delay niclIPAddressCount Number of entries in nicProper ties Transport configuration API nicProperties IP addresses for all NICS on this node See Section 4 1 6 Proprietary Information of Real Time Innovations Inc 41 Domain and Infrastructure Properties Table 4 1 Mapping NDDSDomainProperties latency Otherwise the default Find will be used 3 x Field Name Description 4 0 Equivalent nddsTopicLength Maximum length of an NDDS topic nddsTypeLength B a Qe iai OMS Not supported nddsServiceName Maximum length of an NDDS Ser Length vice Name sharedMemory Whether or not to use shared Communication memory or the network stack for Enabled inter process communication Transport configuration API intraProcessCom Whether or not to use intra pro municationEnabled cess communication Controls Whose RTI Data Distri DDS_DomainParticipantQos hostList bution Servic
137. ver Methods Section 6 7 LJ Listeners Section 6 8 Proprietary Information of Real Time Innovations Inc 6 1 IdV 5 9 Chapter 6 Comparing the C APIs 6 1 Examples We ll start with examples of how to instantiate a domain and send and receive data 6 1 1 Domain Instantiation RTI Data Distribution Service 3 x int int NDDSDomainClass nddsDomain NDDS DOMAIN DEFAULT nddsVerbosity NDDS VERBOSITY DEFAULT domain NULL NddsVerbositySet nddsVerbosity if domain NDDSDomainClass Create nddsDomain NULL NULL printf Unable to create the domain n return RTI FALSE Fs RTI Data Distribution Service 4 0 DDSDomainParticipantFactory DDS DomainParticipantQos DDSDomainParticipant int int char int if factory return RTI_FALSE factory NULL participant qos participant NULL nddsDomain 0 participantIndex 0 peerHost 10 10 10 1 peerMaxIndex zs DDSDomainParticipantFactory get instance factory get default participant qos participant qos participant qos discoveryX participant index if peerHost NULL if participantIndex RTINetioAddress getIpv4AddressByName RTINetioAddress amp participant qos discoveryX initial peer locators 0 address peerHost return RTI FALSE participant qos discoveryX initial peer locators 0 participant index limit peerMaxIndex participant qos discoveryX initial pee
138. vice 4 0 a DataReader acts as a liaison between an application and a Subscriber and is analogous to a Subscription in RTI Data Distribution Service 3 x The Subscriber is responsible for receiving the data and making it accessible to the DataReader The DataReader allows the application to declare the Topic it wishes to receive and to access the data received by the attached Subscriber The application must then use the DataReader s read or take operations to gain access to the received data A DataReader and Subscriber are inseparable each DataReader must belong to exactly one Subscriber The association of a DataReader to a Subscriber in RTI Data Distribution Service 4 0 is called a Subscription A Subscription indicates that the application wants to receive the data described by the DataReader by using the Subscriber It is important to note that what is referred to as a Subscription in RTI Data Distribution Service 4 0 is unlike the Subscription object in RTI Data Distribution Service 3 x To access incoming data you use a DataReader s Listener Listeners are a type of call back mechanism for asynchronous notification of data arrival and other important Proprietary Information of Real Time Innovations Inc 2 5 IepoiN 12e qo Z Chapter 2 Object Model Comparative Analysis 2 5 2 6 events Any type of DCPS entity can have an associated Listener When specific events occur such as the arrival of data QoS changes
139. vice calls this routine to decide Proprietary Information of Real Time Innovations Inc 5 15 IdV D S Chapter 5 Comparing the C APIs 5 2 7 4 5 2 8 5 16 how much buffer space to allocate for an instance of this NDDSType In RTI Data Distribution Service 3 x the nddsgen utility automatically creates this routine and provides the source code NddsTypeRegister Provides the prototype to actually register an NDDSType to RTI Data Distribution Service It binds the necessary and some optional routines to an NDDSType In RTI Data Distribution Service 3 x if you use the nddsgen utility you don t have to use this function directly because nddsgen generates the required routines and creates a wrapper function to register the type NddsTypeDestroy Provides the prototype to destroy all registered C types All appli cations that register an NDDSType should call this function before exiting to ensure that the memory used to register the NDDSTypes is freed Note nddsgen in RTI Data Distribution Service 3 x does not generate this functionality WaveScope Registration Routines These routines are not supported in RTI Data Distribution Service 4 0 They are men tioned here only for completeness ScopeRegisterMethodType Provides the prototype that allows the NDDSType to be registered for use with the NDDSScope graphical debug tool In RTI Data Distribu tion Service 3 x the nddsgen utility automatically
140. w RTI Data Distribution Service behaves First when you create various objects like subscriptions and publications you pass important parameters like strength persistence and deadline to the API that creates the object Second you may alter other aspects of these objects directly in their property structures In RTI Data Distribution Service 4 0 all object behavior is controlled through Quality of Service QoS policies This chapter discusses the RTI Data Distribution Service 4 0 equivalents of the parameters explicitly passed when creating the objects The fields set in 3 x property structures are discussed in Chapter 4 This chapter includes the following sections 1 Object Parameters in RTI Data Distribution Service 3 x Section 3 1 1 Object Parameters in RTI Data Distribution Service 4 0 Section 3 2 Object Parameters in RTI Data Distribution Service 3 x When you create a Publication in RTI Data Distribution Service 3 x you set its Strength and Persistence when you create a Subscription you set its Minimum Separation and Proprietary Information of Real Time Innovations Inc 3 SIOJOWUDIDd Chapter 3 Configuration Parameters 3 2 3 2 Deadline and specify whether unicast or multicast will be used These parameters define the behavior or QoS for the object To use reliable communication you use a sep arate reliable API to create the Subscription still setting the same parameters as men tioned abo
141. work by using the ignore participant method OnApplicationRemoteDelete There is no direct mapping of this method to RTI Data Distribution Service 4 0 Equivalent functionality can be provided by subscribing to the built in Topic DCPSParticipant The application can gain access to the built in Subscriber and associated DataReaders by using the DomainParticipant get builtin subscriber and get datareader methods to gain access to the built in DCPSParticipant Topic and monitor all traffic related to remote DomainPartici pant activity OnPeerRemoteNew See OnApplicationRemoteNew above Domain Listener for New Deleted Publications OnPublicationRemoteNew there is no direct mapping of this method to RTI Data Dis tribution Service 4 0 Equivalent functionality can be provided by subscribing to the built in Topic DCPSPublication The application can gain access to the built in Subscriber and associated DataReaders by using the DomainParticipant get builtin subscriber and get datareader methods to gain access to the built in DCPSPublication Topic and monitor all traffic related to remote DataWriter activity This allows the application to make decisions based on the remote Partic ipant s activity such as not allowing the remote participant to participate within the network by using the ignore publication method OnPublicationRemoteDelete there is no direct mapping of this method to RTI Data Distribution Service 4 0 Equ

Download Pdf Manuals

image

Related Search

Related Contents

Manual IVRA battery charger  GEBRUIKERSHANDLEIDING USER MANUAL  USER`S MANUAL  Le régime IG thyroïde télécharger - télécharger des livres sur le  swingo 150  Bedienungsanleitung  AVH-2350DVD (Español) Descargar  Wayne 321205-001 User's Manual  design of the gps tracking system for monitoring parametric  Intermec CN70  

Copyright © All rights reserved.
Failed to retrieve file