::ngspicetclbridge
Commands
configure
Queries or changes package-wide representation and collision defaults in this Tcl interpreter.
configure ?option? configure ?-output list|vector? ?-ifexists error|replace?
Parameters
-ifexists policy:Default destination collision policy: error or replace; initially error.
-output mode:Default output representation: list or vector; initially list.
Description
With no arguments, returns all settings as an option/value dictionary. With one option, returns its value. With option/value pairs, validates all settings before applying them and returns the complete configuration. Invalid options or values, or unavailable RBC support leave the configuration unchanged. Selecting vector mode requires an RBC-enabled build and a loadable rbc::vector package; list queries/settings do not load RBC. Defaults are independent in separate interpreters.
New simulator handles capture these defaults unless -output or -ifexists is supplied explicitly at creation. Existing handles retain their settings. Per-read overrides take precedence over the handle default. This public command is not namespace-exported; call it as ::ngspicetclbridge::configure. The collision policy affects vector output only; it can be configured while using list mode or without RBC. Replacement still requires a compatible, writable destination. Namespace selection and naming are unchanged.
Example:
set saved [::ngspicetclbridge::configure]
::ngspicetclbridge::configure -output vector -ifexists replace
::ngspicetclbridge::configure -output
::ngspicetclbridge::configure {*}$saved
Return value
selected option value for a single-option query; otherwise all settings as a dictionary.
getCircuit
Gets list with currently loaded circuit (its listing) in the form specified by the switch.
getCircuit ?-logical|-physical|-deck|-expand|-runnable|-param? sim
Parameters
-deck:Just like the physical listing, except without the line numbers it recreates the input file verbatim (except that it does not preserve case)
-expand:The circuit is printed with all subcircuits expanded.
-logical:The circuit is with all continuation lines collapsed into one line.
-param:Printing all parameters and their actual values.
-physical:The circuits lines are printed out as they were found in the file.
-runnable:Circuit netlist expanded, but without additional line numbers, ready to be sourced again and run in ngspice. Default version if no witch is provided.
sim:Simulator handler that is returned by
ngspicetclbridge::new
Return value
list with listing lines
getCircuitTitle
Gets title of the current circuit (first line of circuits netlist).
getCircuitTitle sim
Parameters
Return value
title
getPlotDate
Gets time stamp of current plot generation.
getPlotDate sim
Parameters
Return value
time stamp
getPlotName
Gets name of the current plot, i.e. Operating Point, AC Analysis, etc.
getPlotName sim
Parameters
Return value
name of the plot
getScaleInfo
Gets dictionary with information about current scale vector.
getScaleInfo sim
Parameters
Return value
dictionary with the information
new
Load dynamic library, path should be provided in native form for target OS. Every ::ngspicetclbridge::new
returns a command (e.g. ::ngspicetclbridge::s1). The following subcommands operate on that instance.
Optionally the spinit and/or spiceinit initialization files could be forbidden for loading.
new ?-nospinit|-nospiceinit|-noinit? libpath ?-output list|vector? ?-ifexists error|replace? ?-namespace name?
Parameters
-ifexists:Error or replace for initial vector destinations; inherits the package configuration (initially error)
-namespace:Destination for live vectors and snapshots; created at handle construction if missing.
-noinit:Inhibit both spinit and spiceinit.
-nospiceinit:Inhibits spiceinit.
-nospinit:Inhibits spinit.
-output:List or vector; inherits the package configuration (initially list); controls live storage and snapshots.
Description
Namespace:
Relative names resolve against the handle creation caller; the fully qualified name is retained.
Missing namespaces and parents are created. Empty names are rejected.
Destroying the handle does not delete the namespace.
Without this option, live vectors use the creation namespace; snapshots use their caller’s namespace.
Use a dedicated namespace to avoid collisions, such as the signal time and Tcl’s global time command.
Vector output:
Requires an RBC-enabled build and
rbc::vectorwith literal-name support.With replace, existing same-type vectors are adopted, preserving their commands and graph clients.
Unrelated commands and vectors maintained by another simulator cannot be replaced.
Example:
set sim [::ngspicetclbridge::new /usr/local/lib/libngspice.so]
Return value
command name to work with Ngspice instance, references as SIM later
readVecsAsync
Reads all available vectors of the current plot as independent snapshots. Returns a dictionary with raw vector names as keys and lists or fully qualified RBC vector names as values.
readVecsAsync ?-info? ?-output list|vector? ?-namespace name? ?-ifexists error|replace? ?-names dictionary|#auto? sim
Parameters
-ifexists:Error or replace; overrides the simulator collision policy.
-info:Return vector metadata instead of data; cannot be combined with output options.
-names:#autofor fresh vectors, or a dictionary of signal names to explicit destinations or#auto-namespace:Destination namespace for vector snapshots; created if missing, relative to the caller.
-output:List or vector; overrides the simulator default.
sim:Simulator handle that is returned by
ngspicetclbridge::new
Description
Output and ownership:
Handle defaults apply unless overridden. Without an explicit namespace, snapshots use the caller’s namespace.
Complex data produces complex RBC vectors. Snapshots survive simulator destruction.
Naming:
Naming options require vector output. RBC generates returned names in the selected namespace.
Signals omitted from -names keep signal-derived names.
#auto requests automatic naming; auto without # is an ordinary name.
Consistency and errors:
Vectors are copied separately; reading a running simulation is not an atomic snapshot.
If a later copy fails, previously created or replaced snapshots remain in the destination namespace.
Return value
dictionary
run
Runs simulation in a background thread, waits for completion and flushes live data before returning. Does not service the Tcl event loop; GUI events and redraws remain pending.
run ?-nocleanup? sim
Parameters
-nocleanup:If provided, previous ngspice plots are retained; live storage still resets for a new plot.
sim:Simulator handle that is returned by
ngspicetclbridge::new
Return value
SIM
A command ensemble.
SIM subcommand ...
Description
The ensemble supports the following subcommands:
- abort
Sets an internal abort flag and wake any waiters (useful to force waitevent to return). This does not free the instance.
- asyncvector
Fetches the current values of a named vector through ngspice’s ngGet_Vec_Info. Available once the simulation has produced data; the vector may still be incomplete.
- circuit
Sends an circuit to Ngspice in form of the Tcl list, each element is the line of the netlist. If switch
-stringis provided, the input netlists could be passed as ordinary string with newline character as a separator between netlists lines.- command
Sends an arbitrary Ngspice command line (e.g.,
bg_run,circbyline…,.save,.tran,.dc). If we provide-captureswitch, it returns not only the result code, but also the next message from stdout of Ngspice. Also, if command is send in the moment background thread is starting or stopping, it will be deferred to the time is could be safely sent, and in that case-capturemessage and command results code are not availaible as a return ofcommand.- destroy
Deletes the instance command. In details:
- eventcounts
Raw event counters: send_raw_evt counts native callbacks (including retained disabled registrations); event_init counts event-store initialization on configuration or a new plot; event_batch counts completed raw batches, including batches without changed selected nodes. The latter two are bridge-generated events. They support waitevent -since and eventcounts -clear just like the existing callback counters. Gets or reset the cumulative event counters for this simulator instance.
- eventdata
Reads an independent snapshot of published string-valued event data.
- eventnodes
Discovers event nodes and selects raw event collection independently of numeric output mode.
- flush
Publishes pending initialization metadata and samples for this simulator into live storage. Works in both list and vector modes. Returns an empty result on success.
- initvectors
Gets held initial vector metadata (built from send_init_data) in a dict.
- inputpath
Gets current path for XSPICE code models if
-currentswitch is provided, or set current path to value provided.- isrunning
Calls asynchronously to check if background thread is running.
- messages
Queues of textual messages captured from Ngspice (stdout/stderr) and bridge status lines.
- plot
Gets current plot name if no arguments provided, names of all plots or all vectors names that belongs to name of the provided plot.
- vectors
Gets data accumulated from send_data events through the Tcl event loop.
- waitevent
Blocks until a named event is observed n number of times (or once), the instance is aborted/destroyed, or the timeout expires (if provided).
Refer to the documentation of each subcommand for details.
SIM abort
Sets an internal abort flag and wake any waiters (useful to force waitevent to return). This does not free the instance.
SIM abort ?-help?
Parameters
handle:Not documented.
Description
The handle argument is supplied automatically when called as $handle abort.
Return value
nothing.
SIM asyncvector
Fetches the current values of a named vector through ngspice’s ngGet_Vec_Info. Available once the simulation has produced data; the vector may still be incomplete.
SIM asyncvector name ?-output list|vector? ?-ifexists error|replace? ?-name vectorName? ?-namespace name? SIM asyncvector -info name
Parameters
handle:Not documented.
-ifexists:Error or replace; overrides the handle collision policy.
-info:Returns a metadata dictionary: signal type, real/complex type and length.
-name:Destination name or #auto for a fresh RBC name (vector output only)
-namespace:Destination namespace; created with missing parents (vector output only)
-output:List or vector; overrides the handle default for this snapshot.
name:Ngspice vector name.
Description
Ownership and replacement:
Vector output creates an independent, caller-owned snapshot that survives handle destruction.
With -ifexists replace, existing same-type snapshot vectors are updated in place. Unrelated commands and live vectors maintained by any simulator cannot be overwritten.
Destination namespace:
Uses the explicit handle -namespace, or otherwise the caller’s namespace.
A per-call -namespace overrides this selection and resolves relative to the caller. It does not change handle defaults or live bindings. Empty names are rejected.
A fully qualified -name overrides the selected namespace; its parent must already exist.
#auto creates a fresh RBC vector in the selected namespace.
Signal-derived names and access:
Balanced parentheses, including v(1), remain literal. Names unsafe for RBC or containing namespace separators are encoded as _raw_ followed by uppercase hexadecimal UTF-8 bytes.
No mapped array variable is created. Read values through the vector command, for example:
$vectorrange 0 end.
Example:
$sim initvectors
$sim asyncvector out
# -> {0.0 0.066666... 0.133333... ...}
$sim asyncvector V(9)
# -> {{0.01 0.00} {0.02 0.00} ...} ;# if complex
The handle argument is supplied automatically when called as $handle asyncvector.
Return value
real vectors as a flat list of doubles, complex vectors as a list of {re im} pairs. Error if vector
does not exists.
SIM circuit
Sends an circuit to Ngspice in form of the Tcl list, each element is the line of the netlist. If switch
-string is provided, the input netlists could be passed as ordinary string with newline character as a
separator between netlists lines.
SIM circuit ?-string? circuit
Parameters
handle:Not documented.
-string:Allows to pass circuit as ordinary string.
circuit:List of string.
Description
Example:
set resDivCircuit {
Resistor divider
v1 in 0 1
r1 in out 1e3
r2 out 0 2e3
.dc v1 0 5 0.1
.save all
.end
}
$sim circuit [split $resDivCircuit \n]
$sim command bg_run
The handle argument is supplied automatically when called as $handle circuit.
Loading a replacement requires an idle simulator. The old circuit is removed before loading the new one; a load failure does not restore it. Raw event histories and explicit node selections are cleared. The event mode and -all selection are retained, with -all resolved against the new circuit before this call returns. If automatic event registration fails, the new circuit remains loaded and this command reports an error.
Return value
Ngspice result code
SIM command
Sends an arbitrary Ngspice command line (e.g., bg_run, circbyline …, .save, .tran, .dc). If we provide
-capture switch, it returns not only the result code, but also the next message from stdout of Ngspice. Also, if
command is send in the moment background thread is starting or stopping, it will be deferred to the time is could
be safely sent, and in that case -capture message and command results code are not availaible as a return of
command.
SIM command ?-capture? string SIM command -clear
Parameters
handle:Not documented.
-capture:Return captured output along with the result code.
-clear:Release retained ngspice command memory at an idle boundary.
string:Command string; omitted with -clear.
Description
Command memory:
command -clearcallsngSpice_Command(NULL)and returns its result code. An empty string does not do this.Use a handle created with -noinit (or both -nospinit and -nospiceinit), driven directly from Tcl.
Cleanup is rejected during background startup, execution or shutdown, native calls, and pending commands. It never halts a simulation or defers cleanup. After bg_halt returns, cleanup permits a later bg_resume.
Scripts, aliases, includes and control workers disable cleanup permanently for that handle. Detection is conservative, including matching text in comments. Initialization files also disable cleanup because ngspice exposes no reliable query/join for its separate control worker.
Cleanup discards command history, labels and unfinished control blocks. Only call it between complete command sequences. It preserves circuit state, plots, snapshots, live vectors/lists and bridge messages.
Unlike
destroy all,vectors -clearandmessages -clear, this releases the command interpreter’s storage. The run helper does not do this automatically, so existing control-script behavior remains unchanged.
Example:
$sim command {circbyline v1 in 0 1}
$sim command bg_run
The handle argument is supplied automatically when called as $handle command.
Return value
Ngspice result code, or dictionary with result code and the message
SIM destroy
Deletes the instance command. In details:
SIM destroy ?-help?
Parameters
handle:Not documented.
Description
Marks the context as destroying
Wakes any waiters
Quiesces the ngspice background thread
Defers and performs full cleanup
The handle argument is supplied automatically when called as $handle destroy.
Return value
nothing.
SIM eventcounts
Raw event counters: send_raw_evt counts native callbacks (including retained disabled registrations); event_init counts event-store initialization on configuration or a new plot; event_batch counts completed raw batches, including batches without changed selected nodes. The latter two are bridge-generated events. They support waitevent -since and eventcounts -clear just like the existing callback counters. Gets or reset the cumulative event counters for this simulator instance.
SIM eventcounts ?-clear?
Parameters
handle:Not documented.
-clear:Zeros all counts and returns nothing.
Description
Example:
$sim eventcounts
# -> send_char N send_stat N controlled_exit N send_data N send_init_data N bg_running N
The handle argument is supplied automatically when called as $handle eventcounts.
Return value
returns a dict with keys as events names, and counts for each event as a value
SIM eventdata
Reads an independent snapshot of published string-valued event data.
SIM eventdata ?-clear?
Parameters
handle:Not documented.
-clear:Discard stored and pending event history; retain selection and latest known states.
Description
Result keys are mode, analysis, nodes and batches. nodes maps names to dictionaries containing type. For transient analysis, in pernode mode each node also has events: a list of {eventTime stringValue last} records. In changes mode batches contains {time sampleTime events {{node eventTime stringValue last} …}} dictionaries. In snapshot mode batches contains {time sampleTime values {node stringValue …} known {node …}} dictionaries. An uninitialized node has an empty value and is absent from known; this differs from ngspice’s explicit U state. last is only the end of ONE node’s native batch, never an all-nodes completion marker. Event times can be out of order across nodes; callback order and repeated same-time transitions are preserved.
analysis is none before plot initialization, then tran, op or dc. Unsupported analyses report an error. OP/DC batches use point (zero-based output index) and coordinates (sweep-name/value dictionary; empty for OP) instead of time. Snapshot batches retain values and known; changes batches contain {node value} records. OP/DC pernode events are dictionaries with point, coordinates and value. They have no time or last fields. OP/DC changes and pernode record initial states and subsequent value changes; snapshot records every point. See the Digital events data guide for examples and the native query cleanup prerequisite for repeated OP/DC use.
Data is copied from mutex-protected C storage on this call; no Tcl event-loop turn is required. A read or flush cannot complete a partially delivered timestep. Clear does not erase ngspice’s own saved event data or reset counters; later callbacks continue recording. A fresh plot clears histories; halt/resume preserves them. Decoder errors are retained and returned here until a new plot or configuration resets them. Numeric -output/-namespace/-ifexists settings do not apply; event values are always Tcl strings.
Return value
dictionary of published event data.
SIM eventnodes
Discovers event nodes and selects raw event collection independently of numeric output mode.
SIM eventnodes ?-all|-nodes names? ?-mode changes|snapshot|pernode?
Parameters
handle:Not documented.
-all:Select all names returned by ngSpice_AllEvtNodes, including internal subcircuit nodes.
-mode mode:Changes, snapshot or pernode; initially changes.
-nodes names:Select an explicit list; an empty list disables recording.
Description
Call after loading the circuit and while idle, before run/bg_run. Without options, returns supported, available, selected and mode. Raw symbols are optional; unsupported libraries retain analog functionality. Each node is registered once per loaded circuit. Changing selection or mode clears event history and known states. Resume retains registrations and histories. Disabled registrations remain alive until circuit replacement or handle destruction. Event collection supports externally driven transient, operating-point and DC sweep analyses. After registering nodes, use the circuit subcommand to replace the circuit while idle. Mode and -all are retained; explicit -nodes selections, known states and histories are cleared. Direct source/reset/remcirc/setcirc/circbyline commands and circuit-changing scripts or aliases remain unsupported.
Transient modes collect through SendRawEvtData; OP/DC modes read settled node histories at numeric output points. All modes preserve ngspice’s printable strings, including drive strength. changes publishes complete accepted-step batches; snapshot publishes every selected node at accepted analog output times, carrying unchanged values forward; pernode exposes individual events immediately. Complete batches become visible at the next analog output callback, or after completion/halt for the final batch. Pure digital transient circuits use ngspice’s time-only output. There is no wall-clock sampling timer.
Return value
dictionary describing support, available nodes, selected nodes and mode.
SIM flush
Publishes pending initialization metadata and samples for this simulator into live storage. Works in both list and vector modes. Returns an empty result on success.
SIM flush ?-help?
Parameters
handle:Not documented.
Description
The command processes one buffered batch without waiting for simulation completion or servicing the Tcl event loop. Samples arriving during publication remain pending for a later flush or event-loop iteration. Initialization is applied before samples. Repeated calls without new data have no effect, and queued bridge events cannot append the same samples twice. Existing notifications for this handle are removed before publication so repeated flushes do not retain an unbounded event queue. Callback counters are unchanged.
Publication errors are returned directly and retained for subsequent flush/vectors calls until a new plot. RBC notifications may invoke application callbacks. Reentrant operations on this handle are rejected during publication, except destruction. Graph redraws still require normal Tk event processing.
Example:
$sim command run
$sim flush
set data [$sim vectors]
The handle argument is supplied automatically when called as $handle flush.
Return value
empty string
SIM initvectors
Gets held initial vector metadata (built from send_init_data) in a dict.
SIM initvectors ?-clear?
Parameters
handle:Not documented.
-clear:Empties the internal memory structure and returns nothing.
Description
Example:
$sim initvectors
# -> out {number 1 real 1} in {number 2 real 1} v-sweep {number 3 real 1}
Warning: accumulation of data do not continues after call bg_run, new metadata replace the old one
in the storage.
The handle argument is supplied automatically when called as $handle initvectors.
Return value
dict with initial vector metadata saved in internal structure
SIM inputpath
Gets current path for XSPICE code models if -current switch is provided, or set current path to value
provided.
SIM inputpath -current SIM inputpath path
Parameters
handle:Not documented.
-current:Switch to return current path.
path:Full path to desired location.
Description
The handle argument is supplied automatically when called as $handle inputpath.
Return value
current path
SIM isrunning
Calls asynchronously to check if background thread is running.
SIM isrunning ?-help?
Parameters
handle:Not documented.
Description
The handle argument is supplied automatically when called as $handle isrunning.
Return value
1 if thread is running, 0 otherwise.
SIM messages
Queues of textual messages captured from Ngspice (stdout/stderr) and bridge status lines.
SIM messages ?-clear?
Parameters
handle:Not documented.
-clear:Empties the internal queue structure and returns nothing.
Description
Example:
join [$sim messages] \n
# stdout ******
# stdout ** ngspice-44.x shared library
# ...
# # status[0]: --ready--
Warning: accumulation of messages continues even if you run new circuit or analysis until you explicitly clear the data storage.
The handle argument is supplied automatically when called as $handle messages.
Return value
list of messages
SIM plot
Gets current plot name if no arguments provided, names of all plots or all vectors names that belongs to name of the provided plot.
SIM plot ?-all? SIM plot -vecs name
Parameters
handle:Not documented.
-all:Switch to return all plots names.
-vecs plotname:Switch with argument to get all vectors names belonging to
nameplot.
Description
The handle argument is supplied automatically when called as $handle plot.
Return value
current plot, or list of all plots, or list of all vectors
SIM vectors
Gets data accumulated from send_data events through the Tcl event loop.
SIM vectors ?-clear?
Parameters
handle:Not documented.
-clear:Empties stored samples and returns nothing.
Description
Output:
List mode: dictionary mapping signal names to lists. Complex samples use interleaved real/imaginary doubles.
Vector mode: dictionary mapping raw signal names to fully qualified live RBC vector commands. Real and complex signals use the corresponding vector types.
Updates and clearing:
Each new plot replaces stored list data, for both run and bg_run. Lists contain the current plot’s accumulated samples, not concatenated history. Previously returned dictionaries remain valid.
Halting preserves samples. Resuming the same plot appends to them, including samples still queued for Tcl processing. A different plot resets storage even when reached through resume.
Explicit -clear empties stored samples and discards already queued samples in both output modes. Samples received afterwards continue appending; ngspice snapshot data is unaffected.
Vector identities remain stable across runs. Each new plot clears retained vectors, including signals absent from that plot.
Updates require Tcl event processing or an explicit flush; eventcounts/waitevent alone do not publish queued samples. The run helper flushes automatically before returning.
In vector mode, -clear preserves vector commands and their graph bindings.
Ownership and renaming:
The handle destroys vectors it created; adopted vectors remain alive.
Treat live contents as read-only. Deleting, resizing or replacing attached vectors invalidates continued streaming.
Use rbc::vector rename oldName newName to rename a live vector. Its identity, ownership and streaming connection are preserved across clear and subsequent runs.
After renaming completes, query the bridge for the updated dictionary: signal keys remain unchanged, while destination names reflect the rename.
Ordinary Tcl rename is unsupported because it leaves RBC’s registry unchanged.
Errors:
Asynchronous output failures are reported once through Tcl’s background error handler and on subsequent vectors calls. Incoming samples are discarded until a new plot initializes output.
Example:
$sim vectors
# -> v(out) {0.0 0.1 0.2 ...} v(in) {...} v-sweep {...}
$sim vectors -clear
# -> (no result; succeeds)
The handle argument is supplied automatically when called as $handle vectors.
Return value
dict with vectors values accumulated up to this point in internal structure
SIM waitevent
Blocks until a named event is observed n number of times (or once), the instance is aborted/destroyed, or the timeout expires (if provided).
SIM waitevent name ?-n N? ?-since count? ?timeout_ms?
Parameters
handle:Not documented.
-n N:Required number of callbacks relative to the baseline; defaults to one.
-since count:Optional baseline captured with eventcounts before starting the operation.
name:Name of the event.
timeout_ms:Timeout in miliseconds, optional.
Description
Event name |
Ngspice callback function name |
When it is called |
|---|---|---|
|
|
Whenever Ngspice produces a line of text on stdout or stderr. |
|
|
When Ngspice’s simulation status changes (e.g., –ready–, tran 50.1%, convergence messages). |
|
|
When Ngspice exits, either due to an error or after a quit command from Tcl/Ngspice. |
|
|
During an analysis, whenever Ngspice sends a row of vector values (time step or sweep point) to the callback. |
|
|
At the start of a run, when Ngspice sends metadata for all vectors in the current plot (names, types, indexes, real/complex). |
|
|
When the Ngspice background thread changes state: running=false means it just started running, running=true means it has stopped. |
Time |
Tcl Script Action |
Ngspice Core Activity |
Bridge Callback Fired |
Tcl Event Name Seen |
|---|---|---|---|---|
t0 |
|
Library loaded |
(none) |
(none) |
t1 |
|
Initialization completed |
(none) |
(none) |
t2 |
|
Parses circuit line |
|
|
t3 |
(more circbyline calls) |
Parses circuit line |
|
|
t4 |
|
Start background simulation |
|
|
t5 |
(analysis setup) |
Build vector table |
|
|
t6 |
(analysis running) |
First data point |
|
|
t7 |
(analysis running) |
More points |
|
|
t8 |
(analysis running) |
Status change |
|
|
t9 |
(analysis completed) |
Simulation ready |
|
|
t10 |
(BG thread exits) |
Background thread exits |
|
|
t11 |
|
ngspice quits |
|
|
t12 |
|
Teardown |
(no further calls) |
(command removed) |
Result dictionary of the command:
fired-0|1, whether the target count was reachedcount- cumulative total count for that event so farstatus-ok | timeout | aborted
Examples:
$sim waitevent send_stat 1000
# -> {fired 1 count 1 status ok}
$sim waitevent send_stat 1000
# -> {fired 0 count 1 status timeout} ;# nothing new in the next 1s
By default, only callbacks received after entering the wait count. To include callbacks received between starting an operation and waiting, capture a baseline first:
set baseline [dict get [$sim eventcounts] bg_running]
$sim command bg_run
$sim waitevent bg_running -since $baseline -n 2 10000
With -since, the target is baseline + N; an already reached target returns immediately. Use a count from the same handle and event. Do not clear counters between capturing it and waiting. A timeout returns status timeout, not a Tcl error. This command does not process queued data updates.
The handle argument is supplied automatically when called as $handle waitevent.
Return value
dictionary with information about event
Copyright (c) George Yashin