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.
shall I forward this to a TCL ticket or will you do it?
Harald, got it
https://core.tcl-lang.org/tcl/ tktview/6a61b9d61492a249009d231f362c7a8589552565
| Sysop: | DaiTengu |
|---|---|
| Location: | Appleton, WI |
| Users: | 1,124 |
| Nodes: | 10 (0 / 10) |
| Uptime: | 24:41:39 |
| Calls: | 14,394 |
| Calls today: | 3 |
| Files: | 186,389 |
| D/L today: |
6,238 files (1,577M bytes) |
| Messages: | 2,545,009 |
| Posted today: | 1 |