Josh Lehan | 2a40e93 | 2020-09-02 11:48:14 -0700 | [diff] [blame] | 1 | #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 | |
| 11 | class 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 | }; |