Datatype Mismatch

5 posts / 0 new
Last post
Offline
Last seen: 1 month 1 week ago
Joined: 10/23/2013
Posts: 42
Datatype Mismatch

Hello,

I am trying to understand the rules DDS uses for data type matching.  I have two applications trying to communicate.  One is built with rtiddsgen, the other registers types using the dynamic type registration APIs.  I used the Admin console to perform the match analysis.  See attached screen shots.  Although it appears the data types for the two topics are functionally equivalent, the noted difference is that application generated by rtiddsgen also registered the IDL typedefs used for two of the elements, while the hand written application did not register the the typedefs but rather used the equivalent underlying type.

My question is, is this the cause of the mismatch?  I would expect DDS is able to take typedefs into account and compare underlying type for equivalence.

Thanks.

Mark.

AttachmentSize
PDF icon Admin Console mismatch analysis29.69 KB
Organization:
Fernando Garcia's picture
Offline
Last seen: 2 months 1 day ago
Joined: 05/18/2011
Posts: 198

Hi Mark,

That mismatch is a bit weird, Admin Console is showing the struct within the sequence as "extensible" in the case of the type defined using DynamicData and "mutable" in the case of the IDL-defined type, which looks a bit odd.

Can you post an snippet with the code you used to create your DynamicData type and a snippet with the IDL? I can try to debug a reproducer to see the code path that type checking follows.

Thanks,
Fernando.

Offline
Last seen: 1 month 1 week ago
Joined: 10/23/2013
Posts: 42

Attached is the IDL file.  It is a little more difficult for me to extract and provide the source code.

Note, I have recently made a related post on DynamicData API's and processing typedef. 

https://community.rti.com/forum-topic/using-dynamicdata-api-topictype-definition-utilizing-typedef-idl

 

File Attachments: 
Fernando Garcia's picture
Offline
Last seen: 2 months 1 day ago
Joined: 05/18/2011
Posts: 198

Hi Mark,

I have written a publisher application that creates TypeCode to match your IDL and sends an empty sample. I have tested it against an rtiddsgen-generated subscriber application and they do communicate. Both are using the same QoS settings (I run them from a directory that had a common USER_QOS_PROFILES.xml file), the same Topic name, and so on.

My publisher application is available http://pastebin.com/rjP9DgUe. Please excuse the example, I have not added the calls to the finalize() functions and it may be missing some error checks, but it should work to verify that communication occurs.

Can you try if this example communicates with your subscriber application in your environment? If it does not, try with an rtiddsgen-genereated example and we will debug from there.

Thanks,
Fernando.

Offline
Last seen: 2 months 3 days ago
Joined: 06/09/2020
Posts: 1

Could I ask if this issue was ever resolved?  I have a number of participants running from IDL topics that are shown as partially matched against the equivalent XML loaded topics.  The XML is generated using rtiddsgen from the IDL. 

Specifically the topics contain a typedef of a fixed length byte array.  In the IDL generated topics this appears as a named referenced type, however in the XML loaded topics the type is inlined and looses the typedef name.  Is there a way of preventing this inlining of the typedef?

To be clear, the IDL and XML based participants communicate correctly but they are marked as partially matched in the Administration Console and have different TypeCodes.

Thanks,

Tom