Package jmri.jmrit.symbolicprog
Class DccAddressVarHandler
java.lang.Object
jmri.jmrit.symbolicprog.DccAddressVarHandler
Encapulates DCC address handling logic in one place
Expects 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
ConstructorsConstructorDescriptionDccAddressVarHandler(VariableValue primaryAddr, VariableValue extendAddr, EnumVariableValue addMode) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidHandle case of extended address validprotected voidHandle case of primary address valid
-
Constructor Details
-
DccAddressVarHandler
public DccAddressVarHandler(VariableValue primaryAddr, VariableValue extendAddr, EnumVariableValue addMode)
-
-
Method Details
-
doPrimary
Handle case of primary address valid -
doExtended
Handle case of extended address valid
-