MAC-network cross-layer energy optimization model for Wireless Body Area Networks