OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROMEOS_SYSTEM_CPU_TEMP_READER_H_ | |
Daniel Erat
2017/04/14 18:53:32
nit: just rename this to cpu_temperature.h if you
Simon Que
2017/04/17 16:41:07
Introducing a class.
| |
6 #define CHROMEOS_SYSTEM_CPU_TEMP_READER_H_ | |
7 | |
8 #include <string> | |
9 #include <vector> | |
10 | |
11 namespace chromeos { | |
12 namespace system { | |
13 | |
14 // Contains info from a CPU temperature sensor. | |
15 struct CPUTemperatureInfo { | |
16 // The temperature read by a CPU temperature sensor in degrees Celsius. | |
17 double temp_celsius; | |
18 // The name of the CPU temperature zone monitored by this sensor. | |
19 std::string label; | |
Daniel Erat
2017/04/14 18:53:32
how's this going to be used? an opaque string labe
Simon Que
2017/04/17 16:41:07
Done.
| |
20 }; | |
21 | |
22 // Read temperature from each thermal sensor of the CPU. Returns a vector | |
23 // containing a reading from each sensor. | |
24 std::vector<CPUTemperatureInfo> GetCPUTemperatures(); | |
stevenjb
2017/04/14 15:44:04
This function does file operations and there is no
Simon Que
2017/04/17 16:41:07
I will leave it up to the caller to implement it w
| |
25 | |
26 } // namespace system | |
27 } // namespace chromeos | |
28 | |
29 #endif // CHROMEOS_SYSTEM_CPU_TEMP_READER_H_ | |
30 | |
OLD | NEW |