aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1rtt_per.erl
AgeCommit message (Collapse)Author
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-23Simplify the functions for decoding lengthsBjörn Gustavsson
Now that the decoding of all types are generated inline, we can take out most of the code for decoding lengths.
2013-01-23per,uper: Optimize decoding of the remaining data typesBjörn Gustavsson
2013-01-23per,uper: Optimize decoding of the remaining string typesBjörn Gustavsson
2013-01-23per,uper: Optimize decoding of the string data typesBjörn Gustavsson
2013-01-22Teach encode functions to accept a bitstring term for a BIT STRINGBjörn Gustavsson
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.
2013-01-22Refactor decoding of BIT STRINGsBjörn Gustavsson
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.
2013-01-22Optimize encoding of ENUMERATED in per and uperBjörn Gustavsson
Always pre-encode the values for the enumeration. Clean up the code and let the per and uper back-ends share the code.
2013-01-22Correct error handling for the NIF functionsBjörn Gustavsson
Also make sure that the error handling is contained within the asn1rt_nif module and does not leak out to generated code.
2013-01-22Add run-time library templates and use themBjörn Gustavsson
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.