From: Mart Lubbers Date: Mon, 19 Jun 2017 13:46:41 +0000 (+0200) Subject: update spec yet again X-Git-Tag: hand-in~73 X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=36f73f706a2a868597bf92be7a3a3fd1a23444c3;p=msc-thesis1617.git update spec yet again --- diff --git a/appendix-device-interface.tex b/appendix-device-interface.tex index d4872a8..991a794 100644 --- a/appendix-device-interface.tex +++ b/appendix-device-interface.tex @@ -1 +1 @@ -\lstinputlisting[language=C,caption{Full device interface}]{listings/interface.h} +\lstinputlisting[language=C,caption={Full device interface}]{listings/interface.h} diff --git a/appendix-protocol.tex b/appendix-protocol.tex index 3936588..41e82d0 100644 --- a/appendix-protocol.tex +++ b/appendix-protocol.tex @@ -4,10 +4,34 @@ easier. 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. +the message is not acknowledged or responded upon. Multibyte values are +interpreted as \gls{MSB} first integers. \section{Handshake} -\todo{Handshake, here the client tells the server what they can do} +\begin{table}[!ht] + \centering + \begin{subfigure}[t]{.48\textwidth} + \begin{tabular}{ll} + \toprule + \multicolumn{2}{c}{Request}\\ + byte & value\\ + \midrule + 1 & \texttt{'c'}\\ + \midrule\midrule + \multicolumn{2}{c}{Response}\\ + byte & value\\ + \midrule + 1 & \texttt{'c'}\\ + 2 & Peripheral bitmask\\ + 3,4 & Bytes of memory\\ + 5,6 & Size of the stack\\ + 7 & Number of analog pins\\ + 8 & Number of digital pins\\ + \bottomrule + \end{tabular} + \caption{Send a device specification} + \end{subfigure} +\end{table} \newpage \section{mTasks} diff --git a/glossaries.tex b/glossaries.tex index d76add4..cc00596 100644 --- a/glossaries.tex +++ b/glossaries.tex @@ -57,3 +57,4 @@ \newglossacr{SDS} {Shared Data Source} \newglossacr{TCP} {Transmission Control Protocol} \newglossacr{TOP} {Task Oriented Programming} +\newglossacr{MSB} {Most Significant Byte} diff --git a/listings/interface.h b/listings/interface.h index 1903941..7b199b1 100644 --- a/listings/interface.h +++ b/listings/interface.h @@ -6,6 +6,8 @@ #include #ifdef LINUX +#define APINS 7 +#define DPINS 14 #define STACKSIZE 1024 #define MEMSIZE 1024 #define HAVELED 1 diff --git a/results.arch.tex b/results.arch.tex index d5deda2..cbd0788 100644 --- a/results.arch.tex +++ b/results.arch.tex @@ -72,7 +72,7 @@ the server will send a request for specification. The client will serialize his specification and send it to the server so that the server knows what the client is capable of. The exact specification is shown in Listing~\ref{lst:devicespec} and stores the peripheral availability, the memory -available for storing \glspl{Task} and \glspl{SDS}. +available for storing \glspl{Task} and \glspl{SDS} and the size of the stack. \begin{lstlisting}[label={lst:devicespec}, caption={Device specification for \glspl{mTask}}] @@ -80,9 +80,10 @@ available for storing \glspl{Task} and \glspl{SDS}. { haveLed :: Bool , haveAio :: Bool , haveDio :: Bool + , bytesMemory :: Int + , stackSize :: Int , aPins :: Int , dPins :: Int - , bytesMemory :: Int } \end{lstlisting}