<br><br><div class="gmail_quote">On Wed, Feb 6, 2013 at 10:29 PM, Joel Tremblet <span dir="ltr">&lt;<a href="mailto:joel.tremblet@openflyers.com" target="_blank">joel.tremblet@openflyers.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Can I integrated this serial connection into my daemon<br></blockquote><div><br>You want to make a custom service:<br><br>from twisted.application.service import Service<br>from twisted.internet import reactor<br><br>class CommandService(Service):<br>
    def startService(self):<br>        reactor.listenTCP(8001, tcpfactory)<br>        SerialPort(USBClient(tcpfactory), COM_PORT, reactor, baudrate=BAUD_RATE)<br><br>and now you can add an instance of this service to the Application in your .tac file, e.g.:<br>
<br>CommandService().setServiceParent(application)<br></div></div>