The design of components makes it easy to connect various components in the form of function calls. In order to provide a better support for the component architecture and execution model of TinyOS, the nesC language [12] was designed for programming based on TinyOS. TinyOS has a component-based programming model, codified by the nesC language.