Example stream between a sensor node and a client, final tweaks
[skm-ma-ws1314.git] / fig-example-xmpp-stream.tex
1 \makeatletter \def\verbatim@font{\sffamily\scriptsize} \makeatother
2
3 \begin{figure}[tp]
4 \small\centering
5 \begin{tabular}{p{5cm}p{5cm}}
6 Client to Device $\rightarrow$ & $\leftarrow$ Device to Client\\
7
8 \begin{verbatim}
9 <stream>
10 \end{verbatim} & \\
11
12 & \begin{verbatim}
13 <stream>
14 \end{verbatim} \\
15
16 \begin{verbatim}
17 <iq type='get' id='1'
18 to='dev@device.local/res'
19 from='client@client.local'>
20 <req xmlns='urn:xmpp:sn' seqnr='1'
21 momentary='true'>
22 <node nodeId='Device04'/>
23 <field name='Energy'/>
24 <field name='Power'/>
25 </req>
26 </iq>
27 \end{verbatim} & \\
28
29 & \begin{verbatim}<iq type='result' id='1'
30 from='dev@device.local'
31 to='client@client.local/res'>
32 <accepted xmlns='urn:xmpp:sn' seqnr='1'/>
33 </iq>
34 \end{verbatim} \\
35
36 & \begin{verbatim}
37 <message from='dev@device.local'
38 to='client@client.local/res'>
39 <fields xmlns='urn:xmpp:sn' seqnr='1' done='true'>
40 <node nodeId='Device04'>
41 <timestamp value='2013-03-07T22:03:15'>
42 <numeric name='Energy' momentary='true'
43 value='12345.67' unit='MWh'/>
44 <numeric name='Power' momentary='true'
45 value='239.4' unit='W'/>
46 </timestamp>
47 </node>
48 </fields>
49 </message>
50 \end{verbatim} \\
51
52 \begin{verbatim}
53 </stream>
54 \end{verbatim} & \\
55
56 & \begin{verbatim}
57 </stream>
58 \end{verbatim} \\
59 \end{tabular}
60 \caption{Example XMPP stream with sensor data (XEP-0323)}
61 \label{fig:examplexmpp}
62 \end{figure}
63 % vim: set ft=tex et ts=2 sw=2 :
This page took 0.059946 seconds and 5 git commands to generate.