compilationasn.1

what does it mean "compile asn.1"?


I have heard many times "after compilation of an asn.1 there were many errors" or something like this. But what does it mean "compile asn.1" at all? As I know asn.1 is a notation to describe data structures, how it should be compiled (translation from asn.1 to what language?) and what do I do with that compiled stuff?

Update:

is it just a generation of a structure encoder/decoder in a certain programming language? after that one can use encoder and decoder integrate these to an information system for exchange of information?


Solution

  • An ASN.1 specification describes messages that you would like to exchange with other machines. It does this in a manner that is independent of programming language or computer architecture. This means that to use the ASN.1 specification, a tool is needed to "compile" that ASN.1 specification, checking for syntax errors and some kinds of semantic errors before generating code for your target machine architecture in your target programming language to encode and decode the messages from the ASN.1 specification. Note that ASN.1 compilers generate C stuctures, Java classes, or C++ classes in addition to generating code for encoding and decoding messages based on the generated structures.

    There is an excellent place to see an play with this process without dealing with actual generated code. There is an online ASN.1 compiler and runtime engine at http://asn1-playground.oss.com where you can compile ASN.1 specifications and encode/decode messages without writing any code in a target programming language.