IThermalInterface

概述

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

服务获取此对象后,可以调用相关的接口管理、控制和订阅设备温度。

起始版本: 3.1

相关模块:Thermal

汇总

Public 成员函数

名称 描述
SetCpuFreq ([in] int freq) 设置CPU频率。
SetGpuFreq ([in] int freq) 设置GPU频率。
SetBatteryCurrent ([in] int current) 设置充电电流。
GetThermalZoneInfo ([out] struct HdfThermalCallbackInfo event) 获取设备发热的信息。
Register ([in] IThermalCallback callbackObj) 注册设备发热状态的回调。
Unregister () 取消注册设备发热状态的回调。

成员函数说明

GetThermalZoneInfo()

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

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

起始版本: 3.1

参数:

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

返回:

HDF_SUCCESS 表示操作成功。

HDF_FAILED 表示操作失败。

参见:

HdfThermalCallbackInfo

Register()

IThermalInterface::Register ([in] IThermalCallback callbackObj)

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

起始版本: 3.1

参数:

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

返回:

HDF_SUCCESS 表示操作成功。

HDF_FAILED 表示操作失败。

参见:

IThermalCallback

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 表示操作失败。