userData in rti version 6.1.1

6 posts / 0 new
Last post
Offline
Last seen: 1 month 1 week ago
Joined: 03/13/2022
Posts: 11
userData in rti version 6.1.1

Hi

I use the rti version 6.1.1. In this version, i can not use @copy in idl files and getting the information by the userData in runTime.

In old version I can use following idl:

 

module IDL_PersonProperties{

      payload{

              string name; //@copy(//General)

              string famiy; //@copy(//General)

      }

}

 

and getting the userData in runtime by the lowLevelInfo method

 

please help me

Thank you in advance

Howard's picture
Offline
Last seen: 1 day 39 min ago
Joined: 11/29/2012
Posts: 469

Sorry, I have no idea what you mean?  The "//@copy" directive copies the argument into the generated header files and type support source code.

(after correcting syntax errors in your idl above)  I ran rtiddsgen from 6.1.1 and here's some example output:

class IDL_PersonProperties_payload
{
  public:
    typedefstruct IDL_PersonProperties_payloadSeq Seq;
    #ifndef NDDS_STANDALONE_TYPE
    typedef IDL_PersonProperties_payloadTypeSupport TypeSupport;
    typedef IDL_PersonProperties_payloadDataWriter DataWriter;
    typedef IDL_PersonProperties_payloadDataReader DataReader;
    #endif

    DDS_Char *   name ;
    //General
    DDS_Char *   famiy ;
    //General

};
 
 
and you can see that the "//General" was copied into the code.
 
I don't know what you're referring to with "userData" and "lowLevelInfo".
 
Offline
Last seen: 1 month 1 week ago
Joined: 03/13/2022
Posts: 11

In the generated hpp and cxx files which are generated using rtiddsgen and .idl file, we had a method with lowLevelInfo name.

Using this method we could get the a string as output, It's seem that this method is deleted in corresponding file that generated by rtiddsgen 3.1.

Is it really deleted?

Howard's picture
Offline
Last seen: 1 day 39 min ago
Joined: 11/29/2012
Posts: 469

Which version of rtiddsgen are you referring to?  And what was the full signature of that class?  In which file(s) did you find it?

I don't find it anywhere in the generated code from 5.3.1 to 6.x.  I assume that you're generating code for the C++11 language binding?

Offline
Last seen: 1 month 1 week ago
Joined: 03/13/2022
Posts: 11

I use the rti v6.1.1 and rtiddsgen v3.1.1

the full signature of class is:

/*
WARNING: THIS FILE IS AUTO-GENERATED. DO NOT MODIFY.

This file was generated from General.idl
using RTI Code Generator (rtiddsgen) version 3.1.1.
The rtiddsgen tool is part of the RTI Connext DDS distribution.
For more information, type 'rtiddsgen -help' at a command shell
or consult the Code Generator User's Manual.
*/

I find it in the *.hpp files that generated from .idl

yes I want to generate code for C++11

Howard's picture
Offline
Last seen: 1 day 39 min ago
Joined: 11/29/2012
Posts: 469

Sorry, I meant what is the code for the class that is generated when I asked for "signature".  What you wrote above is not what I was referring to.  Perhaps you should attach both your IDL file and the .hpp files that were generated to this thread so that we can see what you are saying.

You originally were asking about "@copy" and then it seemed to change to missing a "lowLevelInfo" method.  Not sure how they are related.