mirror of
https://github.com/moparisthebest/xeps
synced 2024-11-21 08:45:04 -05:00
Retab IoT examples
This commit is contained in:
parent
43279ef184
commit
52c76b2437
116
xep-0323.xml
116
xep-0323.xml
@ -465,12 +465,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Read-out request of momentary values from a device'>
|
<example caption='Read-out request of momentary values from a device'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='client@example.org/amr'
|
from='client@example.org/amr'
|
||||||
to='device@example.org'
|
to='device@example.org'
|
||||||
id='S0001'>
|
id='S0001'>
|
||||||
<req xmlns='urn:xmpp:iot:sensordata' seqnr='1' momentary='true'/>
|
<req xmlns='urn:xmpp:iot:sensordata' seqnr='1' momentary='true'/>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -479,12 +479,12 @@
|
|||||||
|
|
||||||
<example caption='Read-out request accepted by device'>
|
<example caption='Read-out request accepted by device'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='device@example.org'
|
from='device@example.org'
|
||||||
to='client@example.org/amr'
|
to='client@example.org/amr'
|
||||||
id='S0001'>
|
id='S0001'>
|
||||||
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='1'/>
|
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='1'/>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -493,7 +493,7 @@
|
|||||||
|
|
||||||
<example caption='Momentary read-out response'>
|
<example caption='Momentary read-out response'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='device@example.org'
|
<message from='device@example.org'
|
||||||
to='client@example.org/amr'>
|
to='client@example.org/amr'>
|
||||||
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='1' done='true'>
|
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='1' done='true'>
|
||||||
<node nodeId='Device01'>
|
<node nodeId='Device01'>
|
||||||
@ -502,7 +502,7 @@
|
|||||||
</timestamp>
|
</timestamp>
|
||||||
</node>
|
</node>
|
||||||
</fields>
|
</fields>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section2>
|
</section2>
|
||||||
|
|
||||||
@ -513,26 +513,26 @@
|
|||||||
|
|
||||||
<example caption='Momentary read-out failure'>
|
<example caption='Momentary read-out failure'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='client@example.org/amr'
|
from='client@example.org/amr'
|
||||||
to='device@example.org'
|
to='device@example.org'
|
||||||
id='S0002'>
|
id='S0002'>
|
||||||
<req xmlns='urn:xmpp:iot:sensordata' seqnr='2' momentary='true'/>
|
<req xmlns='urn:xmpp:iot:sensordata' seqnr='2' momentary='true'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='device@example.org'
|
from='device@example.org'
|
||||||
to='client@example.org/amr'
|
to='client@example.org/amr'
|
||||||
id='S0002'>
|
id='S0002'>
|
||||||
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='2'/>
|
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='2'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<message from='device@example.org'
|
<message from='device@example.org'
|
||||||
to='client@example.org/amr'>
|
to='client@example.org/amr'>
|
||||||
<failure xmlns='urn:xmpp:iot:sensordata' seqnr='2' done='true'>
|
<failure xmlns='urn:xmpp:iot:sensordata' seqnr='2' done='true'>
|
||||||
<error nodeId='Device01' timestamp='2013-03-07T17:13:30'>Timeout.</error>
|
<error nodeId='Device01' timestamp='2013-03-07T17:13:30'>Timeout.</error>
|
||||||
</failure>
|
</failure>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Read-out rejected' anchor='readoutrejected'>
|
<section2 topic='Read-out rejected' anchor='readoutrejected'>
|
||||||
@ -542,14 +542,14 @@
|
|||||||
|
|
||||||
<example caption='Momentary read-out rejected'>
|
<example caption='Momentary read-out rejected'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='client@example.org/amr'
|
from='client@example.org/amr'
|
||||||
to='device@example.org'
|
to='device@example.org'
|
||||||
id='S0003'>
|
id='S0003'>
|
||||||
<req xmlns='urn:xmpp:iot:sensordata' seqnr='3' momentary='true'/>
|
<req xmlns='urn:xmpp:iot:sensordata' seqnr='3' momentary='true'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='error'
|
<iq type='error'
|
||||||
from='device@example.org'
|
from='device@example.org'
|
||||||
to='client@example.org/amr'
|
to='client@example.org/amr'
|
||||||
id='S0003'>
|
id='S0003'>
|
||||||
@ -557,7 +557,7 @@
|
|||||||
<forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
<forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
||||||
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' xml:lang='en'>Access denied.</text>
|
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' xml:lang='en'>Access denied.</text>
|
||||||
</error>
|
</error>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
Depending on the reason for rejecting the request, different XMPP errors can be returned, according to the description in the following table. The table also
|
Depending on the reason for rejecting the request, different XMPP errors can be returned, according to the description in the following table. The table also
|
||||||
@ -597,26 +597,26 @@
|
|||||||
|
|
||||||
<example caption='Scheduled read-out of device with multiple responses'>
|
<example caption='Scheduled read-out of device with multiple responses'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='client@example.org/amr'
|
from='client@example.org/amr'
|
||||||
to='device@example.org'
|
to='device@example.org'
|
||||||
id='S0004'>
|
id='S0004'>
|
||||||
<req xmlns='urn:xmpp:iot:sensordata' seqnr='4' all='true' when='2013-03-07T19:00:00'/>
|
<req xmlns='urn:xmpp:iot:sensordata' seqnr='4' all='true' when='2013-03-07T19:00:00'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='device@example.org'
|
from='device@example.org'
|
||||||
to='client@example.org/amr'
|
to='client@example.org/amr'
|
||||||
id='S0004'>
|
id='S0004'>
|
||||||
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='4' queued='true'/>
|
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='4' queued='true'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<message from='device@example.org'
|
<message from='device@example.org'
|
||||||
to='client@example.org/amr'>
|
to='client@example.org/amr'>
|
||||||
<started xmlns='urn:xmpp:iot:sensordata' seqnr='4'/>
|
<started xmlns='urn:xmpp:iot:sensordata' seqnr='4'/>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message from='device@example.org'
|
<message from='device@example.org'
|
||||||
to='client@example.org/amr'>
|
to='client@example.org/amr'>
|
||||||
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='4'>
|
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='4'>
|
||||||
<node nodeId='Device01'>
|
<node nodeId='Device01'>
|
||||||
@ -627,9 +627,9 @@
|
|||||||
</timestamp>
|
</timestamp>
|
||||||
</node>
|
</node>
|
||||||
</fields>
|
</fields>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message from='device@example.org'
|
<message from='device@example.org'
|
||||||
to='client@example.org/amr'>
|
to='client@example.org/amr'>
|
||||||
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='4'>
|
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='4'>
|
||||||
<node nodeId='Device01'>
|
<node nodeId='Device01'>
|
||||||
@ -640,9 +640,9 @@
|
|||||||
</timestamp>
|
</timestamp>
|
||||||
</node>
|
</node>
|
||||||
</fields>
|
</fields>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message from='device@example.org'
|
<message from='device@example.org'
|
||||||
to='client@example.org/amr'>
|
to='client@example.org/amr'>
|
||||||
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='4'>
|
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='4'>
|
||||||
<node nodeId='Device01'>
|
<node nodeId='Device01'>
|
||||||
@ -661,12 +661,12 @@
|
|||||||
</timestamp>
|
</timestamp>
|
||||||
</node>
|
</node>
|
||||||
</fields>
|
</fields>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message from='device@example.org'
|
<message from='device@example.org'
|
||||||
to='client@example.org/amr'>
|
to='client@example.org/amr'>
|
||||||
<done xmlns='urn:xmpp:iot:sensordata' seqnr='4'/>
|
<done xmlns='urn:xmpp:iot:sensordata' seqnr='4'/>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Read-out of multiple devices' anchor='readmulti'>
|
<section2 topic='Read-out of multiple devices' anchor='readmulti'>
|
||||||
@ -676,7 +676,7 @@
|
|||||||
|
|
||||||
<example caption='Read-out of multiple devices'>
|
<example caption='Read-out of multiple devices'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='client@example.org/amr'
|
from='client@example.org/amr'
|
||||||
to='device@example.org'
|
to='device@example.org'
|
||||||
id='S0005'>
|
id='S0005'>
|
||||||
@ -684,16 +684,16 @@
|
|||||||
<node nodeId='Device02'/>
|
<node nodeId='Device02'/>
|
||||||
<node nodeId='Device03'/>
|
<node nodeId='Device03'/>
|
||||||
</req>
|
</req>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='device@example.org'
|
from='device@example.org'
|
||||||
to='client@example.org/amr'
|
to='client@example.org/amr'
|
||||||
id='S0005'>
|
id='S0005'>
|
||||||
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='5'/>
|
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='5'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<message from='device@example.org'
|
<message from='device@example.org'
|
||||||
to='client@example.org/amr'>
|
to='client@example.org/amr'>
|
||||||
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='5'>
|
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='5'>
|
||||||
<node nodeId='Device02'>
|
<node nodeId='Device02'>
|
||||||
@ -702,9 +702,9 @@
|
|||||||
</timestamp>
|
</timestamp>
|
||||||
</node>
|
</node>
|
||||||
</fields>
|
</fields>
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<message from='device@example.org'
|
<message from='device@example.org'
|
||||||
to='client@example.org/amr'>
|
to='client@example.org/amr'>
|
||||||
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='5' done='true'>
|
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='5' done='true'>
|
||||||
<node nodeId='Device03'>
|
<node nodeId='Device03'>
|
||||||
@ -713,7 +713,7 @@
|
|||||||
</timestamp>
|
</timestamp>
|
||||||
</node>
|
</node>
|
||||||
</fields>
|
</fields>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic='Read-out of specific fields' anchor='readfields'>
|
<section2 topic='Read-out of specific fields' anchor='readfields'>
|
||||||
@ -732,7 +732,7 @@
|
|||||||
|
|
||||||
<example caption='Read-out of multiple devices'>
|
<example caption='Read-out of multiple devices'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='client@example.org/amr'
|
from='client@example.org/amr'
|
||||||
to='device@example.org'
|
to='device@example.org'
|
||||||
id='S0006'>
|
id='S0006'>
|
||||||
@ -741,16 +741,16 @@
|
|||||||
<field name='Energy'/>
|
<field name='Energy'/>
|
||||||
<field name='Power'/>
|
<field name='Power'/>
|
||||||
</req>
|
</req>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='device@example.org'
|
from='device@example.org'
|
||||||
to='client@example.org/amr'
|
to='client@example.org/amr'
|
||||||
id='S0006'>
|
id='S0006'>
|
||||||
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='6'/>
|
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='6'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<message from='device@example.org'
|
<message from='device@example.org'
|
||||||
to='client@example.org/amr'>
|
to='client@example.org/amr'>
|
||||||
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='6' done='true'>
|
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='6' done='true'>
|
||||||
<node nodeId='Device04'>
|
<node nodeId='Device04'>
|
||||||
@ -760,7 +760,7 @@
|
|||||||
</timestamp>
|
</timestamp>
|
||||||
</node>
|
</node>
|
||||||
</fields>
|
</fields>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section2>
|
</section2>
|
||||||
<section2 topic="Cancelling a scheduled read-out request" anchor="cancelreadout">
|
<section2 topic="Cancelling a scheduled read-out request" anchor="cancelreadout">
|
||||||
@ -769,33 +769,33 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Scheduled read-out of device with multiple responses'>
|
<example caption='Scheduled read-out of device with multiple responses'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='client@example.org/amr'
|
from='client@example.org/amr'
|
||||||
to='device@example.org'
|
to='device@example.org'
|
||||||
id='S0007'>
|
id='S0007'>
|
||||||
<req xmlns='urn:xmpp:iot:sensordata' seqnr='8' all='true' when='2013-03-09T23:30:00'/>
|
<req xmlns='urn:xmpp:iot:sensordata' seqnr='8' all='true' when='2013-03-09T23:30:00'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='device@example.org'
|
from='device@example.org'
|
||||||
to='client@example.org/amr'
|
to='client@example.org/amr'
|
||||||
id='S0007'>
|
id='S0007'>
|
||||||
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='8' queued='true'/>
|
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='8' queued='true'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='client@example.org/amr'
|
from='client@example.org/amr'
|
||||||
to='device@example.org'
|
to='device@example.org'
|
||||||
id='S0008'>
|
id='S0008'>
|
||||||
<cancel xmlns='urn:xmpp:iot:sensordata' seqnr='8'/>
|
<cancel xmlns='urn:xmpp:iot:sensordata' seqnr='8'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='device@example.org'
|
from='device@example.org'
|
||||||
to='client@example.org/amr'
|
to='client@example.org/amr'
|
||||||
id='S0008'>
|
id='S0008'>
|
||||||
<cancelled xmlns='urn:xmpp:iot:sensordata' seqnr='8'/>
|
<cancelled xmlns='urn:xmpp:iot:sensordata' seqnr='8'/>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
</section2>
|
</section2>
|
||||||
</section1>
|
</section1>
|
||||||
@ -1246,21 +1246,21 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Localized field names'>
|
<example caption='Localized field names'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='client@example.org/amr'
|
from='client@example.org/amr'
|
||||||
to='device@example.org'
|
to='device@example.org'
|
||||||
id='S0009'>
|
id='S0009'>
|
||||||
<req xmlns='urn:xmpp:iot:sensordata' seqnr='7' all='true'/>
|
<req xmlns='urn:xmpp:iot:sensordata' seqnr='7' all='true'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='device@example.org'
|
from='device@example.org'
|
||||||
to='client@example.org/amr'
|
to='client@example.org/amr'
|
||||||
id='S0009'>
|
id='S0009'>
|
||||||
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='7'/>
|
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='7'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<message from='device@example.org'
|
<message from='device@example.org'
|
||||||
to='client@example.org/amr'>
|
to='client@example.org/amr'>
|
||||||
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='7' done='true'>
|
<fields xmlns='urn:xmpp:iot:sensordata' seqnr='7' done='true'>
|
||||||
<node nodeId='Device05'>
|
<node nodeId='Device05'>
|
||||||
@ -1276,7 +1276,7 @@
|
|||||||
</timestamp>
|
</timestamp>
|
||||||
</node>
|
</node>
|
||||||
</fields>
|
</fields>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
The above example defines a language module called <strong>Watchamacallit</strong>. In this language module it defines four strings, with IDs 1-4. A system might store these as follows,
|
The above example defines a language module called <strong>Watchamacallit</strong>. In this language module it defines four strings, with IDs 1-4. A system might store these as follows,
|
||||||
|
278
xep-0324.xml
278
xep-0324.xml
@ -1,7 +1,7 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8'?>
|
<?xml version='1.0' encoding='UTF-8'?>
|
||||||
<!DOCTYPE xep SYSTEM 'xep.dtd' [
|
<!DOCTYPE xep SYSTEM 'xep.dtd' [
|
||||||
<!ENTITY % ents SYSTEM 'xep.ent'>
|
<!ENTITY % ents SYSTEM 'xep.ent'>
|
||||||
%ents;
|
%ents;
|
||||||
]>
|
]>
|
||||||
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
|
<?xml-stylesheet type='text/xsl' href='xep.xsl'?>
|
||||||
<xep>
|
<xep>
|
||||||
@ -467,48 +467,48 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption="Checking if server supports components">
|
<example caption="Checking if server supports components">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq from='device@example.org/device' to='example.org' type='get' id='1'>
|
<iq from='device@example.org/device' to='example.org' type='get' id='1'>
|
||||||
<query xmlns="http://jabber.org/protocol/disco#info"/>
|
<query xmlns="http://jabber.org/protocol/disco#info"/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type="result" id="1" from="example.org" to="device@example.org/device">
|
<iq type="result" id="1" from="example.org" to="device@example.org/device">
|
||||||
<query xmlns="http://jabber.org/protocol/disco#info">
|
<query xmlns="http://jabber.org/protocol/disco#info">
|
||||||
...
|
...
|
||||||
<feature var="http://jabber.org/protocol/disco#items"/>
|
<feature var="http://jabber.org/protocol/disco#items"/>
|
||||||
...
|
...
|
||||||
</query>
|
</query>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
If components (items) are supported, a request for available components is made:
|
If components (items) are supported, a request for available components is made:
|
||||||
</p>
|
</p>
|
||||||
<example caption="Requesting list of server components">
|
<example caption="Requesting list of server components">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq from='device@example.org/device' to='example.org' type='get' id='2'>
|
<iq from='device@example.org/device' to='example.org' type='get' id='2'>
|
||||||
<query xmlns="http://jabber.org/protocol/disco#items"/>
|
<query xmlns="http://jabber.org/protocol/disco#items"/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type="result" id="2" from="example.org" to="995fab3dd759452ca9c370647323af0c@example.org/ebe2348e">
|
<iq type="result" id="2" from="example.org" to="995fab3dd759452ca9c370647323af0c@example.org/ebe2348e">
|
||||||
<query xmlns="http://jabber.org/protocol/disco#items">
|
<query xmlns="http://jabber.org/protocol/disco#items">
|
||||||
...
|
...
|
||||||
<item jid="provisioning.example.org" name="Provisioning"/>
|
<item jid="provisioning.example.org" name="Provisioning"/>
|
||||||
...
|
...
|
||||||
</query>
|
</query>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
The client then loops through all components (items) and checks what features they support, until a Provisioning Server is found:
|
The client then loops through all components (items) and checks what features they support, until a Provisioning Server is found:
|
||||||
</p>
|
</p>
|
||||||
<example caption="Service discovery information request made to each component">
|
<example caption="Service discovery information request made to each component">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='device@example.org/device'
|
from='device@example.org/device'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='3'>
|
id='3'>
|
||||||
<query xmlns='http://jabber.org/protocol/disco#info'/>
|
<query xmlns='http://jabber.org/protocol/disco#info'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org/device'
|
to='device@example.org/device'
|
||||||
id='3'>
|
id='3'>
|
||||||
@ -517,7 +517,7 @@
|
|||||||
<feature var='urn:xmpp:iot:provisioning'/>
|
<feature var='urn:xmpp:iot:provisioning'/>
|
||||||
...
|
...
|
||||||
</query>
|
</query>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic="Tokens and X.509 Certificates" anchor="tokenscertificats">
|
<section3 topic="Tokens and X.509 Certificates" anchor="tokenscertificats">
|
||||||
@ -550,33 +550,33 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Requesting a token'>
|
<example caption='Requesting a token'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='device@example.org/device'
|
from='device@example.org/device'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='4'>
|
id='4'>
|
||||||
<getToken xmlns='urn:xmpp:iot:provisioning'>BASE-64 ENCODED PUBLIC X.509 CERTIFICATE</getToken>
|
<getToken xmlns='urn:xmpp:iot:provisioning'>BASE-64 ENCODED PUBLIC X.509 CERTIFICATE</getToken>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org/device'
|
to='device@example.org/device'
|
||||||
id='4'>
|
id='4'>
|
||||||
<getTokenChallenge xmlns='urn:xmpp:iot:provisioning' seqnr='1'>BASE-64 ENCODED CHALLENGE</getTokenChallenge>
|
<getTokenChallenge xmlns='urn:xmpp:iot:provisioning' seqnr='1'>BASE-64 ENCODED CHALLENGE</getTokenChallenge>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='device@example.org/device'
|
from='device@example.org/device'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='5'>
|
id='5'>
|
||||||
<getTokenChallengeResponse xmlns='urn:xmpp:iot:provisioning' seqnr='1'>BASE-64 ENCODED RESPONSE</getTokenChallengeResponse>
|
<getTokenChallengeResponse xmlns='urn:xmpp:iot:provisioning' seqnr='1'>BASE-64 ENCODED RESPONSE</getTokenChallengeResponse>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org/device'
|
to='device@example.org/device'
|
||||||
id='5'>
|
id='5'>
|
||||||
<getTokenResponse xmlns='urn:xmpp:iot:provisioning' token='TOKEN'/>
|
<getTokenResponse xmlns='urn:xmpp:iot:provisioning' token='TOKEN'/>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
The <strong>getToken</strong> element contains the base-64 encoded public version of the certificate that is used to identify the device or service. The server
|
The <strong>getToken</strong> element contains the base-64 encoded public version of the certificate that is used to identify the device or service. The server
|
||||||
@ -592,28 +592,28 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Challenge reponse incorrect'>
|
<example caption='Challenge reponse incorrect'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org/device'
|
to='device@example.org/device'
|
||||||
id='5'>
|
id='5'>
|
||||||
<error type='modify'>
|
<error type='modify'>
|
||||||
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
||||||
</error>
|
</error>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
If the sequence number identifying the challenge is not found on the server, the server returns a <strong>item-not-found</strong> error result, as is shown below.
|
If the sequence number identifying the challenge is not found on the server, the server returns a <strong>item-not-found</strong> error result, as is shown below.
|
||||||
</p>
|
</p>
|
||||||
<example caption='Challenge sequence number not found'>
|
<example caption='Challenge sequence number not found'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org/device'
|
to='device@example.org/device'
|
||||||
id='5'>
|
id='5'>
|
||||||
<error type='cancel'>
|
<error type='cancel'>
|
||||||
<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
<item-not-found xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
||||||
</error>
|
</error>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
The server must retain the challenge in memory for at least one minute before assuming the challenge will go unresponded.
|
The server must retain the challenge in memory for at least one minute before assuming the challenge will go unresponded.
|
||||||
@ -639,19 +639,19 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Requesting a token'>
|
<example caption='Requesting a token'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org/device'
|
to='device@example.org/device'
|
||||||
id='6'>
|
id='6'>
|
||||||
<tokenChallenge xmlns='urn:xmpp:iot:provisioning' token='TOKEN'>BASE-64 encoded challenge</tokenChallenge>
|
<tokenChallenge xmlns='urn:xmpp:iot:provisioning' token='TOKEN'>BASE-64 encoded challenge</tokenChallenge>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='device@example.org/device'
|
from='device@example.org/device'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='6'>
|
id='6'>
|
||||||
<tokenChallengeResponse xmlns='urn:xmpp:iot:provisioning'>BASE-64 encoded response</tokenChallengeResponse>
|
<tokenChallengeResponse xmlns='urn:xmpp:iot:provisioning'>BASE-64 encoded response</tokenChallengeResponse>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
<strong>Note:</strong> It is important that a unit only responds to a <strong>tokenChallenge</strong> request from a JID to which the corresponding token
|
<strong>Note:</strong> It is important that a unit only responds to a <strong>tokenChallenge</strong> request from a JID to which the corresponding token
|
||||||
@ -659,14 +659,14 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Invalid token challenge'>
|
<example caption='Invalid token challenge'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='error'
|
<iq type='error'
|
||||||
from='device@example.org/device'
|
from='device@example.org/device'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='6'>
|
id='6'>
|
||||||
<error type='cancel'>
|
<error type='cancel'>
|
||||||
<forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
<forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
||||||
</error>
|
</error>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
</section4>
|
</section4>
|
||||||
</section3>
|
</section3>
|
||||||
@ -695,33 +695,33 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Readout request using multiple tokens'>
|
<example caption='Readout request using multiple tokens'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='device@example.org'
|
to='device@example.org'
|
||||||
id='7'>
|
id='7'>
|
||||||
<req xmlns='urn:xmpp:iot:sensordata' momentary='true' serviceToken='SERVICETOKEN1 SERVICETOKEN2' userToken='USERTOKEN1' seqnr='4'/>
|
<req xmlns='urn:xmpp:iot:sensordata' momentary='true' serviceToken='SERVICETOKEN1 SERVICETOKEN2' userToken='USERTOKEN1' seqnr='4'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='device@example.org/device'
|
from='device@example.org/device'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='8'>
|
id='8'>
|
||||||
<canRead xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' serviceToken='SERVICETOKEN1 SERVICETOKEN2' userToken='USERTOKEN1' momentary='true'/>
|
<canRead xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' serviceToken='SERVICETOKEN1 SERVICETOKEN2' userToken='USERTOKEN1' momentary='true'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org/device'
|
to='device@example.org/device'
|
||||||
id='8'>
|
id='8'>
|
||||||
<canReadResponse xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' momentary='true' result='true'/>
|
<canReadResponse xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' momentary='true' result='true'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='device@example.org'
|
from='device@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='7'>
|
id='7'>
|
||||||
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='4'/>
|
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='4'/>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<p>
|
<p>
|
||||||
@ -741,19 +741,19 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Friendship request accepted'>
|
<example caption='Friendship request accepted'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='device@example.org/device'
|
from='device@example.org/device'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='9'>
|
id='9'>
|
||||||
<isFriend xmlns='urn:xmpp:iot:provisioning' jid='client1@example.org'/>
|
<isFriend xmlns='urn:xmpp:iot:provisioning' jid='client1@example.org'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org/device'
|
to='device@example.org/device'
|
||||||
id='9'>
|
id='9'>
|
||||||
<isFriendResponse xmlns='urn:xmpp:iot:provisioning' jid='client1@example.org' result='true'/>
|
<isFriendResponse xmlns='urn:xmpp:iot:provisioning' jid='client1@example.org' result='true'/>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
<strong>Note:</strong> The provisioning server implicitly understands which two JIDs that are to be checked: The first one is the sender of the message, the second one
|
<strong>Note:</strong> The provisioning server implicitly understands which two JIDs that are to be checked: The first one is the sender of the message, the second one
|
||||||
@ -775,19 +775,19 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Friendship request rejected'>
|
<example caption='Friendship request rejected'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='device@example.org/device'
|
from='device@example.org/device'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='10'>
|
id='10'>
|
||||||
<isFriend xmlns='urn:xmpp:iot:provisioning' jid='client2@example.org'/>
|
<isFriend xmlns='urn:xmpp:iot:provisioning' jid='client2@example.org'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org/device'
|
to='device@example.org/device'
|
||||||
id='10'>
|
id='10'>
|
||||||
<isFriendResponse xmlns='urn:xmpp:iot:provisioning' jid='client2@example.org' result='false'/>
|
<isFriendResponse xmlns='urn:xmpp:iot:provisioning' jid='client2@example.org' result='false'/>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Unfriending existing friends' anchor='unfriendingexistingfriends'>
|
<section3 topic='Unfriending existing friends' anchor='unfriendingexistingfriends'>
|
||||||
@ -808,10 +808,10 @@
|
|||||||
|
|
||||||
<example caption='Unfriending existing friend'>
|
<example caption='Unfriending existing friend'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='provisioning.example.org'
|
<message from='provisioning.example.org'
|
||||||
to='device@example.org'>
|
to='device@example.org'>
|
||||||
<unfriend xmlns='urn:xmpp:iot:provisioning' jid='client2@example.org'/>
|
<unfriend xmlns='urn:xmpp:iot:provisioning' jid='client2@example.org'/>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Recommending friendships' anchor='recommendingfriendships'>
|
<section3 topic='Recommending friendships' anchor='recommendingfriendships'>
|
||||||
@ -824,10 +824,10 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Recommending friendships'>
|
<example caption='Recommending friendships'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='provisioning.example.org'
|
<message from='provisioning.example.org'
|
||||||
to='device@example.org'>
|
to='device@example.org'>
|
||||||
<friend xmlns='urn:xmpp:iot:provisioning' jid='client2@example.org'/>
|
<friend xmlns='urn:xmpp:iot:provisioning' jid='client2@example.org'/>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
Note that the receptor can still ask the provisioning server if it can form a friendship with the suggested friend, using the <strong>isFriend</strong> command.
|
Note that the receptor can still ask the provisioning server if it can form a friendship with the suggested friend, using the <strong>isFriend</strong> command.
|
||||||
@ -852,35 +852,35 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Rejecting read-outs'>
|
<example caption='Rejecting read-outs'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='device@example.org'
|
to='device@example.org'
|
||||||
id='11'>
|
id='11'>
|
||||||
<req xmlns='urn:xmpp:iot:sensordata' momentary='true' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1' seqnr='1'/>
|
<req xmlns='urn:xmpp:iot:sensordata' momentary='true' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1' seqnr='1'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='device@example.org/device'
|
from='device@example.org/device'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='12'>
|
id='12'>
|
||||||
<canRead xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1' momentary='true'/>
|
<canRead xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1' momentary='true'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org/device'
|
to='device@example.org/device'
|
||||||
id='12'>
|
id='12'>
|
||||||
<canReadResponse xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' momentary='true' result='false'/>
|
<canReadResponse xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' momentary='true' result='false'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='error'
|
<iq type='error'
|
||||||
from='device@example.org'
|
from='device@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='11'>
|
id='11'>
|
||||||
<rejected xmlns='urn:xmpp:iot:sensordata' seqnr='1'>
|
<rejected xmlns='urn:xmpp:iot:sensordata' seqnr='1'>
|
||||||
<error>Access denied.</error>
|
<error>Access denied.</error>
|
||||||
</rejected>
|
</rejected>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Restricting nodes during read-out' anchor='restrictingnodes'>
|
<section3 topic='Restricting nodes during read-out' anchor='restrictingnodes'>
|
||||||
@ -905,7 +905,7 @@
|
|||||||
|
|
||||||
<example caption='Restricting nodes during read-out'>
|
<example caption='Restricting nodes during read-out'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='device@example.org'
|
to='device@example.org'
|
||||||
id='13'>
|
id='13'>
|
||||||
@ -913,9 +913,9 @@
|
|||||||
<node nodeId='Device02'/>
|
<node nodeId='Device02'/>
|
||||||
<node nodeId='Device03'/>
|
<node nodeId='Device03'/>
|
||||||
</req>
|
</req>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='device@example.org/device'
|
from='device@example.org/device'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='14'>
|
id='14'>
|
||||||
@ -923,23 +923,23 @@
|
|||||||
<node nodeId='Device02'/>
|
<node nodeId='Device02'/>
|
||||||
<node nodeId='Device03'/>
|
<node nodeId='Device03'/>
|
||||||
</canRead>
|
</canRead>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org/device'
|
to='device@example.org/device'
|
||||||
id='14'>
|
id='14'>
|
||||||
<canReadResponse xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' momentary='true' result='true'>
|
<canReadResponse xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' momentary='true' result='true'>
|
||||||
<node nodeId='Device02'/>
|
<node nodeId='Device02'/>
|
||||||
</canReadResponse>
|
</canReadResponse>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='device@example.org'
|
from='device@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='13'>
|
id='13'>
|
||||||
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='2'/>
|
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='2'/>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
Note that the provisioning server responds with a <strong>canReadResponse</strong> element, similar to the <strong>canRead</strong> element in the request, except
|
Note that the provisioning server responds with a <strong>canReadResponse</strong> element, similar to the <strong>canRead</strong> element in the request, except
|
||||||
@ -965,21 +965,21 @@
|
|||||||
|
|
||||||
<example caption='Restricting fields during read-out'>
|
<example caption='Restricting fields during read-out'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='device@example.org'
|
to='device@example.org'
|
||||||
id='15'>
|
id='15'>
|
||||||
<req xmlns='urn:xmpp:iot:sensordata' momentary='true' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1' seqnr='3'/>
|
<req xmlns='urn:xmpp:iot:sensordata' momentary='true' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1' seqnr='3'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='device@example.org/device'
|
from='device@example.org/device'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='16'>
|
id='16'>
|
||||||
<canRead xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' momentary='true' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1'/>
|
<canRead xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' momentary='true' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org/device'
|
to='device@example.org/device'
|
||||||
id='16'>
|
id='16'>
|
||||||
@ -987,14 +987,14 @@
|
|||||||
<field name='Energy'/>
|
<field name='Energy'/>
|
||||||
<field name='Power'/>
|
<field name='Power'/>
|
||||||
</canReadResponse>
|
</canReadResponse>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='device@example.org'
|
from='device@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='15'>
|
id='15'>
|
||||||
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='3'/>
|
<accepted xmlns='urn:xmpp:iot:sensordata' seqnr='3'/>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
Note that the provisioning server responds with a <strong>canReadResponse</strong> element, similar to the <strong>canRead</strong> element in the request, except only
|
Note that the provisioning server responds with a <strong>canReadResponse</strong> element, similar to the <strong>canRead</strong> element in the request, except only
|
||||||
@ -1021,37 +1021,37 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Rejecting control action'>
|
<example caption='Rejecting control action'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='set'
|
<iq type='set'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='device@example.org'
|
to='device@example.org'
|
||||||
id='17'>
|
id='17'>
|
||||||
<set xmlns='urn:xmpp:iot:control' xml:lang='en'>
|
<set xmlns='urn:xmpp:iot:control' xml:lang='en'>
|
||||||
<boolean name='Output' value='true'/>
|
<boolean name='Output' value='true'/>
|
||||||
</set>
|
</set>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='device@example.org/device'
|
from='device@example.org/device'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='18'>
|
id='18'>
|
||||||
<canControl xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1'>
|
<canControl xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1'>
|
||||||
<parameter name='Output'/>
|
<parameter name='Output'/>
|
||||||
</canControl>
|
</canControl>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org/device'
|
to='device@example.org/device'
|
||||||
id='18'>
|
id='18'>
|
||||||
<canControlResponse xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' result='false'/>
|
<canControlResponse xmlns='urn:xmpp:iot:provisioning' jid='master@example.org' result='false'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='error'
|
<iq type='error'
|
||||||
from='device@example.org'
|
from='device@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='17'>
|
id='17'>
|
||||||
<setResponse xmlns='urn:xmpp:iot:control' responseCode='InsufficientPrivileges'/>
|
<setResponse xmlns='urn:xmpp:iot:control' responseCode='InsufficientPrivileges'/>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Restricting nodes during control' anchor='restrictingnodescontrol'>
|
<section3 topic='Restricting nodes during control' anchor='restrictingnodescontrol'>
|
||||||
@ -1073,7 +1073,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Restricting nodes during control'>
|
<example caption='Restricting nodes during control'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='set'
|
<iq type='set'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='concentrator@example.org'
|
to='concentrator@example.org'
|
||||||
id='19'>
|
id='19'>
|
||||||
@ -1084,9 +1084,9 @@
|
|||||||
<node nodeId='DigitalOutput4'/>
|
<node nodeId='DigitalOutput4'/>
|
||||||
<boolean name='Output' value='true'/>
|
<boolean name='Output' value='true'/>
|
||||||
</set>
|
</set>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='concentrator@example.org/plc'
|
from='concentrator@example.org/plc'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='20'>
|
id='20'>
|
||||||
@ -1097,9 +1097,9 @@
|
|||||||
<node nodeId='DigitalOutput4'/>
|
<node nodeId='DigitalOutput4'/>
|
||||||
<parameter name='Output'/>
|
<parameter name='Output'/>
|
||||||
</canControl>
|
</canControl>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='concentrator@example.org/plc'
|
to='concentrator@example.org/plc'
|
||||||
id='20'>
|
id='20'>
|
||||||
@ -1107,9 +1107,9 @@
|
|||||||
<node nodeId='DigitalOutput2'/>
|
<node nodeId='DigitalOutput2'/>
|
||||||
<node nodeId='DigitalOutput3'/>
|
<node nodeId='DigitalOutput3'/>
|
||||||
</canControlResponse>
|
</canControlResponse>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='concentrator@example.org'
|
from='concentrator@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='19'>
|
id='19'>
|
||||||
@ -1117,7 +1117,7 @@
|
|||||||
<node nodeId='DigitalOutput2'/>
|
<node nodeId='DigitalOutput2'/>
|
||||||
<node nodeId='DigitalOutput3'/>
|
<node nodeId='DigitalOutput3'/>
|
||||||
</setResponse>
|
</setResponse>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
Note that the provisioning server responds with a <strong>canControlResponse</strong> element, similar to the <strong>canControl</strong> element in the request, except
|
Note that the provisioning server responds with a <strong>canControlResponse</strong> element, similar to the <strong>canControl</strong> element in the request, except
|
||||||
@ -1148,7 +1148,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Restricting parameters during control'>
|
<example caption='Restricting parameters during control'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='set'
|
<iq type='set'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='plc@example.org'
|
to='plc@example.org'
|
||||||
id='21'>
|
id='21'>
|
||||||
@ -1162,9 +1162,9 @@
|
|||||||
<int name='AnalogOutput3' value='65535'/>
|
<int name='AnalogOutput3' value='65535'/>
|
||||||
<int name='AnalogOutput4' value='65535'/>
|
<int name='AnalogOutput4' value='65535'/>
|
||||||
</set>
|
</set>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='plc@example.org/plc'
|
from='plc@example.org/plc'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='22'>
|
id='22'>
|
||||||
@ -1178,9 +1178,9 @@
|
|||||||
<parameter name='AnalogOutput3'/>
|
<parameter name='AnalogOutput3'/>
|
||||||
<parameter name='AnalogOutput4'/>
|
<parameter name='AnalogOutput4'/>
|
||||||
</canControl>
|
</canControl>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='plc@example.org/plc'
|
to='plc@example.org/plc'
|
||||||
id='22'>
|
id='22'>
|
||||||
@ -1190,9 +1190,9 @@
|
|||||||
<parameter name='DigitalOutput3'/>
|
<parameter name='DigitalOutput3'/>
|
||||||
<parameter name='DigitalOutput4'/>
|
<parameter name='DigitalOutput4'/>
|
||||||
</canControlResponse>
|
</canControlResponse>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='plc@example.org'
|
from='plc@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='21'>
|
id='21'>
|
||||||
@ -1202,7 +1202,7 @@
|
|||||||
<parameter name='DigitalOutput3'/>
|
<parameter name='DigitalOutput3'/>
|
||||||
<parameter name='DigitalOutput4'/>
|
<parameter name='DigitalOutput4'/>
|
||||||
</setResponse>
|
</setResponse>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
Note that the provisioning server responds with a <strong>canControlResponse</strong> element, similar to the <strong>canControl</strong> element in the request, except only
|
Note that the provisioning server responds with a <strong>canControlResponse</strong> element, similar to the <strong>canControl</strong> element in the request, except only
|
||||||
@ -1231,19 +1231,19 @@
|
|||||||
|
|
||||||
<example caption='Clear cache'>
|
<example caption='Clear cache'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='set'
|
<iq type='set'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org'
|
to='device@example.org'
|
||||||
id='23'>
|
id='23'>
|
||||||
<clearCache xmlns='urn:xmpp:iot:provisioning'/>
|
<clearCache xmlns='urn:xmpp:iot:provisioning'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='device@example.org'
|
from='device@example.org'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='23'>
|
id='23'>
|
||||||
<clearCacheResponse xmlns='urn:xmpp:iot:provisioning'/>
|
<clearCacheResponse xmlns='urn:xmpp:iot:provisioning'/>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
</section2>
|
</section2>
|
||||||
@ -1255,33 +1255,33 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Requesting a service token'>
|
<example caption='Requesting a service token'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='device@example.org/device'
|
from='device@example.org/device'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='24'>
|
id='24'>
|
||||||
<getToken xmlns='urn:xmpp:iot:provisioning'>BASE-64 ENCODED PUBLIC X.509 CERTIFICATE</getToken>
|
<getToken xmlns='urn:xmpp:iot:provisioning'>BASE-64 ENCODED PUBLIC X.509 CERTIFICATE</getToken>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org/device'
|
to='device@example.org/device'
|
||||||
id='24'>
|
id='24'>
|
||||||
<getTokenChallenge xmlns='urn:xmpp:iot:provisioning' seqnr='1'>BASE-64 ENCODED CHALLENGE</getTokenChallenge>
|
<getTokenChallenge xmlns='urn:xmpp:iot:provisioning' seqnr='1'>BASE-64 ENCODED CHALLENGE</getTokenChallenge>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='device@example.org/device'
|
from='device@example.org/device'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='25'>
|
id='25'>
|
||||||
<getTokenChallengeResponse xmlns='urn:xmpp:iot:provisioning' seqnr='1'>BASE-64 ENCODED RESPONSE</getTokenChallengeResponse>
|
<getTokenChallengeResponse xmlns='urn:xmpp:iot:provisioning' seqnr='1'>BASE-64 ENCODED RESPONSE</getTokenChallengeResponse>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='device@example.org/device'
|
to='device@example.org/device'
|
||||||
id='25'>
|
id='25'>
|
||||||
<getTokenResponse xmlns='urn:xmpp:iot:provisioning' token='TOKEN'/>
|
<getTokenResponse xmlns='urn:xmpp:iot:provisioning' token='TOKEN'/>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='User access to service' anchor='usertoken'>
|
<section3 topic='User access to service' anchor='usertoken'>
|
||||||
@ -1373,9 +1373,9 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='User access to service'>
|
<example caption='User access to service'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<!-- user connects to service -->
|
<!-- user connects to service -->
|
||||||
|
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='service@example.org/service'
|
from='service@example.org/service'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='26'>
|
id='26'>
|
||||||
@ -1384,23 +1384,23 @@
|
|||||||
<credentials type='Longitude' value='123.45'/>
|
<credentials type='Longitude' value='123.45'/>
|
||||||
<credentials type='Latitude' value='67.89'/>
|
<credentials type='Latitude' value='67.89'/>
|
||||||
</canAccess>
|
</canAccess>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='service@example.org/service'
|
to='service@example.org/service'
|
||||||
id='26'>
|
id='26'>
|
||||||
<canAccessResponse xmlns='urn:xmpp:iot:provisioning' userToken='USERTOKEN1' result='true'/>
|
<canAccessResponse xmlns='urn:xmpp:iot:provisioning' userToken='USERTOKEN1' result='true'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<!-- user performs login into service -->
|
<!-- user performs login into service -->
|
||||||
|
|
||||||
<message from='service@example.org/service'
|
<message from='service@example.org/service'
|
||||||
to='provisioning.example.org'>
|
to='provisioning.example.org'>
|
||||||
<userLoggedIn xmlns='urn:xmpp:iot:provisioning' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1' userName='Kermit' />
|
<userLoggedIn xmlns='urn:xmpp:iot:provisioning' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1' userName='Kermit' />
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<!-- user continues interacting with service -->]]>
|
<!-- user continues interacting with service -->]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
</section2>
|
</section2>
|
||||||
@ -1471,23 +1471,23 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='User privileges in service'>
|
<example caption='User privileges in service'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<!-- user wants to perform action -->
|
<!-- user wants to perform action -->
|
||||||
|
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='service@example.org/service'
|
from='service@example.org/service'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='27'>
|
id='27'>
|
||||||
<hasPrivilege xmlns='urn:xmpp:iot:provisioning' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1' privilegeId='Sensors.View'/>
|
<hasPrivilege xmlns='urn:xmpp:iot:provisioning' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1' privilegeId='Sensors.View'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='service@example.org/service'
|
to='service@example.org/service'
|
||||||
id='27'>
|
id='27'>
|
||||||
<hasPrivilegeResponse xmlns='urn:xmpp:iot:provisioning' result='true'/>
|
<hasPrivilegeResponse xmlns='urn:xmpp:iot:provisioning' result='true'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<!-- user performs action -->]]>
|
<!-- user performs action -->]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Download all user privileges' anchor='downloadall'>
|
<section3 topic='Download all user privileges' anchor='downloadall'>
|
||||||
@ -1505,9 +1505,9 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Download all user privileges'>
|
<example caption='Download all user privileges'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<!-- user connects to service -->
|
<!-- user connects to service -->
|
||||||
|
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='service@example.org/service'
|
from='service@example.org/service'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='28'>
|
id='28'>
|
||||||
@ -1516,30 +1516,30 @@
|
|||||||
<credentials type='Longitude' value='123.45'/>
|
<credentials type='Longitude' value='123.45'/>
|
||||||
<credentials type='Latitude' value='67.89'/>
|
<credentials type='Latitude' value='67.89'/>
|
||||||
</canAccess>
|
</canAccess>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='service@example.org/service'
|
to='service@example.org/service'
|
||||||
id='28'>
|
id='28'>
|
||||||
<canAccessResponse xmlns='urn:xmpp:iot:provisioning' userToken='USERTOKEN1' result='true'/>
|
<canAccessResponse xmlns='urn:xmpp:iot:provisioning' userToken='USERTOKEN1' result='true'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<!-- user performs login into service -->
|
<!-- user performs login into service -->
|
||||||
|
|
||||||
<message from='service@example.org/service'
|
<message from='service@example.org/service'
|
||||||
to='provisioning.example.org'>
|
to='provisioning.example.org'>
|
||||||
<userLoggedIn xmlns='urn:xmpp:iot:provisioning' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1' userName='Kermit' />
|
<userLoggedIn xmlns='urn:xmpp:iot:provisioning' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1' userName='Kermit' />
|
||||||
</message>
|
</message>
|
||||||
|
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='service@example.org/service'
|
from='service@example.org/service'
|
||||||
to='provisioning.example.org'
|
to='provisioning.example.org'
|
||||||
id='29'>
|
id='29'>
|
||||||
<downloadPrivileges xmlns='urn:xmpp:iot:provisioning' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1'/>
|
<downloadPrivileges xmlns='urn:xmpp:iot:provisioning' serviceToken='SERVICETOKEN1' userToken='USERTOKEN1'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='provisioning.example.org'
|
from='provisioning.example.org'
|
||||||
to='service@example.org/service'
|
to='service@example.org/service'
|
||||||
id='29'>
|
id='29'>
|
||||||
@ -1547,9 +1547,9 @@
|
|||||||
<exclude id='Sensors.Delete'/>
|
<exclude id='Sensors.Delete'/>
|
||||||
<include id='Sensors'/>
|
<include id='Sensors'/>
|
||||||
</downloadPrivilegesResponse>
|
</downloadPrivilegesResponse>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<!-- user performs actions without interaction with the provisioning server -->]]>
|
<!-- user performs actions without interaction with the provisioning server -->]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
<strong>Note:</strong> If the user or service has not been correctly identified, logged in, etc., the resulting list must only include privileges
|
<strong>Note:</strong> If the user or service has not been correctly identified, logged in, etc., the resulting list must only include privileges
|
||||||
|
152
xep-0325.xml
152
xep-0325.xml
@ -337,12 +337,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Message stanza for setting a value'>
|
<example caption='Message stanza for setting a value'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='master@example.org/amr'
|
<message from='master@example.org/amr'
|
||||||
to='digital.output@example.org'>
|
to='digital.output@example.org'>
|
||||||
<set xmlns='urn:xmpp:iot:control'>
|
<set xmlns='urn:xmpp:iot:control'>
|
||||||
<boolean name='Output' value='true'/>
|
<boolean name='Output' value='true'/>
|
||||||
</set>
|
</set>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
Note that any response is supressed when sending a message stanza, regardless if the desired control command could be executed or not. The following example shows how the same
|
Note that any response is supressed when sending a message stanza, regardless if the desired control command could be executed or not. The following example shows how the same
|
||||||
@ -355,21 +355,21 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='IQ stanza for setting a value'>
|
<example caption='IQ stanza for setting a value'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='set'
|
<iq type='set'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='digital.output@example.org'
|
to='digital.output@example.org'
|
||||||
id='1'>
|
id='1'>
|
||||||
<set xmlns='urn:xmpp:iot:control' xml:lang='en'>
|
<set xmlns='urn:xmpp:iot:control' xml:lang='en'>
|
||||||
<boolean name='Output' value='true'/>
|
<boolean name='Output' value='true'/>
|
||||||
</set>
|
</set>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='digital.output@example.org'
|
from='digital.output@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='1'>
|
id='1'>
|
||||||
<setResponse xmlns='urn:xmpp:iot:control'/>
|
<setResponse xmlns='urn:xmpp:iot:control'/>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
<strong>Note:</strong> An empty <strong>setResponse</strong> element means that the control command was executed as provided in the request. Sometimes, the device
|
<strong>Note:</strong> An empty <strong>setResponse</strong> element means that the control command was executed as provided in the request. Sometimes, the device
|
||||||
@ -387,16 +387,16 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Control failure response'>
|
<example caption='Control failure response'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='set'
|
<iq type='set'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='analog.output@example.org'
|
to='analog.output@example.org'
|
||||||
id='2'>
|
id='2'>
|
||||||
<set xmlns='urn:xmpp:iot:control' xml:lang='en'>
|
<set xmlns='urn:xmpp:iot:control' xml:lang='en'>
|
||||||
<boolean name='Output' value='true'/>
|
<boolean name='Output' value='true'/>
|
||||||
</set>
|
</set>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='error'
|
<iq type='error'
|
||||||
from='analog.output@example.org'
|
from='analog.output@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='2'>
|
id='2'>
|
||||||
@ -404,7 +404,7 @@
|
|||||||
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
||||||
<paramError xmlns='urn:xmpp:iot:control' var='Output'>Invalid parameter type.</error>
|
<paramError xmlns='urn:xmpp:iot:control' var='Output'>Invalid parameter type.</error>
|
||||||
</error>
|
</error>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
Here, the <strong>paramError</strong> element is used in the IQ Error response, to provide error information related to a specific control parameter.
|
Here, the <strong>paramError</strong> element is used in the IQ Error response, to provide error information related to a specific control parameter.
|
||||||
@ -422,12 +422,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Setting a single boolean-valued control parameter'>
|
<example caption='Setting a single boolean-valued control parameter'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='master@example.org/amr'
|
<message from='master@example.org/amr'
|
||||||
to='digital.output@example.org'>
|
to='digital.output@example.org'>
|
||||||
<set xmlns='urn:xmpp:iot:control'>
|
<set xmlns='urn:xmpp:iot:control'>
|
||||||
<boolean name='Output' value='true'/>
|
<boolean name='Output' value='true'/>
|
||||||
</set>
|
</set>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Setting a single 32-bit integer-valued control parameter'>
|
<section3 topic='Setting a single 32-bit integer-valued control parameter'>
|
||||||
@ -437,12 +437,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Setting a single 32-bit integer-valued control parameter'>
|
<example caption='Setting a single 32-bit integer-valued control parameter'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='master@example.org/amr'
|
<message from='master@example.org/amr'
|
||||||
to='analog.output@example.org'>
|
to='analog.output@example.org'>
|
||||||
<set xmlns='urn:xmpp:iot:control'>
|
<set xmlns='urn:xmpp:iot:control'>
|
||||||
<int name='Output' value='50000'/>
|
<int name='Output' value='50000'/>
|
||||||
</set>
|
</set>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Setting a single 64-bit integer-valued control parameter'>
|
<section3 topic='Setting a single 64-bit integer-valued control parameter'>
|
||||||
@ -453,12 +453,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Setting a single 64-bit integer-valued control parameter'>
|
<example caption='Setting a single 64-bit integer-valued control parameter'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='master@example.org/amr'
|
<message from='master@example.org/amr'
|
||||||
to='megaprecision.analog.output@example.org'>
|
to='megaprecision.analog.output@example.org'>
|
||||||
<set xmlns='urn:xmpp:iot:control'>
|
<set xmlns='urn:xmpp:iot:control'>
|
||||||
<long name='Output' value='500000000000000'/>
|
<long name='Output' value='500000000000000'/>
|
||||||
</set>
|
</set>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Setting a single string-valued control parameter'>
|
<section3 topic='Setting a single string-valued control parameter'>
|
||||||
@ -468,12 +468,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Setting a single string-valued control parameter'>
|
<example caption='Setting a single string-valued control parameter'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='master@example.org/amr'
|
<message from='master@example.org/amr'
|
||||||
to='text.display@example.org'>
|
to='text.display@example.org'>
|
||||||
<set xmlns='urn:xmpp:iot:control'>
|
<set xmlns='urn:xmpp:iot:control'>
|
||||||
<string name='Row1' value='Temperature: 21.4 °C'/>
|
<string name='Row1' value='Temperature: 21.4 °C'/>
|
||||||
</set>
|
</set>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Setting a single double-valued control parameter'>
|
<section3 topic='Setting a single double-valued control parameter'>
|
||||||
@ -483,12 +483,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Setting a single double-valued control parameter'>
|
<example caption='Setting a single double-valued control parameter'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='master@example.org/amr'
|
<message from='master@example.org/amr'
|
||||||
to='analog.output2@example.org'>
|
to='analog.output2@example.org'>
|
||||||
<set xmlns='urn:xmpp:iot:control'>
|
<set xmlns='urn:xmpp:iot:control'>
|
||||||
<double name='4-20mA' value='8.192'/>
|
<double name='4-20mA' value='8.192'/>
|
||||||
</set>
|
</set>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Setting a single date-valued control parameter'>
|
<section3 topic='Setting a single date-valued control parameter'>
|
||||||
@ -498,12 +498,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Setting a single date-valued control parameter'>
|
<example caption='Setting a single date-valued control parameter'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='master@example.org/amr'
|
<message from='master@example.org/amr'
|
||||||
to='alarm@example.org'>
|
to='alarm@example.org'>
|
||||||
<set xmlns='urn:xmpp:iot:control'>
|
<set xmlns='urn:xmpp:iot:control'>
|
||||||
<date name='TariffStartDate' value='2013-05-01'/>
|
<date name='TariffStartDate' value='2013-05-01'/>
|
||||||
</set>
|
</set>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Setting a single time-valued control parameter'>
|
<section3 topic='Setting a single time-valued control parameter'>
|
||||||
@ -513,12 +513,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Setting a single time-valued control parameter'>
|
<example caption='Setting a single time-valued control parameter'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='master@example.org/amr'
|
<message from='master@example.org/amr'
|
||||||
to='alarm@example.org'>
|
to='alarm@example.org'>
|
||||||
<set xmlns='urn:xmpp:iot:control'>
|
<set xmlns='urn:xmpp:iot:control'>
|
||||||
<time name='Alarm Time' value='08:00:00'/>
|
<time name='Alarm Time' value='08:00:00'/>
|
||||||
</set>
|
</set>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Setting a single date & time-valued control parameter'>
|
<section3 topic='Setting a single date & time-valued control parameter'>
|
||||||
@ -528,12 +528,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Setting a single date & time-valued control parameter'>
|
<example caption='Setting a single date & time-valued control parameter'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='master@example.org/amr'
|
<message from='master@example.org/amr'
|
||||||
to='alarm@example.org'>
|
to='alarm@example.org'>
|
||||||
<set xmlns='urn:xmpp:iot:control'>
|
<set xmlns='urn:xmpp:iot:control'>
|
||||||
<dateTime name='Alarm Time' value='2013-04-02T08:00:00'/>
|
<dateTime name='Alarm Time' value='2013-04-02T08:00:00'/>
|
||||||
</set>
|
</set>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Setting a single duration-valued control parameter'>
|
<section3 topic='Setting a single duration-valued control parameter'>
|
||||||
@ -543,12 +543,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Setting a single duration-valued control parameter'>
|
<example caption='Setting a single duration-valued control parameter'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='master@example.org/amr'
|
<message from='master@example.org/amr'
|
||||||
to='alarm@example.org'>
|
to='alarm@example.org'>
|
||||||
<set xmlns='urn:xmpp:iot:control'>
|
<set xmlns='urn:xmpp:iot:control'>
|
||||||
<duration name='Alarm Duration' value='PT3M30S'/>
|
<duration name='Alarm Duration' value='PT3M30S'/>
|
||||||
</set>
|
</set>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Setting a single color-valued control parameter'>
|
<section3 topic='Setting a single color-valued control parameter'>
|
||||||
@ -558,12 +558,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Setting a single color-valued control parameter'>
|
<example caption='Setting a single color-valued control parameter'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='master@example.org/amr'
|
<message from='master@example.org/amr'
|
||||||
to='spotlight@example.org'>
|
to='spotlight@example.org'>
|
||||||
<set xmlns='urn:xmpp:iot:control'>
|
<set xmlns='urn:xmpp:iot:control'>
|
||||||
<color name='Color' value='3399FF'/>
|
<color name='Color' value='3399FF'/>
|
||||||
</set>
|
</set>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Setting multiple control parameters at once'>
|
<section3 topic='Setting multiple control parameters at once'>
|
||||||
@ -573,13 +573,13 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Setting multiple control parameters at once'>
|
<example caption='Setting multiple control parameters at once'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='master@example.org/amr'
|
<message from='master@example.org/amr'
|
||||||
to='dimmer@example.org'>
|
to='dimmer@example.org'>
|
||||||
<set xmlns='urn:xmpp:iot:control'>
|
<set xmlns='urn:xmpp:iot:control'>
|
||||||
<int name='FadeTimeMilliseconds' value='500'/>
|
<int name='FadeTimeMilliseconds' value='500'/>
|
||||||
<int name='OutputPercent' value='10'/>
|
<int name='OutputPercent' value='10'/>
|
||||||
</set>
|
</set>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
Sometimes the order of control parameters are important in the device, and sometimes the parameters form part of a whole. It depends on the context of the device.
|
Sometimes the order of control parameters are important in the device, and sometimes the parameters form part of a whole. It depends on the context of the device.
|
||||||
@ -602,14 +602,14 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Getting a control form'>
|
<example caption='Getting a control form'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='dimmer@example.org'
|
to='dimmer@example.org'
|
||||||
id='3'>
|
id='3'>
|
||||||
<getForm xmlns='urn:xmpp:iot:control' xml:lang='en'/>
|
<getForm xmlns='urn:xmpp:iot:control' xml:lang='en'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='dimmer@example.org'
|
from='dimmer@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='3'>
|
id='3'>
|
||||||
@ -649,7 +649,7 @@
|
|||||||
<xdd:notSame/>
|
<xdd:notSame/>
|
||||||
</field>
|
</field>
|
||||||
</x>
|
</x>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
<strong>IMPORTANT:</strong> The device MUST mark all control parameters in the form as <strong>notSame</strong>, as defined in
|
<strong>IMPORTANT:</strong> The device MUST mark all control parameters in the form as <strong>notSame</strong>, as defined in
|
||||||
@ -682,14 +682,14 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Getting a control form, Failure'>
|
<example caption='Getting a control form, Failure'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='dimmer@example.org'
|
to='dimmer@example.org'
|
||||||
id='4'>
|
id='4'>
|
||||||
<getForm xmlns='urn:xmpp:iot:control' xml:lang='en'/>
|
<getForm xmlns='urn:xmpp:iot:control' xml:lang='en'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='error'
|
<iq type='error'
|
||||||
from='dimmer@example.org'
|
from='dimmer@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='4'>
|
id='4'>
|
||||||
@ -697,7 +697,7 @@
|
|||||||
<forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
<forbidden xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
||||||
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' xml:lang='en'>Access denied.</text>
|
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' xml:lang='en'>Access denied.</text>
|
||||||
</error>
|
</error>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Setting a (partial) control form'>
|
<section3 topic='Setting a (partial) control form'>
|
||||||
@ -710,7 +710,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Setting a (partial) control form'>
|
<example caption='Setting a (partial) control form'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='set'
|
<iq type='set'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='dimmer@example.org'
|
to='dimmer@example.org'
|
||||||
id='5'>
|
id='5'>
|
||||||
@ -727,14 +727,14 @@
|
|||||||
</field>
|
</field>
|
||||||
</x>
|
</x>
|
||||||
</set>
|
</set>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='dimmer@example.org'
|
from='dimmer@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='5'>
|
id='5'>
|
||||||
<setResponse xmlns='urn:xmpp:iot:control' />
|
<setResponse xmlns='urn:xmpp:iot:control' />
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
In this example, the FadeTimeMilliseconds and OutputPercent control parameters are sent, while the MainSwitch control parameter is left as is. Fading is therefore
|
In this example, the FadeTimeMilliseconds and OutputPercent control parameters are sent, while the MainSwitch control parameter is left as is. Fading is therefore
|
||||||
@ -748,7 +748,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Setting a (partial) control form, Failure'>
|
<example caption='Setting a (partial) control form, Failure'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='set'
|
<iq type='set'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='dimmer@example.org'
|
to='dimmer@example.org'
|
||||||
id='6'>
|
id='6'>
|
||||||
@ -765,9 +765,9 @@
|
|||||||
</field>
|
</field>
|
||||||
</x>
|
</x>
|
||||||
</set>
|
</set>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='error'
|
<iq type='error'
|
||||||
from='dimmer@example.org'
|
from='dimmer@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='6'>
|
id='6'>
|
||||||
@ -775,7 +775,7 @@
|
|||||||
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
||||||
<paramError xmlns='urn:xmpp:iot:control' var='OutputPercent'>Invalid parameter value.</error>
|
<paramError xmlns='urn:xmpp:iot:control' var='OutputPercent'>Invalid parameter value.</error>
|
||||||
</error>
|
</error>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
</section2>
|
</section2>
|
||||||
@ -791,13 +791,13 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Sending a control command to a node behind a concentrator'>
|
<example caption='Sending a control command to a node behind a concentrator'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='master@example.org/amr'
|
<message from='master@example.org/amr'
|
||||||
to='concentrator@example.org'>
|
to='concentrator@example.org'>
|
||||||
<set xmlns='urn:xmpp:iot:control'>
|
<set xmlns='urn:xmpp:iot:control'>
|
||||||
<node nodeId='DigitalOutput1'/>
|
<node nodeId='DigitalOutput1'/>
|
||||||
<boolean name='Output' value='false'/>
|
<boolean name='Output' value='false'/>
|
||||||
</set>
|
</set>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Sending a control command to multiple nodes'>
|
<section3 topic='Sending a control command to multiple nodes'>
|
||||||
@ -807,7 +807,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Sending a control command to multiple nodes'>
|
<example caption='Sending a control command to multiple nodes'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<message from='master@example.org/amr'
|
<message from='master@example.org/amr'
|
||||||
to='concentrator@example.org'>
|
to='concentrator@example.org'>
|
||||||
<set xmlns='urn:xmpp:iot:control'>
|
<set xmlns='urn:xmpp:iot:control'>
|
||||||
<node nodeId='DigitalOutput1'/>
|
<node nodeId='DigitalOutput1'/>
|
||||||
@ -816,7 +816,7 @@
|
|||||||
<node nodeId='DigitalOutput4'/>
|
<node nodeId='DigitalOutput4'/>
|
||||||
<boolean name='Output' value='false'/>
|
<boolean name='Output' value='false'/>
|
||||||
</set>
|
</set>
|
||||||
</message>]]>
|
</message>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Sending a control command to multiple nodes, Failure'>
|
<section3 topic='Sending a control command to multiple nodes, Failure'>
|
||||||
@ -828,7 +828,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Sending a control command to multiple nodes, Failure'>
|
<example caption='Sending a control command to multiple nodes, Failure'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='set'
|
<iq type='set'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='concentrator@example.org'
|
to='concentrator@example.org'
|
||||||
id='7'>
|
id='7'>
|
||||||
@ -843,9 +843,9 @@
|
|||||||
<node nodeId='AnalogOutput4'/>
|
<node nodeId='AnalogOutput4'/>
|
||||||
<boolean name='Output' value='true'/>
|
<boolean name='Output' value='true'/>
|
||||||
</set>
|
</set>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='error'
|
<iq type='error'
|
||||||
from='concentrator@example.org'
|
from='concentrator@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='7'>
|
id='7'>
|
||||||
@ -853,7 +853,7 @@
|
|||||||
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
||||||
<paramError xmlns='urn:xmpp:iot:control' var='Output'>Invalid parameter type.</error>
|
<paramError xmlns='urn:xmpp:iot:control' var='Output'>Invalid parameter type.</error>
|
||||||
</error>
|
</error>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Getting a control form from multiple nodes'>
|
<section3 topic='Getting a control form from multiple nodes'>
|
||||||
@ -863,7 +863,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Getting a control form from multiple nodes'>
|
<example caption='Getting a control form from multiple nodes'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='concentrator@example.org'
|
to='concentrator@example.org'
|
||||||
id='8'>
|
id='8'>
|
||||||
@ -873,9 +873,9 @@
|
|||||||
<node nodeId='DigitalOutput3'/>
|
<node nodeId='DigitalOutput3'/>
|
||||||
<node nodeId='DigitalOutput4'/>
|
<node nodeId='DigitalOutput4'/>
|
||||||
</getForm>
|
</getForm>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='concentrator@example.org'
|
from='concentrator@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='8'>
|
id='8'>
|
||||||
@ -897,7 +897,7 @@
|
|||||||
<xdd:notSame/>
|
<xdd:notSame/>
|
||||||
</field>
|
</field>
|
||||||
</x>
|
</x>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
Note that only parameters that are common between the nodes defined in the request must be returned. However, all parameters must have the
|
Note that only parameters that are common between the nodes defined in the request must be returned. However, all parameters must have the
|
||||||
@ -911,7 +911,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Getting a control form from multiple nodes, Failure'>
|
<example caption='Getting a control form from multiple nodes, Failure'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='concentrator@example.org'
|
to='concentrator@example.org'
|
||||||
id='9'>
|
id='9'>
|
||||||
@ -921,9 +921,9 @@
|
|||||||
<node nodeId='DigitalOutput3'/>
|
<node nodeId='DigitalOutput3'/>
|
||||||
<node nodeId='DigitalOutput4'/>
|
<node nodeId='DigitalOutput4'/>
|
||||||
</getForm>
|
</getForm>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='error'
|
<iq type='error'
|
||||||
from='concentrator@example.org'
|
from='concentrator@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='9'>
|
id='9'>
|
||||||
@ -931,7 +931,7 @@
|
|||||||
<feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
<feature-not-implemented xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
||||||
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' xml:lang='en'>Cannot merge control forms from different nodes.</text>
|
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas' xml:lang='en'>Cannot merge control forms from different nodes.</text>
|
||||||
</error>
|
</error>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Setting a (partial) control form to multiple nodes'>
|
<section3 topic='Setting a (partial) control form to multiple nodes'>
|
||||||
@ -943,7 +943,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Setting a (partial) control form to multiple nodes'>
|
<example caption='Setting a (partial) control form to multiple nodes'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='set'
|
<iq type='set'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='concentrator@example.org'
|
to='concentrator@example.org'
|
||||||
id='10'>
|
id='10'>
|
||||||
@ -961,14 +961,14 @@
|
|||||||
</field>
|
</field>
|
||||||
</x>
|
</x>
|
||||||
</set>
|
</set>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='concentrator@example.org'
|
from='concentrator@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='10'>
|
id='10'>
|
||||||
<setResponse xmlns='urn:xmpp:iot:control' />
|
<setResponse xmlns='urn:xmpp:iot:control' />
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
<section3 topic='Setting a (partial) control form to multiple nodes, Failure'>
|
<section3 topic='Setting a (partial) control form to multiple nodes, Failure'>
|
||||||
@ -978,7 +978,7 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Setting a (partial) control form to multiple nodes'>
|
<example caption='Setting a (partial) control form to multiple nodes'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='set'
|
<iq type='set'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='concentrator@example.org'
|
to='concentrator@example.org'
|
||||||
id='11'>
|
id='11'>
|
||||||
@ -1000,9 +1000,9 @@
|
|||||||
</field>
|
</field>
|
||||||
</x>
|
</x>
|
||||||
</set>
|
</set>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='error'
|
<iq type='error'
|
||||||
from='concentrator@example.org'
|
from='concentrator@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='11'>
|
id='11'>
|
||||||
@ -1010,7 +1010,7 @@
|
|||||||
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
<bad-request xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
|
||||||
<paramError xmlns='urn:xmpp:iot:control' var='Output'>Invalid type.</error>
|
<paramError xmlns='urn:xmpp:iot:control' var='Output'>Invalid type.</error>
|
||||||
</error>
|
</error>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
</section3>
|
</section3>
|
||||||
</section2>
|
</section2>
|
||||||
@ -1504,14 +1504,14 @@
|
|||||||
</p>
|
</p>
|
||||||
<example caption='Grouping control parameters'>
|
<example caption='Grouping control parameters'>
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
<iq type='get'
|
<iq type='get'
|
||||||
from='master@example.org/amr'
|
from='master@example.org/amr'
|
||||||
to='spotlight@example.org'
|
to='spotlight@example.org'
|
||||||
id='12'>
|
id='12'>
|
||||||
<getForm xmlns='urn:xmpp:iot:control' xml:lang='en'/>
|
<getForm xmlns='urn:xmpp:iot:control' xml:lang='en'/>
|
||||||
</iq>
|
</iq>
|
||||||
|
|
||||||
<iq type='result'
|
<iq type='result'
|
||||||
from='spotlight@example.org'
|
from='spotlight@example.org'
|
||||||
to='master@example.org/amr'
|
to='master@example.org/amr'
|
||||||
id='12'>
|
id='12'>
|
||||||
@ -1555,7 +1555,7 @@
|
|||||||
<parameterGroup xmlns='urn:xmpp:iot:control' name='direction'/>
|
<parameterGroup xmlns='urn:xmpp:iot:control' name='direction'/>
|
||||||
</field>
|
</field>
|
||||||
</x>
|
</x>
|
||||||
</iq>]]>
|
</iq>]]>
|
||||||
</example>
|
</example>
|
||||||
<p>
|
<p>
|
||||||
The above example informs the client that the two parameters HorizontalAngle and ElevationAngle should be written together to control a control action
|
The above example informs the client that the two parameters HorizontalAngle and ElevationAngle should be written together to control a control action
|
||||||
|
356
xep-0326.xml
356
xep-0326.xml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user