Polina Bondarenko | 254e2fe | 2016-10-11 16:39:23 +0200 | [diff] [blame] | 1 | /* |
| 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 | |
| 17 | package android.hardware.thermal@1.0; |
| 18 | |
| 19 | interface IThermal { |
| 20 | |
| 21 | /* |
| 22 | * 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 | */ |
| 35 | getTemperatures() |
| 36 | generates (ThermalStatus status, vec<Temperature> temperatures); |
| 37 | |
| 38 | /* |
| 39 | * Retrieves CPU usage information of each core: active and total times |
| 40 | * in ms since first boot. |
| 41 | * |
| 42 | * @return status Status of the operation. If status code is FAILURE, |
| 43 | * the status.debugMessage must be populated with the human-readable |
| 44 | * error message. |
| 45 | * @return cpuUsages If status code is SUCCESS, it's filled with the current |
| 46 | * CPU usages. The order and number of CPUs in the list must be kept |
| 47 | * the same regardless the number of calls to this method. |
| 48 | * |
| 49 | */ |
| 50 | getCpuUsages() generates (ThermalStatus status, vec<CpuUsage> cpuUsages); |
| 51 | |
| 52 | /* |
| 53 | * Retrieves the cooling devices information. |
| 54 | * |
| 55 | * @return status Status of the operation. If status code is FAILURE, |
| 56 | * the status.debugMessage must be populated with the human-readable |
| 57 | * error message. |
| 58 | * @return devices If status code is SUCCESS, it's filled with the current |
Polina Bondarenko | 3fbeb9f | 2016-10-18 19:02:40 +0200 | [diff] [blame] | 59 | * cooling device information. The order of built-in cooling |
Polina Bondarenko | 254e2fe | 2016-10-11 16:39:23 +0200 | [diff] [blame] | 60 | * devices in the list must be kept the same regardless the number |
| 61 | * of calls to this method even if they go offline, if these devices |
| 62 | * exist on boot. The method always returns and never removes from |
Polina Bondarenko | 3fbeb9f | 2016-10-18 19:02:40 +0200 | [diff] [blame] | 63 | * the list such cooling devices. |
Polina Bondarenko | 254e2fe | 2016-10-11 16:39:23 +0200 | [diff] [blame] | 64 | * |
| 65 | */ |
| 66 | getCoolingDevices() |
| 67 | generates (ThermalStatus status, vec<CoolingDevice> devices); |
| 68 | |
| 69 | }; |