Age | Commit message (Collapse) | Author |
|
If the encoding is empty (i.e. if a top-level type is single-valued
and therefore not encoding), the result should be a single zero
byte.
|
|
It is recommended to use byte_size/1 or tuple_size/1 instead of
size/1.
|
|
|
|
Now that the decoding of all types are generated inline, we can
take out most of the code for decoding lengths.
|
|
|
|
|
|
|
|
We do it in the simplest possible way by converting the bitstring
to a compact bitstring tuple.
The encoding of BIT STRINGs should be cleaned up and optimized.
|
|
Refactor decoding of BIT STRINGs so that the run-time code does
not spend testing conditions that are known already at compile-time
(which wastes time and produces unnecessary Dialyzer warnings).
There are three ways to decode BIT STRINGs:
1) To a list of bit names (and {bit,Position} for unnamed positions)
if the BIT STRING type has any bit names.
2a) To a list of ones and zeros if there are no named bits, and the
compact_bit_string option was NOT given.
2b) To a {Unused,Bin} tuple if there are no named bits compact_bit_string
option WAS given.
Structure the decoding functions in the same way.
|
|
Always pre-encode the values for the enumeration. Clean up the
code and let the per and uper back-ends share the code.
|
|
Also make sure that the error handling is contained within the
asn1rt_nif module and does not leak out to generated code.
|
|
The template modules (asn1rtt_*.erl) are based on the existing
run-time modules, but with some simplifications and improvements,
for example:
The run-time functions for BER encoding took a Constraint argument which
was not used. It has been eliminated, along with the unused StringType
argument for the encode_restricted_string function.
The Range argument for decode_enumerated() has been dropped since it
was not used.
|