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
All Methods Static Methods Instance Methods Concrete Methods 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 Detail
-
getInstance
public static LocalSystemInfo getInstance()
-
getOsName
public String getOsName()
-
isLinux
public boolean isLinux()
-
isWindows
public boolean isWindows()
-
getOsArch
public String getOsArch()
-
isArm32
public boolean isArm32()
-
isArm64
public boolean isArm64()
-
isArm
public boolean isArm()
-
getLibFileExtension
public String getLibFileExtension()
-
getHardware
public String getHardware()
-
getRevision
public String getRevision()
-
getModel
public String getModel()
-
getMemoryKb
public Integer getMemoryKb()
-
getDefaultLibraryPath
public String getDefaultLibraryPath()
-
getLinuxOsReleaseProperty
public String getLinuxOsReleaseProperty(String property)
Get a property from the operating system release file/etc/os-release
- Parameters:
property
- the property to get- Returns:
- property value
-
getLinuxOperatingSystemId
public String getLinuxOperatingSystemId()
Get the local operating system id as defined by the ID property in/etc/os-release
- Returns:
- value of the ID property
-
getLinuxOperatingSystemVersion
public String getLinuxOperatingSystemVersion()
Get the local operating system version as defined by the VERSION property in/etc/os-release
- Returns:
- value of the VERSION property
-
getLinuxOperatingSystemVersionId
public String 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
public static Collection<Integer> getI2CBusNumbers()
-
getCpuTemperature
public static float getCpuTemperature()
Utility method to get the CPU temperate of the attached board- Returns:
- the CPU temperature
-
main
public static void main(String[] args)
-
-