RTI Connext C API
Version 6.0.0
|
Defines the rules for determining whether the type used to publish a given topic is consistent with that used to subscribe to it. More...
Data Fields | |
DDS_TypeConsistencyKind | kind |
Type consistency kind. | |
DDS_Boolean | ignore_sequence_bounds |
Controls whether sequence bounds are taken into consideration for type assignability. | |
DDS_Boolean | ignore_string_bounds |
Controls whether string bounds are taken into consideration for type assignability. | |
DDS_Boolean | ignore_member_names |
Controls whether member names are taken into consideration for type assignability. | |
DDS_Boolean | prevent_type_widening |
Controls whether type widening is allowed. | |
DDS_Boolean | force_type_validation |
Controls whether type information must be available in order to complete matching between a DDS_DataWriter and a DDS_DataReader. | |
DDS_Boolean | ignore_enum_literal_names |
Controls whether enumeration constant names are taken into consideration for type assignability. | |
Defines the rules for determining whether the type used to publish a given topic is consistent with that used to subscribe to it.
This policy defines a type consistency kind, which allows applications to select from among a set of predetermined behaviors. The following consistency kinds are specified: DDS_DISALLOW_TYPE_COERCION, DDS_ALLOW_TYPE_COERCION and DDS_AUTO_TYPE_COERCION.
The type-consistency-enforcement rules consist of two steps:
Step 1. If both the DataWriter and DataReader specify a TypeObject, it is considered first. If the DataReader allows type coercion, then its type must be assignable from the DataWriter's type, taking into account the values of prevent_type_widening, ignore_sequence_bounds, ignore_string_bounds, ignore_member_names, and ignore_enum_literal_names. If the DataReader does not allow type coercion, then its type must be equivalent to the type of the DataWriter.
Step 2. If either the DataWriter or the DataReader does not provide a TypeObject definition, then the registered type names are examined. The DataReader's and DataWriter's registered type names must match exactly, as was true in RTI Connext releases prior to 5.0.0.
If either Step 1 or Step 2 fails, the Topics associated with the DataReader and DataWriter are considered to be inconsistent and the DDS_InconsistentTopicStatus is updated.
The default enforcement kind is DDS_AUTO_TYPE_COERCION. This default kind translates to DDS_ALLOW_TYPE_COERCION except in the following cases:
For additional information on type consistency enforcement refer to the Addendum for Extensible Types and the OMG Extensible and Dynamic Topic Types for DDS Specification.
DDS_TypeConsistencyKind DDS_TypeConsistencyEnforcementQosPolicy::kind |
Type consistency kind.
[default] DDS_AUTO_TYPE_COERCION
DDS_Boolean DDS_TypeConsistencyEnforcementQosPolicy::ignore_sequence_bounds |
Controls whether sequence bounds are taken into consideration for type assignability.
If the option is set to DDS_BOOLEAN_TRUE, then sequence bounds (maximum lengths) are not considered as part of the type assignability. This means that a T2 sequence type with maximum length L2 would be assignable to a T1 sequence type with maximum length L1, even if L2 is greater than L1. If the option is set to DDS_BOOLEAN_FALSE, then sequence bounds are taken into consideration for type assignability, and in order for T1 to be assignable from T2, it is required that L1 >= L2.
[default] DDS_BOOLEAN_FALSE
DDS_Boolean DDS_TypeConsistencyEnforcementQosPolicy::ignore_string_bounds |
Controls whether string bounds are taken into consideration for type assignability.
If the option is set to DDS_BOOLEAN_TRUE, then string bounds (maximum lengths) are not considered as part of the type assignability. This means that a T2 string type with maximum length L2 would be assignable to a T1 string type with maximum length L1, even if L2 is greater than L1. If the option is set to DDS_BOOLEAN_FALSE, then string bounds are taken into consideration for type assignability, and in order for T1 to be assignable from T2, it is required that L1 >= L2.
[default] DDS_BOOLEAN_FALSE
DDS_Boolean DDS_TypeConsistencyEnforcementQosPolicy::ignore_member_names |
Controls whether member names are taken into consideration for type assignability.
If the option is set to DDS_BOOLEAN_TRUE, then member names are not considered as part of the type assignability. If the option is set to DDS_BOOLEAN_FALSE, then member names are taken into consideration for type assignability, and in order for members with the same ID to be assignable, the members must also have the same name.
[default] DDS_BOOLEAN_FALSE
DDS_Boolean DDS_TypeConsistencyEnforcementQosPolicy::prevent_type_widening |
Controls whether type widening is allowed.
If the option is set to DDS_BOOLEAN_FALSE, then type widening is permitted. If the option is set to DDS_BOOLEAN_TRUE, then a wider type may not be assignable from a narrower type.
[default] DDS_BOOLEAN_FALSE
DDS_Boolean DDS_TypeConsistencyEnforcementQosPolicy::force_type_validation |
Controls whether type information must be available in order to complete matching between a DDS_DataWriter and a DDS_DataReader.
If the option is set to DDS_BOOLEAN_TRUE, then type information must be available in order to complete matching between a DDS_DataWriter and a DDS_DataReader. If the option is set to DDS_BOOLEAN_FALSE, then matching can occur without complete type information as long as the type names match exactly. Note that if the types have the same name but are not assignable, DataReaders may fail to deserialize incoming data samples.
[default] DDS_BOOLEAN_FALSE
DDS_Boolean DDS_TypeConsistencyEnforcementQosPolicy::ignore_enum_literal_names |
Controls whether enumeration constant names are taken into consideration for type assignability.
If the option is set to DDS_BOOLEAN_TRUE, then enumeration constants may change their names, but not their values, and still maintain assignability. If the option is set to DDS_BOOLEAN_FALSE, then in order for enumerations to be assignable, any constant that has the same value in both enumerations must also have the same name.
[default] DDS_BOOLEAN_FALSE