
Generated C++ Encode Method Format and Calling Parameters
When C++ code generation is specified, the ASN1C compiler generates an Encode method in the generated control class that wraps the C function call. This method provides a more simplified calling interface because it hides things such as the context structure and the tag type parameters.
len = <object>.Encode ();In this definition, <object> is an instance of the control class (i.e., ASN1C_<prodName>) generated for the given production. The function result variable len returns the length of the data actually encoded or an error status code if encoding fails. Error status codes are negative to tell them apart from length values. Return status values are defined in the asn1type.h include file.
Objective Systems, Inc.55 Dowlin Forge RoadExton, 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 |