Package jmri.jmrit.symbolicprog
Class DccAddressVarHandler
- java.lang.Object
-
- jmri.jmrit.symbolicprog.DccAddressVarHandler
-
public class DccAddressVarHandler extends java.lang.Object
Encapulates DCC address handling logic in one placeExpects one or more of the variables called:
- primaryAddr - Short Address
- extendAddr - Long Address
- addMode - Address Format (an Enum variable to select)
- All three are present - the normal advanced decoder case
- Short Address is present and Long Address is not
- Long Address is present and Short Address is not
-
-
Constructor Summary
Constructors Constructor Description DccAddressVarHandler(VariableValue primaryAddr, VariableValue extendAddr, EnumVariableValue addMode)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doExtended()
Handle case of extended address validprotected void
doPrimary()
Handle case of primary address valid
-
-
-
Constructor Detail
-
DccAddressVarHandler
public DccAddressVarHandler(VariableValue primaryAddr, VariableValue extendAddr, EnumVariableValue addMode)
-
-
Method Detail
-
doPrimary
protected void doPrimary()
Handle case of primary address valid
-
doExtended
protected void doExtended()
Handle case of extended address valid
-
-