Package jmri.jmrit.ctc.topology
Class TopologyInfo
- java.lang.Object
-
- jmri.jmrit.ctc.topology.TopologyInfo
-
public class TopologyInfo extends java.lang.Object
This class contains all of the information needed (in lists) for the higher level "TRL_Rules" to generate all of the entries in "_mTRL_TrafficLockingRulesSSVList"
-
-
Constructor Summary
Constructors Constructor Description TopologyInfo()
TopologyInfo(CTCSerialData CTCSerialData, java.lang.String destinationSignalMast, java.lang.String normal, java.lang.String reverse)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBlocks(java.util.List<Block> blocks)
Quick and dirty routine to all all of the sensors in the passed blocks to our internal lists.void
addTurnouts(SignalMastLogic signalMastLogic, SignalMast signalMast)
Quick and dirty routine to add all of the turnouts in SML to our internal lists.java.lang.String
getDestinationSignalMast()
java.lang.String
getNormalReversed(int index)
Quick and dirty routine to get "Normal"/"Reverse" information.java.lang.String
getOSSectionText(int index)
Quick and dirty routine to get O.S. section information.java.lang.String
getSensorDisplayName(int index)
Quick and dirty routine to get the Display Name of the sensor.java.lang.String
getUniqueID(int index)
Quick and dirty routine to get the unique id..boolean
nonEmpty()
-
-
-
Constructor Detail
-
TopologyInfo
public TopologyInfo()
-
TopologyInfo
public TopologyInfo(CTCSerialData CTCSerialData, java.lang.String destinationSignalMast, java.lang.String normal, java.lang.String reverse)
-
-
Method Detail
-
getDestinationSignalMast
public java.lang.String getDestinationSignalMast()
-
nonEmpty
public boolean nonEmpty()
- Returns:
- true if any of our lists have anything.
-
getOSSectionText
public java.lang.String getOSSectionText(int index)
Quick and dirty routine to get O.S. section information.- Parameters:
index
- Index into array- Returns:
- null if no information, else text (of form "29/30" for instance)
-
getNormalReversed
public java.lang.String getNormalReversed(int index)
Quick and dirty routine to get "Normal"/"Reverse" information.- Parameters:
index
- Index into array- Returns:
- "Normal" if no information, else text (of form "Normal" for instance)
-
getSensorDisplayName
public java.lang.String getSensorDisplayName(int index)
Quick and dirty routine to get the Display Name of the sensor.- Parameters:
index
- Index into array- Returns:
- "" if no information, else text (of form "SW31-OS" for instance)
-
getUniqueID
public java.lang.String getUniqueID(int index)
Quick and dirty routine to get the unique id..- Parameters:
index
- Index into array- Returns:
- null if no information, else uniqueID as String of the O.S. section.
-
addBlocks
public void addBlocks(java.util.List<Block> blocks)
Quick and dirty routine to all all of the sensors in the passed blocks to our internal lists. Duplicates are ignored. It is possible that the user didn't associate a sensor with the block. Ignore such entries.- Parameters:
blocks
- List of Blocks to add.
-
addTurnouts
public void addTurnouts(SignalMastLogic signalMastLogic, SignalMast signalMast)
Quick and dirty routine to add all of the turnouts in SML to our internal lists. Duplicates are ignored.- Parameters:
signalMastLogic
- SML to work against.signalMast
- Destination mast in SML.
-
-