47.1 AVAILABILITY QosPolicy (DDS Extension)
This QoS policy configures the availability of data and it is used in the context of two features:
- Collaborative DataWriters (47.1.1 Availability QoS Policy and Collaborative DataWriters)
- Required Subscriptions (47.1.2 Availability QoS Policy and Required Subscriptions)
It contains the members listed in Table 47.1 DDS_AvailabilityQosPolicy.
Type |
Field Name |
Description |
DDS_Boolean |
enable_required_subscriptions |
Enables support for required subscriptions in a DataWriter. If set to TRUE, history kind must be KEEP_ALL and durability writer_depth must be left set to AUTO. For Collaborative DataWriters: Not applicable. For Required Subscriptions: See Table 47.4 Configuring Required Subscriptions with DDS_AvailabilityQosPolicy. |
struct |
max_data_availability_ |
Defines how much time to wait before delivering a DDS sample to the application without having received some of the previous DDS samples. For Collaborative DataWriters: See Table 47.3 Configuring Collaborative DataWriters with DDS_AvailabilityQosPolicy. For Required Subscriptions: Not applicable. |
struct |
max_endpoint_availability_ |
Defines how much time to wait to discover DataWriters providing DDS samples for the same data source. For Collaborative DataWriters: See Table 47.3 Configuring Collaborative DataWriters with DDS_AvailabilityQosPolicy. For Required Subscriptions: Not applicable. |
struct |
A sequence of endpoint groups, described in Table 47.2 struct DDS_EndpointGroup_t. For Collaborative DataWriters: See Table 47.3 Configuring Collaborative DataWriters with DDS_AvailabilityQosPolicy. For Required Subscriptions: See Table 47.4 Configuring Required Subscriptions with DDS_AvailabilityQosPolicy |
Type |
Field Name |
Description |
char * |
role_name |
Defines the role name of the endpoint group. If used in the AvailabilityQosPolicy on a DataWriter, it specifies the name that identifies a Required Subscription. |
int |
quorum_count |
Defines the minimum number of members that satisfies the endpoint group. If used in the AvailabilityQosPolicy on a DataWriter, it specifies the number of DataReaders with a specific role name that must acknowledge a DDS sample before the DDS sample is considered to be acknowledged by the Required Subscription. |
47.1.1 Availability QoS Policy and Collaborative DataWriters
The Collaborative DataWriters feature allows you to have multiple DataWriters publishing DDS samples from a common logical data source. The DataReaders will combine the DDS samples coming from the DataWriters in order to reconstruct the correct order at the source. The Availability QosPolicy allows you to configure the DDS sample combination (synchronization) process in the DataReader.
Each DDS sample published in a DDS domain for a given logical data source is uniquely identified by a pair (virtual GUID, virtual sequence number). DDS samples from the same data source (same virtual GUID) can be published by different DataWriters.
A DataReader will deliver a DDS sample (VGUIDn, VSNm) to the application if one of the following conditions is satisfied:
- (GUIDn, SNm-1) has already been delivered to the application.
- All the known DataWriters publishing VGUIDn have announced that they do not have (VGUIDn, VSNm-1).
- None of the known DataWriters publishing VGUIDn have announced potential availability of (VGUIDn, VSNm-1) and both timeouts in this QoS policy have expired.
A DataWriter announces potential availability of DDS samples by using virtual heartbeats. The frequency at which virtual heartbeats are sent is controlled by the protocol parameters virtual_heartbeat_period and samples_per_virtual_heartbeat (see Table 47.14 DDS_RtpsReliableWriterProtocol_t).
Table 47.3 Configuring Collaborative DataWriters with DDS_AvailabilityQosPolicy describes the fields of this policy when used for a Collaborative DataWriter.
For further information, see Chapter 37 Collaborative DataWriters (Maintain Global, Ordered Set of Samples).
Field Name |
Description for Collaborative DataWriters |
max_data_availability_ |
Defines how much time to wait before delivering a DDS sample to the application without having received some of the previous DDS samples. A DDS sample identified by (VGUIDn, VSNm) will be delivered to the application if this timeout expires for the DDS sample and the following two conditions are satisfied: None of the known DataWriters publishing VGUIDn have announced potential availability of (VGUIDn, VSNm-1). The DataWriters for all the endpoint groups specified in required_matched_endpoint_groups have been discovered or max_endpoint_availability_waiting_time has expired. |
max_endpoint_availability_ |
Defines how much time to wait to discover DataWriters providing DDS samples for the same data source. The set of endpoint groups that are required to provide DDS samples for a data source can be configured using required_matched_endpoint_groups. A non-consecutive DDS sample identified by (GUIDn, SNm) cannot be delivered to the application unless the DataWriters for all the endpoint groups in required_matched_endpoint_groups are discovered or this timeout expires. |
required_matched_ |
Specifies the set of endpoint groups that are expected to provide DDS samples for the same data source. The quorum count in a group represents the number of DataWriters that must be discovered for that group before the DataReader is allowed to provide non consecutive DDS samples to the application. A DataWriter becomes a member of an endpoint group by configuring the role_name in the DataWriter’s 47.11 ENTITY_NAME QosPolicy (DDS Extension). The DataWriters created by RTI Persistence Service have a predefined role_name of ‘PERSISTENCE_SERVICE’. For other DataWriters, the role_name is not set by default. |
47.1.2 Availability QoS Policy and Required Subscriptions
In the context of Required Subscriptions, the Availability QosPolicy can be used to configure a set of required subscriptions on a DataWriter.
Required Subscriptions are preconfigured, named subscriptions that may leave and subsequently rejoin the network from time to time, at the same or different physical locations. Any time a required subscription is disconnected, any DDS samples that would have been delivered to it are stored for delivery if and when the subscription rejoins the network.
Table 47.4 Configuring Required Subscriptions with DDS_AvailabilityQosPolicy describes the fields of this policy when used for a Required Subscription.
For further information, see 31.13 Required Subscriptions.
Field Name |
Description for Required Subscriptions |
enable_required_subscriptions |
Enables support for Required Subscriptions in a DataWriter. If set to TRUE, the 47.12 HISTORY QosPolicy kind must be KEEP_ALL, because not all samples can be guaranteed to be delivered to the required DataReaders if history kind is KEEP_LAST. Likewise, the 47.9 DURABILITY QosPolicy writer_depth must be left set to AUTO, because not all samples can be guaranteed to be delivered to the required DataReaders when writer_depth is limited. |
max_data_availability_ |
Not applicable to Required Subscriptions. |
required_matched_ |
A sequence of endpoint groups that specify the Required Subscriptions on a DataWriter. Each Required Subscription is specified by a name and a quorum count. The quorum count represents the number of DataReaders that have to acknowledge the DDS sample before it can be considered fully acknowledged for that Required Subscription. A DataReader is associated with a Required Subscription by configuring the role_name in the DataReader’s 47.11 ENTITY_NAME QosPolicy (DDS Extension). |
47.1.3 Properties
For DataWriters, all the members in this QosPolicy can be changed after the DataWriter is created except for the member enable_required_subscriptions.
For DataReaders, this QosPolicy cannot be changed after the DataReader is created.
There are no compatibility restrictions for how it is set on the publishing and subscribing sides.
47.1.4 Related QosPolicies
- 47.11 ENTITY_NAME QosPolicy (DDS Extension)
- 44.4 DOMAIN_PARTICIPANT_RESOURCE_LIMITS QosPolicy (DDS Extension)
- 47.9 DURABILITY QosPolicy
47.1.5 Applicable DDS Entities
47.1.6 System Resource Considerations
The resource limits for the endpoint groups in required_matched_endpoint_groups are determined by two values in the 44.4 DOMAIN_PARTICIPANT_RESOURCE_LIMITS QosPolicy (DDS Extension):
- max_endpoint_groups
- max_endpoint_group_cumulative_characters
The maximum number of virtual writers (identified by a virtual GUID) that can be managed by a DataReader is determined by the max_remote_virtual_writers in 48.2 DATA_READER_RESOURCE_LIMITS QosPolicy (DDS Extension). When the Subscriber’s access_scope is GROUP, max_remote_virtual_writers determines the maximum number of DataWriter groups supported by the Subscriber. Since the Subscriber may contain more than one DataReader, only the setting of the first applies.