I. Introduction
Initially introduced at the beginning of years 2000, WSN can be defined as a self-configured wireless network composed of low-power embedded devices with limited computational and hardware resources commonly called Sensor Nodes or simply nodes. Each node can serve a variety of purposes, such as physical data collection (e.g., temperature, humidity), partial processing or actuation (e.g., start fan, open door). The data recorded from the different nodes is generally routed to a single point of collection (sink) that usually acts as a gateway to a computer or central server where the data is stored and analysed. Minimizing the energy consumption is of critical importance in WSN design, since replacing or recharging batteries is often impractical. Radio communication is often the main source of energy consumption, so a big number of dedicated communication protocols have been developed during the years to reduce energy usage while guaranteeing adequate performance in terms of packet delivery reliability and latency. Differently from the huge effort on the design and evaluation of communication protocols, the WSN research community never adopted a common framework for portable and easily repeatable solutions, in spite of the initial popularity of TinyOS [3], Contiki [4] or, more recently, FreeRTOS [5]. Most of the proposed protocols are based on monolithic programs that run on a specific hardware and are able of executing a single application. The main argument to avoid the use of an OS could be that it would increase the power consumption, or it would cause a delay in the protocol operations, which can result in an increase in the number of lost packets or in the latency.