blob: 2dc2b8d01cddbe062dd21a7f6c0175cc1b9c2a31 [file] [log] [blame]
Matthew Barth293477d2017-02-17 15:39:36 -06001#pragma once
2
3
4namespace phosphor
5{
6namespace fan
7{
8namespace presence
9{
10
11class FanEnclosure;
12class Sensor
13{
14 public:
15 Sensor() = delete;
16 Sensor(const Sensor&) = delete;
17 Sensor(Sensor&&) = delete;
18 Sensor& operator=(const Sensor&) = delete;
19 Sensor& operator=(Sensor&&) = delete;
20 virtual ~Sensor() = default;
21
Matthew Barthd6403822017-02-17 17:10:19 -060022 Sensor(const std::string& id,
23 FanEnclosure& fanEnc) :
24 id(id),
25 fanEnc(fanEnc)
26 {
27 //Nothing to do here
28 }
29
Matthew Barth293477d2017-02-17 15:39:36 -060030 virtual bool isPresent() = 0;
31
32 protected:
Matthew Barthd6403822017-02-17 17:10:19 -060033 const std::string id;
34 FanEnclosure& fanEnc;
Matthew Barth293477d2017-02-17 15:39:36 -060035
36};
37
38} // namespace presence
39} // namespace fan
40} // namespace phosphor