Commit 9eeb278f authored by Peter Waher's avatar Peter Waher

Adding clock source query

parent becf27b2
......@@ -44,19 +44,37 @@ considered much more stable than the latency in the network. The bulk of the var
as well as concurrent processes and loads on the client and clock source.
A simple clock difference request can look as follows:
### Clock Synchronization
<iq type='get' id='3' to='source@server/resource'>
A simple clock synchronization request can look as follows:
<iq type='get' id='3' from='client@server1/resource' to='source@server2/resource'>
<clock xmlns='urn:ieee:iot:synchronization:1.0'>2018-07-01T12:31:07.1627163Z</clock>
The source responds:
<iq id='3' type='result' to='client@server/resource' from=''>
<iq id='3' type='result' to='client@server1/resource' from='source@server2/resource'>
<clock xmlns='urn:ieee:iot:synchronization:1.0'>2018-07-01T12:31:07.2642974Z</clock>
**Note**: The `xs:dateTime` data type allows for arbitrary resoulution of the seconds part. In this example, a resolution of 100 ns has been used,
conforming to the capabilities of systems having an on-board high-resolution clock.
\ No newline at end of file
conforming to the capabilities of systems having an on-board high-resolution clock.
**Note 2**: The clock source may be a server or a component as well, in which the server JID or component JID is used.
### Clock Source Query
An entity can ask another entity what clock source it uses:
<iq id='4' type='get' to='client@server1/resource' from='client@server2/resource'>
<source xmlns='urn:ieee:iot:synchronization:1.0'/>
If the entity is synchronizing its clock with an external clock source, it responds:
<iq type='result' id='4' to='client@sever2/resource' from='client@server1/resource'>
<source xmlns='urn:ieee:iot:synchronization:1.0'>source@server2/resource</source>
......@@ -58,8 +58,6 @@ any theory, for any use of the material. Unapproved drafts of proposed
IEEE standards must not be utilized for any conformance/compliance
<xs:import namespace='urn:ieee:iot:synchronization:1.0'/>
<xs:element name='clock' type='xs:dateTime'>
......@@ -68,4 +66,10 @@ purposes.
<xs:element name='source' type='xs:string'>
<xs:documentation>Element used to query about what clock source is used.</xs:documentation>
<xs:documentation>Used as empty element in iq get stanzas, and with Bare JD of cloc source as a value in result stanzas.</xs:documentation>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment