runtime/WampClient.py
changeset 1841 9fd29e8b1393
parent 1834 cd42b426028b
child 1846 14b40afccd69
equal deleted inserted replaced
1840:cf5ef4c0deff 1841:9fd29e8b1393
    55 DoOnJoin = []
    55 DoOnJoin = []
    56 
    56 
    57 
    57 
    58 def GetCallee(name):
    58 def GetCallee(name):
    59     """ Get Callee or Subscriber corresponding to '.' spearated object path """
    59     """ Get Callee or Subscriber corresponding to '.' spearated object path """
    60     global _PySrv
       
    61     names = name.split('.')
    60     names = name.split('.')
    62     obj = _PySrv.plcobj
    61     obj = _PySrv.plcobj
    63     while names:
    62     while names:
    64         obj = getattr(obj, names.pop(0))
    63         obj = getattr(obj, names.pop(0))
    65     return obj
    64     return obj
   132     print("WAMP client connecting to :", WSClientConf["url"])
   131     print("WAMP client connecting to :", WSClientConf["url"])
   133     return conn
   132     return conn
   134 
   133 
   135 
   134 
   136 def GetSession():
   135 def GetSession():
   137     global _WampSession
       
   138     return _WampSession
   136     return _WampSession
   139 
   137 
   140 
   138 
   141 def SetServer(pysrv):
   139 def SetServer(pysrv):
   142     global _PySrv
   140     global _PySrv