def __init__(self, url): WampServerFactory.__init__(self, url) for sensor in sensorlist: if sensor[:3].upper() == 'ENV': self.envProtocol = EnvProtocol(self,sensor.strip(), outputdir) if sensor[:2].upper() == 'OW': self.owProtocol = OwProtocol(self,owport,outputdir) if sensor[:3].upper() == 'POS': self.pos1Protocol = Pos1Protocol(self,sensor.strip(), outputdir) if sensor[:3].upper() == 'KER': print "Test1:", sensor.strip self.kernProtocol = KernProtocol(self,sensor.strip(), outputdir) if sensor[:3].upper() == 'ARD': self.arduinoProtocol = ArduinoProtocol(self, sensor.strip(), outputdir) if sensor[:3].upper() == 'SER': port = serialport+portdict[sensor] baudrate = baudratedict[sensor] self.callProtocol = CallProtocol(self,sensor.strip(), outputdir,port,baudrate) if sensor[:3].upper() == 'PAL': self.palmacqProtocol = PalmAcqProtocol(self, sensor.strip(), outputdir) if sensor[:3].upper() == 'LEM': self.lemiProtocol = LemiProtocol(self,sensor.strip(),sensor[0]+sensor[4:7], outputdir) if sensor[:3].upper() == 'G82': self.csProtocol = CsProtocol(self,sensor.strip(), outputdir) if sensor[:3].upper() == 'GSM': self.gsm90Protocol = GSM90Protocol(self,sensor.strip(), outputdir) if sensor[:3].upper() == 'G19': self.gsm19Protocol = GSM19Protocol(self,sensor.strip(), outputdir)
def __init__(self, url, debugSerial=False, debugWs=False, debugWamp=False): WampServerFactory.__init__(self, url, debug=debugWs, debugWamp=debugWamp) self.debugSerial = debugSerial self.mcuProtocol = McuProtocol(self)
def __init__(self, url, debug=False): WampServerFactory.__init__(self, url, debugWamp=debug) self.setProtocolOptions(allowHixie76=True) ## the key-value store resides on the factory object, since it is to ## be shared among all client connections self.keyvalue = KeyValue("keyvalue.dat") decimal.getcontext().prec = 20
def __init__(self, url, debug = False): WampServerFactory.__init__(self, url, debugWamp = debug) self.setProtocolOptions(allowHixie76 = True) ## the key-value store resides on the factory object, since it is to ## be shared among all client connections self.keyvalue = KeyValue("keyvalue.dat") decimal.getcontext().prec = 20
def __init__(self, uri, apps, debug=False): WampServerFactory.__init__(self, uri, debug) self.apps = [] for app in apps: if isinstance(app, (str)): mod = import_module(app) else: mod = app log.msg(u"Registering WAMP module {}".format(unicode(mod))) self.apps.append(mod)
def __init__(self, uri, apps, debug=False): WampServerFactory.__init__(self, uri, debug) self.apps = [] for app in apps: if (isinstance(app, (str))): mod = import_module(app) else: mod = app log.msg(u'Registering WAMP module {}'.format(unicode(mod))) self.apps.append(mod)
def __init__(self, config): self.config = config WampServerFactory.__init__(self, config.wsuri, debugWamp = config.debug) self.setProtocolOptions(failByDrop = False) if config.skiputf8validate: self.setProtocolOptions(utf8validateIncoming = False) if config.allowunmasked: self.setProtocolOptions(requireMaskedClientFrames = False) self.connectedClients = set() print "Load/Latency Broker listening on %s [skiputf8validate = %s, allowunmasked = %s]" % (config.wsuri, config.skiputf8validate, config.allowunmasked) def printstats(): print "%d clients connected" % len(self.connectedClients) reactor.callLater(1, printstats) printstats()
def __init__(self, config): self.config = config WampServerFactory.__init__(self, config.wsuri, debugWamp=config.debug) self.setProtocolOptions(failByDrop=False) if config.skiputf8validate: self.setProtocolOptions(utf8validateIncoming=False) if config.allowunmasked: self.setProtocolOptions(requireMaskedClientFrames=False) self.connectedClients = set() print "Load/Latency Broker listening on %s [skiputf8validate = %s, allowunmasked = %s]" % ( config.wsuri, config.skiputf8validate, config.allowunmasked) def printstats(): print "%d clients connected" % len(self.connectedClients) reactor.callLater(1, printstats) printstats()
def __init__(self, testDb, testRunner, url, debug = False): assert(verifyObject(ITestDb, testDb)) assert(verifyObject(ITestRunner, testRunner)) WampServerFactory.__init__(self, url, debug = True, debugWamp = True) self._testDb = testDb self._testRunner = testRunner
def __init__(self, url, debugSerial = False, debugWs = False, debugWamp = False): WampServerFactory.__init__(self, url, debug = debugWs, debugWamp = debugWamp) self.debugSerial = debugSerial self.mcuProtocol = McuProtocol(self)
def __init__(self, url, debug): WampServerFactory.__init__(self, url, debugWamp = debug) Signal.register = self.register Signal.unregister = self.unregister Signal.publish = self.publish_signal_public self.signals = {}
def __init__(self, url, debug = False, debugWamp = False): WampServerFactory.__init__(self, url, debug = debug, debugWamp = debugWamp) ## the key-value store resides on the factory object, since it is to ## be shared among all client connections self.keyvalue = KeyValue("keyvalue.dat")