1. Created following IDL file.
typedef string str;
typedef str str_el;
struct abc
{
str_el dhruv;
};
2. Input this file to rtiddsgen in connext 5.2.0 and run.
3. On compiling the generated make file, it throws compilation errors (logs attached)
4. However , on changing the first line to "typedef char* str", it works fine. Also on using rtiddsgen of connext 5.1.0, no such problem observed.
5. Plz explain.
Attachment | Size |
---|---|
error_idl.txt | 4.05 KB |
Hi,
There seems to be a bug in
rtiddsgen
generating code when a typedef references another typedef.This is caused by the fact that actual type-plugin code (serialization, deserialization, printing) is generated only for the actual types (i.e.
string
andstruct abc
) and not the alias types defined by a typedef. When rtiddsgen sees a typedef it emits code for the resolved (unaliased) type. However it seems than when encountering thestr_el dhruv
member instruct abc
, rtiddsgen realizesstr_el
is an alias but does not realize that the alased type forstr_el
, that is,str
is also an alias. Because of this it generates code assuming the actual is str which is incorrect resulting on the compile-time errors since that code does not exist.The problem goes away if you define the typedef refering to the resolved actual types rather than to other aliases as in:
I have filed a bug report (CODEGEN-789) to track the issue so that we can get it fixed in a future release.
Gerardo
Thanks a lot Mr Gerardo,
I would be obliged if you also consider the qurey posted under "reader listner not working ". If required, i can send exe & code files generated by Rhapsody.
Regards,
Dhruv