Next: , Previous: ocarina_sh, Up: Using Ocarina


4.2 AADL Scenario Files

AADL scenario files are a very simple way to configure an AADL application. AADL scenario may consist of more than one AADL file but they all should be located in the same directory. Example:

The following file containing the common part of 2 AADL scenarios:

     
     system RMA
     properties
       Ocarina_Config::AADL_Files => ("rma.aadl");
       --  "rma.aadl" contains common AADL components (processes,
       --  threads, data types)
     
       Ocarina_Config::Needed_Property_Sets => (ARAO, Cheddar_Properties);
       --  The non standard predefined property sets needed by the
       --  application.
     end RMA;
     

The following files contains a system implmentation of the previous one by adding specific parts for an application that will leads to a C code generation:

     
     system implementation RMA.Impl_C
     properties
       Ocarina_Config::AADL_Files +=> ("software_c.aadl");
       --  Note that this is an additive property
       --  association.
     
       Ocarina_Config::Generator => PolyORB_HI_C;
       --  The code generator
     end RMA.Impl_C;

The following files sontains a system implementation of the first one by adding specific parts for an application that will leads to a Ada code generation:

     
     system implementation RMA.Impl_Ada
     properties
       Source_Text +=> ("software_ada.aadl");
       --  Note that this is an additive property
       --  association.
     
       Ocarina_Config::Generator => PolyORB_HI_Ada;
       --  The code generator
     end RMA.Impl_Ada;
     

Node that for the 2 last files, we used the “additive” for of AADL properties to “add” AADL files.

If the user invokes ocarina_sh on both scenario_common.aadl and scenario_ada.aadl, then ocarina will be invoked to generate C code for the PolyORB-HI middleware.

If the user invokes ocarina_sh on both scenario_common.aadl and scenario_ada.aadl, then ocarina will be invoked to generate Ada code for the PolyORB-HI middleware.