RTI Connext .Net APIs
Version 6.0.1
|
Defines the rules for determining whether the type used to publish a given topic is consistent with that used to subscribe to it. More...
#include <managed_infrastructure.h>
Static Public Member Functions | |
static System::String ^ | get_type_consistency_enforcement_qos_policy_name () |
Stringified human-readable name for DDS::TypeConsistencyEnforcementQosPolicy. More... | |
Public Attributes | |
TypeConsistencyKind | kind |
Type consistency kind. More... | |
Properties | |
System::Boolean | ignore_sequence_bounds [get, set] |
Controls whether sequence bounds are taken into consideration for type assignability. More... | |
System::Boolean | ignore_string_bounds [get, set] |
Controls whether string bounds are taken into consideration for type assignability. More... | |
System::Boolean | ignore_member_names [get, set] |
Controls whether member names are taken into consideration for type assignability. More... | |
System::Boolean | prevent_type_widening [get, set] |
Controls whether type widening is allowed. More... | |
System::Boolean | force_type_validation [get, set] |
Controls whether type information must be available in order to complete matching between a DDS::DataWriter and a DDS::DataReader. More... | |
System::Boolean | ignore_enum_literal_names [get, set] |
Controls whether enumeration constant names are taken into consideration for type assignability. More... | |
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::TypeConsistencyKind::DISALLOW_TYPE_COERCION, DDS::TypeConsistencyKind::ALLOW_TYPE_COERCION and DDS::TypeConsistencyKind::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::TypeConsistencyKind::AUTO_TYPE_COERCION. This default kind translates to DDS::TypeConsistencyKind::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.
TypeConsistencyKind DDS::TypeConsistencyEnforcementQosPolicy::kind |
Type consistency kind.
|
getset |
Controls whether sequence bounds are taken into consideration for type assignability.
If the option is set to 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 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] false
|
getset |
Controls whether string bounds are taken into consideration for type assignability.
If the option is set to 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 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] false
|
getset |
Controls whether member names are taken into consideration for type assignability.
If the option is set to true, then member names are not considered as part of the type assignability. If the option is set to 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] false
|
getset |
Controls whether type widening is allowed.
If the option is set to false, then type widening is permitted. If the option is set to true, then a wider type may not be assignable from a narrower type.
[default] false
|
getset |
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 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 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] false
|
getset |
Controls whether enumeration constant names are taken into consideration for type assignability.
If the option is set to true, then enumeration constants may change their names, but not their values, and still maintain assignability. If the option is set to 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] false