Coverage Report

Created: 2025-06-20 06:55

/src/connectedhomeip/zzz_generated/app-common/clusters/ClosureDimension/Commands.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-Commands.h.zapt
20
21
#pragma once
22
23
#include <app/data-model/DecodableList.h>
24
#include <app/data-model/Encode.h>
25
#include <app/data-model/List.h>
26
#include <app/data-model/NullObject.h>
27
#include <app/data-model/Nullable.h>
28
#include <lib/core/DataModelTypes.h>
29
#include <lib/core/Optional.h>
30
#include <lib/core/TLV.h>
31
#include <lib/support/BitMask.h>
32
33
#include <clusters/shared/Enums.h>
34
#include <clusters/shared/Structs.h>
35
36
#include <clusters/ClosureDimension/ClusterId.h>
37
#include <clusters/ClosureDimension/CommandIds.h>
38
#include <clusters/ClosureDimension/Enums.h>
39
#include <clusters/ClosureDimension/Structs.h>
40
41
#include <cstdint>
42
43
namespace chip {
44
namespace app {
45
namespace Clusters {
46
namespace ClosureDimension {
47
namespace Commands {
48
// Forward-declarations so we can reference these later.
49
50
namespace SetTarget {
51
struct Type;
52
struct DecodableType;
53
} // namespace SetTarget
54
55
namespace Step {
56
struct Type;
57
struct DecodableType;
58
} // namespace Step
59
60
} // namespace Commands
61
62
namespace Commands {
63
namespace SetTarget {
64
enum class Fields : uint8_t
65
{
66
    kPosition = 0,
67
    kLatch    = 1,
68
    kSpeed    = 2,
69
};
70
71
struct Type
72
{
73
public:
74
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
75
0
    static constexpr CommandId GetCommandId() { return Commands::SetTarget::Id; }
76
0
    static constexpr ClusterId GetClusterId() { return Clusters::ClosureDimension::Id; }
77
78
    Optional<chip::Percent100ths> position;
79
    Optional<bool> latch;
80
    Optional<Globals::ThreeLevelAutoEnum> speed;
81
82
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
83
84
    using ResponseType = DataModel::NullObjectType;
85
86
0
    static constexpr bool MustUseTimedInvoke() { return false; }
87
};
88
89
struct DecodableType
90
{
91
public:
92
0
    static constexpr CommandId GetCommandId() { return Commands::SetTarget::Id; }
93
0
    static constexpr ClusterId GetClusterId() { return Clusters::ClosureDimension::Id; }
94
    static constexpr bool kIsFabricScoped = false;
95
96
    Optional<chip::Percent100ths> position;
97
    Optional<bool> latch;
98
    Optional<Globals::ThreeLevelAutoEnum> speed;
99
100
    CHIP_ERROR Decode(TLV::TLVReader & reader);
101
};
102
}; // namespace SetTarget
103
namespace Step {
104
enum class Fields : uint8_t
105
{
106
    kDirection     = 0,
107
    kNumberOfSteps = 1,
108
    kSpeed         = 2,
109
};
110
111
struct Type
112
{
113
public:
114
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
115
0
    static constexpr CommandId GetCommandId() { return Commands::Step::Id; }
116
0
    static constexpr ClusterId GetClusterId() { return Clusters::ClosureDimension::Id; }
117
118
    StepDirectionEnum direction = static_cast<StepDirectionEnum>(0);
119
    uint16_t numberOfSteps      = static_cast<uint16_t>(0);
120
    Optional<Globals::ThreeLevelAutoEnum> speed;
121
122
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
123
124
    using ResponseType = DataModel::NullObjectType;
125
126
0
    static constexpr bool MustUseTimedInvoke() { return false; }
127
};
128
129
struct DecodableType
130
{
131
public:
132
0
    static constexpr CommandId GetCommandId() { return Commands::Step::Id; }
133
0
    static constexpr ClusterId GetClusterId() { return Clusters::ClosureDimension::Id; }
134
    static constexpr bool kIsFabricScoped = false;
135
136
    StepDirectionEnum direction = static_cast<StepDirectionEnum>(0);
137
    uint16_t numberOfSteps      = static_cast<uint16_t>(0);
138
    Optional<Globals::ThreeLevelAutoEnum> speed;
139
140
    CHIP_ERROR Decode(TLV::TLVReader & reader);
141
};
142
}; // namespace Step
143
} // namespace Commands
144
} // namespace ClosureDimension
145
} // namespace Clusters
146
} // namespace app
147
} // namespace chip