Analysis of an ND-policy Geo/G/1 queue and its application to wireless sensor networks