I am trying to port some code from Connext v5.3 to v7.2 and I ran into a problem with rtiddsgen no longer generating the following functions:
FooPlugin_get_serialized_sample_size() and FooPlugin_get_serialized_sample_min_size().
The only version of the functions available seems to be FooPlugin_get_serialized_sample_max_size()
Is there a way to still access these functions in Connext v7.2?
Or is there an alternative for FooPlugin_get_serialized_sample_size() ?
Fundamentally, you have to call
FooPlugin_serialize_to_cdr_buffer()
which will return the length of the serialized buffer after serialization.
That's disappointing.
Thanks non the less.
Hi Chris,
So, I got this from more knowledgeable folks at RTI...
If the buffer passed to serialize_data_to_cdr_buffer_ex in RTI Connext Professional is NULL, the function will not perform serialization but instead will calculate and return the required buffer size for serialization. This behavior allows the caller to determine the appropriate buffer size needed to serialize the data without actually performing the serialization. Once the required size is known, the caller can allocate a buffer of the appropriate size and call the function again with a non-NULL buffer to perform the actual serialization.
I can use that. Thanks Howard!