Electronically-switched directional antennas for wireless sensor networks: A full-stack evaluation