supla-device
Loading...
Searching...
No Matches
at_channel.h
1// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#ifndef SRC_SUPLA_AT_CHANNEL_H_
5#define SRC_SUPLA_AT_CHANNEL_H_
6
7#include <stdint.h>
8#include <supla/channels/channel.h>
9
10namespace Supla {
11
12class AtChannel : public Channel {
13 public:
14 void sendUpdate() override;
15 void pushAction(uint32_t action);
16 void activateAction(uint32_t action);
17 uint32_t popAction();
18 void setRelatedChannel(uint8_t channelNumber);
19 // Protocol encoding: zero means unrelated, otherwise channel number + 1.
20 uint8_t getRelatedChannelNumber() const {
21 return actionTriggerProperties.relatedChannelNumber;
22 }
23 void setDisablesLocalOperation(uint32_t actions);
24 void setButtonMode(uint8_t mode);
25 void setButtonModeAndTemporaryUnlock(uint8_t mode, bool active);
26 uint8_t getButtonMode() const;
27 void setWeeklyScheduleEnabled(bool enabled);
28 bool isWeeklyScheduleEnabled() const;
29 void enableValueUpdates();
30 void setTemporaryUnlockActive(bool active);
31
32 protected:
33 void setActionTriggerProperties(const TActionTriggerProperties &properties);
34
35 uint32_t actionToSend = 0;
36 bool valueUpdatePending = false;
37 bool valueUpdatesEnabled = false;
38};
39
40}; // namespace Supla
41
42#endif // SRC_SUPLA_AT_CHANNEL_H_
Definition at_channel.h:12
Definition channel.h:26
Definition proto.h:894