blob: 8b8dfbaa5ada0fe13025133c46950d88490d1e60 [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-Structs.h.zapt
#pragma once
#include <app/data-model/DecodableList.h>
#include <app/data-model/List.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/Structs.h>
#include <cstdint>
namespace chip {
namespace app {
namespace Clusters {
namespace ZoneManagement {
namespace Structs {
namespace TwoDCartesianVertexStruct {
enum class Fields : uint8_t
{
kX = 0,
kY = 1,
};
struct Type
{
public:
uint16_t x = static_cast<uint16_t>(0);
uint16_t y = static_cast<uint16_t>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader);
static constexpr bool kIsFabricScoped = false;
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
};
using DecodableType = Type;
} // namespace TwoDCartesianVertexStruct
namespace TwoDCartesianZoneStruct {
enum class Fields : uint8_t
{
kName = 0,
kUse = 1,
kVertices = 2,
kColor = 3,
};
struct Type
{
public:
chip::CharSpan name;
ZoneUseEnum use = static_cast<ZoneUseEnum>(0);
DataModel::List<const Structs::TwoDCartesianVertexStruct::Type> vertices;
Optional<chip::CharSpan> color;
static constexpr bool kIsFabricScoped = false;
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
};
struct DecodableType
{
public:
chip::CharSpan name;
ZoneUseEnum use = static_cast<ZoneUseEnum>(0);
DataModel::DecodableList<Structs::TwoDCartesianVertexStruct::DecodableType> vertices;
Optional<chip::CharSpan> color;
CHIP_ERROR Decode(TLV::TLVReader & reader);
static constexpr bool kIsFabricScoped = false;
};
} // namespace TwoDCartesianZoneStruct
namespace ZoneInformationStruct {
enum class Fields : uint8_t
{
kZoneID = 0,
kZoneType = 1,
kZoneSource = 2,
kTwoDCartesianZone = 3,
};
struct Type
{
public:
uint16_t zoneID = static_cast<uint16_t>(0);
ZoneTypeEnum zoneType = static_cast<ZoneTypeEnum>(0);
ZoneSourceEnum zoneSource = static_cast<ZoneSourceEnum>(0);
Optional<Structs::TwoDCartesianZoneStruct::Type> twoDCartesianZone;
static constexpr bool kIsFabricScoped = false;
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
};
struct DecodableType
{
public:
uint16_t zoneID = static_cast<uint16_t>(0);
ZoneTypeEnum zoneType = static_cast<ZoneTypeEnum>(0);
ZoneSourceEnum zoneSource = static_cast<ZoneSourceEnum>(0);
Optional<Structs::TwoDCartesianZoneStruct::DecodableType> twoDCartesianZone;
CHIP_ERROR Decode(TLV::TLVReader & reader);
static constexpr bool kIsFabricScoped = false;
};
} // namespace ZoneInformationStruct
namespace ZoneTriggerControlStruct {
enum class Fields : uint8_t
{
kZoneID = 0,
kInitialDuration = 1,
kAugmentationDuration = 2,
kMaxDuration = 3,
kBlindDuration = 4,
kSensitivity = 5,
};
struct Type
{
public:
uint16_t zoneID = static_cast<uint16_t>(0);
uint32_t initialDuration = static_cast<uint32_t>(0);
uint32_t augmentationDuration = static_cast<uint32_t>(0);
uint32_t maxDuration = static_cast<uint32_t>(0);
uint32_t blindDuration = static_cast<uint32_t>(0);
Optional<uint8_t> sensitivity;
CHIP_ERROR Decode(TLV::TLVReader & reader);
static constexpr bool kIsFabricScoped = false;
CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const;
};
using DecodableType = Type;
} // namespace ZoneTriggerControlStruct
} // namespace Structs
} // namespace ZoneManagement
} // namespace Clusters
} // namespace app
} // namespace chip