- Introduce major entities in DCPS (Data-Centric Publish-Subscribe) specification from the class diagram and implementation viewpoints.
- Know the relationships and cardinalities among these entities.
- Discuss two ways (sync, async) to receive notification from DDS middleware and common pitfalls.
- Summarize learning resources.
2. In a Nutshell
• Introduce major entities in DCPS (Data-Centric Publish-Subscribe)
specification from the class diagram and implementation
viewpoints.
• Know the relationships and cardinalities among these entities.
• Discuss two ways (sync, async) to receive notification from DDS
middleware and common pitfalls.
• Summarize learning resources.
3. Take Aways For Busy People
• Create Few Domain Participants
• Create Entities Early
• Prefer Waitset over Listener
• ⼀一個 publisher/subscriber 上,可以有多個 datawriter/datareader
• ⼀一個 datawriter/datareader 只能對應⼀一個 topic (concrete class),但
不同 datawriter/reader 可以對應同⼀一個 topic
7. Entity is an Abstract Base Class
• An Entity is the common parent for the most important DDS-elements:
• DomainParticipant: Application connector to a Network Domain.
(是⽤用來來進入不同 Domain 的物件,不同 domain 間訊息不會互通,是隔離的)
• Topic: Defines the messages that will be transmitted across the network.
• DataWriter: Accessor to write typed data (Topic) into a Domain.
• DataReader: Accessor to read typed data (Topic) from a Domain.
• Publisher: Aggregation of DataWriter objects, used to disseminate data.
• Subscriber: Aggregation of DataReader objects, used to collect data.
11. 1.3. Status and Waitset
• Topic, Subscriber, Data Reader 與 Data Writer 四種 Entity 上有對應
的 Status
• 請參參考下列列⾴頁⾯面的 Class Diagram 與列列表
• Status
• Waitset
22. Notice from documents about listener
• PT: Something worth pointing out is that the handler code will
execute in a middleware thread. As a result, when using listeners
you should try to minimize the time spent in the listener itself.
• RTI: While a Listener is used to provide a callback for
asynchronous access, Conditions and WaitSets provide
synchronous data access. This means that you use a WaitSet to
block an application thread until data becomes available. This is
safer than using a listener because you do not have to worry about
blocking Connext's threads.
24. Take Aways
• Create Few Domain Participants
• Create Entities Early
• Prefer Waitset over Listener
• ⼀一個 publisher/subscriber 上,可以有多個 datawriter/datareader
• ⼀一個 datawriter/datareader 只能對應⼀一個 topic (concrete class),但
不同 datawriter/reader 可以對應同⼀一個 topic
25. Reference
• Vortex Lite C99 API Reference Guide (了了解 DCPS 概念念與架構,推薦閱讀⽽而不是只當作
API 查閱⽂文件,與 ISO C++ 章節內容完全相同)
• Best Practices using RTI Connext DDS (同樣適⽤用於 PT 的實作,推薦閱讀)
• Vortex - The DDS Tutorial (最輕量量化的教學⽂文件,短短20多⾴頁,幫助你掌握八成重要的概
念念)
• DataWriters/Publishers and DataReaders/Subscribers (清楚的解釋四種 Entities 的關係)
• RTI: WaitSet with Status Condition (介紹 Waitset 概念念)
• PT: Reading and Writing Data (介紹 Waitset 與 Listener ⽤用法)