blob: 0b2e85ad54e9a235a44b5914da63b5c7d479eca7 [file] [log] [blame]
/*
*
* Copyright (c) 2021 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
#include <core/CHIPCore.h>
#include <app/CommandSender.h>
#include <app/InteractionModelEngine.h>
#include <lib/support/Span.h>
#include <controller/CHIPDevice.h>
#include "gen/CHIPClientCallbacks.h"
#include "gen/CHIPClusters.h"
using namespace chip;
using namespace chip::app;
namespace {
// Define pointers for external ZCL response delegates.
using SuccessResponseDelegate = void (*)();
using FailureResponseDelegate = void (*)(uint8_t);
SuccessResponseDelegate gSuccessResponseDelegate;
FailureResponseDelegate gFailureResponseDelegate;
// Define callbacks for ZCL commands and attribute requests.
void OnDefaultSuccessResponse(void * /* context */)
{
if (gSuccessResponseDelegate != nullptr)
gSuccessResponseDelegate();
}
void OnDefaultFailureResponse(void * /* context */, uint8_t status)
{
if (gFailureResponseDelegate != nullptr)
gFailureResponseDelegate(status);
}
template <class AttributeType>
void OnAttributeResponse(void * /* context */, AttributeType)
{
if (gSuccessResponseDelegate != nullptr)
gSuccessResponseDelegate();
}
chip::Callback::Callback<DefaultSuccessCallback> gDefaultSuccessCallback{ OnDefaultSuccessResponse, nullptr };
chip::Callback::Callback<DefaultFailureCallback> gDefaultFailureCallback{ OnDefaultFailureResponse, nullptr };
chip::Callback::Callback<BooleanAttributeCallback> gBooleanAttributeCallback{ OnAttributeResponse<bool>, nullptr };
chip::Callback::Callback<Int8uAttributeCallback> gInt8uAttributeCallback{ OnAttributeResponse<uint8_t>, nullptr };
chip::Callback::Callback<Int8sAttributeCallback> gInt8sAttributeCallback{ OnAttributeResponse<int8_t>, nullptr };
chip::Callback::Callback<Int16uAttributeCallback> gInt16uAttributeCallback{ OnAttributeResponse<uint16_t>, nullptr };
chip::Callback::Callback<Int16sAttributeCallback> gInt16sAttributeCallback{ OnAttributeResponse<int16_t>, nullptr };
chip::Callback::Callback<Int32uAttributeCallback> gInt32uAttributeCallback{ OnAttributeResponse<uint32_t>, nullptr };
chip::Callback::Callback<Int32sAttributeCallback> gInt32sAttributeCallback{ OnAttributeResponse<int32_t>, nullptr };
chip::Callback::Callback<Int64uAttributeCallback> gInt64uAttributeCallback{ OnAttributeResponse<uint64_t>, nullptr };
chip::Callback::Callback<Int64sAttributeCallback> gInt64sAttributeCallback{ OnAttributeResponse<int64_t>, nullptr };
chip::Callback::Callback<StringAttributeCallback> gStringAttributeCallback{ OnAttributeResponse<ByteSpan>, nullptr };
} // namespace
extern "C" {
void chip_ime_SetSuccessResponseDelegate(SuccessResponseDelegate delegate)
{
gSuccessResponseDelegate = delegate;
}
void chip_ime_SetFailureResponseDelegate(FailureResponseDelegate delegate)
{
gFailureResponseDelegate = delegate;
}
// Cluster AccountLogin
CHIP_ERROR chip_ime_AppendCommand_AccountLogin_GetSetupPIN(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, const uint8_t * tempAccountIdentifier,
uint32_t tempAccountIdentifier_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::AccountLoginCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.GetSetupPIN(nullptr, nullptr, chip::ByteSpan(tempAccountIdentifier, tempAccountIdentifier_Len));
}
CHIP_ERROR chip_ime_AppendCommand_AccountLogin_Login(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, const uint8_t * tempAccountIdentifier,
uint32_t tempAccountIdentifier_Len, const uint8_t * setupPIN,
uint32_t setupPIN_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::AccountLoginCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.Login(nullptr, nullptr, chip::ByteSpan(tempAccountIdentifier, tempAccountIdentifier_Len),
chip::ByteSpan(setupPIN, setupPIN_Len));
}
CHIP_ERROR chip_ime_ReadAttribute_AccountLogin_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::AccountLoginCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster AccountLogin
// Cluster ApplicationBasic
CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_VendorName(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ApplicationBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeVendorName(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_VendorId(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ApplicationBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_ApplicationName(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ApplicationBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeApplicationName(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_ProductId(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ApplicationBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeProductId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_ApplicationId(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ApplicationBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeApplicationId(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_CatalogVendorId(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ApplicationBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCatalogVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_ApplicationSatus(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ApplicationBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeApplicationSatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ApplicationBasic_ClusterRevision(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ApplicationBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster ApplicationBasic
// Cluster ApplicationLauncher
CHIP_ERROR chip_ime_AppendCommand_ApplicationLauncher_LaunchApp(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, const uint8_t * data, uint32_t data_Len,
uint16_t catalogVendorId, const uint8_t * applicationId,
uint32_t applicationId_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ApplicationLauncherCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.LaunchApp(nullptr, nullptr, chip::ByteSpan(data, data_Len), catalogVendorId,
chip::ByteSpan(applicationId, applicationId_Len));
}
CHIP_ERROR chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ApplicationLauncherCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster ApplicationLauncher
// Cluster AudioOutput
CHIP_ERROR chip_ime_AppendCommand_AudioOutput_RenameOutput(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t index, const uint8_t * name, uint32_t name_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::AudioOutputCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.RenameOutput(nullptr, nullptr, index, chip::ByteSpan(name, name_Len));
}
CHIP_ERROR chip_ime_AppendCommand_AudioOutput_SelectOutput(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t index)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::AudioOutputCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.SelectOutput(nullptr, nullptr, index);
}
CHIP_ERROR chip_ime_ReadAttribute_AudioOutput_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::AudioOutputCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster AudioOutput
// Cluster BarrierControl
CHIP_ERROR chip_ime_AppendCommand_BarrierControl_BarrierControlGoToPercent(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
uint8_t percentOpen)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BarrierControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.BarrierControlGoToPercent(nullptr, nullptr, percentOpen);
}
CHIP_ERROR chip_ime_AppendCommand_BarrierControl_BarrierControlStop(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BarrierControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.BarrierControlStop(nullptr, nullptr);
}
CHIP_ERROR chip_ime_ReadAttribute_BarrierControl_BarrierMovingState(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BarrierControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeBarrierMovingState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BarrierControl_BarrierSafetyStatus(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BarrierControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeBarrierSafetyStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BarrierControl_BarrierCapabilities(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BarrierControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeBarrierCapabilities(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BarrierControl_BarrierPosition(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BarrierControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeBarrierPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BarrierControl_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BarrierControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster BarrierControl
// Cluster Basic
CHIP_ERROR chip_ime_AppendCommand_Basic_MfgSpecificPing(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MfgSpecificPing(nullptr, nullptr);
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_InteractionModelVersion(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeInteractionModelVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_VendorName(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeVendorName(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_VendorID(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeVendorID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_ProductName(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeProductName(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_ProductID(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeProductID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_UserLabel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeUserLabel(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_Location(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeLocation(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_HardwareVersion(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeHardwareVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_HardwareVersionString(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeHardwareVersionString(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_SoftwareVersion(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeSoftwareVersion(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_SoftwareVersionString(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeSoftwareVersionString(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_ManufacturingDate(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeManufacturingDate(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_PartNumber(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePartNumber(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_ProductURL(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeProductURL(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_ProductLabel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeProductLabel(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_SerialNumber(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeSerialNumber(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_LocalConfigDisabled(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeLocalConfigDisabled(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Basic_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster Basic
// Cluster Binding
CHIP_ERROR chip_ime_AppendCommand_Binding_Bind(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId,
chip::NodeId nodeId, chip::GroupId groupId, chip::EndpointId endpointId,
chip::ClusterId clusterId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BindingCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.Bind(nullptr, nullptr, nodeId, groupId, endpointId, clusterId);
}
CHIP_ERROR chip_ime_AppendCommand_Binding_Unbind(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId,
chip::NodeId nodeId, chip::GroupId groupId, chip::EndpointId endpointId,
chip::ClusterId clusterId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BindingCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.Unbind(nullptr, nullptr, nodeId, groupId, endpointId, clusterId);
}
CHIP_ERROR chip_ime_ReadAttribute_Binding_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BindingCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster Binding
// Cluster BridgedDeviceBasic
CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BridgedDeviceBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeVendorName(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BridgedDeviceBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeVendorID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_ProductName(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BridgedDeviceBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeProductName(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_UserLabel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BridgedDeviceBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeUserLabel(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersion(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BridgedDeviceBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeHardwareVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersionString(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BridgedDeviceBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeHardwareVersionString(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersion(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BridgedDeviceBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeSoftwareVersion(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersionString(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BridgedDeviceBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeSoftwareVersionString(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_ManufacturingDate(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BridgedDeviceBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeManufacturingDate(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumber(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BridgedDeviceBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePartNumber(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_ProductURL(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BridgedDeviceBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeProductURL(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLabel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BridgedDeviceBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeProductLabel(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNumber(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BridgedDeviceBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeSerialNumber(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BridgedDeviceBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeReachable(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::BridgedDeviceBasicCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster BridgedDeviceBasic
// Cluster ColorControl
CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveColor(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, int16_t rateX, int16_t rateY, uint8_t optionsMask,
uint8_t optionsOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MoveColor(nullptr, nullptr, rateX, rateY, optionsMask, optionsOverride);
}
CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveColorTemperature(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t moveMode,
uint16_t rate, uint16_t colorTemperatureMinimum,
uint16_t colorTemperatureMaximum, uint8_t optionsMask,
uint8_t optionsOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MoveColorTemperature(nullptr, nullptr, moveMode, rate, colorTemperatureMinimum, colorTemperatureMaximum,
optionsMask, optionsOverride);
}
CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveHue(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t moveMode, uint8_t rate, uint8_t optionsMask,
uint8_t optionsOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MoveHue(nullptr, nullptr, moveMode, rate, optionsMask, optionsOverride);
}
CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveSaturation(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t moveMode, uint8_t rate, uint8_t optionsMask,
uint8_t optionsOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MoveSaturation(nullptr, nullptr, moveMode, rate, optionsMask, optionsOverride);
}
CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveToColor(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t colorX, uint16_t colorY, uint16_t transitionTime,
uint8_t optionsMask, uint8_t optionsOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MoveToColor(nullptr, nullptr, colorX, colorY, transitionTime, optionsMask, optionsOverride);
}
CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveToColorTemperature(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
uint16_t colorTemperature, uint16_t transitionTime,
uint8_t optionsMask, uint8_t optionsOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MoveToColorTemperature(nullptr, nullptr, colorTemperature, transitionTime, optionsMask, optionsOverride);
}
CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveToHue(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t hue, uint8_t direction, uint16_t transitionTime,
uint8_t optionsMask, uint8_t optionsOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MoveToHue(nullptr, nullptr, hue, direction, transitionTime, optionsMask, optionsOverride);
}
CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveToHueAndSaturation(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t hue,
uint8_t saturation, uint16_t transitionTime,
uint8_t optionsMask, uint8_t optionsOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MoveToHueAndSaturation(nullptr, nullptr, hue, saturation, transitionTime, optionsMask, optionsOverride);
}
CHIP_ERROR chip_ime_AppendCommand_ColorControl_MoveToSaturation(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t saturation, uint16_t transitionTime,
uint8_t optionsMask, uint8_t optionsOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MoveToSaturation(nullptr, nullptr, saturation, transitionTime, optionsMask, optionsOverride);
}
CHIP_ERROR chip_ime_AppendCommand_ColorControl_StepColor(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, int16_t stepX, int16_t stepY, uint16_t transitionTime,
uint8_t optionsMask, uint8_t optionsOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.StepColor(nullptr, nullptr, stepX, stepY, transitionTime, optionsMask, optionsOverride);
}
CHIP_ERROR chip_ime_AppendCommand_ColorControl_StepColorTemperature(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t stepMode,
uint16_t stepSize, uint16_t transitionTime,
uint16_t colorTemperatureMinimum,
uint16_t colorTemperatureMaximum, uint8_t optionsMask,
uint8_t optionsOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.StepColorTemperature(nullptr, nullptr, stepMode, stepSize, transitionTime, colorTemperatureMinimum,
colorTemperatureMaximum, optionsMask, optionsOverride);
}
CHIP_ERROR chip_ime_AppendCommand_ColorControl_StepHue(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t stepMode, uint8_t stepSize, uint8_t transitionTime,
uint8_t optionsMask, uint8_t optionsOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.StepHue(nullptr, nullptr, stepMode, stepSize, transitionTime, optionsMask, optionsOverride);
}
CHIP_ERROR chip_ime_AppendCommand_ColorControl_StepSaturation(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t stepMode, uint8_t stepSize,
uint8_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.StepSaturation(nullptr, nullptr, stepMode, stepSize, transitionTime, optionsMask, optionsOverride);
}
CHIP_ERROR chip_ime_AppendCommand_ColorControl_StopMoveStep(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t optionsMask, uint8_t optionsOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.StopMoveStep(nullptr, nullptr, optionsMask, optionsOverride);
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CurrentHue(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCurrentHue(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_ColorControl_CurrentHue(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
uint16_t minInterval, uint16_t maxInterval, uint8_t change)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeCurrentHue(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval,
maxInterval, change);
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CurrentSaturation(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCurrentSaturation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_ColorControl_CurrentSaturation(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, uint16_t minInterval,
uint16_t maxInterval, uint8_t change)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeCurrentSaturation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(),
minInterval, maxInterval, change);
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_RemainingTime(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeRemainingTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CurrentX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCurrentX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_ColorControl_CurrentX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
uint16_t minInterval, uint16_t maxInterval, uint16_t change)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeCurrentX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval,
maxInterval, change);
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CurrentY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCurrentY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_ColorControl_CurrentY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
uint16_t minInterval, uint16_t maxInterval, uint16_t change)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeCurrentY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval,
maxInterval, change);
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_DriftCompensation(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeDriftCompensation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CompensationText(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCompensationText(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorTemperature(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorTemperature(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_ColorControl_ColorTemperature(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, uint16_t minInterval,
uint16_t maxInterval, uint16_t change)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeColorTemperature(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(),
minInterval, maxInterval, change);
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorMode(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorControlOptions(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorControlOptions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_NumberOfPrimaries(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeNumberOfPrimaries(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary1X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary1X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary1Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary1Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary1Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary1Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary2X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary2X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary2Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary2Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary2Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary2Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary3X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary3X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary3Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary3Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary3Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary3Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary4X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary4X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary4Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary4Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary4Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary4Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary5X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary5X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary5Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary5Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary5Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary5Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary6X(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary6X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary6Y(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary6Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_Primary6Intensity(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePrimary6Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_WhitePointX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeWhitePointX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_WhitePointY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeWhitePointY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointRX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorPointRX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointRY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorPointRY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointRIntensity(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorPointRIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointGX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorPointGX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointGY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorPointGY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointGIntensity(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorPointGIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointBX(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorPointBX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointBY(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorPointBY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorPointBIntensity(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorPointBIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_EnhancedCurrentHue(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeEnhancedCurrentHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_EnhancedColorMode(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeEnhancedColorMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorLoopActive(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorLoopActive(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorLoopDirection(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorLoopDirection(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorLoopTime(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorLoopTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorCapabilities(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorCapabilities(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMin(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorTempPhysicalMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMax(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeColorTempPhysicalMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_CoupleColorTempToLevelMinMireds(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCoupleColorTempToLevelMinMireds(gInt16uAttributeCallback.Cancel(),
gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_StartUpColorTemperatureMireds(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeStartUpColorTemperatureMireds(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_ColorControl_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ColorControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster ColorControl
// Cluster ContentLaunch
CHIP_ERROR chip_ime_AppendCommand_ContentLaunch_LaunchContent(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t autoPlay, const uint8_t * data,
uint32_t data_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ContentLaunchCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.LaunchContent(nullptr, nullptr, autoPlay, chip::ByteSpan(data, data_Len));
}
CHIP_ERROR chip_ime_AppendCommand_ContentLaunch_LaunchURL(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, const uint8_t * contentURL, uint32_t contentURL_Len,
const uint8_t * displayString, uint32_t displayString_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ContentLaunchCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.LaunchURL(nullptr, nullptr, chip::ByteSpan(contentURL, contentURL_Len),
chip::ByteSpan(displayString, displayString_Len));
}
CHIP_ERROR chip_ime_ReadAttribute_ContentLaunch_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ContentLaunchCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster ContentLaunch
// Cluster Descriptor
CHIP_ERROR chip_ime_ReadAttribute_Descriptor_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DescriptorCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster Descriptor
// Cluster DoorLock
CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearAllPins(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ClearAllPins(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearAllRfids(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ClearAllRfids(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearHolidaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t scheduleId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ClearHolidaySchedule(nullptr, nullptr, scheduleId);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearPin(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t userId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ClearPin(nullptr, nullptr, userId);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearRfid(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t userId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ClearRfid(nullptr, nullptr, userId);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearWeekdaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t scheduleId, uint16_t userId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ClearWeekdaySchedule(nullptr, nullptr, scheduleId, userId);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_ClearYeardaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t scheduleId, uint16_t userId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ClearYeardaySchedule(nullptr, nullptr, scheduleId, userId);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetHolidaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t scheduleId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.GetHolidaySchedule(nullptr, nullptr, scheduleId);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetLogRecord(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t logIndex)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.GetLogRecord(nullptr, nullptr, logIndex);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetPin(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId,
uint16_t userId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.GetPin(nullptr, nullptr, userId);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetRfid(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId,
uint16_t userId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.GetRfid(nullptr, nullptr, userId);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetUserType(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t userId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.GetUserType(nullptr, nullptr, userId);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetWeekdaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t scheduleId, uint16_t userId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.GetWeekdaySchedule(nullptr, nullptr, scheduleId, userId);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_GetYeardaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t scheduleId, uint16_t userId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.GetYeardaySchedule(nullptr, nullptr, scheduleId, userId);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_LockDoor(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, const uint8_t * pin, uint32_t pin_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.LockDoor(nullptr, nullptr, chip::ByteSpan(pin, pin_Len));
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_SetHolidaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t scheduleId, uint32_t localStartTime,
uint32_t localEndTime, uint8_t operatingModeDuringHoliday)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.SetHolidaySchedule(nullptr, nullptr, scheduleId, localStartTime, localEndTime, operatingModeDuringHoliday);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_SetPin(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId,
uint16_t userId, uint8_t userStatus, uint8_t userType, const uint8_t * pin,
uint32_t pin_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.SetPin(nullptr, nullptr, userId, userStatus, userType, chip::ByteSpan(pin, pin_Len));
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_SetRfid(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId,
uint16_t userId, uint8_t userStatus, uint8_t userType, const uint8_t * id,
uint32_t id_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.SetRfid(nullptr, nullptr, userId, userStatus, userType, chip::ByteSpan(id, id_Len));
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_SetUserType(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t userId, uint8_t userType)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.SetUserType(nullptr, nullptr, userId, userType);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_SetWeekdaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t scheduleId, uint16_t userId, uint8_t daysMask,
uint8_t startHour, uint8_t startMinute, uint8_t endHour,
uint8_t endMinute)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.SetWeekdaySchedule(nullptr, nullptr, scheduleId, userId, daysMask, startHour, startMinute, endHour, endMinute);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_SetYeardaySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t scheduleId, uint16_t userId,
uint32_t localStartTime, uint32_t localEndTime)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.SetYeardaySchedule(nullptr, nullptr, scheduleId, userId, localStartTime, localEndTime);
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_UnlockDoor(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, const uint8_t * pin, uint32_t pin_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.UnlockDoor(nullptr, nullptr, chip::ByteSpan(pin, pin_Len));
}
CHIP_ERROR chip_ime_AppendCommand_DoorLock_UnlockWithTimeout(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t timeoutInSeconds, const uint8_t * pin,
uint32_t pin_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.UnlockWithTimeout(nullptr, nullptr, timeoutInSeconds, chip::ByteSpan(pin, pin_Len));
}
CHIP_ERROR chip_ime_ReadAttribute_DoorLock_LockState(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeLockState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_DoorLock_LockState(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
uint16_t minInterval, uint16_t maxInterval)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeLockState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval,
maxInterval);
}
CHIP_ERROR chip_ime_ReadAttribute_DoorLock_LockType(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeLockType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_DoorLock_ActuatorEnabled(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeActuatorEnabled(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_DoorLock_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::DoorLockCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster DoorLock
// Cluster EthernetNetworkDiagnostics
CHIP_ERROR chip_ime_AppendCommand_EthernetNetworkDiagnostics_ResetCounts(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::EthernetNetworkDiagnosticsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ResetCounts(nullptr, nullptr);
}
CHIP_ERROR chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketRxCount(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::EthernetNetworkDiagnosticsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePacketRxCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketTxCount(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::EthernetNetworkDiagnosticsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributePacketTxCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TxErrCount(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::EthernetNetworkDiagnosticsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeTxErrCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CollisionCount(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::EthernetNetworkDiagnosticsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCollisionCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_EthernetNetworkDiagnostics_OverrunCount(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::EthernetNetworkDiagnosticsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::EthernetNetworkDiagnosticsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster EthernetNetworkDiagnostics
// Cluster FixedLabel
CHIP_ERROR chip_ime_ReadAttribute_FixedLabel_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::FixedLabelCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster FixedLabel
// Cluster GeneralCommissioning
CHIP_ERROR chip_ime_AppendCommand_GeneralCommissioning_ArmFailSafe(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
uint16_t expiryLengthSeconds, uint64_t breadcrumb,
uint32_t timeoutMs)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GeneralCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ArmFailSafe(nullptr, nullptr, expiryLengthSeconds, breadcrumb, timeoutMs);
}
CHIP_ERROR chip_ime_AppendCommand_GeneralCommissioning_CommissioningComplete(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GeneralCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.CommissioningComplete(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_GeneralCommissioning_SetRegulatoryConfig(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
uint8_t location, const uint8_t * countryCode,
uint32_t countryCode_Len, uint64_t breadcrumb,
uint32_t timeoutMs)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GeneralCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.SetRegulatoryConfig(nullptr, nullptr, location, chip::ByteSpan(countryCode, countryCode_Len), breadcrumb,
timeoutMs);
}
CHIP_ERROR chip_ime_ReadAttribute_GeneralCommissioning_FabricId(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GeneralCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeFabricId(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_GeneralCommissioning_Breadcrumb(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GeneralCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeBreadcrumb(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_GeneralCommissioning_ClusterRevision(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GeneralCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster GeneralCommissioning
// Cluster GeneralDiagnostics
CHIP_ERROR chip_ime_ReadAttribute_GeneralDiagnostics_RebootCount(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GeneralDiagnosticsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeRebootCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_GeneralDiagnostics_ClusterRevision(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GeneralDiagnosticsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster GeneralDiagnostics
// Cluster GroupKeyManagement
CHIP_ERROR chip_ime_ReadAttribute_GroupKeyManagement_ClusterRevision(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GroupKeyManagementCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster GroupKeyManagement
// Cluster Groups
CHIP_ERROR chip_ime_AppendCommand_Groups_AddGroup(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId,
uint16_t groupId, const uint8_t * groupName, uint32_t groupName_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GroupsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.AddGroup(nullptr, nullptr, groupId, chip::ByteSpan(groupName, groupName_Len));
}
CHIP_ERROR chip_ime_AppendCommand_Groups_AddGroupIfIdentifying(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t groupId, const uint8_t * groupName,
uint32_t groupName_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GroupsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.AddGroupIfIdentifying(nullptr, nullptr, groupId, chip::ByteSpan(groupName, groupName_Len));
}
CHIP_ERROR chip_ime_AppendCommand_Groups_GetGroupMembership(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t groupCount, uint16_t groupList)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GroupsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.GetGroupMembership(nullptr, nullptr, groupCount, groupList);
}
CHIP_ERROR chip_ime_AppendCommand_Groups_RemoveAllGroups(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GroupsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.RemoveAllGroups(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_Groups_RemoveGroup(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t groupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GroupsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.RemoveGroup(nullptr, nullptr, groupId);
}
CHIP_ERROR chip_ime_AppendCommand_Groups_ViewGroup(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId,
uint16_t groupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GroupsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ViewGroup(nullptr, nullptr, groupId);
}
CHIP_ERROR chip_ime_ReadAttribute_Groups_NameSupport(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GroupsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeNameSupport(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Groups_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::GroupsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster Groups
// Cluster Identify
CHIP_ERROR chip_ime_AppendCommand_Identify_Identify(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t identifyTime)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::IdentifyCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.Identify(nullptr, nullptr, identifyTime);
}
CHIP_ERROR chip_ime_AppendCommand_Identify_IdentifyQuery(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::IdentifyCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.IdentifyQuery(nullptr, nullptr);
}
CHIP_ERROR chip_ime_ReadAttribute_Identify_IdentifyTime(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::IdentifyCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeIdentifyTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Identify_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::IdentifyCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster Identify
// Cluster KeypadInput
CHIP_ERROR chip_ime_AppendCommand_KeypadInput_SendKey(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t keyCode)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::KeypadInputCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.SendKey(nullptr, nullptr, keyCode);
}
CHIP_ERROR chip_ime_ReadAttribute_KeypadInput_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::KeypadInputCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster KeypadInput
// Cluster LevelControl
CHIP_ERROR chip_ime_AppendCommand_LevelControl_Move(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t moveMode, uint8_t rate, uint8_t optionMask,
uint8_t optionOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::LevelControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.Move(nullptr, nullptr, moveMode, rate, optionMask, optionOverride);
}
CHIP_ERROR chip_ime_AppendCommand_LevelControl_MoveToLevel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t level, uint16_t transitionTime,
uint8_t optionMask, uint8_t optionOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::LevelControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MoveToLevel(nullptr, nullptr, level, transitionTime, optionMask, optionOverride);
}
CHIP_ERROR chip_ime_AppendCommand_LevelControl_MoveToLevelWithOnOff(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t level,
uint16_t transitionTime)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::LevelControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MoveToLevelWithOnOff(nullptr, nullptr, level, transitionTime);
}
CHIP_ERROR chip_ime_AppendCommand_LevelControl_MoveWithOnOff(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t moveMode, uint8_t rate)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::LevelControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MoveWithOnOff(nullptr, nullptr, moveMode, rate);
}
CHIP_ERROR chip_ime_AppendCommand_LevelControl_Step(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t stepMode, uint8_t stepSize, uint16_t transitionTime,
uint8_t optionMask, uint8_t optionOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::LevelControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.Step(nullptr, nullptr, stepMode, stepSize, transitionTime, optionMask, optionOverride);
}
CHIP_ERROR chip_ime_AppendCommand_LevelControl_StepWithOnOff(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t stepMode, uint8_t stepSize,
uint16_t transitionTime)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::LevelControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.StepWithOnOff(nullptr, nullptr, stepMode, stepSize, transitionTime);
}
CHIP_ERROR chip_ime_AppendCommand_LevelControl_Stop(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t optionMask, uint8_t optionOverride)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::LevelControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.Stop(nullptr, nullptr, optionMask, optionOverride);
}
CHIP_ERROR chip_ime_AppendCommand_LevelControl_StopWithOnOff(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::LevelControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.StopWithOnOff(nullptr, nullptr);
}
CHIP_ERROR chip_ime_ReadAttribute_LevelControl_CurrentLevel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::LevelControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCurrentLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_LevelControl_CurrentLevel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
uint16_t minInterval, uint16_t maxInterval, uint8_t change)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::LevelControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeCurrentLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval,
maxInterval, change);
}
CHIP_ERROR chip_ime_ReadAttribute_LevelControl_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::LevelControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster LevelControl
// Cluster LowPower
CHIP_ERROR chip_ime_AppendCommand_LowPower_Sleep(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::LowPowerCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.Sleep(nullptr, nullptr);
}
CHIP_ERROR chip_ime_ReadAttribute_LowPower_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::LowPowerCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster LowPower
// Cluster MediaInput
CHIP_ERROR chip_ime_AppendCommand_MediaInput_HideInputStatus(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaInputCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.HideInputStatus(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_MediaInput_RenameInput(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t index, const uint8_t * name, uint32_t name_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaInputCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.RenameInput(nullptr, nullptr, index, chip::ByteSpan(name, name_Len));
}
CHIP_ERROR chip_ime_AppendCommand_MediaInput_SelectInput(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t index)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaInputCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.SelectInput(nullptr, nullptr, index);
}
CHIP_ERROR chip_ime_AppendCommand_MediaInput_ShowInputStatus(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaInputCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ShowInputStatus(nullptr, nullptr);
}
CHIP_ERROR chip_ime_ReadAttribute_MediaInput_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaInputCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster MediaInput
// Cluster MediaPlayback
CHIP_ERROR chip_ime_AppendCommand_MediaPlayback_MediaFastForward(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaPlaybackCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MediaFastForward(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_MediaPlayback_MediaNext(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaPlaybackCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MediaNext(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_MediaPlayback_MediaPause(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaPlaybackCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MediaPause(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_MediaPlayback_MediaPlay(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaPlaybackCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MediaPlay(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_MediaPlayback_MediaPrevious(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaPlaybackCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MediaPrevious(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_MediaPlayback_MediaRewind(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaPlaybackCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MediaRewind(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_MediaPlayback_MediaSkipBackward(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint64_t deltaPositionMilliseconds)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaPlaybackCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MediaSkipBackward(nullptr, nullptr, deltaPositionMilliseconds);
}
CHIP_ERROR chip_ime_AppendCommand_MediaPlayback_MediaSkipForward(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint64_t deltaPositionMilliseconds)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaPlaybackCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MediaSkipForward(nullptr, nullptr, deltaPositionMilliseconds);
}
CHIP_ERROR chip_ime_AppendCommand_MediaPlayback_MediaSkipSeek(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint64_t position)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaPlaybackCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MediaSkipSeek(nullptr, nullptr, position);
}
CHIP_ERROR chip_ime_AppendCommand_MediaPlayback_MediaStartOver(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaPlaybackCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MediaStartOver(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_MediaPlayback_MediaStop(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaPlaybackCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.MediaStop(nullptr, nullptr);
}
CHIP_ERROR chip_ime_ReadAttribute_MediaPlayback_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::MediaPlaybackCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster MediaPlayback
// Cluster NetworkCommissioning
CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_AddThreadNetwork(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
const uint8_t * operationalDataset,
uint32_t operationalDataset_Len, uint64_t breadcrumb,
uint32_t timeoutMs)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::NetworkCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.AddThreadNetwork(nullptr, nullptr, chip::ByteSpan(operationalDataset, operationalDataset_Len), breadcrumb,
timeoutMs);
}
CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_AddWiFiNetwork(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
const uint8_t * ssid, uint32_t ssid_Len,
const uint8_t * credentials, uint32_t credentials_Len,
uint64_t breadcrumb, uint32_t timeoutMs)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::NetworkCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.AddWiFiNetwork(nullptr, nullptr, chip::ByteSpan(ssid, ssid_Len), chip::ByteSpan(credentials, credentials_Len),
breadcrumb, timeoutMs);
}
CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_DisableNetwork(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
const uint8_t * networkID, uint32_t networkID_Len,
uint64_t breadcrumb, uint32_t timeoutMs)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::NetworkCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.DisableNetwork(nullptr, nullptr, chip::ByteSpan(networkID, networkID_Len), breadcrumb, timeoutMs);
}
CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_EnableNetwork(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
const uint8_t * networkID, uint32_t networkID_Len,
uint64_t breadcrumb, uint32_t timeoutMs)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::NetworkCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.EnableNetwork(nullptr, nullptr, chip::ByteSpan(networkID, networkID_Len), breadcrumb, timeoutMs);
}
CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_GetLastNetworkCommissioningResult(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId, uint32_t timeoutMs)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::NetworkCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.GetLastNetworkCommissioningResult(nullptr, nullptr, timeoutMs);
}
CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_RemoveNetwork(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
const uint8_t * networkID, uint32_t networkID_Len,
uint64_t breadcrumb, uint32_t timeoutMs)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::NetworkCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.RemoveNetwork(nullptr, nullptr, chip::ByteSpan(networkID, networkID_Len), breadcrumb, timeoutMs);
}
CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_ScanNetworks(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
const uint8_t * ssid, uint32_t ssid_Len, uint64_t breadcrumb,
uint32_t timeoutMs)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::NetworkCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ScanNetworks(nullptr, nullptr, chip::ByteSpan(ssid, ssid_Len), breadcrumb, timeoutMs);
}
CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_UpdateThreadNetwork(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
const uint8_t * operationalDataset,
uint32_t operationalDataset_Len, uint64_t breadcrumb,
uint32_t timeoutMs)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::NetworkCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.UpdateThreadNetwork(nullptr, nullptr, chip::ByteSpan(operationalDataset, operationalDataset_Len), breadcrumb,
timeoutMs);
}
CHIP_ERROR chip_ime_AppendCommand_NetworkCommissioning_UpdateWiFiNetwork(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
const uint8_t * ssid, uint32_t ssid_Len,
const uint8_t * credentials, uint32_t credentials_Len,
uint64_t breadcrumb, uint32_t timeoutMs)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::NetworkCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.UpdateWiFiNetwork(nullptr, nullptr, chip::ByteSpan(ssid, ssid_Len), chip::ByteSpan(credentials, credentials_Len),
breadcrumb, timeoutMs);
}
CHIP_ERROR chip_ime_ReadAttribute_NetworkCommissioning_ClusterRevision(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::NetworkCommissioningCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster NetworkCommissioning
// Cluster OnOff
CHIP_ERROR chip_ime_AppendCommand_OnOff_Off(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::OnOffCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.Off(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_OnOff_On(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::OnOffCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.On(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_OnOff_Toggle(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::OnOffCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.Toggle(nullptr, nullptr);
}
CHIP_ERROR chip_ime_ReadAttribute_OnOff_OnOff(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::OnOffCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeOnOff(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_OnOff_OnOff(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
uint16_t minInterval, uint16_t maxInterval)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::OnOffCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeOnOff(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval,
maxInterval);
}
CHIP_ERROR chip_ime_ReadAttribute_OnOff_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::OnOffCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster OnOff
// Cluster OperationalCredentials
CHIP_ERROR chip_ime_AppendCommand_OperationalCredentials_AddOpCert(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
const uint8_t * noc, uint32_t noc_Len,
const uint8_t * iCACertificate, uint32_t iCACertificate_Len,
const uint8_t * iPKValue, uint32_t iPKValue_Len,
chip::NodeId caseAdminNode, uint16_t adminVendorId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::OperationalCredentialsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.AddOpCert(nullptr, nullptr, chip::ByteSpan(noc, noc_Len), chip::ByteSpan(iCACertificate, iCACertificate_Len),
chip::ByteSpan(iPKValue, iPKValue_Len), caseAdminNode, adminVendorId);
}
CHIP_ERROR chip_ime_AppendCommand_OperationalCredentials_OpCSRRequest(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
const uint8_t * cSRNonce, uint32_t cSRNonce_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::OperationalCredentialsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.OpCSRRequest(nullptr, nullptr, chip::ByteSpan(cSRNonce, cSRNonce_Len));
}
CHIP_ERROR chip_ime_AppendCommand_OperationalCredentials_RemoveAllFabrics(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::OperationalCredentialsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.RemoveAllFabrics(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_OperationalCredentials_RemoveFabric(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
chip::FabricId fabricId, chip::NodeId nodeId,
uint16_t vendorId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::OperationalCredentialsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.RemoveFabric(nullptr, nullptr, fabricId, nodeId, vendorId);
}
CHIP_ERROR chip_ime_AppendCommand_OperationalCredentials_SetFabric(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t vendorId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::OperationalCredentialsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.SetFabric(nullptr, nullptr, vendorId);
}
CHIP_ERROR chip_ime_AppendCommand_OperationalCredentials_UpdateFabricLabel(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
const uint8_t * label, uint32_t label_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::OperationalCredentialsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.UpdateFabricLabel(nullptr, nullptr, chip::ByteSpan(label, label_Len));
}
CHIP_ERROR chip_ime_ReadAttribute_OperationalCredentials_ClusterRevision(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::OperationalCredentialsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster OperationalCredentials
// Cluster PumpConfigurationAndControl
CHIP_ERROR chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxPressure(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::PumpConfigurationAndControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeMaxPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxSpeed(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::PumpConfigurationAndControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeMaxSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxFlow(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::PumpConfigurationAndControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeMaxFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveOperationMode(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::PumpConfigurationAndControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeEffectiveOperationMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveControlMode(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::PumpConfigurationAndControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeEffectiveControlMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_PumpConfigurationAndControl_Capacity(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::PumpConfigurationAndControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCapacity(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_PumpConfigurationAndControl_Capacity(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, uint16_t minInterval,
uint16_t maxInterval, int16_t change)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::PumpConfigurationAndControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeCapacity(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval,
maxInterval, change);
}
CHIP_ERROR chip_ime_ReadAttribute_PumpConfigurationAndControl_OperationMode(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::PumpConfigurationAndControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeOperationMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_PumpConfigurationAndControl_ClusterRevision(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::PumpConfigurationAndControlCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster PumpConfigurationAndControl
// Cluster RelativeHumidityMeasurement
CHIP_ERROR chip_ime_ReadAttribute_RelativeHumidityMeasurement_MeasuredValue(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::RelativeHumidityMeasurementCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_RelativeHumidityMeasurement_MeasuredValue(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
uint16_t minInterval, uint16_t maxInterval,
uint16_t change)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::RelativeHumidityMeasurementCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval,
maxInterval, change);
}
CHIP_ERROR chip_ime_ReadAttribute_RelativeHumidityMeasurement_MinMeasuredValue(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::RelativeHumidityMeasurementCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeMinMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_RelativeHumidityMeasurement_MaxMeasuredValue(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::RelativeHumidityMeasurementCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeMaxMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_RelativeHumidityMeasurement_ClusterRevision(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::RelativeHumidityMeasurementCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster RelativeHumidityMeasurement
// Cluster Scenes
CHIP_ERROR chip_ime_AppendCommand_Scenes_AddScene(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId,
uint16_t groupId, uint8_t sceneId, uint16_t transitionTime,
const uint8_t * sceneName, uint32_t sceneName_Len, chip::ClusterId clusterId,
uint8_t length, uint8_t value)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ScenesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.AddScene(nullptr, nullptr, groupId, sceneId, transitionTime, chip::ByteSpan(sceneName, sceneName_Len), clusterId,
length, value);
}
CHIP_ERROR chip_ime_AppendCommand_Scenes_GetSceneMembership(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t groupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ScenesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.GetSceneMembership(nullptr, nullptr, groupId);
}
CHIP_ERROR chip_ime_AppendCommand_Scenes_RecallScene(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t groupId, uint8_t sceneId, uint16_t transitionTime)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ScenesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.RecallScene(nullptr, nullptr, groupId, sceneId, transitionTime);
}
CHIP_ERROR chip_ime_AppendCommand_Scenes_RemoveAllScenes(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t groupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ScenesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.RemoveAllScenes(nullptr, nullptr, groupId);
}
CHIP_ERROR chip_ime_AppendCommand_Scenes_RemoveScene(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t groupId, uint8_t sceneId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ScenesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.RemoveScene(nullptr, nullptr, groupId, sceneId);
}
CHIP_ERROR chip_ime_AppendCommand_Scenes_StoreScene(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t groupId, uint8_t sceneId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ScenesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.StoreScene(nullptr, nullptr, groupId, sceneId);
}
CHIP_ERROR chip_ime_AppendCommand_Scenes_ViewScene(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId,
uint16_t groupId, uint8_t sceneId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ScenesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ViewScene(nullptr, nullptr, groupId, sceneId);
}
CHIP_ERROR chip_ime_ReadAttribute_Scenes_SceneCount(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ScenesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeSceneCount(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Scenes_CurrentScene(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ScenesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCurrentScene(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Scenes_CurrentGroup(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ScenesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCurrentGroup(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Scenes_SceneValid(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ScenesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeSceneValid(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Scenes_NameSupport(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ScenesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeNameSupport(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Scenes_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ScenesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster Scenes
// Cluster SoftwareDiagnostics
CHIP_ERROR chip_ime_AppendCommand_SoftwareDiagnostics_ResetWatermarks(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::SoftwareDiagnosticsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ResetWatermarks(nullptr, nullptr);
}
CHIP_ERROR chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::SoftwareDiagnosticsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCurrentHeapHighWatermark(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_SoftwareDiagnostics_ClusterRevision(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::SoftwareDiagnosticsCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster SoftwareDiagnostics
// Cluster Switch
CHIP_ERROR chip_ime_ReadAttribute_Switch_NumberOfPositions(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::SwitchCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeNumberOfPositions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Switch_CurrentPosition(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::SwitchCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCurrentPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_Switch_CurrentPosition(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
uint16_t minInterval, uint16_t maxInterval, uint8_t change)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::SwitchCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeCurrentPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(),
minInterval, maxInterval, change);
}
CHIP_ERROR chip_ime_ReadAttribute_Switch_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::SwitchCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster Switch
// Cluster TvChannel
CHIP_ERROR chip_ime_AppendCommand_TvChannel_ChangeChannel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, const uint8_t * match, uint32_t match_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TvChannelCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ChangeChannel(nullptr, nullptr, chip::ByteSpan(match, match_Len));
}
CHIP_ERROR chip_ime_AppendCommand_TvChannel_ChangeChannelByNumber(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t majorNumber, uint16_t minorNumber)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TvChannelCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ChangeChannelByNumber(nullptr, nullptr, majorNumber, minorNumber);
}
CHIP_ERROR chip_ime_AppendCommand_TvChannel_SkipChannel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint16_t count)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TvChannelCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.SkipChannel(nullptr, nullptr, count);
}
CHIP_ERROR chip_ime_ReadAttribute_TvChannel_TvChannelLineup(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TvChannelCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeTvChannelLineup(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TvChannel_CurrentTvChannel(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TvChannelCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCurrentTvChannel(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TvChannel_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TvChannelCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster TvChannel
// Cluster TargetNavigator
CHIP_ERROR chip_ime_AppendCommand_TargetNavigator_NavigateTarget(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t target, const uint8_t * data,
uint32_t data_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TargetNavigatorCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.NavigateTarget(nullptr, nullptr, target, chip::ByteSpan(data, data_Len));
}
CHIP_ERROR chip_ime_ReadAttribute_TargetNavigator_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TargetNavigatorCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster TargetNavigator
// Cluster TemperatureMeasurement
CHIP_ERROR chip_ime_ReadAttribute_TemperatureMeasurement_MeasuredValue(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TemperatureMeasurementCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_TemperatureMeasurement_MeasuredValue(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, uint16_t minInterval,
uint16_t maxInterval, int16_t change)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TemperatureMeasurementCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval,
maxInterval, change);
}
CHIP_ERROR chip_ime_ReadAttribute_TemperatureMeasurement_MinMeasuredValue(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TemperatureMeasurementCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TemperatureMeasurement_MaxMeasuredValue(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TemperatureMeasurementCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TemperatureMeasurement_ClusterRevision(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TemperatureMeasurementCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster TemperatureMeasurement
// Cluster TestCluster
CHIP_ERROR chip_ime_AppendCommand_TestCluster_Test(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.Test(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_TestCluster_TestNotHandled(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.TestNotHandled(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_TestCluster_TestSpecific(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.TestSpecific(nullptr, nullptr);
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_Boolean(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeBoolean(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_Bitmap8(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeBitmap8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_Bitmap16(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeBitmap16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_Bitmap32(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeBitmap32(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_Bitmap64(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeBitmap64(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_Int8u(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeInt8u(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_Int16u(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeInt16u(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_Int32u(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeInt32u(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_Int64u(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeInt64u(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_Int8s(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeInt8s(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_Int16s(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeInt16s(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_Int32s(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeInt32s(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_Int64s(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeInt64s(gInt64sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_Enum8(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeEnum8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_Enum16(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeEnum16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_OctetString(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeOctetString(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_TestCluster_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TestClusterCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster TestCluster
// Cluster Thermostat
CHIP_ERROR chip_ime_AppendCommand_Thermostat_ClearWeeklySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ThermostatCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ClearWeeklySchedule(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_Thermostat_GetRelayStatusLog(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ThermostatCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.GetRelayStatusLog(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_Thermostat_GetWeeklySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t daysToReturn, uint8_t modeToReturn)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ThermostatCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.GetWeeklySchedule(nullptr, nullptr, daysToReturn, modeToReturn);
}
CHIP_ERROR chip_ime_AppendCommand_Thermostat_SetWeeklySchedule(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t numberOfTransitionsForSequence,
uint8_t dayOfWeekForSequence, uint8_t modeForSequence,
uint8_t payload)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ThermostatCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.SetWeeklySchedule(nullptr, nullptr, numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence,
payload);
}
CHIP_ERROR chip_ime_AppendCommand_Thermostat_SetpointRaiseLower(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId, uint8_t mode, int8_t amount)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ThermostatCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.SetpointRaiseLower(nullptr, nullptr, mode, amount);
}
CHIP_ERROR chip_ime_ReadAttribute_Thermostat_LocalTemperature(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ThermostatCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeLocalTemperature(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_Thermostat_LocalTemperature(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, uint16_t minInterval,
uint16_t maxInterval, int16_t change)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ThermostatCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeLocalTemperature(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(),
minInterval, maxInterval, change);
}
CHIP_ERROR chip_ime_ReadAttribute_Thermostat_OccupiedCoolingSetpoint(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ThermostatCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeOccupiedCoolingSetpoint(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Thermostat_OccupiedHeatingSetpoint(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ThermostatCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeOccupiedHeatingSetpoint(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Thermostat_ControlSequenceOfOperation(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ThermostatCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeControlSequenceOfOperation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Thermostat_SystemMode(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ThermostatCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeSystemMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_Thermostat_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::ThermostatCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster Thermostat
// Cluster TrustedRootCertificates
CHIP_ERROR chip_ime_AppendCommand_TrustedRootCertificates_AddTrustedRootCertificate(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
const uint8_t * rootCertificate,
uint32_t rootCertificate_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TrustedRootCertificatesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.AddTrustedRootCertificate(nullptr, nullptr, chip::ByteSpan(rootCertificate, rootCertificate_Len));
}
CHIP_ERROR chip_ime_AppendCommand_TrustedRootCertificates_RemoveTrustedRootCertificate(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId,
const uint8_t * trustedRootIdentifier,
uint32_t trustedRootIdentifier_Len)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TrustedRootCertificatesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.RemoveTrustedRootCertificate(nullptr, nullptr, chip::ByteSpan(trustedRootIdentifier, trustedRootIdentifier_Len));
}
CHIP_ERROR chip_ime_ReadAttribute_TrustedRootCertificates_ClusterRevision(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::TrustedRootCertificatesCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster TrustedRootCertificates
// Cluster WakeOnLan
CHIP_ERROR chip_ime_ReadAttribute_WakeOnLan_WakeOnLanMacAddress(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WakeOnLanCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeWakeOnLanMacAddress(gStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_WakeOnLan_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WakeOnLanCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster WakeOnLan
// Cluster WindowCovering
CHIP_ERROR chip_ime_AppendCommand_WindowCovering_WindowCoveringDownClose(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.WindowCoveringDownClose(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_WindowCovering_WindowCoveringGoToLiftPercentage(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
uint8_t percentageLiftValue)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.WindowCoveringGoToLiftPercentage(nullptr, nullptr, percentageLiftValue);
}
CHIP_ERROR chip_ime_AppendCommand_WindowCovering_WindowCoveringGoToLiftValue(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
uint16_t liftValue)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.WindowCoveringGoToLiftValue(nullptr, nullptr, liftValue);
}
CHIP_ERROR chip_ime_AppendCommand_WindowCovering_WindowCoveringGoToTiltPercentage(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
uint8_t percentageTiltValue)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.WindowCoveringGoToTiltPercentage(nullptr, nullptr, percentageTiltValue);
}
CHIP_ERROR chip_ime_AppendCommand_WindowCovering_WindowCoveringGoToTiltValue(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId,
uint16_t tiltValue)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.WindowCoveringGoToTiltValue(nullptr, nullptr, tiltValue);
}
CHIP_ERROR chip_ime_AppendCommand_WindowCovering_WindowCoveringStop(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.WindowCoveringStop(nullptr, nullptr);
}
CHIP_ERROR chip_ime_AppendCommand_WindowCovering_WindowCoveringUpOpen(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.WindowCoveringUpOpen(nullptr, nullptr);
}
CHIP_ERROR chip_ime_ReadAttribute_WindowCovering_WindowCoveringType(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeWindowCoveringType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_WindowCovering_WindowCoveringType(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, uint16_t minInterval,
uint16_t maxInterval)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeWindowCoveringType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(),
minInterval, maxInterval);
}
CHIP_ERROR chip_ime_ReadAttribute_WindowCovering_CurrentPositionLift(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCurrentPositionLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionLift(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, uint16_t minInterval,
uint16_t maxInterval, uint16_t change)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeCurrentPositionLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(),
minInterval, maxInterval, change);
}
CHIP_ERROR chip_ime_ReadAttribute_WindowCovering_CurrentPositionTilt(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeCurrentPositionTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionTilt(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, uint16_t minInterval,
uint16_t maxInterval, uint16_t change)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeCurrentPositionTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(),
minInterval, maxInterval, change);
}
CHIP_ERROR chip_ime_ReadAttribute_WindowCovering_ConfigStatus(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeConfigStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ConfigureAttribute_WindowCovering_ConfigStatus(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId, uint16_t minInterval,
uint16_t maxInterval)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ConfigureAttributeConfigStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval,
maxInterval);
}
CHIP_ERROR chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitLift(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeInstalledOpenLimitLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitLift(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeInstalledClosedLimitLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitTilt(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeInstalledOpenLimitTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitTilt(chip::Controller::Device * device,
chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeInstalledClosedLimitTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_WindowCovering_Mode(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
CHIP_ERROR chip_ime_ReadAttribute_WindowCovering_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId,
chip::GroupId /* ZCLgroupId */)
{
VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT);
chip::Controller::WindowCoveringCluster cluster;
cluster.Associate(device, ZCLendpointId);
return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel());
}
// End of Cluster WindowCovering
}