
Generated C++ Decode Method Format and Calling Parameters
Generated decode functions are invoked through the class interface by calling the base class `Decode' method. The calling sequence for this method is as follows:
status = <object>.Decode ();In this definition, <object> is an instance of the control class (i.e., ASN1C_<prodName>) generated for the given production.
An ASN1BERDecodeBuffer object reference is a required argument to the <object> constructor. This is where the message start address and length are specified.
The message length argument is used to specify the size of the message, if it is known. In ASN.1 BER or DER encoded messages, the overall length of the message is embedded in the first few bytes of the message, so this variable is not required. It is used as a test mechanism to determine if a corrupt or partial message was received. If the parsed message length is greater than this value, an error is returned. If the value is specified to be zero (the default), then this test is bypassed.
The function result variable status returns the status of the decode operation. The return status will be zero (ASN_OK) if decoding is successful or a negative value if an error occurs. Return status values are defined in Appendix A of the C/C++ Common Functions Reference Manual of this document and online in the "asn1type.h" include file.
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 |