On Mon, 15 Jul 2002, Subhodeep Sarkar wrote:
> TCAPMessages DEFINITIONS
> IMPLICIT TAGS ::=
> BEGIN
> EXPORTS ERROR;
>
> -- ERRORS
> -- Errors are specified with the ERROR MACRO.
> -- When an error is specified, the valid parameters for that error are indicated.
> -- Default values and optional parameters are permitted.
>
> ERROR MACRO ::=
> BEGIN
> TYPE NOTATION ::= Parameter
> VALUE NOTATION ::= value (VALUE CHOICE {
> localValue INTEGER,
> - globalValue OBJECT IDENTIFIER } )
> Parameter ::= "PARAMETER" NamedType | empty
> NamedType ::= identifier type | type
> END
>
> END
>
> TEST DEFINITIONS ::=
> BEGIN
> IMPORTS
> ERROR
> FROM TCAPMessages;
>
> SystemFailure ::= ERROR
> PARAMETER
> systemFailureParam INTEGER
> -- optional
>
> systemFailureParamVal SystemFailure ::= localValue 2
> END
>
> =========================================================
>
> I am not able to understand the syntax of "systemFailureParamVal" ?
systemFailureParamVal is a value reference of type SystemFailure, where
the value notation (the syntax on the right of the "::=") is determined by
SystemFailure. Since SystemFailure is defined in terms of the ERROR
macro, and the ERROR macro assigns "CHOICE {localValue INTEGER,
globalValue OBJECT IDENTIFIER}" to the Localvaluereference "VALUE", the
syntax of the value associated with a value of type SystemFailure is
"CHOICE {localValue INTEGER, globalValue OBJECT IDENTIFIER}". The
"localValue 2" says that the integer value 2 means a system failure
occurred.
Note that the macro notation is 1988 syntax and was removed from ASN.1 a
long ago. Also note that "localValue 2" is supposed to be "localValue : 2",
as specified in a 1991 corrigendum.
-------------------------------------------------------------------------
Bancroft Scott Toll Free :1-888-OSS-ASN1
OSS Nokalva International:1-732-302-0750
[EMAIL PROTECTED] Tech Support :1-732-302-9669 x-1
1-732-302-9669 x-200 Fax :1-732-302-0023
http://www.oss.com