DDS_TypeCodeFactory_create_array_tc

4 posts / 0 new
Last post
Offline
Last seen: 6 days 22 hours ago
Joined: 01/13/2016
Posts: 58
DDS_TypeCodeFactory_create_array_tc

how to use this function to create idl like this

module simDDS {

  struct data {

  long id;

  char szData[32];

  };

};

thanks for any help.

Offline
Last seen: 6 days 22 hours ago
Joined: 01/13/2016
Posts: 58

i need to dynamic create topic,and i don't know how to create array of char, and for some reason, i don't want to use sequence, so is there anybody who ever did it?

Offline
Last seen: 6 days 22 hours ago
Joined: 01/13/2016
Posts: 58

struct DDS_UnsignedLongSeq dimensions;
/*
* here, i don't know how to fill the dimension, suppose it is an array of 1x32
*/
DDS_TypeCode* sz = DDS_TypeCodeFactory_create_array_tc(factory, &dimensions, DDS_TypeCodeFactory_get_primitive_tc(factory, DDS_TK_CHAR), &ex);
if (ex != DDS_NO_EXCEPTION_CODE)
{
return NULL;
}

sara's picture
Offline
Last seen: 1 year 4 months ago
Joined: 01/16/2013
Posts: 128

Hi RareLonely,

I think you already found the answer here: https://community.rti.com/comment/3940#comment-3940, right? 

A good source of information for functions and API is the online API documentation: https://community.rti.com/static/documentation/connext-dds/5.2.3/doc/api/connext_dds/api_c/index.html

All the best,
Sara