Package com.scriptel.proscript
Class Version
- java.lang.Object
-
- com.scriptel.proscript.Version
-
public class Version extends java.lang.Object
This class represents the firmware version of a ScripTouch device.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
firmwareAfter(int major, int minor, int release)
Tests to see if the given firmware version is newer than the passed in version.boolean
firmwareAfter(Version version)
Tests to see if the given firmware version is newer than the passed in version.boolean
firmwareBefore(int major, int minor, int release)
Tests to see if the given firmware version is older than the passed in version.boolean
firmwareBefore(Version version)
Tests to see if the given firmware version is older than the passed in version.boolean
firmwareEquals(int major, int minor, int release)
Tests to see if the version of the firmware is equal to the passed in value.boolean
firmwareEquals(Version version)
Tests to see if the version of firmware is equal to the passed in value.int
getAsicSignature()
Gets the ASIC signature.int
getFirmwareVersionMajor()
Gets the major firmware version.int
getFirmwareVersionMinor()
Gets the minor firmware version.int
getFirmwareVersionRelease()
Gets the release firmware version.java.lang.String
getFirmwareVersionString()
Gets the firmware version as a string.int
getKernelVersionMajor()
Gets the major kernel version.int
getKernelVersionMinor()
Gets the minor kernel version.int
getKernelVersionRelease()
Gets the release kernel version.java.lang.String
getKernelVersionString()
Gets the kernel version as a string.java.lang.String
toString()
Prints this object as a human readable string.
-
-
-
Method Detail
-
firmwareBefore
public boolean firmwareBefore(int major, int minor, int release)
Tests to see if the given firmware version is older than the passed in version.- Parameters:
major
- Major version to test against.minor
- Minor version to test against.release
- Release version to test against.- Returns:
- Returns true if the passed in version is newer than the current version.
-
firmwareBefore
public boolean firmwareBefore(Version version)
Tests to see if the given firmware version is older than the passed in version.- Parameters:
version
- Version to test against.- Returns:
- Returns true if the passed in version is newer than the current version.
-
firmwareAfter
public boolean firmwareAfter(int major, int minor, int release)
Tests to see if the given firmware version is newer than the passed in version.- Parameters:
major
- Major version to test against.minor
- Minor version to test against.release
- Release version to test against.- Returns:
- Returns true if the passed in version is older than the current version.
-
firmwareAfter
public boolean firmwareAfter(Version version)
Tests to see if the given firmware version is newer than the passed in version.- Parameters:
version
- Version to test against.- Returns:
- Returns true if the passed in version is older than the current version.
-
firmwareEquals
public boolean firmwareEquals(Version version)
Tests to see if the version of firmware is equal to the passed in value.- Parameters:
version
- Version to test against.- Returns:
- Returns true if the firmware versions are equal.
-
firmwareEquals
public boolean firmwareEquals(int major, int minor, int release)
Tests to see if the version of the firmware is equal to the passed in value.- Parameters:
major
- Major version to test.minor
- Minor version to test.release
- Release version to test.- Returns:
- True if the firmware versions are equal.
-
toString
public java.lang.String toString()
Prints this object as a human readable string.- Overrides:
toString
in classjava.lang.Object
- Returns:
- Human readable string.
-
getFirmwareVersionString
public java.lang.String getFirmwareVersionString()
Gets the firmware version as a string. Converts numbers to binary coded decimal to accurately represent numbers.- Returns:
- String representing firmware version.
-
getKernelVersionString
public java.lang.String getKernelVersionString()
Gets the kernel version as a string. Converts numbers to binary coded decimal to accurate represent numbers.- Returns:
- String representing kernel version.
-
getKernelVersionMajor
public int getKernelVersionMajor()
Gets the major kernel version.- Returns:
- the kernelVersionMajor
-
getKernelVersionMinor
public int getKernelVersionMinor()
Gets the minor kernel version.- Returns:
- the kernelVersionMinor
-
getKernelVersionRelease
public int getKernelVersionRelease()
Gets the release kernel version.- Returns:
- the kernelVersionRelease
-
getFirmwareVersionMajor
public int getFirmwareVersionMajor()
Gets the major firmware version.- Returns:
- the firmwareVersionMajor
-
getFirmwareVersionMinor
public int getFirmwareVersionMinor()
Gets the minor firmware version.- Returns:
- the firmwareVersionMinor
-
getFirmwareVersionRelease
public int getFirmwareVersionRelease()
Gets the release firmware version.- Returns:
- the firmwareVersionRelease
-
getAsicSignature
public int getAsicSignature()
Gets the ASIC signature.- Returns:
- the asicSignature
-
-