• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# IThermalInterface
2
3
4## 概述
5
6设备温度管理、控制及订阅接口。
7
8服务获取此对象后,可以调用相关的接口管理、控制和订阅设备温度。
9
10**Since:**
113.1
12**相关模块:**
13
14[Thermal](thermal.md)
15
16
17## 汇总
18
19
20### Public 成员函数
21
22  | 名称 | 描述 |
23| -------- | -------- |
24| [SetCpuFreq](#setcpufreq) ([in] int freq) | 设置CPU频率。  |
25| [SetGpuFreq](#setgpufreq) ([in] int freq) | 设置GPU频率。  |
26| [SetBatteryCurrent](#setbatterycurrent) ([in] int current) | 设置充电电流。  |
27| [GetThermalZoneInfo](#getthermalzoneinfo) ([out] struct [HdfThermalCallbackInfo](_hdf_thermal_callback_info.md) event) | 获取设备发热的信息。  |
28| [Register](#register) ([in] [IThermalCallback](interface_i_thermal_callback.md) callbackObj) | 注册设备发热状态的回调。  |
29| [Unregister](#unregister) () | 取消注册设备发热状态的回调。  |
30
31
32## 成员函数说明
33
34
35### GetThermalZoneInfo()
36
37
38```
39IThermalInterface::GetThermalZoneInfo ([out] struct HdfThermalCallbackInfo event)
40```
41**描述:**
42获取设备发热的信息。
43
44**参数:**
45
46  | 名称 | 描述 |
47| -------- | -------- |
48| event | 输出参数,设备发热信息,包括器件类型、器件温度。 |
49
50**返回:**
51
52HDF_SUCCESS 表示获取成功。
53
54**参见:**
55
56[HdfThermalCallbackInfo](_hdf_thermal_callback_info.md)
57
58
59### Register()
60
61
62```
63IThermalInterface::Register ([in] IThermalCallback callbackObj)
64```
65**描述:**
66注册设备发热状态的回调。
67
68**参数:**
69
70  | 名称 | 描述 |
71| -------- | -------- |
72| callbackObj | 输入参数,服务注册的回调。 |
73
74**返回:**
75
76HDF_SUCCESS 表示注册成功。
77
78**参见:**
79
80[IThermalCallback](interface_i_thermal_callback.md)
81
82
83### SetBatteryCurrent()
84
85
86```
87IThermalInterface::SetBatteryCurrent ([in] int current)
88```
89**描述:**
90设置充电电流。
91
92**参数:**
93
94  | 名称 | 描述 |
95| -------- | -------- |
96| current | 输入参数,充电电流,单位毫安。 |
97
98**返回:**
99
100HDF_SUCCESS 表示设置成功
101
102
103### SetCpuFreq()
104
105
106```
107IThermalInterface::SetCpuFreq ([in] int freq)
108```
109**描述:**
110设置CPU频率。
111
112**参数:**
113
114  | 名称 | 描述 |
115| -------- | -------- |
116| freq | 输入参数,设置CPU频率的值。 |
117
118**返回:**
119
120HDF_SUCCESS 表示设置成功。
121
122
123### SetGpuFreq()
124
125
126```
127IThermalInterface::SetGpuFreq ([in] int freq)
128```
129**描述:**
130设置GPU频率。
131
132**参数:**
133
134  | 名称 | 描述 |
135| -------- | -------- |
136| freq | 输入参数,设置GPU频率的值。 |
137
138**返回:**
139
140HDF_SUCCESS 表示设置成功。
141
142
143### Unregister()
144
145
146```
147IThermalInterface::Unregister ()
148```
149**描述:**
150取消注册设备发热状态的回调。
151
152**返回:**
153
154HDF_SUCCESS 表示取消注册成功。
155