Re: [NTLK] NSBasic serial timeout handling

From: Karosa Alabaster <karosa_at_gmail.com>
Date: Fri Mar 03 2006 - 09:43:30 EST

I have.. It says

1. To set a timeout, use ENVIRON EXTR.INPUT.REQTIMEOUT=1000 for a one
second timeout.If input is not received within the timeout period, the
string "TIMEOUT: -16005" will be returned to the variable in your INPUT
statement. Timeouts only work when ENVIRON IO is not "SCRE".

But the problem is exactly that it only works for the FIRST input
statement, the second one returns instantly with a timeout. because the
timeout timer isn't zeroed when the input statement finishes. But I
think I've found the solution in some NewtonScript example code. They
just set the reqtimeout to retries*reqtimeout Which is not perfect
either but at least it works I guess. until the number becomes too big
to fit into the variable ...
Anyone knows if there's a way to flush the input stack by the way? :-(
Or an example on how to use IOCONNECT?

Cheers,
Alabaster

Victor Rehorst wrote:

>Have you looked at the NSBasic technote on serial comms?
>
>http://www.nsbasic.com/newton/info/technotes/36.html
>
>
>

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/
Received on Fri Mar 3 09:41:40 2006

This archive was generated by hypermail 2.1.8 : Mon Mar 06 2006 - 08:50:22 EST