<?xml version="1.0" encoding="UTF-8"?>
<Schema name="FDTModbusChannelParameterSchema"
	 xmlns="urn:schemas-microsoft-com:xml-data"
	 xmlns:dt="urn:schemas-microsoft-com:datatypes"
	 xmlns:fdt="x-schema:FDTDataTypesSchema.xml"
	 xmlns:appId="x-schema:FDTApplicationIdSchema.xml">

  <!--Definition of Attributes-->
  <AttributeType name="schemaVersion" dt:type="number" default="1.1" />
  <AttributeType name="address" dt:type="ui2" />
  <AttributeType name="modbusDataTypes" dt:type="enumeration" dt:values="coil discreteInput holdingRegister inputRegister" />
  <AttributeType name="quantity" dt:type="ui2" />
  <AttributeType name="protectedByChannelAssignment" dt:type="boolean" />
  <AttributeType name="frameApplicationTag" dt:type="string" />
  <AttributeType name="scaleValue" dt:type="string" />
  <AttributeType name="statusChannel" dt:type="boolean" />
  <AttributeType name="gatewayBusCategory" dt:type="uuid" />
  <AttributeType name="iecDataType" dt:type="enumeration" dt:values="BOOL SINT INT DINT LINT USINT UINT UDINT ULINT REAL LREAL TIME DATE TimeOfDay DateAndTime STRING BYTE WORD DWORD LWORD WSTRING" />

  <!--Definition of Elements-->
  <ElementType name="ModbusAccessData" content="empty" model="closed">
    <attribute type="fdt:nodeId" />
    <attribute type="modbusDataTypes" required="yes" />
    <attribute type="address" required="yes" />
    <attribute type="quantity" required="yes" />
    <attribute type="fdt:bitPosition" required="no" default="0" />
    <attribute type="fdt:bitLength" required="no" />
    <attribute type="fdt:readAccess" required="no" />
    <attribute type="fdt:writeAccess" required="no" />
  </ElementType>

  <ElementType name="UnitScaling" content="empty" model="closed">
    <attribute type="scaleValue" required="yes" />
  </ElementType>

  <ElementType name="FDTChannel" content="eltOnly" order="seq" model="closed">
    <attribute type="fdt:nodeId" />
    <attribute type="fdt:tag" required="yes" />
    <attribute type="fdt:id" required="yes" />
    <attribute type="fdt:descriptor" />
    <attribute type="protectedByChannelAssignment" required="yes" />
    <attribute type="fdt:dataType" required="yes" />
    <attribute type="iecDataType" required="no" />
    <attribute type="fdt:signalType" required="yes" />
    <attribute type="frameApplicationTag" />
    <attribute type="appId:applicationId" />
    <element type="fdt:SemanticInformation" minOccurs="0" maxOccurs="*" />
    <element type="fdt:BitEnumeratorEntries" minOccurs="0" maxOccurs="1" />
    <element type="fdt:EnumeratorEntries" minOccurs="0" maxOccurs="1" />
    <element type="fdt:Unit" minOccurs="0" maxOccurs="1" />
    <element type="UnitScaling" minOccurs="0" maxOccurs="1" />
    <element type="ModbusAccessData" minOccurs="0" maxOccurs="1" />
    <element type="fdt:Alarms" minOccurs="0" maxOccurs="1" />
    <element type="fdt:Ranges" minOccurs="0" maxOccurs="1" />
    <element type="fdt:Deadband" minOccurs="0" maxOccurs="1" />
    <element type="fdt:SubstituteValue" minOccurs="0" maxOccurs="1" />
    <element type="fdt:StructuredElements" minOccurs="0" maxOccurs="1" />
  </ElementType>

  <ElementType name="FDTChannelType" content="eltOnly" order="seq" model="closed">
    <attribute type="fdt:nodeId" />
    <element type="fdt:VersionInformation" />
    <attribute type="gatewayBusCategory" required="no" />
    <attribute type="statusChannel" required="no" />
  </ElementType>

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

