1/*
2 * Copyright (C) 2019 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 */
16syntax = "proto3";
17
18option java_package = "com.google.android.pwrstatsutil";
19package com.google.android.pwrstatsutil;
20
21
22message PowerStatistic {
23    oneof power_stat {
24        StateResidency power_entity_state_residency = 1;
25        RailEnergy rail_energy = 2;
26        StateResidency c_state_residency = 3;
27        // add new power_stats here
28    }
29}
30
31// Utility message for items that provide a state residency in milliseconds
32message StateResidency {
33    message Residency {
34        string entity_name = 1;
35        string state_name = 2;
36        uint64 time_ms = 3;
37    }
38
39    repeated Residency residency = 1;
40}
41
42// Rail energy data in uWs
43message RailEnergy {
44    message RailEntry {
45        string rail_name = 1;
46        uint64 energy_uws = 2;
47    }
48
49    repeated RailEntry entry = 1;
50}
51