Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(18)

Side by Side Diff: chromeos/system/cpu_temp_reader.h

Issue 2823583002: chromeos: Add CPU temperature reader (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698