blob: bf3e8857a47ac9a16389d1bb74444adc39d7c2cf [file] [log] [blame]
Josh Lehan2a40e932020-09-02 11:48:14 -07001#pragma once
2
3#include "Thresholds.hpp"
4#include "sensor.hpp"
5
6#include <sdbusplus/asio/object_server.hpp>
7
8#include <string>
9#include <vector>
10
11class ExternalSensor :
12 public Sensor,
13 public std::enable_shared_from_this<ExternalSensor>
14{
15 public:
16 ExternalSensor(const std::string& objectType,
17 sdbusplus::asio::object_server& objectServer,
18 std::shared_ptr<sdbusplus::asio::connection>& conn,
19 const std::string& sensorName,
20 const std::string& sensorMeasure,
21 std::vector<thresholds::Threshold>&& _thresholds,
22 const std::string& sensorConfiguration,
23 const double& maxReading, const double& minReading,
24 const PowerState& powerState);
25 virtual ~ExternalSensor();
26
27 private:
28 sdbusplus::asio::object_server& objServer;
29
30 void checkThresholds(void) override;
31};