7. Limitations

7.1. XSD Limitation: Struct with Inheritance can’t have Member with Same Name as a Member in Parent

In an IDL file, it is possible for a struct with inheritance to have a member with the same name as a member of its parent, for example:

@mutable
struct MutableV1Struct {

    string m2; //@key

};



@mutable
struct MutableV3Struct : MutableV1Struct {

    int32 m2;

};

The translation of that to XSD would generate invalid XSD because it does not allow having two members with the same name. You would see the following error message:

“Elements with the same name and same scope must have same type”

Example invalid XSD:

<xsd:complexType name="XTypes.MutableV1Struct">

    <xsd:sequence>

        <xsd:element name="m2" minOccurs="1" maxOccurs="1"

         type="xsd:string"/>

        <!-- @key true -->

    </xsd:sequence>

</xsd:complexType>



<!-- @extensibility MUTABLE_EXTENSIBILITY -->

<xsd:complexType name="XTypes.MutableV3Struct">

    <xsd:complexContent>

        <xsd:extension base="tns:XTypes.MutableV1Struct">

            <xsd:sequence>

                <xsd:element name="m2" minOccurs="1"

                 maxOccurs="1" type="xsd:int"/>

            </xsd:sequence>

        </xsd:extension>

    </xsd:complexContent>

</xsd:complexType>

If you need to generate code from invalid XSD such as seen above, you can run rtiddsgen with the -disableXSDValidation option to skip the validation step.

[RTI Issue ID CODEGENII-490]

7.2. Generated Code for Nested Modules in Ada May Not Compile

Code Generator follows the Object Management Group (OMG) IDL-to-Ada specification in order to map modules:

Top level modules (i.e., those not enclosed by other modules) shall be mapped to child packages of the subsystem package, if a subsystem is specified, or root library packages otherwise. Modules nested within other modules or within subsystems shall be mapped to child packages of the corresponding package for the enclosing module or subsystem. The name of the generated package shall be mapped from the module name.

The generated code produced by following this specification does not compile when referencing elements from a nested module within the top-level module, as shown in the following example:

module Outer
{
        module Inner
        {
                struct Structure
                {
                        int32 id;
                };
        };

        struct Objects
        {
                Inner::Structure nest;
        };
};

This failure to compile happens because Ada does not allow a parent package to reference definitions in child packages.

[RTI Issue ID CODEGENII-813]

7.3. Mixing Different Versions of Code Generator Server is not Supported

If you run different versions of rtiddsgen_server in the same port, the generated code could be generated by a different version than the one expected. rtiddsgen_server starts a server that generates code. If this server is still up when you run another version of rtiddsgen_server, your code is generated by the server that was already up, which is a different version than the one you wanted.

For example, if you run Code Generator server 2.5.0, then in the same port you run Code Generator server 3.0.1, Code Generator 2.5.0 might generate your code when you wanted Code Generator 3.0.1 to generate it.