TOC PREV NEXT INDEX


ROSE OPERATION and ERROR



ROSE stands for "Remote Operations Service Element" and defines a request/response transaction protocol in which requests to a conforming entity must be answered with the result or errors defined in operation definitions. Variations of this are used in a number of protocols in use today including CSTA and TCAP.

The definition of the ROSE OPERATION MACRO that is built into the ASN1C90 version of the compiler is as follows:

OPERATION MACRO ::=             
 
BEGIN
 
  TYPE NOTATION           ::= Parameter Result Errors LinkedOperations
 
  VALUE NOTATION          ::= value (VALUE INTEGER)
 
  Parameter               ::= ArgKeyword NamedType | empty
 
  ArgKeyword              ::= "ARGUMENT" | "PARAMETER"
 
  Result                  ::= "RESULT" ResultType | empty
 
  Errors                  ::= "ERRORS" "{"ErrorNames"}" | empty
 
  LinkedOperations        ::= "LINKED" "{"LinkedOperationNames"}" | empty
 
  ResultType              ::= NamedType | empty
 
  ErrorNames              ::= ErrorList | empty
 
  ErrorList               ::= Error | ErrorList "," Error
 
  Error                   ::= value(ERROR)        -- shall reference an error value
 
                              | type              -- shall reference an error type
 
                                                  -- if no error value is specified
 
  LinkedOperationNames    ::= OperationList | empty
 
  OperationList           ::= Operation | OperationList "," Operation
 
  Operation               ::= value(OPERATION)    -- shall reference an operation value
 
                              | type              -- shall reference an operation type
 
                                                  -- if no operation value is specified
 
  NamedType               ::= identifier type | type
 

 
END
 

This MACRO does not need to be defined in the ASN.1 specification to be parsed. In fact, any attempt to redefine this MACRO will be ignored. Its definition is hard-coded into the compiler.

What the compiler does with this definition is uses it to parse types and values out of OPERATION definitions. An example of an OPERATION definition is as follows:

login OPERATION 
 
ARGUMENT SEQUENCE { username IA5String, password IA5String }
 
RESULT   SEQUENCE { ticket OCTET STRING, welcomeMessage IA5String }
 
ERRORS { authenticationFailure, insufficientResources }
 
::= 1
 

In this case, there are two embedded types (an ARGUMENT type and a RESULT type) and an integer value (1) that identifies the OPERATION. There are also error definitions.


The ASN1C90 compiler generates two types of items for the OPERATION:

The compiler does not generate any structures or code related to the OPERATION itself (for example, code to encode the body and header in a single step). The reason is because of the multi-layered nature of the protocol. It is assumed that the user of such a protocol would be most interested in doing the processing in multiple stages, hence no single function or structure is generated.

Therefore, to encode the login example the user would do the following:


The following is a picture showing this process:



On the decode side, the process would be reversed with the message flowing up the stack:

A picture showing this is as follows:



The login OPERATION also contains references to ERROR definitions. These are defined using a separate MACRO that is built into the compiler. The definition of this MACRO is as follows:

ERROR MACRO ::=
 
BEGIN
 
  TYPE NOTATION     ::= Parameter
 

 
  VALUE NOTATION    ::= value (VALUE INTEGER)
 

 
  Parameter         ::= "PARAMETER" NamedType | empty
 

 
  NamedType         ::= identifier type | type
 

 
END 
 


In this definition, an error is assigned an identifying number as well as on optional parameter type to hold parameters associated with the error. An example of a reference to this MACRO for the authenticationFailure error in the login operation defined earlier would be as follows:

applicationError ERROR
 
PARAMETER SEQUENCE {
 
  errorText IA5String
 
}	}
 
::= 1
 

The ASN1C90 compiler will generate a type definition for the error parameter and a value constant for the error value. The format of the name of the type generated will be "<name>_PARAMETER" where <name> is the ERROR name (applicationError in this case) with the first letter set to uppercase. The name of the value will simply be the ERROR name.



Objective Systems, Inc.

102 Pickering Way, Suite #506
Exton, Pennsylvania 19341
http://www.obj-sys.com
Phone: (484) 875-9841
Toll-free: (877) 307-6855 (US only)
Fax: (484) 875-9830
info@obj-sys.com
TOC PREV NEXT INDEX