| /* |
| * |
| * 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/CHIPClusters.h> |
| #include <controller/CHIPDevice.h> |
| |
| #include "gen/CHIPClientCallbacks.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 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 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| CHIP_ERROR chip_ime_AppendCommand_GeneralCommissioning_SetFabric(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId, const uint8_t * fabricId, uint32_t fabricId_Len, |
| const uint8_t * fabricSecret, uint32_t fabricSecret_Len, |
| uint64_t breadcrumb, uint32_t timeoutMs) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); |
| chip::Controller::GeneralCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.SetFabric(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| chip::ByteSpan(fabricId, fabricId_Len), chip::ByteSpan(fabricSecret, fabricSecret_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 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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 IasZone |
| |
| CHIP_ERROR chip_ime_ReadAttribute_IasZone_ZoneState(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); |
| chip::Controller::IasZoneCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeZoneState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| |
| CHIP_ERROR chip_ime_ReadAttribute_IasZone_ZoneType(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); |
| chip::Controller::IasZoneCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeZoneType(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| |
| CHIP_ERROR chip_ime_ReadAttribute_IasZone_ZoneStatus(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); |
| chip::Controller::IasZoneCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeZoneStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| |
| CHIP_ERROR chip_ime_ReadAttribute_IasZone_IasCieAddress(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); |
| chip::Controller::IasZoneCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeIasCieAddress(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| |
| CHIP_ERROR chip_ime_ReadAttribute_IasZone_ZoneId(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); |
| chip::Controller::IasZoneCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeZoneId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| |
| CHIP_ERROR chip_ime_ReadAttribute_IasZone_ClusterRevision(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT); |
| chip::Controller::IasZoneCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| |
| // End of Cluster IasZone |
| // 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| |
| 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 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| |
| 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 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| |
| 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_GetFabricId(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.GetFabricId(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), fabricId, nodeId, 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| 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 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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 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 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| 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(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel()); |
| } |
| |
| 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 |
| } |