Edouard@0: #!/usr/bin/env python Edouard@0: # -*- coding: utf-8 -*- Edouard@0: # Edouard@0: #Copyright (C) 2007: Edouard TISSERANT and Laurent BESSARD Edouard@0: # Edouard@0: #See COPYING file for copyrights details. Edouard@0: # Edouard@0: #This library is free software; you can redistribute it and/or Edouard@0: #modify it under the terms of the GNU General Public Edouard@0: #License as published by the Free Software Foundation; either Edouard@0: #version 2.1 of the License, or (at your option) any later version. Edouard@0: # Edouard@0: #This library is distributed in the hope that it will be useful, Edouard@0: #but WITHOUT ANY WARRANTY; without even the implied warranty of Edouard@0: #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Edouard@0: #General Public License for more details. Edouard@0: # Edouard@0: #You should have received a copy of the GNU General Public Edouard@0: #License along with this library; if not, write to the Free Software Edouard@0: #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Edouard@0: Edouard@0: def LPC_connector_factory(uri, confnodesroot): Edouard@0: """ Edouard@0: This returns the connector to LPC style PLCobject Edouard@0: """ Edouard@0: servicetype, location = uri.split("://") Edouard@0: mode,comportstr = location.split('/') Edouard@0: if mode=="APPLICATION": Edouard@0: from LPCAppObject import LPCAppObject Edouard@0: return LPCAppObject(confnodesroot,comportstr) Edouard@0: elif mode=="BOOTLOADER": Edouard@0: from LPCBootObject import LPCBootObject Edouard@0: return LPCBootObject(confnodesroot,comportstr) Edouard@0: Edouard@0: