2. In a Nutshell
• Introduce major entities in DCPS (Data-Centric Publish-Subscribe)
speci
fi
cation from the class diagram and implementation
viewpoints.
• Know the relationships and cardinalities among these entities.
• Discuss two ways (sync, async) to receive noti
fi
cation 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: De
fi
nes 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.
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.