Model Railroad System 2.2.2
Classes | Typedefs | Enumerations | Functions
nce Namespace Reference

Namespace that holds the NCE interface code. More...

Classes

class  NCE
 Main NCE Cab Bus interface class. More...
 

Typedefs

typedef int LocoAddress
 Locomotive address type. More...
 
typedef int ConsistAddress
 Consist address type. More...
 
typedef int AccessoryNumber
 Accessory address type. More...
 
typedef int MacroNumber
 NCE Macro number. More...
 
typedef int CabNumber
 Cab number type. More...
 
typedef int Hours
 Hours type. More...
 
typedef int Minutes
 Minutes type. More...
 
typedef int ScaleClockRatio
 Scale clock ratio range. More...
 
typedef int EchoMode
 This is really should be an enumeration, but works as a limited range integer. More...
 
typedef int Speed28
 28 speed step speeds. More...
 
typedef int Speed128
 128 speed step speeds. More...
 
typedef int CSAddress
 CSAddress type. More...
 
typedef int UByte
 Unsigned byte type (data byte). More...
 
typedef listtype RAMData
 Datalist for RAM data, 1 to 16 unsigned bytes. More...
 
typedef char * LCDMessage16
 Data for 16 character LCD lines. More...
 
typedef char * LCDMessage8
 Data for 8 character LCD lines. More...
 
typedef listtype RawPacket
 Raw packets for writing raw packets to the temp queue. More...
 
typedef listtype RawTrackPacket
 Raw packets for writing raw packets to the track queue. More...
 
typedef listtype RAMData8
 Datalist for RAM data 8 unsigned bytes. More...
 
typedef int MomentumLevel
 Momentum level. More...
 
typedef int AspectBits
 Aspect bit mask. More...
 

Enumerations

enum  SpeedMode { S14 , S28 , S128 }
 
enum  Direction { Forward , Reverse }
 

Functions

 ErrorMessage (code)
 Return the error message, given the error code. More...
 

Detailed Description

Namespace that holds the NCE interface code.

This is a cross-platform implementation the NCE Cab Bus serial port interface. Based on documentation provided by NCE (usb_1.pdf and Bincmds.pdf).

Basically, the way this code works is to use a class to interface to the real RS232 port attached to a CS02 command station OR the 'virtual' serial port implemented by the NCE USB Interface Board connected to the NCE Cab Bus.

Author
Robert Heller <heller@deepsoft.com>

Package provided

NCE 1.0.0

Typedef Documentation

◆ AccessoryNumber

Accessory address type.

◆ AspectBits

Aspect bit mask.

◆ CabNumber

Cab number type.

◆ ConsistAddress

Consist address type.

◆ CSAddress

unsigned short int nce::CSAddress

CSAddress type.

◆ EchoMode

This is really should be an enumeration, but works as a limited range integer.

Allowed values are:

  • 0 No echo.
  • 1 Echo 1st byte of command.
  • 2 Echo entire command.

◆ Hours

Hours type.

◆ LCDMessage16

Data for 16 character LCD lines.

◆ LCDMessage8

Data for 8 character LCD lines.

◆ LocoAddress

Locomotive address type.

◆ MacroNumber

NCE Macro number.

◆ Minutes

Minutes type.

◆ MomentumLevel

Momentum level.

◆ RAMData

Datalist for RAM data, 1 to 16 unsigned bytes.

◆ RAMData8

Datalist for RAM data 8 unsigned bytes.

◆ RawPacket

Raw packets for writing raw packets to the temp queue.

◆ RawTrackPacket

Raw packets for writing raw packets to the track queue.

◆ ScaleClockRatio

Scale clock ratio range.

◆ Speed128

128 speed step speeds.

◆ Speed28

28 speed step speeds.

◆ UByte

unsigned char nce::UByte

Unsigned byte type (data byte).

Enumeration Type Documentation

◆ Direction

Enumerator
Forward 

Forward direction.

Reverse 

Reverse direction.

◆ SpeedMode

Enumerator
S14 

Fourteen speed step mode.

S28 

Twenty eight speed step mode.

S128 

128 speed step mode.

Function Documentation

◆ ErrorMessage()

nce::ErrorMessage ( code  )

Return the error message, given the error code.

This function returns the error message associated with a given error code.

Parameters
codeError code returned.
Returns
A localized error message string.
Author
Robert Heller <heller@deepsoft.com>