RTI Connext Modern C++ API  Version 6.0.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dds::core::policy::Deadline Class Reference

Expresses the maximum duration (deadline) within which an instance is expected to be updated. More...

#include <dds/core/policy/CorePolicy.hpp>

Public Member Functions

 Deadline ()
 Creates the default deadline, with an infinite period.
 
 Deadline (const dds::core::Duration &d)
 Creates a deadline policy with the specified period.
 
Deadlineperiod (const dds::core::Duration &the_period)
 Sets the duration of the deadline period.
 
const dds::core::Duration period () const
 Getter (see setter with the same name)
 

Detailed Description

Expresses the maximum duration (deadline) within which an instance is expected to be updated.

A dds::sub::DataReader expects a new sample updating the value of each instance at least once every period. That is, period specifies the maximum expected elapsed time between arriving data samples.

A dds::pub::DataWriter indicates that the application commits to write a new value (using the dds::pub::DataWriter) for each instance managed by the dds::pub::DataWriter at least once every period.

This QoS can be used during system integration to ensure that applications have been coded to meet design specifications.

It can also be used during run time to detect when systems are performing outside of design specifications. Receiving applications can take appropriate actions to prevent total system failure when data is not received in time. For topics on which data is not expected to be periodic, period should be set to an infinite value.

Entity:
dds::topic::Topic, dds::sub::DataReader, dds::pub::DataWriter
Status:
dds::core::status::StatusMask::offered_deadline_missed(), dds::core::status::StatusMask::requested_deadline_missed(), dds::core::status::StatusMask::offered_incompatible_qos(), dds::core::status::StatusMask::requested_incompatible_qos()
Properties:
RxO = YES
Changeable = YES

Usage

This policy is useful for cases where a dds::topic::Topic is expected to have each instance updated periodically. On the publishing side this setting establishes a contract that the application must meet. On the subscribing side the setting establishes a minimum requirement for the remote publishers that are expected to supply the data values.

When RTI Connext 'matches' a dds::pub::DataWriter and a dds::sub::DataReader it checks whether the settings are compatible (i.e., offered deadline <= requested deadline); if they are not, the two entities are informed (via the Listener or dds::core::cond::Condition mechanism) of the incompatibility of the QoS settings and communication will not occur.

Assuming that the reader and writer ends have compatible settings, the fulfilment of this contract is monitored by RTI Connext and the application is informed of any violations by means of the proper Listener or dds::core::cond::Condition.

Compatibility

The value offered is considered compatible with the value requested if and only if the inequality offered period <= requested period holds.

Consistency

The setting of the DEADLINE policy must be set consistently with that of the TIME_BASED_FILTER.

For these two policies to be consistent the settings must be such that deadline period >= minimum_separation.

An attempt to set these policies in an inconsistent manner will result in dds::core::InconsistentPolicyError in set_qos (abstract), or the dds::core::Entity will not be created.

For a dds::sub::DataReader, the DEADLINE policy and dds::core::policy::TimeBasedFilter may interact such that even though the dds::pub::DataWriter is writing samples fast enough to fulfill its commitment to its own deadline, the dds::sub::DataReader may see violations of its deadline. This happens because RTI Connext will drop any samples received within the dds::core::policy::TimeBasedFilter::minimum_separation. To avoid triggering the dds::sub::DataReader's deadline, even though the matched dds::pub::DataWriter is meeting its own deadline, set the two QoS parameters so that:

reader deadline >= reader minimum_separation + writer deadline

See dds::core::policy::TimeBasedFilter for more information about the interactions between deadlines and time-based filters.

See Also
dds::core::policy::TimeBasedFilter

Constructor & Destructor Documentation

dds::core::policy::Deadline::Deadline ( )
inline

Creates the default deadline, with an infinite period.

dds::core::policy::Deadline::Deadline ( const dds::core::Duration d)
inlineexplicit

Creates a deadline policy with the specified period.

Member Function Documentation

Deadline& dds::core::policy::Deadline::period ( const dds::core::Duration the_period)
inline

Sets the duration of the deadline period.

[default] dds::core::Duration::infinite()

[range] [1 nanosec, 1 year] or dds::core::Duration::infinite(), >= dds::core::policy::TimeBasedFilter::minimum_separation

const dds::core::Duration dds::core::policy::Deadline::period ( ) const
inline

Getter (see setter with the same name)


RTI Connext Modern C++ API Version 6.0.0 Copyright © Sun Mar 3 2019 Real-Time Innovations, Inc