Re: Synchronous Serial Port Protocol messaging With NSOperationQueue/GCD

2013-08-07 Thread Vanni Parronchi
Hi all, Thank you all for you contribution and responses. It was my first message to the list and was a bit intimidated :). the app is meant to be modular, 10.7 based and it has to manage not only serial devices (rs485) but also USB ones (through a virtual com port using an FTDI chip on the devic

Re: Synchronous Serial Port Protocol messaging With NSOperationQueue/GCD

2013-08-07 Thread Ken Thomases
On Aug 7, 2013, at 2:20 AM, Tom Davie wrote: > My suggestion would instead be to make an NSOperation subclass for sending a > message to the device. > > That subclass should require you to specify to which device you are talking. > Each device object should carry around a dispatch_semaphore.

Re: Synchronous Serial Port Protocol messaging With NSOperationQueue/GCD

2013-08-07 Thread Sean McBride
On Thu, 1 Aug 2013 12:03:01 +0200, Vanni Parronchi said: >hi everyone, > >I'm writing a mac osx app that needs to talk to a serial device. Have you considered using the open source AMSerialPort class? It doesn't use GCD, but does have an NSThread option. It could probably be retrofitted to use

Re: Synchronous Serial Port Protocol messaging With NSOperationQueue/GCD

2013-08-07 Thread Tom Davie
On 1 Aug 2013, at 12:03, Vanni Parronchi wrote: > hi everyone, > > I'm writing a mac osx app that needs to talk to a serial device. > > There's a well known protocol to adhere to (implemented in the device > firmware) and is a kind of a half-duplex synchronous protocol where if i > send a mess

Synchronous Serial Port Protocol messaging With NSOperationQueue/GCD

2013-08-07 Thread Vanni Parronchi
hi everyone, I'm writing a mac osx app that needs to talk to a serial device. There's a well known protocol to adhere to (implemented in the device firmware) and is a kind of a half-duplex synchronous protocol where if i send a message to the device from my app i have to wait till i get a respons