Coverage Report

Created: 2025-09-02 06:46

/src/connectedhomeip/zzz_generated/app-common/clusters/FaultInjection/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/FaultInjection/ClusterId.h>
37
#include <clusters/FaultInjection/CommandIds.h>
38
#include <clusters/FaultInjection/Enums.h>
39
#include <clusters/FaultInjection/Structs.h>
40
41
#include <cstdint>
42
43
namespace chip {
44
namespace app {
45
namespace Clusters {
46
namespace FaultInjection {
47
namespace Commands {
48
// Forward-declarations so we can reference these later.
49
50
namespace FailAtFault {
51
struct Type;
52
struct DecodableType;
53
} // namespace FailAtFault
54
55
namespace FailRandomlyAtFault {
56
struct Type;
57
struct DecodableType;
58
} // namespace FailRandomlyAtFault
59
60
} // namespace Commands
61
62
namespace Commands {
63
namespace FailAtFault {
64
enum class Fields : uint8_t
65
{
66
    kType           = 0,
67
    kId             = 1,
68
    kNumCallsToSkip = 2,
69
    kNumCallsToFail = 3,
70
    kTakeMutex      = 4,
71
};
72
73
struct Type
74
{
75
public:
76
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
77
0
    static constexpr CommandId GetCommandId() { return Commands::FailAtFault::Id; }
78
0
    static constexpr ClusterId GetClusterId() { return Clusters::FaultInjection::Id; }
79
80
    FaultType type          = static_cast<FaultType>(0);
81
    uint32_t id             = static_cast<uint32_t>(0);
82
    uint32_t numCallsToSkip = static_cast<uint32_t>(0);
83
    uint32_t numCallsToFail = static_cast<uint32_t>(0);
84
    bool takeMutex          = static_cast<bool>(0);
85
86
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
87
88
    using ResponseType = DataModel::NullObjectType;
89
90
0
    static constexpr bool MustUseTimedInvoke() { return false; }
91
};
92
93
struct DecodableType
94
{
95
public:
96
0
    static constexpr CommandId GetCommandId() { return Commands::FailAtFault::Id; }
97
0
    static constexpr ClusterId GetClusterId() { return Clusters::FaultInjection::Id; }
98
    static constexpr bool kIsFabricScoped = false;
99
100
    FaultType type          = static_cast<FaultType>(0);
101
    uint32_t id             = static_cast<uint32_t>(0);
102
    uint32_t numCallsToSkip = static_cast<uint32_t>(0);
103
    uint32_t numCallsToFail = static_cast<uint32_t>(0);
104
    bool takeMutex          = static_cast<bool>(0);
105
106
    CHIP_ERROR Decode(TLV::TLVReader & reader);
107
};
108
}; // namespace FailAtFault
109
namespace FailRandomlyAtFault {
110
enum class Fields : uint8_t
111
{
112
    kType       = 0,
113
    kId         = 1,
114
    kPercentage = 2,
115
};
116
117
struct Type
118
{
119
public:
120
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
121
0
    static constexpr CommandId GetCommandId() { return Commands::FailRandomlyAtFault::Id; }
122
0
    static constexpr ClusterId GetClusterId() { return Clusters::FaultInjection::Id; }
123
124
    FaultType type     = static_cast<FaultType>(0);
125
    uint32_t id        = static_cast<uint32_t>(0);
126
    uint8_t percentage = static_cast<uint8_t>(0);
127
128
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
129
130
    using ResponseType = DataModel::NullObjectType;
131
132
0
    static constexpr bool MustUseTimedInvoke() { return false; }
133
};
134
135
struct DecodableType
136
{
137
public:
138
0
    static constexpr CommandId GetCommandId() { return Commands::FailRandomlyAtFault::Id; }
139
0
    static constexpr ClusterId GetClusterId() { return Clusters::FaultInjection::Id; }
140
    static constexpr bool kIsFabricScoped = false;
141
142
    FaultType type     = static_cast<FaultType>(0);
143
    uint32_t id        = static_cast<uint32_t>(0);
144
    uint8_t percentage = static_cast<uint8_t>(0);
145
146
    CHIP_ERROR Decode(TLV::TLVReader & reader);
147
};
148
}; // namespace FailRandomlyAtFault
149
} // namespace Commands
150
} // namespace FaultInjection
151
} // namespace Clusters
152
} // namespace app
153
} // namespace chip