![]() |
OpenSplice ISO C++ 2 DCPS
v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
#include "CorePolicy.hpp"
Public Member Functions | |
Partition (const std::string &name="") | |
Partition (const dds::core::StringSeq &names) | |
Partition (const Partition &other) | |
Partition & | name (const std::string &name) |
Partition & | name (const dds::core::StringSeq &names) |
const dds::core::StringSeq | name () const |
bool | operator!= (const Value &other) const |
D * | operator-> () |
const D * | operator-> () const |
bool | operator== (const Value &other) const |
This QosPolicy specifies the logical partitions in which the Subscribers and Publishers are active.
Value | Meaning | Concerns | RxO | Changeable |
---|---|---|---|---|
A string sequence: name | A sequence of strings that introduces a logical partition among the topics visible by the Publisher and Subscriber. A DataWriter within a Publisher only communicates with a DataReader in a Subscriber if (in addition to matching the Topic and having compatible QoS) the Publisher and Subscriber have a common partition name string. The empty string ("") is considered a valid partition that is matched with other partition names using the same rules of string matching and regular- expression matching used for any other partition name. The default value for the PARTITION QoS is a zero-length sequence. The zero-length sequence is treated as a special value equivalent to a sequence containing a single element consisting of the empty string. | Publisher, Subscriber | No | Yes |
This policy allows the introduction of a logical partition concept inside the ‘physical’ partition induced by a domain. For a DataReader to see the changes made to an instance by a DataWriter, not only the Topic must match, but also they must share a common partition. Each string in the list that defines this QoS policy defines a partition name. A partition name may contain wildcards. Sharing a common partition means that one of the partition names matches.
Failure to match partitions is not considered an “incompatible” QoS and does not trigger any listeners nor conditions.
This policy is changeable. A change of this policy can potentially modify the “match” of existing DataReader and DataWriter entities. It may establish new “matches” that did not exist before, or break existing matches.
PARTITION names can be regular expressions and include wildcards as defined by the POSIX fnmatch API (1003.2-1992 section B.6). Either Publisher or Subscriber may include regular expressions in partition names, but no two names that both contain wildcards will ever be considered to match. This means that although regular expressions may be used both at Publisher as well as Subscriber side, the service will not try to match two regular expressions (between publishers and subscribers).
Partitions are different from creating Entity objects in different domains in several ways. First, entities belonging to different domains are completely isolated from each other; there is no traffic, meta-traffic or any other way for an application or the Service itself to see entities in a domain it does not belong to. Second, an Entity can only belong to one domain whereas an Entity can be in multiple partitions. Finally, as far as the DDS Service is concerned, each unique data instance is identified by the tuple (domainId, Topic, key). Therefore two Entity objects in different domains cannot refer to the same data instance. On the other hand, the same data-instance can be made available (published) or requested (subscribed) on one or more partitions.
Definition at line 529 of file CorePolicy.hpp.
|
explicit |
Creates a Partition QoS instance
name | partition name |
Definition at line 420 of file CorePolicyImpl.hpp.
|
explicit |
Creates a Partition QoS instance
names | a sequence containing multiple partition names |
Definition at line 426 of file CorePolicyImpl.hpp.
dds::core::policy::Partition::Partition | ( | const Partition & | other | ) |
Copies a Partition QoS instance
other | the Partition QoS instance to copy |
Definition at line 432 of file CorePolicyImpl.hpp.
Partition & dds::core::policy::Partition::name | ( | const std::string & | name | ) |
Sets the partition name
name | the partition name |
Definition at line 439 of file CorePolicyImpl.hpp.
Partition & dds::core::policy::Partition::name | ( | const dds::core::StringSeq & | names | ) |
Sets multiple partition names
names | a sequence containing multiple partition names |
Definition at line 447 of file CorePolicyImpl.hpp.
const dds::core::StringSeq dds::core::policy::Partition::name | ( | ) | const |
Gets the partition names
Definition at line 455 of file CorePolicyImpl.hpp.
|
inherited |
|
inherited |
The operator->() is provided to be able to directly invoke functions on the delegate.
The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Value and on all its subclasses as follows:
|
inherited |
The operator->() is provided to be able to directly invoke functions on the delegate.
The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Value and on all its subclasses as follows:
|
inherited |