Suggestions for generic topic publishing tool

4 posts / 0 new
Last post
Offline
Last seen: 5 years 6 months ago
Joined: 03/02/2018
Posts: 3
Suggestions for generic topic publishing tool

We're prepping for initial system bringup and several folks asked for an easy way to inject basic DDS messages on our network. This is primarily a writer tool, for reading we already have Admin Console & SPY of course. The usage would be diagnostics: i.e., we take a chunk of the system offline, and then have this injection tool be able to publish a few topics to make the online parts of the system do something interesting.

This feels like a common scenario, so I would sort of anticipate the out-of-box RTI tool set to provide some existing support for generically writing a discovered topic. But that doesn't seem to be the case, at least that I see.

Just to make sure I'm not overlooking something obvious, I wanted to check for suggestions before kicking off an effort of getting a dedicated test injection app implemented.

Two quick questions.

1 -- are you aware of tools by RTI or third party vendors that do this?

2 -- assuming we do a custom app, in your experiences have you observed ways that did or didn't go well? I've thought of a couple ideas, one of them is to build a console line app in C# that takes arguments and uses reflection to reverse look up the domain topics, create a writer, and allow a user to send to the writer. Have also considered whether we should set up Labview. That would make a nice front end, but feels like the same (or more) backend work.

My basic thought process goes along the lines of avoiding any effort that's a black hole, and bonus points for something generic so that there isn't a ton of maintenance to sync with product code over time. Also it's OK if this is locked to a platform, such as a Windows PC -- it's primarily for HLA-level integration debugging prior to bringing a full system together. I don't need this injection software to be safety-critical. It is also understood that this app would likely need to limit itself only to topics not subject to an overly-complex QoS.

We are using DDS Pro 5.3.1, mostly C++11, as well as some test software in C#.

Ideas?

rip
rip's picture
Offline
Last seen: 2 weeks 4 days ago
Joined: 04/06/2012
Posts: 324

I've done this in the past using the common tools and behaviors of Topic discovery.  There is enough example code in the examples repository to see how this is done. 

The below tooling allowed me to write arbitrary data to arbitrary Topics with arbitrary Types.  This may be overkill.

From Topic discovery, I used the Type objects to generate an XSD (xml schema document).  This wasn't strictly necessary, the goal was orthogonal to your use case, however the result did allow me to simplify the below (the XMLSpy step). 

Next, I used DynamicData data readers to lurk on the Topic, capture incoming samples, and dump them to the hard-drive as fully formatted XML files (which were schema valid to the xsd generated above).  Dumped XML files included timestamps, so I could replay the XML reasonably close to the actual latencies and jitter seen in the original data. 

This above is effectively Recording Service, but using XML instead of an RDBMS to store the data.  XML is easier to muck with.

I could then manually edit the XML to inject faults.

Last part was a data writer, that would read the XML data using bindings created by XMLSpy, and then I would auto-walk the XML data and populate a DynamicData object with the contents -- and use the data writer to dump it out onto the bus.

Another way is described here, which does not rely on the tools or DynamicData, just manual steps for each Type.  The tricky part is still using an XML parser (sax or similar) to read the XML.

RTI may have since automated all or parts of the above, for example I think that IDL-generated Type libraries come with XML or json parsers/emitters.  I haven't looked recently.

rip

gianpiero's picture
Offline
Last seen: 11 months 2 weeks ago
Joined: 06/02/2010
Posts: 177

Hello, 

Thanks for asking this question on the community portal! We do have something to do just that. I am going to suggest two ways and you can see which one works best for you. 

1) Connext 5.3.1 comes with a command line utility called RTI Prototyper. It allows to publish and subscribe to messages using XML-Based App Creation. If you are using an IDL to define your types, you can convert the type in XML using rtiddsged -convertToXML. Then you specify in XML your domain, topics, reader and writeres and you can load that into prototyper that will allow you to subscribe and publish data. By default it prints received data on the screen and publishes 'empty' samples. BUT you can use LUA scripting language to do more complicate things. 

2) Use python or nodejs (even go) though the RTI Connector: a simplify api to DDS that will allow to use XML APP creation to publish and subscribe data. Same as above you can convert IDL to XML. We have several people using RTI Connector to do what you are describing with Python. Look at an example for a simple writer and a reader. The XML config is here

I put a bunch of links above, look it up and feel free to ask follow up question here or write me directly gianpiero [_at_] rti [_dot_] com

Best,
  Gianpiero

Offline
Last seen: 1 year 4 months ago
Joined: 05/23/2013
Posts: 64

Hi,

I am not sure it can meet your needs, but I developed a simple command line tool that can ingest DDS data (in JSON format) using RTI Go Connector. Please check this out at the following link. 

https://github.com/rticommunity/rticonnextdds-connector-go/tree/master/examples/dds_introspection

Thanks,
Kyoungho