lpcmanager

Parents ca87dcd8b25f
Children 74e1cf35fc20
Add import connector and added this connector to beremiz.
--- a/LPCconnector/PYRO/__init__.py Thu Jun 01 10:18:50 2017 +0200
+++ b/LPCconnector/PYRO/__init__.py Thu Jun 01 10:23:17 2017 +0200
@@ -5,6 +5,7 @@
# Copyright (c) 2017 Smarteh d.o.o. <info@smarteh.si>
# THIS PROGRAM COMES WITH NO WARRANTY
+import connectors
import Pyro.core
from connectors.PYRO import PYRO_connector_factory
@@ -28,9 +29,12 @@
RemoteMWControllerProxy = Pyro.core.getAttrProxyForURI(schemename + "://" + location + "/MWController")
pyro_connector = oldPYRO_connector_factory(uri, confnodesroot)
- pyro_connector.RemoteMWControllerProxy = RemoteMWControllerProxy
- pyro_connector.CustomFunctionCall = CustomFunctionCall
+ if pyro_connector:
+ pyro_connector.RemoteMWControllerProxy = RemoteMWControllerProxy
+ pyro_connector.CustomFunctionCall = CustomFunctionCall
return pyro_connector
-PYRO_connector_factory = MW_PYRO_connector_factory
\ No newline at end of file
+PYRO_connector_factory = MW_PYRO_connector_factory
+
+connectors.connectors["PYRO"] = lambda: MW_PYRO_connector_factory
\ No newline at end of file
--- a/LPCconnector/__init__.py Thu Jun 01 10:18:50 2017 +0200
+++ b/LPCconnector/__init__.py Thu Jun 01 10:23:17 2017 +0200
@@ -18,6 +18,7 @@
#You should have received a copy of the GNU General Public
#License along with this library; if not, write to the Free Software
#Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+import connectors
def LPC_connector_factory(uri, confnodesroot):
"""
@@ -32,4 +33,6 @@
from LPCBootObject import LPCBootObject
return LPCBootObject(confnodesroot,comportstr)
+connectors.connectors["LPC"] = lambda: LPC_connector_factory
+