RTI Connext .NET API (legacy)  Version 6.1.2
DDS::TypeConsistencyEnforcementQosPolicy Struct Reference

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

Detailed Description

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: DISALLOW_TYPE_COERCION, ALLOW_TYPE_COERCION and 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 AUTO_TYPE_COERCION. This default kind translates to ALLOW_TYPE_COERCION except in the following cases:

  • When the middleware is introspecting the built-in topic data declaration of a remote DataReader in order to determine whether it can match with a local DataWriter, if it observes that no TypeConsistencyEnforcementQosPolicy value is provided (as would be the case when communicating with a Service implementation not in conformance with this specification), it assumes a kind of DISALLOW_TYPE_COERCION.

For additional information on type consistency enforcement refer to the Extensible Types Guide and the OMG Extensible and Dynamic Topic Types for DDS Specification.

Entity:
DDS::DataReader
Properties:
RxO = N/A
Changeable = UNTIL ENABLE

Member Data Documentation

◆ kind

TypeConsistencyKind DDS::TypeConsistencyEnforcementQosPolicy::kind

Type consistency kind.

[default] AUTO_TYPE_COERCION

Property Documentation

◆ ignore_sequence_bounds

System:: Boolean DDS::TypeConsistencyEnforcementQosPolicy::ignore_sequence_bounds
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] true

◆ ignore_string_bounds

System:: Boolean DDS::TypeConsistencyEnforcementQosPolicy::ignore_string_bounds
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] true

◆ ignore_member_names

System:: Boolean DDS::TypeConsistencyEnforcementQosPolicy::ignore_member_names
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

◆ prevent_type_widening

System:: Boolean DDS::TypeConsistencyEnforcementQosPolicy::prevent_type_widening
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

◆ force_type_validation

System:: Boolean DDS::TypeConsistencyEnforcementQosPolicy::force_type_validation
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

◆ ignore_enum_literal_names

System:: Boolean DDS::TypeConsistencyEnforcementQosPolicy::ignore_enum_literal_names
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