supla-device
Loading...
Searching...
No Matches
relay_parameters.h
1// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#ifndef SRC_SUPLA_NETWORK_HTML_RELAY_PARAMETERS_H_
5#define SRC_SUPLA_NETWORK_HTML_RELAY_PARAMETERS_H_
6
7#include <stdint.h>
8#include <supla/network/html_element.h>
9
10namespace Supla {
11class WebSender;
12
13namespace Control {
14class Relay;
15} // namespace Control
16
17namespace Html {
18
20 public:
22 virtual ~RelayParameters();
23 void send(Supla::WebSender* sender) override;
24 bool handleResponse(const char* key, const char* value) override;
25 void onProcessingEnd() override;
26
27 // When enabled, update the visibility of the turn-on duration input as the
28 // channel function select field changes in local WWW.
29 void setDynamicTimeVisibilityFromChannelFunction(bool enabled);
30
31 private:
32 static bool isTimedFunction(uint32_t function);
33
34 Supla::Control::Relay *relay = nullptr;
35 uint32_t pendingTurnOnDurationMs = 0;
36 bool turnOnDurationSeen = false;
37 bool dynamicTimeVisibilityFromChannelFunction = false;
38};
39
40}; // namespace Html
41}; // namespace Supla
42
43#endif // SRC_SUPLA_NETWORK_HTML_RELAY_PARAMETERS_H_
Definition relay.h:38
Definition html_element.h:22
Definition relay_parameters.h:19
Definition web_sender.h:160