Model Railroad System 2.2.2
Namespaces
Cmri

CMR/I Tcl Serial Port Interface. More...

Namespaces

namespace  cmri
 CMR/I Tcl Serial Port Interface.
 

Detailed Description

CMR/I Tcl Serial Port Interface.

This is a cross-platform implementation of Bruce Chubb's C/MRI QBASIC serial port code ported to Tcl. This code has been tested with Tcl 8.4.

Basically, the way this code works is to use a SNIT class (described on in CMri) to interface to the serial port, which may have one or more serial port cards (a mix of USICs, SUSICs, and SMINIs). A given class instance interfaces to all of the cards on attached to a given serial port. There are three public member functions, one to initialize a given board (described in CMri::InitBoard), one to set the output ports (described in CMri::Outputs), and one to poll the state of the input ports (described in CMri::Inputs).

I was inspired to write this code after reading the four part series in Model Railroader and reading the download package for the SMINI card. I already have a copy of Bruce Chubb's Build Your Own Universal Computer Interface, but the SMINI looks like a great option for small `‘remote’' locations of a layout where there are a few turnouts and a some signals, such as a small junction, interchange yard, or isolated industrial spur.

Author
Robert Heller <heller@deepsoft.com>