RTI Connext DDS Micro
Total Page:16
File Type:pdf, Size:1020Kb
RTI Connext DDS Micro User’s Manual Version 2.4.14.0 Contents 1 Introduction 2 1.1 What is RTI Connext DDS Micro? ............................ 2 1.1.1 RTI Connext DDS Micro Cert versus RTI Connext DDS Micro ....... 3 1.1.2 Optional Certification Package ......................... 3 1.1.3 Publish-Subscribe Middleware .......................... 3 1.2 Supported DDS Features ................................. 3 1.2.1 DDS Entity Support ............................... 4 1.2.2 DDS QoS Policy Support ............................ 4 1.3 Standards and Interoperability .............................. 5 1.3.1 DDS Wire Compatibility ............................. 5 1.3.2 Profile / Feature ................................. 5 1.3.3 DDS API Support ................................ 7 1.4 RTI Connext DDS Documentation ............................ 7 1.5 OMG DDS Specification ................................. 8 1.6 Other Products ...................................... 8 2 Installation 10 2.1 Installing the RTI Connext DDS Micro Package .................... 10 2.2 Setting Up Your Environment .............................. 11 2.3 Building Connext DDS Micro .............................. 11 3 Getting Started 13 3.1 Define a Data Type .................................... 13 3.2 Generate Type Support Code with rtiddsgen ...................... 13 3.3 Configure UDP Transport ................................. 15 3.4 Create DomainParticipant, Topic, and Type ...................... 16 3.4.1 Register Type ................................... 17 3.4.2 Create Topic of Registered Type ........................ 17 3.4.3 DPSE Discovery: Assert Remote Participant ................. 18 3.5 Create Publisher ...................................... 18 3.6 Create DataWriter ..................................... 19 3.6.1 DPSE Discovery: Assert Remote Subscription ................. 20 3.6.2 Writing Samples ................................. 20 3.7 Create Subscriber ..................................... 21 3.8 Create DataReader .................................... 21 3.8.1 DPSE Discovery: Assert Remote Publication ................. 23 3.8.2 Receiving Samples ................................ 24 i 3.8.3 Filtering Samples ................................. 26 3.9 Examples .......................................... 27 3.10 Example Generation .................................... 28 3.10.1 Description of Examples ............................. 29 3.10.2 How to Compile the Generated Examples ................... 30 3.10.3 How to Run the Generated Examples ...................... 31 4 User’s Manual 32 4.1 Data Types ......................................... 32 4.1.1 Introduction to the Type System ........................ 33 Sequences ...................................... 34 Strings and Wide Strings ............................. 35 4.1.2 Creating User Data Types with IDL ...................... 37 4.1.3 Working with DDS Data Samples ........................ 37 4.2 DDS Entities ........................................ 38 4.3 Sending Data ........................................ 39 4.3.1 Preview: Steps to Sending Data ......................... 39 4.3.2 Publishers ..................................... 40 4.3.3 DataWriters .................................... 40 4.3.4 Publisher QosPolicies ............................... 41 4.3.5 DataWriter QosPolicies .............................. 41 4.4 Receiving Data ....................................... 41 4.4.1 Preview: Steps to Receiving Data ........................ 41 4.4.2 Subscribers .................................... 43 4.4.3 DataReaders .................................... 44 4.4.4 Using DataReaders to Access Data (Read & Take) .............. 44 4.4.5 Subscriber QosPolicies .............................. 44 4.4.6 DataReader QosPolicies ............................. 44 4.5 DDS Domains ....................................... 44 4.5.1 Fundamentals of DDS Domains and DomainParticipants ........... 44 4.5.2 Discovery Announcements ............................ 47 4.6 Transports ......................................... 47 4.6.1 Introduction .................................... 48 4.6.2 Transport Registration .............................. 48 4.6.3 Transport Addresses ............................... 49 4.6.4 Transport Port Number ............................. 50 4.6.5 RTPS ....................................... 50 Registration of RTPS ............................... 50 Overriding the Builtin RTPS Checksum Functions . 52 Example ....................................... 53 4.6.6 INTRA Transport ................................ 55 Registering the INTRA Transport ........................ 55 Reliability and Durability ............................. 56 Threading Model .................................. 56 4.6.7 UDP Transport .................................. 56 Registering the UDP Transport .......................... 57 Threading Model .................................. 58 UDP Configuration ................................. 60 ii UDP Transformations ............................... 64 4.7 Discovery .......................................... 93 4.7.1 What is Discovery? ................................ 93 Simple Participant Discovery ........................... 94 Simple Endpoint Discovery ............................ 94 4.7.2 Configuring Participant Discovery Peers .................... 95 peer_desc_string .................................. 95 4.7.3 Configuring Initial Peers and Adding Peers .................. 96 4.7.4 Discovery Plugins ................................. 96 Dynamic Discovery Plugin ............................. 97 Static Discovery Plugin .............................. 97 4.8 Configuring Resource Limits ............................... 100 4.8.1 Introduction .................................... 100 4.8.2 Resource Limits .................................. 100 DomainParticipantFactoryQos . 100 DomainParticipantQos ...............................100 DataReaderQos ...................................100 DataWriterQos ...................................101 OSAPI .......................................101 UDP Transport ...................................101 Dynamic Participant Static Endpoint (DPSE) . 101 Dynamic Participant Dynamic Endpoint (DPDE) . 101 Memory Map ....................................102 4.8.3 Dynamic Memory Allocation .......................... 103 4.8.4 Internal Resource Allocation ........................... 103 4.9 Generating Type Support with rtiddsgen ........................ 104 4.9.1 Why Use rtiddsgen? ............................... 104 4.9.2 IDL Type Definition ............................... 104 4.9.3 Generating Type Support ............................ 105 C ...........................................105 C++ .........................................105 Notes on Command-Line Options . 105 Generated Type Support Files . 106 4.9.4 Using custom data-types in Connext DDS Micro Applications ........ 106 4.9.5 Customizing generated code ........................... 107 4.9.6 Unsupported Features of rtiddsgen with Connext DDS Micro ........ 107 4.10 Threading Model ...................................... 107 4.10.1 Introduction .................................... 107 4.10.2 Architectural Overview .............................. 108 4.10.3 Threading Model ................................. 108 OSAPI Threads ..................................108 UDP Transport Threads ..............................109 General Thread Configuration . 111 4.10.4 Critical Sections .................................. 111 Calling DDS APIs from listeners . 111 4.11 Batching .......................................... 111 4.11.1 Overview ..................................... 112 4.11.2 Interoperability .................................. 112 iii 4.11.3 Performance .................................... 112 4.11.4 Example Configuration .............................. 112 4.12 Message Integrity Checking ................................ 114 4.12.1 RTPS Checksum ................................. 114 4.12.2 Configurations ................................... 115 Selecting a checksum algorithm . 115 Configuring the DDS DomainParticipant . 115 4.12.3 Participant Discovery and Participant Compatibility ............. 116 4.12.4 Interoperability with Connext DDS Professional ................ 117 4.13 Working With Sequences ................................. 117 4.13.1 Introduction .................................... 117 4.13.2 Working with Sequences ............................. 117 Overview ......................................117 Working with IDL Sequences . 119 Working with Application Defined Sequences . 121 4.14 Debugging ......................................... 122 4.14.1 Overview ..................................... 122 4.14.2 Configuring Logging ............................... 122 4.14.3 Log Message Kinds ................................ 123 4.14.4 Interpreting Log Messages and Error Codes .................. 123 4.15 Connext DDS Micro Hardcoded Resource Limits .................... 124 4.15.1 Introduction .................................... 124 4.15.2 Summary ..................................... 124 4.15.3 Operating Services API (OSAPI) ........................ 125 4.15.4 DDS C API .................................... 125 4.15.5 Dynamic Discovery Plugin (DPDE) ....................... 126 4.15.6 Static Discovery Plugin (DPSE) ......................... 126 4.15.7 RTPS Protocol Implementation (RTPS) .................... 126 4.16 Building Against FACE Conformance Libraries ..................... 126 4.16.1 Requirements ................................... 126 Connext