[jacorb-developer] idl compilation errors for enums with different names but same element names

Alka Nand alka.nand at gmail.com
Mon Jul 2 23:30:08 CEST 2012


Nick,

Thanks so much. Yes - I do see that it is illegal. Hmm... This is legacy
IDL Ihat I am porting from Orbix to JacORB. Is there a workaround you can
suggest? I tried the sloppy names compiler option but that did not work.

Thanks
alka nand

On Mon, Jul 2, 2012 at 3:42 PM, Nick Cross <jacorb at goots.org> wrote:

>
> I believe this is illegal IDL. See CORBA 3 (04-03-12), section 3.20.2.
>
> Regards
>
> Nick
>
>
>
> On 02/07/12 20:07, Alka Nand wrote:
>
>> Hi,
>>
>> I have 2 idl files ethernetportypes.idl and ethernetporttypesR.idl  which
>> define enums which have different names but the entries are the same name.
>> Is there a compilation flag that I can set to get around this apparent
>> namespaces problem? Since Java allows this why is the idl compiler
>> complaining?
>>
>> module EthernetPortTypes {
>>
>>     /* Status for each port */
>>     /* Represents the led state of a EthernetPort
>>     The enum values map to the port type and its led status */
>>     enum* LinkStateR1_T* {
>>
>>        /* Eth Port is down */
>>        *eETHLINKDOWN,*
>>
>>        /* Eth Port is up but no TX/RX */
>>      *  eETHLINKUP,*
>>
>>        /* Eth Port is up with activity */
>>       * eETHLINKACTIVE,*
>>
>>        /* Eth Port State Unknown */
>>        *eUNKNOWN*
>>
>>     };
>>
>> ethernetportypesR.idl has the following
>>
>> module EthernetPortTypes {
>>     enum *LinkState_T* {
>>
>>        /* Eth Port is down */
>>        *eETHLINKDOWN*,
>>
>>        /* Eth Port is up but no TX/RX */
>>       * eETHLINKUP,*
>>
>>        /* Eth Port is up with activity */
>>       * eETHLINKACTIVE,*
>>
>>        /* DSL Port IDLE Unconfigured */
>>        eIDLENOTCONFIGURED,
>>        /* DSL Port IDLE Configured */
>>        eIDLECONFIGURED,
>>        /* DSL Port attempting to connect with ATUR */
>>        eRUNNINGACTIVATION,
>>        /* DSL Port busy establishing link */
>>        eRUNNINGINIT,
>>        /* DSL Port data transport is active */
>>        eRUNNINGSHOWTIMEL0,
>>        /* DSL Port Testmode is active */
>>        eTESTMODE,
>>        /* DSL Port Loop Diagnostics Init Ongoing */
>>        eRUNNINGLDINIT,
>>        /* DSL Port Loop Diagnostics complete */
>>        eIDLELDCOMPLETE,
>>        /* DSL Port data transport active in L2 Power Mgmt Mode */
>>        eRUNNINGSHOWTIMEL2,
>>        /* Eth/DSL Port State Unknown */
>>        *eUNKNOWN*
>>
>>     };
>>
>>
>> I am seeing the following idl compilation error
>>
>>     [jacidl] processing idl file:
>> V:\nanda_iptv\vobs_components_**mxip_emsne_interface\idl\**
>> ethernetportmgr\**ethernetportmgr.idl
>>     [jacidl] processing idl file:
>> V:\nanda_iptv\vobs_components_**mxip_emsne_interface\idl\**
>> ethernetportmgr\**ethernetportmgrR.idl
>>     [jacidl] Jun 27, 2012 3:35:26 PM org.jacorb.idl.util.IDLLogger error
>>     [jacidl] SEVERE: ethernetporttypesR.idl, line:50(20): Identifier
>> eETHLINKDOWN already defined in immediate scope
>>     [jacidl]   enum LinkState_T
>>     [jacidl] Jun 27, 2012 3:35:26 PM org.jacorb.idl.util.IDLLogger error
>>     [jacidl] SEVERE: ethernetporttypesR.idl, line:50(20): Identifier
>> eETHLINKUP already defined in immediate scope
>>     [jacidl]   enum LinkState_T
>>     [jacidl] Jun 27, 2012 3:35:26 PM org.jacorb.idl.util.IDLLogger error
>>     [jacidl] SEVERE: ethernetporttypesR.idl, line:50(20): Identifier
>> eETHLINKACTIVE already defined in immediate scope
>>     [jacidl]   enum LinkState_T
>>     [jacidl] Jun 27, 2012 3:35:26 PM org.jacorb.idl.util.IDLLogger error
>>     [jacidl] SEVERE: ethernetporttypesR.idl, line:50(20): Identifier
>> eUNKNOWN already defined in immediate scope
>>     [jacidl]   enum LinkState_T
>>
>>     [jacidl] Jun 27, 2012 3:35:26 PM org.jacorb.idl.util.IDLLogger error
>>
>>     [jacidl] SEVERE:
>> V:\nanda_iptv\vobs_components_**mxip_emsne_interface\idl\**
>> ethernetportmgr\**ethernetportmgrR.idl,
>> line: 992(1): 4 error(s).
>>
>>     [jacidl]
>>
>> Target 'idl' failed with message 'org.jacorb.idl.**ParseException: Parse
>> error : Lexer errors'.
>>
>>
>>
>> --
>>
>> alka
>> ______________________________**_________________
>> jacorb-developer maillist  -  jacorb-developer at lists.spline.**
>> inf.fu-berlin.de <jacorb-developer at lists.spline.inf.fu-berlin.de>
>> https://lists.spline.inf.fu-**berlin.de/mailman/listinfo/**
>> jacorb-developer<https://lists.spline.inf.fu-berlin.de/mailman/listinfo/jacorb-developer>
>>
>>
>
>


-- 

alka


More information about the jacorb-developer mailing list