7.10. Known Issues with FlatData

7.10.1. FlatData language bindings do not support automatic initialization of arrays of primitive values to non-zero default values

RTI FlatData™ language bindings do not support the automatic initialization of arrays of primitive values to non-zero default values, unless the primitive is an enumeration. It is possible to declare an alias to a primitive member with a default value using the @default annotation, and then to declare an array of that alias. For example:

@default(10)
typedef int32 myLongAlias;

struct MyType {
    myLongAlias myLongArray[25];
};

The default values of each member of the array in this case should be 10, but in FlatData they will all be set to 0.

[RTI Issue ID CORE-9986]

7.10.2. Flat Data: plain_cast on types with 64-bit integers may cause undefined behavior

The function rti::flat::plain_cast is allowed on FlatData samples containing int64_t members, but those members are not guaranteed to have an 8-byte alignment (a 4-byte alignment is guaranteed). Memory checkers such as Valgrind may report errors when accessing such members from the pointer returned by plain_cast.

[RTI Issue ID CORE-10092]