5. Scenario files

AADL scenario files are a very simple way to set build options when using Ocarina. AADL scenario may consist of more than one AADL file.

Scenario files rely on the system component category to configure all elements of the system to be processed. The following scenario file illustrates this feature. It extends an existing scenario file (see below) with project-specific configuration data:

package Scenario
  with Ocarina_Config;
  with Ocarina_Library;

  system producer_consumer extends Ocarina_Library::Default_PolyORB_HI_C_Config
    Ocarina_Config::Referencial_Files    =>
    ("pr_a", "pr_a.ref",
    "pr_b", "pr_b.ref");
    Ocarina_Config::AADL_Files           +=>
    ("producer_consumer.aadl", "software.aadl");
    Ocarina_Config::Root_System_Name => "PC_Simple.impl";
  end producer_consumer;

  system implementation producer_consumer.Impl
  end  producer_consumer.Impl;

end scenario;

Scenario files rely on specific properties:

  • property AADL_Files lists all files that are part of the system;
  • property Root_System_Name is the name of the Root System;
  • property Generator is the name of the generator (or back-end) to use


The definition of scenario-specific properties may be found in section Ocarina_Config.

ocarina -x <scenario_file.aadl> will cause the scenario file to be processed. In addition, the flag -b will compile generated source files.

5.1. ocarina_library.aadl

package Ocarina_Library

--  This package provides a default scenario files that can be
--  inherited by others.

  with Ocarina_Config;

  system Default_PolyORB_HI_C_Config
    Ocarina_Config::AADL_Version         => AADLv2;
    --  Default AADL version

    Ocarina_Config::Generator            => PolyORB_HI_C;
    --  Use the PolyORB-HI/C backend

    Ocarina_Config::Needed_Property_Sets =>
    --  Additional property sets

    Ocarina_Config::Timeout_Property     => 4000ms;

    Ocarina_Config::AADL_Files =>

  end Default_PolyORB_HI_C_Config;

end Ocarina_Library;