lpcmanager

Smarteh 485: slave address of RX buffer must match the address of sent TX buffer in order to be accepted. If reception is not successful data is not copied to beremiz buffer (memcpy()).
# Project name: SmartehIDE
# __init__.py.py: spacer widget module initialization
# 19. 01. 2017 12:24 Uporabnik
#
# Copyright (c) 2017 Smarteh d.o.o. <info@smarteh.si>
# THIS PROGRAM COMES WITH NO WARRANTY
import Pyro.core
from connectors.PYRO import PYRO_connector_factory
oldPYRO_connector_factory = PYRO_connector_factory
def MW_PYRO_connector_factory(uri, confnodesroot):
servicetype, location = uri.split("://")
if servicetype == "PYROS":
schemename = "PYROLOCSSL"
else:
schemename = "PYROLOC"
def CustomFunctionCall(self, funcname, args=None):
member = self.__dict__.get(funcname, None)
if member is None:
def my_local_func(*args, **kwargs):
funcnameCall = funcname.split('.')[-1]
return RemoteMWControllerProxy.__getattr__(funcnameCall)(*args, **kwargs)
member = PyroCatcher(my_local_func, None)
self.__dict__[funcname] = member
return member
RemoteMWControllerProxy = Pyro.core.getAttrProxyForURI(schemename + "://" + location + "/MWController")
pyro_connector = oldPYRO_connector_factory(uri, confnodesroot)
pyro_connector.RemoteMWControllerProxy = RemoteMWControllerProxy
pyro_connector.CustomFunctionCall = CustomFunctionCall
return pyro_connector
PYRO_connector_factory = MW_PYRO_connector_factory