Chapter 41. The Tcl ring package

The Tcl ring package provides access to ring buffers. For more on ring buffers see the chapter Ring Buffer Primitives. For reference information on the Tcl ring package see the Tcl ring pacakge reference page.

The Tcl ring package must be incorporated into Tcl scripts in order to be used. If you have defined an evironment variable NSCLDAQROOT that points to the top level of the NSCL DAQ software, the following code can load the package:

Example 41-1. Incorporating the ring package in your scripts


set libpath [file join $::env($NSCLDAQROOT) TclLibs]\
lappend auto_path $libpath

package require ring
        

All NSCL DAQ Tcl loadable packages are in the TclLibs directory subtree of the NSCL DAQ installation. Adding the path to that directory to the auto_path Tcl list enables the Tcl package command to locate that package.

The package require ring locates and loads the command.