Modern C++ API - Wrong conversion from DDS_TCKind to dds::core::xtypes::TypeKind

4 posts / 0 new
Last post
Offline
Last seen: 4 years 1 week ago
Joined: 08/25/2015
Posts: 32
Modern C++ API - Wrong conversion from DDS_TCKind to dds::core::xtypes::TypeKind

Hi,


don't know if this was already reported but there seems to be a wrong conversion from DDS_TCKind to dds::core::xtypes::TypeKind.

We observed a strange behaviour while parsing out data from dds::core::xtypes::DynamicData. Although the debugger told us that the native type kind is DDS_TK_LONGLONG, the resulting dds::core::xtypes::TypeKind is FLOAT_128_TYPE.

Looking at the open source code (version 5.2.0, file DynamicTypeImpl.cxx:122ff) shows the culprit:

dds::core::xtypes::TypeKind get_type_kind_from_native(DDS_TCKind native_kind) {

using dds::core::xtypes::TypeKind;

switch (native_kind) {

...

case DDS_TK_LONGLONG: return TypeKind::FLOAT_128_TYPE;

case DDS_TK_ULONGLONG: return TypeKind::INT_64_TYPE;

case DDS_TK_LONGDOUBLE: return TypeKind::UINT_64_TYPE;

...

}

Looks like DDS_TK_LONGLONG/DDS_TK_ULONGLONG/DDS_TK_LONGDOUBLE was somehow mixed up ...

Offline
Last seen: 7 hours 46 min ago
Joined: 04/02/2013
Posts: 195

Hi Christian,

Thank you for reporting the problem. I have filed a bug to have this fixed as soon as possible. For future reference, the bug ID is CORE-7428.

Alex

Offline
Last seen: 4 years 1 week ago
Joined: 08/25/2015
Posts: 32

Hi,


are there any plans for a 5.2.1 patch release?

Thx,

Christian

Benito Palacios's picture
Offline
Last seen: 5 years 9 months ago
Joined: 10/05/2015
Posts: 13

Hi,

The fix for this issue will be in our next major release.


Regards,
Benito