c193c5561887afcc6fda18396d31f216a043569f
[skm-ma-ws1314.git] / presentation.tex
1 \documentclass{beamer}
2 \usepackage[utf8]{inputenc}
3 \usepackage[english]{babel}
4 \usepackage{todonotes}
5 \usepackage{inconsolata}
6 %\usepackage{multicol}
7 \usepackage{array}
8 \usepackage{tikz}
9 \usetikzlibrary{arrows}
10 \usetikzlibrary{arrows}
11 \usetikzlibrary{positioning}
12 \usetikzlibrary{shapes.symbols}
13 %\usepackage[usenames,dvipsnames]{color}
14
15 \useoutertheme[section]{tubs}
16 \setbeamertemplate{itemize items}[tusquare]
17
18 %\presetkeys{todonotes}{inline}{}
19 \newcommand{\code}[1]{\texttt{#1}}
20 \definecolor{tu-green}{RGB}{137,164,0} % from tubslatex
21
22 \title{Chatty Things}
23 \subtitle{Making the Internet of Things Readily Usable for the Masses with XMPP}
24 \author{Roland Hieber}
25 \institute[IBR, TU-BS]{Institute of Operating Systems and Computer Networks}
26 \date[SKM-13/14]{Seminar Communications and Multimedia, WS 2013/14}
27 \titlegraphic{iz}
28
29 \begin{document}
30
31 \begin{frame}[plain]
32 \maketitle
33 \end{frame}
34
35 \begin{frame}{Contents}
36 \tableofcontents
37 \end{frame}
38
39 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
40 \section{Motivation}
41 \begin{frame}{Motivation}
42 \begin{block}{The IoT Vision}
43 \begin{itemize}
44 \item plentitude of smart objects
45 \item interoperability between devices
46 \item easy accessibility for users
47 \end{itemize}
48 \end{block}
49 \end{frame}
50
51 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
52 \begin{frame}<1>[label=subgoals]{Motivation: Subgoals}
53 \begin{block}{But how do we\ldots}
54 \begin{itemize}
55 \item configure our devices?
56 \begin{itemize}
57 \invisible<1-1>{\item[\color{tu-green}\checkmark]\color{tu-green}
58 Link-Local Addressing, Stateless Address Autoconfiguration}
59 \end{itemize}
60 \item find other nodes to talk to?
61 \begin{itemize}
62 \invisible<1-2>{\item[\color{tu-green}\checkmark]\color{tu-green}
63 DNS-SD + mDNS}
64 \end{itemize}
65 \item talk to other nodes or users?
66 \begin{itemize}
67 \invisible<1-3>{\item[\color{tu-green}\checkmark]\color{tu-green} XMPP
68 Serverless Messaging}
69 \end{itemize}
70 \item filter relevant information?
71 \begin{itemize}
72 \invisible<1-4>{\item[\color{tu-green}\checkmark]\color{tu-green} ``Traffic
73 Lights'', Temporary Subscription for Presence}
74 \end{itemize}
75 \end{itemize}
76 \end{block}
77 \end{frame}
78
79 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
80 \section{Technologies for Distributed Networking}
81 \begin{frame}{Address Allocation}
82 IPv4 Link-Local Addessing (``APIPA'', ``Zeroconf'', RFC 3927)
83 \begin{itemize}
84 \item subnet \code{169.254.0.0/16}
85 \end{itemize}
86 IPv6 Stateless Address Autoconfiguration (RFC 4862)
87 \begin{itemize}
88 \item subnet \code{fe80::/64} (link-local)
89 \item subnet \code{fc00::/11} (unique-local, if configured)
90 \item or global address (if configured)
91 \end{itemize}
92
93 \begin{block}{Algorithm}
94 \begin{enumerate}
95 \item choose (random) IP address in subnet
96 \item ask if anyone uses that address
97 \item if not, we're fine
98 \item else, retry
99 \end{enumerate}
100 \end{block}
101 \end{frame}
102
103 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
104 \againframe<2>{subgoals}
105
106 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
107 \begin{frame}{Multicast DNS (RFC 6762)}
108 \begin{itemize}
109 \item distributed DNS database
110 \item uses multicast address \code{224.0.0.251} (IPv4) and \code{ff02::fb}
111 (IPv6), UDP port 5353
112 \item standard DNS packet format
113 \item hosts announce their own resources
114 \item hosts respond to queries if queried resource is known
115 \end{itemize}
116 \end{frame}
117
118 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
119 \begin{frame}{DNS-Based Service Discovery (RFC 6763)}
120 Two-step process:
121 \begin{enumerate}
122 \item Service Instance Enumeration
123 \begin{itemize}
124 \item query PTR records of form \code{\_service.\_proto.domain}
125 \item results: instance names of form \code{name.\_service.\_proto.domain}
126 \end{itemize}
127 \item Service Instance Resolution
128 \begin{itemize}
129 \item query instance names as SRV records
130 \item result gives host name, port, priority, weight
131 \end{itemize}
132 \end{enumerate}
133 \end{frame}
134
135 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
136 \begin{frame}[fragile]{mDNS + DNS-SD}
137 \tikzset{font=\fontsize{7.5pt}{1em}\selectfont, >=latex, thick, y=3.5em}
138 %\tikzstyle{iconlabel}=[text width=2cm, align=center,
139 %font=\fontsize{7.5pt}{1em}\selectfont]
140 \tikzstyle{label}=[font=\fontsize{7pt}{1em}\selectfont]
141 \tikzstyle{pkt}=[font=\fontsize{7pt}{1em}\selectfont,
142 draw,fill=white,dash pattern=on 2pt off 2pt, align=center,
143 inner sep=2pt]
144 \def\xhalf{.45\textwidth}
145 \def\nodeskip{2.2em}
146 \begin{enumerate}
147 \item Service Instance Enumeration
148 \begin{tikzpicture}
149 \node[cloud,draw,fill=gray!20,aspect=2] (thecloud) at (0,0) {multicast};
150 \def\nodelist{
151 node/{(-\xhalf,0)}/{},
152 juliet/{(\xhalf,0)}/juliet,
153 romeo/{(\xhalf,-1)}/romeo,
154 mercutio/{(\xhalf,1)}/mercutio%
155 }
156 \foreach \name/\pos/\text in \nodelist {
157 \node (\name) at \pos { \includegraphics[width=3em]{icon-computer.pdf} };
158 \node[below=\nodeskip of \name.north,label] (\name text) { \text };
159 }
160 \draw[->] (node) -- (thecloud) node[pkt,pos=0.5]{
161 \verb+_presence._tcp.local+\\PTR? };
162 \draw[->] (juliet) -- (thecloud) node[pkt,pos=0.35]{
163 \verb+juliet._presence.+\\\verb+_tcp.local+ };
164 \draw[->] (romeo) -- (thecloud) node[pkt,pos=0.35]{
165 \verb+romeo._presence.+\\\verb+_tcp.local+ };
166 \draw[->] (mercutio) -- (thecloud) node[pkt,pos=0.35]{
167 \verb+mercutio._presence.+\\\verb+_tcp.local+ };
168 \end{tikzpicture}
169
170 \item Service Instance Resolution
171 \begin{tikzpicture}
172 \node[cloud,draw,fill=gray!20,aspect=2] (thecloud) at (0,0) {multicast};
173 \node (node) at (-\xhalf,0) { \includegraphics[width=3em]{icon-computer.pdf} };
174 \node (juliet) at (\xhalf,0) { \includegraphics[width=3em]{icon-computer.pdf} };
175 \node[below=\nodeskip of juliet.north,label] (juliet text) { juliet };
176 \draw[->] (node) -- (thecloud) node[pkt,pos=0.5]{
177 \verb+juliet._presence._tcp.local+\\SRV? };
178 \draw[->] (juliet) -- (thecloud) node[pkt,pos=0.5]{
179 \verb+juliet.local, port 5222,+\\\verb+prio 0, weight 0+ };
180
181
182 %\node[draw] (resptr) at (0,-4) {\code{juliet.\_presence.\_tcp.local} SRV?};
183 %\node[draw] (resres) at (16em,-4) {\code{juliet.local, port 5222, prio 0, weight 0}};
184
185 %\draw[->] (enumptr) -- (enumres);
186 %\draw[->] (resptr) -- (resres);
187 \end{tikzpicture}
188 \end{enumerate}
189 \end{frame}
190
191 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
192 \againframe<3>{subgoals}
193
194 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
195 \begin{frame}{XMPP (RFC 6122)}
196 \begin{columns}[c]
197 \column{.55\textwidth}
198 \begin{onlyenv}<1>
199 \begin{block}{Extensible Messaging and Presence Protocol}
200 \begin{itemize}
201 \item XML-based
202 \item Federated architecture
203 \begin{itemize}
204 \item modeled after E-Mail
205 \end{itemize}
206 \item publish-subscribe mechanism
207 \item XMPP Extension Protocols (XEPs), e.\,g.
208 \begin{itemize}
209 \item Multi-User Chats % (XEP-0045)
210 \item Serverless Messaging %(XEP-0174)
211 \item recently, also XEPs for the IoT %(XEP-0323 through -0326)
212 \end{itemize}
213 \end{itemize}
214 \end{block}
215 \end{onlyenv}
216 \begin{onlyenv}<2>
217 \begin{block}{Serverless XMPP (XEP-0174)}
218 \begin{itemize}
219 \item Clients communicate directly, no server needed
220 \item service discovery via mDNS/DNS-SD
221 \end{itemize}
222 \end{block}
223 \end{onlyenv}
224
225 \column{.45\textwidth}
226 \tikzset{node distance=0pt, >=stealth, thick, x=3.5em, y=2.8em}
227 \tikzstyle{iconlabel}=[text width=2.5cm, align=center,
228 font=\fontsize{7.5pt}{1em}\selectfont]
229 \tikzstyle{label}=[font=\fontsize{7pt}{1em}\selectfont]
230 \begin{overprint}
231 \begin{figure}
232 \begin{tikzpicture}[remember picture]
233 \input{fig-xmpparch.tex}
234 \end{tikzpicture}
235 \end{figure}
236 \tikz[remember picture,overlay]
237 \draw<2>[<->,dotted] (juliet) -- node[anchor=south,label]{serverless} (romeo);
238 \end{overprint}
239 \end{columns}
240 \end{frame}
241
242 \begin{frame}{XMPP (RFC 6122)}
243 \begin{block}{XEPs for the Internet of Things}
244 \begin{itemize}
245 \item XEP-0323 Sensor Data
246 \begin{itemize}
247 \item format for sensor data, query modes
248 \end{itemize}
249 \item XEP-0324 Provisioning
250 \begin{itemize}
251 \item defining access rights and user privileges
252 \end{itemize}
253 \item XEP-0325 Control
254 \begin{itemize}
255 \item get/set control prameters on a (group of) sensor node(s)
256 \end{itemize}
257 \item XEP-0326 Concentrators
258 \begin{itemize}
259 \item implement proxies for a subnet of the WSN
260 \end{itemize}
261 \end{itemize}
262 \end{block}
263 \end{frame}
264
265 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
266 \againframe<4>{subgoals}
267
268 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
269 \section{Chatty Things}
270 \begin{frame}{Chatty Things}
271 \begin{itemize}
272 \item use serverless XMPP + mDNS + DNS-SD for communication
273 \item interaction using a standard XMPP client
274 \item prevent information overflow
275 \begin{itemize}
276 \item ``Traffic lights'': status icon in roster represents threshold value
277 \item \emph{Temporary Subscription for Presence (TSP)}
278 \end{itemize}
279 %\item working prototype for Contiki on MSP430
280 \end{itemize}
281 \begin{block}{Prototype}
282 \begin{itemize}
283 \item \emph{uBonjour} for mDNS + DNS-SD
284 \item \emph{uXMPP} for XMPP
285 \item 12~kB of ROM, 0.6 kB of RAM with Contiki on MSP-430
286 \end{itemize}
287 \end{block}
288 \end{frame}
289
290 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
291 \begin{frame}{Temporary Subscription for Presence}
292 \begin{block}{Problem}
293 \begin{itemize}
294 \item node must manually subscribe to get information
295 \item users can move quickly out of the network
296 \item subscriptions become outdated
297 \item renewing/canceling subscriptions needs bandwidth
298 \item data publishers also get updates
299 \end{itemize}
300 \end{block}
301 \end{frame}
302
303 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
304 \begin{frame}{Temporary Subscription for Presence}
305 \begin{block}{Solution: Multi-User Chats}
306 \begin{itemize}
307 \item create one chat room per topic
308 \item users subscribe to information by entering the chat room
309 \item server only sends information to nodes who want it
310 \begin{itemize}
311 \item Chatty Things send a flag that they're uninterested
312 \end{itemize}
313 \end{itemize}
314 \end{block}
315 \begin{block}{Drawbacks}
316 \begin{itemize}
317 \item only works with central XMPP server
318 \begin{itemize}
319 \item XEP-0045 is not (yet) specified for serverless XMPP
320 \end{itemize}
321 \item XMPP server needs to handle TSP
322 \end{itemize}
323 \end{block}
324 \end{frame}
325
326 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
327 \begin{frame}{Bootstrapping}
328 \begin{block}{At Boot}
329 \begin{enumerate}
330 \item activate uBonjour
331 \item try to discover a central XMPP server
332 \begin{itemize}
333 \item DNS-SD: \code{\_xmpp-client.\_tcp.local}
334 \end{itemize}
335 \item if an XMPP server is discovered: \emph{Infrastructure mode}
336 \begin{itemize}
337 \item connect with ANONYMOUS login (XEP-0175)
338 \item join topic-based chats
339 \item deactivate uBonjour
340 \end{itemize}
341 \item if no server is found: \emph{Ad hoc mode}
342 \begin{itemize}
343 \item activate serverless messaging
344 \end{itemize}
345 \end{enumerate}
346 \end{block}
347 \end{frame}
348 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
349 \begin{frame}{Bootstrapping}
350 \begin{block}{During Runtime}
351 \begin{itemize}
352 \item if server is lost, change to Ad hoc mode
353 \item if new server is found in Ad hod mode, try changing to Infrastructure
354 mode
355 \begin{itemize}
356 \item if that fails, stay in Ad hoc mode
357 \end{itemize}
358 \end{itemize}
359 \end{block}
360 \end{frame}
361
362 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
363 \againframe<5>{subgoals}
364
365 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
366 \section{Related Approaches}
367 \begin{frame}{Related Approaches}
368 \begin{overprint}
369 \onslide<1>
370 \begin{block}{Chatty Things}
371 \end{block}
372 \onslide<2>
373 \begin{block}{Constrained Application Protocol (CoAP)}
374 \begin{itemize}
375 \item binary mapping to HTTP
376 \item UDP with confirmation and congestion control
377 \end{itemize}
378 \end{block}
379 \onslide<3>
380 \begin{block}{MQ Telemetry Transport (MQTT)}
381 \begin{itemize}
382 \item binary, only 2-byte header
383 \item focused on M2M communication
384 \end{itemize}
385 \end{block}
386 \onslide<4>
387 \begin{block}{Web Service for Devices (WS4D)}
388 \begin{itemize}
389 \item SOAP (XML-based) over HTTP
390 \end{itemize}
391 \end{block}
392 \end{overprint}
393 \begin{table}
394 \small\centering
395 \begin{tabular}{|>{\onslide<1->}l||>{\onslide<1->}l|>{\onslide<2->}l|
396 >{\onslide<3->}l|>{\onslide<4->}l<{\onslide}|}
397 \hline
398 Feature & Chatty Things & CoAP & MQTT & WS4D \\
399 \hline\hline
400 application gateways & - & yes & yes & - \\ \hline
401 usable with standard clients & yes & - & - & (yes) \\ \hline
402 discovery support & yes & yes & - & yes\\ \hline
403 IPv6/6LoWPAN ready & yes & yes & ? & partial \\ \hline
404 asynchronous messages & yes & yes & ? & ? \\ \hline
405 protocol overhead & moderate & low & low & high \\ \hline
406 \end{tabular}
407 \end{table}
408 \end{frame}
409
410 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
411 \section{Conclusion}
412 \begin{frame}{Conclusion}
413 \begin{block}{Advantages of Chatty Things}
414 \begin{itemize}
415 \item no need for central infrastructure
416 \item self-configuration and auto-discovery
417 \item interaction over standard chat clients
418 \item protocol flexibility for enhancements
419 \end{itemize}
420 \end{block}
421 \begin{block}{Disadvantages of Chatty Things}
422 \begin{itemize}
423 \item XMPP introduces some complexity
424 \item topic filtering only possible with central server
425 \end{itemize}
426 \end{block}
427 \end{frame}
428
429 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
430 \begin{frame}
431 \vfill
432 \centering\LARGE{Questions?}
433 \vfill
434 \end{frame}
435
436 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
437 \section*{Example}
438 \def\bot{-7.5}
439 \def\nearlybot{-7}
440 \def\top{0}
441 \def\nearlytop{-0.5}
442 \def\dev{-5}
443 \def\cli{5}
444 \newlength{\ypos}
445 \newlength{\yypos}
446 \newcommand{\advanceby}[1]{%
447 \addtolength{\ypos}{#1}%
448 \addtolength{\yypos}{#1}%
449 \global\ypos=\ypos% // see https://tex.stackexchange.com/questions/119730
450 \global\yypos=\yypos%
451 }
452 \tikzstyle{pkt}=[
453 fill,
454 below=-.5\baselineskip,
455 font=\scriptsize,
456 draw,
457 dash pattern=on 2pt off 2pt,
458 ]
459 \tikzstyle{clipkt}=[pkt,
460 below left=-.5\baselineskip and 0cm,
461 pos=0.05,
462 ]
463 \tikzstyle{devpkt}=[pkt,
464 below right=-.5\baselineskip and 0cm,
465 pos=0.05,
466 ]
467 %%%%%%%%%
468 \begin{frame}[fragile,plain,t]{Example: Sensor Data}
469 \begin{tikzpicture}[
470 every node/.style={fill=white, font=\small},
471 every picture/.style=ultra thin,
472 >=latex,
473 semithick
474 ]
475 \setlength{\ypos}{0cm}
476 \setlength{\yypos}{.5cm}
477 %% Header
478 \draw (\cli,\top) node[draw]{Client} -- (\cli,\nearlybot);
479 \draw[dashed] (\cli,\nearlybot) -- (\cli,\bot);
480 \draw (\dev,\top) node[draw]{Device} -- (\dev,\nearlybot);
481 \draw[dashed] (\dev,\nearlybot) -- (\dev,\bot);
482
483 \advanceby{.75cm}
484 \draw[->] (\cli,-\ypos) -- (\dev,-\yypos) node[clipkt]{\verb+<stream>+};
485 \advanceby{1cm}
486 \draw[->] (\dev,-\ypos) -- (\cli,-\yypos) node[devpkt]{\verb+<stream>+};
487
488 \advanceby{1cm}
489 \draw[->] (\cli,-\ypos) -- (\dev,-\yypos) node[clipkt,align=left]{
490 \verb+<iq type='get' id='1'+\\
491 \verb+ to='dev@device.local/res'+\\
492 \verb+ from='client@client.local'>+\\
493 \verb+ <req xmlns='urn:xmpp:sn' seqnr='1'+\\
494 \verb+ momentary='true'>+\\
495 \verb+ <node nodeId='Device04'/>+\\
496 \verb+ <field name='+{\color{tu-red}\code{Energy}}\verb+'/>+\\
497 \verb+ <field name='+{\color{dark-blue}\code{Power}}\verb+'/>+\\
498 \verb+ </req> </iq>+
499 %\end{verbatim}
500 \advanceby{9\baselineskip}
501 };
502
503 \advanceby{0.3cm}
504 \draw[->] (\dev,-\ypos) -- (\cli,-\yypos) node[devpkt,align=left]{
505 \verb+<iq type='result' id='1'+\\
506 \verb+ from='dev@device.local'+\\
507 \verb+ to='client@client.local/res'>+\\
508 \verb+ <accepted xmlns='urn:xmpp:sn' seqnr='1'/>+\\
509 \verb+</iq>+
510 \advanceby{4\baselineskip}
511 };
512 \end{tikzpicture}
513 \end{frame}
514
515 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
516 \begin{frame}[fragile,plain,t]{Example: Sensor Data (cont.)}
517 \begin{tikzpicture}[
518 every node/.style={fill=white, font=\small},
519 every picture/.style=ultra thin,
520 >=latex,
521 semithick
522 ]
523 \setlength{\ypos}{0cm}
524 \setlength{\yypos}{.5cm}
525 %% Header
526 \draw[dashed] (\cli,\top) node[draw]{Client} -- (\cli,\nearlytop);
527 \draw (\cli,\nearlytop) -- (\cli,\bot);
528 \draw[dashed] (\dev,\top) node[draw]{Device} -- (\dev,\nearlytop);
529 \draw (\dev,\nearlytop) -- (\dev,\bot);
530
531 \advanceby{.75cm}
532 %\advanceby{1cm}
533 \draw[->] (\dev,-\ypos) -- (\cli,-\yypos) node[devpkt,align=left]{
534 \verb+<message from='dev@device.local'+\\
535 \verb+ to='client@client.local/res'>+\\
536 \verb+ <fields xmlns='urn:xmpp:sn' seqnr='1' done='true'>+\\
537 \verb+ <node nodeId='Device04'>+\\
538 \verb+ <timestamp value='2013-03-07T22:03:15'>+\\
539 \verb+ <numeric name='+{\color{tu-red}\code{Energy}}\verb+' momentary='true'+\\
540 \verb+ value='+{\color{tu-red}\code{167.5}}\verb+' unit='+{\color{tu-red}\code{kWh}}\verb+'/>+\\
541 \verb+ <numeric name='+{\color{dark-blue}\code{Power}}\verb+' momentary='true'+\\
542 \verb+ value='+{\color{dark-blue}\code{239.4}}\verb+' unit='+{\color{dark-blue}\code{W}}\verb+'/>+\\
543 \verb+ </timestamp>+\\
544 \verb+ </node>+\\
545 \verb+ </fields>+\\
546 \verb+</message>+
547 \advanceby{12\baselineskip}
548 };
549
550 \advanceby{1cm}
551 \draw[->] (\cli,-\ypos) -- (\dev,-\yypos) node[clipkt]{\verb+</stream>+};
552 \advanceby{1cm}
553 \draw[->] (\dev,-\ypos) -- (\cli,-\yypos) node[devpkt]{\verb+</stream>+};
554 \end{tikzpicture}
555 \end{frame}
556 \end{document}
This page took 0.157879 seconds and 3 git commands to generate.