DDS Class

1 post / 0 new
Offline
Last seen: 8 years 9 months ago
Joined: 01/09/2016
Posts: 8
DDS Class

I am working on creating a C++ class to abstract my DDS stuff. It is abstracted in a way that the user of the class will just a few methods like SubcribeTo<type>(string topicName), SubcribeTo<type>(string topicName), Write(T instance, string topicName), RegisterOnDataAvailableCallback(string topicName,void(*callback)(DDSDataReader*)), etc.

First, My class extends the DDSDataReader class and I do the necessary steps to register as a subscriber, but when I register my class (this) as a reader listener, its implementation of on_data_available is not called. I would like to know if I'm missing something. The RTI Console tool shows the writer and reader matched.

Second, is it a good approach to use templates so that the user of the class provides the type to the DDS class?

Third, I would like to know if there is any resource already on how to do this, or better yet do it in a more abstract way (like type discovery).

Thanks,