Cross-layer protocols to support periodic data collection and event driven wireless sensor network applications