[Twisted-Python] Using SerialPort with t.a.s.Application
Albert Brandl
albert.brandl at weiermayer.com
Thu Feb 3 03:18:06 MST 2011
Hi!
On Mon, Jan 31, 2011 at 10:18:00PM -0000, exarkun at twistedmatrix.com wrote:
>
> I think that now the way it would make sense to add this is to add a
> serialport endpoint. This would be usable with
> twisted.internet.endpoints.serverFromEndpoint (or clientFromEndpoint, I
> can never remember which one a serial port is more like).
Cool. I think you talked about serverFromString, but this was enough to
get me started. I've added the necessary functions and classes so that I
can create a server listening to the serial line with something like:
serial_server = strports.service("SERIAL:/dev/ttyS0:baudrate=38400")
But injecting the necessary functions and classes into t.i.endpoints is
rather ugly. Would it be ok to create a ticket to properly enhance the
module with an endpoint encapsulating SerialPort?
> If you can accomplish your goals without making a new kind of IService
> implementation, then great!
Right now, this is sufficient for my purposes.
Thanks and best regards,
Albert
--
Albert Brandl
Weiermayer Solutions GmbH | Abteistraße 12, A-4813 Altmünster
phone: +43 (0) 720 70 30 14 | fax: +43 (0) 7612 20 3 56
web: http://www.weiermayer.com
More information about the Twisted-Python
mailing list