blob: 8bb582c17afb23e22ea6ddd63181249f16c9e511 [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/LevelControl/ClusterId.h>
#include <clusters/LevelControl/CommandIds.h>
#include <clusters/LevelControl/Enums.h>
#include <clusters/LevelControl/Structs.h>
#include <cstdint>
namespace chip {
namespace app {
namespace Clusters {
namespace LevelControl {
namespace Commands {
// Forward-declarations so we can reference these later.
namespace MoveToLevel {
struct Type;
struct DecodableType;
} // namespace MoveToLevel
namespace Move {
struct Type;
struct DecodableType;
} // namespace Move
namespace Step {
struct Type;
struct DecodableType;
} // namespace Step
namespace Stop {
struct Type;
struct DecodableType;
} // namespace Stop
namespace MoveToLevelWithOnOff {
struct Type;
struct DecodableType;
} // namespace MoveToLevelWithOnOff
namespace MoveWithOnOff {
struct Type;
struct DecodableType;
} // namespace MoveWithOnOff
namespace StepWithOnOff {
struct Type;
struct DecodableType;
} // namespace StepWithOnOff
namespace StopWithOnOff {
struct Type;
struct DecodableType;
} // namespace StopWithOnOff
namespace MoveToClosestFrequency {
struct Type;
struct DecodableType;
} // namespace MoveToClosestFrequency
} // namespace Commands
namespace Commands {
namespace MoveToLevel {
enum class Fields : uint8_t
{
kLevel = 0,
kTransitionTime = 1,
kOptionsMask = 2,
kOptionsOverride = 3,
};
struct Type
{
public:
// Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
static constexpr CommandId GetCommandId() { return Commands::MoveToLevel::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
uint8_t level = static_cast<uint8_t>(0);
DataModel::Nullable<uint16_t> transitionTime;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(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::MoveToLevel::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
uint8_t level = static_cast<uint8_t>(0);
DataModel::Nullable<uint16_t> transitionTime;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace MoveToLevel
namespace Move {
enum class Fields : uint8_t
{
kMoveMode = 0,
kRate = 1,
kOptionsMask = 2,
kOptionsOverride = 3,
};
struct Type
{
public:
// Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
static constexpr CommandId GetCommandId() { return Commands::Move::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
MoveModeEnum moveMode = static_cast<MoveModeEnum>(0);
DataModel::Nullable<uint8_t> rate;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(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::Move::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
MoveModeEnum moveMode = static_cast<MoveModeEnum>(0);
DataModel::Nullable<uint8_t> rate;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace Move
namespace Step {
enum class Fields : uint8_t
{
kStepMode = 0,
kStepSize = 1,
kTransitionTime = 2,
kOptionsMask = 3,
kOptionsOverride = 4,
};
struct Type
{
public:
// Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
static constexpr CommandId GetCommandId() { return Commands::Step::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
StepModeEnum stepMode = static_cast<StepModeEnum>(0);
uint8_t stepSize = static_cast<uint8_t>(0);
DataModel::Nullable<uint16_t> transitionTime;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(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::Step::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
StepModeEnum stepMode = static_cast<StepModeEnum>(0);
uint8_t stepSize = static_cast<uint8_t>(0);
DataModel::Nullable<uint16_t> transitionTime;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace Step
namespace Stop {
enum class Fields : uint8_t
{
kOptionsMask = 0,
kOptionsOverride = 1,
};
struct Type
{
public:
// Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
static constexpr CommandId GetCommandId() { return Commands::Stop::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(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::Stop::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace Stop
namespace MoveToLevelWithOnOff {
enum class Fields : uint8_t
{
kLevel = 0,
kTransitionTime = 1,
kOptionsMask = 2,
kOptionsOverride = 3,
};
struct Type
{
public:
// Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
static constexpr CommandId GetCommandId() { return Commands::MoveToLevelWithOnOff::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
uint8_t level = static_cast<uint8_t>(0);
DataModel::Nullable<uint16_t> transitionTime;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(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::MoveToLevelWithOnOff::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
uint8_t level = static_cast<uint8_t>(0);
DataModel::Nullable<uint16_t> transitionTime;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace MoveToLevelWithOnOff
namespace MoveWithOnOff {
enum class Fields : uint8_t
{
kMoveMode = 0,
kRate = 1,
kOptionsMask = 2,
kOptionsOverride = 3,
};
struct Type
{
public:
// Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
static constexpr CommandId GetCommandId() { return Commands::MoveWithOnOff::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
MoveModeEnum moveMode = static_cast<MoveModeEnum>(0);
DataModel::Nullable<uint8_t> rate;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(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::MoveWithOnOff::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
MoveModeEnum moveMode = static_cast<MoveModeEnum>(0);
DataModel::Nullable<uint8_t> rate;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace MoveWithOnOff
namespace StepWithOnOff {
enum class Fields : uint8_t
{
kStepMode = 0,
kStepSize = 1,
kTransitionTime = 2,
kOptionsMask = 3,
kOptionsOverride = 4,
};
struct Type
{
public:
// Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
static constexpr CommandId GetCommandId() { return Commands::StepWithOnOff::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
StepModeEnum stepMode = static_cast<StepModeEnum>(0);
uint8_t stepSize = static_cast<uint8_t>(0);
DataModel::Nullable<uint16_t> transitionTime;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(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::StepWithOnOff::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
StepModeEnum stepMode = static_cast<StepModeEnum>(0);
uint8_t stepSize = static_cast<uint8_t>(0);
DataModel::Nullable<uint16_t> transitionTime;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace StepWithOnOff
namespace StopWithOnOff {
enum class Fields : uint8_t
{
kOptionsMask = 0,
kOptionsOverride = 1,
};
struct Type
{
public:
// Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
static constexpr CommandId GetCommandId() { return Commands::StopWithOnOff::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(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::StopWithOnOff::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
chip::BitMask<OptionsBitmap> optionsMask = static_cast<chip::BitMask<OptionsBitmap>>(0);
chip::BitMask<OptionsBitmap> optionsOverride = static_cast<chip::BitMask<OptionsBitmap>>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace StopWithOnOff
namespace MoveToClosestFrequency {
enum class Fields : uint8_t
{
kFrequency = 0,
};
struct Type
{
public:
// Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand
static constexpr CommandId GetCommandId() { return Commands::MoveToClosestFrequency::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
uint16_t frequency = static_cast<uint16_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::MoveToClosestFrequency::Id; }
static constexpr ClusterId GetClusterId() { return Clusters::LevelControl::Id; }
static constexpr bool kIsFabricScoped = false;
uint16_t frequency = static_cast<uint16_t>(0);
CHIP_ERROR Decode(TLV::TLVReader & reader);
};
}; // namespace MoveToClosestFrequency
} // namespace Commands
} // namespace LevelControl
} // namespace Clusters
} // namespace app
} // namespace chip