what does it mean “compile asn.1”?

时间秒杀一切 提交于 2019-12-11 11:10:00

问题


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?


回答1:


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.




回答2:


It is a generation of a data structure encoder/decoder in a certain programming language. After that, one can use these encoder/decoder and integrate into an information system for exchange of information.



来源:https://stackoverflow.com/questions/14858838/what-does-it-mean-compile-asn-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!