supla-device
Loading...
Searching...
No Matches
src
supla
device
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
9
namespace
Supla {
10
namespace
Device {
11
12
#pragma pack(push, 1)
13
14
struct
InputActivationConfig
{
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
27
struct
InputActivationProperties
{
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
43
static_assert
(
sizeof
(
InputActivationConfig
) == 8);
44
45
}
// namespace Device
46
}
// namespace Supla
47
48
#endif
// SRC_SUPLA_DEVICE_INPUT_ACTIVATION_CONFIG_H_
Supla::Device::InputActivationConfig
Definition
input_activation_config.h:14
Supla::Device::InputActivationProperties
Definition
input_activation_config.h:27
Generated by
1.12.0