<s> from voodoo . override import Override <EOL> from weblab . experiment . devices . http import HttpDevice <EOL> from weblab . experiment . devices . serial_port import SerialPort <EOL> _SerialPort = SerialPort <EOL> _HttpDevice = HttpDevice <EOL> class UdXilinxCommandSender ( object ) : <EOL> def __init__ ( self , cfg_manager ) : <EOL> super ( UdXilinxCommandSender , self ) . __init__ ( ) <EOL> self . _cfg_manager = cfg_manager <EOL> @ staticmethod <EOL> def create ( cfg_manager ) : <EOL> return HttpCommandSender ( cfg_manager ) <EOL> def send_command ( self , command ) : <EOL> raise NotImplementedError ( "<STR_LIT>" ) <EOL> class HttpCommandSender ( UdXilinxCommandSender ) : <EOL> def __init__ ( self , cfg_manager ) : <EOL> super ( HttpCommandSender , self ) . __init__ ( cfg_manager ) <EOL> ip = self . _cfg_manager . get_value ( '<STR_LIT>' ) <EOL> port = self . _cfg_manager . get_value ( '<STR_LIT>' ) <EOL> app = self . _cfg_manager . get_value ( '<STR_LIT>' ) <EOL> self . _http_device = _HttpDevice ( ip , port , app ) <EOL> @ Override ( UdXilinxCommandSender ) <EOL> def send_command ( self , command ) : <EOL> self . _http_device . send_message ( command ) </s>
