TOC PREV NEXT INDEX


Generated Stream-Oriented C Function Format and Calling Parameters



The format of the name of each generated stream-oriented encode function is as follows:

    asn1BSE_[<prefix>]<prodName>
 

where <prodName> is the name of the ASN.1 production for which the function is being generated and <prefix> is an optional prefix that can be set via a configuration file setting. The configuration setting used to set the prefix is the <typePrefix> element. This element specifies a prefix that will be applied to all generated typedef names and function names for the production.

The calling sequence for each encode function is as follows:

    stat = asn1BSE_<name> (OSCTXT*     pctxt, 
 
                           <name>*     pvalue, 
 
                           ASN1TagType tagging);
 

In this definition, <name> denotes the prefixed production name defined above.

The pctxt argument is used to hold a context pointer to keep track of encode parameters. This is a basic "handle" variable that is used to make the function reentrant so it can be used in an asynchronous or threaded application. The user is required to supply a pointer to a variable of this type declared somewhere in his or her program. This variable must be initialized using both the rtInitContext and rtStreamBufInit run-time library functions (see the C/C++ Common Run-Time Library Reference Manual for a description of these functions).

The pvalue argument holds a pointer to the data to be encoded and is of the type generated from the ASN.1 production.

The tagging argument is for internal use when calls to encode functions are nested to accomplish encoding of complex variables. It indicates whether the tag associated with the production should be applied or not (implicit versus explicit tagging). At the top level, the tag should always be applied so this parameter should always be set to the constant ASN1EXPL (for EXPLICIT).

The function result variable stat returns the completion status of the operation. 0 (0) means the success.

Objective Systems, Inc.

55 Dowlin Forge Road
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