3-phase PV router
Loading...
Searching...
No Matches
utils_dualtariff.h
Go to the documentation of this file.
1
12#ifndef UTILS_DUALTARIFF_H
13#define UTILS_DUALTARIFF_H
14
15#include <Arduino.h>
16
28{
29public:
30 constexpr pairForceLoad() = default;
31 explicit constexpr pairForceLoad(int16_t _iStartOffset)
32 : iStartOffset(_iStartOffset), uiDuration(UINT16_MAX)
33 {
34 }
35 constexpr pairForceLoad(int16_t _iStartOffset, uint16_t _uiDuration)
36 : iStartOffset(_iStartOffset), uiDuration(_uiDuration)
37 {
38 }
39
40 [[nodiscard]] constexpr int16_t getStartOffset() const
41 {
42 return iStartOffset;
43 }
44 [[nodiscard]] constexpr uint16_t getDuration() const
45 {
46 return uiDuration;
47 }
48
49private:
50 int16_t iStartOffset{ 0 };
51 uint16_t uiDuration{ UINT16_MAX };
52};
53
54#endif // UTILS_DUALTARIFF_H
Config parameters for overriding a load.
constexpr uint16_t getDuration() const
uint16_t uiDuration
constexpr int16_t getStartOffset() const
int16_t iStartOffset
constexpr pairForceLoad(int16_t _iStartOffset, uint16_t _uiDuration)
constexpr pairForceLoad(int16_t _iStartOffset)
constexpr pairForceLoad()=default
constexpr uint16_t
Definition: config_system.h:32