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?
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; }
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?
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;
}
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