Coverage Report

Created: 2026-07-10 06:38

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/connectedhomeip/zzz_generated/app-common/clusters/Messages/Commands.h
Line
Count
Source
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/Messages/ClusterId.h>
37
#include <clusters/Messages/CommandIds.h>
38
#include <clusters/Messages/Enums.h>
39
#include <clusters/Messages/Structs.h>
40
41
#include <cstdint>
42
43
namespace chip {
44
namespace app {
45
namespace Clusters {
46
namespace Messages {
47
namespace Commands {
48
// Forward-declarations so we can reference these later.
49
50
namespace PresentMessagesRequest {
51
struct Type;
52
struct DecodableType;
53
} // namespace PresentMessagesRequest
54
55
namespace CancelMessagesRequest {
56
struct Type;
57
struct DecodableType;
58
} // namespace CancelMessagesRequest
59
60
} // namespace Commands
61
62
namespace Commands {
63
namespace PresentMessagesRequest {
64
enum class Fields : uint8_t
65
{
66
    kMessageID      = 0,
67
    kPriority       = 1,
68
    kMessageControl = 2,
69
    kStartTime      = 3,
70
    kDuration       = 4,
71
    kMessageText    = 5,
72
    kResponses      = 6,
73
};
74
75
struct Type
76
{
77
public:
78
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
79
0
    static constexpr CommandId GetCommandId() { return Commands::PresentMessagesRequest::Id; }
80
0
    static constexpr ClusterId GetClusterId() { return Clusters::Messages::Id; }
81
82
    chip::ByteSpan messageID;
83
    MessagePriorityEnum priority                       = static_cast<MessagePriorityEnum>(0);
84
    chip::BitMask<MessageControlBitmap> messageControl = static_cast<chip::BitMask<MessageControlBitmap>>(0);
85
    DataModel::Nullable<uint32_t> startTime;
86
    DataModel::Nullable<uint64_t> duration;
87
    chip::CharSpan messageText;
88
    Optional<DataModel::List<const Structs::MessageResponseOptionStruct::Type>> responses;
89
90
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
91
92
    using ResponseType = DataModel::NullObjectType;
93
94
0
    static constexpr bool MustUseTimedInvoke() { return false; }
95
};
96
97
struct DecodableType
98
{
99
public:
100
0
    static constexpr CommandId GetCommandId() { return Commands::PresentMessagesRequest::Id; }
101
0
    static constexpr ClusterId GetClusterId() { return Clusters::Messages::Id; }
102
    static constexpr bool kIsFabricScoped = true;
103
104
    chip::ByteSpan messageID;
105
    MessagePriorityEnum priority                       = static_cast<MessagePriorityEnum>(0);
106
    chip::BitMask<MessageControlBitmap> messageControl = static_cast<chip::BitMask<MessageControlBitmap>>(0);
107
    DataModel::Nullable<uint32_t> startTime;
108
    DataModel::Nullable<uint64_t> duration;
109
    chip::CharSpan messageText;
110
    Optional<DataModel::DecodableList<Structs::MessageResponseOptionStruct::DecodableType>> responses;
111
112
    CHIP_ERROR Decode(TLV::TLVReader & reader, FabricIndex aAccessingFabricIndex);
113
};
114
}; // namespace PresentMessagesRequest
115
namespace CancelMessagesRequest {
116
enum class Fields : uint8_t
117
{
118
    kMessageIDs = 0,
119
};
120
121
struct Type
122
{
123
public:
124
    // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
125
0
    static constexpr CommandId GetCommandId() { return Commands::CancelMessagesRequest::Id; }
126
0
    static constexpr ClusterId GetClusterId() { return Clusters::Messages::Id; }
127
128
    DataModel::List<const chip::ByteSpan> messageIDs;
129
130
    CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
131
132
    using ResponseType = DataModel::NullObjectType;
133
134
0
    static constexpr bool MustUseTimedInvoke() { return false; }
135
};
136
137
struct DecodableType
138
{
139
public:
140
0
    static constexpr CommandId GetCommandId() { return Commands::CancelMessagesRequest::Id; }
141
0
    static constexpr ClusterId GetClusterId() { return Clusters::Messages::Id; }
142
    static constexpr bool kIsFabricScoped = true;
143
144
    DataModel::DecodableList<chip::ByteSpan> messageIDs;
145
146
    CHIP_ERROR Decode(TLV::TLVReader & reader, FabricIndex aAccessingFabricIndex);
147
};
148
}; // namespace CancelMessagesRequest
149
} // namespace Commands
150
} // namespace Messages
151
} // namespace Clusters
152
} // namespace app
153
} // namespace chip