Energy management in wireless sensor networks a crosslayer channel adaptive approach towards performance optimization