
Generated Stream-Oriented C Function Format and Calling Parameters
asn1BSD_[<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.
status = asn1BSD_<name> (ASN1CTXT* pctxt, <name> *pvalue, ASN1TagType tagging, int length);The pctxt argument is used to hold a context pointer to keep track of decode 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. The variable must be initialized using the rtInitContext run-time function before use.
To perform streaming operations, the context pointer pctxt must be also initialized as a stream by using the rtStreamBufInit run-time library function (see the C/C++ Common Run-Time Library Reference Manual for a description of this function).
The pvalue argument is a pointer to a variable of the generated type that will receive the decoded data.
The tagging and length arguments are for internal use when calls to decode functions are nested to accomplish decoding of complex variables. At the top level, these parameters should always be set to the constants ASN1EXPL and zero respectively.
Objective Systems, Inc.102 Pickering Way, Suite #506Exton, 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 |