ASN1C 7.6 has some new features related to selectively decoding parts of a PER message. These new features are only supported for C and C++. The first feature is called PER partial decoding. This feature allows you to decode the value of an ASN.1 type and obtain only a part of the value back from the decode function. This feature is meant to provide the following benefits:
- direct access to the returned values (you don’t need to navigate through the normal data structures)
- less memory used by the data returned from the decode function, since only a part of the decoded type is returned.
The second feature is referred to as raw event parsing. Using this feature, generated parse functions invoke user-defined event handlers. The events fire (i.e. the handler is invoked) when key message-processing events occur as the ASN.1 message is parsed. The raw event handler interface is different from the normal event handler interface in two ways. First, it identifies the component, for which an event has fired, using an integer identifier; this avoids the need for string comparisons. Second, the raw event handlers do not receive pre-decoded values. The parser only decodes what it must decode in order to operate; everything else is optionally decoded by the user's event handler.
Read more about these features in the ASN1C Compiler User's Guide for C/C++. Partial decoding is covered in a section titled, "Generated C/C++ Files and Partial Decoding". As noted there, the SDK includes two C and C++ samples that use this feature: sample_per/employee_partialdec and sample_per/employee_partialdec_grp. Raw event parsing is covered in a chapter titled, "Raw Event Handler Interface". As noted there, C and C++ sample programs may be found in sample_uper/rawEvent.