“ compile asn.1”是什么意思? [英] what does it mean "compile asn.1"?

查看:138
本文介绍了“ compile asn.1”是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我听到过很多次 在编译 asn.1 后出现很多错误或类似的内容。但是, compile asn.1 到底是什么意思?据我所知,asn.1是一种描述数据结构的符号,应如何对其进行编译(从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?

更新:

这仅仅是某种编程语言中结构编码器/解码器的一代吗?
之后可以使用编码器和解码器将它们集成到信息系统中以交换信息吗?

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?

推荐答案

一种ASN .1规范描述了您想与其他机器交换的消息。它以与编程语言或计算机体系结构无关的方式执行此操作。这意味着要使用ASN.1规范,需要一种工具来编译该ASN.1规范,在使用目标编程语言为目标机器体系结构生成代码进行编码之前,检查语法错误和某些语义错误。并解码ASN.1规范中的消息。请注意,ASN.1编译器除了根据生成的结构生成用于编码和解码消息的代码外,还生成C结构,Java类或C ++类。

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.

无需处理实际生成的代码即可观看此过程的绝佳场所。在 http://asn1-playground.oss.com 处有一个在线ASN.1编译器和运行时引擎。在这里您可以编译ASN.1规范并编码/解码消息,而无需使用目标编程语言编写任何代码。

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.

这篇关于“ compile asn.1”是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