Package jmri.jmrix.loconet.locoio
Class LocoIOModeList
- java.lang.Object
- 
- jmri.jmrix.loconet.locoio.LocoIOModeList
 
- 
 public class LocoIOModeList extends java.lang.Object Manage the set of valid modes for a particular LocoIO port, as well as the conversions between addresses and SV values. Used in LocoIO tool. Marked Legacy/Deprecated since 2017 version 4.12.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.Vector<LocoIOMode>modeListprotected java.lang.String[]validmodes
 - 
Constructor SummaryConstructors Constructor Description LocoIOModeList()Create a new instance of LocoIOModeList
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intaddressToValue1(LocoIOMode lim, int address)Convert Value1 (Low bits) from Port Address.protected intaddressToValue2(LocoIOMode lim, int address)Convert Value2 (High bits) from Port Address.protected intaddressToValues(int opcode, int sv, int v2mask, int address)Create 2 byte value from Port Address bits.protected LocoIOModegetLocoIOModeFor(int cv, int v1, int v2)protected LocoIOModegetLocoIOModeFor(java.lang.String s)protected java.lang.String[]getValidModes()protected booleanisValidModeValue(java.lang.Object value)protected intvaluesToAddress(int opcode, int sv, int v1, int v2)Extract Port Address from the 3 SV values.protected intvaluesToAddress(LocoIOMode lim, int sv, int v1, int v2)
 
- 
- 
- 
Field Detail- 
modeListprotected java.util.Vector<LocoIOMode> modeList 
 - 
validmodesprotected java.lang.String[] validmodes 
 
- 
 - 
Constructor Detail- 
LocoIOModeListpublic LocoIOModeList() Create a new instance of LocoIOModeList
 
- 
 - 
Method Detail- 
getValidModesprotected java.lang.String[] getValidModes() 
 - 
isValidModeValueprotected boolean isValidModeValue(java.lang.Object value) 
 - 
getLocoIOModeForprotected LocoIOMode getLocoIOModeFor(java.lang.String s) 
 - 
getLocoIOModeForprotected LocoIOMode getLocoIOModeFor(int cv, int v1, int v2) 
 - 
addressToValue1protected int addressToValue1(LocoIOMode lim, int address) Convert Value1 (Low bits) from Port Address.- Parameters:
- lim- one of a list of defined port operation modes
- address- the address for this port
- Returns:
- low-bits value
 
 - 
addressToValue2protected int addressToValue2(LocoIOMode lim, int address) Convert Value2 (High bits) from Port Address.- Parameters:
- lim- one of a list of defined port operation modes
- address- the address for this port
- Returns:
- high-bits value
 
 - 
addressToValuesprotected int addressToValues(int opcode, int sv, int v2mask, int address) Create 2 byte value from Port Address bits.- Parameters:
- opcode- coded value for message type
- sv- index of SV value to create, ignored
- v2mask- mask to apply on Value2
- address- the address for this port
- Returns:
- 2-byte value
 
 - 
valuesToAddressprotected int valuesToAddress(int opcode, int sv, int v1, int v2) Extract Port Address from the 3 SV values.- Parameters:
- opcode- coded value for message type
- sv- first SV value, ignored
- v1- second value (upper bits)
- v2- second value (lower bits)
- Returns:
- address (int) of the port
 
 - 
valuesToAddressprotected int valuesToAddress(LocoIOMode lim, int sv, int v1, int v2) 
 
- 
 
-