From 662839d8ab41fea46aeb10b0822162f50ce56d2e Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Mon, 22 Nov 2021 00:08:21 +0100 Subject: Draw packet --- doc/thesis/Fading.tex | 1 + doc/thesis/Makefile | 3 ++- doc/thesis/chapters/implementation.tex | 2 +- doc/thesis/figures/tikz/packet-frame.tex | 41 ++++++++++++++++++++++++++++++++ 4 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 doc/thesis/figures/tikz/packet-frame.tex (limited to 'doc') diff --git a/doc/thesis/Fading.tex b/doc/thesis/Fading.tex index c0b5f41..a55b2da 100644 --- a/doc/thesis/Fading.tex +++ b/doc/thesis/Fading.tex @@ -39,6 +39,7 @@ positioning, backgrounds, decorations.pathreplacing, + calligraphy, decorations.markings, matrix, arrows, diff --git a/doc/thesis/Makefile b/doc/thesis/Makefile index be2b4bb..79409dc 100644 --- a/doc/thesis/Makefile +++ b/doc/thesis/Makefile @@ -22,7 +22,8 @@ SOURCES := \ figures/tikz/multipath-sketch.tex \ figures/tikz/multipath-impulse-response.tex \ figures/tikz/multipath-frequency-response-plots.tex \ - figures/tikz/tapped-delay-line.tex + figures/tikz/tapped-delay-line.tex \ + figures/tikz/packet-frame.tex DATA := figures/data/multipath_frequency_response.dat diff --git a/doc/thesis/chapters/implementation.tex b/doc/thesis/chapters/implementation.tex index 77a2846..27a8d41 100644 --- a/doc/thesis/chapters/implementation.tex +++ b/doc/thesis/chapters/implementation.tex @@ -40,7 +40,7 @@ From the complex space the constellation points are decode to bits. \begin{figure} \centering - \skelfig[width = .8\linewidth, height = 3cm]{Frame} + \input{figures/tikz/packet-frame} \caption{ Structure of framed data packets used in the implementation. \label{fig:dataframe} 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} -- cgit v1.2.1