On 22 Sep 2014, at 17:31, Bram Van Steenlandt <b...@diomedia.be> wrote:

> No specific reason actually, I didn't even know twisted had support for a 
> serial port.
> 
> This being said:
> ftdio_sio can be a bit buggy at times, esp when using multiple devices on the 
> same pc, ftdi on freebsd & osx isn't very stable either.
> I use this interface selector system where the serial connection can be setup 
> with pyserial,libftdi (which works much better for ftdi adapters) or a tcp 
> socket (which uses a so called "device server" with ethernet and rs232 
> onboard).
> Doing it with twisted seems more complicated to me (but I could be wrong), in 
> my case it makes a lot of sense to wait for the data, I poll plc's over rs485 
> and those kind of things.

Use cases vary :-) In a wait-dosomething-wait scenario, I find @inlineCallbacks 
to typically yield virtually the same code you ended up with. 

When I was doing this, there was some pretty complex chatter back and forth, 
and I was multiplexing several connections over a single RS232 device, so 
Twisted certainly came in handy. In your case: don’t fix what ain’t broken, of 
course :)

> Also as I've said, there are sometimes a lot of hardware issues (usb bus 
> resets and stuff, users that disconnect usb-ports and plug them back in) 
> which can be difficult to deal with.
> 
> How long does twisted has this serial port support actually ?

Well over a decade: Mon Dec 16 04:04:25 2002 to be precise. See svn rev 
trunk@4528.

hth
lvh

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to