Sensor networks are increasingly being deployed in a diverse range of applications. Within many of these networks wired sensors, wireless sensors and wired backbone nodes coexist, forming a heterogeneous programmable distributed system.This unique text/reference presents a thorough examination of the middleware that can be used on top of the operating system to configure and operate heterogeneous node platforms and whole sensor networks. The book opens with a review of the application scenarios where networked control systems with wireless sensors may be used, before comparing and analysing the middleware requirements for this set of scenarios. The text then defines middleware architecture for configuration and operation, describing how the proposed mechanisms were integrated in an approach demonstrated live in an oil and gas refinery. The testing and evaluation of this implementation with different hardware and software platforms is also reported.Topics and features: presents a thorough introduction to the major concepts behind wireless sensor networks; reviews the various application scenarios and existing middleware solutions for wireless sensor networks; discusses the middleware mechanisms necessary for heterogeneous wireless sensor networks; provides a detailed examination of platform-agnostic middleware architecture, including important implementation details for each part of the architecture; investigates the programming paradigms for wireless sensor networks, and for heterogeneous sensor networks in general; describes the results of extensive experimentation and testing, demonstrating that the generic architecture is viable for implementation on multiple platforms.Providing helpful insights for students and researchers alike, this book is ideally suitable for use as a reference in both introductory and advanced courses on embedded devices.