Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

When we write programs that "learn", it turns out we do and they don't.


devel / comp.lang.tcl / Using gets in nonblocking mode on a file not ending in a newline

SubjectAuthor
o Using gets in nonblocking mode on a file not ending in a newlineclt.to.davebr

1
Using gets in nonblocking mode on a file not ending in a newline

<6771667855630@dlp>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=10082&group=comp.lang.tcl#10082

  copy link   Newsgroups: comp.lang.tcl
Path: i2pn2.org!i2pn.org!aioe.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: clt.to.d...@dfgh.net
Newsgroups: comp.lang.tcl
Subject: Using gets in nonblocking mode on a file not ending in a newline
Date: Mon, 07 Nov 22 21:13:50 GMT
Organization: A noiseless patient Spider
Lines: 16
Message-ID: <6771667855630@dlp>
Injection-Info: reader01.eternal-september.org; posting-host="82fc8318be6813634debeaeacf892607";
logging-data="3853605"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19fzrrbHhCkfZVihMxOcHG6"
Cancel-Lock: sha1:WH6wD/ektqYXRJde2CP1SrrXt0I=
 by: clt.to.d...@dfgh.net - Mon, 7 Nov 2022 21:13 UTC

>I *think* your best bet in this case would be to set up an fileevent
>handler for the serial line, and read the data event-based as they come
>in. Note however that you would need some indication when no more input
>is to be expected from the serial line.

You are correct, fileevent will probably be used to schedule reads over the serial port.
If the data is a report from a buffer it will be easy to tag the end of data. If it is being streamed to a graph (not likely in my current project) it is likely the end of streaming will be commanded from my end.

Dave Bruchie

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor