jmri.jmrix.loconet
Class SecurityElement

Show UML class diagram
java.lang.Object
  extended by jmri.jmrix.loconet.SecurityElement
All Implemented Interfaces:
EventListener, LocoNetListener

public class SecurityElement
extends Object
implements LocoNetListener

Test implementation of SecurityElement, ala 1/8 of an SE8.

This is implemented in terms of basic LocoNet, rather than using references to Sensor and Turnout objects, to force it to be specific about how messages are handled.

Messages listened to:

Note that the SE message turnout bit is set for CLOSED or no turnout associated. The configured turnout number is 1-N

Internally, our "Direction" variables encode the direction of travel within this SE. Note that this combination results in an extra complement; if looking at a remote SE's A leg and it is reserved in the AX direction, that it NOT coming toward us.

SE messages include addresses coded as 0-4095, not 1-4096.

The algorithms in this class are a collaborative effort of Digitrax, Inc and Bob Jacobsen.

Some of the message formats used in this class are Copyright Digitrax, Inc. and used with permission as part of the JMRI project. That permission does not extend to uses in other software products. If you wish to use this code, algorithm or these message formats outside of JMRI, please contact Digitrax Inc for separate permission.


Field Summary
static int A
           
 int attachAleg
           
 int attachAnum
           
 int attachBleg
           
 int attachBnum
           
 int attachCleg
           
 int attachCnum
           
 int auxInput
           
static int AX
           
static int B
           
static int C
           
 boolean calculates
           
 int currentDirection
           
 int currentSpeedAX
           
 int currentSpeedXA
           
 int dsSensor
           
 boolean makeAReservation
           
 boolean makeBReservation
           
 boolean makeCReservation
           
 int maxBrakingAB
           
 int maxBrakingAC
           
 int maxBrakingBA
           
 int maxBrakingCA
           
 int maxSpeedAB
           
 int maxSpeedAC
           
 int maxSpeedBA
           
 int maxSpeedCA
           
 int mNumber
           
static int NONE
           
 int onAXReservation
           
 int onXAReservation
           
static int STOPOPPOSITE
           
static int STOPUNRESERVED
           
 int turnout
           
static int XA
           
 
Constructor Summary
SecurityElement(int pNumber)
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
           
 void dispose()
           
 int getNumber()
           
 void message(LocoNetMessage l)
          Process incoming messages.
 void removePropertyChangeListener(PropertyChangeListener l)
           
 String showInputSpeeds()
           
 String showOccupancy()
           
 String showReservations()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
See Also:
Constant Field Values

AX

public static final int AX
See Also:
Constant Field Values

XA

public static final int XA
See Also:
Constant Field Values

A

public static final int A
See Also:
Constant Field Values

B

public static final int B
See Also:
Constant Field Values

C

public static final int C
See Also:
Constant Field Values

calculates

public boolean calculates

mNumber

public int mNumber

onAXReservation

public int onAXReservation

onXAReservation

public int onXAReservation

STOPOPPOSITE

public static final int STOPOPPOSITE
See Also:
Constant Field Values

STOPUNRESERVED

public static final int STOPUNRESERVED
See Also:
Constant Field Values

makeAReservation

public boolean makeAReservation

makeBReservation

public boolean makeBReservation

makeCReservation

public boolean makeCReservation

attachAnum

public int attachAnum

attachAleg

public int attachAleg

attachBnum

public int attachBnum

attachBleg

public int attachBleg

attachCnum

public int attachCnum

attachCleg

public int attachCleg

dsSensor

public int dsSensor

turnout

public int turnout

auxInput

public int auxInput

maxSpeedAC

public int maxSpeedAC

maxSpeedCA

public int maxSpeedCA

maxSpeedAB

public int maxSpeedAB

maxSpeedBA

public int maxSpeedBA

maxBrakingAC

public int maxBrakingAC

maxBrakingCA

public int maxBrakingCA

maxBrakingAB

public int maxBrakingAB

maxBrakingBA

public int maxBrakingBA

currentSpeedAX

public int currentSpeedAX

currentSpeedXA

public int currentSpeedXA

currentDirection

public int currentDirection
Constructor Detail

SecurityElement

public SecurityElement(int pNumber)
Method Detail

getNumber

public int getNumber()

showInputSpeeds

public String showInputSpeeds()

showReservations

public String showReservations()

showOccupancy

public String showOccupancy()

message

public void message(LocoNetMessage l)
Process incoming messages. This includes:

Specified by:
message in interface LocoNetListener
Parameters:
l -

dispose

public void dispose()

addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)

removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)


Copyright © 1997 - 2010 JMRI Community.
JMRI, DecoderPro, PanelPro, SoundPro, DispatcherPro and associated logos are our trademarks.

Additional information on copyright, trademarks and licenses is linked here.
Site hosted by: Get JMRI Model Railroad Interface at SourceForge.net. Fast, secure and Free Open Source software downloads