Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

Applications configuration



The applications configuration specifies the modules architecture.

An application XML configuration contains for each application:
  • The name and identification[1]
    The ID is optional
    of the application: these two elements must be unique for all applications in the framework
  • The deployment of the application: this declares the Jar files which contain the Java code for the application[2]
    Note that this part can be omitted if the application does not contain any Java modules
  • The declaration of each module contained in the application

Grammar

See the applications and applicationsGeneral grammars for the applications configuration.

Name and identification

The name and identification[1]
The ID is optional
of the application must be unique for all applications in the framework. For example:
      <application name="Aircraft" id="1">
See also the identification article for the constraints on naming and identification. Note that the identification can be omitted. For example, the following definition is valid:
      <application name="Aircraft" >

Deployment

Main Article: Application deployment

The deployment element declares the Jar files which contain the Java code for each application[2]
Note that this part can be omitted if the application does not contain any Java modules
. For example:
      <application name="Aircraft">
        <deployment>
           <lib url="aircraft.jar" />
        </deployment>
      ...
      </application>
Note that the deployment is not necessary if the application do not contain any Java module.

Sharing libraries between applications

Main Article: Sharing libraries

It is completely possible to use the same libraries in several applications, but each application using a different ClassLoader, you will have exceptions if these applications share object types datas.

In that case, if some jar files are common to several applications, a deployment element can be put at the top of the applications elements children. For example:
      <applications>
        <deployment>
           <lib url="commonLibrary.jar" />
        </deployment>      
        <application name="Aircraft">
           <deployment>
              <lib url="aircraft.jar" />
           </deployment>
      ...
        </application>
        <application name="Cockpit">
           <deployment>
              <lib url="cockpit.jar" />
           </deployment>
      ...
        </application>   
      </applications>

Modules declaration

Main Article: Module configuration

The modules element declares the list of modules which are hosted in the application. Each module child element declares one module.

Note that if the application contains only one module, it is possible to omit the modules element and put the unique module directly under the application.

Example

In the following example, the Aircraft application hosts four modules:
  • The InertialNavSystem module computes the current position of the aircraft
  • The FlightManagementSystem module computes the Flight plan and sends the events during the aircraft route on the Flight plan
  • The GuidanceSystem module computes the aircraft trajectory
  • The Cockpit module
      <application name="Aircraft" id="1">
         <deployment>
            <lib url="aircraft.jar" />
         </deployment>
         <modules>
            <module name="InertialNavSystem" id="1" >
      ...
            </module>
            <module name="FlightManagementSystem" id="2" >
      ...
            </module>
            <module name="GuidanceSystem" id="3" >
      ...
            </module>
            <module name="Cockpit" id="4" >
      ...
            </module>
         </modules>
      </application>

Complete example

In the following example, the Aircraft application hosts four modules:
  • The InertialNavSystem module computes the current position of the aircraft
  • The FlightManagementSystem module computes the Flight plan and sends the events during the aircraft route on the Flight plan
  • The GuidanceSystem module computes the aircraft trajectory
  • The Cockpit module
      <application name="Aircraft">
         <deployment>
            <lib url="aircraft.jar" />
         </deployment>
         <modules>
            <module name="InertialNavSystem" >
               <implementation path="org.da.aircraft.ins.INS" >
                  <initEntryPoint method="init" />
                  <startEntryPoint method="start" />
                  <defaultReceiveEntryPoint method="receive" />
                  <defaultSendEntryPoint method="send" />
               </implementation>
               <interfaces>
                  <push service="position" />
               </interfaces>
            </module>
            <module name="FlightManagementSystem" >
               <implementation path="org.da.aircraft.fms.FMS" >
                  <initEntryPoint method="init" />
                  <startEntryPoint method="start" />
                  <defaultReceiveEntryPoint method="receive" />
                  <defaultSendEntryPoint method="send" />
               </implementation>
               <interfaces>
                  <subscribe service="position"/>
                  <eventSend service="flightPlanEvents" />
                  <requestReceived service="computeFlightPlan"/>
               </interfaces>
            </module>
            <module name="GuidanceSystem" >
               <implementation path="org.da.aircraft.guidance.Guidance" >
                  <initEntryPoint method="init" />
                  <startEntryPoint method="start" />
                  <defaultReceiveEntryPoint method="receive" />
                  <defaultSendEntryPoint method="send" />
               </implementation>
               <interfaces>
                  <eventReceived service="flightPlanEvents" />
                  <subscribe service="position"/>
               </interfaces>
            </module>
            <module name="Cockpit">
               <implementation path="org.da.aircraft.mmi.Cockpit" >
                  <initEntryPoint method="init" />
                  <startEntryPoint method="start" />
                  <defaultReceiveEntryPoint method="receive" />
                  <defaultSendEntryPoint method="send" />
               </implementation>
               <interfaces>
                  <eventReceived service="flightPlanEvents" />
                  <requestSend service="computeFlightPlan"/>
               </interfaces>
            </module>
         </modules>
      </application>

Example with no top-level module element

In the following example, the Cockpit application hosts only one module:
  • The Cockpit module
There are two ways of declaring it:
  • With a top-level modules element with only the Cockpit module under it
  • With the Cockpit module directly under the application element
These two declarations are equivalent:
      <application name="Cockpit">
         <deployment>
            <lib url="cockpit.jar" />
         </deployment>
         <modules>
            <module name="Cockpit" >
      ...
            </module>
         </modules>
      </application>
or:
      <application name="Cockpit">
         <deployment>
            <lib url="cockpit.jar" />
         </deployment>
         <module name="Cockpit" >
      ...
         </module>
      </application>

Notes

  1. ^ [1] [2] The ID is optional
  2. ^ [1] [2] Note that this part can be omitted if the application does not contain any Java modules

See also


Categories: config

Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence