A generalized Markov chain model for effective analysis of slotted IEEE 802.15.4