def main(): """This runs the protocol on port 11000""" factory = InputServiceFactory() factory.protocol = InputServiceProtocol reactor.listenTCP(11000, factory) input = InputSimulator(100, factory) reactor.callLater(0.0, input.loop) reactor.run()
def main(): """This runs the protocol on port 11000""" factory = InputServiceFactory() factory.protocol = InputServiceProtocol reactor.listenTCP(11000,factory) input = InputSimulator(100, factory) reactor.callLater(0.0, input.loop) reactor.run()
def main(): (options, args) = parseArgs() factory = InputServiceFactory() factory.protocol = InputServiceProtocol reactor.listenTCP(11000,factory) wiiSender = WiiSender(factory, loopFreq=options.loopFreq) moteDetector = MoteDetector(numToConnect=1, detectedCallback=wiiSender.newMote, getAlreadyConnectedIdsCallback=wiiSender.getAlreadyConnectedIds); moteDetector.keepFirstConnection=True moteDetector.startInThread() wiiSender.setMoteDetector(moteDetector) reactor.callLater(0.0, wiiSender.loop) reactor.run()
def main(): (options, args) = parseArgs() factory = InputServiceFactory() factory.protocol = InputServiceProtocol reactor.listenTCP(11000, factory) wiiSender = WiiSender(factory, loopFreq=options.loopFreq) moteDetector = MoteDetector( numToConnect=1, detectedCallback=wiiSender.newMote, getAlreadyConnectedIdsCallback=wiiSender.getAlreadyConnectedIds, ) moteDetector.keepFirstConnection = True moteDetector.startInThread() wiiSender.setMoteDetector(moteDetector) reactor.callLater(0.0, wiiSender.loop) reactor.run()