Coverage Report

Created: 2025-06-20 06:55

/src/connectedhomeip/zzz_generated/app-common/clusters/ScenesManagement/Structs.h
Line
Count
Source (jump to first uncovered line)
1
/*
2
 *
3
 *    Copyright (c) 2022 Project CHIP Authors
4
 *
5
 *    Licensed under the Apache License, Version 2.0 (the "License");
6
 *    you may not use this file except in compliance with the License.
7
 *    You may obtain a copy of the License at
8
 *
9
 *        http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 *    Unless required by applicable law or agreed to in writing, software
12
 *    distributed under the License is distributed on an "AS IS" BASIS,
13
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 *    See the License for the specific language governing permissions and
15
 *    limitations under the License.
16
 */
17
18
// THIS FILE IS GENERATED BY ZAP
19
// This file is generated from clusters-Structs.h.zapt
20
21
#pragma once
22
23
#include <app/data-model/DecodableList.h>
24
#include <app/data-model/List.h>
25
#include <app/data-model/Nullable.h>
26
#include <lib/core/DataModelTypes.h>
27
#include <lib/core/Optional.h>
28
#include <lib/core/TLV.h>
29
#include <lib/support/BitMask.h>
30
31
#include <clusters/shared/Structs.h>
32
33
#include <cstdint>
34
35
namespace chip {
36
namespace app {
37
namespace Clusters {
38
namespace ScenesManagement {
39
namespace Structs {
40
namespace AttributeValuePairStruct {
41
enum class Fields : uint8_t
42
{
43
    kAttributeID     = 0,
44
    kValueUnsigned8  = 1,
45
    kValueSigned8    = 2,
46
    kValueUnsigned16 = 3,
47
    kValueSigned16   = 4,
48
    kValueUnsigned32 = 5,
49
    kValueSigned32   = 6,
50
    kValueUnsigned64 = 7,
51
    kValueSigned64   = 8,
52
};
53
54
struct Type
55
{
56
public:
57
    chip::AttributeId attributeID = static_cast<chip::AttributeId>(0);
58
    Optional<uint8_t> valueUnsigned8;
59
    Optional<int8_t> valueSigned8;
60
    Optional<uint16_t> valueUnsigned16;
61
    Optional<int16_t> valueSigned16;
62
    Optional<uint32_t> valueUnsigned32;
63
    Optional<int32_t> valueSigned32;
64
    Optional<uint64_t> valueUnsigned64;
65
    Optional<int64_t> valueSigned64;
66
67
    CHIP_ERROR Decode(TLV::TLVReader & reader);
68
69
    static constexpr bool kIsFabricScoped = false;
70
71
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
72
};
73
74
using DecodableType = Type;
75
76
} // namespace AttributeValuePairStruct
77
namespace ExtensionFieldSetStruct {
78
enum class Fields : uint8_t
79
{
80
    kClusterID          = 0,
81
    kAttributeValueList = 1,
82
};
83
84
struct Type
85
{
86
public:
87
    chip::ClusterId clusterID = static_cast<chip::ClusterId>(0);
88
    DataModel::List<const Structs::AttributeValuePairStruct::Type> attributeValueList;
89
90
    static constexpr bool kIsFabricScoped = false;
91
92
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
93
};
94
95
struct DecodableType
96
{
97
public:
98
    chip::ClusterId clusterID = static_cast<chip::ClusterId>(0);
99
    DataModel::DecodableList<Structs::AttributeValuePairStruct::DecodableType> attributeValueList;
100
101
    CHIP_ERROR Decode(TLV::TLVReader & reader);
102
103
    static constexpr bool kIsFabricScoped = false;
104
};
105
106
} // namespace ExtensionFieldSetStruct
107
namespace SceneInfoStruct {
108
enum class Fields : uint8_t
109
{
110
    kSceneCount        = 0,
111
    kCurrentScene      = 1,
112
    kCurrentGroup      = 2,
113
    kSceneValid        = 3,
114
    kRemainingCapacity = 4,
115
    kFabricIndex       = 254,
116
};
117
118
struct Type
119
{
120
public:
121
    uint8_t sceneCount            = static_cast<uint8_t>(0);
122
    uint8_t currentScene          = static_cast<uint8_t>(0);
123
    chip::GroupId currentGroup    = static_cast<chip::GroupId>(0);
124
    bool sceneValid               = static_cast<bool>(0);
125
    uint8_t remainingCapacity     = static_cast<uint8_t>(0);
126
    chip::FabricIndex fabricIndex = static_cast<chip::FabricIndex>(0);
127
128
    CHIP_ERROR Decode(TLV::TLVReader & reader);
129
130
    static constexpr bool kIsFabricScoped = true;
131
132
0
    auto GetFabricIndex() const { return fabricIndex; }
133
134
0
    void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; }
135
136
    CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
137
    CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const;
138
139
private:
140
    CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional<FabricIndex> & aAccessingFabricIndex) const;
141
};
142
143
using DecodableType = Type;
144
145
} // namespace SceneInfoStruct
146
} // namespace Structs
147
} // namespace ScenesManagement
148
} // namespace Clusters
149
} // namespace app
150
} // namespace chip