Create topic name DDS::KeyedString in XML-Based Application

2 posts / 0 new
Last post
Offline
Last seen: 6 months 1 day ago
Joined: 11/01/2016
Posts: 1
Create topic name DDS::KeyedString in XML-Based Application

Hi,

I wanted to try XML-Based Application Creation with the python examples in https://github.com/rticommunity/rticonnextdds-connector-pyMy objective is to create a data_reader and/or data_writer with type name: “DDS::KeyedString”. I tied the following config and none is worked.

1. Create a topic without register_type:

<topic name="keyedStringTest" register_type_ref="DDS::KeyedString"/>

 

2. Create a topic and register_type without creating type:

<register_type name="DDS::KeyedString"/>
<topic name="keyedStringTest" register_type_ref="DDS::KeyedString"/>

 

3. Create a topic with register_type and define types: 

<types>
<!-- other type defintion -->
<module name="DDS">
  <struct name="KeyedString">
    <member name="key" type="string" key="true"/>
    <member name="value" type="string"/>
  </struct>
</module>
</types>
<!-- Domain Library -->
<domain_library name="MyDomainLibrary">
  <domain name="MyDomain" domain_id="0">
   <register_type name="keyedStringType" type_ref="DDS::KeyedString">
     <registered_name>DDS::KeyedString</registered_name>
   </register_type>

   <topic name="keyedStringTest" register_type_ref="keyedStringType"/>
  </domain> 
</domain_library>   
                

 

I got always the following error:

DS_DynamicDataReader_narrow:ERROR: Bad parameter: wrong type reader

RTIDDSConnector_allocateReaderTable:DDS_DynamicDataReader_narrow

RTIDDSConnector_newI:Failed to allocate reader table

 

Is there anyone who tried this or have any idea how to do it? 

In the last case, I can change the registered_name to something like DDS;;KeyedString and it works. I can’t figure out why “::” causes this issue.

In the attachment section, I added the complete configuration file.

Best,

AttachmentSize
File shapeexample.xml5.4 KB
Offline
Last seen: 1 week 4 days ago
Joined: 04/02/2013
Posts: 140

Hi,

The type name "DDS::KeyedString" is pre-registered by default by all the DDS domain participants, so Connector won't let you register it again. Using a different name is fine, since by default readers and writers for the same topic match based on the type definition, not on the type name.

 

Alex