3 below=-
.5\baselineskip,
6 dash pattern=on
2pt off
2pt,
8 \tikzstyle{clipkt
}=
[pkt,
9 below left=-
.5\baselineskip and
0cm,
12 \tikzstyle{devpkt
}=
[pkt,
13 below right=-
.5\baselineskip and
0cm,
17 every node/.style=
{fill=white, font=
\small},
18 every picture/.style=ultra thin,
29 \setlength{\ypos}{0cm
}
30 \setlength{\yypos}{.5cm
}
32 \addtolength{\ypos}{#1}%
33 \addtolength{\yypos}{#1}%
34 \global\ypos=
\ypos% // see https://tex.stackexchange.com/questions/119730
39 \draw (
\cli,
\top) node
[draw
]{Client
} -- (
\cli,
\bot);
40 \draw (
\dev,
\top) node
[draw
]{Device
} -- (
\dev,
\bot);
43 \draw[->
] (
\cli,-
\ypos) -- (
\dev,-
\yypos) node
[clipkt
]{\verb+<stream>+
};
45 \draw[->
] (
\dev,-
\ypos) -- (
\cli,-
\yypos) node
[devpkt
]{\verb+<stream>+
};
48 \draw[->
] (
\cli,-
\ypos) -- (
\dev,-
\yypos) node
[clipkt,text width=
5cm
]{
51 to='dev@device.local/res'
52 from='client@client.local'>
53 <req xmlns='urn:xmpp:sn' seqnr='
1'
55 <node nodeId='Device04'/>
56 <field name='Energy'/>
61 \advanceby{9\baselineskip}
65 \draw[->
] (
\dev,-
\ypos) -- (
\cli,-
\yypos) node
[devpkt,text width=
6cm
]{
67 <iq type='result' id='
1'
68 from='dev@device.local'
69 to='client@client.local/res'>
70 <accepted xmlns='urn:xmpp:sn' seqnr='
1'/>
73 \advanceby{4\baselineskip}
77 \draw[->
] (
\dev,-
\ypos) -- (
\cli,-
\yypos) node
[devpkt,text width=
7cm
]{
79 <message from='dev@device.local'
80 to='client@client.local/res'>
81 <fields xmlns='urn:xmpp:sn' seqnr='
1' done='true'>
82 <node nodeId='Device04'>
83 <timestamp value='
2013-
03-
07T22:
03:
15'>
84 <numeric name='Energy' momentary='true'
85 value='
12345.67' unit='MWh'/>
86 <numeric name='Power' momentary='true'
87 value='
239.4' unit='W'/>
93 \advanceby{12\baselineskip}
97 \draw[->
] (
\cli,-
\ypos) -- (
\dev,-
\yypos) node
[clipkt
]{\verb+</stream>+
};
99 \draw[->
] (
\dev,-
\ypos) -- (
\cli,-
\yypos) node
[devpkt
]{\verb+</stream>+
};
101 % vim: set ft=tex et ts=2 sw=2 :