Browse Source

Added figure and fixed listings

master
Christian Pape 7 years ago
parent
commit
5bf20704f5
  1. 7
      3-environment.tex
  2. 6
      5-1-update_mechanism.tex
  3. 6
      5-2-multidevice_build_structure.tex
  4. BIN
      topology.graffle/data.plist
  5. BIN
      topology.graffle/image2.pdf
  6. 746
      topology.graffle/image4.pdf
  7. BIN
      topology.pdf

7
3-environment.tex

@ -14,9 +14,16 @@ These boards provide a Microcontroller Unit (MCU) fast enough for all required s
The software is based on the \textit{Sming}\cite{Sming} library, which in turn is based on the open source SDK for \textit{ESP8266} and integrates a lot of other software components for easy use.
To build the software, a \textit{Makefile}\cite{make} is used, which provides a simple way for reproducible builds.
The base topology used is shown in figure \ref{fig:topology}.
For communication with the controller, the \textit{MQTT}\cite{MQTT} protocol is used.
It provides a lightweight messaging mechanism implementing the publish-subscribe pattern that allows devices to listen for commands and publish their current state to the controller and other interested parties.
The controller software has out-of-the-box support for this protocol, which allows easy integration of all different device types using the same patterns.
\begin{figure}[htbp]
\centering\includegraphics[width=0.4\textwidth]{topology.pdf}
\caption{The base network topology.}
\label{fig:topology}
\end{figure}
The components all share the same configuration in regard to the network access and the controller to communicate with.
The configuration is provided during build time, which eschews the need for a configuration interface and reduces the management overhead, thus minimizing security leaks.

6
5-1-update_mechanism.tex

@ -72,17 +72,17 @@ The unused gap of 8192 bytes is used by some applications to store data which ca
\begin{lstlisting}[caption={The flash layout used for two ROMs.},
label=lst:choosing_rom, basicstyle=\ttfamily\scriptsize]
#define UPDATER_URL_ROM(slot) (( UPDATER_URL "/" DEVICE ".rom" slot ))
#define URL_ROM(slot) (( URL "/" DEVICE ".rom" slot ))
// Select rom slot to flash
const auto& bootconf = rboot_get_config();
// Add items to flash
if (bootconf.current_rom == 0) {
updater.addItem(bootconf.roms[1], UPDATER_URL_ROM("1"));
updater.addItem(bootconf.roms[1], URL_ROM("1"));
updater.switchToRom(1);
} else {
updater.addItem(bootconf.roms[0], UPDATER_URL_ROM("0"));
updater.addItem(bootconf.roms[0], URL_ROM("0"));
updater.switchToRom(0);
}
\end{lstlisting}

6
5-2-multidevice_build_structure.tex

@ -40,9 +40,9 @@ Listing~\ref{lst:create_device_socket} shows the complete device specific code u
Device device:
constexpr const char SOCKET_NAME[] = "socket";
constexpr const uint16_t SOCKET_GPIO = 12;
OnOffFeature<SOCKET_NAME, SOCKET_GPIO, false, 1> socket(&device);
constexpr const char NAME[] = "socket";
constexpr const uint16_t GPIO = 12;
OnOffFeature<NAME, GPIO, false, 1> socket(&device);
Device* getDevice() {
return &device;

BIN
topology.graffle/data.plist

BIN
topology.graffle/image2.pdf

746
topology.graffle/image4.pdf
File diff suppressed because it is too large
View File

BIN
topology.pdf

Loading…
Cancel
Save