Compilation failure with Java classes generated by rtiddsgen

5 posts / 0 new
Last post
Offline
Last seen: 2 months 2 weeks ago
Joined: 08/22/2019
Posts: 4
Compilation failure with Java classes generated by rtiddsgen

Hello,

I'm using rtiddsgen (from the 6.0.0 distribution) to generate Java classes from an IDL file.

rtiddsgen -d output -inputidl ida.idl -language Java -package dds.xyz -ppDisable -update typefiles

The Java classes are generated successfully, but some of them cannot be compiled. The errors reported by the Java compiler mainly have to do with converting to either a Sequence or a List. Here are a couple of examples:

C:\src\dds\xyz\ida\XyzDataReader.java:42: error: incompatible types: XyzSeq cannot be converted to List
        take_untyped(received_data, info_seq, max_samples, sample_states,
                     ^

C:\src\dds\xyz\ida\XyzSeq.java:21: error: incompatible types: int cannot be converted to XyzSeq
    public dds.xyz.ida.XyzSeq userData =  new dds.xyz.ida.XyzSeq((dds.xyz.ida.MAPPEDPOINTCLOUD_MAX_SIZE.VALUE));
                                                                 ^

Indeed, XyzSeq is not a List. It merely implements Copyable and Serializable. I assume I'm missing something when executing rtiddsgen, but so far I do not see it. Any suggestions are welcome.

irwin's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 08/14/2010
Posts: 17

Hi,

   I need your ida.idl file in order to help you. Please attach it.

                   Irwin

Offline
Last seen: 2 months 2 weeks ago
Joined: 08/22/2019
Posts: 4

Hi Irwin,

thank you for your trying to help. I'd create and upload a minimal IDL file, but we were able to identify the cause in the meantime. These messages had to to with sequences and lists that were not used directly but using a typedef. Eliminating the typedefs also made the Java files compilable.

Best regards, Stefan

irwin's picture
Offline
Last seen: 1 month 2 weeks ago
Joined: 08/14/2010
Posts: 17

Stefan,

     This is a known issue. The Bug ID is CODEGENII-1105. This fix is available in the 5.3.1.20 Patch release. It will be incorporated in our next major release. That data is not scheduled yet.

                                      Irwin

Offline
Last seen: 2 months 2 weeks ago
Joined: 08/22/2019
Posts: 4

Irwin,

great, thank you for your feedback!

Best regards, Stefan