<?xml version="1.0" encoding="UTF-8"?>
<SCL xmlns="http://www.iec.ch/61850/2003/SCL">

  <Header id="" nameStructure="IEDName">
  </Header>
  
  <Communication>
    <SubNetwork name="subnetwork1" type="8-MMS">
      <ConnectedAP iedName="test" apName="accessPoint1">
        <Address>
          <P type="IP">0.0.0.0</P>
          <P type="IP-SUBNET">255.255.255.0</P>
          <P type="IP-GATEWAY">192.168.2.1</P>
          <P type="OSI-AP-Title">1,3,9999,33</P>
          <P type="OSI-AE-Qualifier">33</P>
          <P type="OSI-PSEL">00000001</P>
          <P type="OSI-SSEL">0001</P>
          <P type="OSI-TSEL">0001</P>
          <P type="MMS-Port">102</P>
        </Address>
      </ConnectedAP>
    </SubNetwork>
  </Communication>
  
  <IED name="test">
  
    <Services>
      <DynAssociation />
      <GetDirectory />
      <GetDataObjectDefinition />
      <GetDataSetValue />
      <DataSetDirectory />
      <ReadWrite />
      <GetCBValues />
      <ConfLNs fixPrefix="true" fixLnInst="true" />
    </Services>
    
    <AccessPoint name="accessPoint1">
    
      <Server>
      
        <Authentication />
        
        <LDevice inst="ComplexArray">
        
          <LN0 lnClass="LLN0" lnType="LLN01" inst="">
          	  
            <DOI name="Mod">
              <DAI name="ctlModel">
                <Val>status-only</Val>
              </DAI>
            </DOI>
          </LN0>
          
          <LN lnClass="LPHD" lnType="LPHD1" inst="1" prefix="">
            <DOI name="PhyHealth">
              <DAI name="stVal">
              	<Val>ok</Val>
              </DAI>
            </DOI>
          </LN>
          
          <LN lnClass="GGIO" lnType="GGIO1" inst="1" prefix="">
            <DOI name="Mod">
              <DAI name="stVal">
              	<Val>on</Val>
              </DAI>
              <DAI name="ctlModel">
                <Val>status-only</Val>
              </DAI>
            </DOI>
            <DOI name="Beh">
              <DAI name="stVal">
              	<Val>on</Val>
              </DAI>
            </DOI>
            <DOI name="Health">
              <DAI name="stVal">
              	<Val>ok</Val>
              </DAI>
            </DOI>
            <DOI name="SPCSO1">
              <DAI name="ctlModel">
                <Val>direct-with-normal-security</Val>
              </DAI>
            </DOI>
            <DOI name="SPCSO2">
              <DAI name="ctlModel">
                <Val>direct-with-normal-security</Val>
              </DAI>
            </DOI>
            <DOI name="SPCSO3">
              <DAI name="ctlModel">
                <Val>direct-with-normal-security</Val>
              </DAI>
            </DOI>
            <DOI name="SPCSO4">
              <DAI name="ctlModel">
                <Val>direct-with-normal-security</Val>
              </DAI>
            </DOI>
          </LN>
          
          <LN lnClass="MHAI" lnType="MHAI1" inst="1" prefix=""> 
            <DOI name="HA">
               <DAI name="numHar">
                 <Val>16</Val>
               </DAI>
            </DOI>
          </LN>
          
        </LDevice>
        
      </Server>
      
    </AccessPoint>
    
  </IED>
  
  <DataTypeTemplates>
  
    <LNodeType id="LLN01" lnClass="LLN0">
      <DO name="Mod" type="ENC_1_Mod" />
      <DO name="Beh" type="ENS_1_Beh" />
      <DO name="Health" type="ENS_2_Health" />
      <DO name="NamPlt" type="LPL_1_NamPlt" />
    </LNodeType>
    
    <LNodeType id="LPHD1" lnClass="LPHD">
      <DO name="PhyNam" type="DPL_1_PhyNam" />
      <DO name="PhyHealth" type="ENS_2_Health" />
      <DO name="Proxy" type="SPS_1_Proxy" />
    </LNodeType>
    
    <LNodeType id="GGIO1" lnClass="GGIO">
      <DO name="Mod" type="ENC_1_Mod" />
      <DO name="Beh" type="ENS_1_Beh" />
      <DO name="Health" type="ENS_2_Health" />
      <DO name="NamPlt" type="LPL_2_NamPlt" />
      <DO name="AnIn1" type="MV_1_AnIn1" />
      <DO name="AnIn2" type="MV_1_AnIn1" />
      <DO name="AnIn3" type="MV_1_AnIn1" />
      <DO name="AnIn4" type="MV_1_AnIn1" />
      <DO name="SPCSO1" type="SPC_1_SPCSO1" />
      <DO name="SPCSO2" type="SPC_2" />
      <DO name="SPCSO3" type="SPC_2" />
      <DO name="SPCSO4" type="SPC_2" />
      <DO name="Ind1" type="SPS_1_Proxy" />
      <DO name="Ind2" type="SPS_1_Proxy" />
      <DO name="Ind3" type="SPS_1_Proxy" />
      <DO name="Ind4" type="SPS_1_Proxy" />
    </LNodeType>
    
    <LNodeType id="MHAI1" lnClass="MHAI">
      <DO name="HA" type="HWYE_1_HA" />
    </LNodeType>
    
    <DOType id="ENC_1_Mod" cdc="ENC">
      <DA name="stVal" bType="Enum" type="Beh" fc="ST" dchg="true" />
      <DA name="q" bType="Quality" fc="ST" qchg="true" />
      <DA name="t" bType="Timestamp" fc="ST" />
      <DA name="ctlModel" type="CtlModels" bType="Enum" fc="CF" />
    </DOType>
    
    <DOType id="ENS_1_Beh" cdc="ENS">
      <DA name="stVal" bType="Enum" type="Beh" fc="ST" dchg="true" />
      <DA name="q" bType="Quality" fc="ST" qchg="true" />
      <DA name="t" bType="Timestamp" fc="ST" />
    </DOType>
    
    <DOType id="ENS_2_Health" cdc="ENS">
      <DA name="stVal" bType="Enum" type="HealthKind" fc="ST" dchg="true" />
      <DA name="q" bType="Quality" fc="ST" qchg="true" />
      <DA name="t" bType="Timestamp" fc="ST" />
    </DOType>
    
    <DOType id="HWYE_1_HA" cdc="HWYE">
    	<SDO name="phsAHar" type="CMV_1_phsAHar" count="16" />
    	<DA name="numHar" bType="INT16U" fc="CF" dchg="true" />
    	<DA name="numCyc" bType="INT16U" fc="CF" dchg="true" />
    	<DA name="evalTm" bType="INT16U" fc="CF" dchg="true" />
    	<DA name="frequency" bType="FLOAT32" fc="CF" dchg="true" />
    </DOType>

    <DOType id="CMV_1_phsAHar" cdc="CMV">
    	<DA name="cVal" bType="Struct" type="Vector" fc="MX" dchg="true" dupd="true" />
        <DA name="q" bType="Quality" fc="MX" qchg="true" />
        <DA name="t" bType="Timestamp" fc="MX" />
    </DOType>
    
    <DOType id="LPL_1_NamPlt" cdc="LPL">
      <DA name="vendor" bType="VisString255" fc="DC" />
      <DA name="swRev" bType="VisString255" fc="DC" />
      <DA name="d" bType="VisString255" fc="DC" />
      <DA name="configRev" bType="VisString255" fc="DC" />
      <DA name="ldNs" bType="VisString255" fc="EX" />
    </DOType>
    
    <DOType id="LPL_2_NamPlt" cdc="LPL">
      <DA name="vendor" bType="VisString255" fc="DC" />
      <DA name="swRev" bType="VisString255" fc="DC" />
      <DA name="d" bType="VisString255" fc="DC" />
      <DA name="dU" fc="DC" bType="Unicode255"/>
    </DOType>
    
    <DOType id="DPL_1_PhyNam" cdc="DPL">
      <DA name="vendor" bType="VisString255" fc="DC" />
    </DOType>
    
    <DOType id="SPS_1_Proxy" cdc="SPS">
      <DA name="stVal" bType="BOOLEAN" fc="ST" dchg="true" />
      <DA name="q" bType="Quality" fc="ST" qchg="true" />
      <DA name="t" bType="Timestamp" fc="ST" />
    </DOType>

    <DOType id="MV_1_AnIn1" cdc="MV">
      <DA name="mag" type="AnalogueValue_1" bType="Struct" fc="MX" dchg="true" />
      <DA name="q" bType="Quality" fc="MX" qchg="true" />
      <DA name="t" bType="Timestamp" fc="MX" />
    </DOType>
    
    <DOType id="SPC_1_SPCSO1" cdc="SPC">
      <DA name="origin" fc="ST" type="Originator_1" bType="Struct" />
      <DA name="ctlNum" fc="ST" bType="INT8U" />
      <DA name="stVal" bType="BOOLEAN" fc="ST" dchg="true" />
      <DA name="q" bType="Quality" fc="ST" qchg="true" />
      <DA name="t" bType="Timestamp" fc="ST" />
      <DA name="ctlModel" type="CtlModels" bType="Enum" fc="CF" />
      <DA name="Oper" type="SPCOperate_1" bType="Struct" fc="CO" />
    </DOType>

    <DOType id="SPC_2" cdc="SPC">
      <DA name="stVal" bType="BOOLEAN" fc="ST" dchg="true" />
      <DA name="q" bType="Quality" fc="ST" qchg="true" />
      <DA name="Oper" type="SPCOperate_1" bType="Struct" fc="CO" />
      <DA name="ctlModel" type="CtlModels" bType="Enum" fc="CF" />
      <DA name="t" bType="Timestamp" fc="ST" />
    </DOType>
    
    <DAType id="Vector">
      <BDA name="mag" bType="Struct" type="AnalogueValue_1" />
      <BDA name="ang" bType="Struct" type="AnalogueValue_1" />
    </DAType>
    
    <DAType id="AnalogueValue_1">
      <BDA name="f" bType="FLOAT32" />
    </DAType>
    
    <DAType id="Originator_1">
      <BDA name="orCat" type="OrCat" bType="Enum" />
      <BDA name="orIdent" bType="Octet64" />
    </DAType>
    
    <DAType id="SPCOperate_1">
      <BDA name="ctlVal" bType="BOOLEAN" />
      <BDA name="origin" type="Originator_1" bType="Struct" />
      <BDA name="ctlNum" bType="INT8U" />
      <BDA name="T" bType="Timestamp" />
      <BDA name="Test" bType="BOOLEAN" />
      <BDA name="Check" bType="Check" />
    </DAType>
    
    <EnumType id="Beh">
      <EnumVal ord="1">on</EnumVal>
      <EnumVal ord="2">blocked</EnumVal>
      <EnumVal ord="3">test</EnumVal>
      <EnumVal ord="4">test/blocked</EnumVal>
      <EnumVal ord="5">off</EnumVal>
    </EnumType>
    
    <EnumType id="HealthKind">
	  <EnumVal ord="1">ok</EnumVal>
	  <EnumVal ord="2">warning</EnumVal>
	  <EnumVal ord="3">alarm</EnumVal>
    </EnumType>
    
    <EnumType id="CtlModels">
      <EnumVal ord="0">status-only</EnumVal>
      <EnumVal ord="1">direct-with-normal-security</EnumVal>
      <EnumVal ord="2">sbo-with-normal-security</EnumVal>
      <EnumVal ord="3">direct-with-enhanced-security</EnumVal>
      <EnumVal ord="4">sbo-with-enhanced-security</EnumVal>
    </EnumType>

    <EnumType id="OrCat">
      <EnumVal ord="0">not-supported</EnumVal>
      <EnumVal ord="1">bay-control</EnumVal>
      <EnumVal ord="2">station-control</EnumVal>
      <EnumVal ord="3">remote-control</EnumVal>
      <EnumVal ord="4">automatic-bay</EnumVal>
      <EnumVal ord="5">automatic-station</EnumVal>
      <EnumVal ord="6">automatic-remote</EnumVal>
      <EnumVal ord="7">maintenance</EnumVal>
      <EnumVal ord="8">process</EnumVal>
    </EnumType>

  </DataTypeTemplates>
  
</SCL>
