<?xml version="1.0" encoding="UTF-8"?>
<sml:AggregateProcess gml:id="scaleAndClip06"
    xmlns:sml="http://www.opengis.net/sensorml/2.0"
    xmlns:swe="http://www.opengis.net/swe/2.0"
    xmlns:gml="http://www.opengis.net/gml/3.2"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    xsi:schemaLocation="http://www.opengis.net/sensorml/2.0 http://schemas.opengis.net/sensorml/2.0/sensorML.xsd"
    definition="http://sensors.ws/process/linearInterpolator">
    <!-- ============================= -->
    <!--       Descriptions            -->
    <!-- ============================= -->
    <gml:description>
    A simple aggregate process that scales according to linear equation y = 2.3x + 1.76 and then clips if below 15.0
    In this example all processes are defined externally and configured.
    </gml:description>
    <gml:identifier codeSpace="uid">urn:myCompany:swe:process:scaleAndClip02</gml:identifier>
    <gml:name>Scale and Clip Aggregate Process 06</gml:name>
    <!-- ============================= -->
    <!--            Aggregate Process Inputs            -->
    <!-- ============================= -->
    <sml:inputs>
        <sml:InputList>
            <sml:input name="valueIn">
                <swe:Quantity definition="http://sensorml.com/ont/swe/property/SimpleDN">
                    <swe:uom code="any"/>
                </swe:Quantity>
            </sml:input>
        </sml:InputList>    
    </sml:inputs>
    <!-- ============================= -->
    <!--            Aggregate Process Outputs            -->
    <!-- ============================= -->
    <sml:outputs>
        <sml:OutputList>
            <sml:output name="valueOut">
                <swe:Quantity definition="http://sensorml.com/ont/swe/property/SimpleDN">
                    <swe:uom code="any"/>
                </swe:Quantity>                
            </sml:output>
         </sml:OutputList>     
     </sml:outputs>
  
     <!-- ======================================= -->
    <!--         Aggregate process components declared             -->
    <!-- ======================================== -->
    <sml:components>
        <sml:ComponentList >
         
            <!-- Component 1 - Linear Interpolator -->
            <sml:component name="scale">    
                <sml:SimpleProcess gml:id="linearInterpolatorConfigured"
                    definition="http://sensorml.com/ont/swe/process/LinearInterpolator">
                    <!-- ============================= -->
                    <!--       Linear Interpolator Descriptions            -->
                    <!-- ============================= -->
                    <gml:description>A linear interpolator with slope of 2.3 and intercept of 1.76</gml:description>
                    <gml:identifier codeSpace="uid">urn:myCompany:swe:process:09h57b21</gml:identifier>
                    <gml:name>Linear Equation 01 Configured</gml:name>
                    <!-- ======================================== -->
                    <!--            Base process referenced and configured            -->
                    <!-- ======================================== -->
                     <sml:typeOf xlink:title="urn:net:swe:process:linearEquation01"
                        xlink:href="http://sensors.ws/processes/LinearInterpolator01"/>
                    <sml:configuration>
                        <sml:Settings>
                            <sml:setValue ref="parameters/slope-intercept/slope">2.3</sml:setValue>
                            <sml:setValue ref="parameters/slope-intercept/intercept">1.76</sml:setValue>
                        </sml:Settings>
                    </sml:configuration>
                </sml:SimpleProcess>        
            </sml:component>
             
 
            <!-- Component 2 - Threshold clipper -->
            <sml:component name="clip"> 
                <sml:SimpleProcess gml:id="thresholdClipperConfigured"
                    definition="http://sensors.ws/process/thresholdClipper">
                    <!-- ============================= -->
                    <!--      Threshold Clipper  Descriptions            -->
                    <!-- ============================= -->
                    <gml:description>
                        A process that passes values of 15.0 and above to the passValue output;
                    </gml:description>
                    <gml:identifier codeSpace="uid">urn:myCompany:swe:process:0678b365a</gml:identifier>
                    <gml:name>Threshold Clipper  01 Configured</gml:name>
                    <!-- ======================================== -->
                    <!--            Base process referenced and configured            -->
                    <!-- ======================================== -->
                    <sml:typeOf xlink:title="urn:net:swe:process:thresholdClip01"
                        xlink:href="http://sensorml.com/ont/swe/processes/ThresholdClipper01"/>
                    <sml:configuration>
                        <sml:Settings>
                            <sml:setValue ref="parameters/threshold">15.0</sml:setValue>
                        </sml:Settings>
                    </sml:configuration>
                </sml:SimpleProcess>        
            </sml:component>
             
        </sml:ComponentList>
    </sml:components>
 
     <!-- ======================================= -->
    <!--         Aggregate process links declared             -->
    <!-- ======================================== -->
    <sml:connections>
        <sml:ConnectionList>
 
            <!-- Connect AggregateProcess input to LinearInterpolator (scale) input -->
            <sml:connection>
                <sml:Link>
                    <sml:source ref="inputs/valueIn"/>
                    <sml:destination ref="components/scale/inputs/x"/>
                </sml:Link>
            </sml:connection>
             
            <!-- Connect LinearInterpolator (scale) output to ThresholdClipper (clip) input -->
            <sml:connection>
                <sml:Link>
                    <sml:source ref="components/scale/outputs/y"/>
                    <sml:destination ref="components/clip/inputs/valueIn"/>
                </sml:Link>
            </sml:connection>
 
            <!-- Connect ThresholdClipper (clip) passValue output to AggregateProcess passValue output -->
            <sml:connection>
                <sml:Link>
                    <sml:source ref="components/clip/outputs/passValue"/>
                    <sml:destination ref="outputs/valueOut"/>
                </sml:Link>
            </sml:connection>
 
            <!-- Note: ThresholdClipper (clip) failValue output is ignored in this example -->
 
        </sml:ConnectionList>
    </sml:connections>
 
</sml:AggregateProcess>