17 # |
17 # |
18 #You should have received a copy of the GNU General Public |
18 #You should have received a copy of the GNU General Public |
19 #License along with this library; if not, write to the Free Software |
19 #License along with this library; if not, write to the Free Software |
20 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
21 |
22 def LPC_connector_factory(uri, pluginsroot): |
22 def LPC_connector_factory(uri, confnodesroot): |
23 """ |
23 """ |
24 This returns the connector to LPC style PLCobject |
24 This returns the connector to LPC style PLCobject |
25 """ |
25 """ |
26 servicetype, location = uri.split("://") |
26 servicetype, location = uri.split("://") |
27 mode,comportstr = location.split('/') |
27 mode,comportstr = location.split('/') |
28 if mode=="APPLICATION": |
28 if mode=="APPLICATION": |
29 from LPCAppObject import LPCAppObject |
29 from LPCAppObject import LPCAppObject |
30 return LPCAppObject(pluginsroot,comportstr) |
30 return LPCAppObject(confnodesroot,comportstr) |
31 elif mode=="BOOTLOADER": |
31 elif mode=="BOOTLOADER": |
32 from LPCBootObject import LPCBootObject |
32 from LPCBootObject import LPCBootObject |
33 return LPCBootObject(pluginsroot,comportstr) |
33 return LPCBootObject(confnodesroot,comportstr) |
34 |
34 |
35 |
35 |