We can divide the communication up into two parts. Communication from the
\iTasks{} server to the microcontroller and vice versa. The means of
communicating are unimportant, this can be TCP, Serial or any other
-communication method that sends data in a linear way.
+communication method that sends data in a linear way. It must be noted that the
+communication is not necessarily fast and thus these resources are scarce.
+Therefore the architecture tries to minimize the usage of communication
+resources.
\subsubsection{\iTasks{} $\rightarrow$ microcontroller}
\input{commim.tex}
+\subsubsection{\iTasks{} task}
To make the integration of \mTask{}s in \iTasks{} more orthogonal we need a
-special kind of task that serves as a mothertask
+special kind of task that serves as a mothertask that has the type visible in
+Listing~\ref{lst:mothertask}. At first the system must be initialized with the
+first given function. This will setup the necessary communication tasks and
+SDSs used for interal storage and communication. This task is automatically
+started when the system boots up. To add a task one has to call \CI{addmTask}
+which will send the task to the system and evaluate it. Currently the only way
+of getting info back is through SDSs that are used in the \mTask. Some tasks
+are designed to run indefinite, for example temperature monitoring, and to
+remove them the \CI{delmTask} function is introduced that will remove the task
+and return a success value.
+
+\begin{lstlisting}[language=Clean,label={lst:mothertask}]
+mTask :: DeviceSpec -> Task ()
+addmTask :: (ByteCode a p) -> Task Int
+delmTask :: Int -> Task Bool
+\end{lstlisting}
+
+\subsubsection{Shared Data Sources}
+\mTask{}s can use SDSs for means of storing information and for communicating
+with the server. Communication can be slow and therefore SDSs are only updated
+when a task specifically asks for it through the bytecode instructions for
+publishing and getting SDS values.
+
+\todo{Uitleg over synchronisatie als de sds op de server veranderd}