Model Railroad System  2.2.2
Classes | Typedefs | Enumerations
xpressnet Namespace Reference

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

Classes

class  CommandStationResponse
 General response class. More...
 
class  ServiceModeResponse
 Service mode response. More...
 
class  SoftwareVersion
 Software version. More...
 
class  CommandStationStatus
 Command station status. More...
 
class  AccessoryDecoderInformation
 Accessory decoder information. More...
 
class  LocomotiveInformation
 Locomotive information. More...
 
class  FunctionStatus
 Function status. More...
 
class  LocomotiveAddress
 Locomotive address. More...
 
class  DoubleHeaderInformation
 Double header information. More...
 
class  DoubleHeaderMuError
 Double header or MU error. More...
 
class  LI100Message
 LI100 messages. More...
 
class  LI100VersionNumbers
 LI100 Version Numbers. More...
 
class  LI101XPressNetAddress
 LI101 XPress Net Address. More...
 
class  XPressNet
 Main XPressNet interface class. More...
 
class  XpressNetEvent
 XPressNet Event class. More...
 

Typedefs

typedef int nibble
 A 4 bit unsigned integer. More...
 
typedef int ubyte
 An 8 bit unsigned integer. More...
 
typedef int DecoderLongAddress
 Decoder address, an unsigned 14 bit integer. More...
 
typedef int ElementAddress
 A 2 bit unsigned integer. More...
 
typedef int S_14
 14 Speed steps. More...
 
typedef int S_27
 27 Speed steps. More...
 
typedef int S_28
 28 Speed steps. More...
 
typedef int S_128
 128 Speed steps. More...
 
typedef int u10
 An unsigned 10 bit integer. More...
 
typedef int u3
 An unsigned 3 bit integer. More...
 
typedef int u7
 An unsigned 7 bit integer. More...
 
typedef int ConsistAddress
 Multi-unit Address. More...
 

Enumerations

enum  TypeCode {
  NO_RESPONSE_AVAILABLE , NORMAL_OPERATION_RESUMED , TRACK_POWER_OFF , EMERGENCY_STOP ,
  SERVICE_MODE_ENTRY , PROGRAMMING_INFO_SHORT_CIRCUIT , PROGRAMMING_INFO_DATA_BYTE_NOT_FOUND , PROGRAMMING_INFO_COMMAND_STATION_BUSY ,
  PROGRAMMING_INFO_COMMAND_STATION_READY , SERVICE_MODE_RESPONSE , SOFTWARE_VERSION , COMMAND_STATION_STATUS ,
  TRANSFER_ERRORS , COMMAND_STATION_BUSY , INSTRUCTION_NOT_SUPPORTED , ACCESSORY_DECODER_INFORMATION ,
  LOCOMOTIVE_INFORMATION , FUNCTION_STATUS , LOCOMOTIVE_ADDRESS , DOUBLE_HEADER_INFORMATION ,
  DOUBLE_HEADER_MU_ERROR , LI100_MESSAGE , LI100_VERSION , LI101_XPRESSNET_ADDRESS
}
 Response types. More...
 
enum  PowerUpMode { Manual , Automatic }
 Power up modes. More...
 
enum  NibbleCode { Lower , Upper }
 Accessory nibble code. More...
 
enum  SpeedStepModeCode { S14 , S27 , S28 , S128 }
 Speed step mode code. More...
 
enum  DirectionCode { Forward , Reverse }
 Direction flag. More...
 
enum  ErrorTypeCode {
  NotOperatedOr0 , UsedByAnotherDevice , UsedInANotherDHMU , SpeedNotZero ,
  NotMU , NotMUBaseAddress , CantDelete , StackFull
}
 Error type code. More...
 
enum  MessageTypeCode {
  ErrorBetweenLI100AndPC , ErrorBetweenLI100AndCommandStation , UnknownCommunicationsError , Success ,
  NoTimeslot , BufferOverflow , Other
}
 Message type code. More...
 

Detailed Description

Namespace that holds the XPressNet interface code.

This is a cross-platform implementation the XPressNet serial port interface. Based on documentation provided by Lenz Elektronik GMBH (6/2003 third edition). This code works with Tcl 8.4 and later and uses SNIT to implement the classes as snit::types.

Basically, the way this code works is to use a class to interface to the serial port attached to one of Lenz's serial port adapters (LI100, LI100F, or LI101). This code should also work with the LiUSB interface as well.

Author
Robert Heller <heller@deepsoft.com>

Package provided

