Model Railroad System  2.2.1
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
arduniomax72xx_signals::OneTwoHead3Color Class Reference

One or two heads signals, 3 colors per head. More...

Public Member Functions

 OneTwoHead3Color (name,...)
 Constructor: initialize the signal object. More...
 
 setaspect (aspect)
 Set signal aspect. More...
 

Static Public Member Functions

static validate (object)
 Type validating code Raises an error if object is not either the empty string or a OneTwoHead3Color type object. More...
 

Private Attributes

 driver
 The SignalDriverMax72xx object. More...
 

Static Private Attributes

static aspectmap
 Aspect map. More...
 

Detailed Description

One or two heads signals, 3 colors per head.

Typical usage:

# Load the low-level code
package require SignalDriverMax72xx_Host
# Connect to the Ardunio
SignalDriverMax72xx controlpoint1 -portname /dev/ttyACM0
# Allocate a signal
arduniomax72xx_signals::OneTwoHead3Color CP1w2 -driver controlpoint1 -signal 0
# Set aspect to Green over Red (clear)
CP1w2 setaspect {green red}
Author
Robert Heller <heller@deepsoft.com>

Definition at line 64 of file ArdunioMAX72XX_Signals.tcl.

Constructor & Destructor Documentation

◆ OneTwoHead3Color()

arduniomax72xx_signals::OneTwoHead3Color::OneTwoHead3Color ( name  ,
  ... 
)

Constructor: initialize the signal object.

Create a low level actuator object and install it as a component.

Parameters
nameName of the signal object.
...Options:
  • -driver SignalDriverMax72xx object.
  • -signal Signal number on the MAX7200 board.
  • -signalname Name of the signal on the track work schematic.

Member Function Documentation

◆ setaspect()

arduniomax72xx_signals::OneTwoHead3Color::setaspect ( aspect  )

Set signal aspect.

Parameters
aspectNew aspect color.

◆ validate()

static arduniomax72xx_signals::OneTwoHead3Color::validate ( object  )
static

Type validating code Raises an error if object is not either the empty string or a OneTwoHead3Color type object.

Parameters
objectSome object.

Member Data Documentation

◆ aspectmap

arduniomax72xx_signals::OneTwoHead3Color::aspectmap
staticprivate

Aspect map.

Definition at line 96 of file ArdunioMAX72XX_Signals.tcl.

◆ driver

arduniomax72xx_signals::OneTwoHead3Color::driver
private

The SignalDriverMax72xx object.

Definition at line 72 of file ArdunioMAX72XX_Signals.tcl.