## 4 DASH7 Alliance Mode
### Component Structure and Operation  
The D7 AM is structured following the seven layers of the OSI model, as depicted in Figure 6. However, contrary to other protocols, where layer responsibilities are well-defined and isolated to  
Figure 5: Measured current draw on a TelosB mote. (**a**) Idle listen and off slots; (**b**) transmission and reception slots.  
ensure replaceability, the functionalities of each layer in D7 AM are tightly coupled together to provide the means of configuring the protocol operation to suit application requirements. In that sense, the parameters defined in the indexed short file block (ISFB) at the application layer are used to configure the channel scan series and the beacon transmit series at the data-link layer, as well as the channel identifier at the physical layer. Moreover, the values of the ISFB can be remotely read or written, thus providing the means of reconfiguring the operation of a node. This enables to update the operation of the node on-demand to adapt to the specific requirements of each sensing application. For example, nodes of a distributed sensing application to monitor fire in a forest may be configured to operate using a push model, where they remain completely silent to save energy, unless a sensor event is detected. However, upon detecting fire, the nodes in the network can be reconfigured to provide periodic updates to enable the monitoring of the advance of the fire. Such an update in the network operation is only a matter of writing to the appropriate file in the ISFB, which can be done through standardized commands.  
Despite the fact that layers are tightly coupled together, the D7 AM standard does not define how each component of the stack is implemented. Typically, D7 AM is implemented as a scheduler that executes tasks based on the current time and their relative priority. For example, a channel scan series at the data-link layer is represented as a series of tasks that are executed by the scheduler in order, one after the other. In addition to the channel identifier and the scan type, either background or foreground, each task in a channel scan series contains the scan timeout and the time until the next scan event. Using such data, the scheduler can determine which task to execute until a frame is successfully received or the process is stopped by an upper layer. Therefore, when a task begins execution, it configures the physical layer with the appropriate parameters, e.g., to receive a background or foreground frame in a given channel, and when it finishes, it triggers the appropriate follow-up actions, e.g., pass the packet to upper layers for further processing if a frame has been successfully received or execute the next scan event if no packet has been successfully received.  
Figure 6: Stack organization of DASH7 Alliance Mode.  
Currently, a reference implementation of D7 AM supported by the DASH7 Alliance already exists. OSS-7 (open source stack) [22], lead by the CoSys-Lab (constrained systems laboratory) of the University of Antwerp, is an open source project that implements the D7 AM standard and is licensed under an LGLP (GNU Lesser General Public License) license. The project is divided into each of the OSI layers, from the physical to the application layer, and two additional layers provide an abstraction of the hardware. The hardware abstraction layer (HAL) provides an abstraction of the microcontroller functionalities, whereas the radio abstraction layer (RAL) provides an abstraction of the radio transceiver capabilities. Regarding the HAL, OSS-7 currently supports the Texas Instruments MSP430 and the ST Microelectronics STM32L1 microcontroller. Regarding the RAL, OSS-7 currently supports the Texas Instruments CC1101 and the ST Microelectronics Spirit1 radio transceivers.