blob: 101adfda86151a02fcf7b931619b92f5ca859c74 [file] [log] [blame]
// Copyright 2014 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 THERMALD_CONFIGURATION_H_
#define THERMALD_CONFIGURATION_H_
#include <map>
#include <memory>
#include <string>
#include <vector>
#include "thermald/thermal_zone.h"
namespace thermald {
enum SensorType {
kAth10kSensor,
kFakeSensor,
kHwmonSensor,
kThermalZoneSensor,
kIioSensor,
};
struct SensorCfg {
std::string name;
int type;
int sampling_period;
union {
struct {
char wlan_interface[16];
} ath10k_sensor;
struct {
char *fake_data_file;
} fake_sensor;
struct {
int chip_id;
int sensor_id;
} hwmon_sensor;
struct {
int zone_id;
} thermal_zone_sensor;
struct {
char iio_device_name[16];
char iio_sensor_name[32];
} iio_sensor;
};
};
struct ThermalStateCfg {
int id;
std::map<std::string, ThermalPointThresholds> thresholds;
std::vector<ThermalStateOutput> outputs;
};
struct ThermalZoneCfg {
std::string name;
std::vector<std::string> sensors;
std::vector<std::unique_ptr<ThermalStateCfg>> states;
};
struct Configuration {
std::map<std::string, std::unique_ptr<SensorCfg>> sensors;
std::map<std::string, std::unique_ptr<ThermalZoneCfg>> zones;
std::string uma_metric_prefix;
};
} // namespace thermald
#endif // THERMALD_CONFIGURATION_H_