On Fri, 2011-01-28 at 09:29 +0100, Albert Brandl wrote: > Hi! > > In our project, we accumulate data from various sources. Some of them are > connected via serial line (e.g. a GPS receiver and a weather station). > > I'd like to run the application with twistd. But it looks as if SerialPort > does not really fit into this framework. It does not implement IService, > so `my_serial_port.setServiceParent(collection)` does not work. > > Is there any technical reason that SerialPort does not implement > IService? Could you suggest a workaround for this problem (other than > dumping t.a.s.Application ;-))?
One way to do this, is using t.a.i.GenericClient to hook up the device to the protocol. This is also a Service that can be hooked up to an Application. Unfortunately, it uses the now deprecated connectWith method on a reactor, and therefore GenericClient has been deprecated as well. exarkun suggested a new FileDescriptorClient that might use the reactor's addReader and addWriter methods. -- ralphm _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python