Hi,
I have downloaded "rticonnextdds_connector-0.2.1" and tried a sample(ShapeExample) for C++ and Python. I was able to communicate within C++ process by "running ./objs/x64Linux2.6gcc4.4.5/ShapeExample_publisher" and "./objs/x64Linux2.6gcc4.4.5/ShapeExample_subscriber" in 2 terminals.
Similarly I was able to communicate between Python process by running "reader.py" and "writer.py" in 2 terminals. (Python import and uses "rticonnextdds_connector-0.2.1/lib/x64Linux2.6gcc4.4.5/librti_dds_connector.so").
Now I have C++ application and it want to communicate to Python using DDSRTI.
For eample run "./objs/x64Linux2.6gcc4.4.5/ShapeExample_publisher" in one terminal and "reader.py" in another terminal. But this seems not working, I understand C++ uses ""ndds/ndds_c.h"" header and python uses ctypes wrapper which is provided by "librti_dds_connector.so". Is there a way we can achive this communication ?
Note:
Attachment | Size |
---|---|
IDL used for generating C code | 38 bytes |
xml used to load in reader and writer python files | 3.03 KB |
Hello,
I generated a C++ example using rtiddsgen. Then i used the simple/reader shipped with the python connecton and i modified to use your xml file.
First thing i noticed is that the generated example is publishing on topic Example ShapeType and the xml file used for python is subscribing on topic Square.
I fixed that in the C++ publisher by using Square in the create_topic call. Recompiled, run again --> No comunication.
I used RTI Admin Console to see what was the problem. RTI Admin Console reported a mismatche type. The Shape type you are using in IDL is different than the one that is used in the XML.
I run rtiddsged -convertToXML shapeexample.idl . This generated shapeexample.xml that i used to cut and past the ShapeType definition in the XML file you attached.
The two processes can now talk to each other.
Please let me know if this solves your issue
Best,
Gianpiero
Hi Gianpiero,
Wow thanks for the fix, it worked well !!!
Can you help with when will the rticonnextdds_connector(rticonnextdds_connector-0.2.1.tar) for python be officially released.
Thanks,
Jayasanker
Hi Jayasanker,
I am glad I could help!!!
Connector is now an experimental feature. If you want to know more about productization plans I'd suggest you contact yout local sales representative or write to support@rti.com
Best,
Gianpiero
Hi Gianpiero,
Is the DDSRTI connector support communication between C/C++ and Java?
Thanks,
Jon
Hi Jon-Wu,
RTI Connector is designed to be used with scripting languages. We do have native DDS APIs for C, C++, C++11, and Java. Why would you prefer to use Connector instead of a native API? Is there any feature from Connector you cannot find in the other APIs?
Thanks,
sara
Hi Sara,
Thanks for the response. I am trying to figure out how to communicate two seperate DDS applications: One is running as a Server using C/C++ code and the other one is running as a Client using Java code. Is native API on DDS would work? If so, could you point me to the documentations or examples of how Server/Client written with different languages can communicate?
Thanks,
Jon