When reading BER and DER encodings, the decoder compares the tags of the data structures (in the current control-table or code-file) with the tags in the input encoding to find a match (this works in most cases). It then sets the passed PDU number variable (if not already set) to reference the matching compiler-generated data structure.
When reading PER and UPER encodings, the decoder looks at the passed PDU number (which must be pre-set) and uses it to match the input encoding with the correct compiler-generated data structure.
In either case, once the correct compiler-generated data structure is found, it is filled with the values in the input encoding.
The samples included with some of the Knowledge Center answers are meant for your general understanding of the OSS products. Different versions of the products might produce slightly different outputs. Consult the products documentation and samples for the most up-to-date products information and code examples.
Test drive the OSS Nokalva ASN.1, LTE, and XML Tools now! Your trial includes complete software, documentation, sample programs, free 24x7 technical support and more.
Our expert personnel can help you learn ASN.1!
We offer 4-day ASN.1 courses at our headquarters or your premises.