dynamicdata

12 posts / 0 new
Last post
rgs
Offline
Last seen: 5 days 3 hours ago
Joined: 07/26/2022
Posts: 7
Modern c++ interface: How to lookup a topic and create DataReader from PublicationBuiltinTopicData

Hi all,

9 posts / 0 new
Last post
Offline
Last seen: 1 year 1 month ago
Joined: 08/03/2021
Posts: 6
DynamicData with a custom transport

We have a need to use DynamicData with a custom transport using the modern C++ API.
I was able to generate and run the custom FILE transport example for C++11 but that uses an IDL defined data type, CustomTransport.

I have a HelloWorld publisher and subscriber that use DynamicData that I was hoping to get working with the custom FILE transport instead of the built-ins transports.
I was hoping I might be able to simply use the custom_transportPlugin.cxx and hpp files generated by the custom transport example and change "CustomTransport" to "dds::core::xtypes::DynamicData".

Organization:
1 post / 0 new
Offline
Last seen: 1 year 5 months ago
Joined: 04/03/2021
Posts: 1
Get/set external data buffer for DynamicData

Hello,

I generate a topic during runtime from a user description (rti dds 6.0.1) with C++ 17, just like in the tutorial and I want to memcpy the contiguous data that I have in a buffer to the dynamic data (underlying) memory buffer in order to avoid looping. I don't want to shuffle the data from the buffer to individual sections of the dynamic data manually.

6 posts / 0 new
Last post
Offline
Last seen: 1 year 10 months ago
Joined: 11/22/2020
Posts: 1
Enum value name and type from DynamicData

I have defined an enum MyEnum in my IDL with values One and Two. Then I define a struct MyStruct with a single member myEnum of type MyEnum. So far so good.

Now, in my recorder service plugin I'm looking at MyStruct, but in the shape of a DynamicData. I can get the value of the enum with dynamicData.value(int32_t), but how can I translate that to "One" or "Two"? And how can I work out the name of the type ("MyEnum") for that member of the DynamicType? I'm using the modern C++ API of DDS version 6.0.1.

Organization:
5 posts / 0 new
Last post
Offline
Last seen: 5 months 3 weeks ago
Joined: 01/28/2016
Posts: 9
DynamicData to JSON/XML w/ Modern C++ API

Hi,

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!

1 post / 0 new
Offline
Last seen: 5 years 11 months ago
Joined: 04/29/2016
Posts: 9
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.
5 posts / 0 new
Last post
jcwenger's picture
Offline
Last seen: 1 year 5 months ago
Joined: 01/21/2015
Posts: 11
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.

Keywords:
6 posts / 0 new
Last post
Offline
Last seen: 5 years 11 months ago
Joined: 04/29/2016
Posts: 9
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" );
   DDS::DynamicData data( tc, DDS_DYNAMIC_DATA_TYPE_PROPERTY_DEFAULT );

1 post / 0 new
Offline
Last seen: 4 years 7 months ago
Joined: 04/04/2014
Posts: 27
Delete last element of DynamicData sequence member

Hello,

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:

Organization:
Keywords:
3 posts / 0 new
Last post
Offline
Last seen: 7 years 4 months ago
Joined: 04/14/2015
Posts: 2
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.)

Subscribe to RSS - dynamicdata