Package jmri.jmrix.sprog.update
Class SprogVersion
java.lang.Object
jmri.jmrix.sprog.update.SprogVersion
Class to hold SPROG type and firmware version.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new SPROG version object from a SPROG typeSprogVersion(SprogType t, String s) Construct a new SPROG version object from a SPROG type and version. -
Method Summary
Modifier and TypeMethodDescriptionintReturn major version number for a known SPROG.intReturn minor version number for a known SPROG.booleanCheck if the SPROG has blueline decoder mode.booleanCheck if the SPROG has an adjustable current limit.booleanCheck if the SPROG has various extra features that were not present in the original firmware.booleanCheck if the SPROG has an interlock for the bootloader.booleanbooleanCheck if the SPROG supports use of CV hints when reading.toString()Custom toString with Version Number.
-
Field Details
-
sprogType
-
sprogVersion
-
-
Constructor Details
-
SprogVersion
Construct a new SPROG version object from a SPROG type- Parameters:
t- SprogType the type of SPROG
-
SprogVersion
Construct a new SPROG version object from a SPROG type and version.- Parameters:
t- SprogType the type of SPROGs- String version in "major.minor" format, e.g. "3.1"
-
-
Method Details
-
getMajorVersion
Return major version number for a known SPROG.- Returns:
- major version
-
getMinorVersion
Return minor version number for a known SPROG.- Returns:
- minor version
-
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
Check if the SPROG has blueline decoder mode.- Returns:
- true if the SPROG has blueline decoder support
-
hasCurrentLimit
Check if the SPROG has an adjustable current limit.- Returns:
- true if the SPROG has adjustable current limit
-
hasFirmwareLock
Check if the SPROG has an interlock for the bootloader.- Returns:
- true if the SPROG has firmware interlock
-
hasZTCMode
-
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
-
toString
Custom toString with Version Number.- Parameters:
s- sprog version.- Returns:
- String representation of SPROG version
-