## 2 WirelessHART
### The IEEE 802.15.4 Physical Layer
#### 2.2.2 WirelessHART Routing  
The scheduling must be built over defined routes. WirelessHART possesses two main ways to route packets: graph routing and source routing. Graph in the WirelessHART context means a set of edges that connect the devices on the network. In graph routing, the edges are created by the network manager  
Figure 7: An example of scheduling on a simple topology.  
and downloaded to each device. The sender device writes a graph ID into the header of the message to send a packet. As the packets arrive at a station, that station forwards (or consumes, if the station is the final destination) the packet according to the previously stored data. Each intermediate device can be configured with multiple neighbors to help the packet's forwarding.  
In source routing, a single fixed route of devices is written by the source in the header of the packet. Then, each device in the route forwards the packet to the next specified device until the destination is reached. There are no alternate routes in this mode, so if any device fails on a route, the whole route fails. This is mostly used for network diagnostics.  
The authors in [48] present a comparative study between graph routing and source routing. A set of empirical tests on reliability, latency and energy consumption were conducted in a real test bed where WirelessHART was implemented in TinyOS and TelosB motes. The results show that graph routing performed better than source routing in terms of worst-case reliability, although this improvement came at the cost of a higher energy consumption and a longer latency.  
The WirelessHART protocol defines three types of graphs: broadcast, uplink and downlink. A broadcast graph links all devices downwards from the gateway to all devices on the network for the transmission of common messages and configuration commands. An uplink graph is a graph that connects all devices upwards to the gateway for transmitting process data. There is a downlink graph for each device in the network in order for the gateway to send unicast messages to each of them [41].  
Besides the aforementioned techniques, the WirelessHART specification does not define an algorithm to generate the uplink, downlink and broadcast graphs from the information on the neighbor tables [6]. The implementation of this algorithm is up to the developer. For the sake of comparison with the other technologies, the neighbor table is presented in Table 3.  
\begin{table}
\begin{tabular}{c l} \hline \hline
**Content** & **Description** \\ \hline NeighborUniqueId & Long address of the neighbor device \\ NeighborNichname & Short address of the neighbor device \\ Join priority & Depends on the data link layer PDUcontent \\ TimesourceFlag & Flag indication \\ Status & Status information regarding this neighbor \\ BOExp & Backoff exponent for shared link \\ BOCntr & Backoff countdown for shared link \\ LastTimeCommunicated & Last time communicated with this neighbor \\ TimePathFailureTimer & Cyclical path failure timer \\ AvgRSL & Average received signal level for packets received from neighbor \\ PacketsTransmitted & Number of packets transmitted to the neighbor \\ MissedAckPackets & Number of packets for which an expected ACK was not received \\ PacketsReceived & Number of packets received from the neighbor \\ BroadcastReceived & Number of broadcast packets received from the neighbor \\ \hline \hline \end{tabular}
\end{table}
Table 3: Neighbor table parameters [49].