Adaptive GTS allocation in IEEE 802.15.4 for real-time wireless sensor networks