Enum Element
<enum>
The <enum> element defines logical names for each datapoint defined for an <attribute> element. When an <attribute> element has an enum attribute set to true, the IzoT Server sets the corresponding XML attribute to a value based on the <enum> children elements within the <attribute> element.
The following table lists the attributes for the <enum> element.
Â
Attribute | Description | Required/Optional |
---|---|---|
input | For an input datapoint, defines the XML value to be sent to the IzoT Server by a client to update the datapoint on the device. You can specify one of the enumeration values as the "default", which indicates that the IzoT Server should use the specified value if none of the other enumerations match. For an output datapoint, defines a numeric value sent by the device application.For an IzoT Server datapoint that is mapped to both an input and output datapoint on the device, two input attributes may be defined per enuermation value--one for the XML value to be sent by a client and one for the numeric value sent by the device application. | Required |
output | For an input datapoint, defines the numeric value to be sent by the IzoT Server for this byte. F or an output datapoint, specifies the XML value to be sent by the IzoT Server for the datapoint value specified by the input attribute. | Optional |
value | Numeric value. Used for documenting the value and is not used by the IzoT Server. | Optional |
Example
<nvs> Â Â <nv ... > Â Â Â Â <byte ... > Â Â Â Â Â Â <attribute name="state" enum="true"> Â Â Â Â Â Â Â Â <enum input="off" output="0" /> Â Â Â Â Â Â Â Â <enum input="on" output="1" /> Â Â Â Â Â Â </attribute> Â Â Â Â </byte> Â Â </nv> </nvs>
XML Schema Definition
  <xs:element name="enum">     <xs:complexType>       <xs:attribute name="output" type="xs:NMTOKEN" use="optional" />       <xs:attribute name="input" type="xs:NMTOKEN" use="required" />       <xs:attribute name="value" type="xs:NMTOKEN" use="optional" />     </xs:complexType>   </xs:element>