\toprule
Bytes & Description\\
\midrule
+ \multicolumn{2}{c}{\textbf{Request}}\\
$1$ & SDS send code \verb#'s'#\\
$2-3$ & SDS identifier as a 16-bit integer\\
$4-5$ & Length of the message 16-bit integer\\
This paper describes the effort to add another type of leaf task that
focusses on microcontrollers. Microcontrollers are often not powerful
enough to run a full-fledged task server and therefore there is the need to
-introduce special microcontroller tasks. Effort for this is already made by by
-the department~\cite{koopman_tasks_2016}. However, communication between the
-\emph{mTask} and the iTasks system is still lacking and exactly that will be the
-goal of the project. This requires adding a new type of leaf task that allows
-the user to run \emph{mTasks} on microcontrollers. The leaf task should
+introduce special microcontroller tasks. Effort for this is already made by the
+department~\cite{koopman_tasks_2016}. However, communication between the
+\emph{mTask} and the iTasks system is still lacking and exactly that will be
+the goal of the project. This requires adding a new type of leaf task that
+allows the user to run \emph{mTasks} on microcontrollers. The leaf task should
abstract away from communication techniques and it should be relatively easy to
add techniques. Techniques that are interesting to experiment with is Serial
communication, Bluetooth, \textsc{WiFi}, \textsc{GSM} and \textsc{LoRa}.
-\mTask{}s describe a task in an imperative way and allow the functionality of
-the embedded device to be attached to an \iTasks{} system.
+In short, \mTask{}s are imperative tasks that are executed on the
+microcontroller and therefore add the functionality of the embedded device to
+an \iTasks{} system.
\subsubsection{\iTasks{} task}
-\mTask{}s are no regular tasks in the sense that they can be combined with task
+\mTask{}s are not regular tasks, they can not be combined with task
combinators. Moreover \mTask{}s can not communicate directly with each other or
with the server. Indirect communication is possible through a special type of
SDSs that lives solely within the mother task and the microcontroller.
\end{lstlisting}
\subsubsection{Shared Data Sources}
+\todo{redo this for push updates from server}
+\todo{say something about type constraints of SDSs}
+\todo{explain why there is no update function(closure, bytecode}
\mTask{}s can use SDSs for means of storing information and for communicating
back to the server. Communication can be slow and therefore SDSs are only
updated when a task specifically asks for it through the bytecode instructions
\subsection{Classes}
To make the DSL easily extendable with functionality without losing
-extendability of views it as a set of classes that can be implemented by any
-data type.
+extendability of views it is defined as a set of classes that can be
+implemented by any data type.
Arithmetic operations and boolean operators are defined respectively in the
\CI{arith} and \CI{boolExpr} class. Note that the functions defined by the
type to keep track of some information during bytecode compilation.
\begin{lstlisting}[language=Clean,label={lst:bytecode}]
- :: ByteCode a p = BC [BC]
- class toByteCode a :: a -> [Char]
+:: BC
+ = BCNop
+ | BCPush Int
+ | BCPop
+ ...
+
+:: ByteCode a p = BC [BC]
+class toByteCode a :: a -> [Char]
\end{lstlisting}