From: Mart Lubbers Date: Wed, 17 May 2017 12:34:51 +0000 (+0200) Subject: add bit about communication X-Git-Tag: hand-in~125 X-Git-Url: https://git.martlubbers.net/?a=commitdiff_plain;h=c701de5fbdb875ad9c2257f6fb54ebc8f7805d77;p=msc-thesis1617.git add bit about communication --- diff --git a/methods.arch.tex b/methods.arch.tex index b556398..cd9918d 100644 --- a/methods.arch.tex +++ b/methods.arch.tex @@ -55,3 +55,33 @@ of. The exact specification is listed in Listing~\ref{lst:devicespec} \todo{Explain specification, combine task and share space} \subsection{Communication} +The communication to and fro a device runs via a single \gls{SDS}. Every +device has a specific resource that is used to connect to the device. The +current system supports connecting devices via a serial connection and via a +\gls{TCP} connection. Every device has the type \CI{MTaskDevice} and which +is listed in Listing~\ref{lst:mtaskdevice}. When a device is added a background +task is started that runs the \CI{synFun}. The \CI{synFun} is the task that +synchronizes the channel \gls{SDS} with the actual device. For the \gls{TCP} +device this is a simple \CI{tcpconnect}. The \CI{TaskId} of the background task +is saved to be able to stop the task in the future. When the task is unable to +connect it will set the \CI{deviceError} field to notify the user. +\todo{netter maken} + +\begin{lstlisting}[language=Clean,caption={Device type},label={lst:mtaskdevice}] +:: Channels :== ([MTaskMSGRecv], [MTaskMSGSend], Bool) +:: MTaskResource + = TCPDevice TCPSettings + | SerialDevice TTYSettings +:: MTaskDevice = + { deviceTask :: Maybe TaskId + , deviceError :: Maybe String + , deviceChannels :: String + , deviceName :: String + , deviceTasks :: [MTaskTask] + , deviceData :: MTaskResource + , deviceSpec :: Maybe MTaskDeviceSpec + } + +class MTaskDuplex a where + synFun :: a (Shared Channels) -> Task () +\end{lstlisting} diff --git a/thesis.tex b/thesis.tex index d6f9973..eb150e9 100644 --- a/thesis.tex +++ b/thesis.tex @@ -12,6 +12,7 @@ \newacronym{ARM}{ARM}{Acorn \acrshort{RISC} Machine} \newacronym{LTN}{LTN}{Low Throughput Network} \newacronym{IDE}{IDE}{Integrated Development Environment} +\newacronym{TCP}{TCP}{Transmission Control Protocol} \newglossaryentry{Clean}{name=Clean, description={is a pure lazy functional programming language based on graph rewriting}} @@ -57,7 +58,7 @@ \tableofcontents \mainmatter{} -\glsresetall +\glsresetall{} \chapter{Introduction}\label{chp:introduction} \input{introduction.tex} @@ -77,8 +78,8 @@ \chapter{Device client interface}\label{app:device-interface} \input{appendix-device-interface.tex} -\cleardoublepage -\phantomsection +\cleardoublepage{} +\phantomsection{} \addcontentsline{toc}{chapter}{List of \ldots} \begingroup \let\clearpage\relax @@ -87,7 +88,7 @@ \lstlistoflistings{} \endgroup -\cleardoublepage +\cleardoublepage{} \addcontentsline{toc}{chapter}{Glossaries \& Acronyms} \begingroup