blob: cb98e553f334d8d9b69561bd8a35448d6cd844ee [file] [log] [blame]
Benjamin Schwartz817521b2020-10-05 09:20:16 -07001/*
2 * Copyright (C) 2020 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#pragma once
18
Benjamin Schwartz18a3fb52020-10-05 15:44:19 -070019#include <aidl/android/hardware/power/stats/BnPowerStats.h>
Benjamin Schwartz817521b2020-10-05 09:20:16 -070020
21namespace aidl {
22namespace android {
23namespace hardware {
Benjamin Schwartz18a3fb52020-10-05 15:44:19 -070024namespace power {
25namespace stats {
Benjamin Schwartz817521b2020-10-05 09:20:16 -070026
27class PowerStats : public BnPowerStats {
28 public:
29 PowerStats() = default;
Benjamin Schwartz18a3fb52020-10-05 15:44:19 -070030 // Methods from aidl::android::hardware::power::stats::IPowerStats
Benjamin Schwartz74e09c72020-12-21 14:57:45 -080031 ndk::ScopedAStatus getPowerEntityInfo(std::vector<PowerEntity>* _aidl_return) override;
Benjamin Schwartz817521b2020-10-05 09:20:16 -070032 ndk::ScopedAStatus getStateResidency(const std::vector<int32_t>& in_powerEntityIds,
33 std::vector<StateResidencyResult>* _aidl_return) override;
Benjamin Schwartz74e09c72020-12-21 14:57:45 -080034 ndk::ScopedAStatus getEnergyConsumerInfo(std::vector<EnergyConsumer>* _aidl_return) override;
35 ndk::ScopedAStatus getEnergyConsumed(const std::vector<int32_t>& in_energyConsumerIds,
Benjamin Schwartz817521b2020-10-05 09:20:16 -070036 std::vector<EnergyConsumerResult>* _aidl_return) override;
Benjamin Schwartz74e09c72020-12-21 14:57:45 -080037 ndk::ScopedAStatus getEnergyMeterInfo(std::vector<Channel>* _aidl_return) override;
Benjamin Schwartzeef94f82021-02-03 12:55:39 -080038 ndk::ScopedAStatus readEnergyMeter(const std::vector<int32_t>& in_channelIds,
39 std::vector<EnergyMeasurement>* _aidl_return) override;
Benjamin Schwartz817521b2020-10-05 09:20:16 -070040};
41
Benjamin Schwartz18a3fb52020-10-05 15:44:19 -070042} // namespace stats
43} // namespace power
Benjamin Schwartz817521b2020-10-05 09:20:16 -070044} // namespace hardware
45} // namespace android
46} // namespace aidl