IThermalInterface

概述

备温度管理、控制及订阅接口。

起始版本: 3.1

相关模块:Thermal

汇总

Public 成员函数

名称 描述
SetCpuFreq ([in] int freq) 设置CPU频率。
SetGpuFreq ([in] int freq) 设置GPU频率。
SetBatteryCurrent ([in] int current) 设置充电电流。
GetThermalZoneInfo ([out] struct HdfThermalCallbackInfo event) 获取设备发热的信息。
IsolateCpu ([in] int num) 隔离内核CPU。
Register ([in] IThermalCallback callbackObj) 注册设备热状态回调。
Unregister () 注册设备热状态回调。
RegisterFanCallback ([in] IFanCallback callbackObj) 注册风扇故障检测的回调。
UnregisterFanCallback () 取消注册风扇故障检测的回调。

成员函数说明

GetThermalZoneInfo()

IThermalInterface::GetThermalZoneInfo ([out] struct HdfThermalCallbackInfo event)

描述 获取设备发热的信息。

起始版本: 3.1

参数:

名称 描述
event 输出参数,设备发热信息,包括器件类型、器件温度。

返回:

HDF_SUCCESS 表示操作成功。

HDF_FAILED 表示操作失败。

参见:

HdfThermalCallbackInfo

IsolateCpu()

IThermalInterface::IsolateCpu ([in] int num)

描述 隔离内核CPU。

起始版本: 4.0

参数:

名称 描述
num 输入参数,CPU内核编号。

返回:

HDF_SUCCESS 表示操作成功。

HDF_FAILED 表示操作失败。

Register()

IThermalInterface::Register ([in] IThermalCallback callbackObj)

描述 注册设备热状态回调。

起始版本: 3.1

参数:

名称 描述
callbackObj 输入参数,要注册的回调函数。

返回:

HDF_SUCCESS 表示操作成功。

HDF_FAILED 表示操作失败。

参见:

IThermalCallback

RegisterFanCallback()

IThermalInterface::RegisterFanCallback ([in] IFanCallback callbackObj)

描述 注册风扇故障检测的回调。

起始版本: 4.0

参数:

名称 描述
callbackObj 输入参数,要注册的回调函数。

返回:

HDF_SUCCESS 表示操作成功。

HDF_FAILED 表示操作失败。

参见:

IFanCallback

SetBatteryCurrent()

IThermalInterface::SetBatteryCurrent ([in] int current)

描述 设置充电电流。

起始版本: 3.1

参数:

名称 描述
current 输入参数,充电电流,单位毫安。

返回:

HDF_SUCCESS 表示操作成功。

HDF_FAILED 表示操作失败。

SetCpuFreq()

IThermalInterface::SetCpuFreq ([in] int freq)

描述 设置CPU频率。

起始版本: 3.1

参数:

名称 描述
freq 输入参数,设置CPU频率的值。

返回:

HDF_SUCCESS 表示操作成功。

HDF_FAILED 表示操作失败。

SetGpuFreq()

IThermalInterface::SetGpuFreq ([in] int freq)

描述 设置GPU频率。

起始版本: 3.1

参数:

名称 描述
freq 输入参数,设置GPU频率的值。

返回:

HDF_SUCCESS 表示操作成功。

HDF_FAILED 表示操作失败。

Unregister()

IThermalInterface::Unregister ()

描述 注册设备热状态回调。

起始版本: 3.1

返回:

HDF_SUCCESS 表示操作成功。

HDF_FAILED 表示操作失败。

UnregisterFanCallback()

IThermalInterface::UnregisterFanCallback ()

描述 取消注册风扇故障检测的回调。

起始版本: 4.0

返回:

HDF_SUCCESS 表示操作成功。

HDF_FAILED 表示操作失败。