aircraft
module which uses the aircraft acPosition:<module name="Aircraft" > <interfaces> <subscribe service="acPosition" /> </interfaces> </module>We have the following services definition:
<services> <publish name="acPosition"> <data name="latitude" type="float" /> <data name="longitude" type="float" /> <data name="altitude" type="float" /> </publish> </services>And the
SimulationEngine
module which computes the aircraft position:<module name="SimulationEngine" > <interfaces> <push service="position" /> </interfaces> </module>We have the following service definition:
<services> <publish name="position" > <data name="latitude" type="float" /> <data name="longitude" type="float" /> <data name="altitude" type="float" /> </publish> </services>We would like to compute the aircraft data by the
SimulationEngine
module and use them by the aircraft
module but is is not possible because they use different names for the Services services even if in fact they use the same datas. One solution is to define the position
Service to be an alias for the acPosition
Service.
position
Service to be an alias for the acPosition
Service, with the following architecture:<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>
aircraft
module which uses the aircraft attitude and position:<module name="Aircraft" > <interfaces> <subscribe service="attitude" /> <subscribe service="position" /> </interfaces> </module>We have the following services definition:
<services> <publish name="attitude" > <data name="theta" type="float" /> <data name="phi" type="float" /> </publish> <publish name="position"> <data name="latitude" type="float" /> <data name="longitude" type="float" /> <data name="altitude" type="float" /> </publish> </services>And the
SimulationEngine
module which computes the aircraft characteristics:<module name="SimulationEngine" > <interfaces> <push service="aircraftModel" /> </interfaces> </module>We have the following service definition:
<services> <publish name="aircraftModel" > <data name="theta" type="float" /> <data name="phi" type="float" /> <data name="acLatitude" type="float" /> <data name="acLongitude" type="float" /> <data name="acAltitude" type="float" /> </publish> </services>We would like to compute the aircraft data by the
SimulationEngine
module and use them by the aircraft
module but is is not possible because they use different services even if in fact they use the same datas. it is not in this case possible to use a Service alias because just renaming a Service would not work. One solution is to define another module using the Service merger Application.
aircraftModel
Service and the position
and attitude
Services.<mergerConf> <outputService name="attitude" > <inputService name="aircraftModel" /> <data name="theta" fromData="theta" fromService="aircraftModel" /> <data name="phi" fromData="phi" fromService="aircraftModel" /> </outputService> <outputService name="position" > <inputService name="aircraftModel" /> <data name="latitude" fromData="acLatitude" fromService="aircraftModel" /> <data name="longitude" fromData="acLongitude" fromService="aircraftModel" /> <data name="altitude" fromData="acAltitude" fromService="aircraftModel" /> </outputService> </mergerConf>
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence