if opt == '-o': ttyOutTopic = arg # start ManifoldPython running ManifoldPython.start("ttytest", sys.argv, False) # this delay is necessary to allow Qt startup to complete time.sleep(1.0) # wake up the console print("ttytest starting...") sys.stdout.flush() # Activate the client endpoint ttyOutPort = ManifoldPython.addE2EClient(ttyOutTopic) if (ttyOutPort == -1): print("Failed to activate E2E client endpoint") ManifoldPython.stop() sys.exit() # Activate the multicast endpoint ttyInPort = ManifoldPython.addMulticastSink(ttyInTopic) if (ttyInPort == -1): print("Failed to activate multicast sink endpoint") ManifoldPython.stop() sys.exit() ManifoldPython.startConsoleInput() print("Type characters to send:")
elif opt == '-t': textTopic = arg # start ManifoldPython running ManifoldPython.start("ttstest", sys.argv, False) # this delay is necessary to allow Qt startup to complete time.sleep(1.0) # wake up the console print("ttstest starting...") sys.stdout.flush() # Activate the client endpoint clientPort = ManifoldPython.addE2EClient(textTopic) if (clientPort == -1): print("Failed to activate E2E client endpoint") ManifoldPython.stop() sys.exit() # Activate the sink endpoint sinkPort = ManifoldPython.addMulticastSink(completionTopic) if (sinkPort == -1): print("Failed to activate multicast sink endpoint") ManifoldPython.stop() sys.exit() lastSendTime = time.time() textMessage = rdf.newPublishMessage('tts', textTopic, ttsdefs.DATATYPE, time.time())