ProvisioningDevice.xsd 10.4 KB
Newer Older
1 2 3 4 5 6 7 8
<?xml version='1.0' encoding='UTF-8'?>
<xs:schema
    xmlns:xs='http://www.w3.org/2001/XMLSchema'
    targetNamespace='urn:ieee:iot:prov:d:1.0'
    xmlns='urn:ieee:iot:prov:d:1.0'
    xmlns:sd='urn:ieee:iot:sd:1.0'
    elementFormDefault='qualified'>

9 10 11 12 13 14 15 16 17
  <!--
  Disclaimer: This open source repository contains material that may be included-in or referenced by an unapproved draft of a 
  proposed IEEE Standard. All material in this repository is subject to change. The material in this repository is presented 
  "as is" and with all faults. Use of the material is at the sole risk of the user. IEEE specifically disclaims all warranties 
  and representations with respect to all material contained in this repository and shall not be liable, under any theory, for 
  any use of the material. Unapproved drafts of proposed IEEE standards must not be utilized for any conformance/compliance 
  purposes. See the LICENSE.md file distributed with this work for copyright and licensing information.
  -->

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250
  <xs:import namespace='urn:ieee:iot:sd:1.0'/>

  <xs:element name='clearCache'>
    <xs:annotation>
      <xs:documentation>Sent to a device to clear its provisioning rule cache.</xs:documentation>
    </xs:annotation>
    <xs:complexType/>
  </xs:element>

  <xs:element name='isFriend'>
    <xs:annotation>
      <xs:documentation>Sent by a device to check if it is allowed to accept a presence subscription from JID.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name='jid' type='xs:string' use='required'>
        <xs:annotation>
          <xs:documentation>JID of entity requesting presence subscription.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

  <xs:element name='isFriendResponse'>
    <xs:annotation>
      <xs:documentation>Contains a response to the isFriend question.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name='jid' type='xs:string' use='required'>
        <xs:annotation>
          <xs:documentation>JID of entity requesting presence subscription.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name='result' type='xs:boolean' use='required'>
        <xs:annotation>
          <xs:documentation>If the device is allowed to accept the presence subscription.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

  <xs:element name='unfriend'>
    <xs:annotation>
      <xs:documentation>Sent to a device to request it to remove the presence subscription from a remote entity.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name='jid' type='xs:string' use='required'>
        <xs:annotation>
          <xs:documentation>JID of remote entity.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

  <xs:element name='friend'>
    <xs:annotation>
      <xs:documentation>Sent to a device to request it to make a presence subscription request to a remote entity.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name='jid' type='xs:string' use='required'>
        <xs:annotation>
          <xs:documentation>JID of remote entity.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>

  <xs:element name='canRead'>
    <xs:annotation>
      <xs:documentation>A device sends the canRead request when it wants to know if a remote entity is allowed to read its sensor data.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base='CanReadBase'>
          <xs:attributeGroup ref='tokens'>
            <xs:annotation>
              <xs:documentation>Optional tokens identifying the original sender of the request.</xs:documentation>
            </xs:annotation>
          </xs:attributeGroup>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name='canReadResponse'>
    <xs:annotation>
      <xs:documentation>The provisioning server response to a canRead request.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base='CanReadBase'>
          <xs:attribute name='result' type='xs:boolean' use='required'>
            <xs:annotation>
              <xs:documentation>If the readout is permitted or not.</xs:documentation>
              <xs:documentation>Note: The permission might be partial. The device needs to check any node and field reference nodes, as well as field category attributes, to see if the original request has been limited. The device needs to use the values provided in the response instead of the elements in the original request.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:complexType name='CanReadBase' abstract='true'>
    <xs:sequence>
      <xs:element name='nd' minOccurs='0' maxOccurs='unbounded'>
        <xs:annotation>
          <xs:documentation>Defines a node in a concentrator.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:attributeGroup ref='sd:nodeIdentity'>
            <xs:annotation>
              <xs:documentation>Node identification attributes.</xs:documentation>
            </xs:annotation>
          </xs:attributeGroup>
        </xs:complexType>
      </xs:element>
      <xs:element name='f' minOccurs='0' maxOccurs='unbounded'>
        <xs:annotation>
          <xs:documentation>Contains a reference to a field to be read.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:attribute name='n' type='xs:string' use='required'>
            <xs:annotation>
              <xs:documentation>Name of field to be read.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attributeGroup ref='sd:category'>
      <xs:annotation>
        <xs:documentation>Field categories to be read.</xs:documentation>
      </xs:annotation>
    </xs:attributeGroup>
    <xs:attribute name='all' type='xs:boolean' use='optional' default='false'>
      <xs:annotation>
        <xs:documentation>If all field categories are to be read.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name='jid' type='xs:string' use='required'>
      <xs:annotation>
        <xs:documentation>JID of entity requesting the readout.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

  <xs:attributeGroup name='tokens'>
    <xs:attribute name='st' type='xs:string' use='optional'>
      <xs:annotation>
        <xs:documentation>Service tokens, separated by spaces if they are more than one, identifying the service generating the original request.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name='dt' type='xs:string' use='optional'>
      <xs:annotation>
        <xs:documentation>Device tokens, separated by spaces if they are more than one, identifying the device generating the original request.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
    <xs:attribute name='ut' type='xs:string' use='optional'>
      <xs:annotation>
        <xs:documentation>User tokens, separated by spaces if they are more than one, identifying the user generating the original request.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:attributeGroup>

  <xs:element name='canControl'>
    <xs:annotation>
      <xs:documentation>A device sends the canControl request when it wants to know if a remote entity is allowed to control any of its control parameters.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base='CanControlBase'>
          <xs:attributeGroup ref='tokens'>
            <xs:annotation>
              <xs:documentation>Optional tokens identifying the original sender of the request.</xs:documentation>
            </xs:annotation>
          </xs:attributeGroup>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:element name='canControlResponse'>
    <xs:annotation>
      <xs:documentation>The provisioning server response to a canControl request.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:complexContent>
        <xs:extension base='CanControlBase'>
          <xs:attribute name='result' type='xs:boolean' use='required'>
            <xs:annotation>
              <xs:documentation>If the control operation is permitted or not.</xs:documentation>
              <xs:documentation>Note: The permission might be partial. The device needs to check any node and parameter reference nodes, to see if the original request has been limited. The device needs to use the values provided in the response instead of the elements in the original request.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:extension>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

  <xs:complexType name='CanControlBase' abstract='true'>
    <xs:sequence>
      <xs:element name='nd' minOccurs='0' maxOccurs='unbounded'>
        <xs:annotation>
          <xs:documentation>Defines a node in a concentrator.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:attributeGroup ref='sd:nodeIdentity'>
            <xs:annotation>
              <xs:documentation>Node identification attributes.</xs:documentation>
            </xs:annotation>
          </xs:attributeGroup>
        </xs:complexType>
      </xs:element>
      <xs:element name='p' minOccurs='0' maxOccurs='unbounded'>
        <xs:annotation>
          <xs:documentation>Contains a reference to a parameter to be controlled.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:attribute name='n' type='xs:string' use='required'>
            <xs:annotation>
              <xs:documentation>Name of parameter to be controlled.</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name='jid' type='xs:string' use='required'>
      <xs:annotation>
        <xs:documentation>JID of entity requesting the control operation.</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>

</xs:schema>