Toward adaptive data aggregation protocols in wireless sensor networks