Issues for Extensible and Dynamic Topic Types for DDS Finalization Task Force 1.0 mailing list
To comment on any of these issues, send email to dds-xtypes-ftf@omg.org. (Please include the issue number in the Subject: header, thusly: [Issue ###].) To submit a new issue, send email to issues@omg.org.
List of issues (green=resolved, yellow=pending Board vote, red=unresolved)
Issue 15418: DynamicData interface of the Language Binding section
Issue 15688: Can’t initialize TypeId from TypeKind
Issue 15689: Identifiers TypeId and Module collide with IDL keywords
Issue 15690: Definition of built-in IDL annotation @Shared is missing
Issue 15691: Unclear member names when programming language doesn’t support typedef
Issue 15692: Definition of type “Parameters” inadvertently missing
Issue 15693: Extensibility kinds of new QoS policies are not specified in a consistent way
Issue 15694: Updated QoS definitions should be provided
Issue 15695: Missing definitions of TypeSupport specializations for built-in types
Issue 15696: Incorrect FooDataWriter overloads for built-in types
Issue 15697: Consolidate IDL built-in annotations in machine-readable file
Issue 15698: Allow IDL compatibility pragma declarations to nest
Issue 15699: XML representations should define namespaces
Issue 15700: Mutable structures with an empty intersection should not be considered assignable
Issue 15701: Typographical errors
Issue 15702: Allow more flexible type consistency enforcement
Issue 15703: Don’t require CORBA namespace for primitive types in Plain Language Binding
Issue 15704: Provide formal grammar for new IDL Type Representation constructs
Issue 15705: Provide minimal backwards-compatible conformance point
Issue 15706: Reduce size of DynamicData API
Issue 15707: Improve support for shared data
Issue 15946: All IDL should use local interfaces
Issue 15969: Anonymous types should not be used in IDL examples and the TypeObject representation IDL
Issue 15976: Restrictions on MAP key element type not (clearly) documented/specified
Issue 15981: C++ mapping MAP type needs member access semantics specification
Issue 16007: DDS-XTypes @Key annotation Issue
Issue 16097: Different applications in the same domain may associate the same Topic with different types
Issue 16236: Annex D (“DDS Built-in Topic Data Types”) is out of sync with IDL file
Issue 16237: No way to get or set length of collection-typed DynamicData objects
Issue 16238: Type signature fields in built-in topic data shouldn't use unbounded strings
Issue 16239: Typographical errors
Issue 16240: Changing a DynamicType object is ambiguous
Issue 16241: Difficult to apply automation to statically defined types
Issue 16242: New QoS policies don’t indicate whether they can be changed
Issue 16243: Optional, must_understand members of non-mutable aggregation types cannot be accurately represented in CDR
Issue 16271: Incorrect default extensibility kind value in XSD file
Issue 16364: Ambiguous description of serializing discovery types
Issue 16365: Inconsistent bit set/integer equivalency
Issue 16366: Incorrect union assignability rules
Issue 16367: Definition of “strongly assignable” is incomplete
Issue 16368: Object assignability rules should be more resilient
Issue 16559: Inconsistent extensibility kind for enumerations
Issue 16561: New DDS-XTypes issue: inability to consume data using new base class
Issue 16720: Introduce the notional value "null" that may be used in a content-filter expression
Issue 17018: Rendering of UML diagrams in each of the figures is of poor graphical quality
Issue 17019: Truncation of text in Figure 3
Issue 17020: Non-standard UML notation on figures
Issue 17021: Conflicting data types applied to several Attributes, Operations and Parameters in UML notation
Issue 17022: Invalid data types applied to AnnotationDescriptor::value, DynamicData::descriptor, DynamicData::value
Issue 17023: Circular reference in definition of specialized Primitive Types
Issue 17090: Inconsistent generated code for DynamicType::descriptor
Issue 17293: Built-in annotations should be in DDS namespace
Issue 17294: Extended PID is not clear enough what the 2 value lengths mean
Issue 17295: Reserved parameter IDs in 7.4.1.2.1 are wrong
Issue 17296: Section 7.4.1.2.2 "Member ID-to-Parameter ID Mapping" is underspecified
Issue 17297: Extended parameters should be aligned the same as non-extended ones
Issue 15418: DynamicData interface of the Language Binding section (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Brookhaven National Laboratory (Mr. Nikolay Malitsky, malitsky(at)bnl.gov)
Nature: Enhancement
Severity: Significant
Summary:
First, thank you for this specification. It provides a systematic and comprehensive definition of the runtime type system which is important in the context of the next version of Experimental Physics and Industrial Control System (http://www.aps.anl.gov/epics/). Moreover, from my perspective, the conceptual idea of the dynamic container is more generic than DDS and EPICS and addresses other technologies, like AMQP. In this regard, I have several suggestions for the DynamicData interface of the Language Binding section, particularly, to scale down the number of methods from 270 to 30 and to replace the 'out' arguments with return values.
At this time, we are working on the prototype of this variant based on the consolidation of several approaches, including DDS Dynamic Data, Google's Protocol Buffers, etc. Certainly, for us, it would be ideal to have some common solution. According to the Beta 1 procedure, OMG will accumulate comments by November 29. But, probably, it can be discussed earlier, for example, at the coming OMG technical meeting. Please advise.
Resolution: non issue, closed
Revised Text:
Actions taken:
August 16, 2010: received issue
August 23, 2010: closed issue
Issue 15688: Can’t initialize TypeId from TypeKind (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: In the IDL definitions for the specification section Representing Types with TypeObject, the type TypeKind is declared to be an enumeration. The type TypeId is declared to be a typedef to long. Certain well-known TypeId values are initialized using TypeKind values. However, this causes compilation errors from some IDL compilers, which do not allow enumerated values to be assigned to integral constants.
Resolution:
Change TypeKind from an enumeration to a typedef to short.
Resolution: resolved
Revised Text:
Actions taken:
October 8, 2010: received issue
April 25, 2011: closed issue
Issue 15689: Identifiers TypeId and Module collide with IDL keywords (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: In the IDL definitions for the specification section Representing Types with TypeObject:
• The type “TypeId” collides with the IDL keyword “typeid.”
• The type “Module” and its member “module” collide with the IDL keyword “module.”
These collisions cause IDL compilation errors.
Resolution:
Escape the identifiers TypeId and Module by preceding them with underscores. Per the IDL specification, this lexical change does not impact the generated code.
Rename the type member “module” to “mod” to prevent collisions either with the IDL keyword or with the name of the enclosing type.
Revised Text:
Replace the type identifier “TypeId” in the IDL file with “_TypeId” everywhere it occurs.
Replace the type identifier “Module” in the IDL file with “_Module” everywhere it occurs.
Replace the member identifier “module” (in the type “Module”) in the IDL file with “mod.”
Resolution: resolved
Revised Text:
Actions taken:
October 8, 2010: received issue
April 25, 2011: closed issue
Issue 15690: Definition of built-in IDL annotation @Shared is missing (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The Type System defines a type member attribute shared, which indicates that a member should be stored by reference instead of by value to enable the use of external stores—for example, for large data members. This attribute appears in the TypeObject IDL definitions as a built-in annotation @Shared. However, this built-in annotation is never formally defined. (Possibly, it was deleted accidentally in a previous revision of the specification document.)
Resolution:
Add a section defining this built-in annotation to section 7.3.1.3, Built-in Annotations.
Resolution: Add a section defining this built-in annotation to section 7.3.1.3, Built-in Annotations.
Issue 15707, Improve support for shared data, needs to update the description of this new section. The FTF should not create the section in this issue only to modify it in that one. Rather, we should merge this issue with that one and make the entire change in one place.
Revised Text:
See issue 15707.
Disposition: Merged with issue 15707
Revised Text:
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Issue 15691: Unclear member names when programming language doesn’t support typedef (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: Summary:
In the IDL definitions for the specification section Representing Types with TypeObject, some members of type MemberId are named simply member, and some members of type TypeId are named simply type. The fact that the integral types of these members represent IDs is clear to readers of the IDL or to readers of generated code in languages that support typedef (such as C), because the type name is explicit. However, in Java and other programming languages that do not support typedef, the types of these members degrades to simply int (or another built-in integral type). This type obscures the meanings of the members.
Resolution:
Name the members in question more explicitly: member_id and type_id.
Revised Text:
Rename the following type members in the IDL file:
• AnnotationUsageMember::member ? AnnotationUsageMember::member_id
• AnnotationUsage::type ? AnnotationUsage::type_id
• TypeProperty::id ? TypeProperty::type_id
• MemberProperty::id ? MemberProperty::member_id
• MemberProperty::type ? MemberProperty::type_id
Resolution: Name the members in question more explicitly: member_id and type_id.
Revised Text: Rename the following type members in the IDL file and in the corresponding
annex:
• AnnotationUsageMember::member ?
AnnotationUsageMember::member_id
• AnnotationUsage::type ? AnnotationUsage::type_id
• TypeProperty::id ? TypeProperty::type_id
• MemberProperty::id ? MemberProperty::member_id
• MemberProperty::type ? MemberProperty::type_id
Disposition: Resolved
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Issue 15692: Definition of type “Parameters” inadvertently missing (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The IDL definition of the type AnnotationDescriptor from the section Representing Types with TypeObject depends on a typedef “Parameters,” which is an alias to a string-to-string map. This type definition was present in earlier revisions of the IDL file but was inadvertently deleted in the adopted revision.
Resolution:
Restore the missing type definition.
Revised Text:
Add the following definition immediately before AnnotationDescriptor in the IDL file:
typedef map<ObjectName, ObjectName> Parameters;
Resolution: Restore the missing type definition.
Revised Text: Add the following definition immediately before AnnotationDescriptor in the
IDL file:
typedef map<ObjectName, ObjectName> Parameters;
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Issue 15693: Extensibility kinds of new QoS policies are not specified in a consistent way (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The IDL file augments the DDS-standard QoS policies with meta-data defined by this specification in a way that is consistent with the serialization of those policies as defined by the DDS-RTPS specification. Specifically, it defines each policy to be “nested” (meaning that it is intended to be propagated only when contained within another type) to have an extensibility kind of EXTENSIBLE (meaning that members can be appended to the end of the type, but that members cannot be inserted in the middle or reordered).
In contrast, the two new QoS policies introduced by the specification—DataRepresentationQosPolicy and TypeConsistencyEnforcementQosPolicy—are defined to be nested, but their extensibility kinds are not specified. Per this specification, the kind EXTENSIBLE will be inferred by default but could be overridden by implementations. In order to be clear and avoid potential interoperability problems, these types should explicitly specify the extensibility kind EXTENSIBLE, just as all other policies do.
Resolution:
Add the built-in annotation @Extensibility(EXTENSIBLE_EXTENSIBILITY) to the definitions of DataRepresentationQosPolicy and TypeConsistencyEnforcementQosPolicy in the IDL file.
Resolution: Add the built-in annotation @Extensibility(EXTENSIBLE_EXTENSIBILITY)
to the definitions of DataRepresentationQosPolicy and
TypeConsistencyEnforcementQosPolicy in the IDL file.
Revised Text: Change the following lines in the IDL file:
@Nested
struct DataRepresentationQosPolicy {
…as follows:
@Extensibility(EXTENSIBLE_EXTENSIBILITY) @Nested
struct DataRepresentationQosPolicy { Change the following lines in the IDL file:
@Nested
struct TypeConsistencyEnforcementQosPolicy {
…as follows:
@Extensibility(EXTENSIBLE_EXTENSIBILITY) @Nested
struct TypeConsistencyEnforcementQosPolicy {
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Issue 15694: Updated QoS definitions should be provided (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The specification dictates that the new QoS policies DataRepresentationQosPolicy and TypeConsistencyEnforcementQosPolicy apply to Topics, DataReaders, and DataWriters. These additions are reflected in the IDL file by the inclusion of corresponding members in the built-in topic data types TopicBuiltinTopicData, SubscriptionBuiltinTopicData, and PublicationBuiltinTopicData. Corresponding additions to TopicQos, DataReaderQos, and DataWriterQos are therefore implied, but updated definitions of those types are not provided in the IDL file.
Resolution:
Add the missing type definitions to the IDL file.
The type extensibility kinds of the QoS structures should be MUTABLE to be consistent with the built-in topic data types, which are also containers of QoS policies and which have that extensibility kind.
Resolution: Add the missing type definitions to the IDL file.
The type extensibility kinds of the QoS structures should be MUTABLE to be
consistent with the built-in topic data types, which are also containers of QoS
policies and which have that extensibility kind.
Revised Text: Add the following definition immediately after TopicBuiltinTopicData in the
IDL file:
@Extensibility(MUTABLE_EXTENSIBILITY)
struct TopicQos {
// ...
DataRepresentationQosPolicy representation;
TypeConsistencyEnforcementQosPolicy type_consistency;
};
Add the following definition immediately after
PublicationBuiltinTopicData in the IDL file:
@Extensibility(MUTABLE_EXTENSIBILITY)
struct DataWriterQos {
// ...
DataRepresentationQosPolicy representation;
TypeConsistencyEnforcementQosPolicy type_consistency;
}; Add the following definition immediately after
SubscriptionBuiltinTopicData in the IDL file:
@Extensibility(MUTABLE_EXTENSIBILITY)
struct DataReaderQos {
// ...
DataRepresentationQosPolicy representation;
TypeConsistencyEnforcementQosPolicy type_consistency;
};
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Issue 15695: Missing definitions of TypeSupport specializations for built-in types (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The IDL file contains specializations of all of the type-specific interfaces for the new built-in types: “Foo”DataWriter and “Foo”DataReader. However, the FooTypeSupport definitions are not included. These specializations require no method overloads; however, they should be included for the sake of clarity and completeness.
Resolution:
Add the missing type definitions.
Resolution: Add the missing type definitions
Revised Text: Add the following definition immediately after StringDataReader in the IDL
file:
interface StringTypeSupport : TypeSupport {
/* This interface shall instantiate the type FooTypeSupport
* defined by the DDS specification where "Foo" is an unbounded
* string.
*/
};
Add the following definition immediately after KeyedStringDataReader in the
IDL file:
interface KeyedStringTypeSupport : TypeSupport {
/* This interface shall instantiate the type FooTypeSupport
* defined by the DDS specification where "Foo" is KeyedString.
*/
};
Add the following definition immediately after BytesDataReader in the IDL file:
interface BytesTypeSupport : TypeSupport {
/* This interface shall instantiate the type FooTypeSupport
* defined by the DDS specification where "Foo" is Bytes.
*/
}; Add the following definition immediately after KeyedBytesDataReader in the
IDL file:
interface KeyedBytesTypeSupport : TypeSupport {
/* This interface shall instantiate the type FooTypeSupport
* defined by the DDS specification where "Foo" is KeyedBytes.
*/
};
Disposition:
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Issue 15696: Incorrect FooDataWriter overloads for built-in types (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The IDL file contains specializations of all of the type-specific interfaces for the new built-in types: “Foo”DataWriter and “Foo”DataReader. Some of these specializations contain additional “overloads” of DDS-standard types-specific methods for the sake of convenience. However, some of these overloads are not correct:
• KeyedStringDataWriter::unregister_instance_w_key does not need to take both a string key and an instance handle. The purpose of this method is to unregister based on the key, so the handle should be removed. (Users wishing to unregister based on an instance handle can use the typical unregister_instance method specified by DDS.)
• KeyedStringDataWriter::unregister_instance_w_key_w_timestamp does not need to take both a string key and an instance handle. The purpose of this method is to unregister based on the key, so the handle should be removed. (Users wishing to unregister based on an instance handle can use the typical unregister_instance_w_timestamp method specified by DDS.)
• KeyedStringDataWriter::dispose_w_key does not need to take both a string key and an instance handle. The purpose of this method is to dispose based on the key, so the handle should be removed. (Users wishing to dispose based on an instance handle can use the typical dispose method specified by DDS.)
• KeyedStringDataWriter::dispose_w_key_w_timestamp does not need to take both a string key and an instance handle. The purpose of this method is to dispose based on the key, so the handle should be removed. (Users wishing to dispose based on an instance handle can use the typical dispose_w_timestamp method specified by DDS.)
• BytesDataWriter::write_string_w_bytes should be named BytesDataWriter::write_w_bytes (copy-paste error).
• BytesDataWriter::write_string_w_bytes_w_timestamp should be named BytesDataWriter::write_w_bytes_w_timestamp (copy-paste error).
• KeyedBytesDataWriter::unregister_instance_w_key does not need to take both a string key and an instance handle. The purpose of this method is to unregister based on the key, so the handle should be removed. (Users wishing to unregister based on an instance handle can use the typical unregister_instance method specified by DDS.)
• KeyedBytesDataWriter::unregister_instance_w_key_w_timestamp does not need to take both a string key and an instance handle. The purpose of this method is to unregister based on the key, so the handle should be removed. (Users wishing to unregister based on an instance handle can use the typical unregister_instance_w_timestamp method specified by DDS.)
• KeyedBytesDataWriter::write_bytes_w_key doesn’t actually include the key among its arguments. It should.
• KeyedBytesDataWriter::write_bytes_w_key_w_timestamp doesn’t actually include the key among its arguments. It should.
• KeyedBytesDataWriter::dispose_w_key does not need to take both a string key and an instance handle. The purpose of this method is to dispose based on the key, so the handle should be removed. (Users wishing to dispose based on an instance handle can use the typical dispose method specified by DDS.)
• KeyedBytesDataWriter::dispose_w_key_w_timestamp does not need to take both a string key and an instance handle. The purpose of this method is to dispose based on the key, so the handle should be removed. (Users wishing to dispose based on an instance handle can use the typical dispose_w_timestamp method specified by DDS.)
Resolution:
Correct the method signatures as described in the summary above.
Resolution: Correct the method signatures as described in the summary above
Revised Text: Modify the KeyedStringDataWriter method signatures as described in the
unified diff below:
ReturnCode_t unregister_instance_w_key(
- in string key,
- in InstanceHandle_t handle);
+ in string key);
ReturnCode_t unregister_instance_w_key_w_timestamp(
in string key,
- in InstanceHandle_t handle,
in Time_t source_timestamp);
ReturnCode_t dispose_w_key(
- in string key,
- in InstanceHandle_t instance_handle);
+ in string key);
ReturnCode_t dispose_w_key_w_timestamp(
in string key,
- in InstanceHandle_t instance_handle, in Time_t source_timestamp);
Modify the BytesDataWriter method signatures as described in the unified diff
below:
- ReturnCode_t write_string_w_bytes(
+ ReturnCode_t write_w_bytes(
in ByteArray bytes,
in long offset,
in long length,
in InstanceHandle_t handle);
- ReturnCode_t write_string_w_bytes_w_timestamp(
+ ReturnCode_t write_w_bytes_w_timestamp(
in ByteArray bytes,
in long offset,
in long length,
in InstanceHandle_t handle,
in Time_t source_timestamp);
Modify the KeyedBytesDataWriter method signatures as described in the
unified diff below:
ReturnCode_t unregister_instance_w_key(
- in string key,
- in InstanceHandle_t handle);
+ in string key);
ReturnCode_t unregister_instance_w_key_w_timestamp(
in string key,
- in InstanceHandle_t handle,
in Time_t source_timestamp);
ReturnCode_t write_bytes_w_key(
+ in string key,
in ByteArray bytes,
in long offset,
in long length,
in InstanceHandle_t handle);
ReturnCode_t write_bytes_w_key_w_timestamp(
+ in string key,
in ByteArray bytes,
in long offset,
in long length,
ReturnCode_t dispose_w_key(
- in string key,
- in InstanceHandle_t instance_handle);
+ in string key);
ReturnCode_t dispose_w_key_w_timestamp(
in string key,
- in InstanceHandle_t instance_handle,
in Time_t source_timestamp);
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Issue 15697: Consolidate IDL built-in annotations in machine-readable file (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The specification provides equivalent definitions for the built-in annotations defined by the IDL Type Representations. However, it only includes these in the specification document, not in the IDL file.
Resolution:
Add these definitions to the IDL file. Add this content as an additional annex in the specification document.
Resolution: Add these definitions to the IDL file. Add this content as an additional annex in
the specification document
Revised Text: Add a new annex to the end of the specification document:
Annex F: Built-in Annotations
The following annex is a consolidation of the definitions of the built-in
annotations defined by the IDL Type Representation defined in section
7.3.1.3 above.
Also add a new section at the end of the IDL file:
// =================================================================
// Built-in Annotations
// =================================================================
To both of these, add the following IDL definitions:
module DDS {
@Annotation
local interface ID {
attribute unsigned long value;
};
@Annotation
local interface Optional {
attribute boolean value default true;
};
@Annotation
local interface Key {
attribute boolean value default true; };
@Annotation
local interface BitBound {
attribute unsigned short value default 32;
};
@Annotation
local interface Value {
attribute unsigned long value;
};
@Annotation
local interface BitSet {
};
@Annotation
local interface Nested {
attribute boolean value default true;
};
enum ExtensibilityKind {
FINAL_EXTENSIBILITY,
EXTENSIBLE_EXTENSIBILITY,
MUTABLE_EXTENSIBILITY
};
@Annotation
local interface Extensibility {
attribute ExtensibilityKind value;
};
@Annotation
local interface MustUnderstand {
attribute boolean value default true;
};
@Annotation
local interface Verbatim {
attribute string<32> language default "*";
attribute string<128> placement default "beforedeclaration";
attribute string text;
};
@Annotation
local interface Shared {
attribute boolean value default true;
};
}; // end module DDS
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Discussion:
Issue 15698: Allow IDL compatibility pragma declarations to nest (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Jackrabbit Consulting (Dr. Nick Stavros, nick(at)drstavros.com)
Nature: Uncategorized Issue
Severity:
Summary: Section 7.3.1.1.2, Forward Compatibility with Respect to Compilers, defines a pragma declaration that IDL file authors can use to delimit portions of their IDL files that require certain versions of this specification. Especially since IDL files can include one another, it would be helpful if such pragma declarations were allowed to nest within one another.
Resolution:
Allow pragma declarations to nest.
• Any version number specified by a nested pragma overrides the enclosing version number, if any.
• Any unclosed declaration shall be considered to continue until the end of the input.
In addition, the pragma “end” declaration shall—like the “begin” declaration—allow a version number to be specified to clarify the nesting relationship.
Resolution: Allow pragma declarations to nest.
• Any version number specified by a nested pragma overrides the
enclosing version number, if any.
• Any unclosed declaration shall be considered to continue until the end of
the input.
In addition, the pragma “end” declaration shall—like the “begin” declaration—
allow a version number to be specified to clarify the nesting relationship.
Revised Text: Section 7.3.1.1.2 shall be modified in the following ways:
(#1) It currently contains the following text:
The following pragma declarations allow IDL type designers to indicate to
their tools and to human readers that their IDL file (or a portion of it) makes
use of constructs defined by this specification:
#pragma dds_xtopics begin [<version_number>]
// IDL definitions
#pragma dds_xtopics end
The above text shall be changed as follows. The “end” declaration shall also be
followed by an optional version number, just like the “begin” declaration:
[<version number>].
(#2) This section currently contains the paragraph “For example:” followed by an
example block of IDL. These two portions of the text shall be replaced by the
following: In the event that such pragma declarations are nested within one another,
the innermost version number specified, if any, shall be in effect. If version
numbers are used with “end” declarations, those version numbers should be
the same as those used with the matching “begin” declarations.
In the event that such a pragma “begin” declaration is not matched with a
subsequent closing “end” declaration, the declaration shall be considered to
be in effect until the end of the IDL input.
For example:
#pragma dds_xtopics begin 1.0_Beta_1
struct Base {
@Key long id;
};
#pragma dds_xtopics begin 1.1
struct Sub : Base {
long another_member;
};
#pragma dds_xtopics end 1.1
#pragma dds_xtopics end 1.0_Beta_1
(#3) At the end of the section, the bulleted list contains an item beginning with
“Halting with an error….” This list item shall be replaced by the following:
• Halting with an error, perhaps because it recognized the pragmas and
knows that it is not compliant with this specification, or because it
detected a version mismatch between matching “begin” and “end”
declarations.
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Issue 15699: XML representations should define namespaces (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: Currently, the XML Type Representation and XML Data Representation do not define XML namespaces. This omission prevents XML documents of these types from being used in certain contexts, such as within XML catalogs or SOAP messages.
Resolution:
1. Specify the XML namespace for the XML Type Representation. This namespace shall be formed by appending the OMG document number of the specification to the OMG HTTP domain in the following way: http://www.omg.org/<TF or TC>/<year>/<month>/<document ordinal>/<section_name>. For example, the namespace for the beta 1 specification would be: http://www.omg.org/ptc/2010/05/12/XML_Type_Representation.
2. Allow the association of a target namespace with the XSD Type Representation of a set of types, such that documents conforming to such type definitions may be properly validated against that namespace. This target namespace will be implied by the fully qualified name of each non-nested type, such that all DDS types, regardless of which Type Representation was used to define them, implicitly define a target namespace that can be used to validate XML Data Representation documentsThis mechanism will be specific to the XSD Type Representation; the concept of a target XML namespace will not be promoted into the Type System (or, by extension, into other Type Representations). (This implied target namespace will be a URN, not a URL; it will not be possible to dereference it.)
2.3. Allow applications the choice of whether to include XML namespaces on the network. Split the XML Data Representation into two dialects: XML_VALID and XML_WELL_FORMED. The former will include explicit namespace declarations and properly qualify all element and attribute names. The latter will, for the sake of compactness, omit namespace information.
Resolution: 1. Specify the XML namespace for the XML Type Representation. This
namespace shall be formed by appending the OMG document number of the
specification to the OMG HTTP domain in the following way:
http://www.omg.org/<TF or TC>/<year>/<month>/<document
ordinal>/<section_name>. For example, the namespace for the beta 1
specification would be:
http://www.omg.org/ptc/2010/05/12/XML_Type_Representation.
2. Allow the association of a target namespace with the XSD Type
Representation of a set of types, such that documents conforming to such
type definitions may be properly validated against that namespace. If this
target namespace is not specified explicitly, it shall be implied by the fully
qualified name of each module, such that all DDS types, regardless of which
Type Representation was used to define them, implicitly define a target
namespace that can be used to validate XML Data Representation
documents. The implied namespace shall take the form
ddstype://www.omg.org/<module path>, where <module path> is a
list of enclosing modules, separated by forward slashes, from outermost to
innermost. (Note that this implied target namespace is a URN, not a URL; it
will not be possible to dereference it.)
3. Allow applications the choice of whether to include XML namespaces on the
network. Split the XML Data Representation into two dialects: “valid” and “well
formed.” The former will include explicit namespace declarations and properly
qualify all element and attribute names. The latter will, for the sake of
compactness, omit namespace information.
With respect to (#2), the ability of an XSD author to explicitly specify a target
namespace—rather than relying on a module-based implied namespace—is
important to retain compatibility with the CORBA to WSDL/SOAP Interworking
Specification, on which the XSD Type Representation depends. The authors of
that specification explicitly chose not to support module-based namespaces for
performance reasons, as described in section 4.1.4 of that specification.
Revised Text: (#1) The XML Type Representation shall be modified as follows:
Immediately after the first paragraph of section 7.3.2, XML Type Representation,
insert the following new paragraph:
The XML namespace of the XML Type Representation shall be formed by
appending the OMG document number of this specification to the OMG HTTP
domain in the following way: http://www.omg.org/<issuing OMG
subgroup>/<year>/<month>/<document
ordinal>/<section_name>. For example, the namespace for the 1.0
version of this specification would be:
http://www.omg.org/ptc/2011/01/07/XML_Type_Representation.
This namespace shall be declared as the targetNamespace in the XSD file
that defines the XSD Type Representation:
targetNamespace="http://www.omg.org/ptc/2011/01/07/XML_Type
_Representation".
In section 7.3.2.1.1, File Inclusion, the XML example shall be updated to include
this namespace:
<dds:types
xmlns:dds="http://www.omg.org/ptc/2011/01/07/XML_Type_Representation
">
<dds:include file="my_other_types.xml"/>
</dds:types>
In section 7.3.2.1.2, Forward Declarations, the XML example shall be updated to
include this namespace:
<dds:types
xmlns:dds="http://www.omg.org/ptc/2011/01/07/XML_Type_Representation
">
<dds:forward_dcl kind="struct" name="MyStructure"/>
</dds:types>
In section 7.3.2.1.3, Constants, the XML example shall be updated to include this
namespace:
<dds:types
xmlns:dds="http://www.omg.org/ptc/2011/01/07/XML_Type_Representation
">
<dds:const name="MY_CONSTANT" type="int32" value="2 + 3"/>
</dds:types> (#2) The XSD Type Representation shall be modified as follows:
Immediately after the first paragraph of section 7.3.3, XSD Type Representation,
insert the following new paragraph:
XML Schema documents intended for use with DDS, like any XML Schema
documents, may declare a target namespace for the elements and attributes
they define. Valid documents conforming to such schemas (i.e. serialized
DDS samples; see section 7.4.2, XML Data Representation) must respect
such namespaces, if any.
(#2, #3) The XML Data Representation shall be modified as follows:
The contents of section 7.4.2 beginning with the paragraph “For example,
objects…” and continuing until the end of the section shall be replaced with the
following:
The XML Data Representation has two variants: the Valid XML Data
Representation and the Well Formed XML Data Representation. Their
specifications follow. They both make use of the following non-normative
example type definitions:
module MyModule1 { module MyModule2 {
@Nested
struct MyInnerStructure {
long my_integer;
};
struct MyStructure {
MyInnerStructure inner;
sequence<double> my_sequence_of_doubles;
};
}}
7.4.2.1 Valid XML Data Representation
The XML document shall declare the namespace(s) against which it may be
validated. In the event that the XSD Type Representation of the sample’s type
does not specify an explicit target namespace, the modules that scope that
type shall imply the namespace for the document. This implied namespace
shall take the form ddstype://www.omg.org/<module path>, where
<module path> is a list of enclosing modules, separated by forward
slashes, from outermost to innermost. The namespace prefix is not specified.
For example, the Valid XML Data Representation of an object of the example
type defined above would be as follows:
<my:MyStructure
xmlns:my="ddstype://www.omg.org/MyModule1/MyModule2/MyStructure">
<my:inner>
<my:my_integer>5<my:my_integer> </my:inner>
<my:my_sequence_of_doubles>
<my:item>10.0</my:item>
<my:item>20.0</my:item>
<my:item>30.0</my:item>
</my:my_sequence_of_doubles>
</my:MyStructure>
7.4.2.1 Well Formed XML Data Representation
The XML document shall not declare the namespace(s) against which it may
be validated, regardless of whether a target namespace was specified in the
XSD Type Representation of the corresponding sample’s type. In other
words, the document shall be well formed but not valid. This limitation allows
the document to be more compact in cases where the namespace is not
needed or can be inferred by the recipient.
For example, the Well Formed XML Data Representation of an object of the
example type defined above would be as follows:
<MyStructure>
<inner>
<my_integer>5<my_integer>
</inner>
<my_sequence_of_doubles>
<item>10.0</item>
<item>20.0</item>
<item>30.0</item>
</my_sequence_of_doubles>
</MyStructure>
(#3) The Data Representation QoS Policy shall be modified as follows:
In section 7.6.1.1.1, DataRepresentationQosPolicy: Conceptual Model, the
second bulleted list contains an item “Readers request one or more
representations.” To this bullet, append the following text:
Readers requesting the XML Data Representation shall be prepared to
receive either valid or merely well formed XML documents. If a received
document is well formed but does not include any XML namespace
declarations, the reader shall assume that the document could be validated
using the XSD Type Representation of the corresponding sample’s type if it
were to include such namespace declarations.
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Issue 15700: Mutable structures with an empty intersection should not be considered assignable (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The type assignability rules for structure types (section 7.2.4.5, Aggregation Types) allow mutable types to be assigned in either direction, so long as there are no name, ID, or type conflicts among the types’ members. Unfortunately, these rules permit a degenerate case: two mutable types having no key members and no members in common will have no conflicts, and therefore will be considered assignable. However, readers will always observe every sample to have all default/empty contents.
Resolution:
Add an additional rule to the assignability determination to require that at least one member is in common.
Resolution: Add an additional rule to the assignability determination to require that at least
one member is in common.
Revised Text: The table in section 7.2.4.5, Aggregation Types, (Table 15) has a row for
structure types that begins with the type kind STRUCTURE_TYPE in the first
column. The second column contains a bulleted list of assignability rules, along
them “T1.extensibility == T2.extensibility.” Immediately before this rule, add the
following:
• Empty type intersections prevent assignability: There is at least one
member “m1” of T1 and one corresponding member “m2” of T2 such
that m1.id == m2.id.
Disposition: Resolved
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Discussion:
Issue 15701: Typographical errors (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The specification contains the following typographical errors:
• Section 7.6.1.3.1, TypeConsistencyEnforcementQosPolicy: Conceptual Model, bullet EXACT_NAME: “…they’re structural definitions…” should be “…their structural definitions….”
Resolution:
Fix the errors as described above.
Revised Text:
Revisions are described in the summary above
Resolution: Fix the errors as described above.
Note that the typo is section 7.6.1.3.1 will be addressed automatically by the resolution to issue #15702, which replaces the text is question. If no further typos are added to this issue, it can be closed as a duplicate of that issue.
Revised Text:
Revisions are described in the summary above.
Disposition: Merged with issue 15702
Revised Text:
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Issue 15702: Allow more flexible type consistency enforcement (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: Summary:
Section 7.6.1.3.1, TypeConsistencyEnforcementQosPolicy: Conceptual Model, identifies the type consistency enforcement kinds. This QoS policy is request-offer (RxO); readers and writers must match exactly in order to communicate. However, this requirement for an exact match is not required by implementations and is too restrictive for users.
Resolution: The resolution below is closely related to the resolutions of issues #16097 and #16561.
The existing type consistency enforcement QoS policy, which governs both type signature consistency and type definition structural consistency, shall be simplified. It shall be removed from the Topic and DataWriter QoS and the corresponding built-in topic data types. It shall remain in the DataReader QoS and in the Subscription built-in topic data type. Its “kind” enumeration shall have the following values:
• DISALLOW_TYPE_COERCION: The DataWriter and the DataReader must support the same data type in order for them to communicate.
• ALLOW_TYPE_COERCION: The DataWriter and the DataReader need not support the same data type(s) in order for them to communicate as long as the reader’s type is assignable from the writer’s type.
The default settings shall be as follows:
• For compliant readers: ALLOW_TYPE_COERCION
• Inferred for non-compliant readers: DISALLOW_TYPE_COERCION
Type compatibility shall be determined according to the following steps:s
1. The TypeObject type definition is considered first, provided that it is available for both the Publication and the Subscription. (This is anticipated to be the most common case for DDS-XTypes-conformant implementations.) If the Subscription allows type coercion, then its type must be assignable from the type of the Publication. If the Subscription does not allow type coercion, then its type must be equal to that of the Publication.
2. If either the Publication or the Subscription does not provide any TypeObject definitions, then the type names are consulted. (This case is important in cases where a given component cannot, or does not wish to, provide concrete type definitions. For example, it may not support XTypes, it may wish to conserve bandwidth, it may not wish to reveal its type definition(s), or it may not even be type-aware—it may simply record binary payloads, for example.) The Subscription and Publication type_name fields must match exactly.
If the reader and writer are not type-compatible, the middleware raises an INCONSISTENT_TOPIC status change.
The following behaviors will result from the default values and evaluation orders above when writers and readers have default QoS:
• Compliant writers will communicate with compliant readers. The reader will allow type coercion. This behavior is what we want, and it is unchanged from the current DDS-XTypes default.
• Compliant writers will communicate with non-compliant readers. The reader will not allow type coercion, so the types (really the type names) must match exactly. This behavior is unchanged from the implied contract of DDS implementations prior to DDS-XTypes.
(Suppose the writer has out-of-band knowledge of the reader’s type definition. If the writer determines that the types are not equal, it will consider the topic inconsistent and forbid communication. The reader will be unable to detect this inconsistency. However, the reader will not receive any data from the writer, so deserialization errors will be prevented just the same.)
• Non-compliant writers will communicate with compliant readers. The reader will allow type coercion. This behavior provides maximum flexibility without requiring changes to deployed non-compliant applications.
(Suppose the reader has out-of-band knowledge of the writer’s type definition. If the reader determines that the types are not assignable, the writer will be unable to detect this inconsistency and may send data to the reader nonetheless. The reader implementation will need to detect and eliminate this extraneous data without attempting to deserialize it—for example, by checking upon receiving the data from the socket whether the source data is actually from a matched writer. This edge case is little different from other preexisting cases, such as the use by a non-matching writer of a multicast address used by the reader. Therefore, it is not expected to be a barrier to implementation.)
Revised Text: Rename section 7.6.1, “Endpoint Matching”, to “Discovery and Endpoint Matching”. Remove section 7.6.2, “Discovery”—its contents need significant revision, and it makes more sense to merge them into 7.6.1 than to leave them as a separate section.
In the first paragraph of section 7.6.1, replace, “…endpoint matching process…” with “discovery and endpoint-matching process…”. At the end of the same paragraph, replace “two categories” with “three categories” and insert a new bullet in the middle of the list:
• Discovery-Time Data Typing: The dynamic features of this specification depend on the ability of components to discover the data types used by their peers.
Add the following paragraph to the end of section 7.6.1.1.3, “DataRepresentationQosPolicy: Platform-Specific API”:
The topic, publication, and subscription built-in topic data types shall each indicate the data representation of the associated entity with a new member:
@ID(0x0073) DDS::DataRepresentationQosPolicy representation;
Add the following new section after the existing section 7.6.1.1, “Data Representation QoS Policy”. (The existing section 7.6.1.2, “Type Signature”, is removed by the resolution to issue #16561.)
7.6.1.2 Discovery-Time Data Typing
The topic, publication, and subscription built-in topic data structures shall each indicate the type(s) used for communication by the associated entity. These declarations shall be as follows:
@ID(0x0007) ObjectName type_name;
@ID(0x0072) @Optional DDS::TypeObject type;
The the_type member of the TypeObject object shall indicate the type(s) associated with the corresponding entity. A Publication or Subscription shall be associated with one of the types of the corresponding Topic.
The beginning of section 7.6.1.3, “Type Consistency Enforcement QoS Policy, says, “It applies to Topics, DataWriters, and DataReaders.” Remove Topics and DataWriters from that list.
In section 7.6.1.3.1, TypeConsistencyEnforcementQosPolicy: Conceptual Model, replace the bulleted list with the following:
• DISALLOW_TYPE_COERCION: The DataWriter and the DataReader must support the same data type in order for them to communicate. (This is the degree of type consistency enforcement required by the DDS specification [DDS] prior to this specification.)
• ALLOW_TYPE_COERCION: The DataWriter and the DataReader need not support the same data type in order for them to communicate as long as the reader’s type is assignable from the writer’s type.
The same section contains the following paragraph:
This policy has request-offer semantics [DDS]. The type compatibility kind of a DataWriter and a DataReader must be the same in order for the two to communicate.
This paragraph shall be replaced by the following:
This policy applies only to DataReaders; it does not have request-offer (RxO) semantics [DDS].
The first sentence of the following paragraph (regarding default values) shall be replaced with the following:
The default enforcement kind shall be ALLOW_TYPE_COERCION.
The next sentence ends with “…it shall assume a kind of EXACT_TYPE.” This phrase shall be rewritten “…it shall assume a kind of DISALLOW_TYPE_COERCION.”
The final sentence of the paragraph ends with “…—EXACT_TYPE in this case.” This phrase shall be deleted.
In section 7.6.1.3.2, Rules for Type Consistency Enforcement, the last sentence of the first paragraph reads: “These rules are based on the type consistency kind of these entities.” Replace this sentence with the following: “These rules are based on the data types of these entities and on the type consistency kind of the DataReader.”
The next paragraph begins, “The type-consistency-enforcement rules consist of two steps.” Remove the remainder of that paragraph after that first sentence.
“Step 1” in the same section consists of a bulleted list of three items. Replace the text following the words “Step 1” up through and including that list with the following:
If both the Publication and the Subscription specify a TypeObject, consider it first. If the Subscription allows type coercion, then the_type indicated there must be assignable from the_type of the Publication. If the Subscription does not allow type coercion, then its type must be equal to the type of the Publication.
“Step 2” in the same section consists of a bulleted list of three items. Replace the text following the words “Step 2”, up through and including the paragraph that ends “…shall be assumed to succeed”, with the following:
If either the Publication or the Subscription does not provide a TypeObject definition, then the type names are consulted. The Subscription and Publication type_name fields must match exactly, as in [DDS] prior to this specification.
A later paragraph in the same section begins, “Note that the DataWriter and the DataReader can each execute the algorithm independently…”. In that first sentence, replace the phrase “TypeSignature and TypeRepresentation” with the word “metadata”.
Immediately following are the words “The table below…” and Table 29. Remove this introductory sentence as well as the table.
Append the following new paragraph to section 7.6.1.3.3, TypeConsistencyEnforcementQosPolicy: Platform-Specific API:
The subscription built-in topic data type shall indicate the type consistency requirements of the corresponding reader:
@ID(0x0074) DDS::TypeConsistencyEnforcementQosPolicy type_consistency;
The machine-readable IDL file and Annex D: DDS Built-in Topic Data Types each contain a definition of the enumeration TypeConsistencyKind. Replace these definitions with the following:
@BitBound(16)
enum TypeConsistencyKind {
DISALLOW_TYPE_COERCION,
ALLOW_TYPE_COERCION
};
Also in the IDL, remove the member type_consistency from TopicBuiltinTopicData, TopicQos, PublicationBuiltinTopicData, and DataWriterQos.
Actions taken:
October 8, 2010: received issue
July 19, 2012: closed issue
Discussion: A primary use case for the DDS-XTypes specification is the independent evolution of components and subsystems. One important subset of this use case is the initial introduction of a Service implementation compliant with this specification: a reader or writer may support the Type Consistency Enforcement policy while its matched peer does not. Therefore, the following invariants must hold:
1. Reader and writer must reach the same conclusion about whether communication is possible. Note that a non-DDS-XTypes-compliant implementation will enforce type consistency on the basis of exact name equality.
2. The reader must be able to parse correctly the serialized data it receives from the writer. Note that a non-DDS-XTypes-compliant reader implementation may not be able to skip information that it does not understand nor to infer information it did not receive. A non-DDS-XTypes-compliant writer implementation may not be able to determine structural compatibility with its matched readers at all.
3. Upgrading the DDS implementation without modifying application code must not cause communication to cease. The default QoS of a DDS-XTypes-compliant implementation—as well as the QoS that it infers from a non-compliant peer—must not result in a QoS incompatibility or type inconsistency that would not otherwise have occurred.
4. Upgrading the DDS implementation without modifying application code MAY cause communication to begin. It could be that two applications have types that are not quite the same; however, they may be close enough to allow communication under this specification.
The following table matches compliant and non-compliant readers and writers and indicates desirable and permissible behaviors in each case. The notation “X” indicates an implementation compliant with DDS-XTypes. The notation “–“ indicates an implementation that is not compliant with DDS-XTypes. The first marking indicates whether the middleware has been upgraded; the second indicates whether the application code/configuration has been upgraded. “Equal” means exact structural type equality. “Assignable” means type assignability but not necessarily strict equality. “None” means no structural type checking at all.
XX Reader X– Reader – – Reader
XX Writer Assignable is the desired default, although either party might override this behavior to Equal or None. Assignable is the desired default, although the writer might override this behavior to Equal or None. Equal is the desired default, because the reader cannot respond flexibly. The writer might theoretically elect to change this to None, although this would be unsafe, because the writer might push incompatible data to the reader with no assurance that the reader is prepared to handle it.
X– Writer Assignable is the desired default, although the reader might override this behavior to Equal or None. Assignable is the desired default, although it is likely the same as Equal, if the endpoints were already communicating. Equal is the desired default, because the reader cannot respond flexibly.
– – Writer Assignable is the desired default, but it can be enforced only on the reader side , which might override it to Equal or None. The writer will perform no checking in any case. Assignable is the desired default, but it can be enforced only on the reader side. It is likely the same as Equal, if the endpoints were already communicating. None is the existing behavior; neither party can be configured to do anything else. However, the implied contract is Equal.
Issue 15703: Don’t require CORBA namespace for primitive types in Plain Language Binding (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The Plain Language Binding relies on the IDL-to-C and IDL-to-C++ language mappings to generate programming APIs for these languages. Unfortunately, these mappings prefix all primitive type names with “CORBA,” which is incorrect and confusing for DDS users. For example:
• DDS Int32 will become CORBA_Long in C.
• DDS Float64 will become CORBA::Double in C++.
Resolution:
Update the Plain Language Binding for primitive types in C and C++ to place them in a conceptual “DDS” module instead of the current “CORBA” module. At the same time, rename them to be consistent with their names in the DDS type system—for example, “Int32” instead of “Long.” (The Plain Language Binding already makes several extensions to the IDL-to-C/C++ mapping specifications. This change would constitute one more.)
These new primitive types must be compatible in size and representationwith the definitions in the Type System; these definitions will be provided in a table within the Plain Language Binding section. (As a side effect, they will also be compatible with to their CORBA-module counterparts, such that applications using both DDS and CORBA can assign from one to the other without type casts or loss of information.)
Resolution: Update the Plain Language Binding for primitive types in C and C++ to place
them in a conceptual “DDS” module instead of the current “CORBA” module. At
the same time, rename them to be consistent with their names in the DDS type
system—for example, “Int32” instead of “Long.” (The Plain Language Binding
already makes several extensions to the IDL-to-C/C++ mapping specifications.
This change would constitute one more.)
These new primitive types must be compatible with the definitions in the Type
System; these definitions will be provided in a table within the Plain Language
Binding section. (As a side effect, they will also be compatible with their CORBAmodule
counterparts, such that applications using both DDS and CORBA can
assign from one to the other without type casts or loss of information.)
Revised Text: Add a new subsection to section 7.5.1, Plain Language Binding, before the existing subsection 7.5.1.1, Annotations and Built-in Annotations. The contents of the new subsection shall be as follows:
7.5.1.1 Primitive Types
To avoid confusion among DDS programmers who are not familiar with CORBA, this Language Binding specifies definitions for the DDS primitive types for C and C++ in the “DDS” module instead of in the “CORBA” module. In other programming languages, the mappings for these types remain unchanged.
7.5.1.1.1 C
The Service shall provide typedefs with the following names to types available on the underlying platform that have the appropriate sizes and representations.
Programmers concerned with DDS portability should use the Plain Language Binding types in the table below. However, some may feel that using these types impairs readability. Others may have a requirement to integrate with CORBA. Therefore, compliant implementations have the following degrees of freedom:
• On platforms where a native C type (e.g. int) is guaranteed to be identical to a DDS type, the implementation may generate the equivalent native C type.
• On platforms compliant with the C99 specification, the implementation may generate equivalent C99-compatible types.
• The implementation may generate equivalent CORBA-module types.
These degrees of freedom are not expected to impact code portability, as all of these typedefs will map to the same underlying native C types.
Table 1. Plain Language Binding for Primitive Types in C
DDS Type Plain Language Binding Type Equivalent CORBA Type Equivalent C99 Type
Int32 DDS_Int32 CORBA_long int32_t
UInt32 DDS_UInt32 CORBA_unsigned_long uint32_t
Int16 DDS_Int16 CORBA_short int16_t
UInt16 DDS_UInt16 CORBA_unsigned_short uint16_t
Int64 DDS_Int64 CORBA_long_long int64_t
UInt64 DDS_UInt64 CORBA_unsigned_long_long uint64_t
Float32 DDS_Float32 CORBA_float (unspecified)
Float64 DDS_Float64 CORBA_double (unspecified)
Float128 DDS_Float128 CORBA_long_double (unspecified)
Char8 DDS_Char8 CORBA_char (unspecified)
Char32 DDS_Char32 CORBA_wchar (unspecified)
Boolean DDS_Boolean CORBA_boolean _Bool
Byte DDS_Byte (unspecified) (unspecified)
With respect to DDS::Boolean, only the values 0 and 1 are defined. Other values result in unspecified behavior.
With respect to DDS::Char32, compliant implementations may consider wchar_t to be an equivalent C type if the platform supports it and it is of sufficient size. Otherwise, they may map Char32 to an equivalent integer type.
7.5.1.1.2 C++
The Service shall provide typedefs with the following names to types available on the underlying platform that have the appropriate sizes and representations.
Programmers concerned with DDS portability should use the Plain Language Binding types in the table below. However, some may feel that using these types impairs readability. Others may have a requirement to integrate with CORBA. Therefore, compliant implementations have the following degrees of freedom:
• On platforms where a native C++ type (e.g. int) is guaranteed to be identical to a DDS type, the implementation may generate the equivalent native C++ type.
• On platforms compliant with the C99 specification, the implementation may generate equivalent C99-compatible types.
• The implementation may generate equivalent CORBA-module types.
These degrees of freedom are not expected to impact code portability, as all of these typedefs will map to the same underlying native C++ types.
Table 2. Plain Language Binding for Primitive Types in C++
DDS Type Plain Language Binding Type Equivalent CORBA Type Equivalent C99 Type
Int32 DDS::Int32 CORBA::Long [std::]int32_t
UInt32 DDS::UInt32 CORBA::ULong [std::]uint32_t
Int16 DDS::Int16 CORBA::Short [std::]int16_t
UInt16 DDS::UInt16 CORBA::UShort [std::]uint16_t
Int64 DDS::Int64 CORBA::LongLong [std::]int64_t
UInt64 DDS::UInt64 CORBA::ULongLong [std::]uint64_t
Float32 DDS::Float32 CORBA::Float (unspecified)
Float64 DDS::Float64 CORBA::Double (unspecified)
Float128 DDS::Float128 CORBA::LongDouble (unspecified)
Char8 DDS::Char8 CORBA::Char (unspecified)
Char32 DDS::Char32 CORBA::WChar (unspecified)
Boolean DDS::Boolean CORBA::Boolean bool or _Bool
Byte DDS::Byte CORBA::Octet (unspecified)
With respect to DDS::Boolean, only the values 0 and 1 are defined. Alternatively, the C++ keywords true and false may be used. Other values result in unspecified behavior.
With respect to DDS::Char32, compliant implementations may consider wchar_t to be an equivalent C++ type if the platform supports it and it is of sufficient size. Otherwise, they may map Char32 to an equivalent integer type. This means that DDS::Char32 may not be distinguishable from wchar_t or from integer types for purposes of overloading.
Types DDS::Boolean, DDS::Char8, and DDS::Byte may all map to the same underlying C++ type. This means that these types may not be distinguishable for the purposes of overloading.
All other mappings for basic types shall be distinguishable from one another for the purposes of overloading. That is, one can safely write overloaded C++ functions for DDS::Int16, DDS::UInt16, DDS::Int32, and so on.
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Discussion:
Issue 15704: Provide formal grammar for new IDL Type Representation constructs (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Uncategorized Issue
Severity:
Summary: The IDL Type Representation defines syntax for Type System concepts that were previously not expressible in IDL, such as annotations, maps, etc. This syntax is currently defined in prose and with examples. The specification should additionally provide a formal EBNF grammar.
Resolution:
Add EBNF grammar constructs to the relevant sections of the specification document.
Resolution: Add EBNF grammar productions to the relevant sections of the specification document.
To avoid whitespace sensitivity in these productions, modify the Alternative (comment-like) Syntax when multiple annotations are applied. Instead of writing this:
//@MyFirstAnnotation @MySecondAnnotation
…write this:
//@MyFirstAnnotation //@MySecondAnnotation
Revised Text: Modify section 7.3.1.2.3, Alternative Syntax, as follows:
• The first two sentences of the last paragraph (not including the trailing IDL example) are:
If multiple annotations are to be applied to the same element, all shall occur on the same line. As before, the at-sign of the first shall not be separated from the double slash with any white space; however, subsequent annotations shall be preceded by white space.
Replace these sentences with the following:
If multiple annotations are to be applied to the same element, the at-sign of each shall be preceded by a double slash and no white space.
• In the IDL example immediately following, replace this:
//@MyFirstAnnotation(greeting="Hello") @MySecondAnnotation
…with this:
//@MyAnnotation1(greeting="Hello") //@MyAnnotation2
In the section 7.3.1.2.1, Defining Annotations, after the sentence, “Annotation members have additional constraints that are described above in the Type System Model,” add the following table:
Table 3—Syntax for declaring an annotation type
@annotation local interface <interface> [ “:” <super_interface> ] “{” <attributes> “};” The “interface” <interface> is actually an annotation type containing the members <attributes>. It extends the type <super_interface>, if any.
local interface <interface> [ “:” <super_interface> ] “{” <attributes> “};” //@annotation The “interface” <interface> is actually an annotation type containing the members <attributes>. It extends the type <super_interface>, if any. The Alternative annotation syntax has been used for backward compatibility with legacy IDL compilers.
After the sentence “This value must be a valid IDL literal that is type compatible with the type of the member” in the same section, add the following table:
Table 4—Syntax for members of annotation types
[ <pre_annotations>] attribute <attrib_type> <attrib_name> [ default <attrib_value> ]; [ <post_annotations> ] The enclosing annotation has a member <attrib_name> of type <attrib_type>. That member may have other annotations applied to it, either before or (equivalently) after.
In section 7.3.1.2.2, Applying Annotations, after the sentence “More than one annotation may be … applied to the same element,” add the following table:
Table 5—Syntax for applying annotations
{ “@” <annotation_type_name> [ “(” <arguments> “)” ] }* Apply an annotation to a type or type member by prefixing it with an at sign (‘@’) and the name of the annotation type to apply. To specify the values of any members of the annotation type, include them in name=value syntax between parentheses.
{ “//@”<annotation_type_name> [ “(” <arguments> “)” ] }* Alternately and equivalently, apply an annotation to a type or type member by suffixing it with an annotation type name using slash-slash-at (“//@”) instead of the at sign by itself.
Append a new subsection to section 7.3.1, IDL Type Representation. This new subsection shall have the following contents:
7.3.1.12 Formal Grammar
The syntax of the IDL Type Representation is defined by the formal grammar provided in [IDL] as modified by the productions below. These modifications include extensions to existing productions as well as new productions.
Symbol Meaning
::= Is defined to be
| Alternatively
<text> Nonterminal
“text” Literal
* The preceding syntactic unit can be repeated zero or more times
+ The preceding syntactic unit can be repeated one or more times
{ } The enclosed syntactic units are grouped as a single syntactic unit
[ ] The enclosed syntactic unit is optional—may occur zero or one time
7.3.1.12.1 New Productions
The following new productions are defined:
<annotation> ::= <ann_dcl>
| <ann_fwd_dcl>
<ann_dcl> ::= <ann_header> “{” <ann_body> “}”
<ann_fwd_dcl> ::= “@annotation [ “(” “)” ] local interface” <identifier>
<ann_header> ::= “@annotation [ “(” “)” ] local interface” <identifier>
[ <ann_inheritance_spec> ]
<ann_body> ::= <ann_attr>*
<ann_inheritance_spec> ::= “:” <annotation_name>
<annotation_name> ::= <scoped_name>
<ann_attr> ::= <ann_appl> “attribute” <param_type_spec> <simple_declarator> [ “default” <const_exp> ] “;” <ann_appl_post>
<ann_appl> ::= { “@” <ann_appl_dcl> }*
<ann_appl_post> ::= { “//@” <ann_appl_dcl> }*
<ann_appl_dcl> ::= <annotation_name>
[ “(” [ <ann_appl_params> ] “)” ]
<ann_appl_params> ::= <const_exp>
| <ann_appl_param> { “,” <ann_appl_param> }*
<ann_appl_param> ::= <identifier> “=” <const_exp>
<struct_header> ::= <ann_appl> “struct” <identifier>
[ “:” <scoped_name> ]
<switch_type_name> ::= <integer_type>
| <char_type>
| <wide_char_type>
| <boolean_type>
| <enum_type>
| <octet_type>
| <scoped_name>
<map_type> ::= “map” “<” <simple_type_spec> “,”
<ann_appl> <simple_type_spec> “,”
<ann_appl_post> <positive_int_const> “>”
| “map” “<” <simple_type_spec> “,”
<ann_appl> <simple_type_spec>
<ann_appl_post> “>”
7.3.1.12.2 Modified Productions
The following productions from [IDL] are extended:
<union_type> ::= <ann_appl> …
<switch_type_spec> ::= <ann_appl> <switch_type_name>
<ann_appl_post>
<member> ::= …
| <ann_appl> <type_spec> <declarator> “;”
<ann_appl_post>
<case> ::= … <ann_appl_post>
<element_spec> ::= <ann_appl> …
<enumerator> ::= <ann_appl> …
<template_type_spec> ::= … | <map_type>
The following productions from [IDL] are replaced:
<struct_type> ::= <struct_header> “{” <member_list> “}”
<switch_type_spec> ::= <ann_appl> <switch_type_name>
<ann_appl_post>
<enum_type> ::= <ann_appl> “enum” <identifier>
“{” <enumerator> { “,”
<ann_appl_post> <enumerator> }* <ann_appl_post> “}”
<sequence_type> ::= “sequence” “<” <ann_appl> <simple_type_spec> “,” <ann_appl_post> <positive_int_const> “>”
| “sequence” “<” <ann_appl> <simple_type_spec> <ann_appl_post> “>”
<array_declarator> ::= <identifier> <ann_appl> <ann_appl_post> <fixed_array_size>+
The <definitions> production from [IDL] is modified as follows:
<definition> ::= <type_dcl> “;” <ann_appl_post>
| …
| <annotation> “;” <ann_appl_post>
(Note that the grammar above also includes productions pertaining to the resolution of issue 15707, Improve support for shared data.)
In section 7.3.1.9, Map Types, immediately before “For example,” add the following table:
Table 6—Syntax for map types
map “<” <key_type_name> “,” [ “@Shared” ] <value_type_name> [ “//@Shared” ] “>” The type maps from elements of type <key_type_name> to elements of type <value_type_name>. The map has no bound. The value elements may be shared; in that case, they shall be marked with the corresponding built-in annotation, either before or (equivalently) after.
map “<” <key_type_name> “,” [ “@Shared” ] <value_type_name> “,” [ “//@Shared” ] <bound> “>” The type maps from elements of type <key_type_name> to elements of type <value_type_name>. The maximum number of key-value pairs in the map is <bound>. The value elements may be shared; in that case, they shall be marked with the corresponding built-in annotation, either before or (equivalently) after.
In section 7.3.1.10.1, Inheritance, replace the existing grammar production in the text with the following table:
Table 7—Syntax for structure inheritance
struct <struct_name> [ “:” <super_struct_name> ] “{” <members> “};” The structure <struct_name> extends the base structure <super_struct_name>, if any.
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Discussion:
Issue 15705: Provide minimal backwards-compatible conformance point (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Real-Time Innovations (Dr. Gerardo Pardo-Castellote, Ph.D., gerardo(at)rti.com)
Nature: Uncategorized Issue
Severity:
Summary: One of the reasons for the development of the DDS-XTypes specification was the prior lack of explicitness and formality in the DDS type system and in its representations. DDS-XTypes addresses this need—and simultaneously extends both the type system and its representations. It would help the discourse about DDS systems, and the modeling of DDS systems, if a subset of DDS-XTypes were defined that identified only those parts of DDS and/or DDS-RTPS that were in broad use before the existence of DDS-XTypes.
This subset would include the following:
• A subset of the Type System:
o The full set of primitive types
o Strings of narrow or wide characters
o Sequences
o Aliases
o Structures without inheritance and with “final” extensibility
o Enumerations
o Unions
• The IDL Type Representation of the above
• The CDR Data Representation of the above
• The Plain Language Binding for the above
Resolution: Identify the above subset of the specification in a new, non-normative, annex
Revised Text: Append the following subsection to section 2, Conformance Criteria:
2.3 Characterizing Legacy DDS Implementations
The non-normative Annex G describes those portions of this specification that are believed to be supported by most DDS and RTPS implementations, including those that do not comply with this specification. That annex is provided for informational purposes only and does not constitute a formal compliance point for this specification.
Add the following annex to the end of the document:
Annex G: Characterizing Legacy DDS Implementations
Prior to the adoption of this specification, no formal definition existed of the DDS Type System or of those portions of IDL that corresponded to it. This annex provides a non-normative description of what is believed to be the consensus Type System, Type Representation, Data Representation, and Language Binding of DDS implementations that do not conform to this specification. It is provided for the convenience of implementers and evaluators who may wish to compare and contrast DDS implementations or to distinguish those parts of this specification that are novel from those that merely codify previous de-facto-standard practice.
G.1 Type System
The following portions of the Type System are believed to be supported by the majority of DDS implementations, regardless of their compliance with this specification:
• Namespaces and modules.
• All primitive types, albeit named according to their mappings in the IDL Type Representation.
• Enumerations of bit bound 32 with automatically assigned enumerator values.
• Aliases, typically referred to as “typedefs” based on their mappings in the IDL Type Representation.
• Arrays, both single-dimensional and multi-dimensional.
• Sequences, both bounded and unbounded.
• Strings of narrow or wide characters, both bounded and unbounded.
• Structures without inheritance. User-defined structures have final extensibility. Members are typically non-optional, non-shared, and do not expose member IDs. DDS-RTPS-compliant implementations support mutable extensibility and the must_understand attribute with respect to the built-in topic data types. Otherwise, these attributes are not generally supported. Key members are generally supported.
• Unions with final extensibility and without key members. Discriminators of wide character and octet types are not generally supported.
G.2 Type Representation
The IDL Type Representations of those portions of the Type System enumerated above are generally supported.
The XSD Type Representation is based heavily on the “CORBA to WSDL/SOAP Interworking Specification” and as such may to some extent be said to predate this specification. However, support for representing types in XSD is not widespread among DDS implementations that do not comply with this specification.
G.3 Data Representation
The Extended CDR Data Representations of those portions of the Type System enumerated above are generally supported. The exception is the extended parameter ID and length facility based on PID_EXTENDED, which is not generally supported.
G.4 Language Binding
The Plain Language Bindings of those portions of the Type System enumerated above are generally supported. The exception is the set of DDS-module primitive types in C and C++; use of the CORBA-module equivalents is more typical.
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Discussion:
Issue 15706: Reduce size of DynamicData API (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The DynamicData class, part of the Dynamic Language Binding, has a huge API consisting of many dozens of methods. This large size makes the API harder to understand and reuse.
Resolution: Change the design of the class to reduce the size of the API. Specifically:
• Replace navigation by name, ID, or index with navigation by ID only. Provide conversion methods to obtain the ID based on either of the other two. When the object is of some type for which the concept of “member ID” is not applicable (e.g. sequences), the user can nevertheless convert from the index to a “member ID” and look up based on that. It is not necessary to specify the mapping from index to ID in such cases; all that matters is that the implementation can provide one. (Where the range of indexes and IDs overlap, the “mapping” could even be a no-op.)
• Coalesce access to sequences and arrays.
Revised Text: Make the following changes in the table DynamicType properties and operations in section 7.5.2.8, DynamicType, and in the sections that follow:
1. Rename the property member to member_by_name in the table and in section 7.5.2.8.9, Property: member.
2. Rename the property member_by_id to member in the table and in section 7.5.2.8.10, Property: member_by_id. Reflect the name change from member to member_by_name in the text of the first bullet in this subsection.
In the IDL file and in the corresponding annex, apply the following changes to the DynamicData class:
- DDS::ReturnCode_t get_member(
+ DDS::ReturnCode_t get_member_by_name(
inout DynamicTypeMember member,
in ObjectName name);
- DDS::ReturnCode_t get_all_members(
+ DDS::ReturnCode_t get_all_members_by_name(
inout DynamicTypeMembersByName member);
- DDS::ReturnCode_t get_member_by_id(
+ DDS::ReturnCode_t get_member(
inout DynamicTypeMember member,
in MemberId id);
- DDS::ReturnCode_t get_all_members_by_id(
+ DDS::ReturnCode_t get_all_members(
inout DynamicTypeMembersById member);
Make the following changes in the table DynamicData properties and operations in section 7.5.2.10, DynamicData:
1. Remove the existing value and value_at_index rows. Rename value_by_id to simply value.
2. Replace the descriptor_at_index row with the following row:
descriptor MemberId -> MemberDescriptor
3. Add the following rows immediately below the Operations header row:
get_member_id_by_name MemberId
name string<Char8,256>
get_member_id_at_index MemberId
index UInt32
4. Remove the existing clear_value and clear_value_at_index rows. Rename clear_value_by_id to simply clear_value.
5. Remove the existing loan_value and loan_value_at_index rows. Rename loan_value_by_id to simply loan_value.
Make the following changes to section 7.5.2.10.1, Properties: value, value_at_index, and value_by_id:
1. Rename it to Property: value; Operations: get_member_id_by_name and get_member_id_at_index.
2. The second bullet reads, “If this object is of a sequence or string type, …. These elements do not have names or member IDs; they must be accessed by index.” Rewrite the second sentence as, “These elements must be accessed by index; the mapping from index to member ID is unspecified.”
3. The first two sentences of the fourth bullet read, “If the object is of an array type, …. These elements do not have names or member IDs; they must be accessed by index.” Rewrite the second sentence as, “These elements must be accessed by index; the mapping from index to member ID is unspecified.”
4. The fifth bullet reads, “If the object is of a bit set type, …. These values do not have member IDs.” Rewrite the last sentence as, “The mappings from name and index to member ID are unspecified.”
5. Remove the last paragraph, which begins with, “These three properties…”.
Replace section 7.5.2.10.2, Property: descriptor_at_index, with the following:
7.5.2.10.2 Property: descriptor
This property shall contain a descriptor for each value in this object, identified by the member ID. The meaning of the member ID shall be as it is described for the value property.
Rename the section 7.5.2.10.3, Clearing Values: Operations clear_value, clear_value_by_id, clear_value_at_index, clear_all_values, and clear_nonkey_values, to Clearing Values: Operations clear_value, clear_all_values, and clear_nonkey_values.
Rename the section 7.5.2.10.6, Operations: loan_value, loan_value_by_id, loan_value_at_index, and return_loaned_value, to Operations: loan_value and return_loaned_value.
In the section 7.5.2.10.8, Platform-Specific Model: IDL, the second-to-last bullet in the first list reads:
Arrays and sequences of primitive types and strings have their own expansions qualified by the element type’s qualifier followed by “array” or “sequence” respectively. Array expansions accept additional arguments—offset and length—to properly support the safe use of sub-arrays in all languages.
Rewrite this bullet as follows:
Sequences of primitive types and strings have their own expansions in which the name of the property has been made plural. Arrays shall also be accessible through these methods.
In the IDL file and in the corresponding annex, apply the following changes to the DynamicData class.
1. Remove obsolete helper array typedefs. Delete the constant UNSPECIFIED_ARRAY_LENGTH and the *Array typedefs that use it.
2. Add operations to convert from name or index to member ID:
boolean equals(in DynamicData other);
+ MemberId get_member_id_by_name(in ObjectName name);
+ MemberId get_member_id_at_index(in unsigned long index);
+
DDS::ReturnCode_t clear_all_values();
3. Clear members by ID only:
- DDS::ReturnCode_t clear_value(in ObjectName name);
- DDS::ReturnCode_t clear_value_by_id(in MemberId id);
- DDS::ReturnCode_t clear_value_at_index(in unsigned long index);
+ DDS::ReturnCode_t clear_value(in MemberId id);
4. Loan values by ID only:
- DynamicData loan_value(in ObjectName name);
- DynamicData loan_value_by_id(in MemberId id);
- DynamicData loan_value_at_index(in unsigned long index);
+ DynamicData loan_value(in MemberId id);
5. Get and set single-valued members by ID, not by name. In each operation of the form [get|set]_<type>_value, replace the parameter “in ObjectName name” with the parameter “in MemberId id”.
6. Remove unnecessary overloads. Remove all operations of the following forms:
• [get|set]_<type>_value[_by_id|_at_index]
• [get|set]_<type>_array_value
• [get|set]_<type>_array_value[_by_id|_at_index]
• [get|set]_<type>_seq_value[_at_index]
7. Get and set multi-valued members by ID, and get and set arrays and sequences the same way. Rename each operation of the form [get|set]_<type>_seq_value_by_id to [get|set]_<type>_values.
8. Modify the descriptor-related methods as follows:
- unsigned long get_descriptor_at_index_count();
- DDS::ReturnCode_t get_descriptor_at_index(
+ DDS::ReturnCode_t get_descriptor(
inout MemberDescriptor value,
- in unsigned long idx);
- DDS::ReturnCode_t set_descriptor_at_index(
- in unsigned long idx,
+ in MemberId id);
+ DDS::ReturnCode_t set_descriptor(
+ in MemberId id,
in MemberDescriptor value);
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Issue 15707: Improve support for shared data (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The Type System currently allows a type designer to specify that the storage for a type member may be located outside of the type itself. (This is an important capability when, for example, objects of the member’s type are very large.) However, it provides insufficient flexibility when such objects are stored in collections: the entire collection may be stored externally, but the collection members must be stored contiguously.
Resolution:
Enhance the Type System to allow collection elements to be shared, not just members of aggregation types. In the IDL Type Representation, this shall be expressed syntactically by the application of the built-in @Shared annotation to the collection member type.
Resolution: Enhance the Type System to allow collection elements to be shared, not just members of aggregation types. In the IDL Type Representation, this shall be expressed syntactically by the application of the built-in @Shared annotation to the collection member type.
Note that this resolution does not provide a general-purpose annotation facility for collection members. It merely provides an appropriate Type System property and Type Representation syntax to express it.
Sequences:
sequence<@Shared Foo, 42> sequence_of_foo;
// or:
sequence<
Foo, //@Shared
42
> sequence_of_foo;
Arrays:
Foo array_of_foo @Shared [42];
// or:
Foo array_of_foo //@Shared
[42];
Maps:
map<string, @Shared Foo, 42> map_of_string_to_foo;
// or:
map<
string,
Foo, //@Shared
42
> map_of_string_to_foo;
Strings: Strings will not support this feature (i.e. individual characters cannot be stored externally to the string itself). Since string elements can only be individual narrow or wide characters, this “limitation” in theory is not expected to be a limitation in practice.
Revised Text: Update the Type System Model as follows:
Add a Boolean property element_shared with default value false to the Collection classifier depicted in the figure Collection Types in section 7.2.2.3.4, Collection Types. Add the constraint {element_shared = false} to the String classifier. Make the corresponding changes in the XMI file.
Move the section 7.2.2.3.5.7, Shareable Data, after section 7.2.2.3.7, Verbatim Text, and promote it to a level-five section: 7.2.2.3.8. The second-to-last paragraph of that section begins, “Each member of an aggregated type … may be optionally marked as shareable.” Append an additional sentence: “Likewise, the elements of a collection type may be optionally marked as shareable.”
Update the IDL Type Representation as follows:
Add the following immediately after section 7.3.1.3.3, Key Members:
7.3.1.3.4 Shareable Data
To declare a member of an aggregation type shareable, apply the built-in “Shared” annotation to that member like this:
@Shared long my_aggregation_member;
or:
long my_aggregation_member; //@Shared
To declare the elements of a collection type shareable, apply the annotation to the collection declaration like this:
Sequences:
sequence<@Shared Foo, 42> sequence_of_foo;
or:
sequence<
Foo, //@Shared
42
> sequence_of_foo;
Arrays:
Foo array_of_foo @Shared [42];
or:
Foo array_of_foo //@Shared
[42];
Maps:
map<string, @Shared Foo, 42> map_of_string_to_foo;
or:
map<
string,
Foo, //@Shared
42
> map_of_string_to_foo;
The equivalent definition of the built-in annotation type follows:
@Annotation
local interface Shared {
attribute boolean value default true;
};
The grammar productions that define the syntax above are included in the resolution to issue 15704, Provide formal grammar for new IDL Type Representation constructs.
Update the XML Type Representation as follows:
Append the following paragraph to section 7.3.2.3, Collection Types:
The element_shared property of the Type System Model shall be represented by an attribute elementShared.
In the XSD file that defines this Type Representation, and in the corresponding annex, append the following attribute to the complex types “memberDecl” and “typedefDecl”:
<xs:attribute name="elementShared"
type="xs:boolean"
use="optional"/>
Update TypeObject as follows:
Append the following sentence to section 7.3.4.3, Collection Types:
It also identifies whether or not the elements of the collection are shared.
In the IDL file and in the corresponding annex, append the following enumerator to the enumeration type CollectionTypeMemberId:
@Value(101) ELEMENT_SHARED_COLLECTIONTYPE_MEMBER_ID
Also append the following member to the structure type CollectionType:
@ID(ELEMENT_SHARED_COLLECTIONTYPE_MEMBER_ID) boolean element_shared;
Actions taken:
October 8, 2010: received issue
July 11, 2011: closed issue
Issue 15946: All IDL should use local interfaces (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Remedy IT (Mr. Johnny Willemsen, jwillemsen(at)remedy.nl)
Nature: Clarification
Severity: Minor
Summary: All IDL should be using local interfaces, not regular interfaces, please add the keyword local to all interfaces
Resolution: Defer this issue until the corresponding one is addressed in DDS itself.
Revised Text:
Actions taken:
January 13, 2011: received issue
Discussion: The only non-local interfaces in the DDS-XTypes API are specializations of “generic” interfaces defined by the DDS specification. It is not appropriate to change these to local interfaces until the corresponding change is made in the DDS specification itself. An issue has already been filed for the DDS RTF to make this change.
Disposition: Deferred
Issue 15969: Anonymous types should not be used in IDL examples and the TypeObject representation IDL (dds-xtypes-ftf)
Click here for this issue's archive.
Nature: Clarification
Severity: Significant
Summary: IDL Anonymous type declarations should not be used in IDL examples and the 'dds_xtypes.idl' file as this form of type declaration has been deprecated by the latest CORBA specs and will cause compatibility problems with modern CORBA IDL compilers.
Resolution: • In the definitions of GroupDataQosPolicy, TopicDataQosPolicy, and UserDataQosPolicy, replace sequence<octet> with ByteSeq. This change removes occurrences of an anonymous type inherited from DDS itself.
• In the definitions of TopicBuiltinTopicData, PublicationBuiltinTopicData, and SubscriptionBuiltinTopicData, replace the type of the name, topic_name, and type_name fields (string<256>) with the existing typedef ObjectName. This change removes occurrences of an anonymous type inherited from DDS itself.
• In the definitions of Bytes and KeyedBytes, replace sequence<octet> with ByteSeq.
• Introduce two typedefs: “VerbatimLanguage” and “VerbatimPlacement”, the first a string bounded at 32 characters and the second at 128 characters. Change the type of the member Verbatim::language to VerbatimLanguage and the type of Verbatim::placement to VerbatimPlacement.
Revised Text: In the IDL file and in the corresponding appendices, make the changes described above. Insert the definitions of VerbatimLanguage and VerbatimPlacement directly before the definition of Verbatim. (These are the only new types to be introduced.)
Actions taken:
January 18, 2011: received issue
July 19, 2012: closed issue
Discussion: This issue arrived after the comment deadline and should be taken up by the next FTF/RTF.
Disposition: Deferred
Issue 15976: Restrictions on MAP key element type not (clearly) documented/specified (dds-xtypes-ftf)
Click here for this issue's archive.
Nature: Clarification
Severity: Significant
Summary: Allthough the specification of the MAP_TYPE in paragraph 7.2.2.3.4 refers to restrictions for key element type this is not formalized in either the specification for the IDL representation for maps or the C++ language mapping.
It should be clearly noted (for the IDL representation in bnf) that the key element type is restricted to integer and string types only.
The current IDL representation specs for map leave all options open for defining the key element type.
Although the specs in paragraph 7.2.2.3.4 describe the use of other element types as 'behaviour undefined' this is not clear enough as the chosen C++ representation simply will not work when f.i STRUCT or UNION types are chosen as key element type.
Resolution: In section 7.2.2.3.4, provide a rationale for the restriction on key types.
In the section on the Plain Language Binding for map types (7.5.1.3), clarify that the use of an unsupported key element type shall result in a compilation error. Further indicate that in C++ (section 7.5.1.3.1), the Compare function implementation shall consider the character contents of strings; it shall not compare pointer values.
Revised Text: In section 7.2.2.3.4, “Collection Types”, after the table, there is a bullet “Element type”. The last sentence of that bullet ends, “…behavior of maps with other key element types is undefined and may not be portable.” Append the following:
(Design rationale, non-normative: Support for arbitrary key element types would require implementers to provide uniform sorting and/or hashing operations, which would be impractical on many platforms. In contrast, these operations have straightforward implementations for integer and string types.)
Insert the following new paragraph after the first paragraph of the introduction to section 7.5.1.3:
As indicated in Section 7.2.2.3.4 above, implementers are only required to support keys of integer and string types. If a Type Representation compiler encounters a key type that it does not support, it shall fail with an error.
The last paragraph of section 7.5.1.3.1 currently reads, “The instantiations for the Compare and Allocator parameters are undefined and may or may not take their default values.” Replace this sentence with the following:
When a map has keys of a string type, the Compare function shall operate on the character contents of the strings; it shall not operate on the strings’ pointer values (as std::less does). The instantiations for the Compare and Allocator parameters are otherwise undefined and may or may not take their default values.
Actions taken:
January 21, 2011: received issue
July 19, 2012: closed issue
Discussion: [Rick] To avoid forcing implementers to define hashing and/or total ordering for all types, we only require vendors to support keys of string and integer types: they are trivial to order and/or hash.
At the same time, it is not desirable to prevent vendors from supporting keys of other types. For example, platforms like Java and .Net provide object hashing as a uniform operation, so there is no reason why vendors focusing on those platforms should not be able to leverage that capability to the benefit of their customers.
Implementations that strictly adhere to the standard should simply issue a compile error upon seeing a construct that is unspecified and unsupported. Perhaps we just need to make this clearer in section 7.2.2.3.4.
[Martin] Yes […]. I would prefer a clear explanation that supporting the use of complex types like STRUCT, UNION etc. will require non-trivial support for non-default ordering/hashing options.
Also I would prefer a clear statement like 'when an IDL compiler implementation does not support <these kind of types as keys> it should issue a compile error'.
BTW, rehashing this I realized that […] the default instantiation of the less<> template for the standard mapping of string types (char* and CORBA::WChar*) is of little or no use for actual applications. […T]he map is actually indexed by the hashed pointer value of the strings instead of (what he will expect) by the string content.
So, I feel the spec should either state that for string keys the C++ mapping is required to provide a “Compare” specialization or put them in the same category as STRUCT, UNION etc.
Issue 15981: C++ mapping MAP type needs member access semantics specification (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Remedy IT (Mr. Martin Corino, mcorino(at)remedy.nl)
Nature: Clarification
Severity: Significant
Summary: The C++ mapping for the new MAP type needs a precise specification of member (or key) access semantics and memory management rules like the CORBA C++ mapping describes for the SEQUENCE type on pages 36-42 (par. 4.15) of the C++ language mapping, version 1.2, formal/2008-01-09.
Resolution: Close this issue without making any change.
Disposition: Closed, no change
Revised Text:
Actions taken:
January 24, 2011: received issue
July 19, 2012: closed issue
Discussion: [Rick] I don’t understand what the specification is missing. If using the equivalent IDL, the IDL-to-C++ mapping defines the semantics. And if using std::map, that container defines its own semantics.
The spec says in 7.5.1.3.1: “An IDL map type shall be transformed into an instantiation of the std::map template such that the Key parameter is the C++ type corresponding to the IDL key element type and the T parameter is the C++ type corresponding to the IDL value element type."
For example, IDL map<long, string>: the mapping for long in C++ is in 7.5.1.1.2: DDS::Int32, CORBA::Long, or int32_t are all legal options. The mapping for string is not overridden; the previously defined language binding remains in force: "This mapping reuses the OMG-standard IDL-to-language mappings..." at the beginning of 7.5.1.
[Martin] This certainly clears things up for me.
Issue 16007: DDS-XTypes @Key annotation Issue (dds-xtypes-ftf)
Click here for this issue's archive.
Source: PrismTech (Dr. Angelo Corsaro, PhD., angelo.corsaro(at)prismtech.com)
Nature: Uncategorized Issue
Severity:
Summary: The @key annotation is currently defined as:
@Annotation
local interface Key {
attribute boolean value default true;
};
Now suppose I have the following topic type:
struct ATopicType {
string a; @Key @ID(20)
long b;
long c; @Key @ID(10)
};
What is the key (a,b) or (b,a)? What if there were no annotations?
The order of the key should be formally defined by the spec as this has an impact, among other things, on the computation of the keyhash.
The rule could be as simple as taking the key element in the same order of the attribute ID. The other option is to extend the key to support a value, yet I think the first alternative is more orthogonal.
Resolution: The key hash is currently calculated in the following way, according to the DDS-RTPS specification:
1. Serialize the key members…
a. …in their declaration order
b. …in big-endian CDR format
2. If the serialization is less than or equal to 128 bits, that is the key hash.
3. Otherwise, apply an MD5 hash to reduce the result to 128 bits.
Update step (1a) above such that key fields are always serialized in ascending order by member ID rather than by declaration order. Note that this change applies only when calculating the key hash, not at any other time.
This change is backwards compatible with pre-XTypes DDS implementations, because legacy type definitions will lack @ID annotations, and hence all members will always be in ascending ID order.
Revised Text: Add the following new subsection at the end of section 7.6, “Use of the Type System By DDS”:
7.6.5 Interoperability of Keyed Topics
As described in [RTPS] section 9.6.3.3, “KeyHash (PID_KEY_HASH)”, the key hash for a given object of a keyed type is obtained by first serializing the values of the key members in their declaration order. The algorithm described in that section shall be amended such that key member values shall be serialized in the ascending orders of their member IDs.
Design rationale (non-normative): This change ensures that key hash values remain stable in the face of member order permutations. It is backwards compatible, because this specification interprets all pre-existing type definitions (which lack explicit member IDs) as implying member IDs in declaration order. Thus all pre-existing key hashing algorithm implementations already conform to this specification when applied to pre-existing type definitions.
In section 2.1, “Programming Interface Conformance”, in the bullet that refers to section 7.6, “Use of the Type System by DDS”, append “…excluding ‘Interoperability of Keyed Topics’ (Section 7.6.5)”.
In section 2.2, “Network Interoperability Conformance”, make the following changes to the bullets list of sections:
• Remove the first bullet, which ends “…up to and including Scope”. This bullet does not accurately reflect the structure of the document since the reformatting that occurred in the Beta 1 specification.
• To the bullet that refers to section 7.6, “Use of the Type System by DDS”, append the text, “…and well as ‘Interoperability of Keyed Topics’ (Section 7.6.5)”.
Actions taken:
February 2, 2011: received issue
July 19, 2012: closed issue
Discussion: [Rick] The specification today deliberately does not consider member order and member ID to be the same thing. The only relationship between them is that the order is used to infer the ID in case the ID is not otherwise specified. Per the spec today, the key above is always (a, c) regardless of whether an ID annotation is there.
My understanding of this issue is that the spec currently defines key assignability of mutable types based on IDs and key type assignability, independent of order. Therefore, if the order of the key fields changes in a mutable type, the specification says the types should remain assignable. (If the type is not mutable, changing the order of any fields, keys or not, will prevent assignability.) However, because of the way the key hash is calculated, they will not in fact be interoperable, because the key hashes will change.
Therefore, we must either specify that key fields cannot be reordered, or we must define some canonical ordering of key fields to be used when calculating the key hash.
Issue 16097: Different applications in the same domain may associate the same Topic with different types (dds-xtypes-ftf)
Click here for this issue's archive.
Source: PrismTech (Dr. Angelo Corsaro, PhD., angelo.corsaro(at)prismtech.com)
Nature: Uncategorized Issue
Severity:
Summary: Based on the DDS-XTypes specification, different applications in the same domain may associate the same Topic with different types. As a result through discovery it should be possible to find all such definitions. However this is not currently possible with the DDS v1.2 specification and the DDS-XTypes does not provide an extension for this API.
Resolution: The following resolution is related to the resolutions of issues #15702, #16007, and #16720.
Abstract Model:
A given topic is associated with one or more types. (This is a “topic” in the “virtual” system-wide sense independent of the way a topic is reflected through the API to any given component.) A given writer or reader endpoint is associated with one of the types of its topic.
If a writer and a reader share the same topic, then it is assumed that they are intended to communicate with one another. At that point, the two endpoints are evaluated to make sure that they are type-compatible—see the resolution to issue #15702.
On the Network:
The Topic, Publication, and Subscription built-in topic data types already contain a type_name member. In addition, these data types shall contain a list of type definitions encapsulated in a TypeObject (defined in the resolution to issue #15702). In the Publication and Subscription cases, this “list” shall consist of only a single element. In the Topic case, it may consist of multiple elements.
There is a related issue that will be addressed in the context of this issue, because it will improve matching performance and prepare the specification for the possibility of future support for polymorphic readers and writers: Today, the TypeObject type representation is not amenable to compact representation or fast comparison: types are identified by a “type ID” that an implementation can generate any way that it wishes. This approach has two weaknesses: (1) A definition is not self-contained—it requires a full tree of the types it uses to also be present. Also, (2) two types may be logically “equal” but may not have the same binary representation, because they refer to the “same” types by different indexes. Therefore, modify the TypeObject representation to replace ad hoc type indexes with deterministic hashes. (The lower-order 64-bits of an MD5 hash of the TypeObject representation of the type is sufficient: a system would require 1e6 types before it would have a 1e-6 probability of a collision. A full 128-bit hash could be used, but the overhead would be significant when data sample sizes are very small.) This change will address both of the above issues. It will also allow implementations to flexibly truncate the amount of detail they put on the network. The overhead can be further reduced if we assume that most members will be of primitive type—we can define a type ID as a union of a (small) primitive type ID and a (hashed, big) complex type ID.
In the Application Code:
As always, a Topic object is not the real virtual topic—it is only a local proxy. We retain the constraint that a single local Topic object is associated with only a single type. This constraint keeps the programming model the same for both XTypes-supporting and non-XTypes-supporting implementations, and it keeps the mental model simple for the majority of applications, which will not be aware of the presence of multiple types in their topics.
To allow endpoints of the same virtual topic to be associated with different types, we make one change: The names of local Topic objects do not need to be unique within a given DomainParticipant, provided that all of those Topics of the same name really represent different slices of the same virtual topic—in other words, they must all have the same name.
Revised Text: Insert the following new subsections at the beginning of section 7.6, “Use of the Type System by DDS”:
7.6.1 Topic Model
A DDS topic exists in two senses of the word:
1. On the network, with respect to interoperability: This is the sense in which we say that a reader and a writer share the “same” topic, even though they obtain the topic’s definition independently within their implementations.
2. In application code, with respect to portability: Each component that uses a topic creates or looks up a local proxy for that topic.
On the network, a given topic is associated with one or more types. A given writer or reader endpoint belongs to one topic and is associated with one of the types of that topic. If a writer and a reader share the same topic, it is assumed that they are intended to communicate with one another. At that point, the Service evaluates the two endpoints to make sure that they specify consistent types (see Section 7.6.1.3.2, “Rules for Type Consistency Enforcement”) and compatible QoS (see [DDS]).
In application code, a topic is associated with a single type (as has always been the case in the [DDS] API). [Footnote: Design rationale (non-normative): This constraint keeps the programming model the same for both XTypes-supporting and non-XTypes-supporting implementations, and it keeps the mental model simple for the majority of programmers, who will not be aware of the presence of multiple types in their topics.] Therefore, multiple API topics may correspond to (different views of) the same network topic. A given reader or writer endpoint is associated with one of them. See Section 7.6.2, “Local API Extensions”, for definitions of the programming interfaces that support this polymorphism.
Insert the following after section after 7.6.2, “Endpoint Matching”:
7.6.2 Local API Extensions
The following subsections define changes in behavior to existing operations defined by [DDS].
7.6.2.1 Operation: DomainParticipant::create_topic
As defined in [DDS], a local Topic object is uniquely identified by its name. In implementations conforming to this specification, that restriction shall be removed. The Service may instantiate multiple objects of the same name, provided that all of them represent type-based subsets of “the same” network topic; therefore, they must have consistent QoS with one another.
7.6.2.2 Operation: DomainParticipant::lookup_topicdescription
As defined in [DDS], a local TopicDescription object is uniquely identified by its name. In implementations conforming to this specification, that restriction shall be removed. This operation shall return one of the local TopicDescription objects of the given name; which one is unspecified.
Next, update the definition of TypeObject:
The first paragraph of section 7.3.4.1 ends, “…(b) (optionally) identifies a single type within that library.” Change this to, “…(b) identifies some number of types within that library.”
In section 7.3.4.1.1, “References Among Types”, replace the first paragraph with the following:
Rather than refer to one another by name, as in some other Type Representations (such as IDL), types within this Type Representation refer to one another by a “type ID” for the sake of compactness. The representation of the type ID depends on whether the type is primitive or constructed—it is a union. To save space, primitive types are identified for a small integral ID. Constructed types are identified by a hash; see Section 7.3.4.1.1, “Type Hierarchy”, below.
In section 7.3.4.1.1, “Type Hierarchy”, add the following new paragraph immediately after the bulleted list:
The type ID of a constructed type shall be calculated in the following way.
1. Serialize the type (as an ArrayType, StructureType, etc. as appropriate) in big-endian CDR Data Representation. Note that this step is recursive, as the serialization may require calculating the IDs of types used by this type—for example, to type structure members.
2. Apply the MD5 hash algorithm to that serialized representation.
3. The type ID is the less-significant 64 bits of the hash, represented as an unsigned 64-bit integer. [Footnote: Design rationale (non-normative): The entire 128 bits could have been used. However, two factors argue in favor of a 64-bit hash: (1) It reduces the size of the TypeObject by approximately eight bytes per type member, decreasing network overhead and speeding the discovery process. (2) The availability of a 64-bit integer type makes dealing with data of this size simple and fast. Note that 64 bits provide an extremely small chance of collision, even in a system with many thousands of types.]
Section 7.3.4.2, “Primitive Types”, ends with the sentence, “The assigned ID values for constructed types must not overlap with these predefined values.” Remove this sentence; it is unnecessary now.
In the IDL file and in “Annex B: Representing Types with TypeObject”, the definition of the TypeId type is given as a typedef followed by a series of constants corresponding to the primitive types. Replace this typedef and these constants with the following:
typedef short PrimitiveTypeId;
const PrimitiveTypeId NO_TYPE_ID = NO_TYPE;
const PrimitiveTypeId BOOLEAN_TYPE_ID = BOOLEAN_TYPE;
const PrimitiveTypeId BYTE_TYPE_ID = BYTE_TYPE;
const PrimitiveTypeId INT_16_TYPE_ID = INT_16_TYPE;
const PrimitiveTypeId UINT_16_TYPE_ID = UINT_16_TYPE;
const PrimitiveTypeId INT_32_TYPE_ID = INT_32_TYPE;
const PrimitiveTypeId UINT_32_TYPE_ID = UINT_32_TYPE;
const PrimitiveTypeId INT_64_TYPE_ID = INT_64_TYPE;
const PrimitiveTypeId UINT_64_TYPE_ID = UINT_64_TYPE;
const PrimitiveTypeId FLOAT_32_TYPE_ID = FLOAT_32_TYPE;
const PrimitiveTypeId FLOAT_64_TYPE_ID = FLOAT_64_TYPE;
const PrimitiveTypeId FLOAT_128_TYPE_ID = FLOAT_128_TYPE;
const PrimitiveTypeId CHAR_8_TYPE_ID = CHAR_8_TYPE;
const PrimitiveTypeId CHAR_32_TYPE_ID = CHAR_32_TYPE;
union _TypeId switch (TypeKind) {
case BOOLEAN_TYPE:
case BYTE_TYPE:
case INT_16_TYPE:
case UINT_16_TYPE:
case INT_32_TYPE:
case UINT_32_TYPE:
case INT_64_TYPE:
case UINT_64_TYPE:
case FLOAT_32_TYPE:
case FLOAT_64_TYPE:
case FLOAT_128_TYPE:
case CHAR_8_TYPE:
case CHAR_32_TYPE:
PrimitiveTypeId primitive_type_id;
default:
unsigned long long constructed_type_id;
};
typedef sequence<_TypeId> TypeIdSeq;
The TypeObject type contains a member the_type, defined like this:
@Optional _TypeId the_type;
Change the definition of this member like this:
TypeIdSeq the_type;
Actions taken:
March 25, 2011: received issue
July 19, 2012: closed issue
Discussion: It is not feasible to prevent more than one type from existing for the same topic:
• Within a given version of a system, different endpoints may publish and subscribe to different types within a polymorphic inheritance hierarchy.
• As a system evolves, new components may be integrated that use updated versions of previously existing data types.
This is an issue not only within a single domain (i.e. a discovery issue), but also within a single participant in that domain (i.e. a local entity management issue). If it is legal for variants of a topic to be associated with multiple related types (it is), then more than one of those variants should be able to exist locally within the same participant. We should address the local and remote aspects of this issue at the same time.
Issue 16236: Annex D (“DDS Built-in Topic Data Types”) is out of sync with IDL file (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The equivalent_type_name and base_type_name fields from TopicBuiltinTopicData, PublicationBuiltinTopicData, and SubscriptionBuiltinTopicData are described in the prose of the specification and are reflected in the IDL file. However, they missing from the annex; they need to be added.
Resolution: • Replace all literal-formatted text in Annex A (beginning with “<?xml…”) with the contents of the XSD file accompanying the specification.
• Replace all literal-formatted text in Annex B (beginning with “module DDS”) with the corresponding content from the IDL file accompanying the specification.
• Replace all literal-formatted text in Annex C (beginning with “module DDS”) with the corresponding content from the IDL file accompanying the specification.
• Replace all literal-formatted text in Annex D (beginning with “module DDS”) with the corresponding content from the IDL file accompanying the specification.
• Replace all literal-formatted text in Annex E (beginning with “module DDS”) with the corresponding content from the IDL file accompanying the specification.
• Replace all literal-formatted text in Annex F (beginning with “module DDS”) with the corresponding content from the IDL file accompanying the specification.
Revised Text: See the description under “Resolution” above.
Actions taken:
May 4, 2011: received issue
July 19, 2012: closed issue
Discussion: Any annex that contains a copy of a machine-readable file should be considered a convenience for the reader, so that s/he can see everything in a single file. We should fix this issue, and avoid future similar issues, by simply replacing the annex content in bulk with the analogous content from the appropriate machine-readable file.
This issue resolution should be implemented and voted on in the last round before the FTF report is submitted to ensure that it contains all relevant changes.
Issue 16237: No way to get or set length of collection-typed DynamicData objects (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Brookhaven National Laboratory (Mr. Nikolay Malitsky, malitsky(at)bnl.gov)
Nature: Uncategorized Issue
Severity:
Summary: A DynamicData object may encapsulate the state of an object of a collection type—a sequence, array, string, or map. In such a case, it is necessary to be able to get and set the length of the collection.
Discussion:
We need to add an accessor for the current length. This accessor can also be useful for other object of other types; for example, it can return the number of members in a structure.
However, it is not appropriate to add a mutator for the length directly:
· If the length of a collection is increased, that implies the addition of new elements. But the values of these new elements will not be meaningful.
· If the length of a collection is decreased, that implies the removal of existing elements. But that may not be meaningful (what does it mean to remove a non-optional member of a structure?) of useful (why would you want to clear the fifth element of a bit set just because of what its index is?).
· The lengths of some types cannot legally be changed at all—for example, array types.
Therefore, it is better to allow elements to be added and removed, where appropriate, and thereby modify the length implicitly.
Proposed Resolution:
Add an operation get_length to the DynamicData class.
· If the object is of a collection type, return the number of elements currently in the collection. In the case of an array type, this value will always be equal to the bound.
· If the object is of a bit set type, return the number of named flags that are currently set in the bit set.
· If the object is of a structure or annotation type, return the number of members in the object. This value may be different than the number of members in the corresponding DynamicType—for example, some optional members may be omitted; see the existing DynamicData documentation.
· If the object is of a union type, return the number of members in the object. This value will always be two: the discriminator and the current member corresponding to it.
· If the object is of a primitive or enumeration type, it is atomic: return one.
· If the object is of an alias type, return the value appropriate for the alias’s base type.
Expand the contracts of the existing set_<type>_value operations to allow them to append new elements to resizable collections—strings, sequences, and maps. (This behavior is aligned with the existing contract of the clear operations, which states that cleared elements of resizable collections shall be removed.) Obtain the member ID associated with the new value as follows:
· For a string or sequence type, use get_member_id_at_index to obtain an ID for the index one greater than the current length.
· For a map type, use get_member_id_by_name to obtain an ID for the new map key.
Proposed Revised Text:
TO DO
Resolution: Add an operation get_item_count to the DynamicData class.
• If the object is of a collection type, return the number of elements currently in the collection. In the case of an array type, this value will always be equal to the product of the bounds of all array dimensions.
• If the object is of a bit set type, return the number of named flags that are currently set in the bit set.
• If the object is of a structure or annotation type, return the number of members in the object. This value may be different than the number of members in the corresponding DynamicType—for example, some optional members may be omitted; see the existing DynamicData documentation.
• If the object is of a union type, return the number of members in the object. This value will always be two: the discriminator and the current member corresponding to it.
• If the object is of a primitive or enumeration type, it is atomic: return one.
• If the object is of an alias type, return the value appropriate for the alias’s base type.
Expand the contracts of the existing set_<type>_value operations to allow them to append new elements to resizable collections—strings, sequences, and maps. (This behavior is aligned with the existing contract of the clear operations, which states that cleared elements of resizable collections shall be removed.) Obtain the member ID associated with the new value as follows:
• For a string or sequence type, use get_member_id_at_index to obtain an ID for the index one greater than the current length.
• For a map type, use get_member_id_by_name to obtain an ID for the new map key.
Revised Text: Add a row for the new get_item_count operation in Table 27, DynamicData properties and operations, in section 7.5.2.10, DynamicData. The new row follows get_member_id_at_index and precedes equals.
get_item_count UInt32
Add a new section 7.5.2.10.6, Operation: get_item_count, after the existing section 7.5.2.10.5, Operation: equals:
7.5.2.10.6 Operation: get_item_count
The “item count” of the data depends on the type of the object.
• If the object is of a collection type, return the number of elements currently in the collection. In the case of an array type, this value will always be equal to the product of the bounds of all array dimensions.
• If the object is of a bit set type, return the number of named flags that are currently set in the bit set.
• If the object is of a structure or annotation type, return the number of members in the object. This value may be different than the number of members in the corresponding DynamicType—for example, some optional members may be omitted.
• If the object is of a union type, return the number of members in the object. This value will always be two: the discriminator and the current member corresponding to it.
• If the object is of a primitive or enumeration type, it is atomic: return one.
• If the object is of an alias type, return the value appropriate for the alias’s base type.
In what is now section 7.5.2.10.9, but which was previously 7.5.2.10.8, Platform-Specific Model: IDL, there is a bulleted list of name expansions. Immediately following this list is a paragraph that begins, “As mentioned above, it shall be possible to implicitly promote integral types.” Before this paragraph, insert the following new paragraph:
If a DynamicData object represents an object of a resizable collection type (string, sequence, or map), these setters may also be used to append new elements to the collection.
• For a string or sequence type, use get_member_id_at_index to obtain an ID for the index one greater than the current length.
• For a map type, use get_member_id_by_name to obtain an ID for the new map key.
Add the new get_item_count operation to the IDL file as well.
Actions taken:
May 4, 2011: received issue
July 19, 2012: closed issue
Discussion: We need to add an accessor for the current length. This accessor can also be useful for other object of other types; for example, it can return the number of members in a structure.
However, it is not appropriate to add a mutator for the length directly:
• If the length of a collection is increased, that implies the addition of new elements. But the values of these new elements will not be meaningful.
• If the length of a collection is decreased, that implies the removal of existing elements. But that may not be meaningful (what does it mean to remove a non-optional member of a structure?) of useful (why would you want to clear the fifth element of a bit set just because of what its index is?).
• The lengths of some types cannot legally be changed at all—for example, array types.
Therefore, it is better to allow elements to be added and removed, where appropriate, and thereby modify the length implicitly
Issue 16238: Type signature fields in built-in topic data shouldn't use unbounded strings (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The type_name members of TopicBuiltinTopicData, PublicationBuiltinTopicData, and SubscriptionBuiltinTopicData are bounded at 256 characters. The equivalent_type_name and base_type_name members store sequences of type names, but the strings in those sequences are unbounded. The flexibility to store strings of any length is unnecessary, because no string can appear there that doesn’t also appear in a type_name somewhere, and is therefore of 256 characters or less.
This issue is minor in that it does not impact correctness. However, it does impact clarity to a small extent and can impact the efficiency of some implementations.
Proposed Resolution:
Define a typedef “TypeName”, a string bounded at 256 characters. (See also issue #15969.)
Define a typedef “TypeNameSeq”, an unbounded sequence of TypeName elements.
Change the type of the equivalent_type_name and base_type_name members from StringSeq to TypeNameSeq.
Proposed Revised Text:
TO DO
Resolution: This issue is obsolete in the face of issue #16561: the resolution of that issue eliminates the type signature concept altogether. Therefore, this issue should be merged with that one.
Disposition: Merged with issue #16561
Revised Text:
Actions taken:
May 4, 2011: received issue
July 19, 2012: closed issue
Issue 16239: Typographical errors (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The specification contains the following identified typographical errors:
· The third bullet in section 2.2, “Network Interoperability Conformance”, which begins with “Data Representation…”, is lacking an opening parenthesis at the start of the second sentence. The closing parenthesis is already present.
Proposed Resolution:
See the trivial corrections described above.
Proposed Revised Text:
See the trivial corrections described above
Resolution: See the trivial corrections described above
Revised Text: See the trivial corrections described above
Actions taken:
May 4, 2011: received issue
July 19, 2012: closed issue
Issue 16240: Changing a DynamicType object is ambiguous (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Brookhaven National Laboratory (Mr. Nikolay Malitsky, malitsky(at)bnl.gov)
Nature: Uncategorized Issue
Severity:
Summary: The current DynamicType API allows a type definition to be changed. Such a change can be ambiguous at best and dangerous at worst.
· Suppose that the type already types (DynamicData) objects. Should all of those objects refer to the old version of the type or the new version? If the new version, how shall we address the situation where the new type is inconsistent with the existing data contents?
· Suppose that the type has already been registered with some domain participant. Does the registered type name refer to the old version of the type or the new version? What shall be done about samples that may already have been published or received using the old version?
· Can DynamicTypeFactory cache and reuse identical types that are requested more than once? Ideally yes, but the ability to change a type makes the state management necessary to support this behavior very complicated.
It would be safer, clearer, and more efficient if DynamicType objects were immutable once created. That implies that either the factory must take sufficient inputs to fully create a type in one step, or we must employ a builder or similar pattern.
Discussion:
A builder pattern would give the application more flexibility in how to create new types. It would also nicely encompass the current load_type operations as well as hypothetical PSM-specific operations, such the creation of a DynamicType from a Java Class object.
Proposed Resolution:
TO DO
Proposed Revised Text:
TO DO
Resolution: Define a new class DynamicTypeBuilder as a copy of the current definition of DynamicType. Remove from DynamicType all operations that modify an object, and add to DynamicTypeBuilder an operation build that returns a corresponding (immutable) DynamicType.
Update the existing DynamicTypeFactory to create instances of DynamicTypeBuilder instead of DynamicType. Rename this class DynamicTypeBuilderFactory accordingly.
Replace the existing operation DynamicType::clone with a corresponding create operation in DynamicTypeBuilderFactory.
Revised Text: Replace all occurrences of the class name DynamicTypeFactory with DynamicTypeBuilderFactory.
At the beginning of section 7.5.2.2, “DynamicTypeBuilderFactory” (formerly “DynamicTypeFactory”), is a sentence that begins, “Its ‘only’ instance is the starting point….” Replace that sentence with the following:
Its “only” instance is the starting point for creating and deleting DynamicTypeBuilder objects.
In the table of operations that follows, replace every incidence of return type DynamicType with DynamicTypeBuilder—except for the return type of get_primitive_type.
In the table and in the subsections that follow, rename some of the methods as follows:
• create_type_from_type_object ? create_type_w_type_object
• load_type_from_url ? create_type_w_uri
• load_type_from_document ? create_type_w_document
In addition, add the following new rows in the table immediately after the create_type rows:
create_type_copy DynamicTypeBuilder
type DynamicType
Add the corresponding new subsections as follows, immediately after section 7.5.2.2.6, “Operation: create_type”:
7.5.2.2.7 Operation: create_type_copy
Create and return a new DynamicTypeBuilder object with a copy of the state of the given type. All objects returned by this operation should eventually be deleted by calling delete_type.
Parameter type - The initial state of the new type to create. If this argument is nil, this operation shall fail and return a nil value.
In all of the subsections of section 7.5.2.2, “DynamicTypeBuilderFactory” (formerly “DynamicTypeFactory”), corresponding to the operations on that class, update references to creating DynamicType objects to refer to DynamicTypeBuilder instead.
In section 7.5.2.6, DynamicTypeMember, remove the operation apply_annotation, both from the table of properties and operations as well as from the subsections. Delete the phrase “…with apply_annotation” from the end of section 7.5.2.6.1, “Property: annotation”.
In section 7.5.2.8, DynamicType, remove the operations add_member, apply_annotation, and clone from the UML diagram (Figure 36, “Dynamic Type”), the table of properties and operations, and the subsections. Also in the UML diagram, replace DynamicTypeFactory with DynamicTypeBuilder. Delete the phrase “…with apply_annotation” from the end of section 7.5.2.8.2, “Property: annotation”.
In the subsection “Property: member_by_name”, the second sentence begins, “As described in the case of add_member, not only….” Replace this with “As described in the table below, not only….” Move Table 25, “DynamicType::add_member behavior”, to immediately after this paragraph from its current location in the to-be-removed section “Operation: add_member” and replace “add_member” in the caption with “member_by_name”.
Immediately after section 7.5.2.8, DynamicType, add the following new section. (These contents are based on the existing contents of section 7.5.2.8, “DynamicType”.)
7.5.2.9 DynamicTypeBuilder
A DynamicTypeBuilder object represents a transitional state of a particular type defined according to the Type System. It is used to instantiate concrete DynamicType objects.
Table 25 - DynamicTypeBuilder properties and operations
DynamicTypeBuilder
Properties
descriptor read-only TypeDescriptor
member_by_name read-only string<Char8,256> ? DynamicTypeMember [0..1]
member read-only MemberId ? DynamicTypeMember [0..1]
annotation read-only AnnotationDescriptor [*]
Operations
equals Boolean
other DynamicTypeBuilder
get_name String<Char8,256>
get_kind TypeKind
add_member ReturnCode_t
descriptor MemberDescriptor
apply_annotation ReturnCode_t
descriptor AnnotationDescriptor
apply_annotation_
to_member ReturnCode_t
member_id MemberId
descriptor AnnotationDescriptor
build DynamicType
7.5.2.9.1 Operation: add_member
Add a “member” to this type, where the new “member” has the meaning defined in the specification of the DynamicTypeMember class. Specifically, the behavior shall be as described in the table in Section 7.5.2.8.6, “Property: member_by_name”. For type kinds not given in that table, this operation shall fail with RETCODE_PRECONDITION_NOT_MET.
Following a successful return, the new member shall appear in the member property and possibly in the member_by_id property, based on the definition of that property.
Parameter descriptor - A descriptor of the new member to be added. If this argument is nil, the operation shall fail with RETCODE_BAD_PARAMETER.
7.5.2.9.2 Property: annotation
This property provides all annotations that have previously been applied to this type with apply_annotation.
7.5.2.9.3 Operation: apply_annotation
Apply the given annotation to this type. It shall subsequently appear in the annotation property.
Parameter descriptor - A consistent descriptor for the annotation to apply. If this argument is not consistent, the operation shall fail with RETCODE_BAD_PARAMETER.
7.5.2.9.4 Operation: apply_annotation_to_member
Apply the given annotation to this member. It shall subsequently appear in the annotation property of the identified member.
Parameter member_id - Identifies the member to which the annotation shall be applied.
Parameter descriptor - A consistent descriptor for the annotation to apply. If this argument is not consistent, the operation shall fail with RETCODE_BAD_PARAMETER.
7.5.2.9.5 Operation: build
Create an immutable DynamicType object containing a snapshot of this builder’s current state. Subsequent changes to this builder, if any, shall have no observable effect on the states of any previously created DynamicTypes.
7.5.2.9.6 Property: descriptor
This property provides a summary of the state of this type.
7.5.2.9.7 Operation: equals
Two types shall be considered equal if and only if all of their respective properties, as identified in the table above, are equal.
7.5.2.9.8 Operation: get_kind
This convenience operation indicates the kind of this type (e.g., integer, structure, etc.). Its result shall be the same as the kind indicated by the type’s descriptor property.
7.5.2.9.9 Operation: get_name
This convenience operation provides the fully qualified name of this type. It shall be identical to the name string that is a member of the descriptor property.
7.5.2.9.10 Property: member_by_name
This property contains a mapping from the name of a member of this type to the member itself. As described in the case of add_member, not only members of aggregated types are considered “members” here: the constituents of enumerations, bit sets, and other kinds of types are also considered to be “members” for the purposes of this property.
The lifecycle of a DynamicTypeMember object is governed by that of the DynamicTypeBuilder that contains it. The former shall be considered to exist logically from the time the corresponding member is added to the latter and until such time as the latter is deleted. Implementations may allocate and de-allocate DynamicTypeMember objects more frequently, provided that:
• Users of the DynamicTypeMember class are not required to explicitly delete objects of that class.
• Changes to one DynamicTypeMember object representing a given member shall be reflected in all observable DynamicTypeMember objects representing the same member.
• All DynamicTypeMember objects representing the same member shall compare as equal according to their equals operations.
7.5.2.9.11 Property: member
This property contains a mapping from the member ID of a member of this (aggregated) type to the member itself.
• If this type is an aggregated type, the collection of members available through this property shall be equal to (element order notwithstanding) that available through the member_by_name property.
• If this type is not an aggregated type, the collection of members available through this property shall be empty.
Implement all of the above changes described above in the IDL file as well.
Actions taken:
May 4, 2011: received issue
July 19, 2012: closed issue
Discussion: A builder pattern would give the application more flexibility in how to create new types. It would also nicely encompass the current load_type operations as well as hypothetical PSM-specific operations, such the creation of a DynamicType from a Java Class object.
Issue 16241: Difficult to apply automation to statically defined types (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: Application code (i.e. business logic) generally depends statically on particular types and their members. Therefore, it is appropriate to define these types statically (e.g. in IDL) and generate code for them in order to take advantage of static type safety and improved performance.
In contrast, infrastructure code (i.e. logic that is independent of particular applications) generally must not depend on application-specific types, because such dependencies prevent that code from being reused.
These two kinds of code can exist within a single component. For example:
· The properties of application-specific types might be checked against a common set of rules to ensure that they meet organizational or program-specific guidelines.
· Certain design patterns may call for arbitrary application-specific types to be augmented in uniform ways.
· Type-specific application activities, such as reading and/or writing data, might be logged or recorded.
The straightforward way to handle these scenarios would be to:
1. Convert a generated type definition into a DynamicType object.
2. Convert an object of a generated type into a DynamicData object.
3. Pass these two dynamic objects to the infrastructure code and allow it to operate on them.
Unfortunately, the specification does not provide such a capability. Instead, applications have to manually construct DynamicType and DynamicData objects member by member. This code is not only verbose but also brittle, because if the static type definition changes (e.g. during development or across versions), it can grow out of sync with the hand-written code that manipulates that definition.
Discussion:
We need three new conversions:
1. TypeSupport à DynamicType
2. DynamicData à sample object
3. Sample object à DynamicData
These operations could either be added to the TypeSupport interface or to a “type builder” interface. The former approach is preferred, because the generic type parameter of the TypeSupport in the C++ and Java PSMs allows a degree of type safety that way.
Proposed Resolution:
Introduce three new TypeSupport operations:
1. get_type: Get a DynamicType object corresponding to the TypeSupport’s data type.
2. create_sample: Create a sample of the TypeSupport’s data type from an input DynamicData object. If the DynamicType of the DynamicData is not compatible with the TypeSupport’s data type, raise an error.
3. create_dynamic_sample: Create a DynamicData object from an input sample of the TypeSupport’s data type.
Proposed Revised Text:
TO DO
Resolution: Introduce three new TypeSupport operations:
1. get_type: Get a DynamicType object corresponding to the TypeSupport’s data type.
2. create_sample: Create a sample of the TypeSupport’s data type from an input DynamicData object.
3. create_dynamic_sample: Create a DynamicData object from an input sample of the TypeSupport’s data type.
Revised Text: Demote the existing section 7.6.4.1, DynamicTypeSupport, to a subsection 7.6.4.1.3 and insert the following above it.
7.6.4.1 Type Support
Application code (i.e. business logic) generally depends statically on particular types and their members. In contrast, infrastructure code (i.e. logic that is independent of particular applications) generally must not depend on application-specific types, because such dependencies prevent that code from being reused. These two kinds of code can exist within a single component.
Therefore, it is desirable to allow conversions among static and dynamic bindings for the same types and samples. These conversions shall be provided by operations on the generic TypeSupport interface and its extended interfaces.
7.6.4.1.1 TypeSupport Interface
The following operations shall be added to the TypeSupport interface defined by [DDS]. (The operations on this interface already defined in [DDS] are unchanged.)
Table 31—New TypeSupport operations
Operations
get_type DynamicType
7.6.4.1.1.1 Operation: get_type
Get a DynamicType object corresponding to the TypeSupport’s data type.
7.6.4.1.2 FooTypeSupport Interface
The following operations shall be added to the FooTypeSupport interface defined by [DDS]. (The operations on this interface already defined in [DDS] are unchanged.)
Table 32—New FooTypeSupport operations
Operations
create_sample Foo
src DynamicData
create_dynamic_sample DynamicData
src Foo
7.6.4.1.2.1 Operation: create_sample
Create a sample of the TypeSupport’s data type with the contents of an input DynamicData object.
Parameter src – The source object whose contents are to be reflected in the resulting object. This method shall fail with a nil return result if this object is nil or if the DynamicType of this object is not compatible with the TypeSupport’s data type.
7.6.4.1.2.2 Operation: create_dynamic_sample
Create a DynamicData object with the contents of an input sample of the TypeSupport’s data type.
Parameter src – The source object whose contents are to be reflected in the resulting object. This method shall fail with a nil return result if this object is nil.
Make the following changes to section 7.6.4.1.3 (formerly 7.6.4.1), DynamicTypeSupport:
• The first paragraph ends with the sentence: “In addition, it provides access to the type from which it was created.” Remove this sentence.
• Remove the Properties section, including the “type” property, from the table of properties and operations.
• Remove the section 7.6.4.1.3.1 (formerly 7.6.4.1.1), Property: type.
Add the new TypeSupport and FooTypeSupport operations to the IDL file. Insert the following immediately before DynamicTypeSupport:
interface TypeSupport {
// ReturnCode_t register_type(
// in DomainParticipant domain,
// in string type_name);
// string get_type_name();
// DynamicType get_type();
};
/* Implied IDL for type "Foo":
interface FooTypeSupport : DDS::TypeSupport {
DDS::ReturnCode_t register_type(
in DDS::DomainParticipant participant,
in string type_name);
string get_type_name();
DynamicType get_type();
Foo create_sample(in DynamicData src);
DynamicData create_dynamic_sample(in Foo src);
};
*/
Also, declare that DynamicTypeSupport extends TypeSupport, and consequently remove the “local” qualifier.
Actions taken:
May 4, 2011: received issue
July 19, 2012: closed issue
Discussion: We need three new conversions:
1. TypeSupport ? DynamicType
2. DynamicData ? sample object
3. Sample object ? DynamicData
These operations could either be added to the TypeSupport interface or to a “type builder” interface. The former approach is preferred, because the generic type parameter of the TypeSupport in the C++ and Java PSMs allows a degree of type safety that way.
Issue 16242: New QoS policies don’t indicate whether they can be changed (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: Source:
RTI (Mr. Alejandro de Campos, alejandro@rti.com)
Summary:
Each DDS QoS policy must define a couple of attributes: whether or not the policy has request-offer (RxO) semantics and whether or not it can be changed after an entity is enabled. The two new QoS policies defined by DDS-XTypes—TypeConsistencyEnforcementQosPolicy and DataRepresentationQosPolicy—define the first part but not the second.
Discussion:
Because of their potential interactions with historical data, neither of these policies should be changeable after an entity is enabled.
Proposed Resolution:
State in the introduction to each policy that its value cannot be changed after an entity is enabled.
Proposed Revised Text:
TO DO
Resolution: State in the introduction to each policy that its value cannot be changed after an entity is enabled
Revised Text: In section 7.6.1.1.1, DataRepresentationQosPolicy: Conceptual Model, the following sentence precedes the final bulleted list: “This policy has request-offer semantics [DDS].” Replace this sentence with the following:
This policy has request-offer semantics, and its value cannot be changed after the entity in question has been enabled [DDS].
In section 7.6.1.3.1, TypeConsistencyEnforcementQosPolicy: Conceptual Model, the second paragraph after the bulleted list begins, “This policy has request-offer semantics [DDS].” Append the following sentence to this paragraph:
The value of this policy cannot be changed after the entity in question has been enabled.
(The resolution of issue #15702 changes the contents of this paragraph. However, the resolution to this issue is the same in either case: append the new sentence to whatever is there.)
Actions taken:
May 4, 2011: received issue
July 19, 2012: closed issue
Discussion: Because of their potential interactions with historical data, neither of these policies should be changeable after an entity is enabled.
Issue 16243: Optional, must_understand members of non-mutable aggregation types cannot be accurately represented in CDR (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: Members of a structure or union type have a small number of metadata attributes, among them:
· optional: indicates that the member may or may not take a value in a particular sample
· must_understand: indicates that a consumer of the data must discard the sample if it encounters such a field in it
The type-level assignability rules detect mismatches respecting non-optional must_understand members. (Such members will always take a value, and therefore there is no possibility of data exchange between the producer and consumer.) However, must_understand members that are optional must be detected on a sample-by-sample basis: any sample that does not contain the offending member can be exchanged, but those that do cannot.
The XML Data Representation allows the encoding of the must_understand attribute within each sample, as does the parameterized encapsulation variants of the Extended CDR Data Representation. However, the traditional, non-parameterized encapsulation variants—used by final and extensible structures and unions—do not permit this attribute to be expressed. As a result, consumers will not be able to detect when it should have been present, and may therefore present incorrect data to applications.
Discussion:
The traditional CDR encapsulations prefix each optional member with a 32-bit “header” that indicates the presence and size of the member. In contrast, the parameterized CDR encapsulations prefix each member with a 32-bit parameter header that indicates the presence, size, ID, and metadata flags of the member, including must_understand. Therefore, we can reuse the parameter header structure we already have to solve this problem, instead of using just a 32-bit size, with no increase in overhead.
Proposed Resolution:
Reorganize the Extended CDR Data Representation section such that it first defines the parameter header structure and the member-ID-to-parameter-ID mapping. Second it shall define the traditional encapsulation variants, and finally it shall define the (fully) parameterized encapsulation variants.
Within the middle section—traditional CDR—update section 7.4.1.1.5.2, “Optional Members.” Remove the description of a 32-bit size, and in its place describe the use of a parameter header. Note that either the four-byte header defined by DDS-RTPS or the 12-byte extended header defined by DDS-XTypes may be used.
Proposed Revised Text:
TO DO
Resolution: Update section 7.4.1.1.5.2, “Optional Members.” Instead of preceding each optional member with a 32-bit size, use a parameter header. Note that either the four-byte header defined by DDS-RTPS or the 12-byte extended header defined by DDS-XTypes may be used.
Revised Text: Replace the contents of section 7.4.1.1.5.2, Optional Members, with the following:
Structure members marked as optional shall be preceded by a parameter header as described in Section 7.4.1.2, “Parameterized CDR Representation”, below.
Replace the introductory paragraphs of section 7.4.1.2, Parameterized CDR Representation, which precedes the beginning of section 7.4.1.2.1, with the following:
The parameterized CDR representation is based on the RTPS Parameter List CDR data representation defined in [RTPS].
Each element, or parameter, within a parameter list data structure is simply a CDR-encapsulated block of data. Preceding each one is a parameter header consisting of a two-byte parameter ID followed by a two-byte parameter length. One parameter follows another until a list-terminating sentinel is reached.
This data representation uses elements of the parameter list data structure for two purposes:
• Any object of a mutable aggregated type shall be serialized as a parameter list. Each of its members shall correspond to a single parameter within that list.
• Any optional member of a final or extensible structure shall be preceded by a parameter header describing that member. If the member takes no value within that particular object, the data length indicated by the header shall be zero. This reuse of the parameter header data structure does not constitute a complete parameter list: the optional member shall not be followed by list-terminating sentinel.
Following Table 27, Reserved parameter ID values, are two paragraphs describing the use of PID_EXTENDED. Add the following as a third paragraph:
These extended parameter headers, based on PID_EXTENDED, shall be legal within the parameter list data structures used to serialize objects of mutable aggregated types. They shall also be legal when preceding optional members of final or extensible structures, as described above.
In section 7.4.1.2.3, Omission and Reordering of Members of Aggregated Types, the first paragraph pertains to structures. Precede each occurrence of “structure” or “structures” in this paragraph with the word “mutable”. Then insert the following new paragraph immediately afterwards:
Objects of final or extensible structures are not serialized as full parameter lists, even if some members are optional. Therefore, the members of these types may not be omitted or reordered.
Actions taken:
May 4, 2011: received issue
July 19, 2012: closed issue
Discussion: The traditional CDR encapsulations prefix each optional member with a 32-bit “header” that indicates the presence and size of the member. In contrast, the parameterized CDR encapsulations prefix each member with a 32-bit parameter header that indicates the presence, size, ID, and metadata flags of the member, including must_understand. Therefore, we can reuse the parameter header structure we already have to solve this problem, instead of using just a 32-bit size, with no increase in overhead.
Issue 16271: Incorrect default extensibility kind value in XSD file (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: OMG Issue No: ?????
Title: Incorrect default extensibility kind value in XSD file
Source:
RTI (Mr. Alejandro de Campos, alejandro@rti.com)
Summary:
The declaration of the complex type structOrUnionTypeDecl in the XSD file contains the following attribute declaration:
<xs:attribute name="extensibility"
type="extensibilityKind"
use="optional"
default="false"/>
However, “false” is not a valid value for the extensibilityKind type.
Proposed Resolution:
Change the default value to “extensible”.
Proposed Revised Text:
Replace the following attribute declaration within the complex type structOrUnionTypeDecl:
<xs:attribute name="extensibility"
type="extensibilityKind"
use="optional"
default="false"/>
…with this one:
<xs:attribute name="extensibility"
type="extensibilityKind"
use="optional"
default="extensible"/>
Resolution: Change the default value to “extensible”.
Revised Text: Replace the following attribute declaration within the complex type structOrUnionTypeDecl:
<xs:attribute name="extensibility"
type="extensibilityKind"
use="optional"
default="false"/>
…with this one:
<xs:attribute name="extensibility"
type="extensibilityKind"
use="optional"
default="extensible"/>
Actions taken:
May 23, 2011: received issue
July 19, 2012: closed issue
Issue 16364: Ambiguous description of serializing discovery types (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Real-Time Innovations (Mr. Alejandro Campos, )
Nature: Uncategorized Issue
Severity:
Summary: The definition of PID_LIST_END in Table 27 in section 7.4.1.2.1, Interpretation of Parameter ID Values, reads:
RTPS specifies that the PID value 1 shall be used to terminate parameter lists within the DDS built-in topic data types. Rather than reserving this parameter ID for all types, thereby complicating the member ID-to-parameter ID mapping rules for all producers and consumers of this Data Representation, Simple Discovery types only shall be subject to a special case: member ID 1 shall not be used, and either parameter ID 0x3F02 or parameter ID 1 shall terminate the parameter list.
The meaning of “Simple Discovery types” is not clear. It should not apply to all mutable types that might ever be used as part of the Simple Discovery process. It is intended only to maintain backward compatibility with types defined in DDS-RTPS.
Proposed Resolution:
See the Proposed Revised Text below.
Proposed Revised Text:
Append an additional sentence: “These types consist of the built-in topic data types, and those other types that contain them as members, as defined by [RTPS].”
Resolution: See the Revised Text below
Revised Text: Append an additional sentence to the definition of PID_LIST_END in Table 27 in section 7.4.1.2.1, Interpretation of Parameter ID Values:
“These types consist of the built-in topic data types, and those other types that contain them as members, as defined by [RTPS].”
Actions taken:
July 5, 2011: received issue
July 19, 2012: closed issue
Issue 16365: Inconsistent bit set/integer equivalency (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Real-Time Innovations (Mr. Alejandro Campos, )
Nature: Uncategorized Issue
Severity:
Summary: A bit set with bit bound <= 8 is mapped to a byte in some places (page 78 and 40) and to an unsigned short in others (page 88). (Page numbers refer to beta 2.)
Proposed Resolution:
A bit set with bit bound <= 8 should be serialized as a single byte.
Proposed Revised Text:
In the table in section 7.5.1.2.2, BitSet Types, replace these rows:
Bit Set Bound
Unsigned Integer Equivalent
1–16
unsigned short
…with the following:
Bit Set Bound
Primitive Equivalent
1–8
octet
9–16
unsigned short
Resolution: A bit set with bit bound <= 8 should be serialized as a single byte.
Revised Text: In the table in section 7.5.1.2.2, BitSet Types, replace these rows:
Bit Set Bound Unsigned Integer Equivalent
1–16 unsigned short
…with the following:
Bit Set Bound Primitive Equivalent
1–8 octet
9–16 unsigned short
Actions taken:
July 5, 2011: received issue
July 19, 2012: closed issue
Issue 16366: Incorrect union assignability rules (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Real-Time Innovations (Mr. Alejandro Campos, )
Nature: Uncategorized Issue
Severity:
Summary: The type assignability rules for unions have a number of problems (see the UNION_TYPE row of the table in section 7.2.4.5, Aggregation Types):
· The second and third bullets in the list of rules are redundant.
· According to the fourth bullet (assignability of default members), a union with a default label may not even be assignable to itself.
· The rules do not account for member IDs and names, which can be significant when deserializing objects in some data representations.
· The rules do not account for the fact that the discriminator may or may not be a key.
· The rules do not account for extensibility kind.
· The rules are under-specified with respect to malformed samples. Specifically, the discriminator may select a particular member X of the union, but the implementation may discover in its place a different member Y. (This situation will be detectable only with certain data representations.)
Proposed Resolution:
Apply the followin rules:
· Apply the member ID, name, and type matching rules for structures to unions as well.
· Every discriminator value in T2 must select the “same” member in T1—or no member at all. This can be checked in three steps:
1. Every discriminator value in a non-default label of T2 selects the same member in T1 or none at all.
2. Every discriminator value in a non-default label of T1 selects the same member in T2 or none at all.
3. If both T1 and T2 have a default label, the corresponding members must be assignable.
· Either both types must have a key or neither.
· The extensibility kinds must match.
· Specify explicitly that an object of a union with a mismatch between its discriminator and non-discriminator members is considered malformed. The impact is unspecified, although implementations may consider the object unassignable.
Proposed Revised Text:
Replace the center column of the UNION_TYPE row of the table in section 7.2.4.5, Aggregation Types, with the following:
UNION_TYPE if and only if it is possible to unambiguously identify the appropriate T1 member based on the T2 discriminator value and to transform both the discriminator and the other member correctly. Specifically:
· T1.discriminator.id == T2.discriminator.id and T1.discriminator.type is-assignable-from T2.discriminator.type.
· Either the discriminators of both T1 and T2 are keys or neither are keys.
· Any members in T1 and T2 that have the same name also have the same ID and any members with the same ID also have the same name.
· For each member “m1” in T1, if there is a member m2 in T2 with the same member ID then m1.type is-assignable-from m2.type.
· T1.extensibility == T2.extensibility.
· A discriminator value appearing in a non-default label of T2 selects a member m2. If the same discriminator value selects a member m1 of T1, then m1.id == m2.id.
· A discriminator value appearing in a non-default label of T1 selects a member m1. If the same discriminator value selects a member m2 of T2, then m1.id == m2.id.
· If both T1 and T2 have a default label, then the IDs of the members selected by those labels must be equal.
AND if T1 is final, the number of members in T1 is equal to the number of members in T2.
Remove the footnote that is linked to the old contents of that table cell.
Append the following paragraphs to the right-hand column of the same table row:
If either member of the union is unassignable, then the T2 object is unassignable to T1.
If the discriminator value of a union object and its non-discriminator member do not agree with one another, the object is considered malformed. In such a case, the behavior is unspecified. In particular, the implementation may or may not be able to detect this error. If it can, it should consider the object unassignable.
Resolution: Apply the following rules:
• Apply the member ID, name, and type matching rules for structures to unions as well.
• Every discriminator value in T2 must select the “same” member in T1—or no member at all. This can be checked in three steps:
1. Every discriminator value in a non-default label of T2 selects the same member in T1 or none at all.
2. Every discriminator value in a non-default label of T1 selects the same member in T2 or none at all.
3. If both T1 and T2 have a default label, the corresponding members must be assignable.
• Either both types must have a key or neither.
• The extensibility kinds must match.
• Specify explicitly that an object of a union with a mismatch between its discriminator and non-discriminator members is considered malformed. If an implementation is able to detect this case, it shall consider the object unassignable. If not, then the impact is unspecified.
Revised Text: Replace the center column of the UNION_TYPE row of the table in section 7.2.4.5, Aggregation Types, with the following:
UNION_TYPE if and only if it is possible to unambiguously identify the appropriate T1 member based on the T2 discriminator value and to transform both the discriminator and the other member correctly. Specifically:
• T1.discriminator.id == T2.discriminator.id and T1.discriminator.type is-assignable-from T2.discriminator.type.
• Either the discriminators of both T1 and T2 are keys or neither are keys.
• T1.extensibility == T2.extensibility.
• Any members in T1 and T2 that have the same name also have the same ID and any members with the same ID also have the same name.
• For each member “m1” in T1, if there is a member m2 in T2 with the same member ID then m1.type is-assignable-from m2.type if T1 is mutable or strongly assignable if T1 is final or extensible.
• A discriminator value appearing in a non-default label of T2 selects a member m2. If the same discriminator value selects a member m1 of T1, then m1.id == m2.id.
• A discriminator value appearing in a non-default label of T1 selects a member m1. If the same discriminator value selects a member m2 of T2, then m1.id == m2.id.
• If both T1 and T2 have a default label, then the IDs of the members selected by those labels must be equal.
AND if T1 is final, the number of members in T1 is equal to the number of members in T2.
Remove the footnote that is linked to the old contents of that table cell.
Append the following paragraphs to the right-hand column of the same table row:
If either member of the union is unassignable, then the T2 object is unassignable to T1.
If the discriminator value of a union object and its non-discriminator member do not agree with one another, the object is considered malformed. The implementation may or may not be able to detect this error. If it can, it shall consider the object unassignable. If it cannot, the behavior is unspecified.
Actions taken:
July 5, 2011: received issue
July 19, 2012: closed issue
Discussion: See also the following issues, which also deal with assignability.
• Issue #16367 addresses the concept of “strong assignability”.
• Issue #16368 proposes making object-level assignability rules more flexible.
Issue 16367: Definition of “strongly assignable” is incomplete (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The definition of the term “strongly assignable” in section 7.2.4, Type Compatibility: “is-assignable-from” relationship, states:
If types T1 and T2 are both mutable and T1 is-assignable-from T2, then T1 is said to be “strongly” assignable from T2.
The purpose of this concept is to distinguish cases where it is possible to delimit adjacent objects. This is necessary, for example, when deserializing arrays, to avoid a situation where extra members in an array element could throw off the deserialization of subsequent elements.
This definition is overly restrictive and can even prevent arrays of non-mutable elements from being assignable to themselves.
Proposed Resolution:
Amend the definition to consider any type strongly assignable to itself.
Proposed Revised Text:
The definition of the term “strongly assignable” in section 7.2.4, Type Compatibility: “is-assignable-from” relationship, states:
If types T1 and T2 are both mutable and T1 is-assignable-from T2, then T1 is said to be “strongly” assignable from T2.
Append the following sentence:
Any type is also considered (trivially) strongly assignable from itself, regardless of its extensibility kind.
Resolution: Amend the definition of “strongly assignable” to consider any type strongly assignable to itself
Revised Text: After the example table in section 7.2.4, Type Compatibility: “is-assignable-from” relationship, there is a paragraph of one sentence: “Any type is assignable from itself.” Remove this sentence.
The definition of the term “strongly assignable” that immediately follows states:
If types T1 and T2 are both mutable and T1 is-assignable-from T2, then T1 is said to be “strongly” assignable from T2.
Immediately append the following sentence:
Any type is also considered (trivially) strongly assignable from itself, regardless of its extensibility kind.
Actions taken:
July 5, 2011: received issue
July 19, 2012: closed issue
Discussion: Note that:
• Objects of mutable types can always be reliably delimited, because the parameterized CDR representation they use contains an explicit termination sentinel. This is why the original definition of “strongly assignable” is the way that it is.
• Objects of final and extensible types can nevertheless be delimited if they are top-level objects, not contained within any other—the enclosing encapsulation (e.g. an RTPS packet) identifies the length of its contents. The distinction between “assignable” and “strongly assignable” captures this property.
• Objects of final and extensible types can nevertheless be delimited if they occur as members of mutable structures. This freedom is already captured by the existing structure assignability rules.
See also the following issues, which also deal with assignability.
• Issue #16366 addresses the assignability of unions specifically.
• Issue #16368 proposes making object-level assignability rules more flexible.
Issue 16368: Object assignability rules should be more resilient (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Real-Time Innovations (Mr. Alejandro Campos, )
Nature: Uncategorized Issue
Severity:
Summary: Source:
RTI (Mr. Alejandro de Campos, alejandro@rti.com)
Summary:
A small object-level assignability problem within a complex sample can result in an entire sample being discarded. For example, a string whose length is greater than the bound of a string it’s being assigned into must be discarded. A sequence with an unassignable member must be discarded. A structure with an unassignable member must be discarded. As a result, a small issue deep within a structure could cause a whole sample to be discarded. For example, an issue within a TypeObject could result in an entire built-in topic data sample being discarded and consequently a loss of discovery information.
Discussion:
If we attempt to prevent any possible semantic problem that could arise from partial samples, we will have to keep the existing draconian rules, which can have bigger impacts, as described above. Therefore, the rules should seek to be more lenient and allow type-aware code “above” the assignability algorithm to detect semantic problems.
Proposed Resolution:
The following are the cases identified in the specification in which individual objects may be unassignable:
· Strings that are too long: No change. Strings are a basic type, and truncation can generally not be easily detected by applications.
· Arrays with unassignable elements: No change. In CDR, arrays have no length or other means of delimiting elements, so it is not possible to “truncate” them.
· Sequences that are too long or contain unassignable elements: Discard only the offending elements, “left-shifting” subsequent elements and reducing the length as necessary.
· Maps that are too long or contain unassignable elements: No change. Map entries are not logically ordered, so elements may not be discarded in a stable fashion.
· Enumeration with unrecognized value: No change.
· Union whose discriminator does not select a value in the destination type: No change—otherwise, the union would be malformed.
· Structure with a “must understand” member not present in the destination type: No change—otherwise, the union would be malformed.
Add the following new rules:
· Structure with an unassignable non-optional member: The entire structure is considered unassignable. (This behavior was previously underspecified.)
· Structure with an unassignable option member: The member takes no value. The rest of the structure can theoretically be retained.
Resolution: The following are the cases identified in the specification in which individual objects may be unassignable along with the changes to be made, if any:
• Strings that are too long: If the bound of a string increases, the string is unassignable. Strings are a basic type, and truncation can generally not be easily detected by applications.
• Arrays with unassignable elements: No change. In CDR, arrays have no length or other means of delimiting elements, so it is not possible to “truncate” them.
• Sequences that are too long or contain unassignable elements: If the bound of a sequence increases, or an element is unassignable, the whole sequence is unassignable. Applications have little ability to detect or mitigate sequence truncation, so automatic truncation is undesirable.
• Maps that are too long or contain unassignable elements: If the bound of a map increases, or an element is unassignable, the whole map is unassignable. Applications have little ability to detect or mitigate map truncation, so automatic truncation is undesirable.
• Enumeration with unrecognized value: No change.
• Union whose discriminator does not select a value in the destination type: No change—otherwise, the union would be malformed.
• Structure with a “must understand” member not present in the destination type: No change—otherwise, the structure would be malformed.
Add the following new rules for structures, which cover behavior that was previously underspecified:
• An unassignable non-optional member: The entire structure is considered unassignable.
• An unassignable optional member: The member takes no value. The rest of the structure can be retained.
• Mismatched “optional” attribute in a final or extensible structure: The types are not assignable. This restriction is necessary because of the header that precedes such members.
Revised Text: In section 7.2.4.3, Collection Types, in Table 13, Definition of the is-assignable-from relationship for collection types, locate the STRING_TYPE row. In the middle cell of that row, append: “…and T1.bound >= T2.bound”. In the rightmost cell of that row, the second paragraph reads, “T2 strings of length greater than T1.bound are unassignable to T1.” Remove this paragraph.
Locate the SEQUENCE_TYPE row immediately below. In the middle cell of that row, append: “…and T1.bound >= T2.bound”. In the rightmost cell of that row, the middle paragraph reads, “T2 sequences of length greater than T1.bound are unassignable.” Remove this paragraph.
In the MAP_TYPE row immediately below, in the middle column, append a bullet to the list: “• T1.bound >= T2.bound”. In the rightmost cell of that row, the middle paragraph reads, “T2 maps of length greater than T1.bound are unassignable.” Remove this paragraph.
In section 7.2.4.5, Aggregation Types, in Table 15, Definition of the is-assignable-from relationship for aggregated types, locate the STRUCTURE_TYPE row. In the rightmost cell of that row, append the following to the first paragraph:
If a member is unassignable and it is optional, that member takes no value. If it is non-optional, the entire structure is unassignable.
In the same row, in the center column, there is a sentence that begins, “AND if T1 is extensible, …”. In that sentence, after the phrase “…have the same member ID…”, insert the phrase “…and the same value of the ‘optional’ attribute…”.
Immediately following is a sentence that starts “AND if T1 is final, …” and a list of conditions. In the second bullet, after the phrase “…have the same member ID…”, insert the phrase “…and the same value of the ‘optional’ attribute…”.
Actions taken:
July 5, 2011: received issue
July 19, 2012: closed issue
Discussion: The consensus of the task force is that the built-in assignability rules should be rigorous and robust to avoid introducing semantic problems that applications will have to work around. However, this issue is not rejected, as there are still ambiguities and weaknesses to resolve in this area.
See also the following issues, which also deal with assignability.
• Issue #16366 addresses the assignability of unions specifically.
• Issue #16367 addresses the concept of “strong assignability”.
Issue 16559: Inconsistent extensibility kind for enumerations (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Clarification
Severity: Significant
Summary: The specification of the extensibility kind for enumeration types is inconsistent. Figure 10 in section 7.2.2.3.1, "Enumeration Types", indicates that the extensibility_kind of all enumeration types is FINAL. However, Table 11 in section 7.2.3, "Type Extensibility and Mutability", says, "Enumeration types may be final, extensible, or mutable on a type-by-type basis."
Proposed Resolution:
The assignability rules for enumerations already address different extensibility kinds, so we can preserve the more general statement from 7.2.3. Fix Figure 10.
Resolution: The assignability rules for enumerations already address different extensibility kinds, so we can preserve the more general statement from 7.2.3. Fix Figure 10.
Revised Text: Remove the following constraint from the depiction of the Enumeration classifier in Figure 10, Enumeration Types, in section 7.2.2.3.1, Enumeration Types:
{extensibility_kind = ExtensibilityKind::FINAL_EXTENSIBILITY}
Actions taken:
September 19, 2011: received issue
July 19, 2012: closed issue
Issue 16561: New DDS-XTypes issue: inability to consume data using new base class (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: have a new issue to file against the DDS-XTypes spec that was pointed out to me by Reinier Torenbeek.
Declared compatibility of types (i.e. type signature) includes base types but not derived types. Unfortunately, that means that a consumer using a base class unknown to an existing producer will not be able to consume data from that producer, because neither party will declare the relationship between the types.
For example: I publish Dog, which extends Animal. In version 2, a new intermediate class Mammal is introduced. However, a new consumer of Mammal won't match with a legacy producer of Dog, because both the Dog and Mammal endpoints declare that their types extend Animal, and neither one asserts that Dog should now extend Mammal.
Proposed Resolution:
Remove the type signature concept and go back to registering simple names. In its place, introduce a new QoS policy that lists assertions about which types extend which others. Consider making these assertions transitive. As today, the operative set of assertions when matching producers and consumers should be the union between the producer's and the consumer's sets.
Resolution: Remove the type signature concept and go back to registering simple names
Revised Text: The resolution below is closely related to the resolutions of issues #15702 and #16097.
In the introduction to section 7.6.1, “Endpoint Matching”, the second bullet begins, “Type Signature”. Replace “Type Signature” with “Type Consistency Enforcement”.
Remove section 7.6.1.2, “Type Signature”.
In section 7.6.4.1.3, “DynamicTypeSupport”, the table of properties and operations names an argument to the register_type operation “type_signature”. Rename this argument to “type_name”. Make the same change in the IDL file.
The following sections also mention type signatures, but changes to them are covered by the resolutions to other issues:
• Changes to section 7.6.1.3, “Type Consistency Enforcement QoS Policy”, are described in the resolution to issue #15702.
• Changes to section 7.6.2.1, “Types Used by Publications and Subscriptions”, are described in the resolutions to issues #15702 and #16097.
Actions taken:
September 20, 2011: received issue
July 19, 2012: closed issue
Issue 16720: Introduce the notional value "null" that may be used in a content-filter expression (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: The specification introduces the concept of optional members into DDS data types. However, it does not address how comparisons of these members should work in content-filtering expressions. For example, if a content-filtered topic indicates that all samples are of interest where "x != 5", but x is not present in the sample at all, does the sample pass the filter or not?
Proposed resolution: Introduce the notional value "null" that may be used in a content-filter expression. The null value is not equal to any value in the domain of any data type. (That is, x != null for any non-null value of x.) A member's value in a given sample shall be considered to be equal to null if that member is not present in the given sample. Its value shall not be considered equal to null if it is present.
Resolution: Optional members:
Introduce the notional value “null” that may be used in a content-filter expression. The null value is not equal to any value in the domain of any data type. (That is, x != null for any non-null value of x.)
• An optional member’s value in a given sample shall be considered to be equal to null if that member is not present in the given sample.
• Its value shall not be considered equal to null if it is present.
• A non-optional member’s value shall never be considered equal to null.
Maps:
Use the same syntax as arrays and sequences, but instead of a numeric index, use the stringified representation of the key to be queried as a string literal. Such an expression evaluates to the “value” element of the map that is associated with the given key. For example:
my_map['foo'] = 'bar'
my_map['5'] = 'baz'
Bit sets:
Use the same syntax as arrays and sequences, but instead of a numeric index, use the enumerated constant identifying the desired bit. Such an expression evaluates to a Boolean value: true if the named bit is set or false if it is not. For example:
my_bitset['MY_BIT_CONSTANT']
Specify the above rules in a new section 7.6.5, “DCPS Queries and Filters”. Include the relevant updates to the DCPS Queries and Filters grammar (from Annex A in the DDS 1.2 specification).
In addition, include a description of the following things that should be described in DDS already but seem to be missing:
• The use square bracket syntax for arrays, strings, and sequences
• Boolean literals
An issue should be filed against DDS for this, but the resolution of this issue should not wait for it to be acted upon.
Revised Text: Introduce the following new subsection to section 7.6, Use of the Type System by DDS:
7.6.5 DCPS Queries and Filters
[DDS] defines the syntax for content-based filters, queries, and joins in “Annex A: Syntax for DCPS Queries and Filters”. This syntax shall be extended as follows.
7.6.5.1 Member Names
[DDS] Section A.2 defines the syntax for referring to a member of a (potentially nested) data structure. Such a reference is known as a FIELDNAME. The syntax shall be extended as follows:
• Arrays and sequences: Elements in these ordered collections shall be indicated by a zero-based subscript enclosed in square brackets, e.g. my_collection[0]. Such an expression shall be considered to have the type that is the element type of the collection.
• Maps: Value elements in these unordered collections shall be indicated by a string representation of a corresponding key element, according to the syntax of STRING, enclosed in square brackets, e.g. my_map['key']. They key shall be expressed as a string even if the map’s key type is an integer type; this distinguishes a map lookup from an index into an ordered collection. Such an expression shall be considered to have the type that is the value element type of the map.
• Bit sets: A flag in a bit set shall be indicated by its name, according to the syntax of ENUMERATEDVALUE, enclosed in square brackets, e.g. my_bitset['MY_FLAG']. Such an expression shall be considered to have a Boolean type: true if the bit is set or false if it is not. Comparisons with the integer literals 1 and 0 shall also be allowed.
7.6.5.2 Optional Type Members
A member of an aggregated type may be compared to the special value null. Such comparisons obey the following rules:
• If the member is optional, and it takes no value in the given object, it shall be considered equal to null.
• If the member is optional, and it does take a value in the given object, it shall not be considered equal to null.
• No non-optional member shall ever be considered equal to null.
Inequalities expressed relative to null shall never evaluate to true—no value is greater than or less than null.
7.6.5.3 Grammar Extensions
The Parameter production in the grammar given in [DDS] Section A.1 shall be redefined as follows:
Parameter ::=
| CHARVALUE
| FLOATVALUE
| STRING
| ENUMERATEDVALUE
| BOOLEANVALUE
| NULLVALUE
| PARAMETER
.
(New tokens have been highlighted in blue.)
The BOOLEANVALUE token shall be either true or false (case-insensitive).
The NULLVALUE token shall always be null.
Actions taken:
November 21, 2011: received issue
July 19, 2012: closed issue
Discussion: The same applies to other new constructs in the type system: we need to specify how to refer to them in a content-filter expression. These include not only optional members of structures but also maps and bit sets.
Issue 17018: Rendering of UML diagrams in each of the figures is of poor graphical quality (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Mobilize Software (Mr. Sam Mancarella, sam(at)mobilizesoftware.com.au)
Nature: Uncategorized Issue
Severity:
Summary: The gradient shading rendered in each of the elements on a low-color image results in elements rendered as follows:
The diagrams should be rendered either by using a higher-color format (such as png), or without the gradient rendering enabled.
NB: To turn off the gradient shading in Enterprise Architect, go to the "Tools->Options" dialog. Under the "Diagram->Appearance" group:
1) Deselect the "Show Gradient Fill for Paper Color" option
2) Set the "Gradient Fill Direction for an Element" to "<none>"
Resolution: Make these changes in the EAP file so that as diagrams are updated, this problem will be fixed. In the mean time, defer this issue. Do not preemptively regenerate every diagram at this time.
Disposition: Deferred
Revised Text:
Actions taken:
January 19, 2012: received issue
Discussion: To turn off the gradient shading in Enterprise Architect, go to the "Tools->Options" dialog. Under the "Diagram->Appearance" group:
1) Deselect the "Show Gradient Fill for Paper Color" option
2) Set the "Gradient Fill Direction for an Element" to "<none>"
Issue 17019: Truncation of text in Figure 3 (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Mobilize Software (Mr. Sam Mancarella, sam(at)mobilizesoftware.com.au)
Nature: Uncategorized Issue
Severity:
Summary: The first rectangular symbol in Figure 3 contains truncated text - Type Representation
Resolution: Fix the truncated text
Revised Text: Fix the truncated text
Actions taken:
January 19, 2012: received issue
July 19, 2012: closed issue
Issue 17020: Non-standard UML notation on figures (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Mobilize Software (Mr. Sam Mancarella, sam(at)mobilizesoftware.com.au)
Nature: Uncategorized Issue
Severity:
Summary: The following figures exhibit non-standard notation for specialized elements:
Figure 4
Figure 9
Figure 11
Figure 14
Figure 16
Figure 17
Figure 20
The textual notation showing generalized elements on specialized ones needs to either be hidden, or have the generalized element explicitly shown on the diagram (with generalization relationship between the elements showing).
NB: To hide the generalized element names on specialized ones in Enterprise Architect, double-click on a blank area of the diagram to open the Diagram Properties Dialog. On the "Diagram" tab deselect the "Show additional Parents" option.
Resolution: Figures 4, 6–9, 12, 13, 15, 16, 17, 20, and 38: Simply hide the additional parents, as described above. Note that if the resolution to issue #16561 is accepted, the modification to figure 38 will be irrelevant, because the corresponding section of the document will be removed.
Figures 10, 11, and 14: Add class “Namespace” to the diagram.
Revised Text: Figures 4, 6–9, 12, 13, 15, 16, 17, 20, and 38: Simply hide the additional parents, as described above. Note that if the resolution to issue #16561 is accepted, the modification to figure 38 will be irrelevant, because the corresponding section of the document will be removed.
Figures 10, 11, and 14: Add class “Namespace” to the diagram.
Actions taken:
January 19, 2012: received issue
July 19, 2012: closed issue
Discussion: To hide the generalized element names on specialized ones in Enterprise Architect, double-click on a blank area of the diagram to open the Diagram Properties Dialog. On the "Diagram" tab deselect the "Show additional Parents" option.
Note that Figures 6–8, 10, 12, 13, 15, and 38 exhibit the same problem as well.
Issue 17021: Conflicting data types applied to several Attributes, Operations and Parameters in UML notation (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Mobilize Software (Mr. Sam Mancarella, sam(at)mobilizesoftware.com.au)
Nature: Uncategorized Issue
Severity:
Summary: The following figures exhibit inconsistent application of data types to attributes, operations and parameters:
Figure 4
Figure 9
Figure 10
Figure 13
Figure 14
Figure 16
Figure 26
Figure 30
Figure 33
Figure 36
Figure 37
Figure 38
Figure 39
Certain attributes/parameters have 'int' or 'string' applied which conflict the data types defined within the aforementioned model, and the PrimitiveTypes defined in UML. What is the intent with these? Which set of primitive data types are intended for application here (IDL? Java, C++, UML, XTypes?)
For example, the 'Enumeration' class in Figure 10 defines a 'bit-bound' property of type int.
Resolution: Use DDS-XTypes types consistently. Note that Figures 9 and 16 are already correct—they use the DDS-XTypes-derived basic types, not the UML-built-in ones.
Note that if the resolution to issue #16561 is accepted, the modification to figure 38 will be irrelevant, because the corresponding section of the document will be removed.
Revised Text: Update the figures enumerated above to show DDS-XTypes-derived primitive types consistently
Actions taken:
January 19, 2012: received issue
July 19, 2012: closed issue
Issue 17022: Invalid data types applied to AnnotationDescriptor::value, DynamicData::descriptor, DynamicData::value (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Mobilize Software (Mr. Sam Mancarella, sam(at)mobilizesoftware.com.au)
Nature: Uncategorized Issue
Severity:
Summary: The above-mentioned attributes (Figures 28 and 37) have types defined in the form "xxx --> yyy" which has no meaning in UML. Please clarify and correct.
Resolution: Change the type of AnnotationDescriptor::value to Map<String, String>.
Unify the property DynamicData::descriptor with the existing association to MemberDescriptor, and qualify this association by MemberId.
Change the property DynamicData::value to an association to Type, and qualify this association by MemberId.
Revised Text: In section 7.5.2, “Dynamic Language Binding”, in figure 26, “Dynamic Data and Dynamic Type”, display the model changes described above and add Type to the diagram.
In section 7.5.2.3, “AnnotationDescriptor”, in the table “AnnotationDescriptor properties and operations”, replace the text “string<Char8,256> ? string<Char8,256> [0..1]” with “Map<String<Char8,256>, String<Char8,256>>”.
In figure 28 immediately below, change the type of value to Map. Also add two constraints to AnnotationDescriptor:
{ value.element_type = String }
{ value.key_element_type = String }
In section 7.5.2.11, “Dynamic Data”, in figure 27, “Dynamic Data and Dynamic Data Factory”, display the model changes described above. Also add Type to the figure.
Actions taken:
January 19, 2012: received issue
July 19, 2012: closed issue
Discussion: Note that figure 26, “Dynamic Data and Dynamic Type”, displays the properties of the DynamicData class and hence also needs to be updated.
Issue 17023: Circular reference in definition of specialized Primitive Types (dds-xtypes-ftf)
Click here for this issue's archive.
Source: Mobilize Software (Mr. Sam Mancarella, sam(at)mobilizesoftware.com.au)
Nature: Uncategorized Issue
Severity:
Summary: The specialized Primitive Types defined for Int, UInt, Float, Boolean, etc... each define a property 'value' that is typed by the property's owner thus resulting in a circular reference in the model.
Figure 6
Figure 7
Figure 8
Each of these are specializations of the PrimitiveType abstract class. Changing the UML instance of the PrimitiveType definition to a UML:PrimitiveType will automatically convey the semantic that an instance of the specialized PrimitiveType is the value itself.
NB: To do this in Enterprise Architect recreate the PrimitiveType abstract definition as an instance of the 'Primitive' element found in the 'Class' toolbox.
Resolution: Remove the value members
Revised Text:
Update figures 6, 7, and 8 to display the aforementioned model changes
Actions taken:
January 19, 2012: received issue
July 19, 2012: closed issue
Discussion: To do this in Enterprise Architect, recreate the PrimitiveType abstract definition as an instance of the 'Primitive' element found in the 'Class' toolbox.
Unfortunately, PrimitiveType and the classes that specialize it cannot be changed to specialize UML::PrimitiveType, because a primitive cannot extend a class or even specialize an interface. Therefore, these types would be effectively removed from the Type classifier hierarchy, which would break other parts of the model.
Issue 17090: Inconsistent generated code for DynamicType::descriptor (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: DynamicType has a property "descriptor" of type (read-only) TypeDescriptor. This property is mapped to IDL as a readonly attribute. When code is generated for this attribute in C or C++, the corresponding getter is not consistent with the other getters in the same class, either in terms of its style or in terms of its memory management. (The other getters are all defined explicitly as methods in IDL.)
Proposed Resolution:
Remove this member and add an explicit getter method:
DDS::ReturnCode_t get_descriptor(
inout TypeDescriptor descriptor);
This method overwrites a user-provided object, just like get_member_by_name and get_annotation.
Resolution: Remove these attributes and add explicit getter methods, like:
DDS::ReturnCode_t get_descriptor(
inout TypeDescriptor descriptor);
This method overwrites a user-provided object, just like DynamicType::get_member_by_name and get_annotation
Revised Text: In section 7.5.2.8, “DynamicType”, in the table of properties and operations, remove the row for the property “descriptor”. Add the following new rows:
get_descriptor DDS::ReturnCode_t
inout descriptor TypeDescriptor
Rename section 7.5.2.8.2, “Property: descriptor”, to “Operation: get_descriptor”. Replace the body of this section as follows:
This operation provides a summary of the state of this type. It overwrites the state of an application-provided object.
If the argument is nil, this operation shall fail with RETCODE_BAD_PARAMETER.
Apply the same set of changes to section 7.5.2.9, “DynamicTypeBuilder” (see issue #16240).
Apply the same set of changes to section 7.5.2.6, “DynamicTypeMember”, with one difference: the type of the descriptor is MemberDescriptor, not TypeDescriptor.
In the IDL file and the corresponding Annex, replace DynamicTypeMember::descriptor with the following method definition:
DDS::ReturnCode_t get_descriptor(
inout MemberDescriptor descriptor);
Likewise, replace DynamicType::descriptor and DynamicTypeBuilder::descriptor with the following method definition (see issue #16240):
DDS::ReturnCode_t get_descriptor(
inout TypeDescriptor descriptor);
Actions taken:
January 30, 2012: received issue
July 19, 2012: closed issue
Discussion: The same issue applies to DynamicTypeBuilder (see the resolution to issue #16240) and DynamicTypeMember.
Issue 17293: Built-in annotations should be in DDS namespace (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity: Minor
Summary: Found by: Rick Warren, RTI (rick.warren@rti.com)
Severity: Minor
Problem:
The IDL Type Representation uses so-called "built-in annotations" to attach metadata to type definitions. The hypothetical module in which these annotations are defined is unclear. On the one hand, all (other) types defined by the specification are in the DDS:: module. However, in the case of the built-in annotations, no module is specified.
Proposed Resolution:
Clearly indicate that all built-in annotations are notionally in the DDS:: module
Resolution:
Revised Text:
Actions taken:
April 10, 2012: received issue
Issue 17294: Extended PID is not clear enough what the 2 value lengths mean (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: Found by: Fernando Crespo, RTI (fernando@rti.com)
Severity: Support Text
Problem:
Section 7.4.1.2.1, "Interpretation of Parameter ID Values", says the following directly beneath Table 27, "Reserved parameter ID values":
"The length of this parameter shall be at least eight bytes: the first
four bytes of the parameter data shall be interpreted as a set of four
reserved bit flags followed by the 28-bit member ID; the second four
bytes shall be interpreted as a 32-bit unsigned data length measured
from the end of that field until the start of the next 16-bit parameter
ID. If the 16-bit length is greater than eight, the additional contents
are undefined and are reserved for future use by OMG specifications."
The meaning is that the "data value" of the (shorter) parameter is in fact itself a longer parameter ID header, and the length indicated in the former header is in fact the length of that (longer) header only. The actual data value follows both headers, and its length (i.e. until the next parameter header) is given in the longer parameter header. Thus the total length of the parameter following the shorter header is the sum of the two lengths. The values of the flag fields are unspecified, as of the 1.0 specification, and reserved for future OMG specifications.
Proposed Resolution:
Update the description to more clearly reflect the data layout and add a figure to show it graphically.
Resolution:
Revised Text:
Actions taken:
April 10, 2012: received issue
Issue 17295: Reserved parameter IDs in 7.4.1.2.1 are wrong (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Revision
Severity: Significant
Summary: Found by: Fernando Crespo, RTI (fernando@rti.com)
Severity: Significant
Problem:
Table 27, "Reserved parameter ID values", in section 7.4.1.2.1, "Interpretation of Parameter ID Values", gives the 14-bit numeric IDs for the reserved parameters. However, it does not specify the corresponding values of the FLAG_IMPL_EXTENSION and FLAG_MUST_UNDERSTAND flags. The implication is that either flag may be set independently on an occurrence-by-occurrence basis, but that would be a bad idea: first of all, if FLAG_IMPL_EXTENSION is set, the specification should assume nothing about the contents of the parameter. And second of all, most parameters have a value of FLAG_MUST_UNDERSTAND that could reasonably be specified up front.
For example, and in particular, with respect to PID_EXTENDED, the text currently says: "The setting of the FLAG_MUST_UNDERSTAND bit in the 16-bit parameter ID shall be interpreted to apply to the extended parameter as well, not just to the 12 bytes of the PID_EXTENDED parameter itself." In other words, the flag is set based on the the must_understand attribute of a given member. This behavior is inappropriate, given that non-XTypes-conformant DDS implementations may receive extended parameters within discovery data: such implementations, if they do not see FLAG_MUST_UNDERSTAND set, will erroneously interpret the first four bytes of the (extended) data value as a parameter header, effectively corrupting the input data stream.
Proposed Resolution:
1. Clearly indicate that any parameter with FLAG_IMPL_EXTENSION set is outside of the scope of the specification. For a parameter to be recognized as one of the well-known values in the table, this bit must be set to zero.
2. Add a column to table 27 for the FLAG_MUST_UNDERSTAND flag. Set the value of this flag as follows:
* PID_EXTENDED: Yes. This will force non-XTypes-conformant implementations
to discard data containing extended headers rather than parsing it
incorrectly.
* PID_LIST_END: Yes. This will force implementations to either recognize
the end of the list or to discard the data. It will avoid a situation
where an implementation might "skip" the end of the list and start
parsing out of bounds.
* PID_IGNORE: No. The whole point is to ignore this parameter.
3. When writing data, the Service shall conform to the setting of FLAG_MUST_UNDERSTAND indicated above. When reading data, the Service should be robust to the opposite setting as well and accept the parameter nevertheless.
4. Within the four-bit set of flags that has already been reserved within the extended parameter header, use the most-significant bit to indicate vendor-specific extensions and the second-most-significant-bit to represent the value of the must_understand value of a data member. These flags are parallel to the flags in the short parameter header and restore the flexibility lost by specifying up front the value of the corresponding flags in that header.
5. Do not leave the contents of the other flags in the extended parameter header with junk contents; if a given flag's value is not specified by some (other) OMG specification, it should be set to zero.
Resolution:
Revised Text:
Actions taken:
April 10, 2012: received issue
Issue 17296: Section 7.4.1.2.2 "Member ID-to-Parameter ID Mapping" is underspecified (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: Found by: Fernando Crespo, RTI (fernando@rti.com)
Severity: Support Text
Problem:
The mapping of type member IDs to DDS-RTPS parameter IDs described in section 7.4.1.2.2, "Member ID-to-Parameter ID Mapping", will never result in FLAG_IMPL_EXTENSION being set. However, this is not stated explicitly.
Proposed Resolution:
Explicitly state that RTPS parameters corresponding to members of user-defined data types should never set FLAG_IMPL_EXTENSION.
RTPS parameters corresponding to members of RTPS discovery-defined data types may or may not have FLAG_IMPL_EXTENSION set as defined by RTPS itself; the contract is unchanged. The mechanism by which an implementation generates that flag's value is unspecified.
Resolution:
Revised Text:
Actions taken:
April 10, 2012: received issue
Issue 17297: Extended parameters should be aligned the same as non-extended ones (dds-xtypes-ftf)
Click here for this issue's archive.
Source: DECA (Mr. Rick Warren, )
Nature: Uncategorized Issue
Severity:
Summary: Found by: Fernando Crespo, RTI (fernando@rti.com)
Severity: Support Text
Problem:
The section on the parameterized CDR Data Representation (DDS-XTypes 7.4.1.2) contains a reference to the DDS-RTPS specification for the definition of the parameter list data structure. However, it does not specifically refer to the instructions in DDS-RTPS on how to handle alignment within such a structure. This omission may confuse some implementers, especially with respect to extended parameters, which should follow the same alignment rules as RTPS-traditional "short" parameters.
Proposed Resolution:
Add the following paragraph to the end of section 7.4.1.2.1, "Interpretation of Parameter ID Values":
"The alignment rules for extended parameters shall be the same as
those for non-extended parameters, which are defined in [RTPS]
Section 9.4.2.11."
Resolution:
Revised Text:
Actions taken:
April 10, 2012: received issue