Use of name idl as a module doesn't work

5 posts / 0 new
Last post
Offline
Last seen: 2 years 11 months ago
Joined: 02/26/2016
Posts: 5
Use of name idl as a module doesn't work

This:

module idl
{
 enum A { a, b, c };
};
module other
{
 struct s
 {
 idl::A myA;
 };
};

  

when compiled using 

rtiddsgen file.idl

results in:

INFO com.rti.ndds.nddsgen.Main Running rtiddsgen version 2.3.0, please wait ...
idl_as_module.idl line 10:12 no viable alternative at character ':'
ERROR com.rti.ndds.nddsgen.Main idl_as_module.idl line 10:9 member type 'dl::A' not found
ERROR com.rti.ndds.nddsgen.Main Fail: The file couldn't be parsed and the rawTree wasn't generated
INFO com.rti.ndds.nddsgen.Main Done (failures)

 

is "idl" a reserved word?

 

 

Organization:
jwillemsen's picture
Offline
Last seen: 3 days 9 hours ago
Joined: 09/24/2013
Posts: 53

No, "idl" is not a reserved keyword but your IDL does have an error, you can't have A and a, our IDL compiler gives this error

ridlc i2.idl
IDL::ParseError: "a" clashed with "A".
    i2.idl: line 3, column 11

Offline
Last seen: 2 years 11 months ago
Joined: 02/26/2016
Posts: 5

changing { a, b, c } in my example to { x, y, z } produced the same result.

jwillemsen's picture
Offline
Last seen: 3 days 9 hours ago
Joined: 09/24/2013
Posts: 53

It looks to be an issue in rtiddsgen, I would recommend to open a support issue with RTI to get their support team to have a look.

Offline
Last seen: 2 months 2 weeks ago
Joined: 09/04/2019
Posts: 1

Hi Paul,

 

Did you find a solution ? 

I'm currently in the same case. 

 

Thank you

 

[EDIT] The solution is to reprend the "idl" module name with an underscore '_'.