|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjmri.jmrix.loconet.SecurityElement
public class SecurityElement
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 |
|---|
public static final int NONE
public static final int AX
public static final int XA
public static final int A
public static final int B
public static final int C
public boolean calculates
public int mNumber
public int onAXReservation
public int onXAReservation
public static final int STOPOPPOSITE
public static final int STOPUNRESERVED
public boolean makeAReservation
public boolean makeBReservation
public boolean makeCReservation
public int attachAnum
public int attachAleg
public int attachBnum
public int attachBleg
public int attachCnum
public int attachCleg
public int dsSensor
public int turnout
public int auxInput
public int maxSpeedAC
public int maxSpeedCA
public int maxSpeedAB
public int maxSpeedBA
public int maxBrakingAC
public int maxBrakingCA
public int maxBrakingAB
public int maxBrakingBA
public int currentSpeedAX
public int currentSpeedXA
public int currentDirection
| Constructor Detail |
|---|
public SecurityElement(int pNumber)
| Method Detail |
|---|
public int getNumber()
public String showInputSpeeds()
public String showReservations()
public String showOccupancy()
public void message(LocoNetMessage l)
message in interface LocoNetListenerl - public void dispose()
public void addPropertyChangeListener(PropertyChangeListener l)
public void removePropertyChangeListener(PropertyChangeListener l)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||