blob: 31a65d4612aa5e9f06d6fd38973a1eef4f18b44f [file] [log] [blame]
Polina Bondarenko254e2fe2016-10-11 16:39:23 +02001/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package android.hardware.thermal@1.0;
18
19interface IThermal {
20
Andreas Huber40d3a9b2017-03-28 16:19:16 -070021 /**
Polina Bondarenko254e2fe2016-10-11 16:39:23 +020022 * Retrieves temperatures in Celsius.
23 *
24 * @return status Status of the operation. If status code is FAILURE,
25 * the status.debugMessage must be populated with the human-readable
26 * error message.
27 * @return temperatures If status code is SUCCESS, it's filled with the
28 * current temperatures. The order of temperatures of built-in
29 * devices (such as CPUs, GPUs and etc.) in the list must be kept
30 * the same regardless the number of calls to this method even if
31 * they go offline, if these devices exist on boot. The method
32 * always returns and never removes such temperatures.
33 *
34 */
Polina Bondarenko59d05eb2016-11-03 16:41:18 +010035 @callflow(next={"*"})
36 @entry
37 @exit
Polina Bondarenko254e2fe2016-10-11 16:39:23 +020038 getTemperatures()
39 generates (ThermalStatus status, vec<Temperature> temperatures);
40
Andreas Huber40d3a9b2017-03-28 16:19:16 -070041 /**
Polina Bondarenko254e2fe2016-10-11 16:39:23 +020042 * Retrieves CPU usage information of each core: active and total times
43 * in ms since first boot.
44 *
45 * @return status Status of the operation. If status code is FAILURE,
46 * the status.debugMessage must be populated with the human-readable
47 * error message.
48 * @return cpuUsages If status code is SUCCESS, it's filled with the current
49 * CPU usages. The order and number of CPUs in the list must be kept
50 * the same regardless the number of calls to this method.
51 *
52 */
Polina Bondarenko59d05eb2016-11-03 16:41:18 +010053 @callflow(next={"*"})
54 @entry
55 @exit
Polina Bondarenko254e2fe2016-10-11 16:39:23 +020056 getCpuUsages() generates (ThermalStatus status, vec<CpuUsage> cpuUsages);
57
Andreas Huber40d3a9b2017-03-28 16:19:16 -070058 /**
Polina Bondarenko254e2fe2016-10-11 16:39:23 +020059 * Retrieves the cooling devices information.
60 *
61 * @return status Status of the operation. If status code is FAILURE,
62 * the status.debugMessage must be populated with the human-readable
63 * error message.
64 * @return devices If status code is SUCCESS, it's filled with the current
Polina Bondarenko3fbeb9f2016-10-18 19:02:40 +020065 * cooling device information. The order of built-in cooling
Polina Bondarenko254e2fe2016-10-11 16:39:23 +020066 * devices in the list must be kept the same regardless the number
67 * of calls to this method even if they go offline, if these devices
68 * exist on boot. The method always returns and never removes from
Polina Bondarenko3fbeb9f2016-10-18 19:02:40 +020069 * the list such cooling devices.
Polina Bondarenko254e2fe2016-10-11 16:39:23 +020070 *
71 */
Polina Bondarenko59d05eb2016-11-03 16:41:18 +010072 @callflow(next={"*"})
73 @entry
74 @exit
Polina Bondarenko254e2fe2016-10-11 16:39:23 +020075 getCoolingDevices()
76 generates (ThermalStatus status, vec<CoolingDevice> devices);
77
Polina Bondarenko254e2fe2016-10-11 16:39:23 +020078};