From Newsgroup: comp.lang.tcl
Hi,
https://github.com/tcltk/tcl/blob/main/generic/tclIO.c#L9255
"exception" is missing and in the next line TCL_EXCEPTION is also missing.
I'm writing a channel driver extension that will need this for scripting out-of-band interrupts.
https://www.tek.com/en/documents/application-note/how-program-instrument-assert-srq-gpib-bus
This is exactly what TCL_EXCEPTION is for.
https://github.com/tcltk/tcl/blob/main/generic/tcl.h#L1318
For example, I need a usage such as this:
package require agpib ;# my thing under development
# open the device on address 16 of the first board (/dev/gpib0)
set dmm [agpib::open -brd 0 -pad 16]
# set channel options (generic set)
fconfigure $dmm -blocking yes -encoding ascii -translation none
# set channel options (GPIB type specific)
fconfigure $dmm -term eoi -timeout 300u
# Set up the exception script to manage STB from the incoming
# SRQ/RQS interrupts on the bus.
#
fileevent $dmm exception \
[list dmm_stb $dmm [subst -noc {[fconfigure $dmm -laststb]}]]
goes bang -^
TCL_EXCEPTION should be a proper watch mask. I think I might have the
first channel driver to ever need such a thing.
--- Synchronet 3.22a-Linux NewsLink 1.2