diff options
Diffstat (limited to 'CpuInfo.h')
-rw-r--r-- | CpuInfo.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/CpuInfo.h b/CpuInfo.h new file mode 100644 index 0000000..720f948 --- /dev/null +++ b/CpuInfo.h @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2021 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 ANDROID_HARDWARE_THERMAL_V2_0_CPUINFO_H +#define ANDROID_HARDWARE_THERMAL_V2_0_CPUINFO_H + +#include <android/hardware/thermal/2.0/IThermal.h> + +namespace android { +namespace hardware { +namespace thermal { +namespace V2_0 { +namespace implementation { + +using ::android::hardware::hidl_vec; +using ::android::hardware::thermal::V1_0::CpuUsage; + +class CpuInfo { +private: + std::size_t m_NrCpus; + bool parseCpuUsagesFileAndAssignUsages(hidl_vec<CpuUsage> &cpuUsages); +public: + bool CpuUsages(hidl_vec<CpuUsage> &cpuUsages); + CpuInfo(); +}; + +} // namespace implementation +} // namespace V2_0 +} // namespace thermal +} // namespace hardware +} // namespace android +#endif |