The partial decoding feature allows you to generate one or
more partial decode functions. Each such function decodes values of
a type, T
(say), and returns one or more values of
some type that appears nested within T
.
Generation of partial decode functions is controlled via a
configuration file. Conceptually, you begin with the outermost
ASN.1 type you will be decoding, and then you identify the path through
that type down to the element or group of elements whose values you are
interested in. In this way, you define your partial decode targets.
You may target either an individual element or else a group of elements
defined in the same SEQUENCE
or
SET
. A partial decode target is defined by its
outermost type, the targeted element or group of elements, and the path
from the outermost type down to the targeted element or group of
elements.
A distinct partial decode function will be generated for each
partial decode target. That function will decode the corresponding
outermost type and will return one or more values for the targeted
element or group of elements. When a group of elements is
targeted, the function will return the values using a value of the
enclosing SEQUENCE
or SET
type.
When a SEQUENCE OF
or SET OF
lies between the outermost type and the targeted element (or group of
elements), the partial decode function will return a list (an
OSRTDList
) of values.
Since a given element may be nested within multiple outermost types, or may be nested within a given type under multiple paths, it is possible that you might define more than one partial decode target for a given element. (Remember: in addition to the targeted element, a partial decode target is also defined by the outermost type and the path from the outermost type to the targeted element.) Each partial decode target will have its own partial decode function generated.