Quick Start

In this section, we will demonstrate running ACGUI, creating a new ASN.1 schema, and compiling it to C for BER data. The process is similar for other languages.

First, start ACGUI. Once the program is running, we'll create a new project to store all of our settings. To do this, select "Project->New Project..." from the menus.

In the first tab, "Output", under "Application Language Type", select "C". Below that, under "Encoding Rules", select "BER". Finally, choose an output directory for the generated files. Once the settings are correct, click "Save". These settings can be changed at any time by selecting "Project->Project Settings..." from the menus.

Next, we'll create a new schema file for our project. Click the "New" button in the toolbar or select "File->New Schema File" from the menus. A new file, "Untitled" will be added to the project window under "Schema/ASN.1 files" and its contents will be shown in the editor.

Now we need to write our schema between the "DEFINITIONS ::= BEGIN" and "END" statements in the file. Enter something like:

MySequence ::= SEQUENCE {
    ingredient PrintableString,
    count INTEGER,
    units PrintableString
}
  

When you are satisfied with the schema you've created, click the "Validate" button to make sure there are no errors. Since the new schema file hasn't been saved yet, ACGUI will ask if it should be. Save the new file and ACGUI will then validate it. If the schema has errors, the log at the bottom of the window will show them. Otherwise, it is safe to move on.

Since we've already set up our project, we can click the "Compile" button to generate code according to our project settings. If all goes well, the project window will show a list of generated files under "Generated Items" in the section for the selected language. If there were any errors, they will be shown in the log.

At this point, project settings can be changed and schema files can be edited as needed.