Class XpaThrottleManager

java.lang.Object
jmri.jmrix.AbstractThrottleManager
jmri.jmrix.xpa.XpaThrottleManager
All Implemented Interfaces:
ThrottleManager

XPA implementation of a ThrottleManager.
  • Constructor Details

  • Method Details

    • requestThrottleSetup

      public void requestThrottleSetup(LocoAddress address, boolean control)
      Request a new throttle object be created for the address, and let the throttle listeners know about it. Abstract member to actually do the work of configuring a new throttle, usually via interaction with the DCC system.
      Specified by:
      requestThrottleSetup in class AbstractThrottleManager
      Parameters:
      address - address
      control - false - read only.
    • hasDispatchFunction

      public boolean hasDispatchFunction()
      The XPA does not support the dispatch function.
      Specified by:
      hasDispatchFunction in interface ThrottleManager
      Overrides:
      hasDispatchFunction in class AbstractThrottleManager
      Returns:
      false
    • canBeLongAddress

      public boolean canBeLongAddress(int address)
      Test if a specific number is a valid long address on this system. Address 100 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)
      Test if a specific number is a valid short address on this system. Address 99 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()
      Test if ambiguous addresses (short vs long) are not allowed on this system. Also indicates support for multi-protocol decoders.
      Returns:
      true because this type of throttle has no long/short overlap
    • isLongAddress

      static boolean isLongAddress(int num)
      Local method for deciding short/long address.
      Parameters:
      num - address to check
      Returns:
      true if valid as long address
    • supportedSpeedModes

      What speed modes are supported by this system? What speed modes are supported by this system? value should be xor of possible modes specifed by the DccThrottle interface
      Specified by:
      supportedSpeedModes in interface ThrottleManager
      Overrides:
      supportedSpeedModes in class AbstractThrottleManager
      Returns:
      an XOR of the possible modes specified in the throttle interface