From 344b753c5841c834b8b3e2320c3b1d57cde6130e Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Wed, 14 Dec 2016 15:36:49 +0100 Subject: [PATCH] add comments to the source --- architecture/commmi.tex | 1 + architecture/intro.tex | 15 ++++++++------- architecture/itasks.tex | 5 ++++- architecture/mtasks.tex | 14 ++++++++++---- 4 files changed, 23 insertions(+), 12 deletions(-) diff --git a/architecture/commmi.tex b/architecture/commmi.tex index bf43762..956ef85 100644 --- a/architecture/commmi.tex +++ b/architecture/commmi.tex @@ -16,6 +16,7 @@ the next section.\todo{Type safety of SDS access} \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\\ diff --git a/architecture/intro.tex b/architecture/intro.tex index d5d9b30..eecb2fa 100644 --- a/architecture/intro.tex +++ b/architecture/intro.tex @@ -11,14 +11,15 @@ the so called editors. 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. diff --git a/architecture/itasks.tex b/architecture/itasks.tex index cbda838..8f6fc09 100644 --- a/architecture/itasks.tex +++ b/architecture/itasks.tex @@ -1,5 +1,5 @@ \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. @@ -30,6 +30,9 @@ delmTask :: Int -> Task Bool \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 diff --git a/architecture/mtasks.tex b/architecture/mtasks.tex index be43d3c..34a1615 100644 --- a/architecture/mtasks.tex +++ b/architecture/mtasks.tex @@ -14,8 +14,8 @@ managing tasks. \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 @@ -47,6 +47,12 @@ In the future a state will probably need to be added to the \CI{Bytecode} 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} -- 2.20.1