Using the C# API, I would like to create type code from the serialized type object blob stored in the SQLite file created by the RTI logger. I already do this in C++ using the following method but I have been unable to find the equivalent in C#. I am using DDS 5.3.1. Thank you.
RtiTypeCode CreateTypeCode(const char* data_in, size_t len, DDS_TypeObjectFactory* factory)
{
if (len == 0) { return nullptr; }
auto data = std::make_shared<std::vector<char>>(len);
std::copy_n(data_in, len, data->begin());
if (factory != nullptr) {
auto type_object = DDS_TypeObjectFactory_create_typeobject_from_serialize_buffer(factory, data->data(), data->size());
auto type_code = DDS_TypeObject_convert_to_typecode(type_object);
return RtiTypeCode(type_code, [](DDS::TypeCode* p){
RTICdrTypeCode_destroyTypeCode(reinterpret_cast<RTICdrTypeCode*>(p));
});
}
auto cdr_type_code = reinterpret_cast<RTICdrTypeCode*>(data->data());
auto type_code = reinterpret_cast<DDS::TypeCode*>(cdr_type_code);
return RtiTypeCode(type_code, [data](DDS::TypeCode*){});
}
Correction. I'm using 5.2.3 on C# and 5.3.1 on C++. I'll update my C# to 5.3.1 and re-investigate.
I have updated to 5.3.1 and I am still unable to find the equivalent to DDS_TypeObjectFactory_create_typeobject_from_serialize_buffer in the C# API.
Hi Chris,
I took a look and couldn't find the API you mention exposed in C#. If you need this, please contact your FAE and they will follow up internally on this. Basically, we will file a request, get an estimate from Engineering, and provide a priority compared to other features requested. If somebody else needs this, let us know and we'll add them to the requesters list as well.
If you do not know who you FAE is, let me know and I'll follow up myself.
All the best,
Sara