X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=appx%2Fmtask_aux.tex;h=3edf747cbf08259aa351999839d77928564a5e0e;hb=1241585df879e6723b374239bcc724cc5867621c;hp=28532c2acd6b0243ba989e87c4de162e1027daa9;hpb=529531e1028ae26ab889456d65958794154d5b25;p=phd-thesis.git diff --git a/appx/mtask_aux.tex b/appx/mtask_aux.tex index 28532c2..3edf747 100644 --- a/appx/mtask_aux.tex +++ b/appx/mtask_aux.tex @@ -65,7 +65,7 @@ class LightSensor v where \subsection{Motion detection sensor} The \gls{MTASK} language supports motion sensing using a \gls{PIR} sensor through a type class that only contains macros. \gls{PIR} sensors detect motion by the \gls{IR} reflection through a number of Fresnel lenses and communicates through a digital \gls{GPIO} pin. -Therefore, a \gls{PIR} is nothing more than a \cleaninline{DPIN} according to \gls{MTASK} but for uniformity, a type class is available (see \cref{lst:mtask_pir}). +Therefore, a \gls{PIR} is nothing more than a \cleaninline{DPin} according to \gls{MTASK} but for uniformity, a type class is available (see \cref{lst:mtask_pir}). \begin{lstClean}[label={lst:mtask_pir},caption={\Gls{PIR} sensor interface in \gls{MTASK}.}] :: PIR :== DPin @@ -85,8 +85,7 @@ Therefore, a sound detector is nothing more than a tuple of a \cleaninline{DPin} \begin{lstClean}[label={lst:mtask_sound},caption={Sound detection sensor interface in \gls{MTASK}.}] :: SoundDetector :== (DPin, APin) -class SoundDetector v | tupl, expr, pinMode v & dio DPin v -where +class SoundDetector v | tupl, expr, pinMode v & dio DPin v where soundDetector :: DPin APin ((v SoundDetector) -> Main (v b)) -> Main (v b) soundPresence` :: (TimingInterval v) (v SoundDetector) -> MTask v Bool @@ -134,31 +133,34 @@ class LEDMatrix v where \end{lstClean} \subsection{Connection types}\label{lst:connection_types} -\begin{lstClean}[caption={}] +The connection between the \gls{ITASK} server and the \gls{MTASK} devices are communication method agnostic. +As long as the \cleaninline{channelSync} type class is implemented, the communication method can be used. +\Cref{lst:conn_types} shows the data types for the connections. + +\begin{lstClean}[label={lst:conn_types},caption={Data types for the different connections in \gls{MTASK}.}] :: TCPSettings = { host :: String , port :: Int , pingTimeout :: ?Int } -:: MQTTSettings = +:: MQTTSettings = { host :: String , port :: Int , mcuId :: String , serverId :: String , auth :: MQTTAuth } -:: TTYSettings = { - devicePath :: String, - baudrate :: BaudRate, - bytesize :: ByteSize, - parity :: Parity, - stop2bits :: Bool, - xonxoff :: Bool, - sleepTime :: Int +:: TTYSettings = + { devicePath :: String + , baudrate :: BaudRate + , bytesize :: ByteSize + , parity :: Parity + , stop2bits :: Bool + , xonxoff :: Bool + , sleepTime :: Int } \end{lstClean} - \lstset{basicstyle=\tt} \input{subfilepostamble} \end{document}