-
Notifications
You must be signed in to change notification settings - Fork 1
/
unit.h
71 lines (55 loc) · 3.5 KB
/
unit.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* SPDX-License-Identifier: GPLv3-or-later */
/* Copyright (c) 2019 Project WomoLIN */
/* Author Myron Franze <[email protected]> */
#pragma once
#include "interface/isignal.h"
#include "interface/iunit.h"
namespace siguni
{
class CUnitOutput
: public interface::ISignalSetReset
{
public:
CUnitOutput( interface::IUnitOutput & attUnitOutput) ;
~CUnitOutput() = default;
void UpdateUnitSignalSetReset( std::string & attKey, std::string & attValue, interface::CAdditionals & attAdditionals ) override final;
private:
interface::IUnitOutput & unitOutput;
};
class CUnitInput
: public interface::ISignalGetString
, public interface::ISignalSetReset
, public interface::ISignalGetVersion
, public interface::ISignalGetVoltage
, public interface::ISignalGetPressure
, public interface::ISignalGetTemperature
, public interface::ISignalGetHumidity
, public interface::ISignalGetMagnetic
, public interface::ISignalGetAcceleration
, public interface::ISignalGetCurrent
, public interface::ISignalGetBatteryCapacity
, public interface::ISignalGetBatteryCharge
, public interface::ISignalGetBatteryHealth
, public interface::ISignalGetVictronInfo
{
public:
CUnitInput( interface::IUnitInput & attUnitInput) ;
~CUnitInput() = default;
void UpdateUnitSignalGetString( std::string & attKey, std::string & attValue, interface::CAdditionals & attAdditionals ) override final;
void UpdateUnitSignalSetReset( std::string & attKey, std::string & attValue, interface::CAdditionals & attAdditionals ) override final;
void UpdateUnitSignalGetVersion( std::string & attKey, std::string & attValue, interface::CAdditionals & attAdditionals ) override final;
void UpdateUnitSignalGetVoltage( std::string & attKey, std::string & attValue, interface::CAdditionals & attAdditionals ) override final;
void UpdateUnitSignalGetPressure( std::string & attKey, std::string & attValue, interface::CAdditionals & attAdditionals ) override final;
void UpdateUnitSignalGetTemperature( std::string & attKey, std::string & attValue, interface::CAdditionals & attAdditionals ) override final;
void UpdateUnitSignalGetHumidity( std::string & attKey, std::string & attValue, interface::CAdditionals & attAdditionals ) override final;
void UpdateUnitSignalGetMagnetic( std::string & attKey, std::string & attValue, interface::CAdditionals & attAdditionals ) override final;
void UpdateUnitSignalGetAcceleration( std::string & attKey, std::string & attValue, interface::CAdditionals & attAdditionals ) override final;
void UpdateUnitSignalGetCurrent( std::string & attKey, std::string & attValue, interface::CAdditionals & attAdditionals ) override final;
void UpdateUnitSignalGetBatteryCapacity( std::string & attKey, std::string & attValue, interface::CAdditionals & attAdditionals ) override final;
void UpdateUnitSignalGetBatteryCharge( std::string & attKey, std::string & attValue, interface::CAdditionals & attAdditionals ) override final;
void UpdateUnitSignalGetBatteryHealth( std::string & attKey, std::string & attValue, interface::CAdditionals & attAdditionals ) override final;
void UpdateUnitSignalGetVictronInfo( std::string & attKey, std::string & attValue, interface::CAdditionals & attAdditionals ) override final;
private:
interface::IUnitInput & unitInput;
};
}