asn1rt
MODULE
MODULE SUMMARY
DESCRIPTION
This module is the interface module for the ASN.1 runtime support functions. To encode and decode ASN.1 types in runtime the functions in this module should be used.
EXPORTS
decode(Module,Type,Bytes) -> {ok,Value}|{error,Reason}
Types:
Decodes Type from Module from the binary Bytes. Returns {ok,Value} if successful.
encode(Module,Type,Value)-> {ok,Bytes} | {error,Reason}
Types:
Encodes Value of Type defined in the ASN.1 module Module. Returns a possibly nested list of bytes and or binaries if successful. To get as fast execution as possible the encode function only performs rudimentary tests that the input Value is a correct instance of Type. The length of strings is for example not always checked.
Starting in R16, Bytes is always a binary.
info(Module) -> {ok,Info} | {error,Reason}
Types:
info/1 returns the version of the asn1 compiler that was used to compile the module. It also returns the compiler options that was used.
utf8_binary_to_list(UTF8Binary) -> {ok,UnicodeList} | {error,Reason}
Types:
utf8_binary_to_list/1 Transforms a UTF8 encoded binary to a list of integers, where each integer represents one character as its unicode value. The function fails if the binary is not a properly encoded UTF8 string.
utf8_list_to_binary(UnicodeList) -> {ok,UTF8Binary} | {error,Reason}
Types:
utf8_list_to_binary/1 Transforms a list of integers, where each integer represents one character as its unicode value, to a UTF8 encoded binary.