How to reference module types in an XML file?

3 posts / 0 new
Last post
Offline
Last seen: 6 months 3 weeks ago
Joined: 07/28/2023
Posts: 2
How to reference module types in an XML file?

I'm writing an application that uses the RTI Connector for Javascript. I have an XML file that I converted from an IDL by running rtiddsgen.

In my XML file, the types definition looks like this:

<types>

<module name="Example">

...

<struct name= "busB" extensibility= "final" nested="true">

...

<member name="nestedInsideBusB" type="nonBasic" nonBasicTypeName= "Example::BusC"/>

</struct>

<struct name= "busA" extensibility= "final">
...
<member name="nestedInsideBusA" type="nonBasic" nonBasicTypeName= "Example::BusB"/>

</struct>

</module>

</types>

 I'm trying to define a Domain Library and Participant Library for my application to load.

The Domain Library looks like this:

<domain_library name="MyDomainLibrary">

<domain name="MyDomain" domain_id="0">

<register_type name="busA" type_ref="busA" />

<topic name="MyTopic" register_type_ref="busA"/>

</domain>

</domain_library>

 And the Participant Library looks like this:

<domain_participant_library name="MyParticipantLibrary">

<domain_participant name="MySubParticipant" domain_ref="MyDomainLibrary::MyDomain">

<subscriber name="MySubscriber">

<data_reader name="MyReader" topic_ref="MyTopic" />

</subscriber>

</domain_participant>

</domain_participant_library>

My problem is that the type I want to register lives inside the 'Example' module, so the RTI DDS Connector can't find the type:

DDS_XMLHelper_lookupXmlTypeCode:!get XMLTypeCode

DDS_XMLRegisterType_get_type_code:!get XML TypeCode not found

DDS_FactoryXmlPlugin_assertRegisteredType:!get Type Code from XML RegisterType "busA"

DDS_FactoryXmlPlugin_assertTopic:!Assert registered type

I've tried referencing the type like 'Example::busA' in the <register_type> tag, but I get the same error. How do I register and reference a type that's nested in a module?

Organization:
Howard's picture
Offline
Last seen: 2 days 3 hours ago
Joined: 11/29/2012
Posts: 605

Hi Joy,

Since you're likely working on a project that has commercial licenses and support from RTI, questions like this can be sent to "support@rti.com" and get answered directly by our professional support team.  This forum is generally supported by forum members like yourself and so there are no guarantees whether or not posted inquiries are answered in a timely manner.

For your question, it would be easier if you were able to post the files that you're having a problem with (the XML file defining your data type and your domain).

When you wrote:

I've tried referencing the type like 'Example::busA' in the <register_type> tag, but I get the same error. How do I register and reference a type that's nested in a module?

how did you do that?

I would expect that you would need to use

<register_type name="busA" type_ref="Example::busA" />

 

And finally, you should look into RTI System Designer.  It can load your XML type files as well as your XML files containing your domain/participant and provide you the correct syntax required to refer to a type defined in a module.

 

See this:

https://demo.rti.com/system-designer/

https://community.rti.com/downloads/experimental/system-designer

https://community.rti.com/static/documentation/connext-dds/7.1.0/doc/manuals/connext_dds_professional/tools/system_designer/index.html

Offline
Last seen: 6 months 3 weeks ago
Joined: 07/28/2023
Posts: 2

Hi Howard,

Thank you, I'll look into System Designer. And next time, I'll make sure to go through the proper channels for support.