supla-device
Loading...
Searching...
No Matches
input_activation_config.h
1// SPDX-FileCopyrightText: AC SOFTWARE SP. Z O.O.
2// SPDX-License-Identifier: GPL-2.0-or-later
3
4#ifndef SRC_SUPLA_DEVICE_INPUT_ACTIVATION_CONFIG_H_
5#define SRC_SUPLA_DEVICE_INPUT_ACTIVATION_CONFIG_H_
6
7#include <stdint.h>
8
9namespace Supla {
10namespace Device {
11
12#pragma pack(push, 1)
13
15 uint8_t mode = 0;
16 uint8_t reserved[7] = {};
17
18 bool operator==(const InputActivationConfig &other) const {
19 return mode == other.mode;
20 }
21
22 bool operator!=(const InputActivationConfig &other) const {
23 return !(*this == other);
24 }
25};
26
28 uint8_t availableModes = 0;
29 uint8_t defaultMode = 0;
30
31 bool operator==(const InputActivationProperties &other) const {
32 return availableModes == other.availableModes &&
33 defaultMode == other.defaultMode;
34 }
35
36 bool operator!=(const InputActivationProperties &other) const {
37 return !(*this == other);
38 }
39};
40
41#pragma pack(pop)
42
43static_assert(sizeof(InputActivationConfig) == 8);
44
45} // namespace Device
46} // namespace Supla
47
48#endif // SRC_SUPLA_DEVICE_INPUT_ACTIVATION_CONFIG_H_
Definition input_activation_config.h:14
Definition input_activation_config.h:27