<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:lxi="http://www.lxistandard.org/InstrumentIdentification/1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.lxistandard.org/InstrumentIdentification/1.0" elementFormDefault="qualified" attributeFormDefault="unqualified">
  <xs:element name="LXIDevice">
    <xs:annotation>
      <xs:documentation>Identification information for an LXI device.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base="lxi:Device">
          <xs:sequence>
            <xs:element name="LXIClass">
              <xs:annotation>
                <xs:documentation>This element indicates if this device is Class A, B, or C.  Per LXI Standard 1.9.1 LXI Functional Class Models</xs:documentation>
              </xs:annotation>
              <xs:simpleType>
                <xs:restriction base="xs:string">
                  <xs:enumeration value="A"/>
                  <xs:enumeration value="B"/>
                  <xs:enumeration value="C"/>
                </xs:restriction>
              </xs:simpleType>
            </xs:element>
            <xs:element name="Domain" type="xs:unsignedByte" nillable="true" minOccurs="0" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation>The LXI domain(s) this instrument uses for LXI Event Messages. Per LXI Standar 4.4 RULE - Data Packet Format.</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="LXIVersion" type="xs:string">
              <xs:annotation>
                <xs:documentation>Indicates the latest version of the LXI specification this device complies with.</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="Device" abstract="false">
    <xs:annotation>
      <xs:documentation>Generic Instrument Description</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="Manufacturer" type="xs:string" nillable="true" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Manufacturer description, should match the manufacturer field in IEEE 488.2 identity query.  "Manufacturer" field Per LXI Standard 9.2 RULE - Welcome Web Page Display Items.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Model" type="xs:string" nillable="true" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Instrument model designation, should match the model field in IEEE 488.2 identity query. "Model" field per LXI Standard 9.2 RULE - Welcome Web Page Display Items.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SerialNumber" type="xs:string" nillable="true" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Instrument serial number, should match the serial number field in IEEE 488.2 identity query. "Serial Number" field per LXI Standard 9.2 RULE - Welcome Web Page Display Items.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="FirmwareRevision" type="xs:string" nillable="true" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Instrument firmware revision, should match the firmware revision field in IEEE 488.2 identity query. "Firmware and/or Software Revision" field per LXI Standard 9.2 RULE - Welcome Web Page Display Items.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ManufacturerDescription" type="xs:string" nillable="false" minOccurs="0">
        <xs:annotation>
          <xs:documentation>This is the manufacutrers product description such as "Acme 1234A Digital Foozywachit".</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="HomepageURL" type="xs:anyURI" minOccurs="0">
        <xs:annotation>
          <xs:documentation>This is the URL for the instrument Manufacturer.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DriverURL" type="xs:anyURI" minOccurs="0">
        <xs:annotation>
          <xs:documentation>This is the URL where users can go to acquire the latest driver</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ConnectedDevices" minOccurs="0">
        <xs:annotation>
          <xs:documentation>This optional element is used by gateways to advertise information for connected devices, such as GPIB, VXI, USB, PXI, and/or Serial instruments.  Per LXI Stanadard 10.2.4 Rule - Connected Device URLs!!!VERIFY THIS WHEN 1.2 IS FINALIZED!!!</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="DeviceURI" type="xs:anyURI" nillable="false" minOccurs="0" maxOccurs="unbounded">
              <xs:annotation>
                <xs:documentation>URIs for connected devices represent the base URL for the connected device.  Per LXI Stanadard 10.2.4 Rule - Connected Device URLs!!!VERIFY THIS WHEN 1.2 IS FINALIZED!!!</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="UserDescription" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>This is a user description for this device, for instance "the Spectrum Analyzer on the Blue Portable Cart".  "Description" field per LXI Standard 9.2 RULE - Welcome Web Page Display Items.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="IdentificationURL" type="xs:anyURI" minOccurs="0">
        <xs:annotation>
          <xs:documentation>This is the URL from which the instrument will source the identification XML.  Per LXI Stanadard 10.2 Rule - XML Identification Document URL !!!VERIFY THIS WHEN 1.2 IS FINALIZED!!!</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Interface" type="lxi:InterfaceInformation" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Interface Information.  For instances of LXIDevice, at least one Interface of type "NetworkInformation" must be provided, with an InterfaceType of "LXI".
        </xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="IVISoftwareModuleName" nillable="true" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>This identifies the IVI driver as specified in the IVI Configuration Store Name field of the Software Module.  The Comment annotation is used to describe this software module, especially where the driver supports multiple software modules, that is, instrument personalities.  !!!NEED AN IVI REFERENCE!!!</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="xs:string">
              <xs:attribute name="Comment" type="xs:string"/>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="Extension" minOccurs="0">
        <xs:complexType>
          <xs:sequence maxOccurs="unbounded">
            <xs:any namespace="##any" processContents="lax">
              <xs:annotation>
                <xs:documentation>Vendor specific extensions used to describe the instrument.</xs:documentation>
              </xs:annotation>
            </xs:any>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="InterfaceInformation">
    <xs:sequence>
      <xs:element name="InstrumentAddressString" type="xs:string" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>This is a VISA-like string to help the driver or a human determine the actual address string.  Consistent with the web presentation of an IVI I/O Resource Descriptor string, per LXI Standard 9.2.1 Rule - Instrument Address String on Welcome Page.
          </xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="InterfaceType" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>For LXI devices, this field must contain LXI.  This may be used to designate other vendor specified interfaces (e.g., VXI, PXI, GPIB, Serial, USB, etc.).
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name="InterfaceName" type="xs:string" use="optional">
      <xs:annotation>
        <xs:documentation>This field should contain a logical name for the interface, from the device's perspective.  For example, network interfaces may be named "eth0", "eth1", etc.
        </xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:complexType name="NetworkInformation">
    <xs:complexContent>
      <xs:extension base="lxi:InterfaceInformation">
        <xs:annotation>
          <xs:documentation>Network connection information.  These generally mimic the values presented on the LXI required Welcome Web page.</xs:documentation>
        </xs:annotation>
        <xs:sequence>
          <xs:element name="Hostname" type="xs:string">
            <xs:annotation>
              <xs:documentation>This is the hostname used for DNS.  "Hostname" field per LXI Standard 9.2 RULE - Welcome Web Page Display Items.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="IPAddress" type="xs:string">
            <xs:annotation>
              <xs:documentation>This is the currently active IP Address.  This is represented as a string and can represent IPv4 or IPv6 addresses.  "TCP/IP Address" field per LXI Standard 9.2 RULE – Welcome Web Page Display Items.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="SubnetMask" type="xs:string">
            <xs:annotation>
              <xs:documentation>The currently configured subnet mask.  "Subnet mask" field per LXI Standard 9.5 RULE - LAN Configuration Web Page Contents.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="MACAddress" type="xs:string">
            <xs:annotation>
              <xs:documentation>This is the MAC address of this interface.  "MAC Address" field per LXI Standard 9.2 RULE - Welcome Web Page Display Items.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="Gateway" type="xs:string">
            <xs:annotation>
              <xs:documentation>The IP address of the currently configured gateway.  "Default Gateway" field per LXI Standard 9.5 RULE - LAN Configuration Web Page Contents.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="DHCPEnabled" type="xs:boolean">
            <xs:annotation>
              <xs:documentation>Indicates if the instrument is configured to accept configuration from DHCP, per LXI Standard 8.7.1 RULE - Options for LAN configuration.</xs:documentation>
            </xs:annotation>
          </xs:element>
          <xs:element name="AutoIPEnabled" type="xs:boolean">
            <xs:annotation>
              <xs:documentation>Indicates if the instrument is configured to use AutoIP to choose an IP address, per LXI Standard 8.7.1 RULE - Options for LAN configuration.</xs:documentation>
            </xs:annotation>
          </xs:element>
        </xs:sequence>
        <xs:attribute name="IPType" use="required">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="IPv4"/>
              <xs:enumeration value="IPv6"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>
      </xs:extension>
    </xs:complexContent>
  </xs:complexType>
</xs:schema>

