Class SprogVersion

java.lang.Object
jmri.jmrix.sprog.update.SprogVersion

public class SprogVersion extends Object
Class to hold SPROG type and firmware version.
  • Field Details

  • Constructor Details

    • SprogVersion

      Construct a new SPROG version object from a SPROG type
      Parameters:
      t - SprogType the type of SPROG
    • SprogVersion

      public SprogVersion(SprogType t, String s)
      Construct a new SPROG version object from a SPROG type and version.
      Parameters:
      t - SprogType the type of SPROG
      s - String version in "major.minor" format, e.g. "3.1"
  • Method Details

    • getMajorVersion

      public int getMajorVersion()
      Return major version number for a known SPROG.
      Returns:
      major version
    • getMinorVersion

      public int getMinorVersion()
      Return minor version number for a known SPROG.
      Returns:
      minor version
    • hasExtraFeatures

      public boolean hasExtraFeatures()
      Check if the SPROG has various extra features that were not present in the original firmware. This means later SPROG II versions or any type equal or higher than SPROG 3.
      Returns:
      boolean if the current SPROG has extra features
    • hasBlueLine

      public boolean hasBlueLine()
      Check if the SPROG has blueline decoder mode.
      Returns:
      true if the SPROG has blueline decoder support
    • hasCurrentLimit

      public boolean hasCurrentLimit()
      Check if the SPROG has an adjustable current limit.
      Returns:
      true if the SPROG has adjustable current limit
    • hasFirmwareLock

      public boolean hasFirmwareLock()
      Check if the SPROG has an interlock for the bootloader.
      Returns:
      true if the SPROG has firmware interlock
    • hasZTCMode

      public boolean hasZTCMode()
    • supportsCVHints

      public boolean supportsCVHints()
      Check if the SPROG supports use of CV hints when reading. This means SPROG IIv4 or SPROG 3v4 version 4.5 or higher
      Returns:
      boolean if the current SPROG supports CV hints when reading
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      String representation of SPROG version
    • toString

      Custom toString with Version Number.
      Parameters:
      s - sprog version.
      Returns:
      String representation of SPROG version