An integrated approach to the design of wireless sensor networks for structural health monitoring