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

Advanced configuration tutorial



This tutorial explains several way to specify your configuration.

Overview

In this tutorial, we will use two built-in modules:
advancedarchi

Services and types

We will only use only one service provided by the clock module[1]
If you don't understand what is the namespace declaration here, see namespace.
:
      <services>
         <namespace uri="http://dassault-aviation.com/clock">
            <event name="clock">
               <data name="time" type="longDuration" />
            </event>
         </namespace>
      </services>
There is only one type used in this service:
      <types>
         <namespace uri="http://dassault-aviation.com/clock">
            <simpleType name="longDuration" baseType="long" unit="ms" />
            <simpleType name="string" baseType="string" />
         </namespace>
      </types>

Basic configuration

In the basic configuration, we will define two applications:
  • One with the Clock Application
  • One with the userInputs Application
      <applications>
         <application name="clock">
            <deployment>
               <lib url="clock.jar" />
            </deployment>
            <modules>
               <module name="clock"> 
                  <interfaces>
                     <eventSend service="clock" uri="http://dassault-aviation.com/clock"/>
                  </interfaces>             
               </module>
            </modules>
         </application>      
         <application name="userInputs">
            <deployment>
               <lib url="userInputs.jar" />
            </deployment>
            <modules>
               <module name="userInputs"> 
                  <interfaces>
                     <eventReceived service="clock" uri="http://dassault-aviation.com/clock"/>
                  </interfaces>             
               </module>
            </modules>
         </application>       
      </applications>
As you can see here, we have a lot of boilterplate declarations: we declare for each application only one module, even if we use autodescripted modules in each case. We can do better.

Getting rid of the modules declaration

As in each case we only have one module, we can get rid of the modules declaration[2]
See omitting the module declaration for more information
:
      <applications>
         <application name="clock">
            <deployment>
               <lib url="clock.jar" />
            </deployment>
            <module name="clock"> 
               <interfaces>
                  <eventSend service="clock" uri="http://dassault-aviation.com/clock"/>
               </interfaces>             
            </module>
         </application>      
         <application name="userInputs">
            <deployment>
               <lib url="userInputs.jar" />
            </deployment>
            <module name="userInputs"> 
               <interfaces>
                  <eventReceived service="clock" uri="http://dassault-aviation.com/clock"/>
               </interfaces>             
            </module>
         </application>       
      </applications>
However, as we use autodescripted modules, we can do even better and get rid of the module declaration itself, because the associated module is already defined in the each autodescripted module.

Getting rid of the module declaration

As each associated module is already defined in the autodescripted module, we will now get rid of the module declaration itself:
      <applications>
         <application name="clock">
            <deployment>
               <lib url="clock.jar" />
            </deployment>
            <interfaces>
               <eventSend service="clock" uri="http://dassault-aviation.com/clock"/>
            </interfaces>             
         </application>      
         <application name="userInputs">
            <deployment>
               <lib url="userInputs.jar" />
            </deployment>
            <interfaces>
               <eventReceived service="clock" uri="http://dassault-aviation.com/clock"/>
            </interfaces>             
         </application>       
      </applications>

Notes

  1. ^ If you don't understand what is the namespace declaration here, see namespace.
  2. ^ See omitting the module declaration for more information

See also


Categories: tutorials

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