@@ -36,9 +36,12 @@ In this sense, partitions represent a light mechanism to provide data separation
3636The Partition membership of an endpoint can be configured on the :ref: `api_pim_partitionqospolicy `
3737data member of the :ref: `dds_layer_publisher_publisherQos ` or :ref: `dds_layer_subscriber_subscriberQos ` objects.
3838This member holds a list of Partition name strings.
39- If no Partition is defined for an entity, it will be automatically included in the default nameless Partition.
40- Therefore, a Publisher and a Subscriber that specify no Partition will still
41- be able to communicate through the default nameless Partition.
39+ In DDS, the default Partition name is the empty string ``"" ``.
40+ Therefore, an empty list (``{} ``) is equivalent to a list containing only the empty string (``{""} ``).
41+ As a result, a Publisher and a Subscriber that specify no Partition can still communicate through the default
42+ Partition, and explicitly configuring ``"" `` has the same behavior.
43+ If ``"" `` is included together with additional names, the endpoint belongs to the default Partition and to those
44+ additional Partitions.
4245
4346.. warning ::
4447
@@ -68,7 +71,8 @@ For example, consider the following configuration:
6871Even though ``partition* `` does not match ``part* ``, these Publisher and Subscriber
6972will communicate between them because ``part* `` matches ``partition* ``.
7073
71- Note that a Partition with name ``* `` will match any other partition **except the default Partition **.
74+ Note that a Partition with name ``* `` will match any other partition,
75+ including the default Partition ``"" ``.
7276
7377Full example
7478------------
@@ -80,7 +84,7 @@ Given a system with the following Partition configuration:
8084+ +---------+--------------------------------+
8185| | Pub_12 | {"*"} |
8286+----------------+---------+--------------------------------+
83- | Participant_2 | Pub_21 | {} |
87+ | Participant_2 | Pub_21 | {default} ≡ {""} ≡ {} |
8488+ +---------+--------------------------------+
8589| | Pub_22 | {"Partition*"} |
8690+----------------+---------+--------------------------------+
@@ -90,11 +94,10 @@ Given a system with the following Partition configuration:
9094+ +---------+--------------------------------+
9195| | Subs_33 | {"Partition_3"} |
9296+ +---------+--------------------------------+
93- | | Subs_34 | {} |
97+ | | Subs_34 | {default} ≡ {""} ≡ {} |
9498+----------------+---------+--------------------------------+
9599
96100The endpoints will finally match the Partitions depicted on the following table.
97- Note that ``Pub_12 `` does not match the default Partition.
98101
99102+--------------+-------------------+-------------------+---------------------------------------+
100103| | Participant_1 | Participant_2 | Participant_3 |
@@ -107,7 +110,7 @@ Note that ``Pub_12`` does not match the default Partition.
107110+--------------+---------+---------+---------+---------+---------+---------+---------+---------+
108111| Partition_3 | ✕ | ✓ | ✕ | ✓ | ✕ | ✕ | ✓ | ✕ |
109112+--------------+---------+---------+---------+---------+---------+---------+---------+---------+
110- | {default} | ✕ | ✕ | ✓ | ✕ | ✕ | ✕ | ✕ | ✓ |
113+ | {default} | ✕ | ✓ | ✓ | ✕ | ✕ | ✕ | ✕ | ✓ |
111114+--------------+---------+---------+---------+---------+---------+---------+---------+---------+
112115
113116The following table provides the communication matrix for the given example:
@@ -123,7 +126,7 @@ The following table provides the communication matrix for the given example:
123126+ +---------+---------+---------+---------+---------+
124127| | Subs_33 | ✕ | ✓ | ✕ | ✓ |
125128+ +---------+---------+---------+---------+---------+
126- | | Subs_34 | ✕ | ✕ | ✓ | ✕ |
129+ | | Subs_34 | ✕ | ✓ | ✓ | ✕ |
127130+----------------+---------+---------+---------+---------+---------+
128131
129132The following piece of code shows the set of parameters needed for the use case depicted in this example.
0 commit comments