Package jmri.jmrix.loconet.locoio
Class LocoIOModeList
java.lang.Object
jmri.jmrix.loconet.locoio.LocoIOModeList
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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 LocoIOModeprotected String[]protected booleanisValidModeValue(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 Details
-
modeList
-
validmodes
-
-
Constructor Details
-
LocoIOModeList
public LocoIOModeList()Create a new instance of LocoIOModeList
-
-
Method Details
-
getValidModes
-
isValidModeValue
-
getLocoIOModeFor
-
getLocoIOModeFor
-
addressToValue1
Convert Value1 (Low bits) from Port Address.- Parameters:
lim- one of a list of defined port operation modesaddress- the address for this port- Returns:
- low-bits value
-
addressToValue2
Convert Value2 (High bits) from Port Address.- Parameters:
lim- one of a list of defined port operation modesaddress- the address for this port- Returns:
- high-bits value
-
addressToValues
Create 2 byte value from Port Address bits.- Parameters:
opcode- coded value for message typesv- index of SV value to create, ignoredv2mask- mask to apply on Value2address- the address for this port- Returns:
- 2-byte value
-
valuesToAddress
Extract Port Address from the 3 SV values.- Parameters:
opcode- coded value for message typesv- first SV value, ignoredv1- second value (upper bits)v2- second value (lower bits)- Returns:
- address (int) of the port
-
valuesToAddress
-