1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
//! A DDS 1.4 implementation in Rust: the DCPS API (domain participants,
//! topics, publishers, subscribers, data writers and data readers) over
//! DDSI-RTPS 2.5 ([`rustorb_rtps`]).
//!
//! Sample types implement [`TopicType`] from `rustorb-typesupport`, which
//! the IDL compiler generates (`rustorb-idl -brust -Wbdds`); a
//! hand-written implementation works the same way. Samples of types known
//! only at run time are [`DynamicData`].
//!
//! ```no_run
//! # fn f<Greeting: rustorb_dds::TopicType + 'static>(hello: Greeting) -> rustorb_dds::Result<()> {
//! use std::time::Duration;
//! use rustorb_dds::DomainParticipant;
//!
//! let participant = DomainParticipant::new(0)?;
//! let topic = participant.create_topic::<Greeting>("hello")?;
//! let writer = participant.create_publisher()?.create_datawriter(&topic)?;
//! let reader = participant.create_subscriber()?.create_datareader(&topic)?;
//! writer.write(&hello)?;
//! if reader.wait_for_data(Duration::from_secs(1)) {
//! for sample in reader.take() {
//! // `None` when the sample only tells of a change in the state
//! // of its instance (disposed, no more writers).
//! let _greeting: Option<Greeting> = sample.data;
//! }
//! }
//! # Ok(())
//! # }
//! ```
//!
//! What works now (rustorb/rustorb#111, stages D1 and part of D2):
//! discovery with SPDP and SEDP, and RELIABLE or BEST_EFFORT, VOLATILE or
//! TRANSIENT_LOCAL writers and readers (and TRANSIENT and PERSISTENT ones,
//! whose samples outlive the writer), in partitions (with wildcards),
//! over UDPv4. Endpoints whose QoS do not match are counted in the
//! incompatible QoS statuses; readers reject samples beyond their
//! RESOURCE_LIMITS. LIVELINESS (with the Writer Liveliness Protocol) and
//! DEADLINE are kept and reported in statuses. A thread can wait for
//! samples or status changes on a [`WaitSet`], with a [`StatusCondition`],
//! a [`ReadCondition`] or a [`GuardCondition`], or have them handed to a
//! [`DataReaderListener`] or [`DataWriterListener`]; a status that the
//! endpoint's listener does not take goes to the [`PublisherListener`] or
//! [`SubscriberListener`] (with `on_data_on_readers` first), then to the
//! [`DomainParticipantListener`] (DDS 1.4, 2.2.4.3). A participant that is
//! deleted tells the others. Keyed types
//! have instances: writers register, write, dispose and unregister them;
//! readers keep a history per instance with its states (DDS 1.4,
//! 2.2.2.5.1). Samples larger than a datagram go as DATA_FRAG, and lost
//! fragments are repaired. Samples are written in XCDR1. Writers and
//! readers in the same participant are matched with each other too.
//!
//! Data flows with ROS 2 nodes too (the `ros2` example).
//!
//! A [`ContentFilteredTopic`] (DDS 1.4, 2.2.2.3.3) gives its readers only
//! the samples of its related topic that pass a filter expression
//! (DDS 1.4, Annex B, see [`ContentFilter`]); readers are created for a
//! [`TopicDescription`], a topic or a content filtered topic.
//!
//! DDS-XTypes (D3, in progress): a type registered with
//! [`DomainParticipant::register_type`] (its [`DescribeType`] is written
//! by `rustorb-idl -Wbxtypes`) is announced with its TypeInformation, and
//! its endpoints match others by type assignability
//! ([`DataReaderQos::type_consistency`]) instead of by type name. Writers
//! can write XCDR2 ([`DataWriterQos::data_representation`]). Topics count
//! the endpoints whose types are not consistent with theirs
//! ([`Topic::inconsistent_topic_status`]). When a remote endpoint's type
//! differs from the local one, the participant gets its TypeObjects from
//! the remote participant with the TypeLookup service (DDS-XTypes 1.3,
//! 7.6.3.3) before it decides, and answers such requests for its own
//! types ([`DomainParticipant::learnt_types`], the `evolve` example).
//!
//! A program can also handle topics whose types it was not built with
//! (DDS-XTypes 1.3, 7.5.2): [`DomainParticipant::discover_topic_type`]
//! gets the type of a remote endpoint of a topic as a [`DynamicType`],
//! by TypeLookup, and [`DomainParticipant::create_dynamic_topic`] makes a
//! topic of it (or of a type built at run time) whose writers and readers
//! write and read [`DynamicData`] (the `dynamic` example).
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use OcspOptions;
pub use ;
pub use ReliabilityKind;
pub use DATA_REPRESENTATION_QOS_POLICY_ID;
pub use ;
pub use TopicType;
pub use ContentFilter;
pub use ;
pub use DescribeType;
pub use SecurityConfig;
pub use ;
pub use ;
pub use ;