Erlang's ASN.1 implementation fails to compile X.880

Bertil Karlsson <>
Thu Jan 31 14:38:54 CET 2002


Hello,

Your example fails on the parameterized information object set Errors.
The last version of the asn1-compiler (asn1-1.3.2) did not support some
of the asn1 productions used in X.880. For instance Parameterized
Information Object productions and Value Sets.

We have since that release extended the ability of the compiler so that
it can manage
X.880. There is no patch available yet, though.

/Bertil Karlsson

Frank Derks wrote:
> 
> I had hoped that X.880 would not present any problems for Erlang's
> implementation of the ASN.1 compiler, but it seems I am somewhat out of luck.
> 
> X.880 defines the following in the Remote-Operations-Generic-ROS-PDUs module:
> 
> Errors {OPERATION:Operations} ERROR ::= {Operations.&Errors}
> 
> The Erlang ASN.1 compiler is not able to compile this. I tried compiling
> the below ASN.1 (which is a stripped down version of the X.880 module I
> referred to above):
> 
> Test
> DEFINITIONS AUTOMATIC TAGS ::=
> BEGIN
> 
>     OPERATION ::= CLASS
>     {
>       &ArgumentType          OPTIONAL,
>       &argumentTypeOptional  BOOLEAN OPTIONAL,
>       &returnResult          BOOLEAN DEFAULT TRUE,
>       &ResultType                  OPTIONAL,
>       &resultTypeOptional          BOOLEAN OPTIONAL,
>       &Errors                ERROR OPTIONAL,
>       &Linked                OPERATION OPTIONAL,
>       &synchronous           BOOLEAN DEFAULT FALSE,
>       &alwaysReturns         BOOLEAN DEFAULT TRUE,
>       &InvokePriority        Priority OPTIONAL,
>       &ResultPriority        Priority OPTIONAL,
>       &operationCode         Code UNIQUE OPTIONAL
>    }
> 
>     ERROR ::= CLASS
>     {
>       &ParameterType          OPTIONAL,
>       &parameterTypeOptional  BOOLEAN OPTIONAL,
>       &ErrorPriority          Priority OPTIONAL,
>       &errorCode              Code UNIQUE OPTIONAL
>     }
> 
>     Code ::= CHOICE
>     {
>       local   INTEGER,
>       global  OBJECT IDENTIFIER
>     }
> 
>     Priority ::= INTEGER
> 
>     Errors {OPERATION:Operations} ERROR  ::= {Operations.&Errors}
> 
> END -- end of Remote-Operations-Apdus definitions
> 
> And I get the following results:
> 
> Erlang ASN.1 version "1.3.2" compiling "Test.asn"
> Compiler Options: []
> {'EXIT',{{case_clause,{pvaluesetdef,false,
>                                     38,
>                                     'Errors',
>                                     [{{type,
>                                           [],
>                                           {'Externaltypereference',
>                                               38,
>                                               'Test',
>                                               'OPERATION'},
>                                           [],
>                                           []},
>                                       {'Externaltypereference',
>                                           38,
>                                           'Test',
>                                           'Operations'}}],
>                                     {type,
>                                         [],
>                                         {'Externaltypereference',
>                                             38,
>                                             'Test',
>                                             'ERROR'},
>                                         [],
>                                         []},
>                                     {valueset,
>                                         {'SingleValue',
>                                             {'ValueFromObject',
>                                                 {objectset,
>                                                     38,
>                                                     {'Externaltypereference',
>                                                         38|...}},
> 
> [{typefieldreference,'Errors'}]}
> }}}},
>          [{asn1ct_check,checko,5},
>           {asn1ct_check,check,2},
>           {asn1ct,check,8},
>           {asn1ct,compile1,2},
>           {asn1ct,compile,2},
>           {erl_eval,expr,3},
>           {erl_eval,exprs,4},
>           {shell,eval_loop,2}]}}
> 15>
> 
> Does anyone have an idea what might be wrong, or is this a case of the
> ASN.1 compiler simply not supporting the definition of "Errors"
> 
> Regards,
> 
> Frank



More information about the erlang-questions mailing list