<extends name="<service to extend name>" />
under the service declaration. After this declaration you can declare any number of new datas you want (or none at all).<publish name="2DPosition" > <data name="latitude" type="float" /> <data name="longitude" type="float" /> </publish> <publish name="3DPosition" > <extends name="2DPosition" /> <data name="altitude" type="float" /> </publish>Note that you don't need to declare the service which is extended before the service which extend it in the services configuration. For example, this declaration is valid:
<publish name="3DPosition" > <extends name="2DPosition" /> <data name="altitude" type="float" /> </publish> <publish name="2DPosition" > <data name="latitude" type="float" /> <data name="longitude" type="float" /> </publish>
<publish name="position" > <data name="latitude" type="float" /> <data name="longitude" type="float" /> </publish> <publish name="position2" > <extends name="position" /> </publish>Here the definition is equivalent to:
<publish name="2DPosition" > <data name="latitude" type="float" /> <data name="longitude" type="float" /> </publish> <publish name="3DPosition" > <data name="latitude" type="float" /> <data name="longitude" type="float" /> <data name="altitude" type="float" /> </publish>
<services> <requestResponse name="computeFlightPlan" > <request> <data name="waypointList" type="arrayOfInt" /> </request> <response> <data name="flightPlan" type="arrayOfPosition" /> </response> </requestResponse> </services> <services> <requestResponse name="computeAndValidateFlightPlan" > <extends name="computeFlightPlan" /> <response> <data name="valid" type="boolean" /> </response> </requestResponse> </services>Here the definition is equivalent to:
<services> <requestResponse name="computeFlightPlan" > <request> <data name="waypointList" type="arrayOfInt" /> </request> <response> <data name="flightPlan" type="arrayOfPosition" /> </response> </requestResponse> </services> <services> <requestResponse name="computeAndValidateFlightPlan" > <request> <data name="waypointList" type="arrayOfInt" /> </request> <response> <data name="flightPlan" type="arrayOfPosition" /> <data name="valid" type="boolean" /> </response> </requestResponse> </services>
3DPosition
service extends the 2DPosition
service to publish a 3D positionpositionAndTime
service extends the 3DPosition
service to add a time to the 3D position<publish name="2DPosition" > <data name="latitude" type="float" /> <data name="longitude" type="float" /> </publish> <publish name="3DPosition" > <extends name="2DPosition" /> <data name="altitude" type="float" /> </publish> <publish name="positionAndTime" > <extends name="3DPosition" /> <data name="time" type="long" /> </publish>Here the definition is equivalent to:
<publish name="2DPosition" > <data name="latitude" type="float" /> <data name="longitude" type="float" /> </publish> <publish name="3DPosition" > <data name="latitude" type="float" /> <data name="longitude" type="float" /> <data name="altitude" type="float" /> </publish> <publish name="positionAndTime" > <data name="latitude" type="float" /> <data name="longitude" type="float" /> <data name="altitude" type="float" /> <data name="time" type="long" /> </publish>
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence