## 4 Architecture and Implementation
### AR User Interface  
We designed an AR graphic user interface (GUI) to exemplify the possibility of good user experience with the system. The GUI is used to read and update information in the cloud infrastructure. One of the main advantages of using AR along with a dynamic anchor is the possibility of visualizing real-time data by simply pointing the user terminal to the target object (node), even when a connection with the backbone network is not available. For that purpose, the terminal receives the following data through an optical channel:  
* ID number of the node. * Status code of the node. * Average power consumption over the last measuring period. All of this information can be displayed as soon as the node is detected and the VLC message is decoded. The transmitted message is composed of a three-byte node ID, followed by an eight-bit status code (\(0x00\) meaning OK) and a 16-bit integer value representing average power consumption (Table 1). As shown in Figure 11, the information is presented to the user as follows:  
1. GUI background 1. The actual image captured by the device camera is shown as the GUI background. 2. AR superimposed information. \begin{table}
\begin{tabular}{l c c c c} \hline
**SOF** & **Byte 0** & **Byte 1** & **Byte 2** & **Byte 3** & **Byte 4** & **Byte 5** \\ \hline
0x00 & & Node ID & Status code & Average energy \\ \hline \end{tabular}
\end{table} 
Table 1: Visible light communication (VLC) message fields. SOF, start-of-frame. Figure 10: 6 LowPAN protocol stack. 1. Node ID: The top-left corner of the screen shows the unique identification number of the detected node. This allows interaction with the node through the cloud. 2. Node status: This represents the current status of the target node. A semi-transparent color-coded rectangle is used, spread between the four corners of the dynamic anchor. It also acts as a button to get extended information. The color of the square is related to node status: 1. Green: All of the electrical features of the node are correct. 2. Yellow: A problem has not yet been detected, but the readings exceed the normal ranges. A maintenance worker should check the node to prevent further damage. 3. Red: The node has a problem with one or more of its connections. A maintenance worker should repair the panel. 4. Average power: The bottom-left corner displays the average power consumption measured over the last measurement period. 5. Location map: A semi-transparent map is displayed in the top-right corner of the screen showing the maintenance worker the location of the problem. This information is recovered from the cloud services if available. Otherwise, the map is not shown. This general GUI provides a quick overview of what is happening inside the target node. Nevertheless, the proposed system has much more potential, which can be exploited with a GUI mode with finer detail. In order to access this detailed information, an extended interface is proposed that would be displayed by touching the colored zone over the dynamic anchor image. Figure 12 shows an example for the design of this finer GUI. Figure 11: Information presented to the user via the AR GUI. When the maintenance worker changes the view from general to detailed information, the incoming information is fed to the terminal in a different way. Whilst general data are mainly received through optical (VLC) means, detailed information is retrieved by querying the cloud with the corresponding node ID. In our example, each electrical panel has several wired connections, and the GUI shows their individual power consumption, status and the procedure for closing or opening the connection. To this end, the relative position of the node with respect to the dynamic anchor is used as a reference to form a grid. Some of the panel's cells will contain a connection, easily identified by the grid coordinates, and can be selected to obtain more detailed information. By dividing the electrical panel image in cells, it is easy to show which connections are functioning properly and which need to be repaired.