Text this: An Adaptive Energy-Management Framework for Sensor Nodes with Constrained Energy Scavenging Profiles