10 posts / 0 new
Last post
Last seen: 3 months 3 weeks ago
Joined: 09/29/2019
Posts: 8
string too long

Hi, I have a problem on DDS.

I set string lenth in idl is 65536, but when I publish data, it said: string too long, truncated to 1024.

Here is my idl struct setting, 

struct datamsg {
string<8> ID;
string<128> file_name;
string<65536> data;
long timestamp;

please tell me how to fix it, thanks.


1 post / 0 new
jwillemsen's picture
Last seen: 1 month 5 days ago
Joined: 09/24/2013
Posts: 53
Most efficient way to copy a DDS String sequence to std::vector<std::string> and back

I am wondering what is the most efficient (but safe) way to copy a DDS String sequence (using the 'old' DDS C++ API) to a std::vector<std::string> and back? In how far can C++11 move semantics be used safely?

1 post / 0 new
Last seen: 3 years 1 month ago
Joined: 03/03/2015
Posts: 19
Send String Arrays using Dynamic Data and Request-Reply pattern


I am a bit new to DDS. I am curently working with the request/reply pattern. I successfully managed to send requests and replies containing primitive types of data such as char, long, int, etc. What I am not trying to do is sending some string array with the request reply pattern and using Dynamic Data as the string array I'm trying to send must be custom made. Until now I managed to do something like this:


//Register the type support for creating string arrays

DDS_TypeCode* type = factory->create_struct_tc("MyType", structMembers, out_exc);

7 posts / 0 new
Last post
Last seen: 5 years 3 months ago
Joined: 01/14/2015
Posts: 8
Sequence - SIGABRT invalid pointer (C++)


I'm struggling with an embedded sequence within a struct. When I try to send it, the application terminates with a SIGABRT.

Given the following IDL:

const long MAX_STRING_LENGTH = 256;

enum StudentStatus{

struct Student{
string<MAX_STRING_LENGTH> name;
string<MAX_STRING_LENGTH> familyname;
StudentStatus status;

3 posts / 0 new
Last post
Last seen: 7 years 3 months ago
Joined: 05/06/2013
Posts: 2
Setting an array of strings

Given next field in a topic.

<member name="exerciseNickname"          type="string" arrayDimensions="4" stringMaxLength="20"/>

With the usual dynamicdata you have set some array types to set as double, byte, float, etc but there's no set_string_array.

Notice in my case i don't use idl file i use a file .qos to describe every topic instead.

How can i set the array of string?

Subscribe to RSS - string