more updates
[phd-thesis.git] / appx / mtask_aux.tex
index 4a87974..019e0cf 100644 (file)
@@ -1,10 +1,9 @@
 \documentclass[../thesis.tex]{subfiles}
 
-\begin{document}
-\ifSubfilesClassLoaded{
-       \pagenumbering{arabic}
-}{}
+\input{subfilepreamble}
 
+\begin{document}
+\input{subfileprefix}
 \chapter{Auxiliary \texorpdfstring{\glsentrytext{MTASK}}{mTask} type classes}%
 \label{chp:mtask_aux}
 \lstset{basicstyle=\tt\footnotesize}
@@ -97,7 +96,7 @@ where
 \end{lstClean}
 
 \subsection{\texorpdfstring{\gls{I2C}}{I\textsuperscript{2}C} buttons}
-The \gls{MTASK} language supports one type of \gls{I2C} buttons (the \gls{I2C} buttons from the WEMOS d1 mini \gls{OLED} shield).
+The \gls{MTASK} language supports one type of \gls{I2C} buttons (the \gls{I2C} buttons from the \gls{WEMOS} d1 mini \gls{OLED} shield).
 The buttons from this shield provide more information than just the status (see \cleaninline{ButtonStatus}).
 The complete interface containing the constructor and the measurement tasks is shown in \cref{lst:mtask_i2cbutton}.
 
@@ -116,7 +115,7 @@ class i2cbutton v where
 \end{lstClean}
 
 \subsection{\texorpdfstring{\gls{LED}}{LED} matrix}
-The \gls{MTASK} language supports one type of \gls{LED} matrix (the $8\times8$ \gls{LED} matrix shield for the WEMOS d1 mini).
+The \gls{MTASK} language supports one type of \gls{LED} matrix (the $8\times8$ \gls{LED} matrix shield for the \gls{WEMOS} d1 mini).
 Instead of containing a \gls{TOP}-like interface, the \gls{ARDUINO} interface is directly translated to \gls{MTASK}.
 As a result, every task immediately returns a stable value indicating the result.
 The complete interface containing the constructor and the interaction tasks is shown in \cref{lst:mtask_ledmatrix}.
@@ -133,6 +132,46 @@ class LEDMatrix v where
        LMDisplay :: (v LEDMatrix) -> MTask v ()
 \end{lstClean}
 
+\subsection{Connection types}\label{lst:connection_types}
+\begin{lstClean}[caption={}]
+:: TCPSettings =
+       { host :: String
+       //** host name
+       , port :: Int
+       //** port number
+       , pingTimeout :: ?Int
+       //** Require a ping signal every so many seconds
+       }
+:: MQTTSettings = 
+       { host  :: String
+       //** Host name
+       , port  :: Int
+       //** Port number
+       , mcuId :: String
+       //** Identifier for the device
+       , serverId :: String
+       //** Identifier for the server
+       , auth :: MQTTAuth
+       //** Authentication type
+       }
+:: TTYSettings = {
+               devicePath :: String,
+               //* Path of the device, e.g. /dev/ttyACM0
+               baudrate :: BaudRate,
+               //* Baudrate
+               bytesize :: ByteSize,
+               //* Parity
+               parity :: Parity,
+               //* stop2bits
+               stop2bits :: Bool,
+               //* xonxoff flow control
+               xonxoff :: Bool,
+               //* Time in seconds to wait after opening the devices. Set this to 2 if you want to connect to a borked arduino
+               sleepTime :: Int
+       }
+\end{lstClean}
+
+
 \lstset{basicstyle=\tt}
 \input{subfilepostamble}
 \end{document}