Version 4.0 enhancements
This chapter presents the new services and the improvements added to the TCE-Java v3.0 release.
The TCE-Java Compiler and runtime are now compliant with the 2008 release of the ASN.1 standards.
It supports the following new features:
The new types are available with all encoding rules and both technologies, table-driven and code generation. All features can be used with the new types.
- New types: TIME, DATE, DATE-TIME, TIME-OF-DAY, DURATION, OID-IRI and RELATIVE-OID-IRI,
- A predefined module DefinedTimeTypes for time-related types.
Permissive encoding and decoding
Up to the previous release of TCE-Java, ASN.1 encoding and decoding is checked if it is strictly compliant with ASN.1 standards.
However, sometime it is required to skip erroneous values and proceed with encoding or decoding. TCE-JAVA v4.0 introduces therefore a new context flag which allows switching between a strict and permissive encoding/decoding mode:
- The encoded value is checked if it is strictly compliant with ASN.1 standards. This is the default mode. Any error stops the encoding or decoding process.
- Permissive encoding and decoding is enabled. An error handler is called when an error is detected. Processing can then be resumed or stopped. A default implementation is delivered but can be overwritten.
Copy and compare for ASN.1 values
The runtime now provides dedicated deep copy and compare functions for each generated type. ASN.1 values which are created or decoded can easily be copied or compared.
Shortening type names
Some ASN.1 syntaxes have long identifiers for their types. When the ASN.1 Compiler concatenates these identifiers to generate unique identifiers this can lead to undesired long names.
In addition to the already supported formal comment $id to change identifiers names, the ASN.1 Compiler now accepts an additional option trunc in order to reduce the length of these identifiers.