https://download.csdn/download/eidolon_foot/12568768

6. PRESENTATION

OpenDDS:

The PRESENTATION QoS policy controls how changes to instances by publishers are presented to data readers. It affects the relative ordering of these changes and the scope of this ordering. Additionally, this policy introduces the concept of coherent change sets. Here is the IDL for the Presentation QoS:

表示QoS策略控制如何将发布者对实例所做的更改呈现给数据读取器。它会影响这些更改的相对顺序和顺序的范围。此外,此策略引入了一致性变更集的概念。以下是演示QoS的IDL:

enum PresentationQosPolicyAccessScopeKind { INSTANCE_PRESENTATION_QOS, TOPIC_PRESENTATION_QOS, GROUP_PRESENTATION_QOS }; struct PresentationQosPolicy { PresentationQosPolicyAccessScopeKind access_scope; boolean coherent_access; boolean ordered_access; }; The scope of these changes (access_scope) specifies the level in which an application may be made aware: 这些更改的范围(access_scope)指定了应用程序可以感知的级别: – INSTANCE_PRESENTATION_QOS (the default) indicates that changes occur to instances independently. Instance access essentially acts as a no-op with respect to coherent_access and ordered_access. Setting either of these values to true has no observable affect within the subscribing application. –INSTANCE_PRESENTATION_QOS(默认值)表示实例的更改是独立发生的。实例访问本质上是对一致性访问和有序访问的no-op。将这些值设置为true在订阅应用程序中没有明显的影响。 – TOPIC_PRESENTATION_QOS indicates that accepted changes are limited to all instances within the same data reader or data writer. –TOPIC_PRESENTATION_QOS表示接受的更改仅限于同一数据读取器或数据写入器中的所有实例。 – GROUP_PRESENTATION_QOS indicates that accepted changes are limited to all instances within the same publisher or subscriber. –GROUP_PRESENTATION_QOS表示接受的更改仅限于同一发布服务器或订阅服务器内的所有实例。 Coherent changes (coherent_access) allow one or more changes to an instance be made available to an associated data reader as a single change. If a data reader does not receive the entire set of coherent changes made by a publisher, then none of the changes are made available. The semantics of coherent changes are similar in nature to those found in transactions provided by many relational databases. By default, coherent_access is false. 一致的变更(一致的存取)允许一个实例的一个或多个变更作为单一变更提供给相关的资料阅读器。如果数据读取器没有接收到发布者所做的全部一致更改,则所有更改都不可用。一致变化的语义本质上与许多关系数据库提供的事务中的语义相似。默认情况下,consistent_access为false。 Changes may also be made available to associated data readers in the order sent by the publisher (ordered_access). This is similar in nature to the DESTINATION_ORDER QoS policy,however ordered_access permits data to be ordered independently of instance ordering. By default, ordered_access is false. 也可以按发布者发送的顺序(按顺序访问)向关联的数据读取器提供更改。这在本质上类似于目的地的顺序QoS策略,但是有序的访问允许数据独立于实例排序进行排序。默认情况下,有序访问为false。 Note
This policy controls the ordering and scope of samples made available to the subscriber, but the subscriber application must use the proper logic in reading samples to guarantee the requested behavior. For more details, see Section 2.2.2.5.1.9 of the Version 1.4 DDS Specification.
注意
此策略控制提供给订阅服务器的示例的顺序和范围,但是订阅服务器应用程序必须在读取示例时使用正确的逻辑来保证请求的行为。有关详细信息,请参阅1.4版DDS规范的第2.2.2.5.1.9节。
  formal/2015-04-10: This QoS policy controls the extent to which changes to data-instances can be made dependent on each other and also the kind of dependencies that can be propagated and maintained by the Service. 这种QoS策略控制对数据实例的更改可以相互依赖的程度,以及服务可以传播和维护的依赖类型。 The setting of coherent_access controls whether the Service will preserve the groupings of changes made by the publishing application by means of the operations begin_coherent_change and end_coherent_change. coherent_access的设置控制服务是否通过begin_coherent_change和end_coherent_change操作来保存发布应用程序所做的更改分组。 The setting of ordered_access controls whether the Service will preserve the order of changes. 有序访问的设置控制服务是否保留更改顺序。 The granularity is controlled by the setting of the access_scope . 粒度由访问范围的设置控制。 If coherent_access is set, then the access_scope controls the maximum extent of coherent changes. The behavior is as follows: 如果设置了一致的访问,则访问范围控制一致更改的最大范围。其行为如下: If access_scope is set to INSTANCE, the use of begin_coherent_change and end_coherent_change has no effect on how the subscriber can access the data because with the scope limited to each instance, changes to separate instances are considered independent and thus cannot be grouped by a coherent change. •如果access_scope设置为INSTANCE,那么使用begin_coherent_change和end_coherent_change对订阅者访问数据的方式没有影响,因为作用域仅限于每个实例,对单独实例的更改被视为独立的,因此不能通过一致性更改进行分组。 If access_scope is set to TOPIC, then coherent changes (indicated by their enclosure within calls to begin_coherent_change and end_coherent_change ) will be made available as such to each remote DataReader independently. That is, changes made to instances within each individual DataWriter will be available as coherent with respect to other changes to instances in that same DataWriter , but will not be grouped with changes made to instances belonging to a different DataWriter . •如果access_scope设置为TOPIC,则一致性更改(由其在begin_coherent_change和end_coherent_change的调用中的范围指示)将独立地提供给每个远程数据读取器。也就是说,对每个单独DataWriter中实例所做的更改将与对同一DataWriter中实例的其他更改一致,但不会与对属于不同DataWriter的实例所做的更改分组。 If access_scope is set to GROUP, then coherent changes made to instances through a DataWriter attached to a common Publisher are made available as a unit to remote subscribers. •如果access_scope设置为GROUP,则通过连接到commonPublisher的DataWriter对实例所做的一致更改作为一个单元提供给远程订阅者。 If ordered_access is set, then the access_scope controls the maximum extent for which order will be preserved by the Service. 如果设置了有序访问,则访问范围控制服务将为其保留顺序的最大范围。 If access_scope is set to INSTANCE (the lowest level), then changes to each instance are considered unordered relative to changes to any other instance. That means that changes (creations, deletions, modifications) made to two instances are not necessarily seen in the order they occur. This is the case even if it is the same application thread making the changes using the same DataWriter . •如果access_scope设置为INSTANCE(最低级别),则相对于对任何其他实例的更改,对每个实例的更改都被视为无序的。这意味着对两个实例所做的更改(创建、删除、修改)不一定按发生的顺序来查看。即使是同一个应用程序线程使用同一个DataWriter进行更改,也是如此。 If access_scope is set to TOPIC, changes (creations, deletions, modifications) made by a single DataWriter are made available to subscribers in the same order they occur. Changes made to instances through different DataWriter entities are not necessarily seen in the order they occur. This is the case, even if the changes are made by a single application thread using DataWriter objects attached to the same Publisher . •如果access_scope设置为TOPIC,则单个DataWriter所做的更改(创建、删除、修改)将以相同的顺序提供给订阅服务器。通过不同的DataWriter实体对实例所做的更改不一定按发生的顺序显示。即使更改是由单个应用程序线程使用附加到同一发布服务器的DataWriter对象进行的,也是如此。 Finally, if access_scope is set to GROUP, changes made to instances via DataWriter entities attached to the same Publisher object are made available to subscribers on the same order they occur. •最后,如果access_scope设置为GROUP,则通过附加到同一Publisher对象的DataWriter实体对实例所做的更改将以发生的相同顺序提供给订阅服务器。 Note that this QoS policy controls the scope at which related changes are made available to the subscriber. This means the subscriber can access the changes in a coherent manner and in the proper order; however, it does not necessarily imply that the Subscriber will indeed access the changes in the correct order. For that to occur, the application at the subscriber end must use the proper logic in reading the DataReader objects, as described in 2.2.2.5.1, Access to the data. 请注意,此QoS策略控制向订阅服务器提供相关更改的范围。这意味着订阅者可以以一致的方式以适当的顺序访问更改;但是,并不一定意味着订阅者确实会以正确的顺序访问更改。为了实现这一点,订阅服务器端的应用程序必须使用正确的逻辑来读取DataReader对象,如2.2.2.5.1“数据访问”所述。 The value offered is considered compatible with the value requested if and only if the following conditions are met: 当且仅当满足以下条件时,所提供的值才被视为与请求值兼容: 1 The inequality “offered access_scope >= requested access_scope ” evaluates to ‘TRUE.’ For the purposes of this inequality, the values of PRESENTATION access_scope are considered ordered such that INSTANCE < TOPIC < GROUP. 1 不等式“provided access_scope>=required access_scope”的计算结果为“TRUE”。出于该不等式的目的,PRESENTATION access_scope的值被认为是有序的,因此INSTANCE<TOPIC<GROUP。 2 Requested coherent_access is FALSE, or else both offered and requested coherent_access are TRUE. 2 请求的一致性访问为FALSE,否则提供的和请求的一致性访问都为TRUE。 3 Requested ordered_access is FALSE, or else both offered and requested ordered _access are TRUE. 3 请求的有序访问为FALSE,否则提供的和请求的有序访问都为TRUE。      

更多推荐

DDS QoS - PRESENTATION