Package jmri.jmrit.ctc.ctcserialdata
Class TrafficLockingData
- java.lang.Object
-
- jmri.jmrit.ctc.ctcserialdata.TrafficLockingData
-
public class TrafficLockingData extends java.lang.Object
This describes one traffic locking rule.The TRLSwitch sub-class contains switch, alignment and ID values.
The list of traffic locking rules for each OS section are in the _mTRL_LeftTrafficLockingRules and _mTRL_RightTrafficLockingRuless variable in
CodeButtonHandlerData
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TrafficLockingData.TRLSwitch
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
_mDestinationSignalOrComment
java.util.List<NBHSensor>
_mOccupancyExternalSensors
java.util.List<NBHSensor>
_mOptionalExternalSensors
java.lang.String
_mRuleEnabled
java.util.List<TrafficLockingData.TRLSwitch>
_mSwitchAlignments
java.lang.String
_mUserRuleNumber
-
Constructor Summary
Constructors Constructor Description TrafficLockingData()
TrafficLockingData(int ruleNumber, java.lang.String destinationSignalMast, TopologyInfo topologyInfo)
Constructor to take a TopologyInfo entry and create a properly formed "this".
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.ArrayList<java.lang.String>
getAlignments()
Create a list of alignments with 5 entries.java.util.ArrayList<NBHSensor>
getOccupancySensors()
Create a list of occupancy sensors with 9 entries.java.util.ArrayList<NBHSensor>
getOptionalSensors()
Create a list of optional sensors with 2 entries.java.util.ArrayList<java.lang.Integer>
getUniqueIDs()
Create a list of unique ids with 5 entries.java.lang.String
toString()
-
-
-
Field Detail
-
_mUserRuleNumber
public java.lang.String _mUserRuleNumber
-
_mRuleEnabled
public java.lang.String _mRuleEnabled
-
_mDestinationSignalOrComment
public java.lang.String _mDestinationSignalOrComment
-
_mSwitchAlignments
public java.util.List<TrafficLockingData.TRLSwitch> _mSwitchAlignments
-
_mOccupancyExternalSensors
public java.util.List<NBHSensor> _mOccupancyExternalSensors
-
_mOptionalExternalSensors
public java.util.List<NBHSensor> _mOptionalExternalSensors
-
-
Constructor Detail
-
TrafficLockingData
public TrafficLockingData()
-
TrafficLockingData
public TrafficLockingData(int ruleNumber, java.lang.String destinationSignalMast, TopologyInfo topologyInfo)
Constructor to take a TopologyInfo entry and create a properly formed "this".- Parameters:
ruleNumber
- Rule # (just an integer, starting with 1)destinationSignalMast
- String representation of the destination signal mast so user can see on the form.topologyInfo
- Source of data.
-
-
Method Detail
-
getOccupancySensors
public java.util.ArrayList<NBHSensor> getOccupancySensors()
Create a list of occupancy sensors with 9 entries. Unused entries will be set to a dummy NBHSensor.- Returns:
- a list of occupancy sensors.
-
getOptionalSensors
public java.util.ArrayList<NBHSensor> getOptionalSensors()
Create a list of optional sensors with 2 entries. Unused entries will be set to a dummy NBHSensor.- Returns:
- a list of optional sensors.
-
getUniqueIDs
public java.util.ArrayList<java.lang.Integer> getUniqueIDs()
Create a list of unique ids with 5 entries. Unused entries are set to -1.- Returns:
- a list of ids
-
getAlignments
public java.util.ArrayList<java.lang.String> getAlignments()
Create a list of alignments with 5 entries. Unused entries are to to Normal.- Returns:
- a list of alignments
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-