NV Element

<nv>

The <nv> element defines the bytes that are sent on the IzoT network for a datapoint update sent to or from a device.

 

The following table lists the attributes for the <nv> element.

 
Attribute Description Required /Optional
direction Defines whether the IzoT device datapoint is an input datapoint or an output datapoint. This attribute is defined by the device application. Required
index Correlates the IzoT device datapoint index on the device with the datapoint defined in the class file. This attribute is defined by the device application. Required
size Defines the size of the IzoT device datapoint update. This attribute is defined by the device application.

Example: To turn on a UNVT_iot_load_control network variable, you send a 60-byte message. The size attribute for this datapoint is 60.
Optional
type Specifies the datapoint type. If the datapoint is a configuration datapoint, the type can be a configuration property type. The type prefix ("SNVT", "UNVT", "SCPT", or "UCPT") may be omitted, as it is in IzoT Python.

If the type name is UCPTiotName, SCPTname1, SCPTname2, or SCPTname3, the IzoT Server reads the datapoint to get the device name for the device. If more than one of the latter three name strings is available, the IzoT Server concatenates them. In this case, the type prefix ("SCPT" or "UCPT") must be included.

If the type name is SCPTlocation, the IzoT Server reads the datapoint to get the location name for the device. 

Other datapoint and configuration property types are ignored. In this case, the type prefix ("SCPT") must be included.
Optional (Required for device-hosted name)

Example

<nvs>
  <nv index="0" direction="input" size="3">

    <byte index="0" ... >
      <attribute ... >
        <enum ... />
      </attribute>
    </byte>
    <byte index="1" ... >
      <attribute ... />
    </byte>
    <byte index="2" ... >
      <attribute ... />
    </byte>
  </nv>
</nvs>

XML Schema Definition

  <xs:element name="nv">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="byte" minOccurs="0" maxOccurs="unbounded" />
      </xs:sequence>
      <xs:attribute name="index" use="required" >
        <xs:simpleType>
          <xs:restriction base="xs:nonNegativeInteger">
            <xs:minInclusive value="0" />
            <xs:maxInclusive value="4095" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>       
      <xs:attribute name="size" type="xs:NMTOKEN" use="optional" />
      <xs:attribute name="direction" use="required" >
        <xs:simpleType>
          <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="input" />
            <xs:enumeration value="output" />
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="type" type="xs:NMTOKEN" use="optional" />     
    </xs:complexType>
  </xs:element>