Dear Community
I'm trying to create a Multicast HelloWorld subscriber, under the micro edition of RTI DDS in C. But when I try to follow the examples I see on the web and in the documentation, I find that there's no multicast transport settings defined at the subscriber level.
Is there some documentation which I can refer to which would show me how to do this at the level of the domain participant? I have HelloWorld working between my PC and my embedded system, but it's set up for unicast subscriber. So every subscriber I create gets another set of messages for every update. I want to prove out the mutlicast implementation, but so far I'm unable to find a clear description of how to do this
Thanks
Hi,
For example, QoS to set for multicast on 239.255.0.1
QoS Participant:
*DDS_StringSeq_get_reference(&dp_qos.discovery.enabled_transports, 0) =DDS_String_dup("_udp://239.255.0.1");
*DDS_StringSeq_get_reference(&dp_qos.user_traffic.enabled_transports, 0) =DDS_String_dup("_udp://239.255.0.1");
*DDS_StringSeq_get_reference(&dp_qos.discovery.initial_peers,0) = DDS_String_dup("239.255.0.1");
QoS UDP:
udp_property->multicast_interface = REDA_String_dup("lo0"); or eth0 or your interface name
QoS DataReader:
*REDA_StringSeq_get_reference(&dr_qos.transport.enabled_transports,0) ="239.255.0.1";
QoS DataWriter:
*REDA_StringSeq_get_reference(&dw_qos.transport.enabled_transports,0) ="239.255.0.1";
It should work.
Rodolf
Hi Eric and Rodolf,
To receive user data over multicast with Connext Micro, it is configured on the DomainParticipant, with DomainParticipantQos.user_traffic.enabled_transports as you've done in the second line of your "QoS Participant."
I verified this by taking the HelloWorld_dpde example from Micro 2.2.3, adding the following lines to HelloWorldApplication.c,
and running the example on a single machine to discover over loopback but send/receive user traffic over multicast. I also verified with Wireshark that user traffic was being sent and received over the multicast address of 239.255.0.1.
Although the QoS are present, setting user_traffic for multicast with DataWriterQos and DataReaderQos is not yet supported. Note that setting enabled_transports on the DataWriterQos and DataReaderQos needs to follow the same syntax as for DomainParticipantQos (for example "_udp://239.255.0.1" to use the built-in UDP transport with multicast address 239.255.0.1).
Regards,
Edward
Hello Gentlemen,
Thanks for your replies. I'm working on the same project as the etexley. I'm working from the snippets you've both posted to acheive the desired functionality using the HelloWorld_dpde example on a WIN32 platform. We're nearing completion of our connext micro port to our target platform, but we've hit a snag testing the multicast functionality we require. We'd like to get the windows example working first so we have something to compare with. Perhaps you could point out my mistakes or provide a working example?
Hi James,
Are you getting an error log message? Or are you not getting successful communication?
Try removing line 5 of your code snippet ("
udp_property->multicast_interface = REDA_String_dup(
"Local Area Connection"
);")
Regards,
Edward
Hi Edward,
I was having some networking issues that were compounding my problem (not related to DDS). Also, line 5 of the snippet is unnecessary as you mentioned. Using the above code (without line 5) I can get the Connext Micro HelloWorld publisher and subscriber applications to talk to each other. Thanks!