Text this: A joint optimization of energy harvesting and spectrum sensing for wireless sensor networks under Middleton Class A noise