X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=appendix-protocol.tex;h=4330283eebf4a3b8bb4ff40a9ff8158c381b4398;hb=4ac8ff3216dd921df44fbed2ba7d4ad01ff7033d;hp=d20f6c887e97a79ac3a73e796ab989ec44e08c53;hpb=6c6184edee2e3ae64176ee53d891f244b649ba1b;p=msc-thesis1617.git diff --git a/appendix-protocol.tex b/appendix-protocol.tex index d20f6c8..4330283 100644 --- a/appendix-protocol.tex +++ b/appendix-protocol.tex @@ -1,90 +1,132 @@ -\section{Server to Client} +\section{General message format} Messages are delimited by newlines to make processing by line based devices -more easy. -\todo{Handshake} -\begin{table}[ht] - \centering - \begin{tabular}{ll} - \toprule - byte & value\\ - \midrule - 1 & \texttt{'t'}\\ - 2,3 & interval\\ - 4,5 & length (\texttt{n})\\ - 6 to n+6 & bytecode\\ - \bottomrule - \end{tabular} - \caption{Send a task} -\end{table} +more easy. Message exchanges have a \emph{Request} and \emph{Response} header. +The \emph{Request} header means that the server is sending to the client. The +\emph{Response} header means that the client is sending to the server. In some +cases either the \emph{Request} or \emph{Response} is empty. This means that +the message is not acknowledged or responded upon. -\begin{table}[ht] - \centering - \begin{tabular}{ll} - \toprule - byte & meaning\\ - \midrule - 1 & \texttt{'d'}\\ - 2,3 & task id\\ - \bottomrule - \end{tabular} - \caption{Delete a task} -\end{table} +\section{Handshake} +\todo{Handshake, here the client tells the server what they can do} -\begin{table}[ht] +\newpage +\section{mTasks} +\begin{table}[!ht] \centering - \begin{tabular}{ll} - \toprule - byte & meaning\\ - \midrule - 1 & \texttt{'s'}\\ - 2,3 & identifier\\ - 4,5 & value\\ - \bottomrule - \end{tabular} - \caption{Send an SDS specification} + \begin{subfigure}[t]{.48\textwidth} + \begin{tabular}{ll} + \toprule + \multicolumn{2}{c}{Request}\\ + byte & value\\ + \midrule + 1 & \texttt{'t'}\\ + 2,3 & interval\\ + 4,5 & length (\texttt{n})\\ + 6 to n+6 & bytecode\\ + \midrule\midrule + \multicolumn{2}{c}{Response}\\ + byte & value\\ + \midrule + 1 & \texttt{'t'}\\ + 2,3 & task id\\ + \bottomrule + \end{tabular} + \caption{Send a task} + \end{subfigure} + \quad% + \begin{subfigure}[t]{.48\textwidth} + \begin{tabular}{ll} + \toprule + \multicolumn{2}{c}{Request}\\ + byte & meaning\\ + \midrule + 1 & \texttt{'d'}\\ + 2,3 & task id\\ + \midrule\midrule + \multicolumn{2}{c}{Response}\\ + byte & value\\ + \midrule + 1 & \texttt{'d'}\\ + 2,3 & task id\\ + \bottomrule + \end{tabular} + \caption{Delete a task} + \end{subfigure} + \caption{Message protocol for exchanging tasks} \end{table} -\begin{table}[ht] +\section{SDSs} +\begin{table}[!ht] \centering - \begin{tabular}{ll} - \toprule - byte & meaning\\ - \midrule - 1 & \texttt{'u'}\\ - 2,3 & sdsid\\ - 4,5 & value\\ - \bottomrule - \end{tabular} - \caption{SDS update} + \begin{subfigure}[t]{.2\textwidth} + \begin{tabular}{ll} + \toprule + \multicolumn{2}{c}{Request}\\ + byte & meaning\\ + \midrule + 1 & \texttt{'s'}\\ + 2,3 & identifier\\ + 4,5 & value\\ + \midrule\midrule + \multicolumn{2}{c}{Response}\\ + byte & meaning\\ + \midrule + 1 & \texttt{'s'}\\ + 2,3 & identifier\\ + \bottomrule + \end{tabular} + \caption{Send an SDS specification} + \end{subfigure} + \quad% + \begin{subfigure}[t]{.2\textwidth} + \begin{tabular}{ll} + \toprule + \multicolumn{2}{c}{Response}\\ + byte & value\\ + \midrule + 1 & \texttt{'a'}\\ + 2,3 & SDS id\\ + \midrule\midrule + \multicolumn{2}{c}{Request}\\ + byte & value\\ + \midrule + 1 & \texttt{'a'}\\ + 2,3 & SDS id\\ + \bottomrule + \end{tabular} + \caption{Delete a SDS} + \end{subfigure} + \quad% + \begin{subfigure}[t]{.2\textwidth} + \begin{tabular}{ll} + \toprule + \multicolumn{2}{c}{Request}\\ + byte & meaning\\ + \midrule + 1 & \texttt{'u'}\\ + 2,3 & sdsid\\ + 4,5 & value\\ + \midrule\midrule + \multicolumn{2}{c}{Response}\\ + \bottomrule + \end{tabular} + \caption{SDS update} + \end{subfigure} + \quad% + \begin{subfigure}[t]{.2\textwidth} + \begin{tabular}{ll} + \toprule + \multicolumn{2}{c}{Response}\\ + \midrule\midrule + \multicolumn{2}{c}{Request}\\ + byte & value\\ + \midrule + 1 & \texttt{'p'}\\ + 2,3 & SDS id\\ + 4,5 & value\\ + \bottomrule + \end{tabular} + \caption{SDS publish} + \end{subfigure} + \caption{Message protocol for exchanging SDSs} \end{table} - -\section{Client to Server} -\todo{Handshake reply} -\begin{table}[ht] - \centering - \begin{tabular}{ll} - \toprule - byte & value\\ - \midrule - 1 & \texttt{'t'}\\ - 2,3 & task id\\ - \bottomrule - \end{tabular} - \caption{Task acknowledgement} -\end{table} - -\begin{table}[ht] - \centering - \begin{tabular}{ll} - \toprule - byte & value\\ - \midrule - 1 & \texttt{'u'}\\ - 2,3 & SDS id\\ - 4,5 & value\\ - \bottomrule - \end{tabular} - \caption{SDS publish} -\end{table} - -\todo{SDS acknowledgement}