update ignore en update itask gedeelte
[ri1617.git] / architecture / itasks.tex
index 8747721..98683e7 100644 (file)
@@ -1,2 +1,26 @@
+\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}