ASN.1 help please

Bertil Karlsson bertil@REDACTED
Mon Jan 12 15:00:54 CET 2004


You have found an asn1 subtype construct that there is no support of in 
the asn1 compiler yet. It is not hard for us to implement but I cannot 
promise support of it before R10.

If you use BER encoding the easiest way to fix the problem is to comment 
  the constraint in the type AnotherThing like:
AnotherThing ::= Thing
-- ( fred
--  | fred2
-- )

If you use PER you have to change the identifiers fred and fred2 into 
their integer values.

/Bertil Karlsson

Nigel.Head@REDACTED wrote:
> I'm attempting to compile a largeish chunk of an ASN.1 spec and am running into
> problems. The spec apparently compiles OK with other compilers (although I don't
> have any around to prove this to myself, so it's only hearsay).
> 
> I've managed to reproduce the problem with a toy source file; as I'm an ASN.1
> utter beginner I'd appreciate help as to what is wrong with this so that I can
> make the corrections to the real thing (which is a bit large to bother you all
> with !!).
> 
> 
> =================== source file =================
> 
> TEST
> DEFINITIONS
> ::= BEGIN
> 
> Thing ::= INTEGER
> {    fred (0)
> ,    fred2     (1)
> ,    fred3     (2)
> }
> 
> AnotherThing ::= Thing
> (    fred
> |    fred2
> )
> 
> 
> END
> 
> =================== error message ==============
> 
> (N1@REDACTED)5> asn1ct:compile('TEST').
> Erlang ASN.1 version "1.4.2" compiling "TEST.asn1"
> Compiler Options: []
> asn1error:10:'TEST':'AnotherThing' {asn1,{undefined_type_or_value,fred}}
> {error,{asn1,[{error,{type,10,
>                            'TEST',
>                            'AnotherThing',
>                            {asn1,{undefined_type_or_value,fred}}}}]}}
> 
> 
>  N.
> 
> 
> 


-- 
/ Bertil Karlsson




More information about the erlang-questions mailing list