diff options
author | Benjamin Schwartz <bsschwar@google.com> | 2019-07-30 13:06:12 -0700 |
---|---|---|
committer | Benjamin Schwartz <bsschwar@google.com> | 2019-07-30 14:12:06 -0700 |
commit | 8c87923f8ec77515c799583e162dcfd8c6ed2236 (patch) | |
tree | 5fc50ff7b6dd4cd2b6e6c187f5f2f86ac05361e1 /pwrstats_util/dataproviders/RailEnergyDataProvider.h | |
parent | d14a96e65cc9e72fb40d7982d9d142d2328530a6 (diff) | |
download | pixel-8c87923f8ec77515c799583e162dcfd8c6ed2236.tar.gz |
pwrstats_util: Add rail energy data provider
Change-Id: If4638b3f712d9daa5c3a082e7c93af34a5033c29
Fix: 138303810
Test: adb shell pwrstats_util
Diffstat (limited to 'pwrstats_util/dataproviders/RailEnergyDataProvider.h')
-rw-r--r-- | pwrstats_util/dataproviders/RailEnergyDataProvider.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/pwrstats_util/dataproviders/RailEnergyDataProvider.h b/pwrstats_util/dataproviders/RailEnergyDataProvider.h new file mode 100644 index 00000000..919eacbb --- /dev/null +++ b/pwrstats_util/dataproviders/RailEnergyDataProvider.h @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2019 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#ifndef RAILENERGYDATAPROVIDER_H +#define RAILENERGYDATAPROVIDER_H + +#include "PowerStatsAggregator.h" + +/** + * Rail Energy data provider: + * Provides data via Power Stats HAL 1.0 + * data is in units of microwatt-seconds (uWs) + **/ +class RailEnergyDataProvider : public IPowerStatsDataProvider { + public: + RailEnergyDataProvider() = default; + + int get(std::unordered_map<std::string, uint64_t>* data) override; +}; + +#endif // RAILENERGYDATAPROVIDER_H |