supla-device
Toggle main menu visibility
Loading...
Searching...
No Matches
src
supla
condition_getter.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
This program is distributed in the hope that it will be useful,
9
but WITHOUT ANY WARRANTY; without even the implied warranty of
10
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15
*/
16
17
#ifndef SRC_SUPLA_CONDITION_GETTER_H_
18
#define SRC_SUPLA_CONDITION_GETTER_H_
19
20
#include <stdint.h>
21
#include <supla-common/proto.h>
22
23
namespace
Supla {
24
25
class
Element
;
26
27
class
ConditionGetter
{
28
public
:
29
virtual
~ConditionGetter
() {}
30
virtual
double
getValue(
Supla::Element
*element,
bool
*isValid) = 0;
31
protected
:
32
TElectricityMeter_Measurement
*getMeasurement(
Supla::Element
*element,
33
_supla_int_t *measuredValues);
34
};
35
36
37
};
// namespace Supla
38
39
Supla::ConditionGetter
*EmVoltage(int8_t phase = 0);
40
Supla::ConditionGetter
*EmCurrent(int8_t phase = 0);
41
Supla::ConditionGetter
*EmTotalCurrent();
42
Supla::ConditionGetter
*EmPowerActiveW(int8_t phase = 0);
43
Supla::ConditionGetter
*EmTotalPowerActiveW();
44
Supla::ConditionGetter
*EmPowerApparentVA(int8_t phase = 0);
45
Supla::ConditionGetter
*EmTotalPowerApparentVA();
46
Supla::ConditionGetter
*EmPowerReactiveVar(int8_t phase = 0);
47
Supla::ConditionGetter
*EmTotalPowerReactiveVar();
48
49
#endif
// SRC_SUPLA_CONDITION_GETTER_H_
Supla::ConditionGetter
Definition
condition_getter.h:27
Supla::Element
Base class for all elements of SuplaDevice.
Definition
element.h:37
TElectricityMeter_Measurement
Definition
proto.h:1905
Generated by
1.17.0