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 17package [email protected]; 18 19interface 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 @callflow(next={"*"}) 36 @entry 37 @exit 38 getTemperatures() 39 generates (ThermalStatus status, vec<Temperature> temperatures); 40 41 /** 42 * 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 */ 53 @callflow(next={"*"}) 54 @entry 55 @exit 56 getCpuUsages() generates (ThermalStatus status, vec<CpuUsage> cpuUsages); 57 58 /** 59 * 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 65 * cooling device information. The order of built-in cooling 66 * 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 69 * the list such cooling devices. 70 * 71 */ 72 @callflow(next={"*"}) 73 @entry 74 @exit 75 getCoolingDevices() 76 generates (ThermalStatus status, vec<CoolingDevice> devices); 77 78}; 79