blob: 9e05afd0a111e34174716651cf2ad686ea53dc47 [file] [log] [blame]
// Copyright 2020 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef POWER_MANAGER_POWERD_SYSTEM_THERMAL_DEVICE_THERMAL_STATE_H_
#define POWER_MANAGER_POWERD_SYSTEM_THERMAL_DEVICE_THERMAL_STATE_H_
#include <string>
#include "power_manager/proto_bindings/thermal.pb.h"
namespace power_manager {
namespace system {
enum class DeviceThermalState {
// Thermal state is unknown.
kUnknown,
// The device's temperature-related conditions (thermals) are at an acceptable
// level. There is no noticeable negative impact to the user.
kNominal,
// Thermals are minimally elevated. On devices with fans, those fans may
// become active, audible, and distracting to the user. Energy usage is
// elevated, potentially reducing battery life.
kFair,
// Thermals are highly elevated. Fans are active, running at maximum speed,
// audible, and distracting to the user. System performance may also be
// impacted as the system begins enacting countermeasures to reduce thermals
// to a more acceptable level.
kSerious,
// Thermals are significantly elevated. The device needs to cool down.
kCritical,
};
std::string DeviceThermalStateToString(DeviceThermalState state);
ThermalEvent::ThermalState DeviceThermalStateToProto(
system::DeviceThermalState state);
} // namespace system
} // namespace power_manager
#endif // POWER_MANAGER_POWERD_SYSTEM_THERMAL_DEVICE_THERMAL_STATE_H_