add glossary, appendix and specify protocol
[msc-thesis1617.git] / appendix-protocol.tex
1 \section{General message format}
2 Messages are delimited by newlines to make processing by line based devices
3 more easy. Message exchanges have a \emph{Request} and \emph{Response} header.
4 The \emph{Request} header means that the server is sending to the client. The
5 \emph{Response} header means that the client is sending to the server. In some
6 cases either the \emph{Request} or \emph{Response} is empty. This means that
7 the message is not acknowledged or responded upon.
8
9 \section{Handshake}
10 \todo{Handshake, here the client tells the server what they can do}
11
12 \newpage
13 \section{mTasks}
14 \begin{table}[!ht]
15 \centering
16 \begin{subfigure}[t]{.48\textwidth}
17 \begin{tabular}{ll}
18 \toprule
19 \multicolumn{2}{c}{Request}\\
20 byte & value\\
21 \midrule
22 1 & \texttt{'t'}\\
23 2,3 & interval\\
24 4,5 & length (\texttt{n})\\
25 6 to n+6 & bytecode\\
26 \midrule\midrule
27 \multicolumn{2}{c}{Response}\\
28 byte & value\\
29 \midrule
30 1 & \texttt{'t'}\\
31 2,3 & task id\\
32 \bottomrule
33 \end{tabular}
34 \caption{Send a task}
35 \end{subfigure}
36 \quad%
37 \begin{subfigure}[t]{.48\textwidth}
38 \begin{tabular}{ll}
39 \toprule
40 \multicolumn{2}{c}{Request}\\
41 byte & meaning\\
42 \midrule
43 1 & \texttt{'d'}\\
44 2,3 & task id\\
45 \midrule\midrule
46 \multicolumn{2}{c}{Response}\\
47 byte & value\\
48 \midrule
49 1 & \texttt{'d'}\\
50 2,3 & task id\\
51 \bottomrule
52 \end{tabular}
53 \caption{Delete a task}
54 \end{subfigure}
55 \caption{Message protocol for exchanging tasks}
56 \end{table}
57
58 \section{SDSs}
59 \begin{table}[!ht]
60 \centering
61 \begin{subfigure}[t]{.2\textwidth}
62 \begin{tabular}{ll}
63 \toprule
64 \multicolumn{2}{c}{Request}\\
65 byte & meaning\\
66 \midrule
67 1 & \texttt{'s'}\\
68 2,3 & identifier\\
69 4,5 & value\\
70 \midrule\midrule
71 \multicolumn{2}{c}{Response}\\
72 byte & meaning\\
73 \midrule
74 1 & \texttt{'s'}\\
75 2,3 & identifier\\
76 \bottomrule
77 \end{tabular}
78 \caption{Send an SDS specification}
79 \end{subfigure}
80 \quad%
81 \begin{subfigure}[t]{.2\textwidth}
82 \begin{tabular}{ll}
83 \toprule
84 \multicolumn{2}{c}{Response}\\
85 byte & value\\
86 \midrule
87 1 & \texttt{'a'}\\
88 2,3 & SDS id\\
89 \midrule\midrule
90 \multicolumn{2}{c}{Request}\\
91 byte & value\\
92 \midrule
93 1 & \texttt{'a'}\\
94 2,3 & SDS id\\
95 \bottomrule
96 \end{tabular}
97 \caption{Delete a SDS}
98 \end{subfigure}
99 \quad%
100 \begin{subfigure}[t]{.2\textwidth}
101 \begin{tabular}{ll}
102 \toprule
103 \multicolumn{2}{c}{Request}\\
104 byte & meaning\\
105 \midrule
106 1 & \texttt{'u'}\\
107 2,3 & sdsid\\
108 4,5 & value\\
109 \midrule\midrule
110 \multicolumn{2}{c}{Response}\\
111 \bottomrule
112 \end{tabular}
113 \caption{SDS update}
114 \end{subfigure}
115 \quad%
116 \begin{subfigure}[t]{.2\textwidth}
117 \begin{tabular}{ll}
118 \toprule
119 \multicolumn{2}{c}{Response}\\
120 \midrule\midrule
121 \multicolumn{2}{c}{Request}\\
122 byte & value\\
123 \midrule
124 1 & \texttt{'p'}\\
125 2,3 & SDS id\\
126 4,5 & value\\
127 \bottomrule
128 \end{tabular}
129 \caption{SDS publish}
130 \end{subfigure}
131 \caption{Message protocol for exchanging SDSs}
132 \end{table}