从ioreg获取环境光传感器值
我正在使用ioreg命令行工具尝试读取计算机(iMac)上可用的传感器信息。特别是,我想读取环境光传感器的当前值。到目前为止,我已经能够通过检索有关传感器的一些常规信息ioreg -f -b -r -c 'AppleLMUController'。但是值不存在: +-o AppleLMUController <class AppleLMUController, id 0x1000002d8, registered, matched, active, busy 0 (0 ms), retain 7> { "IOProbeScore" = 0 "CFBundleIdentifier" = "com.apple.driver.AppleSMCLMU" "IOProviderClass" = "IOService" "IOClass" = "AppleLMUController" "IOMatchCategory" = "IODefaultMatchCategory" "IOCFPlugInTypes" = {"0516B563-B15B-11DA-96EB-0014519758EF"="AppleSMCLMU.kext/Contents/PlugIns/AmbientLightSensorHID.plugin"} "IOGeneralInterest" = "IOCommand is not serializable" "IONameMatch" = "ACPI0008" "IOPowerManagement" …