OpenSplice ISO C++ 2 DCPS  v7.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
dds::core::policy::TimeBasedFilter Class Reference

More...

#include "CorePolicy.hpp"

Inheritance diagram for dds::core::policy::TimeBasedFilter:
Inheritance graph

Public Member Functions

 TimeBasedFilter (const dds::core::Duration &period=dds::core::Duration::zero())
 
 TimeBasedFilter (const TimeBasedFilter &other)
 
TimeBasedFilterminimum_separation (const dds::core::Duration &period)
 
const dds::core::Duration minimum_separation () const
 
bool operator!= (const Value &other) const
 
D * operator-> ()
 
const D * operator-> () const
 
bool operator== (const Value &other) const
 

Detailed Description

This QosPolicy specifies a period after receiving a sample for a particular instance during which a DataReader will drop new samples for the same instance.Effectively the DataReader will receive at most one sample per period for each instance.

Attributes

Value Meaning Concerns RxO Changeable
A duration:
minimum_separation
Filter that allows a DataReader to specify that it is interested only in (potentially) a subset of the values of the data. The filter states that the DataReader does not want to receive more than one value each minimum_separation period, regardless of how fast the changes occur. At the end of the period the latest state of the instance will be notified and a new filter period will start. In the case there are no new samples in a period the filter will not notify the same latest already notified state and starts waiting for a new sample on this particular instance to start a new period. In the case where the reliability QoS kind is RELIABLE the system guarantees that the latest state is notified. Effectively the DataReader will receive at most one sample with the latest state per period for each instance. It is inconsistent for a DataReader to have a minimum_separation longer than its DEADLINE period. By default minimum_separation=0 indicating DataReader is potentially interested in all values. DataReader N/A Yes

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.

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.

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.

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 behaviour 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.

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.

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 via a set_qos operation will cause the operation to fail.

Definition at line 488 of file CorePolicy.hpp.

Constructor & Destructor Documentation

◆ TimeBasedFilter() [1/2]

dds::core::policy::TimeBasedFilter::TimeBasedFilter ( const dds::core::Duration period = dds::core::Duration::zero())
explicit

Creates a TimeBasedFilter QoS instance

Parameters
periodminimum separation period

Definition at line 399 of file CorePolicyImpl.hpp.

◆ TimeBasedFilter() [2/2]

dds::core::policy::TimeBasedFilter::TimeBasedFilter ( const TimeBasedFilter other)

Copies a TimeBasedFilter QoS instance

Parameters
otherthe TimeBasedFilter QoS instance to copy

Definition at line 402 of file CorePolicyImpl.hpp.

Member Function Documentation

◆ minimum_separation() [1/2]

TimeBasedFilter & dds::core::policy::TimeBasedFilter::minimum_separation ( const dds::core::Duration period)

Sets the minimum separation period

Parameters
periodminimum separation period

Definition at line 405 of file CorePolicyImpl.hpp.

◆ minimum_separation() [2/2]

const dds::core::Duration dds::core::policy::TimeBasedFilter::minimum_separation ( ) const

Gets the minimum separation period

Returns
minimum separation period

Definition at line 412 of file CorePolicyImpl.hpp.

◆ operator!=()

template<typename D >
bool dds::core::Value< D >::operator!= ( const Value< D > &  other) const
inherited

Compare this Value with another Value

Parameters
otherValue
Returns
true if not equal

Definition at line 99 of file Value.hpp.

◆ operator->() [1/2]

template<typename D >
D * dds::core::Value< D >::operator-> ( )
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:

my_dds_value.standard_function();
my_dds_value->vendor_specific_extension();
Returns
a reference to delegate.

Definition at line 111 of file Value.hpp.

◆ operator->() [2/2]

template<typename D >
const D * dds::core::Value< D >::operator-> ( ) const
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:

my_dds_value.standard_function();
my_dds_value->vendor_specific_extension();
Returns
a reference to delegate.

Definition at line 105 of file Value.hpp.

◆ operator==()

template<typename D >
bool dds::core::Value< D >::operator== ( const Value< D > &  other) const
inherited

Compare this Value with another Value

Parameters
otherValue
Returns
true if equal

Definition at line 93 of file Value.hpp.


The documentation for this class was generated from the following files: