blob: 5e3b7d505c8f9948da3dbef34a879c972eca3b94 [file] [log] [blame]
/*
*
* Copyright (c) 2022 Project CHIP Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// THIS FILE IS GENERATED BY ZAP
// This file is generated from clusters-Commands.h.zapt
#pragma once
#include <app/data-model/DecodableList.h>
#include <app/data-model/List.h>
#include <app/data-model/NullObject.h>
#include <app/data-model/Nullable.h>
#include <lib/core/DataModelTypes.h>
#include <lib/core/Optional.h>
#include <lib/core/TLV.h>
#include <lib/support/BitMask.h>
#include <clusters/shared/Enums.h>
#include <clusters/shared/Structs.h>
#include <clusters/IcdManagement/ClusterId.h>
#include <clusters/IcdManagement/CommandIds.h>
#include <clusters/IcdManagement/Enums.h>
#include <clusters/IcdManagement/Structs.h>
#include <cstdint>
namespace chip {
namespace app {
namespace Clusters {
namespace IcdManagement {
namespace Commands {
// Forward-declarations so we can reference these later.
namespace RegisterClient {
struct Type;
struct DecodableType;
} // namespace RegisterClient
namespace RegisterClientResponse {
struct Type;
struct DecodableType;
} // namespace RegisterClientResponse
namespace UnregisterClient {
struct Type;
struct DecodableType;
} // namespace UnregisterClient
namespace StayActiveRequest {
struct Type;
struct DecodableType;
} // namespace StayActiveRequest
namespace StayActiveResponse {
struct Type;
struct DecodableType;
} // namespace StayActiveResponse
} // namespace Commands
namespace Commands {
namespace RegisterClient {
enum class Fields : uint8_t
{
kCheckInNodeID = 0,
kMonitoredSubject = 1,
kKey = 2,
kVerificationKey = 3,
kClientType = 4,
};
struct Type
{
public:
// Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
static constexpr CommandId GetCommandId() { return Commands::RegisterClient::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; }
static constexpr bool kIsFabricScoped = true;
chip::NodeId checkInNodeID = static_cast<chip::NodeId>(0);
uint64_t monitoredSubject = static_cast<uint64_t>(0);
chip::ByteSpan key;
Optional<chip::ByteSpan> verificationKey;
ClientTypeEnum clientType = static_cast<ClientTypeEnum>(0);
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
using ResponseType = Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType;
static constexpr bool MustUseTimedInvoke() { return false; }
};
struct DecodableType
{
public:
static constexpr CommandId GetCommandId() { return Commands::RegisterClient::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; }
static constexpr bool kIsFabricScoped = true;
chip::NodeId checkInNodeID = static_cast<chip::NodeId>(0);
uint64_t monitoredSubject = static_cast<uint64_t>(0);
chip::ByteSpan key;
Optional<chip::ByteSpan> verificationKey;
ClientTypeEnum clientType = static_cast<ClientTypeEnum>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader, FabricIndex aAccessingFabricIndex);
};
}; // namespace RegisterClient
namespace RegisterClientResponse {
enum class Fields : uint8_t
{
kICDCounter = 0,
};
struct Type
{
public:
// Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
static constexpr CommandId GetCommandId() { return Commands::RegisterClientResponse::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; }
static constexpr bool kIsFabricScoped = false;
uint32_t ICDCounter = static_cast<uint32_t>(0);
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
using ResponseType = DataModel::NullObjectType;
static constexpr bool MustUseTimedInvoke() { return false; }
};
struct DecodableType
{
public:
static constexpr CommandId GetCommandId() { return Commands::RegisterClientResponse::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; }
static constexpr bool kIsFabricScoped = false;
uint32_t ICDCounter = static_cast<uint32_t>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace RegisterClientResponse
namespace UnregisterClient {
enum class Fields : uint8_t
{
kCheckInNodeID = 0,
kVerificationKey = 1,
};
struct Type
{
public:
// Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
static constexpr CommandId GetCommandId() { return Commands::UnregisterClient::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; }
static constexpr bool kIsFabricScoped = true;
chip::NodeId checkInNodeID = static_cast<chip::NodeId>(0);
Optional<chip::ByteSpan> verificationKey;
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
using ResponseType = DataModel::NullObjectType;
static constexpr bool MustUseTimedInvoke() { return false; }
};
struct DecodableType
{
public:
static constexpr CommandId GetCommandId() { return Commands::UnregisterClient::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; }
static constexpr bool kIsFabricScoped = true;
chip::NodeId checkInNodeID = static_cast<chip::NodeId>(0);
Optional<chip::ByteSpan> verificationKey;
CHIP_ERROR Decode(TLV::TLVReader & reader, FabricIndex aAccessingFabricIndex);
};
}; // namespace UnregisterClient
namespace StayActiveRequest {
enum class Fields : uint8_t
{
kStayActiveDuration = 0,
};
struct Type
{
public:
// Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
static constexpr CommandId GetCommandId() { return Commands::StayActiveRequest::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; }
static constexpr bool kIsFabricScoped = false;
uint32_t stayActiveDuration = static_cast<uint32_t>(0);
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
using ResponseType = Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType;
static constexpr bool MustUseTimedInvoke() { return false; }
};
struct DecodableType
{
public:
static constexpr CommandId GetCommandId() { return Commands::StayActiveRequest::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; }
static constexpr bool kIsFabricScoped = false;
uint32_t stayActiveDuration = static_cast<uint32_t>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace StayActiveRequest
namespace StayActiveResponse {
enum class Fields : uint8_t
{
kPromisedActiveDuration = 0,
};
struct Type
{
public:
// Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
static constexpr CommandId GetCommandId() { return Commands::StayActiveResponse::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; }
static constexpr bool kIsFabricScoped = false;
uint32_t promisedActiveDuration = static_cast<uint32_t>(0);
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
using ResponseType = DataModel::NullObjectType;
static constexpr bool MustUseTimedInvoke() { return false; }
};
struct DecodableType
{
public:
static constexpr CommandId GetCommandId() { return Commands::StayActiveResponse::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; }
static constexpr bool kIsFabricScoped = false;
uint32_t promisedActiveDuration = static_cast<uint32_t>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace StayActiveResponse
} // namespace Commands
} // namespace IcdManagement
} // namespace Clusters
} // namespace app
} // namespace chip