Developing ASN.1 Applications is a simple 4-stage process.

Stage 1 - Specification Development

Stage 2 - Syntax Check and Compile

Stage 3 - Writing your Application

Stage 4 - Putting your Application to use

Stage 1:

Specification Development

In the first stage, application designers have to decide on the types of messages that the final application(s) will need to send/exchange. Based on the message requirements, a new ASN.1 specification can be drafted or an existing one can be used.

When drafting new ASN.1 specifications, it is helpful to decide on the encoding rules (e.g., BER, DER, and PER) which will be used in sending messages. Doing so will allow the final application to take full advantage of allowed efficiencies in the various encoding rules (such as ASN.1 subtype constraints leading to smaller encodings when using PER).

Drafters of ASN.1 specifications should also keep possible future requirements in mind (such as message extensibility and a change in the encoding rules used).

Example:

The below abstract syntax is designed to carry simple control and status messages between some electric machinery and a remote operator. The machine has two states: on and off . The operator can give the machine a turn on instruction, a turn off instruction, or a no action instruction.

ASN.1 Specification:

Stage 2:

Syntax Check & Compile

Most ASN.1 specifications are much more complicated than our previous simple example. Such specifications, when being drafted, often contain typographical and other syntax errors which need to be corrected. Finding and correcting such errors in long and complex ASN.1 specification manually can be an arduous task. Quality ASN.1 compilers (such as the ones offered by OSS Nokalva) can pinpoint such errors allowing the application developer to quickly resolve them.

Once such errors are fixed, the ASN.1 specification can be fed again into the ASN.1 compiler to produce data structures and related code for inclusion into the user's application program. The target language in which the data structures and code are produced varies according to the capabilities of the ASN.1 compiler in use. For example, OSS Nokalva offers separate ASN.1 compilers that use C, C++, Java, Pascal, or Cobol as their target language.

Stage 3:

Writing Your Application

In your application code, you can use the data structures produced by the ASN.1 compiler much in the same way as you would use data structures written by you. Additionally, you can use vendor provided runtime library functions (e.g., the OSS-provided ossEncode() and ossDecode() functions) to encode, decode, and perform various other functions on application data. You will find that using such pre-prepared library functions will both cut down on the time needed to develop your application and increase its final reliability and correctness.

Aids such as the OSS ASN.1 Tools allow you to develop ASN.1 applications for a large variety of platforms and embedded systems. So, the possibilities and ease of application development are even further extended.

Stage 4:

Putting Your Application to Use

Once your application is debugged and tested, you can put it into use to send and receive ASN.1 encoded messages. The diagram below illustrates a message exchange between the embedded chip controller and remote computer operator applications mentioned in the example in Stage 1.

For a more detailed example of how the OSS ASN.1 Tools work, see Building an Application .

 

 

.:. Top

 

 

Copyright © 2008 OSS Nokalva, Inc.   All Rights Reserved.

Discussion Lists

Training Courses

Books

FAQs

Tutorial Center

Glossary

Standards

Links