Class LnPr2ThrottleManager

    • Method Detail

      • singleUse

        protected boolean singleUse()
        PR2 allows only one throttle

        Does this DCC system allow a Throttle (e.g. an address) to be used by only one user at a time?

        Overrides:
        singleUse in class AbstractThrottleManager
        Returns:
        true or false
      • canBeLongAddress

        public boolean canBeLongAddress​(int address)
        Address 128 and above is a long address
        Parameters:
        address - address number to test
        Returns:
        true if address can be long; false otherwise
      • canBeShortAddress

        public boolean canBeShortAddress​(int address)
        Address 127 and below is a short address
        Parameters:
        address - address number to test
        Returns:
        true if address can be short; false otherwise
      • addressTypeUnique

        public boolean addressTypeUnique()
        Are there any ambiguous addresses (short vs long) on this system?
        Returns:
        true if ambiguous addresses are not allowed; false otherwise
      • getActiveAddress

        public DccLocoAddress getActiveAddress()
        Make the active address available to the power manager, which needs it to turn on and off "neutral mode" in the locomotive
        Returns:
        a DccLocoAddress