blob: bf3e8857a47ac9a16389d1bb74444adc39d7c2cf [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;
};