connectors/WAMP/__init__.py
changeset 1736 7e61baa047f0
parent 1734 750eeb7230a1
child 1739 ec153828ded2
equal deleted inserted replaced
1735:c02818d7e29f 1736:7e61baa047f0
    36 
    36 
    37 _WampSession = None
    37 _WampSession = None
    38 _WampConnection = None
    38 _WampConnection = None
    39 _WampSessionEvent = Event()
    39 _WampSessionEvent = Event()
    40 
    40 
       
    41 
    41 class WampSession(wamp.ApplicationSession):
    42 class WampSession(wamp.ApplicationSession):
    42     def onJoin(self, details):
    43     def onJoin(self, details):
    43         global _WampSession, _WampSessionEvent
    44         global _WampSession, _WampSessionEvent
    44         _WampSession = self
    45         _WampSession = self
    45         _WampSessionEvent.set()
    46         _WampSessionEvent.set()
    53 
    54 
    54 PLCObjDefaults = { "StartPLC": False,
    55 PLCObjDefaults = { "StartPLC": False,
    55                    "GetTraceVariables" : ("Broken",None),
    56                    "GetTraceVariables" : ("Broken",None),
    56                    "GetPLCstatus" : ("Broken",None),
    57                    "GetPLCstatus" : ("Broken",None),
    57                    "RemoteExec" : (-1, "RemoteExec script failed!")}
    58                    "RemoteExec" : (-1, "RemoteExec script failed!")}
       
    59 
    58 
    60 
    59 def WAMP_connector_factory(uri, confnodesroot):
    61 def WAMP_connector_factory(uri, confnodesroot):
    60     """
    62     """
    61     WAMP://127.0.0.1:12345/path#realm#ID
    63     WAMP://127.0.0.1:12345/path#realm#ID
    62     WAMPS://127.0.0.1:12345/path#realm#ID
    64     WAMPS://127.0.0.1:12345/path#realm#ID