An Energy-Aware Co-Simulation Framework for the Design of Wireless Sensor Networks