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

Identification



Several elements specified in the framework must have an identification: All these elements must have the following identifiers both must be unique for all the configuration:
  • Their name (mandatory): must have the following pattern: [A-Za-z_][A-Za-z_0-9]*
  • Their long ID (optional): can be declared in base 10 or in hexadecimal[1]
    For example 2039583 and 0x1F1F1F are both valid and equivalent
    . The numeric ID will be used in the runtime communication


Note that:
  • Modules must be unique in their application. Two modules can have the same name or ID, if they are hosted in two different applications
  • The identification can be omitted[2]
    If the identification is not specified, the framework will create one by default based on the Application, Module, or Service name
    . For example, the following definition is valid:<application name="Aircraft" >

Default identification

Main Article: Generating a long ID

The framework will always create a long ID for every applications, modules, or services. However in some cases it is useful to know the long ID of a service.

Example

Suppose the following architecture, used for the first tutorial:
tuto1archi
Both these applications configuration are valid:

With application and module IDs:
      <applications>
         <application name="eventAppli" id="1" >
            <deployment>
               <lib url="samplesEvent.jar" />
            </deployment>
            <modules>
               <module name="EventModule" id="1" >
                  <implementation path="org.da.samples.protoframework.event.EventModule" >
                     ...
                  </implementation>
                  <interfaces>
                     <eventSend service="event" attach="attach"/>
                     <subscribe service="published" />
                  </interfaces>
               </module>
            </modules>
         </application>
         <application name="publishAppli" id="2" >
            <deployment>
               <lib url="samplesPublish.jar" />
            </deployment>
            <modules>
               <module name="PublishModule" id="1" >
                  <implementation path="org.da.samples.protoframework.publish.PublishModule" >
                     ...
                  </implementation>
                  <interfaces>
                     <eventReceived service="event"/>
                     <cyclic service="published" frequency="200ms" attach="attach"/>
                  </interfaces>
               </module>
            </modules>
         </application>
      </applications>
Without application and module IDs:
      <applications>
         <application name="eventAppli" >
            <deployment>
               <lib url="samplesEvent.jar" />
            </deployment>
            <modules>
               <module name="EventModule" >
                  <implementation path="org.da.samples.protoframework.event.EventModule" >
                     ...
                  </implementation>
                  <interfaces>
                     <eventSend service="event" attach="attach"/>
                     <subscribe service="published" />
                  </interfaces>
               </module>
            </modules>
         </application>
         <application name="publishAppli" >
            <deployment>
               <lib url="samplesPublish.jar" />
            </deployment>
            <modules>
               <module name="PublishModule" >
                  <implementation path="org.da.samples.protoframework.publish.PublishModule" >
                     ...
                  </implementation>
                  <interfaces>
                     <eventReceived service="event"/>
                     <cyclic service="published" frequency="200ms" attach="attach"/>
                  </interfaces>
               </module>
            </modules>
         </application>
      </applications>

In the second case, the framework will automatically assign IDs to the applications and modules.

Notes

  1. ^ For example 2039583 and 0x1F1F1F are both valid and equivalent
  2. ^ If the identification is not specified, the framework will create one by default based on the Application, Module, or Service name

See also


Categories: concepts

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