Lev Walkin wrote:
 
> Banibrata Dutta wrote:
> 
> > Hi,
> > 
> > If the ASN.1 specification uses some C/C++ keywords (s.a. 
> say "class") e.g.
> > 
> > MyType ::= SEQUENCE {
> >   class INTEGER,
> >   index INTEGER
> > }
> > 
> > would the asn1 compiler typically modify the generated *.h files to 
> > rename "class" to something else ?
> > 
> > Since this is not a tool specific question, i hope it's 
> okay to ask it here.
> 
> The SourceForge's asn1c compiler would rename class to Class. 
> Others may do differently, as there's no formal standard on it.
> 
> --
> Lev Walkin
> [EMAIL PROTECTED]
> _______________________________________________
> ASN1 mailing list
> [email protected]
> http://lists.asn1.org/mailman/listinfo/asn1


I found a couple of similar problems with the RRC information elements ASN.1 in 
section 11.3 of the 25.311 spec. 

The Number of Transport Blocks choice can have a value of "small".
Unfortunately "small" is a reserved word when using MSVC to compile the ASN.1 
to a .dll file.

My workaround was to change "small" to "isSmall".

NumberOfTransportBlocks::=    CHOICE {
   zero                 NULL,
   one                  NULL,
   small                        INTEGER (2..17),
   large                        INTEGER (18..512)
}

Also in the information elements there is a bitstring called "SID" which when 
compiled to a C structure clashes with that in the standard Microsoft Visual C 
winnt.h file so I had to workaround that as well by using #undef

#ifdef SID
#undef SID

typedef struct SID {
    unsigned int    length;  /* number of significant bits */
    unsigned char   *value;
} SID;

#endif

Regards
Alastair Kinross
[EMAIL PROTECTED]
_______________________________________________
ASN1 mailing list
[email protected]
http://lists.asn1.org/mailman/listinfo/asn1

Reply via email to