Deployment Anatomy

Deployments

A Deployment Definition is an XML file that describes the Components and connections that make up a Deployment. The Deployment definition is used by the GenerationOne FSDK to generate the necessary code and configuration files for the Deployment.

Show the example Deployment definition
<?xml version="1.0" encoding="UTF-8"?>
<ModelElement xmlns="http://www.brightascension.com/schemas/gen1/model"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Deployment name="test">
  <Description>
    A GenerationOne FSDK Deployment.
  </Description>
  <!-- Component type imports -->
  <Import>
    <!-- The component types used by this deployment -->
    <Use type="Version" />
  </Import>
  <!-- Component deployment -->
  <Deploy>
    <!-- Component Groups -->
    <!-- Component Instances -->
    <Component name="Version" type="Version" />
  </Deploy>
</Deployment>
</ModelElement>

This table provides an overview of the elements that make up a Deployment XML file. The Deployment XML file specifies the Component Types used by the Deployment, the component instances and their connections, and the Tasks associated with each component instance.

Deployment XML Anatomy:

Element

Description

Example

<Import>

Specifies the Component Types used by the Deployment. Each Component Type is listed using a <Use> element with a type attribute indicating the Component Type name.

<Import>
  <Use type="Version" />
  <Use type="storage.Storage" />
  <Use type="ConfigManager" />
</Import>

<Deploy>

Contains the actual Deployment configuration, including component instances and their connections.

<Deploy>
  <!-- Component Groups -->
  <!-- Component Instances -->
</Deploy>

<ComponentGroup>

Groups related component instances together for organizational purposes. component groups can be nested to create a hierarchy.

<ComponentGroup name="cdh">
  <Description>Command and data handling group.</Description>
  <ComponentGroup name="logging">
    <Description>Group containing the logging components.</Description>
  </ComponentGroup>
</ComponentGroup>

<Component>

Defines a specific instance of a Component Type. The name attribute specifies the unique name of the instance, and the type attribute indicates the Component Type being instantiated.

<Component name="Version" type="Version" />

<Connections>

Specifies the connections between component instances. Connections can be made using <Services> `or `<Components> elements.

<Component name="core.OBT" type="subsys.OBT">
  <Connections><Services>
    <Service name="time" component="core.Time" service="time"/>
  </Services></Connections>
</Component>

<Service>

Defines a connection between two Components using a Service interface. The name attribute specifies the Service name, Component indicates the providing Component, and Service specifies the Service type.

<Service name="time" component="core.Time" service="time"/>

<Component>

Defines a connection between two Components directly. The name attribute specifies the connection name, and Component indicates the connected Component.

<Component name="eventHandler" component="comms.pus.PUSEvent"/>

<Tasks>

Specifies the Tasks associated with a component instance. Tasks can be periodic, sporadic, or interrupt-driven.

<Tasks>
  <PeriodicTask name="sample" period="1.0" priority="2"/>
  <PeriodicTask name="store" period="6.0" priority="2"/>
</Tasks>

<PeriodicTask>

Defines a Task that runs at a fixed interval. The name attribute specifies the Task name, period indicates the time between Task executions, and priority sets the Task's execution priority.

<PeriodicTask name="send" period="5.0" priority="2"/>

<SporadicTask>

Defines a Task that runs in response to an event or message. The name attribute specifies the Task name, and priority sets the Task's execution priority.

<SporadicTask name="receive" priority="3"/>

<InterruptTask>

Defines a Task that runs in response to a hardware interrupt. The name attribute specifies the Task name, and priority sets the Task's execution priority.

<InterruptTask name="receive" priority="3"/>