Model Railroad System  2.2.1
Classes | Typedefs | Enumerations
cmri Namespace Reference

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

Classes

class  CMri
 Main C/MRI interface class. More...
 

Typedefs

typedef int uatype
 Board address type. More...
 
typedef int ubyte
 Unsigned byte. More...
 
typedef listtype ByteList
 

Enumerations

enum  CardType { USIC, SUSIC, SMINI }
 

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>

Package provided

Cmri 2.0.0

Typedef Documentation

◆ ByteList

List of bytes.

Contains a list of unsigned bytes.

◆ uatype

Board address type.

An integer in the range from 0 to 127, inclusive.

◆ ubyte

unsigned char cmri::ubyte

Unsigned byte.

8-bit unsigned byte.

Enumeration Type Documentation

◆ CardType

Card type codes.

Enumerator
USIC 

Classic Universal Serial Interface Card.

SUSIC 

Super Classic Universal Serial Interface Card.

SMINI 

SMINI Super Mini node.