|
RTI Connext Java API Version 7.7.0
|
XTypes compliance mask. More...
Static Public Attributes | |
| static final int | DHEADER_IN_NON_PRIMITIVE_COLLECTIONS_BIT |
| When this bit is set, the serialization of sequences and arrays with non-primitive members includes a DHEADER. More... | |
| static final int | ENUM_AS_PRIMITIVE_IN_COLLECTIONS_BIT |
| When this bit is set, enums are considered primitive types in collection types. More... | |
| static final int | PARAMETER_LENGTH_WITH_PADDING_BIT |
| When this bit is set, the length of a member header in a mutable type or an optional member will include padding bytes to a 4-byte boundary. More... | |
| static final int | ENCAPSULATION_OPTIONS_WITH_PADDING_BIT |
| When this bit is set, RTI Connext will set the padding bits in the options field of the encapsulation header of a serialized payload. More... | |
| static final int | ACCEPT_UNKNOWN_ENUM_VALUE_BIT |
| When this bit is set, samples containing an unknown enumerator can be successfully deserialized to the default enumeration value. More... | |
| static final int | ACCEPT_UNKNOWN_DISCRIMINATOR_BIT |
| When this bit is set, samples containing an unknown discriminator can be successfully deserialized, and the sample won't be dropped. More... | |
| static final int | SELECT_DEFAULT_DISCRIMINATOR_BIT |
| When this bit is set, samples containing a discriminator value that does not select any member in the union will be assigned the default discriminator value; if the bit is not set, the sample will preserve the discriminator value. More... | |
| static final int | SENTINEL_IN_EMPTY_UNION_BIT |
| When this bit is set, samples of a mutable union that contain an unknown discriminator will be serialized with a 4-byte sentinel value. More... | |
| static final int | INITIALIZE_DISCRIMINATOR_TO_DEFAULT_BIT |
| When this bit is set, the union discriminator will be initialized to the default value of its type. More... | |
| static final int | JAVA_KEYHASH_750_BIT |
| When this bit is set, the KeyHash calculation for a Java instance will match the one produced by the Java API in Connext 7.5.0 and earlier versions. More... | |
| static final int | PYTHON_INT8_730_BIT |
| Set this bit to interoperate with Connext 7.3.0 Python applications that published or subscribed to types with int8 members. More... | |
| static final int | MUST_UNDERSTAND_IN_KEY_AND_DISCRIMINATOR_BIT |
| When this bit is set, the parameter ID for members that are part of the key, or for the discriminator of a union, will have the parameter ID's FLAG_MUST_UNDERSTAND bit set when serialized using XCDR2. More... | |
| static final int | COMPLIANCE_MASK_VENDOR |
| XTypes vendor compliance mask. This value is fully aligned with the XTypes specification. More... | |
| static final int | COMPLIANCE_MASK_DEFAULT |
| Default XTypes compliance mask. More... | |
XTypes compliance mask.
The com.rti.ndds.config.Compliance.XTypesMask configures different aspects of the Extended CDR encoding (XCDR and XCDR2).
Applications that don't use the exact same XTypes compliance mask may not be interoperable.
By default, data serialization is not fully compliant with Extended CDR encoding. While this doesn't affect correctness, it may prevent interoperability with other vendors.
You can change the default compliance mask for an application using any of the following mechanisms:
The environment variable will be automatically loaded when a com.rti.dds.domain.DomainParticipantFactory is created. If you need to load it before that, use the function com.rti.ndds.config.Compliance.load_masks.
The format of the environment variable is an unsigned integer, which can be in HEX notation. For example: 0x00000001.
The default value is com.rti.ndds.config.Compliance.XTypesMask.XTypesMask.COMPLIANCE_MASK_DEFAULT.
To be fully compliant with the XTypes specification, set the mask to com.rti.ndds.config.Compliance.XTypesMask.XTypesMask.COMPLIANCE_MASK_VENDOR.
[default] com.rti.ndds.config.Compliance.XTypesMask.XTypesMask.COMPLIANCE_MASK_DEFAULT
When changing the mask for an application is not desired, the property dds.xtypes.compliance_mask will change the mask at the DomainParticipant or DataWriter level. When set in the DomainParticipant, it configures the mask for all DataWriters in the participant. See Extensible Types Compliance Mask in the RTI Connext Core Libraries Extensible Types Guide.
| XTypesMask | ( | ) |
Default constructor.
| XTypesMask | ( | XTypesMask | mask | ) |
| XTypesMask | ( | int | mask | ) |
Constructor.
| mask | int value of the mask. |
| int get | ( | ) |
Get the mask value.
Referenced by Compliance.set_xtypes_mask(), and Compliance.XTypesMask.XTypesMask().
| void set | ( | int | mask | ) |
Set the mask value.
| mask | The mask value. |
| void set_bit | ( | int | bit | ) |
Set a bit in the mask.
| bit | The bit to set. |
| void unset_bit | ( | int | bit | ) |
Unset a bit in the mask.
| bit | The bit to unset. |
| boolean is_dheader_in_non_primitive_collections_enabled | ( | ) |
Check if the bit com.rti.ndds.config.Compliance.XTypesMask.DHEADER_IN_NON_PRIMITIVE_COLLECTIONS_BIT is set.
References Compliance.XTypesMask.DHEADER_IN_NON_PRIMITIVE_COLLECTIONS_BIT.
| boolean is_enum_as_primitive_in_collections_enabled | ( | ) |
Check if the bit com.rti.ndds.config.Compliance.XTypesMask.ENUM_AS_PRIMITIVE_IN_COLLECTIONS_BIT is set.
References Compliance.XTypesMask.ENUM_AS_PRIMITIVE_IN_COLLECTIONS_BIT.
| boolean is_parameter_length_with_padding_enabled | ( | ) |
Check if the bit com.rti.ndds.config.Compliance.XTypesMask.PARAMETER_LENGTH_WITH_PADDING_BIT is set.
References Compliance.XTypesMask.PARAMETER_LENGTH_WITH_PADDING_BIT.
| boolean is_encapsulation_options_with_padding_enabled | ( | ) |
Check if the bit com.rti.ndds.config.Compliance.XTypesMask.ENCAPSULATION_OPTIONS_WITH_PADDING_BIT is set.
References Compliance.XTypesMask.ENCAPSULATION_OPTIONS_WITH_PADDING_BIT.
| boolean is_accept_unknown_enum_value_enabled | ( | ) |
Check if the bit com.rti.ndds.config.Compliance.XTypesMask.ACCEPT_UNKNOWN_ENUM_VALUE_BIT is set.
References Compliance.XTypesMask.ACCEPT_UNKNOWN_ENUM_VALUE_BIT.
| boolean is_accept_unknown_discriminator_enabled | ( | ) |
Check if the bit com.rti.ndds.config.Compliance.XTypesMask.ACCEPT_UNKNOWN_DISCRIMINATOR_BIT is set.
References Compliance.XTypesMask.ACCEPT_UNKNOWN_DISCRIMINATOR_BIT.
| boolean is_select_default_discriminator_enabled | ( | ) |
Check if the bit com.rti.ndds.config.Compliance.XTypesMask.SELECT_DEFAULT_DISCRIMINATOR_BIT is set.
References Compliance.XTypesMask.SELECT_DEFAULT_DISCRIMINATOR_BIT.
| boolean is_sentinel_in_empty_union_enabled | ( | ) |
Check if the bit com.rti.ndds.config.Compliance.XTypesMask.SENTINEL_IN_EMPTY_UNION_BIT is set.
References Compliance.XTypesMask.SENTINEL_IN_EMPTY_UNION_BIT.
| boolean is_initialize_discriminator_to_default_enabled | ( | ) |
Check if the bit com.rti.ndds.config.Compliance.XTypesMask.INITIALIZE_DISCRIMINATOR_TO_DEFAULT_BIT is set.
References Compliance.XTypesMask.INITIALIZE_DISCRIMINATOR_TO_DEFAULT_BIT.
| boolean is_java_key_hash_750_enabled | ( | ) |
Check if the bit com.rti.ndds.config.Compliance.XTypesMask.JAVA_KEYHASH_750_BIT is set.
References Compliance.XTypesMask.JAVA_KEYHASH_750_BIT.
| boolean is_python_int8_730_enabled | ( | ) |
Check if the bit com.rti.ndds.config.Compliance.NDDS_CONFIG_XTYPES_PYTHON_INT8_730_BIT is set.
References Compliance.XTypesMask.PYTHON_INT8_730_BIT.
| boolean is_must_understand_in_key_and_discriminator_enabled | ( | ) |
Check if the bit com.rti.ndds.config.Compliance.NDDS_CONFIG_XTYPES_MUST_UNDERSTAND_IN_KEY_AND_DISCRIMINATOR_BIT is set.
References Compliance.XTypesMask.MUST_UNDERSTAND_IN_KEY_AND_DISCRIMINATOR_BIT.
|
static |
When this bit is set, the serialization of sequences and arrays with non-primitive members includes a DHEADER.
Value: 0x00000001
To be compatible with the XTypes specification, this bit must be set.
This bit only applies to XCDR2 encoding.
Limitation: For FlatData, the compliant encoding is applied to arrays and sequences of mutable types, but not final types . The serialization of final types containing arrays of non-primitive types in the FlatData language binding is not compliant with Extended CDR encoding version 2 in any case.
This bit is unset by default. See com.rti.ndds.config.Compliance.XTypesMask.XTypesMask.COMPLIANCE_MASK_DEFAULT
Referenced by Compliance.XTypesMask.is_dheader_in_non_primitive_collections_enabled().
|
static |
When this bit is set, enums are considered primitive types in collection types.
Value: 0x00000002
A DHEADER will not be added to collections of enums if com.rti.ndds.config.Compliance.XTypesMask.DHEADER_IN_NON_PRIMITIVE_COLLECTIONS_BIT is set.
To be compatible with the XTypes specification, this bit must be unset.
This bit only applies to XCDR2 encoding.
This bit is unset by default. See com.rti.ndds.config.Compliance.XTypesMask.XTypesMask.COMPLIANCE_MASK_DEFAULT
Referenced by Compliance.XTypesMask.is_enum_as_primitive_in_collections_enabled().
|
static |
When this bit is set, the length of a member header in a mutable type or an optional member will include padding bytes to a 4-byte boundary.
Value: 0x00000004
To be compatible with the XTypes specification, this bit must be unset.
This bit only applies to XCDR encoding.
This bit is set by default. See com.rti.ndds.config.Compliance.XTypesMask.XTypesMask.COMPLIANCE_MASK_DEFAULT
Referenced by Compliance.XTypesMask.is_parameter_length_with_padding_enabled().
|
static |
When this bit is set, RTI Connext will set the padding bits in the options field of the encapsulation header of a serialized payload.
Value: 0x00000008
When this bit is set RTI Connext will set the least significant two bits in the second byte of the options field to a value that encodes the number of padding bytes needed after the end of the serialized payload in order to reach the next 4-byte aligned offset. Specifically, the least significant two bits shall be set to binary 00 if no padding bits would be needed and binary 01, 10, or 11 if, respectively, there would be one, two, or three bytes of padding needed. These bits in the options field will be interpreted by a DataReader to determine where the serialized data exactly ended.
To be compatible with the XTypes specification, this bit must be set.
To be compatible with the following Micro versions this bit must be unset because those versions of Micro did not support padding bits and will discard any data with encapsulations options not set to 0.
This bit applies to both, XCDR and XCDR2 encodings.
This bit is set by default. See com.rti.ndds.config.Compliance.XTypesMask.XTypesMask.COMPLIANCE_MASK_DEFAULT
Referenced by Compliance.XTypesMask.is_encapsulation_options_with_padding_enabled().
|
static |
When this bit is set, samples containing an unknown enumerator can be successfully deserialized to the default enumeration value.
Value: 0x00000010
To be compatible with the XTypes specification, this bit must be unset.
This bit is unset by default. See com.rti.ndds.config.Compliance.XTypesMask.XTypesMask.COMPLIANCE_MASK_DEFAULT
Referenced by Compliance.XTypesMask.is_accept_unknown_enum_value_enabled().
|
static |
When this bit is set, samples containing an unknown discriminator can be successfully deserialized, and the sample won't be dropped.
Value: 0x00000020
When this bit is set, samples containing an unknown discriminator won't be dropped, and the discriminator value assigned to the sample will depend on whether or not the bit com.rti.ndds.config.Compliance.XTypesMask.SELECT_DEFAULT_DISCRIMINATOR_BIT is set.
To be compatible with the XTypes specification, this bit must be set.
This bit is unset by default. See com.rti.ndds.config.Compliance.XTypesMask.XTypesMask.COMPLIANCE_MASK_DEFAULT
Referenced by Compliance.XTypesMask.is_accept_unknown_discriminator_enabled().
|
static |
When this bit is set, samples containing a discriminator value that does not select any member in the union will be assigned the default discriminator value; if the bit is not set, the sample will preserve the discriminator value.
Value: 0x00000040
When this bit is set, samples containing a discriminator value that does not select any member in the union will be assigned the default discriminator value. If the default value selects a valid union member, that member will be initialized to the default value of its type. If the bit is not set, the sample will preserve the discriminator value. The bit com.rti.ndds.config.Compliance.XTypesMask.INITIALIZE_DISCRIMINATOR_TO_DEFAULT_BIT determines what the default discriminator value is.
This bit is only relevant when the bit com.rti.ndds.config.Compliance.XTypesMask.ACCEPT_UNKNOWN_DISCRIMINATOR_BIT is set, and it is used to determine the value of the discriminator when the sample contains an unknown discriminator.
To be compatible with the XTypes specification, this bit must be unset.
This bit is unset by default. See com.rti.ndds.config.Compliance.XTypesMask.XTypesMask.COMPLIANCE_MASK_DEFAULT
Referenced by Compliance.XTypesMask.is_select_default_discriminator_enabled().
|
static |
When this bit is set, samples of a mutable union that contain an unknown discriminator will be serialized with a 4-byte sentinel value.
Value: 0x00000080
When this bit is set, samples of a mutable union that contain an unknown discriminator will be serialized with a 4-byte sentinel value: 0x027f0000. This is the same sentinel value as the one used for samples of a mutable union that contain a known discriminator.
This bit only applies to XCDR encoding, Dynamic Data, and language APIs other than Java. When using Java and not using Dynamic Data, the sentinel is always added.
To be compatible with the XTypes specification and with Connext version 5.3.x, this bit must be set.
This bit is set by default. See com.rti.ndds.config.Compliance.XTypesMask.XTypesMask.COMPLIANCE_MASK_DEFAULT
Referenced by Compliance.XTypesMask.is_sentinel_in_empty_union_enabled().
|
static |
When this bit is set, the union discriminator will be initialized to the default value of its type.
Value: 0x00000100
When this bit is set, the union discriminator will be initialized to the default value of its type. This means 0 for numeric discriminators, false for boolean discriminators, and the first literal of the enumeration for enumerated discriminators. As a result, a union may be initialized with a discriminator value that does not correspond to any of its members.
The default value of the type can be modified by creating an alias type and using the [default] annotation to specify the desired default value. You can then use that alias type as the discriminator type, and the default discriminator value will be the one specified in the alias type.
When this bit is unset, the discriminator will be set to select to a value that selects the default union member, if one is defined, or otherwise to the lowest value associated with any member.
If you generated code (using Code Generator) with this bit configured one way using the -xTypesComplianceMask flag (for example, -xTypesComplianceMask 0x00000100) and then configure it the opposite way in the API (for example, unset at 0x00000000), you must regenerate code using Code Generator's -xTypesComplianceMask flag configured the same way as it is in the API (for example, -xTypesComplianceMask 0x00000000). Note that this bit is the only bit that Code Generator uses; therefore, you have to set it the same both in the API and in Code Generator. See information about Code Generator's -xTypesComplianceMask command-line option in Command-Line Arguments for rtiddsgen, in the RTI Code Generator User's Manual.
This bit affects com.rti.ndds.config.Compliance.XTypesMask.SELECT_DEFAULT_DISCRIMINATOR_BIT. (See that bit's description above.)
To be compatible with the XTypes specification, this bit must be set.
This bit is set by default. See com.rti.ndds.config.Compliance.XTypesMask.XTypesMask.COMPLIANCE_MASK_DEFAULT
Referenced by Compliance.XTypesMask.is_initialize_discriminator_to_default_enabled().
|
static |
When this bit is set, the KeyHash calculation for a Java instance will match the one produced by the Java API in Connext 7.5.0 and earlier versions.
Value: 0x00000200
When this bit is set, the KeyHash calculation for a Java instance will match the one produced by the Java API in Connext 7.5.0 and earlier versions.
This affects KeyHash calculation only when using XCDR encoding and the Java language API for mutable types and either of the following conditions is met:
To be compatible with the XTypes specification, this bit must be unset.
This bit is unset by default. See com.rti.ndds.config.Compliance.XTypesMask.XTypesMask.COMPLIANCE_MASK_DEFAULT
Referenced by Compliance.XTypesMask.is_java_key_hash_750_enabled().
|
static |
Set this bit to interoperate with Connext 7.3.0 Python applications that published or subscribed to types with int8 members.
Value: 0x00000400
When this bit is set, the TypeCode generation for a Python type that contains an int8 member will match the one produced by the Python API in Connext 7.3.0. However, this behavior is not compliant with the XTypes specification, and Python types with int8 members won't interoperate with other APIs.
When this bit is unset, the TypeCode generation for a Python type that contains an int8 member will be done according to the XTypes specification, allowing interoperability with all the APIs except Python in Connext 7.3.0.
To be compatible with the XTypes specification, this bit must be unset.
This bit is unset by default. See com.rti.ndds.config.Compliance.XTypesMask.XTypesMask.COMPLIANCE_MASK_DEFAULT
Referenced by Compliance.XTypesMask.is_python_int8_730_enabled().
|
static |
When this bit is set, the parameter ID for members that are part of the key, or for the discriminator of a union, will have the parameter ID's FLAG_MUST_UNDERSTAND bit set when serialized using XCDR2.
Value: 0x00000800
To be compatible with the XTypes specification, this bit must be set.
This bit only applies when you are using XCDR2. (For XCDR, the parameter ID's FLAG_MUST_UNDERSTAND bit will never be set for key members and union discriminators, because doing so would change the key hash computation and disrupt communication with older versions of RTI Connext.)
This bit is unset by default. See com.rti.ndds.config.Compliance.XTypesMask.XTypesMask.COMPLIANCE_MASK_DEFAULT
Referenced by Compliance.XTypesMask.is_must_understand_in_key_and_discriminator_enabled().
|
static |
XTypes vendor compliance mask. This value is fully aligned with the XTypes specification.
The mask sets the following bits:
The HEX value for the mask is: 0x000001a9.
|
static |
Default XTypes compliance mask.
The mask sets the following bits:
The HEX value for the mask is: 0x0000018C.