powerstats: Add EnergyConsumer API
Also clean up rest of PowerStats HAL 2.0 API and type names
Bug: 168831183
Test: atest VtsHalPowerStatsTargetTest
Change-Id: I987f984bf717b107cf55213c7063ac9f310f8d54
diff --git a/powerstats/aidl/default/PowerStats.h b/powerstats/aidl/default/PowerStats.h
index 49240cb..0007efa 100644
--- a/powerstats/aidl/default/PowerStats.h
+++ b/powerstats/aidl/default/PowerStats.h
@@ -26,13 +26,17 @@
class PowerStats : public BnPowerStats {
public:
PowerStats() = default;
- ndk::ScopedAStatus getEnergyData(const std::vector<int32_t>& in_railIndices,
- std::vector<EnergyData>* _aidl_return) override;
+ // Methods from aidl::android::hardware::powerstats::IPowerStats
ndk::ScopedAStatus getPowerEntityInfo(std::vector<PowerEntityInfo>* _aidl_return) override;
- ndk::ScopedAStatus getPowerEntityStateResidencyData(
+ ndk::ScopedAStatus getPowerEntityStateResidency(
const std::vector<int32_t>& in_powerEntityIds,
- std::vector<PowerEntityStateResidencyResult>* _aidl_return) override;
- ndk::ScopedAStatus getRailInfo(std::vector<RailInfo>* _aidl_return) override;
+ std::vector<StateResidencyResult>* _aidl_return) override;
+ ndk::ScopedAStatus getEnergyConsumerInfo(std::vector<EnergyConsumerId>* _aidl_return) override;
+ ndk::ScopedAStatus getEnergyConsumed(const std::vector<EnergyConsumerId>& in_energyConsumerIds,
+ std::vector<EnergyConsumerResult>* _aidl_return) override;
+ ndk::ScopedAStatus getEnergyMeterInfo(std::vector<ChannelInfo>* _aidl_return) override;
+ ndk::ScopedAStatus readEnergyMeters(const std::vector<int32_t>& in_channelIds,
+ std::vector<EnergyMeasurement>* _aidl_return) override;
};
} // namespace powerstats