Jump to content
OpenSplice DDS Forum
rowen

Python OpenSplice dds example

Recommended Posts

I recently started using the OpenSplice dds Python library and found the documentation less than clear. Having fought my way to working code I am making a simple set of example files available in hopes of helping others: https://github.com/r-owen/ddsexample

In addition to reading and writing a topic, this code demonstrates:

  • Specifying DDS partitions
  • Specifying custom quality of service values programattically
  • Reading data using asyncio

Suggestions for improvements are welcome. I am not very comfortable with the QoS XML file and would appreciate a pointer to good documentation on which settings should be specified under which categories and the defaults (since I suspect much of that file can be omitted).

Share this post


Link to post
Share on other sites

Hi,

Thanks a lot for your efforts, we'll take a good look asap...

I guess above, you're referring to the bundled "OpenSplice_PythonDCPSAPIGuide" (and related examples) ?

Cheers,

-Hans

Share this post


Link to post
Share on other sites

Yes OpenSplice_PythonDCPSAPIGuide.pdf is missing a lot of important information, including how to specify DDS partitions and how to specify QoS overrides. It is also full of TODO notes,, including "TODO change description the code is wrong". I ended up using your manuals for other languages and trying to adapt as best I could. I did not have access to your python examples when I was doing my work (though I have since found them -- in tools instead of examples)

Several things I think the dds library cannot do that I really wish it could:

  • Support content-filtered topics. I am using a QuerySet instead (but not in the example) but would much prefer to do the filtering before the data gets into my read queue.
  • Obtain QoS settings from the dds.QosProvider (or even do a dump to a string so I could see what settings are being used, even if I can't easily query for individual settings).
  • Get the dds.Reader from the dds.ReadCondition, so the read conditions returned from dds.WaitSet.wait could be used to actually read the data.

The license is GNU General Public License v3.0. You are welcome to use the examples as you see fit, and if you need a different license please let me know. However, I doubt you will find you can adopt anything "as is", as I have created a few convenience classes.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×