# Apron Services XML Properties {{< callout context="caution" title="IMPORTANT!" icon="outline/alert-triangle" >}} This article is a **stub** that has been created in preparation for future updates and as such contains no meaningful information on this subject. {{< /callout >}} The `.xml` file is used to define a single service that will be available to the **ApronControl** at an airport. This file defines the behaviours for the service based on a simple **state machine** concept. Note that this file combines the elements shown here with elements that come from [Navigation Services](../../../navigation-services/navigation-services/) and [Flights And Missions](../../../mission-xml-files/flights-and-missions/) as well.   When using full apron services for a facility, this file is only used to control the way the service is spawned and a few other important parts of controlling the flow of services in and around a context request, but it *does not control the service itself*. Each service spawned should have it's own [Navigation Services XML Properties](../../../navigation-services/navigation-services-xml-properties/) that control the flow of actions of the service, and that send a "finished" event to the Apron Service context controller so that it can either tell the Apron Control Unit that the service is finished, or move on to the next part of the service context request. However, the exception to this is when the file being written is a **fallback** file, in which case *all* flow logic for the service should go here, including that which would normally be a unique navigation service. For more information, please see here: - [Fallback Services](../apron-services/#Fallback)   The file for each apron service is written using [XML,](../../../../devmode/editors/project-editor/file-formats/xml-files/) and it can easily be created and edited using any text editor. The general format for the file is shown in the schema template below: ``` xml Apron Controler - Template Service Launch initial state True True True 0.000 0.000 StateAction:TemplateInit TemplateInit StateAction:FINISH FINISH Stop mission finished event trigger False On mission finish True True Assign navigation graphs Gate GateToAircraftStand CABIN_SERVICE_NAME LINK_TAG Tell the mission context that the flow is finished ```     ### <ApronControl.ApronContextReference /> This self-closing element permits you to get a reference to a SimObject from the current Apron Control request context, such as a that of a vehicle or the aircraft that requested the context. For example: ``` xml ``` The element may also be used to get a reference to the context *itself* for use by a tag in its code, or by a service.   This sub-element has the following parameters:  
AttributeDescriptionTypeRequired
idThe unique identifier of the object element/apron control reference. This may be arbitray for some context types, or it may have to be a specific string. Please see the ApronReferenceType attribute, explained below.StringNo
InstanceIdThe unique ID for apron context reference, as a GUID enclosed in {}, to be used elsewhere. You can find more information on GUID's here: GUIDsStringYes
ApronReferenceType

This is where you select the reference type, which can be any of the following:

  1. ApronControl: The apron control unit that spawned the context.
  2. Aircraft: The aircraft that requested the context. If you use this, then the id attribute should be "Aircraft"
  3. Context: The context itself.
  4. Jetway: This is only used if the current parking has a Jetway. If you use this, then the id attribute should be "Jetway"
  5. Mission: This will look into the mission context for items added with the <SimMission.ApronControlRegisterToContextAction> element.
  6. Vehicle: This is used for Apron Control vehicles (buses, ramps, etc…). With this type, the precise type of vehicle is indicated by the id field, and must match the Name defined in the ApronControlServices.xml.
