update
[ri1617.git] / architecture / commmi.tex
1 The only thing the microcontroller has to communicate back with the server is
2 an update of the SDS and a request for an SDS value.
3 Since all SDSs have a numeric identifier the engine can just send a request
4 message with the identifier to the server. A detailed description of the
5 message for sending and receiving SDSs is described in
6 Tables~\ref{tbl:sdssend},~\ref{tbl:sdsrecv}.
7
8 As said before, publication of SDS values is not done automatically to save
9 bandwidth. Therefore the tasks need to have a way of requesting the latest SDS
10 value and a way of publishing an updated value. This is elaborated more upon in
11 the next section.\todo{Type safety of SDS access}
12
13 \begin{table}[ht]
14 \centering
15 \begin{tabular}{ll}
16 \toprule
17 Bytes & Description\\
18 \midrule
19 $1$ & SDS send code \verb#'s'#\\
20 $2-3$ & SDS identifier as a 16-bit integer\\
21 $4-5$ & Length of the message 16-bit integer\\
22 $n$ & Value of the SDS identifier\\
23 \bottomrule
24 \end{tabular}
25 \caption{Message format for a SDS-send operation}\label{tbl:sdssend}
26 \end{table}
27
28 \begin{table}[ht]
29 \centering
30 \begin{tabular}{ll}
31 \toprule
32 Bytes & Description\\
33 \midrule
34 \multicolumn{2}{c}{\textbf{Request}}\\
35 $1$ & SDS send code \verb#'r'#\\
36 $2-3$ & SDS identifier as a 16-bit integer\\
37 \midrule
38 \multicolumn{2}{c}{\textbf{Response}}\\
39 $1-2$ & Length of the message as a 16-bit integer\\
40 $n$ & Value of the SDS\\
41 \bottomrule
42 \end{tabular}
43 \caption{Message format for a SDS-receive operation}\label{tbl:sdsrecv}
44 \end{table}