This repository was archived by the owner on Jan 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharchitecture.tex
78 lines (71 loc) · 2.4 KB
/
architecture.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
\documentclass[tikz, border=3mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{positioning,fit,arrows.meta,backgrounds}
\tikzset{
module/.style={
draw, rounded corners,
minimum width=2cm,
minimum height=7mm,
font=\sffamily
},
container/.style={
draw, rounded corners,
minimum width=2cm,
minimum height=5cm,
font=\sffamily
},
small/.style={
draw, rounded corners,
minimum height=2.5cm,
font=\sffamily
},
>=LaTeX
}
\begin{document}
\begin{tikzpicture}[auto]
\node[module] (Read) {Read from sensors};
\node[module, below left=1cm and -1cm of Read] (Temp) {Temperature};
\node[module, below right=1cm and -1cm of Read] (Power) {Power draw};
\node[module, below=2.6cm of Read] (Queue) {Store in queue};
\node[small,fit=(Read) (Temp) (Power) (Queue), draw, label={Arduino}] (SensorBox) {};
\draw[->] (Read)--(Temp);
\draw[->] (Read)--(Power);
\draw[->] (Temp)--(Queue);
\draw[->] (Power)--(Queue);
% Raspberry Pi processing box
\node[module, right=2cm of Read] (Camera) {Take picture};
\node[module, below=of Camera] (CamProcess) {Process};
\node[small, fit={(Camera) (CamProcess)}, draw] (Pi2Box) {};
\draw[->] (Camera)--(CamProcess);
% Data collection box
\node[container, fit={(SensorBox) (Pi2Box)},
draw, inner xsep=2mm, inner ysep=0.75cm,
label={Data collection}] (DataCollectionBox) {};
% Data processing box
\node[module, right=2cm of Camera] (Data) {Data processing};
\node[module, below=of Data] (Storage) {Storage};
\node[small, fit={(Data) (Storage)},
draw, inner sep=2mm,
label={Data processing}]
(MainBox) {};
\draw[->] (Data)--(Storage);
\draw[->] (DataCollectionBox)--(DataCollectionBox-|MainBox.west);
% Serve box
\node[module, right=2cm of Data] (Server) {Server};
\node[module, below=of Server] (API) {API};
\node[module, below=of API] (Website) {Website};
\node[small, fit={(Server) (API) (Website)}, draw, inner sep=2mm, label={Serving}] (ServeBox) {};
\draw[->] (Server)--(API);
\draw[->] (Server) edge[bend left=52.5] node [left] {} (Website);
\draw[->] (API)--(Website);
\draw[->] (MainBox)--(MainBox-|ServeBox.west);
% Raspberry pi box
\node[container, fit={(CamProcess) (MainBox) (ServeBox)},
draw, inner ysep=1cm, inner xsep=0.5cm,
label={Raspberry Pi}] (RaspberryBox) {};
\end{tikzpicture}
\end{document}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: t
%%% End: