update
[ri1617.git] / architecture / commmi.tex
diff --git a/architecture/commmi.tex b/architecture/commmi.tex
new file mode 100644 (file)
index 0000000..bf43762
--- /dev/null
@@ -0,0 +1,44 @@
+The only thing the microcontroller has to communicate back with the server is
+an update of the SDS and a request for an SDS value.
+Since all SDSs have a numeric identifier the engine can just send a request
+message with the identifier to the server. A detailed description of the
+message for sending and receiving SDSs is described in
+Tables~\ref{tbl:sdssend},~\ref{tbl:sdsrecv}.
+
+As said before, publication of SDS values is not done automatically to save
+bandwidth. Therefore the tasks need to have a way of requesting the latest SDS
+value and a way of publishing an updated value. This is elaborated more upon in
+the next section.\todo{Type safety of SDS access}
+
+\begin{table}[ht]
+       \centering
+       \begin{tabular}{ll}
+               \toprule
+               Bytes & Description\\
+               \midrule
+               $1$ & SDS send code \verb#'s'#\\
+               $2-3$ & SDS identifier as a 16-bit integer\\
+               $4-5$ & Length of the message 16-bit integer\\
+               $n$ & Value of the SDS identifier\\
+               \bottomrule
+       \end{tabular}
+       \caption{Message format for a SDS-send operation}\label{tbl:sdssend}
+\end{table}
+
+\begin{table}[ht]
+       \centering
+       \begin{tabular}{ll}
+               \toprule
+               Bytes & Description\\
+               \midrule
+               \multicolumn{2}{c}{\textbf{Request}}\\
+               $1$ & SDS send code \verb#'r'#\\
+               $2-3$ & SDS identifier as a 16-bit integer\\
+               \midrule
+               \multicolumn{2}{c}{\textbf{Response}}\\
+               $1-2$ & Length of the message as a 16-bit integer\\
+               $n$ & Value of the SDS\\
+               \bottomrule
+       \end{tabular}
+       \caption{Message format for a SDS-receive operation}\label{tbl:sdsrecv}
+\end{table}