DynamicData to JSON/XML w/ Modern C++ API


I'd like to serialize a DynamicData sample to JSON/XML using the Modern C++ APIs.

I realize there are internal APIs:  DDS_DynamicDataFormatter_to_xml and DDS_DynamicDataFormatter_to_json.  But, these APIs seem to take DDS_DynamicData types as arguments.  Is there an equivalent API for the Modern C++ DynamicData type ?  Thanks!

DynamicData set_complex_member corrupts data

I am having problems with Connext 5.1 when copying a struct member from one DynamicData to another with set_complex_member. Before the set_complex_member everything in the destination DynamicData is fine, but afterwards it appears to no longer be complete. The call itself does not return an error. I also get error outputs on the console when the DataWriter attempts to write the instance afterwards. The attached text file contains the IDL and C++ code for a small example which illustrates the problem by simply printing the type before and after set_complex_member.

rtiddsspy / DdsDynamicData support of (absurdly) large enumerations

I have an application in which some of my enumerations are, by any sensible measure, absurdly large.  One specific example relevant to this is an enumeration with 76 defined enumeration values inside the braces.

This leads to some very large case statements in FooPlugin_deserialize_sample, as it attempts to assert that the input eumeration value is valid, but this has not (yet?) appeared to cause any real code problem.


TypeCode creation from XML

Is there any available function to create a TypeCode from a XML definition (in C++)?
Preferably without creating any other DDS entities (I do not want a Reader/Writer involved at this point).

I whould like to be able to do something like this, where HelloWorld.xml is the generated XML output of rtiddsgen -convertToXml:

   DDS::TypeCode* tc = XMLtoTypeCode( "HelloWorld.xml" );

Delete last element of DynamicData sequence member


I think my problem is related to Dynamic data sequence. Delete element. Java and is that it's not possible to delete the last element from the sequence with bind_complex_member() and clear_all_members() call. I dynamically create the type with sequence member:


DDS_DynamicData::get_complex_member() performance

I have written code to traverse dynamic data to collect data (read only) of samples. The code yields the correct results, however, performance can be very slow. In particular, traversing samples with arrays of structures. Running valgrind, 70% of call time is dedicated to get_complex_member().  I have also tried bind_complex_member() which is 40% slower, and is counter to what I expected (eliminating the overhead of copying should be faster.)

Using the Excel add-in

I'm very new to this product and this might be a silly mistake but... I'm looking at the RTI DDS add-in for Excel, and I'm trying to rewrite the Hello_simple HelloPublisher.java example that comes with it to publish a string, and get Excel to pick it up. Everything works, apart from displaying the value of the string I feed it. (It picks up the time the message was sent, and all the other meta-data just fine)

When I run my code, after having set up Excel, I get the following error:

DDS_DynamicData_copy:invalid operation, src bound to member id 123456789

Convert user sample into a DynamicData sample


I'd like to convert a user-defined sample into a DynamicData sample so that I can use typecodes to output the message in a custom format (in C++).

Subscribe to RSS - dynamicdata