Class ThrottleManager

  • All Implemented Interfaces:
    ThrottleManager

    public class ThrottleManager
    extends AbstractThrottleManager
    Direct DCC implementation of a ThrottleManager.

    When the traffic manager doesn't have anything else to do, it comes here to get a command to send.

    This is a partial implementation, which can only handle one Throttle at a time. It also is missing logic to alternate sending speed and function commands; right now it only sends the first group of function packets.

    • Method Detail

      • addressTypeUnique

        public boolean addressTypeUnique()
        Description copied from interface: ThrottleManager
        Test if ambiguous addresses (short vs long) are not allowed on this system. Also indicates support for multi-protocol decoders.
        Returns:
        true if ambiguous addresses are not allowed; false otherwise
      • canBeShortAddress

        public boolean canBeShortAddress​(int a)
        Description copied from interface: ThrottleManager
        Test if a specific number is a valid short address on this system.
        Parameters:
        a - address number to test
        Returns:
        true if address can be short; false otherwise
      • canBeLongAddress

        public boolean canBeLongAddress​(int a)
        Description copied from interface: ThrottleManager
        Test if a specific number is a valid long address on this system.
        Parameters:
        a - address number to test
        Returns:
        true if address can be long; false otherwise