public class SmcUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
SmcUtils.SMCKeyData
Holds the return value of SMC query.
|
static class |
SmcUtils.SMCKeyDataKeyInfo
Holds the return value of SMC KeyInfo query.
|
static class |
SmcUtils.SMCKeyDataPLimitData
Holds the return value of SMC pLimit query.
|
static class |
SmcUtils.SMCKeyDataVers
Holds the return value of SMC version query.
|
static class |
SmcUtils.SMCVal
Holds an SMC value
|
| Modifier and Type | Field and Description |
|---|---|
static int |
KERNEL_INDEX_SMC |
static byte |
SMC_CMD_READ_BYTES |
static byte |
SMC_CMD_READ_KEYINFO |
static String |
SMC_KEY_CPU_TEMP |
static String |
SMC_KEY_CPU_VOLTAGE |
static String |
SMC_KEY_FAN_NUM |
static String |
SMC_KEY_FAN_SPEED |
| Modifier and Type | Method and Description |
|---|---|
static int |
smcCall(com.sun.jna.platform.mac.IOKit.IOConnect conn,
int index,
SmcUtils.SMCKeyData inputStructure,
SmcUtils.SMCKeyData outputStructure)
Call SMC
|
static int |
smcClose(com.sun.jna.platform.mac.IOKit.IOConnect conn)
Close connection to SMC.
|
static double |
smcGetFloat(com.sun.jna.platform.mac.IOKit.IOConnect conn,
String key)
Get a value from SMC which is in a floating point datatype (SP78, FPE2, FLT)
|
static int |
smcGetKeyInfo(com.sun.jna.platform.mac.IOKit.IOConnect conn,
SmcUtils.SMCKeyData inputStructure,
SmcUtils.SMCKeyData outputStructure)
Get cached keyInfo if it exists, or generate new keyInfo
|
static long |
smcGetLong(com.sun.jna.platform.mac.IOKit.IOConnect conn,
String key)
Get a 64-bit integer value from SMC
|
static com.sun.jna.platform.mac.IOKit.IOConnect |
smcOpen()
Open a connection to SMC.
|
static int |
smcReadKey(com.sun.jna.platform.mac.IOKit.IOConnect conn,
String key,
SmcUtils.SMCVal val)
Read a key from SMC
|
public static final String SMC_KEY_FAN_NUM
public static final String SMC_KEY_FAN_SPEED
public static final String SMC_KEY_CPU_TEMP
public static final String SMC_KEY_CPU_VOLTAGE
public static final byte SMC_CMD_READ_BYTES
public static final byte SMC_CMD_READ_KEYINFO
public static final int KERNEL_INDEX_SMC
public static com.sun.jna.platform.mac.IOKit.IOConnect smcOpen()
public static int smcClose(com.sun.jna.platform.mac.IOKit.IOConnect conn)
conn - The connectionpublic static double smcGetFloat(com.sun.jna.platform.mac.IOKit.IOConnect conn,
String key)
conn - The connectionkey - The key to retrievepublic static long smcGetLong(com.sun.jna.platform.mac.IOKit.IOConnect conn,
String key)
conn - The connectionkey - The key to retrievepublic static int smcGetKeyInfo(com.sun.jna.platform.mac.IOKit.IOConnect conn,
SmcUtils.SMCKeyData inputStructure,
SmcUtils.SMCKeyData outputStructure)
conn - The connectioninputStructure - Key data inputoutputStructure - Key data outputpublic static int smcReadKey(com.sun.jna.platform.mac.IOKit.IOConnect conn,
String key,
SmcUtils.SMCVal val)
conn - The connectionkey - Key to readval - Structure to receive the resultpublic static int smcCall(com.sun.jna.platform.mac.IOKit.IOConnect conn,
int index,
SmcUtils.SMCKeyData inputStructure,
SmcUtils.SMCKeyData outputStructure)
conn - The connectionindex - Kernel indexinputStructure - Key data inputoutputStructure - Key data outputCopyright © 2020. All rights reserved.