Creating AADL data definitions

The first step in including an ASN.1 data model in a system level description is the creation of the AADL package that defines the data types. asn2aadlPlus is the part of the Data Modeling Toolchain responsible for this. It employs a simple command line interface - it reads an ASN.1 file as input, and generates an AADL file as output:
AVALON:~/ASSERT$ asn2aadlPlus
Usage: asn2aadlPlus input.asn [input2.asn] [...] outputDataSpec.aadl
A sample usage scenario is depicted below:
AVALON:~/ASSERT$ ls -l
total 16
-rw-r--r-- 1 root root 14273 2007-02-28 10:10 messages.asn1
AVALON:~/ASSERT$ asn2aadlPlus messages.asn1 Data.aadl
AVALON:~/ASSERT$ ls -l
total 36
-rw-r--r-- 1 root root 14273 2007-02-28 10:10 messages.asn1
-rw-r--r-- 1 root root 19245 2007-02-28 10:11 Data.aadl
AVALON:~/ASSERT$ 
AVALON:~/ASSERT$ head -18 Data.aadl
package messages

public

DATA T_CONTROLLER_FILTER_STATE
PROPERTIES
    -- name of the ASN.1 source file:
    Source_Text => ("messages.asn1");
    -- Size of a buffer to cover ASN.1 representation:
    -- Real message size is 286; suggested aligned message buffer is...
    Source_Data_Size => 288 B;
    -- name of the corresponding data type in the source file:
    Type_Source_Name => "T-CONTROLLER-FILTER-STATE";
END T_CONTROLLER_FILTER_STATE;
As can be seen above, the utility will create an AADL package that contains data definitions for all ASN.1 types. It will also automatically translate ASN.1 type names to valid AADL identifiers (in the example above, dash (-) is not an allowed part of an identifier, so type T-CONTROLLER-FILTER-STATE has been translated as T_CONTROLLER_FILTER_STATE in its AADL definition). Finally, it will create the largest possible versions of the ASN.1 messages (using the largest posible values for primitive types and extending SEQUENCE OFs as much as possible) and encode/decode them, to figure out the message sizes and the memory requirements for using them. For this step to work, a valid gcc installation must exist, and gcc must be accesible from one of the destination directories in the PATH environment variable.

If your installation environment lacks gcc, you can use an online version of the tool, from: http://www.semantix.gr/assert