1/* 2 * Copyright (C) 2021 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 17syntax = "proto2"; 18 19package perfetto.protos; 20 21// Energy consumer based on aidl class: 22// android.hardware.power.stats.EnergyConsumer. 23message AndroidEnergyConsumer { 24 // Unique ID of this energy consumer. Matches the ID in a 25 // AndroidEnergyEstimationBreakdown. 26 optional int32 energy_consumer_id = 1; 27 28 // For a group of energy consumers of the same logical type, sorting by 29 // ordinal gives their physical order. Ordinals must be consecutive integers 30 // starting from 0. 31 optional int32 ordinal = 2; 32 33 // Type of this energy consumer. 34 optional string type = 3; 35 36 // Unique name of this energy consumer. Vendor/device specific. Opaque to 37 // framework. 38 optional string name = 4; 39} 40 41message AndroidEnergyConsumerDescriptor { 42 repeated AndroidEnergyConsumer energy_consumers = 1; 43} 44