blob: fd36bb010cc8c73c29d5ed387cc4b354b7ea7ae4 [file] [log] [blame]
#pragma once
#include "Thresholds.hpp"
#include "sensor.hpp"
#include <sdbusplus/asio/object_server.hpp>
#include <string>
#include <vector>
class ExternalSensor :
public Sensor,
public std::enable_shared_from_this<ExternalSensor>
{
public:
ExternalSensor(const std::string& objectType,
sdbusplus::asio::object_server& objectServer,
std::shared_ptr<sdbusplus::asio::connection>& conn,
const std::string& sensorName,
const std::string& sensorMeasure,
std::vector<thresholds::Threshold>&& thresholds,
const std::string& sensorConfiguration,
const double& maxReading, const double& minReading,
const PowerState& powerState);
virtual ~ExternalSensor();
private:
sdbusplus::asio::object_server& objServer;
void checkThresholds(void) override;
};