A power and rate control algorithm for wireless networks with state-delayed dynamics