On a tandem queue with batch service and its applications in wireless sensor networks