remove student number
[ri1617.git] / architecture / commim.tex
1 The \iTasks{} server can send two types of messages. The first and most
2 important type is sending a new task to the server. Tasks are dynamically sent
3 to the microcontroller, this means that the engine in itself does not do
4 anything without it getting a task first from the server. When a task is sent
5 the microcontroller acknowledges the message by sending the associated task
6 identification number back to the for the server to use in the future.
7 The second task is sending SDS specifications to the engine to tell the engine
8 what type of SDS will be used in the tasks so that it can be allocated. The
9 message structure for sending a task is shown in Table~\ref{tbl:tasksend} and
10 the message of sending an SDS specification is shown in
11 Table~\ref{tbl:sdsspec}.
12 \begin{table}[ht]
13 \centering
14 \begin{tabular}{ll}
15 \toprule
16 Bytes & Description\\
17 \midrule
18 \multicolumn{2}{c}{\textbf{Request}}\\
19 $1$ & Task send code \verb#'t'#\\
20 $2-3$ & Frequency in number of milliseconds as a 16-bit integer\\
21 $4-5$ & Length of the bytecode 16-bit integer\\
22 $n$ & Bytecode for the task\\
23 \midrule
24 \multicolumn{2}{c}{\textbf{Response}}\\
25 $1$ & Task numeric identification\\
26 \bottomrule
27 \end{tabular}
28 \caption{Message format for sending a task}\label{tbl:tasksend}
29 \end{table}
30
31 \begin{table}[ht]
32 \centering
33 \begin{tabular}{ll}
34 \toprule
35 Bytes & Description\\
36 \midrule
37 \multicolumn{2}{c}{\textbf{Request}}\\
38 $1$ & SDS send code \verb#'s'#\\
39 $2-3$ & SDS length as a 16-bit integer\\
40 $2-3$ & Value of the SDS identifier\\
41 \midrule
42 \multicolumn{2}{c}{\textbf{Response}}\\
43 $1$ & SDS numeric identification\\
44 \bottomrule
45 \end{tabular}
46 \caption{Message format for sending an SDS specification}\label{tbl:sdsspec}
47 \end{table}