Energy And Task Management In Energy Harvesting Wireless Sensor Networks For Structural Health Monitoring