Intelligent gateway power adapter