https://download.csdn.net/download/eidolon_foot/12568768
12. TIME_BASED_FILTER OpenDDS Developer's Guide(OpenDDS Version 3.14) The TIME_BASED_FILTER QoS policy controls how often a data reader may be interested in changes in values to a data instance. Here is the IDL for the Time Based Filter QoS: TIME_BASED_FILTER QoS策略控制数据读取器可能对数据实例的值更改感兴趣的频率。 这是基于时间的过滤器QoS的IDL: struct TimeBasedFilterQosPolicy { Duration_t minimum_separation; }; An interval ( minimum_separation ) may be specified on the data reader. This interval defines a minimum delay between instance value changes; this permits the data reader to throttle changes without affecting the state of the associated data writer. By default, minimum_separation is zero, which indicates that no data is filtered. This QoS policy does not conserve bandwidth as instance value changes are still sent to the subscriber process. It only affects which samples are made available via the data reader. 可以在数据读取器上指定一个间隔(minimum_separation)。 此间隔定义实例值更改之间的最小延迟; 这允许数据读取器在不影响相关数据写入器状态的情况下限制更改。 默认情况下,minimum_separation为零,表示没有数据被过滤。 此QoS策略不节省带宽,因为实例值更改仍被发送到订户进程。 它仅影响通过数据读取器提供哪些样本。 Data Distribution Service Version 1.4( formal/2015-04-10) This policy allows a DataReader to indicate that it does not necessarily want to see all values of each instance published under the Topic . Rather, it wants to see at most one change every minimum_separation period. 通过此策略,DataReader可以指示它不一定要查看在“主题”下发布的每个实例的所有值。 相反,它希望每个minimum_separation周期最多看到一个更改。 The TIME_BASED_FILTER applies to each instance separately, that is, the constraint is that the DataReader does not want to see more than one sample of each instance per minimum_separation period. TIME_BASED_FILTER分别应用于每个实例,也就是说,约束条件是DataReader不想在每个minimum_separation周期内看到每个实例的多个样本。 This setting allows a DataReader to further decouple itself from the DataWriter objects. It can be used to protect applications that are running on a heterogeneous network where some nodes are capable of generating data much faster than others can consume it. It also accommodates the fact that for fast-changing data different subscribers may have different requirements as to how frequently they need to be notified of the most current values. 此设置允许DataReader进一步将自身与DataWriter对象解耦。 它可用于保护在异构网络上运行的应用程序,在异构网络中,某些节点能够比其他节点消耗数据的速度快得多。 它还适应以下事实:对于快速变化的数据,不同的订户可能有不同的要求,即需要多长时间通知他们最新的值。 The setting of a TIME_BASED_FILTER, that is, the selection of a minimum_separation with a value greater than zero is compatible with all settings of the HISTORY and RELIABILITY QoS. The TIME_BASED_FILTER specifies the samples that are of interest to the DataReader . The HISTORY and RELIABILITY QoS affect the behavior of the middleware with respect to the samples that have been determined to be of interest to the DataReader , that is, they apply after the TIME_BASED_FILTER has been applied. TIME_BASED_FILTER的设置(即,选择大于零的minimum_separation)与“历史记录”和“可靠性QoS”的所有设置兼容。 TIME_BASED_FILTER指定DataReader感兴趣的样本。 历史和可靠性QoS会影响中间件相对于已确定为DataReader感兴趣的样本的行为,也就是说,它们在应用TIME_BASED_FILTER之后才应用。 In the case where the reliability QoS kind is RELIABLE then in steady-state, defined as the situation where the DataWriter does not write new samples for a period “long” compared to the minimum_separation, the system should guarantee delivery the last sample to the DataReader . 如果可靠性QoS类型为RELIABLE,然后处于稳定状态(定义为DataWriter与minimum_separation相比,DataWriter长时间不写新样本的情况),系统应保证将最后一个样本交付给DataReader 。 The setting of the TIME_BASED_FILTER minimum_separation must be consistent with the DEADLINE period . For these two QoS policies to be consistent they must verify that " period >= minimum_separation ." An attempt to set these policies in an inconsistent manner when an entity is created of via a set_qos operation will cause the operation to fail. TIME_BASED_FILTER minimum_separation的设置必须与DEADLINE周期一致。 为了使这两个QoS策略保持一致,它们必须验证“ period> = minimum_separation”。 通过set_qos操作创建实体时,尝试以不一致的方式设置这些策略将导致操作失败。