StringYes
    ### <ApronControl.ApronControlAssignServiceAction> This element is used to assign a vehicle from the Apron Control reserve to the current context, which is provided through the use of an "`ApronContextReference:Context`" object reference, for example: ``` xml Assign a bus to the mission context BUS ``` This element requires the following sub-elements: 1. `` 2. ``   The element also has the following attribute: {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The unique ID for reference to the element, as a [GUID](../../../mission-xml-files/mission-xml-properties/#) enclosed in {}, to be used elsewhere. You can find more information on GUID's here: [GUIDs](../../../../introduction/using-the-sdk/#GUIDs) | String | Yes | {{< /table-wrapper >}}     ### <ApronControl.ApronControlFreeServiceAction> This element is used to revert the call to a vehicle and remove it from the given context (use "`ApronContextReference:Context`" for the object ID), returning it to the Apron Control reserve, so the vehicle can be assigned to another service again. For example: ``` xml Free the bus so it can go on another mission RAMP ``` Note that you should ensure that the vehicle is returning to its sleep position before freeing it.   This element requires the following sub-elements: 1. `` 2. ``   The element also has the following attribute: {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The unique ID for reference to the element, as a [GUID](../../../mission-xml-files/mission-xml-properties/#) enclosed in {}, to be used elsewhere. You can find more information on GUID's here: [GUIDs](../../../../introduction/using-the-sdk/#GUIDs) | String | Yes | {{< /table-wrapper >}}     ### <ApronControl.ApronControlAssignNavigationGraphAction> This element is used to add navigation graphs to the given Apron Control context and the aircraft associated with the context. You may supply the name of one or more [navigation graph files](../../../cfg-files/navigation_graph.cfg/) for use, as long as they have been added to the `navigation_graph` folder of the airport being worked on. The path would be something like: \[Airport Project\]\(PackageSources\)data\(navigation_graph\)   When this action element is called, it first finds a [Navigation Service](../../../navigation-services/navigation-services/) with the given `` by looking into all the services associated with the aircraft being referenced in the `` (the `id` attribute should be "`ApronContextReference:Aircraft`"), and it also retrieves the **navigation graph** associated with this navigation service. The next thing that happens is that the action retrieves the navigation graphs defined using the `` element and links them with the aircraft navigation service and the given ``.   For example: ``` xml Assign payload graphs of the gate and the one from gate to parking to the passenger cabin service Gate GateToAircraftStand PassengerBoardingService GATE_TO_STAND ```   This element requires the following sub-elements: 1. `` 2. `` 3. `` 4. `` 5. ``   The element also has the following attribute: {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The unique ID for reference to the element, as a [GUID](../../../mission-xml-files/mission-xml-properties/#) enclosed in {}, to be used elsewhere. You can find more information on GUID's here: [GUIDs](../../../../introduction/using-the-sdk/#GUIDs) | String | Yes | {{< /table-wrapper >}}     #### <NavigationGraph> This sub-element of `` is a container element for `` and has no attributes.     ##### <NavigationGraphName> This sub-element of `` has no attributes and is used to define the part of the name to check for to find the appropriate navigation graph file to be used by the action. This element can only have the following strings: - **GateToAircraftStand**: the navigation graph file *must* contain the sub-string "`_gateToStand_`" and link a departure gate with a taxiway parking stand. Note that the file name must follow the format given below so that the context can find it: navigation\_graph\_\[ICAO\]\_gateToStand\_\[ParkingName\]\_\[ParkingNumber\]\_\[ParkingSuffix\] - **Gate**: the navigation graph file *must* contain the sub-string "`_gate_`" and link a departure gate to a jetway or a passenger ramp at a taxiway parking stand. Note that the file name must follow the format given below so that the context can find it: navigation\_graph\_\[ICAO\]\_gate\_\[ParkingName\]     #### <CabinName> This sub-element of `` has no attributes and is used to define the name of the [Navigation Service](../../../navigation-services/navigation-services/) to check the aircraft for.     #### <Context> This sub-element of `` has no attributes and is used to specify the apron control context that the action is to be performed on. It requires the following sub-element to be used to give the context (the `id` attribute should be "`ApronContextReference:Context`"): 1. ``     #### <Path> This sub-element of `` has no attributes and is a container element for one or more `` elements.     ##### <TagToLink> This sub-element of `` is used to define the [tag](../../../cfg-files/navigation_graph.cfg/#tag) of the nodes in the apron service navigation graphs to connect with an edge. The tag name can be a general value, as the simulation will generate a complete and unique tag name from the rest of the data derived from the position of the parking space. The final computed tag will be: \[Tag Name\]\_\[ParkingName\]\_\[ParkingNumber\]\_\[ParkingSuffix\]     ### <ApronControl.ApronControlAssignDestinationAction> This element is used to give the currently active Navigation Service a destination target which will be used during its next call to ``. The action requires an `` (the `id` attribute should be "`ApronContextReference:Context`"), which is the apron control context that was defined with ``. For example: ``` xml Give the bus taxi ai the destination of the gate parking BUS Gate ```   This element requires the following sub-elements: 1. `` 2. `` 3. ``   The element also has the following attribute: {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The unique ID for reference to the element, as a [GUID](../../../mission-xml-files/mission-xml-properties/#) enclosed in {}, to be used elsewhere. You can find more information on GUID's here: [GUIDs](../../../../introduction/using-the-sdk/#GUIDs) | String | Yes | {{< /table-wrapper >}}     #### <DestinationType> This is a sub-element of `` and it has no attributes. It is used to assign the type of destination for a navigation service that has been called as part of an apron control service. The possible destinations are as follows: - **Gate**: The destination is a gate where passengers can be picked up. Used by *bus* services only. - **Aircraft**: The destination is next to the aircraft parking spot. - **Parking**: The destination is the taxiway services stand (where vehicles spawn, or remain when at rest with no current task).       ### <ApronControl.ApronControlFinishedAction> This element is used to tell the Apron Control unit that the given context flow has finished and that the context can be destroyed. For example: ``` xml Tell the mission context that the flow is finished ```   This element requires the following sub-elements: 1. ``   The element also has the following attribute: {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The unique ID for reference to the element, as a [GUID](../../../mission-xml-files/mission-xml-properties/#) enclosed in {}, to be used elsewhere. You can find more information on GUID's here: [GUIDs](../../../../introduction/using-the-sdk/#GUIDs) | String | Yes | {{< /table-wrapper >}}     ### <ApronControlServiceType> This element has no attributes and is used by the following parent elements: 1. `` 2. `` 3. ``   The contents of this element are used to define a specific *type* of service that is being targeted by the apron service context. It can be any of the following: - **None** - **ApronControl** - **Vehicle** - **Aircraft** - **Jetway** - **Context** - **Mission**