@@ -37,9 +37,12 @@ In this sense, partitions represent a light mechanism to provide data separation
3737The Partition membership of an endpoint can be configured on the |api_pim_partitionqospolicy |
3838data member of the :ref: `dds_layer_publisher_publisherQos ` or :ref: `dds_layer_subscriber_subscriberQos ` objects.
3939This member holds a list of Partition name strings.
40- If no Partition is defined for an entity, it will be automatically included in the default nameless Partition.
41- Therefore, a Publisher and a Subscriber that specify no Partition will still
42- be able to communicate through the default nameless Partition.
40+ In DDS, the default Partition name is the empty string ``"" ``.
41+ Therefore, an empty list (``{} ``) is equivalent to a list containing only the empty string (``{""} ``).
42+ As a result, a Publisher and a Subscriber that specify no Partition can still communicate through the default
43+ Partition, and explicitly configuring ``"" `` has the same behavior.
44+ If ``"" `` is included together with additional names, the endpoint belongs to the default Partition and to those
45+ additional Partitions.
4346
4447.. warning ::
4548
@@ -69,7 +72,8 @@ For example, consider the following configuration:
6972Even though ``partition* `` does not match ``part* ``, these Publisher and Subscriber
7073will communicate between them because ``part* `` matches ``partition* ``.
7174
72- Note that a Partition with name ``* `` will match any other partition **except the default Partition **.
75+ Note that a Partition with name ``* `` will match any other partition,
76+ including the default Partition ``"" ``.
7377
7478Full example
7579------------
@@ -81,7 +85,7 @@ Given a system with the following Partition configuration:
8185+ +---------+--------------------------------+
8286| | Pub_12 | {"*"} |
8387+----------------+---------+--------------------------------+
84- | Participant_2 | Pub_21 | {} |
88+ | Participant_2 | Pub_21 | {default} ≡ {""} ≡ {} |
8589+ +---------+--------------------------------+
8690| | Pub_22 | {"Partition*"} |
8791+----------------+---------+--------------------------------+
@@ -91,11 +95,10 @@ Given a system with the following Partition configuration:
9195+ +---------+--------------------------------+
9296| | Subs_33 | {"Partition_3"} |
9397+ +---------+--------------------------------+
94- | | Subs_34 | {} |
98+ | | Subs_34 | {default} ≡ {""} ≡ {} |
9599+----------------+---------+--------------------------------+
96100
97101The endpoints will finally match the Partitions depicted on the following table.
98- Note that ``Pub_12 `` does not match the default Partition.
99102
100103+--------------+-------------------+-------------------+---------------------------------------+
101104| | Participant_1 | Participant_2 | Participant_3 |
@@ -108,7 +111,7 @@ Note that ``Pub_12`` does not match the default Partition.
108111+--------------+---------+---------+---------+---------+---------+---------+---------+---------+
109112| Partition_3 | ✕ | ✓ | ✕ | ✓ | ✕ | ✕ | ✓ | ✕ |
110113+--------------+---------+---------+---------+---------+---------+---------+---------+---------+
111- | {default} | ✕ | ✕ | ✓ | ✕ | ✕ | ✕ | ✕ | ✓ |
114+ | {default} | ✕ | ✓ | ✓ | ✕ | ✕ | ✕ | ✕ | ✓ |
112115+--------------+---------+---------+---------+---------+---------+---------+---------+---------+
113116
114117The following table provides the communication matrix for the given example:
@@ -124,7 +127,7 @@ The following table provides the communication matrix for the given example:
124127+ +---------+---------+---------+---------+---------+
125128| | Subs_33 | ✕ | ✓ | ✕ | ✓ |
126129+ +---------+---------+---------+---------+---------+
127- | | Subs_34 | ✕ | ✕ | ✓ | ✕ |
130+ | | Subs_34 | ✕ | ✓ | ✓ | ✕ |
128131+----------------+---------+---------+---------+---------+---------+
129132
130133The following piece of code shows the set of parameters needed for the use case depicted in this example.
0 commit comments