Is there a way to learn Connext DDS programming? I am a student who is very interested in DDS. Until now I had learned basic instructions from User Manual and Getting Started but still had difficulties in programming. Can anyone give me an answer?
Is there a way to learn Connext DDS programming? I am a student who is very interested in DDS. Until now I had learned basic instructions from User Manual and Getting Started but still had difficulties in programming. Can anyone give me an answer?
Hi,
You could take a look at these examples that show how to use different APIs in the Connext DDS SDK.
You an also take a look at the Connext DDS Case+Code. The Case+Code examples illustrate how to buid some practical application scenarios using Connext DDS.
Gerardo
Okay, thank you very much Mr. Gerardo. If I want to start programming, should I use built-in types, language-independent description language and RTI Code Generator (rtiddsgen), or dynamic types? In case I use built-in types, where should I begin?
Hello!
I recommend the following:
1) If you have an application that already knows what data it is generating or receiving (and if that data is more complex than a string), I recommend using data types defined in language-independent IDL/XML with the code generator. This allows you to access and modify your data the way you would access any other structure/object in the language you're using.
2) If you have an application that needs to perform some generic function, such as displaying the data of every DataWriter it discovers, then I recommend using dynamic data. This lets you view and manipulate data that you did not know about at compile-time, but it is more difficult to use. (It's comparable to reflection in Java.)
3) If you have data that is binary (like an image), or a string, that is a good use case for the built-in data types. I don't usually recommend these if you have structured data, because then you would have to serialize/deserialize that data yourself and maybe guarantee correctness across multiple languages/endianness.
Okay thank you very much for the information. I try to implement RTI Connext DDS in an IoT system for smart dispenser. These are all the data types that belong in smart dispenser:
- float volume
- integer temperature
- float flow_rate
- boolean refill
- integer power
Is it correct if I define it in language-independent IDL/XML with the code generator? Sorry if I always ask because I'm still a beginner in using RTI Connext DDS.
Yes! That's a good way to do it. In IDL, your type might look like this: