Package com.diozero.sbc
Class LocalSystemInfo
java.lang.Object
com.diozero.sbc.LocalSystemInfo
public class LocalSystemInfo extends Object
Utility class for accessing information about the local system. The majority
of information is specific to the Linux operating system.
-
Method Summary
Modifier and Type Method Description static float
getCpuTemperature()
Utility method to get the CPU temperate of the attached boardString
getDefaultLibraryPath()
String
getHardware()
static Collection<Integer>
getI2CBusNumbers()
static LocalSystemInfo
getInstance()
String
getLibFileExtension()
String
getLinuxOperatingSystemId()
Get the local operating system id as defined by the ID property in/etc/os-release
String
getLinuxOperatingSystemVersion()
Get the local operating system version as defined by the VERSION property in/etc/os-release
String
getLinuxOperatingSystemVersionId()
Get the local operating system version id as defined by the VERSION_ID property in/etc/os-release
String
getLinuxOsReleaseProperty(String property)
Get a property from the operating system release file/etc/os-release
Integer
getMemoryKb()
String
getModel()
String
getOsArch()
String
getOsName()
String
getRevision()
boolean
isArm()
boolean
isArm32()
boolean
isArm64()
boolean
isLinux()
boolean
isWindows()
List<String>
loadLinuxBoardCompatibility()
static void
main(String[] args)
-
Method Details
-
getInstance
-
getOsName
-
isLinux
public boolean isLinux() -
isWindows
public boolean isWindows() -
getOsArch
-
isArm32
public boolean isArm32() -
isArm64
public boolean isArm64() -
isArm
public boolean isArm() -
getLibFileExtension
-
getHardware
-
getRevision
-
getModel
-
getMemoryKb
-
getDefaultLibraryPath
-
loadLinuxBoardCompatibility
-
getLinuxOsReleaseProperty
Get a property from the operating system release file/etc/os-release
- Parameters:
property
- the property to get- Returns:
- property value
-
getLinuxOperatingSystemId
Get the local operating system id as defined by the ID property in/etc/os-release
- Returns:
- value of the ID property
-
getLinuxOperatingSystemVersion
Get the local operating system version as defined by the VERSION property in/etc/os-release
- Returns:
- value of the VERSION property
-
getLinuxOperatingSystemVersionId
Get the local operating system version id as defined by the VERSION_ID property in/etc/os-release
- Returns:
- value of the VERSION_ID property
-
getI2CBusNumbers
-
getCpuTemperature
public static float getCpuTemperature()Utility method to get the CPU temperate of the attached board- Returns:
- the CPU temperature
-
main
-