<?xml version="1.0"?>
<Schema name="FDTCIPChannelParameterSchema" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes" xmlns:fdt="x-schema:FDTDataTypesSchema.xml" xmlns:cip="x-schema:DTMCIPDataTypeSchema.xml" xmlns:fdtsystag="DTMSystemTagListSchema.xml">
	<!-- Version of the Schema -->
	<AttributeType name="schemaVersion" dt:type="number" default="1.0"/>
	
	<!--Definition of Attributes-->
	<AttributeType name="assemblySize" dt:type="ui1"/>
	<AttributeType name="memberPosition" dt:type="ui4"/>
	<AttributeType name="memberSize" dt:type="ui4"/>
	<AttributeType name="frameApplicationTag" dt:type="string"/>
	<AttributeType name="gatewayBusCategory" dt:type="uuid"/>
	<AttributeType name="protectedByChannelAssignment" dt:type="boolean"/>
	<AttributeType name="helpMessage" dt:type="string"/>
	
	<!--Definition of Elements-->
	<ElementType name="AssemblyMemberReference" content="empty"  model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="fdt:idref" required="yes"/>
		<attribute type="cip:bitOffset" required="no"/>
	</ElementType>
	
	<ElementType name="ChannelReference">
	  <attribute type="fdt:nodeId" required="no"/>
		<attribute type="cip:bitOffset" required="yes"/>
		<element type="fdt:ChannelReference" />
		<element type="cip:CIPObjectAddress" minOccurs="1" maxOccurs="1"/>
	</ElementType>
    
	<ElementType name="AssemblyMember"    content="eltOnly" model="closed">
		<!-- could be: a non-displayed, displayed parameters or assemblies -->
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="memberPosition" required="yes"/> 
		<attribute type="memberSize"   required="yes"/>
		
		<group order="one" minOccurs="1" maxOccurs="1">
		    <element type="AssemblyMemberReference" minOccurs="0" maxOccurs="1"/>
		    <element type="ChannelReference" minOccurs="0" maxOccurs="1"/>
		    <element type="cip:CIPObjectAddress" minOccurs="1" maxOccurs="1"/>
		    <element type="cip:Constant" minOccurs="1" maxOccurs="1"/>
		</group>  
	</ElementType> 

	<ElementType name="AssemblyMembers" content="eltOnly"  model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<element type="AssemblyMember" minOccurs="0" maxOccurs="*"/>
	</ElementType>

	<ElementType name="ServiceSet" content="eltOnly" model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<element type="cip:Service" minOccurs="1" maxOccurs="*"/>
	</ElementType>

	<ElementType name="FDTChannel" content="eltOnly" model="closed" order="seq">
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="fdt:tag" required="yes"/>
		<attribute type="fdt:id" required="yes"/>
		<attribute type="protectedByChannelAssignment" required="yes"/>
		<attribute type="fdt:dataType" required="yes"/>
		<attribute type="assemblySize" required="yes"/>
		<attribute type="fdt:signalType" required="yes"/>
		<attribute type="frameApplicationTag" required="no"/>
		<attribute type="helpMessage" required="no"/>
		<element type="ServiceSet" minOccurs="1" maxOccurs="1"/>
		<element type="cip:CIPObjectAddress" minOccurs="1" maxOccurs="1"/>
		<element type="AssemblyMembers" minOccurs="0" maxOccurs="1"/> <!--should be used if the data type is structured -->
	</ElementType>

	<ElementType name="FDTChannelType" content="eltOnly" model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<attribute type="gatewayBusCategory" required="no"/>
		<element type="fdt:VersionInformation" minOccurs="1" maxOccurs="1"/>
	</ElementType>

	<ElementType name="FDT" content="eltOnly" model="closed">
		<attribute type="fdt:nodeId" required="no"/>
		<element type="FDTChannelType" minOccurs="1" maxOccurs="1"/>
		<element type="FDTChannel" minOccurs="1" maxOccurs="1"/>
	</ElementType>
</Schema>
