aboutsummaryrefslogtreecommitdiffstats
path: root/doc/thesis/figures/tikz/packet-frame.tex
diff options
context:
space:
mode:
authorNao Pross <np@0hm.ch>2021-11-22 00:08:21 +0100
committerNao Pross <np@0hm.ch>2021-11-22 00:08:21 +0100
commit662839d8ab41fea46aeb10b0822162f50ce56d2e (patch)
tree3872966323d66ea483b3335bbc950fb353d420f7 /doc/thesis/figures/tikz/packet-frame.tex
parentDoc on frames (diff)
downloadFading-662839d8ab41fea46aeb10b0822162f50ce56d2e.tar.gz
Fading-662839d8ab41fea46aeb10b0822162f50ce56d2e.zip
Draw packet
Diffstat (limited to '')
-rw-r--r--doc/thesis/figures/tikz/packet-frame.tex41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/thesis/figures/tikz/packet-frame.tex b/doc/thesis/figures/tikz/packet-frame.tex
new file mode 100644
index 0000000..8bef47b
--- /dev/null
+++ b/doc/thesis/figures/tikz/packet-frame.tex
@@ -0,0 +1,41 @@
+% vim:ts=2 sw=2:
+\begin{tikzpicture}[
+ brace/.style = {
+ decorate,
+ decoration = {
+ calligraphic brace,
+ amplitude = 3mm,
+ raise = 1mm,
+ mirror,
+ },
+ very thick,
+ pen colour = {black}
+ },
+ ]
+ \matrix[
+ column sep = -1pt,
+ nodes = {
+ draw, rectangle, thick,
+ minimum height = 12mm,
+ text width = 20mm,
+ align = center,
+ },
+ ]{
+ \node {Preamble \\ \(k\) Bytes}; &
+ \node (pad) {Padding \\ 1 Bit}; &
+ \node (id) {ID \\ 5 Bits}; &
+ \node {Length \\ 21 Bits}; &
+ \node (par) {Parity \\ 5 Bits}; &
+ \node {Payload \\ \(\ell\) Bytes}; \\
+ % \node{Padding }; \\
+ };
+
+ \draw[brace] (id.south west) --
+ node[midway, below = 5mm] {(31, 26) Hamming ECC}
+ (par.south east);
+
+ % \draw[brace] (par.north east) --
+ % node[midway, above = 5mm] {4 Bytes}
+ % (pad.north west);
+
+\end{tikzpicture}