#LyX 2.3 created this file. For more info see http://www.lyx.org/ \lyxformat 544 \begin_document \begin_header \save_transient_properties true \origin unavailable \textclass article \begin_preamble \usepackage{color} \definecolor{commentgreen}{RGB}{0,94,11} \end_preamble \use_default_options true \begin_modules customHeadersFooters \end_modules \maintain_unincluded_children false \language english \language_package default \inputencoding auto \fontencoding global \font_roman "default" "default" \font_sans "default" "default" \font_typewriter "default" "default" \font_math "auto" "auto" \font_default_family default \use_non_tex_fonts false \font_sc false \font_osf false \font_sf_scale 100 100 \font_tt_scale 100 100 \use_microtype false \use_dash_ligatures true \graphics default \default_output_format default \output_sync 0 \bibtex_command default \index_command default \paperfontsize default \spacing single \use_hyperref true \pdf_title "IoT Aggregation Algorithm Coursework" \pdf_author "Andy Pack" \pdf_subject "IoT" \pdf_bookmarks true \pdf_bookmarksnumbered false \pdf_bookmarksopen false \pdf_bookmarksopenlevel 1 \pdf_breaklinks true \pdf_pdfborder true \pdf_colorlinks false \pdf_backref false \pdf_pdfusetitle true \papersize default \use_geometry true \use_package amsmath 1 \use_package amssymb 1 \use_package cancel 1 \use_package esint 1 \use_package mathdots 1 \use_package mathtools 1 \use_package mhchem 1 \use_package stackrel 1 \use_package stmaryrd 1 \use_package undertilde 1 \cite_engine basic \cite_engine_type default \biblio_style plain \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \justification true \use_refstyle 1 \use_minted 0 \index Index \shortcut idx \color #008000 \end_index \leftmargin 1cm \topmargin 1.5cm \rightmargin 1cm \bottommargin 1.5cm \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \paragraph_indentation default \is_math_indent 0 \math_numbering_side default \quotes_style english \dynamic_quotes 0 \papercolumns 1 \papersides 1 \paperpagestyle fancy \tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict false \end_header \begin_body \begin_layout Left Header IoT Aggregation Algorithm Coursework \end_layout \begin_layout Left Footer November 2020 \end_layout \begin_layout Right Footer Andy Pack / 6420013 \end_layout \begin_layout Standard \begin_inset CommandInset toc LatexCommand lstlistoflistings \end_inset \begin_inset CommandInset include LatexCommand lstinputlisting filename "../Coursework/coursework.c" lstparams "breaklines=true,frame=tb,language=C,basicstyle={\\ttfamily},commentstyle={\\color{commentgreen}\\itshape},keywordstyle={\\color{blue}},emphstyle={\\color{red}},stringstyle={\\color{red}},identifierstyle={\\color{cyan}},otherkeywords={PROCESS_THREAD, PROCESS_BEGIN, PROCESS_END, etimer_set, process_alloc_event, initIO, getBuffer, PROCESS_WAIT_EVENT, PROCESS_WAIT_EVENT_UNTIL, leds_off, leds_on, getLight, printf, putFloat, putchar, process_post, etimer_reset, etimer_stop, handleSAXBufferRotation, handleSimpleBufferRotation, free, freeBuffer, calculateStdDev, handleFinalBuffer, ceil, normaliseBuffer, aggregateBuffer, printBuffer, stringifyBuffer, swapBufferMemory, malloc, calculateMean, valueToSAXChar, sqrt},caption={Main coursework program: 2 processes for reading and aggregating data}" \end_inset \end_layout \begin_layout Standard \begin_inset Newpage pagebreak \end_inset \end_layout \begin_layout Standard \begin_inset CommandInset include LatexCommand lstinputlisting filename "../Coursework/buffer.h" lstparams "breaklines=true,frame=tb,language=C,basicstyle={\\ttfamily},commentstyle={\\color{commentgreen}\\itshape},keywordstyle={\\color{blue}},emphstyle={\\color{red}},stringstyle={\\color{red}},identifierstyle={\\color{cyan}},otherkeywords={PROCESS_THREAD, PROCESS_BEGIN, PROCESS_END, etimer_set, process_alloc_event, initIO, getBuffer, PROCESS_WAIT_EVENT, PROCESS_WAIT_EVENT_UNTIL, leds_off, leds_on, getLight, printf, putFloat, putchar, process_post, etimer_reset, etimer_stop, handleSAXBufferRotation, handleSimpleBufferRotation, free, freeBuffer, calculateStdDev, handleFinalBuffer, ceil, normaliseBuffer, aggregateBuffer, printBuffer, stringifyBuffer, swapBufferMemory, malloc, calculateMean, valueToSAXChar, sqrt},caption={Buffer header file: get, free and manipulate buffers}" \end_inset \begin_inset Newpage pagebreak \end_inset \end_layout \begin_layout Standard \begin_inset CommandInset include LatexCommand lstinputlisting filename "../Coursework/sax.h" lstparams "breaklines=true,frame=tb,language=C,basicstyle={\\ttfamily},commentstyle={\\color{commentgreen}\\itshape},keywordstyle={\\color{blue}},emphstyle={\\color{red}},stringstyle={\\color{red}},identifierstyle={\\color{cyan}},otherkeywords={PROCESS_THREAD, PROCESS_BEGIN, PROCESS_END, etimer_set, process_alloc_event, initIO, getBuffer, PROCESS_WAIT_EVENT, PROCESS_WAIT_EVENT_UNTIL, leds_off, leds_on, getLight, printf, putFloat, putchar, process_post, etimer_reset, etimer_stop, handleSAXBufferRotation, handleSimpleBufferRotation, free, freeBuffer, calculateStdDev, handleFinalBuffer, ceil, normaliseBuffer, aggregateBuffer, printBuffer, stringifyBuffer, swapBufferMemory, malloc, calculateMean, valueToSAXChar, sqrt},caption={SAX header file: z-normalise and stringify buffers}" \end_inset \begin_inset Newpage pagebreak \end_inset \end_layout \begin_layout Standard \begin_inset CommandInset include LatexCommand lstinputlisting filename "../Coursework/math.h" lstparams "breaklines=true,frame=tb,language=C,basicstyle={\\ttfamily},commentstyle={\\color{commentgreen}\\itshape},keywordstyle={\\color{blue}},emphstyle={\\color{red}},stringstyle={\\color{red}},identifierstyle={\\color{cyan}},otherkeywords={PROCESS_THREAD, PROCESS_BEGIN, PROCESS_END, etimer_set, process_alloc_event, initIO, getBuffer, PROCESS_WAIT_EVENT, PROCESS_WAIT_EVENT_UNTIL, leds_off, leds_on, getLight, printf, putFloat, putchar, process_post, etimer_reset, etimer_stop, handleSAXBufferRotation, handleSimpleBufferRotation, free, freeBuffer, calculateStdDev, handleFinalBuffer, ceil, normaliseBuffer, aggregateBuffer, printBuffer, stringifyBuffer, swapBufferMemory, malloc, calculateMean, valueToSAXChar, sqrt},caption={Math header file: mean, standard deviation, implementations of ceil, sqrt}" \end_inset \begin_inset Newpage pagebreak \end_inset \end_layout \begin_layout Standard \begin_inset CommandInset include LatexCommand lstinputlisting filename "../Coursework/io.h" lstparams "breaklines=true,frame=tb,language=C,basicstyle={\\ttfamily},commentstyle={\\color{commentgreen}\\itshape},keywordstyle={\\color{blue}},emphstyle={\\color{red}},stringstyle={\\color{red}},identifierstyle={\\color{cyan}},otherkeywords={PROCESS_THREAD, PROCESS_BEGIN, PROCESS_END, etimer_set, process_alloc_event, initIO, getBuffer, PROCESS_WAIT_EVENT, PROCESS_WAIT_EVENT_UNTIL, leds_off, leds_on, getLight, printf, putFloat, putchar, process_post, etimer_reset, etimer_stop, handleSAXBufferRotation, handleSimpleBufferRotation, free, freeBuffer, calculateStdDev, handleFinalBuffer, ceil, normaliseBuffer, aggregateBuffer, printBuffer, stringifyBuffer, swapBufferMemory, malloc, calculateMean, valueToSAXChar, sqrt},caption={IO header file: init function for starting sensors}" \end_inset \begin_inset Newpage pagebreak \end_inset \end_layout \begin_layout Standard \begin_inset CommandInset include LatexCommand lstinputlisting filename "../Coursework/util.h" lstparams "breaklines=true,frame=tb,language=C,basicstyle={\\ttfamily},commentstyle={\\color{commentgreen}\\itshape},keywordstyle={\\color{blue}},emphstyle={\\color{red}},stringstyle={\\color{red}},identifierstyle={\\color{cyan}},otherkeywords={PROCESS_THREAD, PROCESS_BEGIN, PROCESS_END, etimer_set, process_alloc_event, initIO, getBuffer, PROCESS_WAIT_EVENT, PROCESS_WAIT_EVENT_UNTIL, leds_off, leds_on, getLight, printf, putFloat, putchar, process_post, etimer_reset, etimer_stop, handleSAXBufferRotation, handleSimpleBufferRotation, free, freeBuffer, calculateStdDev, handleFinalBuffer, ceil, normaliseBuffer, aggregateBuffer, printBuffer, stringifyBuffer, swapBufferMemory, malloc, calculateMean, valueToSAXChar, sqrt, putShort},caption={Other utilities: short and float printing functions from earlier labs}" \end_inset \end_layout \end_body \end_document