Xpressnet 2.0.0

Typedef Documentation

◆ ConsistAddress

Multi-unit Address.

◆ DecoderLongAddress

Decoder address, an unsigned 14 bit integer.

◆ ElementAddress

A 2 bit unsigned integer.

◆ nibble

A 4 bit unsigned integer.

◆ S_128

128 Speed steps.

◆ S_14

14 Speed steps.

◆ S_27

27 Speed steps.

◆ S_28

28 Speed steps.

◆ u10

An unsigned 10 bit integer.

◆ u3

An unsigned 3 bit integer.

◆ u7

An unsigned 7 bit integer.

◆ ubyte

unsigned char xpressnet::ubyte

An 8 bit unsigned integer.

Enumeration Type Documentation

◆ DirectionCode

Direction flag.

Enumerator
Forward 

Forward.

Reverse 

Reverse.

◆ ErrorTypeCode

Error type code.

Enumerator
NotOperatedOr0 

One of the locomotives has not been operated by the XpressNet device assembling the Double Header/Multi Unit or locomotive 0 was selected.

UsedByAnotherDevice 

One of the locomotives of the Double Header/Multi Unit is being used by another XpressNet device.

UsedInANotherDHMU 

One of the locomotives is already in another Double Header/Multi Unit.

SpeedNotZero 

The speed of one of the locomotives is not zero.

NotMU 

The locomotive is not a multi-unit.

NotMUBaseAddress 

The locomotive is not a multi-unit base address.

CantDelete 

It is not possible to delete the locomotive.

StackFull 

The command station stack is full.

◆ MessageTypeCode

Message type code.

Enumerator
ErrorBetweenLI100AndPC 

Error occured between the interface and the PC.

(Timeout durring data communication with the PC.)

ErrorBetweenLI100AndCommandStation 

Error occured between the interface and the command station.

(Timeout durring data communication with the command station.)

UnknownCommunicationsError 

Unknown communication error.

(Command station addressed the LI100 with request for acknowledgement.)

Success 

Instruction was successfully sent to the command station or normal operations have resumed after a timeout.

NoTimeslot 

The command station is no longer providing the LI100 a timeslot for communication.

BufferOverflow 

Buffer overflow in the LI100.

Other 

Other messages (undefined).

◆ NibbleCode

Accessory nibble code.

Enumerator
Lower 

Lower nibble.

Upper 

Upper nibble.

◆ PowerUpMode

Power up modes.

Enumerator
Manual 

Manual mode.

Automatic 

Automatic mode.

◆ SpeedStepModeCode

Speed step mode code.

Enumerator
S14 

14 speed step mode.

S27 

27 speed step mode.

S28 

28 speed step mode.

S128 

128 speed step mode.

◆ TypeCode

Response types.

Enumerator
NO_RESPONSE_AVAILABLE 

No response available.

NORMAL_OPERATION_RESUMED 

Normal operation resumed.

TRACK_POWER_OFF 

Track power off.

EMERGENCY_STOP 

Emergency stop.

SERVICE_MODE_ENTRY 

Service mode entry.

PROGRAMMING_INFO_SHORT_CIRCUIT 

Programming info.

`‘short-circuit’'.

PROGRAMMING_INFO_DATA_BYTE_NOT_FOUND 

Programming info.

`‘data byte not found’'.

PROGRAMMING_INFO_COMMAND_STATION_BUSY 

Programming info.

`‘command station busy’'.

PROGRAMMING_INFO_COMMAND_STATION_READY 

Programming info.

`‘command station ready’'.

SERVICE_MODE_RESPONSE 

Service mode response.

SOFTWARE_VERSION 

Software version.

COMMAND_STATION_STATUS 

Command station status.

TRANSFER_ERRORS 

Transfer errors.

COMMAND_STATION_BUSY 

Command station busy.

INSTRUCTION_NOT_SUPPORTED 

Instruction not supported by command station.

ACCESSORY_DECODER_INFORMATION 

Accessory decoder information.

LOCOMOTIVE_INFORMATION 

Locomotive information.

FUNCTION_STATUS 

Function status.

LOCOMOTIVE_ADDRESS 

Locomotive address.

DOUBLE_HEADER_INFORMATION 

Double header information.

DOUBLE_HEADER_MU_ERROR 

Double header or MU error.

LI100_MESSAGE 

LI100 Messages.

LI100_VERSION 

LI100 Version Numbers.

LI101_XPRESSNET_ADDRESS 

LI101 XPressNet Address.