connectors/WAMP/__init__.py
changeset 2416 1ca207782dde
parent 2006 c4ba142bf3fb
child 2429 15f18dc8b56a
child 2434 07f48018b6f5
equal deleted inserted replaced
2415:f7d8891fe708 2416:1ca207782dde
    34 from autobahn.twisted.websocket import WampWebSocketClientFactory, connectWS
    34 from autobahn.twisted.websocket import WampWebSocketClientFactory, connectWS
    35 from autobahn.wamp import types
    35 from autobahn.wamp import types
    36 from autobahn.wamp.exception import TransportLost
    36 from autobahn.wamp.exception import TransportLost
    37 from autobahn.wamp.serializer import MsgPackSerializer
    37 from autobahn.wamp.serializer import MsgPackSerializer
    38 
    38 
       
    39 from runtime import PlcStatus
    39 
    40 
    40 _WampSession = None
    41 _WampSession = None
    41 _WampConnection = None
    42 _WampConnection = None
    42 _WampSessionEvent = Event()
    43 _WampSessionEvent = Event()
    43 
    44 
    57 
    58 
    58 
    59 
    59 PLCObjDefaults = {
    60 PLCObjDefaults = {
    60     "StartPLC":          False,
    61     "StartPLC":          False,
    61     "GetTraceVariables": ("Broken", None),
    62     "GetTraceVariables": ("Broken", None),
    62     "GetPLCstatus":      ("Broken", None),
    63     "GetPLCstatus":      (PlcStatus.Broken, None),
    63     "RemoteExec":        (-1, "RemoteExec script failed!")
    64     "RemoteExec":        (-1, "RemoteExec script failed!")
    64 }
    65 }
    65 
    66 
    66 
    67 
    67 def WAMP_connector_factory(uri, confnodesroot):
    68 def WAMP_connector_factory(uri, confnodesroot):