supla-device
Loading...
Searching...
No Matches
therm_hygro_press_meter.h
1/*
2 Copyright (C) AC SOFTWARE SP. Z O.O.
3
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public License
6 as published by the Free Software Foundation; either version 2
7 of the License, or (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17*/
18
19#ifndef SRC_SUPLA_SENSOR_THERM_HYGRO_PRESS_METER_H_
20#define SRC_SUPLA_SENSOR_THERM_HYGRO_PRESS_METER_H_
21
22#include "therm_hygro_meter.h"
23
24#define PRESSURE_NOT_AVAILABLE -1.0
25
26namespace Supla {
27namespace Sensor {
28class ThermHygroPressMeter : public ThermHygroMeter {
29 public:
30 ThermHygroPressMeter();
31 virtual ~ThermHygroPressMeter();
32 virtual double getPressure();
33 void iterateAlways() override;
34 bool iterateConnected() override;
35 Element &disableChannelState();
36 Channel *getSecondaryChannel() override;
37 const Channel *getSecondaryChannel() const override;
38
39 // Override local action methods in order to delegate execution to Channel and
40 // Secondary Channel
41 void addAction(uint16_t action, ActionHandler &client, uint16_t event,
42 bool alwaysEnabled = false) override;
43 void addAction(uint16_t action, ActionHandler *client, uint16_t event,
44 bool alwaysEnabled = false) override;
45
46 protected:
47 Channel pressureChannel;
48};
49
50}; // namespace Sensor
51}; // namespace Supla
52
53#endif // SRC_SUPLA_SENSOR_THERM_HYGRO_PRESS_METER_H_
Definition action_handler.h:21
Definition channel.h:33
Base class for all elements of SuplaDevice.
Definition element.h:33
void iterateAlways() override
Method called on each SuplaDevice iteration.
Definition therm_hygro_press_meter.cpp:33
bool iterateConnected() override
Method called on each SuplaDevice iteration when device is connected and registered to Supla server o...
Definition therm_hygro_press_meter.cpp:40