Ability to support unknown IEs when decoding template sets #380
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduce a "decoding mode" configuration for the collector process, which can take one of 3 values: Strict, LenientKeepUnknown, LenientDropUnknown. When the mode is Strict, unknown IEs are rejected. This is the default mode and matches the behavior prior to this patch. When the mode is LenientKeepUnknown, unknown IEs are accepted and will be preserved in data records. When the mode is LenientDropUnknown, unknown IEs are accepted but will not be included in data records (creating a mismatch between the data record and the template).
When decoding is not strict and the IE is not found in the registry, the name and type of the IE are not known. Name is kept as an empty string. Type is always set to OctetArray. The length is known as it is included in the template record.
This change required adding support for the OctetArray type (fixed-length or variable-length).