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

Service alias



A Service alias is an alias name for another Service. Use cases for aliases are cases where a module provides or subscribes to a specified service, but another module subscribes or provides a service with the same content but another name.
  • Modules which provide to the alias will in fact provide to the aliased Service
  • Modules which susbcribe to the alias will in fact susbcribe to the aliased Service

Declaration

The Service alias declaration only defines the alias name and optional id (as for any service), but also the name of the service for which it is an alias.

For example:
      <services>
         <publish name="position" >
      ...
         </publish>
         <alias name="myAlias" service="position" />
      </services>

Usage of namespaces

As for any service, it is possible to specify a namespace for both the alias, but also for the service it refers to.

In the following example, the alias and the service are in the same namespace:
      <services>
         <publish name="position" uri="http://mynamespace.com" >
      ...
         </publish>
         <alias name="myAlias" uri="http://mynamespace.com"
      service="position" serviceURI="http://mynamespace.com" />
      </services>
In this other example, the alias is in the http://aliasnamespace.com namespace and the service is in the http://refnamespace.com namespace:
      <services>
         <publish name="position" uri="http://mynamespace.com" >
      ...
         </publish>
         <alias name="myAlias" uri="http://aliasnamespace.com"
      service="position" serviceURI="http://refnamespace.com" />
      </services>

Example


In the following example, the acPosition service is an alias of the position service.
      <services>
         <publish name="position" >
            <data name="latitude" type="float" />
            <data name="longitude" type="float" />
            <data name="altitude" type="float" />
         </publish>
         <alias name="acPosition" service="position" />
      </services>
Suppose that we have the following applications configuration:
      <application name="Aircraft" id="1">
         <modules>
            <module name="FlightManagementSystem" id="1" >
               <interfaces>
                  <subscribe service="acPosition" />
               </interfaces>
            </module>
            <module name="InertialNavSystem" id="2" >
               <interfaces>
                  <push service="position" />
               </interfaces>
            </module>
         </modules>
      </application>
The InertialNavSystem module provides the position service, and the FlightManagementSystem module subscribes to this service, because the acPosition service is an alias to the position service.
servicealias

See also


Categories: concepts

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