https://download.csdn.net/download/eidolon_foot/12568768
13. PARTITION OpenDDS Developer's Guide(OpenDDS Version 3.14) The PARTITION QoS policy allows the creation of logical partitions within a domain. It only allows data readers and data writers to be associated if they have matched partition strings. PARTITION QoS策略允许在域内创建逻辑分区。 如果它们具有匹配的分区字符串,则仅允许数据读取器和数据写入器关联。 This policy applies to the publisher and subscriber entities via the partition member of their respective QoS structures. Below is the IDL related to the partition QoS policy. 此策略通过发布者和订阅者实体各自QoS结构的分区成员来应用。 以下是与分区QoS策略相关的IDL。 struct PartitionQosPolicy { StringSeq name; }; The name member defaults to an empty sequence of strings. The default partition name is an empty string and causes the entity to participate in the default partition. The partition names may contain wildcard characters as defined by the POSIX fnmatch function (POSIX 1003.2-1992 section B.6). 名称成员默认为空字符串序列。 默认分区名称是一个空字符串,使实体参与默认分区。 分区名称可以包含POSIX fnmatch函数定义的通配符(POSIX 1003.2-1992第B.6节)。 The establishment of data reader and data writer associations depends on matching partition strings on the publication and subscription ends. Failure to match partitions is not considered a failure and does not trigger any callbacks or set any status values. 数据读取器和数据写入器关联的建立取决于发布和预订端上匹配的分区字符串。 未能匹配分区不会被视为失败,并且不会触发任何回调或设置任何状态值。 The value of this policy may be changed at any time. Changes to this policy may cause associations to be removed or added. 该政策的价值可以随时更改。 对此政策的更改可能会导致删除或添加关联。 Data Distribution Service Version 1.4( formal/2015-04-10) 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. 为了使DataReader看到DataWriter对实例所做的更改,不仅主题必须匹配,而且它们还必须共享一个公共分区。 列表中定义此QoS策略的每个字符串都定义一个分区名称。 分区名称可能包含通配符。 共享公共分区意味着分区名称之一匹配。 Failure to match partitions is not considered an “incompatible” QoS and does not trigger any listeners nor conditions. 未能匹配分区不被视为“不兼容” QoS,并且不会触发任何侦听器或条件。 This policy is changeable. A change of this policy can potentially modify the “match” of existing DataReader and DataWriter entities. It may establish new “matchs” that did not exist before, or break existing matchs. 此政策是可变的。 更改此策略可能会修改现有DataReader和DataWriter实体的“匹配”。 它可能会建立以前不存在的新“匹配”,或者破坏现有的匹配。 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). PARTITION名称可以是正则表达式,并且可以包含POSIX fnmatch API(1003.2-1992 B.6节)所定义的通配符。 发布者或订阅者都可以在分区名称中包含正则表达式,但不会同时考虑两个都包含通配符的名称。 这意味着尽管可以在发布者和订户端都使用正则表达式,但是该服务将不会尝试匹配两个正则表达式(在发布者和订阅者之间)。 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. 域彼此完全隔离; 应用程序或服务本身无法通过流量、元流量或任何其他方式查看其不属于的域中的实体。 其次,一个实体只能属于一个域,而一个实体可以位于多个分区中。 最后,就DDS服务而言,每个唯一的数据实例都由元组(domainId,Topic,键)标识。 因此,不同域中的两个Entity对象不能引用相同的数据实例。 另一方面,可以在一个或多个分区上使相同的数据实例可用(发布)或请求(订阅)。