DDS QoS - LIFESPAN

    技术2022-07-13  67

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

    16. LIFESPAN   OpenDDS Developer's Guide(OpenDDS Version 3.14) The LIFESPAN QoS policy allows the application to specify when a sample expires. Expired samples will not be delivered to subscribers. This policy applies to the topic and data writer entities via the lifespan member of their respective QoS structures. Below is the IDL related to the lifespan QoS policy. LIFESPAN QoS策略允许应用程序指定样本何时过期。 过期的样本将不会交付给订户。 此策略通过其各自QoS结构的 lifespan成员适用于主题和数据编写者实体。 以下是与寿命QoS策略相关的IDL。 struct LifespanQosPolicy { Duration_t duration; } The default value of the duration member is infinite, which means samples never expire. OpenDDS currently supports expired sample detection on the publisher side when using a DURABILITY kind other than VOLATILE . The current OpenDDS implementation may not remove samples from the data writer and data reader caches when they expire after being placed in the cache. 持续时间成员的默认值是无限的,这意味着样本永不过期。 当使用除VOLATILE以外的DURABILITY类型时,OpenDDS当前支持发布者端的过期样本检测。 当前的OpenDDS实现可能在将样本放入缓存后过期后,无法从数据写入器和数据读取器缓存中删除它们。 The value of this policy may be changed at any time. Changes to this policy affect only data written after the change. 该政策的值可以随时更改。 对此策略的更改仅影响更改后写入的数据。   Data Distribution Service Version 1.4( formal/2015-04-10)   The purpose of this QoS is to avoid delivering “stale” data to the application. 此QoS的目的是避免将“陈旧的”数据传递给应用程序。   Each data sample written by the DataWriter has an associated ‘expiration time’ beyond which the data should not be delivered to any application. Once the sample expires, the data will be removed from the DataReader caches as well as from the transient and persistent information caches. DataWriter编写的每个数据样本都有一个关联的“过期时间”,超过该时间不应将数据传递给任何应用程序。 一旦样本过期,数据将从DataReader缓存以及瞬态和持久信息缓存中删除。 The ‘expiration time’ of each sample is computed by adding the duration specified by the LIFESPAN QoS to the source timestamp . As described in 2.2.2.4.2.11 and 2.2.2.4.2.12 the source timestamp is either automatically computed by the Service each time the DataWriter write operation is called, or else supplied by the application by means of the write_w_timestamp operation. 每个样本的“到期时间”是通过将LIFESPAN QoS指定的持续时间添加到源时间戳中来计算的。 如2.2.2.4.2.11和2.2.2.4.2.12所述,每次服务调用DataWriter写操作时,源时间戳都会由Service自动计算,或者由应用程序通过write_w_timestamp操作提供。 This QoS relies on the sender and receiving applications having their clocks sufficiently synchronized. If this is not the case and the Service can detect it, the DataReader is allowed to use the reception timestamp instead of the source timestamp in its computation of the ‘expiration time.’ 此QoS依赖于其时钟充分同步的发送方和接收方应用程序。 如果不是这种情况,并且服务可以检测到它,则允许DataReader在计算“过期时间”时使用接收时间戳,而不是源时间戳。  
    Processed: 0.008, SQL: 9