Design - Netty talking to Serial Port

"Trustin Lee (이희승)" trustin at gmail.com
Wed Mar 24 02:30:49 EDT 2010


B.L. Zeebub wrote:
> Hi
> 
> In several places the documentation talks about using Netty to talk to the
> serial port. Are there any code examples around? I'm particularly interested
> in how to integrate the Serial Port EventListener.

There's no working Serial communication transport as far as I know.  It
was mentioned as a possibility.  Netty has an abstract Channel API, so
it shouldn't be that hard to implement it though.  It will be pretty
similar to OioClientSocketChannelFactory and its associated classes.

> In my particular use case I need to receive a command stream over a socket
> from an external server, forward it to the serial port and return the
> responses (there will usually be several responses to a single command) to
> the server. I will also need to implement some form of flow control. I have
> no control over when the command requests arrive from the server, so I need
> to queue them until all responses from the previous command have been
> received and forwarded. Any suggestions on the best way to implement the
> queing mechanism would be gratefully recieved.

Assuming there's a working serial communication transport for Netty, you
could write a proxy server on top of it.  You could start from Hexdump
proxy example, but you will have to implement additional flow control.

HTH,
Trustin
-- 
what we call human nature in actuality is human habit
http://gleamynode.net/


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://lists.jboss.org/pipermail/netty-users/attachments/20100324/3728fa29/attachment-0001.bin 


More information about the netty-users mailing list