Example stream between a sensor node and a client, final tweaks final final-pre-review
authorRoland Hieber <rohieb@rohieb.name>
Mon, 23 Dec 2013 23:24:24 +0000 (00:24 +0100)
committerRoland Hieber <rohieb@rohieb.name>
Mon, 23 Dec 2013 23:24:24 +0000 (00:24 +0100)
fig-example-xmpp-stream.tex [new file with mode: 0644]
sec-chatty-things.tex
sec-discussion.tex
sec-dns-extensions.tex
sec-xmpp.tex

diff --git a/fig-example-xmpp-stream.tex b/fig-example-xmpp-stream.tex
new file mode 100644 (file)
index 0000000..15de658
--- /dev/null
@@ -0,0 +1,63 @@
+\makeatletter \def\verbatim@font{\sffamily\scriptsize} \makeatother
+
+\begin{figure}[tp]
+  \small\centering
+\begin{tabular}{p{5cm}p{5cm}}
+Client to Device $\rightarrow$ & $\leftarrow$ Device to Client\\
+
+\begin{verbatim}
+<stream>
+\end{verbatim} & \\
+
+ & \begin{verbatim}
+<stream>
+\end{verbatim} \\
+
+\begin{verbatim}
+<iq type='get' id='1'
+    to='dev@device.local/res'
+    from='client@client.local'>
+  <req xmlns='urn:xmpp:sn' seqnr='1'
+      momentary='true'>
+    <node nodeId='Device04'/>
+    <field name='Energy'/>
+    <field name='Power'/>
+  </req>
+</iq>
+\end{verbatim} & \\
+
+ & \begin{verbatim}<iq type='result' id='1'
+    from='dev@device.local'
+    to='client@client.local/res'>
+  <accepted xmlns='urn:xmpp:sn' seqnr='1'/>
+</iq>
+\end{verbatim} \\
+
+ & \begin{verbatim}
+<message from='dev@device.local'
+    to='client@client.local/res'>
+  <fields xmlns='urn:xmpp:sn' seqnr='1' done='true'>
+    <node nodeId='Device04'>
+      <timestamp value='2013-03-07T22:03:15'>
+        <numeric name='Energy' momentary='true'
+          value='12345.67' unit='MWh'/>
+        <numeric name='Power' momentary='true'
+          value='239.4' unit='W'/>
+      </timestamp>
+    </node>
+  </fields>
+</message>
+\end{verbatim} \\
+
+\begin{verbatim}
+</stream>
+\end{verbatim} & \\
+
+ & \begin{verbatim}
+</stream>
+\end{verbatim} \\
+\end{tabular}
+  \caption{Example XMPP stream with sensor data (XEP-0323)}
+  \label{fig:examplexmpp}
+\end{figure}
+% vim: set ft=tex et ts=2 sw=2 :
index da27fbe..9ac3428 100644 (file)
@@ -46,8 +46,6 @@ The resulting implementation (uXMPP and uBonjour) gets by with 12{.}2\ kBytes of
 ROM and 0{.}63\ kBytes of RAM, which was about the size of the original,
 unoptimized uXMPP implementation while also implementing new features.
 
-\todo{figure of example network structure with and without central server}
-
 In order to react to different network infrastructures, their implementation
 allows both communication with a central XMPP server as well as peer-to-peer
 communication over XMPP Serverless Messaging. When a central XMPP server is
index 0f05d0c..2b26283 100644 (file)
@@ -24,15 +24,6 @@ interested in specific values then only needs to communicate with a single node
 in the network.
 
 \paragraph{Sensor Data (XEP-0323)~\cite{xep0323}}
-%\begin{figure}
-  %\caption{Example stream between a sensor node and a client}
-  %\label{fig:streamexample}
-  %\begin{verbatim}
-%Client               Device
-%<stream>
-
-  %\end{verbatim}
-%\end{figure}
 This XEP specifies a way of reading out values from a
 sensor node. It allows to specify multiple data sources (e.~g. temperature,
 humidity) as well as multiple types of data (e.~g., momentary values, historical
@@ -43,6 +34,14 @@ accepts the request by returning a corresponding IQ stanza. If it has
 accepted the request, it reads out the requested data and returns it in a
 subsequent message stanza to the client.
 
+An example of this protocol can be seen in Figure~\ref{fig:examplexmpp}: after
+both clients have opened their streams, the client requests the momentary values
+for power and energy from the node named \emph{Device04}. The device first
+acknowledges this request, and, after retrieving the values, sends them back
+to the client.
+
+\input{fig-example-xmpp-stream.tex}
+
 \paragraph{Control (XEP-0325)~\cite{xep0325}} In this document, a way of
 controlling sensor nodes is specified, which allows a client to get and set
 control values on the node over message or IQ stanzas. As an example, in this
@@ -75,9 +74,6 @@ it is to be noted that this requires further implementation of compression
 algorithms as well as additional CPU and memory resources and thus might
 decrease message throughput and increase power consumption on embedded systems.
 
-
-\todo{example XML stream with sensor data}
-
 \subsection{Related Approaches}
 
 ``Chatty Things'' is not the only approach to implement communication in
index dae9770..86bc75c 100644 (file)
@@ -47,10 +47,6 @@ SRV~\cite{rfc2782} and PTR in a way that allows hosts to browse
 for services in a domain. This is a two-step process, consisting of
 \term{Service Instance Enumeration} and \term{Service Instance Resolution}.
 
-%\todo{XMPP is a probably not the best example here, use IPP instead}
-%\begin{subfigure} \end{subfigure} \begin{figure}[top] \centering
-%\includegraphics[width=0.9\textwidth]{fig-dnssd-mock.jpg} \caption{DNS-SD:
-%Service Instance Enumeration and Resolution} \label{fig:dnssd} \end{figure}
 \paragraph{1. Service Instance Enumeration} At first, to enumerate the available
 services in a domain for a given protocol, a DNS-SD-enabled client queries
 PTR resources of the form \code{\_service.\_proto.domain}. The result of
index 9f1749a..fbc1dbe 100644 (file)
@@ -84,8 +84,6 @@ other side then has the chance to send all outstanding stanzas and then likewise
 closes its stream. If both streams are closed, the underlying TCP connection is
 terminated.
 
-%\todo{see section... for example stream}
-
 \subsubsection{Publish/Subscribe and Presence}
 
 Typically, a user wants to chat with a more or less fixed set of other users,
This page took 0.028065 seconds and 4 git commands to generate.