dynamicdata

4 posts / 0 new
Last post
Offline
Last seen: 10 months 3 weeks ago
Joined: 09/14/2022
Posts: 4
DynamicType-IDLType interchangeability

Hello,

Is it possible for a Subscriber to read data from a Topic published with a specific IDL type (generated with rtiddsgen, for example) as DynamicData?
And, conversely, can a Subscriber read DynamicData but interpreting it automatically as an object of a specific IDL type?

If it's not possible when reading the data from DDS directly, is there another way to do some kind of automatic "casting" between objects of DynamicType and objects of specific IDL types?

Regards,
devazquez

 

Keywords:
12 posts / 0 new
Last post
rgs
Offline
Last seen: 1 year 7 months 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: 2 years 8 months 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: 3 years 2 weeks 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: 3 years 5 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: 2 years 2 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: 7 years 6 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: 3 years 3 weeks 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: 7 years 6 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: 6 years 2 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:
Subscribe to RSS - dynamicdata