Hello Everyone,
I have generated my code using rtiddsgen utility through idl file and code is running quite well. Now I am wondering what is the size of my topic.
I have searched alot about it but could not find out the answer. Can anyone please tell me how I can know the size of topic.
Hi,
I am not sure what you mean by "the size of my topic". The Topic has an associated data-type (e.g. Foo) and when you use it you end up creating data-objects (e.g. a foo_object) of that data type.
Are you talking about the size of the memory allocated when you create the foo_object. Or are you talking about the size needed to serialize the foo_object into a stream of bytes to send it on the network? Or is it something else?
Either way the type (Foo) does not have a size per se, it is the object (foo_object) that have sizes. For some types all objects may have the same size. But for many other types (e.g. those containing strings or sequences) the size would depend on the specific object.
If you used IDL to define your type, the code generated by rtiddsgen has some utility functions that help figure out some of these sizes. For example for a type FooType you will see these functions:
Gerardo