Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Timeout support for RXTX OutputStream.write()

Reply
Thread Tools

Timeout support for RXTX OutputStream.write()

 
 
Ralph Lecher
Guest
Posts: n/a
 
      11-30-2009
Hi!

With the RXTX Comm API is there a way to avoid OutputStream.write()
blocking the application if the targeted serial device doesn't take
over the offered data. I only found SerialPort.enableReceiveTimeout(),
which I hope prevents at least InputStream.read() from heading towards
Nirvana.

TIA

Ralph



 
Reply With Quote
 
 
 
 
Knute Johnson
Guest
Posts: n/a
 
      11-30-2009
Ralph Lecher wrote:
> Hi!
>
> With the RXTX Comm API is there a way to avoid OutputStream.write()
> blocking the application if the targeted serial device doesn't take
> over the offered data. I only found SerialPort.enableReceiveTimeout(),
> which I hope prevents at least InputStream.read() from heading towards
> Nirvana.
>
> TIA
>
> Ralph


It shouldn't block which just shows that RXTX has numerous bugs. Use
Sun's JavaComm API. They support the Linux version and the Windows
version still works fine (at least on XP). Your only other option is to
buffer it.

--

Knute Johnson
email s/nospam/knute2009/

--
Posted via NewsDemon.com - Premium Uncensored Newsgroup Service
------->>>>>>http://www.NewsDemon.com<<<<<<------
Unlimited Access, Anonymous Accounts, Uncensored Broadband Access
 
Reply With Quote
 
 
 
 
John B. Matthews
Guest
Posts: n/a
 
      11-30-2009
In article <4b1405d5$0$3022$(E-Mail Removed)>,
Knute Johnson <(E-Mail Removed)> wrote:

> Ralph Lecher wrote:


> > With the RXTX Comm API is there a way to avoid OutputStream.write()
> > blocking the application if the targeted serial device doesn't take
> > over the offered data. I only found SerialPort.
> > enableReceiveTimeout(), which I hope prevents at least
> > InputStream.read() from heading towards Nirvana.


The ADTPro project does exactly that:

<https://sourceforge.net/projects/adtpro/>

If you're stuck with RXTX, you might like to look at the project's
transport layer, which uses RXTX for serial I/O:

<http://adtpro.cvs.sourceforge.net/viewvc/adtpro/adtpro/org/adtpro/transport/>

> It shouldn't block which just shows that RXTX has numerous bugs. Use
> Sun's JavaComm API. They support the Linux version and the Windows
> version still works fine (at least on XP). Your only other option is
> to buffer it.


--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
URGENT RXTX SERIAL PORT Nanou Java 0 05-31-2005 09:48 AM
Timeout::timeout and Socket timeout Mark Probert Ruby 1 10-06-2004 09:30 AM
Problem with rxtx end paraller port under linux Brzezi Java 0 06-27-2004 06:04 PM
rxtx 2.1.6 bimbo Java 0 04-08-2004 01:01 PM
Java rxtx libs Alex Bitkiller Java 2 02-18-2004 11:12 AM



Advertisments