Multi DIO Example Device Class File

The following example device class file defines the device attributes for the IzoT Multi DIO example.  This device class files defines seven IzoT Server datapoints that are implemented by six Multi DIO device application datapoints.  The server datapoints are defined by the <attribute> elements within the <attributes> element. The device application datapoints are defined by the <nv> elements within the <nvs> element.

 

<device pid="9FFFFF0500510011" name="DIO" type="dio" brand="Echelon">
   <attributes>
     <attribute name="location">
      <nvs>
        <nv index="9" direction="input" />
      </nvs>
    </attribute>
    <attribute name="name">
      <nvs>
        <nv index="10" direction="input" />
      </nvs>
    </attribute>
    <attribute name="major-version">
      <nvs>
        <nv index="14" direction="output" />
      </nvs>
    </attribute>
    <attribute name="minor-version">
      <nvs>
        <nv index="15" direction="output" />
      </nvs>
    </attribute>
    <attribute name="state-setting-1">
      <nvs>
        <nv index="16" direction="input" />
      </nvs>
    </attribute>
    <attribute name="state-1">
      <nvs>
        <nv index="17" direction="output" />
      </nvs>
    </attribute>
    <attribute name="control-1">
      <nvs>
        <nv index="17" direction="output" />
      </nvs>
    </attribute>
  </attributes>
  <nvs>

    <nv index="9" direction="input" size="17" type="iotLocation" >
      <byte index="1" length="120">
        <attribute name="location" />
      </byte>
    </nv>
    <nv index="10" direction="input" size="17" type="iotName" >
      <byte index="1" length="120">
        <attribute name="name" />
      </byte>
    </nv>
    <nv index="14" direction="output" size="1" type="devMajVersion">
      <byte index="0" length="2">
        <attribute name="major-version"/>
      </byte>
    </nv>
    <nv index="15" direction="output" size="1" type="devMinVersion">
      <byte index="0" length="2">
        <attribute name="minor-version"/>
      </byte>
    </nv>
    <nv index="16" direction="input" size="60" type="iot_load_control">
      <byte index="0" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="1" />
        </attribute>
      </byte>
      <byte index="1" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="on" output="1" />
          <enum input="off" output="0" />
          <enum input="0" output="0" />
          <enum input="1" output="1" />
          <enum input="default" output="1" />
        </attribute>
      </byte>
      <byte index="2" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="127" />
        </attribute>
      </byte>
      <byte index="3" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="192" />
        </attribute>
      </byte>
      <byte index="4" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="0" />
        </attribute>
      </byte>
      <byte index="5" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="0" />
        </attribute>
      </byte>
      <byte index="6" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="127" />
        </attribute>
      </byte>
      <byte index="7" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="192" />
        </attribute>
      </byte>
      <byte index="8" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="0" />
        </attribute>
      </byte>
      <byte index="9" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="0" />
        </attribute>
      </byte>
      <byte index="10" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="-1" />
        </attribute>
      </byte>
      <byte index="15" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="127" />
        </attribute>
      </byte>
      <byte index="16" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="192" />
        </attribute>
      </byte>
      <byte index="17" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="0" />
        </attribute>
      </byte>
      <byte index="18" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="0" />
        </attribute>
      </byte>
      <byte index="19" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="127" />
        </attribute>
      </byte>
      <byte index="20" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="192" />
        </attribute>
      </byte>
      <byte index="21" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="0" />
        </attribute>
      </byte>
      <byte index="22" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="0" />
        </attribute>
      </byte>
      <byte index="23" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="-1" />
        </attribute>
      </byte>
      <byte index="24" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="-1" />
        </attribute>
      </byte>
      <byte index="25" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="127" />
        </attribute>
      </byte>
      <byte index="26" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="192" />
        </attribute>
      </byte>
      <byte index="27" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="0" />
        </attribute>
      </byte>
      <byte index="28" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="0" />
        </attribute>
      </byte>
      <byte index="29" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="127" />
        </attribute>
      </byte>
      <byte index="30" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="192" />
        </attribute>
      </byte>
      <byte index="31" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="0" />
        </attribute>
      </byte>
      <byte index="32" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="0" />
        </attribute>
      </byte>
      <byte index="33" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="127" />
        </attribute>
      </byte>
      <byte index="34" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="192" />
        </attribute>
      </byte>
      <byte index="35" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="0" />
        </attribute>
      </byte>
      <byte index="36" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="0" />
        </attribute>
      </byte>
      <byte index="39" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="255" />
        </attribute>
      </byte>
      <byte index="40" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="default" output="255" />
        </attribute>
      </byte>
    </nv>
    <nv index="16" direction="output" size="60" type="iot_load_control">
      <byte index="1" length="1">
        <attribute name="state-setting-1" enum="true">
          <enum input="0" output="off" />
          <enum input="1" output="on" />
        </attribute>
      </byte>
    </nv>
    <nv index="17" direction="output" size="60" type="iot_load_control" >
      <byte index="0" length="1">
        <attribute name="control-1" />
      </byte>
      <byte index="1" length="1">
        <attribute name="state-1" enum="true">
          <enum input="0" output="off" />
          <enum input="1" output="on" />
        </attribute>
      </byte>
    </nv>
  </nvs>
</device>