<Schema name="FDTEtherCATParameterSchema" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:fdt="x-schema:FDTDataTypesSchema.xml" xmlns:fdtpar="x-schema:DTMParameterSchema.xml">

	<!--Definition of Attributes-->
	<AttributeType name="physics" dt:type="string"/>

  <AttributeType name="configuredStationAddress" dt:type="ui2"/>	
	
	<AttributeType name="deviceName" dt:type="string"/>
	<AttributeType name="deviceType" dt:type="string"/>
	<AttributeType name="vendorID" dt:type="ui4"/>
	<AttributeType name="productCode" dt:type="ui4"/>
	<AttributeType name="revisionNumber" dt:type="ui4"/>
	<AttributeType name="serialNumber" dt:type="ui4"/>
	<AttributeType name="productRevision" dt:type="string"/>  
	
	<AttributeType name="checkVendorId" dt:type="boolean" default="1"/>
	<AttributeType name="checkProductCode" dt:type="boolean" default="1"/>		
	<AttributeType name="checkRevision" dt:type="enumeration" dt:values="NONE EQ EQ_OR_G LW_EQ LW_EQ_HW_EQ_OR_G"/>
	<AttributeType name="checkSerialNumber" dt:type="boolean" default="0"/>	
		
	<AttributeType name="subIndex" dt:type="ui4"/>
	<AttributeType name="dataType" dt:type="string"/>  
	
	
	<AttributeType name="fixed" dt:type="boolean"/>  
	<AttributeType name="mandatory" dt:type="boolean"/>		
	<AttributeType name="sm" dt:type="i4"/>  
	
	<AttributeType name="smType" dt:type="enumeration" dt:values="MBoxOut MBoxIn Outputs Inputs Unknown"/>
		 
	<AttributeType name="channelNo" dt:type="i4"/> 
	<AttributeType name="physicalStartAddress" dt:type="ui4"/>  
	<AttributeType name="controlByte" dt:type="ui1"/>  
	<AttributeType name="watchdogTrigger" dt:type="ui2" default="0"/> 
	

	<AttributeType name="fmmuType" dt:type="enumeration" dt:values="MBoxState Outputs Inputs Unknown"/>
		
	<AttributeType name="logicalAddress" dt:type="ui4"/> 
	<AttributeType name="logicalStartBit" dt:type="ui1"/> 
	<AttributeType name="logicalEndBit" dt:type="ui1"/> 
	
			
	<AttributeType name="downloadPdoAssign" dt:type="boolean" default="0"/>  
  <AttributeType name="downloadPdoConfig" dt:type="boolean" default="0"/>  
  
  <AttributeType name="pdoUpload" dt:type="boolean" default="0"/>    
  <AttributeType name="completeAccess" dt:type="boolean" default="0"/>  
  
			
  <AttributeType name="transitionType" dt:type="enumeration" dt:values="IP PS PI SP SO SI OS OP OI IB BI II PP SS"/>
  <AttributeType name="comment" dt:type="string"/>
  
	<!-- Byte address in the physical address space of a device (bytewise addressing of physical memory) -->
	<AttributeType name="physAddr" dt:type="ui2"/>

	<!-- Bit address in the physical address space of a device (bitwise addressing of physical memory) -->
	<AttributeType name="physBitAddr" dt:type="ui4"/>
	  
  <AttributeType name="byteValue" dt:type="ui1"/>
	<AttributeType name="wordValue" dt:type="ui2"/>
	<AttributeType name="dwordValue" dt:type="ui4"/>
	
	<AttributeType name="enabled" dt:type="boolean"/>
	<AttributeType name="syncUnitCycle" dt:type="ui4"/>	
	
	<ElementType name="Register" content="empty" model="closed">
		<attribute type="physAddr" required="yes"/>
		<attribute type="byteValue" required="no"/>
		<attribute type="wordValue" required="no"/>
		<attribute type="dwordValue" required="no"/>
	</ElementType>	
	
	<!--EtherCATSlaveController-->
	<ElementType name="EtherCATSlaveController" content="eltOnly" model="closed">
		<element type="Register" minOccurs="0" maxOccurs="*"/>
	</ElementType>
		
	<!--Distributed Clock-->
	<ElementType name="DistributedClock" content="eltOnly" model="closed">
		<!-- enabled = "1" if DC is used in the device. enabled = "0" if DC is not used or if device has no DC -->
		<!-- If enabled = "0" no <Register> element is added by Device-DTM -->
		<attribute type="enabled" required="yes"/>

		<!-- Basic value in nanoseconds applied by Comm-DTM and required by Device-DTM to perform calculation of register values. -->
		<!-- If this value is missing, DC must be disabled (enabled = "0") -->
		<attribute type="syncUnitCycle" required="no"/>

		<!-- Register and values (calculated by Device-DTM) that must be applied by Comm-DTM for DC operation of the device -->
		<element type="Register" minOccurs="0" maxOccurs="*"/>
	</ElementType>	
   			
	<ElementType name="ECATInfo" content="empty" model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="configuredStationAddress" required="yes"/>
		<attribute type="physics" required="yes"/> 
	</ElementType>
	 	
	<ElementType name="ECATDeviceIdentity" content="empty" model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="vendorID" required="yes"/> 
		<attribute type="deviceName" required="yes"/>
		<attribute type="deviceType" required="yes"/>
		<attribute type="productCode" required="yes"/>
		<attribute type="revisionNumber" required="yes"/> 
		<attribute type="serialNumber" required="yes"/> 
		<attribute type="productRevision" required="yes"/>	
			
		<attribute type="checkVendorId" required="no"/>		
		<attribute type="checkProductCode" required="no"/>		
		<attribute type="checkRevision" required="no"/>		
		<attribute type="checkSerialNumber" required="no"/>			
	
	</ElementType>
	
	<ElementType name="Sm" content="empty" model="closed">
	  <attribute type="smType" required="yes"/> 
		<attribute type="channelNo" required="yes"/> 
		<attribute type="physicalStartAddress" required="yes"/>
		<attribute type="fdt:byteLength" required="yes"/>
		<attribute type="controlByte" required="yes"/>
		<attribute type="watchdogTrigger" required="no"/> 	
		<attribute type="fdt:nodeId" required="no"/>	
	</ElementType>
	
	<ElementType name="SmList" content="eltOnly" model="closed">
	 <element type="Sm" minOccurs="0" maxOccurs="*"/>
	</ElementType>
	 
	<ElementType name="Fmmu" content="empty" model="closed">
		<attribute type="fmmuType" required="yes"/>  
		<attribute type="channelNo" required="yes"/> 
		<attribute type="logicalAddress" required="yes"/>
		<attribute type="logicalStartBit" required="yes"/>
		<attribute type="logicalEndBit" required="yes"/>
		<attribute type="fdt:bitLength" required="yes"/> 
		<attribute type="fdt:readAccess" required="yes"/>
		<attribute type="fdt:writeAccess" required="yes"/>	
		<attribute type="sm" required="yes"/> 
		<attribute type="fdt:nodeId" required="no"/>
	</ElementType>  
	 
	<ElementType name="FmmuList" content="eltOnly" model="closed">
	 <element type="Fmmu" minOccurs="0" maxOccurs="*"/>
	</ElementType>
	 
   	
	<ElementType name="PdoEntry" content="empty" model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="fdt:index" required="yes"/> 
		<attribute type="subIndex" required="yes"/>
		<attribute type="fdt:bitLength" required="yes"/>
		<attribute type="fdt:name" required="yes"/> 
		<attribute type="dataType" required="yes"/> 
	</ElementType>
	
	<ElementType name="Pdo" content="mixed" model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="fixed" required="yes"/> 
		<attribute type="mandatory" required="yes"/>
		<attribute type="sm" required="yes"/>
		<attribute type="fdt:index" required="yes"/> 
		<attribute type="fdt:name" required="yes"/> 
		<element   type="PdoEntry" minOccurs="0" maxOccurs="*"/>		
	</ElementType>
	
  <ElementType name="TxPdoList" content="mixed" model="closed">	
	  <attribute type="fdt:nodeId" required="no"/>	
		<element   type="Pdo" minOccurs="0" maxOccurs="*"/>
	</ElementType>
	
	<ElementType name="RxPdoList" content="mixed" model="closed">	
	  <attribute type="fdt:nodeId" required="no"/>	
		<element   type="Pdo" minOccurs="0" maxOccurs="*"/>
	</ElementType>

	<ElementType name="Transition" content="empty" model="closed"> 
    <attribute type="transitionType" required="yes"/>
  </ElementType>
     
  <ElementType name="TransitionList" content="eltOnly" model="closed"> 
    <element type="Transition" minOccurs="1" maxOccurs="*"/>	
  </ElementType>
   
  <ElementType name="CoEInitCmd" content="mixed" model="closed"> 
     <attribute type="fdt:index" required="yes"/>
		 <attribute type="subIndex" required="yes"/>
   	 <attribute type="fdt:binData" required="yes"/>
   	 <attribute type="comment" required="no"/>
   	 <element type="TransitionList" minOccurs="1" maxOccurs="1"/>	
  </ElementType>
   
  <ElementType name="CoEInitCmdList" content="eltOnly" model="closed"> 
    <element type="CoEInitCmd" minOccurs="0" maxOccurs="*"/>	
  </ElementType>
   
  <ElementType name="CoE" content="mixed" model="closed"> 
     <attribute type="fdt:nodeId" required="no"/>
     <attribute type="completeAccess" required="no"/>
     <attribute type="pdoUpload" required="no"/>
     <element type="CoEInitCmdList" minOccurs="0" maxOccurs="1"/>	
  </ElementType>

  <ElementType name="MailBox" content="mixed" model="closed">	
	  <attribute type="fdt:nodeId" required="no"/>
	  <element type="CoE" minOccurs="0" maxOccurs="1"/>	
	</ElementType>
	     
	<ElementType name="ProcessData" content="mixed" model="closed">	
	  <attribute type="downloadPdoAssign" required="no"/>
	  <attribute type="downloadPdoConfig" required="no"/>	 
	  <attribute type="fdt:nodeId" required="no"/> 
	  <element   type="TxPdoList" minOccurs="0" maxOccurs="1"/>
		<element   type="RxPdoList" minOccurs="0" maxOccurs="1"/>
		<element   type="SmList" minOccurs="0" maxOccurs="1"/>
	  <element   type="FmmuList" minOccurs="0" maxOccurs="1"/>  
	</ElementType>
		
	<ElementType name="Timeout" content="empty" model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="fdt:name" required="yes"/>
		<attribute type="wordValue" required="yes"/>
	</ElementType>
	
	<!--StateMachineTimeouts-->
	<ElementType name="StateMachineTimeouts" content="eltOnly" model="closed">
		<element type="Timeout" minOccurs="0" maxOccurs="*"/>
	</ElementType>
			
	<ElementType name="ECATNode" content="eltOnly" model="closed">
	  <attribute type="fdt:nodeId" required="no"/>
		<attribute type="fdt:readAccess" required="no"/>
   	<attribute type="fdt:writeAccess" required="no"/>
   	
		<element   type="ECATDeviceIdentity" minOccurs="1" maxOccurs="1"/>		
		<element   type="ECATInfo" minOccurs="1" maxOccurs="1"/>
		<element   type="ProcessData" minOccurs="0" maxOccurs="1"/>
		<element   type="MailBox" minOccurs="0" maxOccurs="1"/>		
		<element   type="DistributedClock" minOccurs="1" maxOccurs="1"/>	  
		<element   type="EtherCATSlaveController" minOccurs="1" maxOccurs="1"/>
		<element   type="StateMachineTimeouts" minOccurs="1" maxOccurs="1"/>
  </ElementType>
		
</Schema>