How to get resigered data types information

5 posts / 0 new
Last post
Offline
Last seen: 5 years 2 months ago
Joined: 01/20/2015
Posts: 6
How to get resigered data types information

I would like to know that how can I get  information of registered data type  with their attributes in DDS. Through builtin topics I can get the information about the topics and there data type and QOS. But How can I get the attributes of registered data types.

rip
rip's picture
Offline
Last seen: 1 day 22 hours ago
Joined: 04/06/2012
Posts: 324

1) ... you have to know the type to register the type.  So don't you already know the structure of the type?

2) Create a second participant and use the builtin topics to get the information you need, ie via a loopback?

I think I don't understand your need.

Offline
Last seen: 5 days 2 hours ago
Joined: 05/23/2013
Posts: 55

Hi,

If your need fits the second one that Rip suggested, you can take a look at this example. 
https://github.com/rticommunity/rticonnextdds-examples/blob/master/examples/using_typecodes/java/msgSubscriber.java

This example seems to use built-in topics and print attributes of data types using the type_code value like following.
data.type_code.print_IDL(2);

Offline
Last seen: 5 years 2 months ago
Joined: 01/20/2015
Posts: 6

yes I dont know the structure of type and I want to develop application to monitor topic, their datatype and value. Is it possible to develop such application in C++.

 

Offline
Last seen: 5 days 2 hours ago
Joined: 05/23/2013
Posts: 55

Hi,

Getting topics and data types using built-in topics is fairly easy, but data contents (values) cannot be obtained by the entities using built-in topics. 
I have not done this work (getting data contents of unkown topics and types), so I am not pretty sure.
If you like to get data contents of unknown topics and types, I guess you need to have two phases in your program. 

First, you need to get information of topics and types in your system (domain) using the built-in topics. 
You can refer to the same example that I mentioned in the previus comment, but in c++.
https://github.com/rticommunity/rticonnextdds-examples/tree/master/examples/using_typecodes/c++

Second, you would need to create data readers to get data contents using dynamic data APIs based on the type code information obtained in the first step. 

I think the following posts might help you to solve your problem. 
https://community.rti.com/forum-topic/dynamic-discovery-and-type-codes
https://community.rti.com/forum-topic/dynamicdata-api-usage-receiving-arbitrary-data-topic