| /* |
| * |
| * 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 <app/CommandSender.h> |
| #include <app/InteractionModelEngine.h> |
| #include <lib/core/CHIPCore.h> |
| #include <lib/support/Span.h> |
| |
| #include <controller/CHIPDevice.h> |
| |
| #include <zap-generated/CHIPClientCallbacks.h> |
| #include <zap-generated/CHIPClusters.h> |
| |
| using namespace chip; |
| using namespace chip::app; |
| |
| namespace { |
| |
| // Define pointers for external ZCL response delegates. |
| |
| using SuccessResponseDelegate = void (*)(); |
| using FailureResponseDelegate = void (*)(uint8_t); |
| SuccessResponseDelegate gSuccessResponseDelegate; |
| FailureResponseDelegate gFailureResponseDelegate; |
| |
| // Define callbacks for ZCL commands and attribute requests. |
| |
| void OnDefaultSuccessResponse(void * /* context */) |
| { |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| |
| void OnDefaultFailureResponse(void * /* context */, uint8_t status) |
| { |
| if (gFailureResponseDelegate != nullptr) |
| gFailureResponseDelegate(status); |
| } |
| |
| template <class AttributeType> |
| void OnAttributeResponse(void * /* context */, AttributeType value) |
| { |
| std::string strValue = std::to_string(value); |
| ChipLogProgress(Zcl, " attributeValue: %s", strValue.c_str()); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| |
| template <> |
| void OnAttributeResponse<chip::ByteSpan>(void * /* context */, chip::ByteSpan value) |
| { |
| std::string strValue = ""; |
| for (size_t i = 0; i < value.size(); i++) |
| { |
| strValue += ' '; |
| strValue += std::to_string(value.data()[i]); |
| } |
| ChipLogProgress(Zcl, " attributeValue: (span of length %zd) %s", value.size(), strValue.c_str()); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| |
| template <> |
| void OnAttributeResponse<bool>(void * /* context */, bool value) |
| { |
| ChipLogProgress(Zcl, " attributeValue: %s", value ? "true" : "false"); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| |
| static void OnApplicationLauncherApplicationLauncherListListAttributeResponse(void * context, uint16_t count, uint16_t * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<ApplicationLauncherApplicationLauncherListListAttributeCallback> |
| gApplicationLauncherApplicationLauncherListListAttributeCallback{ |
| OnApplicationLauncherApplicationLauncherListListAttributeResponse, nullptr |
| }; |
| static void OnAudioOutputAudioOutputListListAttributeResponse(void * context, uint16_t count, _AudioOutputInfo * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<AudioOutputAudioOutputListListAttributeCallback> gAudioOutputAudioOutputListListAttributeCallback{ |
| OnAudioOutputAudioOutputListListAttributeResponse, nullptr |
| }; |
| static void OnContentLauncherAcceptsHeaderListListAttributeResponse(void * context, uint16_t count, chip::ByteSpan * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<ContentLauncherAcceptsHeaderListListAttributeCallback> |
| gContentLauncherAcceptsHeaderListListAttributeCallback{ OnContentLauncherAcceptsHeaderListListAttributeResponse, nullptr }; |
| static void OnContentLauncherSupportedStreamingTypesListAttributeResponse(void * context, uint16_t count, uint8_t * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<ContentLauncherSupportedStreamingTypesListAttributeCallback> |
| gContentLauncherSupportedStreamingTypesListAttributeCallback{ OnContentLauncherSupportedStreamingTypesListAttributeResponse, |
| nullptr }; |
| static void OnDescriptorDeviceListListAttributeResponse(void * context, uint16_t count, _DeviceType * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<DescriptorDeviceListListAttributeCallback> gDescriptorDeviceListListAttributeCallback{ |
| OnDescriptorDeviceListListAttributeResponse, nullptr |
| }; |
| static void OnDescriptorServerListListAttributeResponse(void * context, uint16_t count, chip::ClusterId * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<DescriptorServerListListAttributeCallback> gDescriptorServerListListAttributeCallback{ |
| OnDescriptorServerListListAttributeResponse, nullptr |
| }; |
| static void OnDescriptorClientListListAttributeResponse(void * context, uint16_t count, chip::ClusterId * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<DescriptorClientListListAttributeCallback> gDescriptorClientListListAttributeCallback{ |
| OnDescriptorClientListListAttributeResponse, nullptr |
| }; |
| static void OnDescriptorPartsListListAttributeResponse(void * context, uint16_t count, chip::EndpointId * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<DescriptorPartsListListAttributeCallback> gDescriptorPartsListListAttributeCallback{ |
| OnDescriptorPartsListListAttributeResponse, nullptr |
| }; |
| static void OnFixedLabelLabelListListAttributeResponse(void * context, uint16_t count, _LabelStruct * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<FixedLabelLabelListListAttributeCallback> gFixedLabelLabelListListAttributeCallback{ |
| OnFixedLabelLabelListListAttributeResponse, nullptr |
| }; |
| static void OnGeneralCommissioningBasicCommissioningInfoListListAttributeResponse(void * context, uint16_t count, |
| _BasicCommissioningInfoType * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<GeneralCommissioningBasicCommissioningInfoListListAttributeCallback> |
| gGeneralCommissioningBasicCommissioningInfoListListAttributeCallback{ |
| OnGeneralCommissioningBasicCommissioningInfoListListAttributeResponse, nullptr |
| }; |
| static void OnGeneralDiagnosticsNetworkInterfacesListAttributeResponse(void * context, uint16_t count, |
| _NetworkInterfaceType * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<GeneralDiagnosticsNetworkInterfacesListAttributeCallback> |
| gGeneralDiagnosticsNetworkInterfacesListAttributeCallback{ OnGeneralDiagnosticsNetworkInterfacesListAttributeResponse, |
| nullptr }; |
| static void OnGroupKeyManagementGroupsListAttributeResponse(void * context, uint16_t count, _GroupState * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<GroupKeyManagementGroupsListAttributeCallback> gGroupKeyManagementGroupsListAttributeCallback{ |
| OnGroupKeyManagementGroupsListAttributeResponse, nullptr |
| }; |
| static void OnGroupKeyManagementGroupKeysListAttributeResponse(void * context, uint16_t count, _GroupKey * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<GroupKeyManagementGroupKeysListAttributeCallback> gGroupKeyManagementGroupKeysListAttributeCallback{ |
| OnGroupKeyManagementGroupKeysListAttributeResponse, nullptr |
| }; |
| static void OnMediaInputMediaInputListListAttributeResponse(void * context, uint16_t count, _MediaInputInfo * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<MediaInputMediaInputListListAttributeCallback> gMediaInputMediaInputListListAttributeCallback{ |
| OnMediaInputMediaInputListListAttributeResponse, nullptr |
| }; |
| static void OnOperationalCredentialsFabricsListListAttributeResponse(void * context, uint16_t count, _FabricDescriptor * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<OperationalCredentialsFabricsListListAttributeCallback> |
| gOperationalCredentialsFabricsListListAttributeCallback{ OnOperationalCredentialsFabricsListListAttributeResponse, nullptr }; |
| static void OnPowerSourceActiveBatteryFaultsListAttributeResponse(void * context, uint16_t count, uint8_t * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<PowerSourceActiveBatteryFaultsListAttributeCallback> gPowerSourceActiveBatteryFaultsListAttributeCallback{ |
| OnPowerSourceActiveBatteryFaultsListAttributeResponse, nullptr |
| }; |
| static void OnTvChannelTvChannelListListAttributeResponse(void * context, uint16_t count, _TvChannelInfo * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<TvChannelTvChannelListListAttributeCallback> gTvChannelTvChannelListListAttributeCallback{ |
| OnTvChannelTvChannelListListAttributeResponse, nullptr |
| }; |
| static void OnTargetNavigatorTargetNavigatorListListAttributeResponse(void * context, uint16_t count, |
| _NavigateTargetTargetInfo * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<TargetNavigatorTargetNavigatorListListAttributeCallback> |
| gTargetNavigatorTargetNavigatorListListAttributeCallback{ OnTargetNavigatorTargetNavigatorListListAttributeResponse, nullptr }; |
| static void OnTestClusterListInt8uListAttributeResponse(void * context, uint16_t count, uint8_t * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<TestClusterListInt8uListAttributeCallback> gTestClusterListInt8uListAttributeCallback{ |
| OnTestClusterListInt8uListAttributeResponse, nullptr |
| }; |
| static void OnTestClusterListOctetStringListAttributeResponse(void * context, uint16_t count, chip::ByteSpan * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<TestClusterListOctetStringListAttributeCallback> gTestClusterListOctetStringListAttributeCallback{ |
| OnTestClusterListOctetStringListAttributeResponse, nullptr |
| }; |
| static void OnTestClusterListStructOctetStringListAttributeResponse(void * context, uint16_t count, _TestListStructOctet * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<TestClusterListStructOctetStringListAttributeCallback> |
| gTestClusterListStructOctetStringListAttributeCallback{ OnTestClusterListStructOctetStringListAttributeResponse, nullptr }; |
| static void OnThreadNetworkDiagnosticsNeighborTableListListAttributeResponse(void * context, uint16_t count, |
| _NeighborTable * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<ThreadNetworkDiagnosticsNeighborTableListListAttributeCallback> |
| gThreadNetworkDiagnosticsNeighborTableListListAttributeCallback{ |
| OnThreadNetworkDiagnosticsNeighborTableListListAttributeResponse, nullptr |
| }; |
| static void OnThreadNetworkDiagnosticsRouteTableListListAttributeResponse(void * context, uint16_t count, _RouteTable * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<ThreadNetworkDiagnosticsRouteTableListListAttributeCallback> |
| gThreadNetworkDiagnosticsRouteTableListListAttributeCallback{ OnThreadNetworkDiagnosticsRouteTableListListAttributeResponse, |
| nullptr }; |
| static void OnThreadNetworkDiagnosticsSecurityPolicyListAttributeResponse(void * context, uint16_t count, _SecurityPolicy * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<ThreadNetworkDiagnosticsSecurityPolicyListAttributeCallback> |
| gThreadNetworkDiagnosticsSecurityPolicyListAttributeCallback{ OnThreadNetworkDiagnosticsSecurityPolicyListAttributeResponse, |
| nullptr }; |
| static void OnThreadNetworkDiagnosticsOperationalDatasetComponentsListAttributeResponse(void * context, uint16_t count, |
| _OperationalDatasetComponents * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<ThreadNetworkDiagnosticsOperationalDatasetComponentsListAttributeCallback> |
| gThreadNetworkDiagnosticsOperationalDatasetComponentsListAttributeCallback{ |
| OnThreadNetworkDiagnosticsOperationalDatasetComponentsListAttributeResponse, nullptr |
| }; |
| static void OnThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeResponse(void * context, uint16_t count, |
| uint8_t * entries) |
| { |
| ChipLogProgress(Zcl, " attributeValue: List of length %" PRIu16, count); |
| if (gSuccessResponseDelegate != nullptr) |
| gSuccessResponseDelegate(); |
| } |
| chip::Callback::Callback<ThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallback> |
| gThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallback{ |
| OnThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeResponse, nullptr |
| }; |
| |
| 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<OctetStringAttributeCallback> gOctetStringAttributeCallback{ OnAttributeResponse<ByteSpan>, nullptr }; |
| chip::Callback::Callback<CharStringAttributeCallback> gCharStringAttributeCallback{ OnAttributeResponse<ByteSpan>, nullptr }; |
| |
| } // namespace |
| |
| extern "C" { |
| |
| void chip_ime_SetSuccessResponseDelegate(SuccessResponseDelegate delegate) |
| { |
| gSuccessResponseDelegate = delegate; |
| } |
| |
| void chip_ime_SetFailureResponseDelegate(FailureResponseDelegate delegate) |
| { |
| gFailureResponseDelegate = delegate; |
| } |
| |
| // Cluster AccountLogin |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_AccountLogin_GetSetupPIN(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| const uint8_t * tempAccountIdentifier, |
| uint32_t tempAccountIdentifier_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::AccountLoginCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GetSetupPIN(nullptr, nullptr, chip::ByteSpan(tempAccountIdentifier, tempAccountIdentifier_Len)).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_AccountLogin_Login(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| const uint8_t * tempAccountIdentifier, |
| uint32_t tempAccountIdentifier_Len, const uint8_t * setupPIN, |
| uint32_t setupPIN_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::AccountLoginCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .Login(nullptr, nullptr, chip::ByteSpan(tempAccountIdentifier, tempAccountIdentifier_Len), |
| chip::ByteSpan(setupPIN, setupPIN_Len)) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_AccountLogin_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::AccountLoginCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster AccountLogin |
| // Cluster AdministratorCommissioning |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_AdministratorCommissioning_OpenBasicCommissioningWindow( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t commissioningTimeout) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::AdministratorCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.OpenBasicCommissioningWindow(nullptr, nullptr, commissioningTimeout).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_AdministratorCommissioning_OpenCommissioningWindow( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t commissioningTimeout, |
| const uint8_t * pAKEVerifier, uint32_t pAKEVerifier_Len, uint16_t discriminator, uint32_t iterations, const uint8_t * salt, |
| uint32_t salt_Len, uint16_t passcodeID) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::AdministratorCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .OpenCommissioningWindow(nullptr, nullptr, commissioningTimeout, chip::ByteSpan(pAKEVerifier, pAKEVerifier_Len), |
| discriminator, iterations, chip::ByteSpan(salt, salt_Len), passcodeID) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType |
| chip_ime_AppendCommand_AdministratorCommissioning_RevokeCommissioning(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::AdministratorCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.RevokeCommissioning(nullptr, nullptr).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_AdministratorCommissioning_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::AdministratorCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster AdministratorCommissioning |
| // Cluster ApplicationBasic |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_ApplicationBasic_ChangeStatus(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t status) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ApplicationBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ChangeStatus(nullptr, nullptr, status).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_VendorName(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ApplicationBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_VendorId(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ApplicationBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ApplicationName(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ApplicationBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeApplicationName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ProductId(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ApplicationBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeProductId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ApplicationId(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ApplicationBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeApplicationId(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_CatalogVendorId(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ApplicationBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCatalogVendorId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ApplicationStatus(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ApplicationBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeApplicationStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationBasic_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ApplicationBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster ApplicationBasic |
| // Cluster ApplicationLauncher |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_ApplicationLauncher_LaunchApp( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * data, uint32_t data_Len, |
| uint16_t catalogVendorId, const uint8_t * applicationId, uint32_t applicationId_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ApplicationLauncherCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .LaunchApp(nullptr, nullptr, chip::ByteSpan(data, data_Len), catalogVendorId, |
| chip::ByteSpan(applicationId, applicationId_Len)) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ApplicationLauncherList(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ApplicationLauncherCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeApplicationLauncherList(gApplicationLauncherApplicationLauncherListListAttributeCallback.Cancel(), |
| gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_CatalogVendorId(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ApplicationLauncherCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCatalogVendorId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ApplicationId(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ApplicationLauncherCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeApplicationId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ApplicationLauncher_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ApplicationLauncherCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster ApplicationLauncher |
| // Cluster AudioOutput |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_AudioOutput_RenameOutput(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t index, const uint8_t * name, uint32_t name_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::AudioOutputCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.RenameOutput(nullptr, nullptr, index, chip::ByteSpan(name, name_Len)).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_AudioOutput_SelectOutput(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t index) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::AudioOutputCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.SelectOutput(nullptr, nullptr, index).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_AudioOutputList(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::AudioOutputCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeAudioOutputList(gAudioOutputAudioOutputListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_CurrentAudioOutput(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::AudioOutputCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentAudioOutput(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_AudioOutput_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::AudioOutputCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster AudioOutput |
| // Cluster BarrierControl |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_BarrierControl_BarrierControlGoToPercent(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId, uint8_t percentOpen) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BarrierControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.BarrierControlGoToPercent(nullptr, nullptr, percentOpen).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_BarrierControl_BarrierControlStop(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BarrierControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.BarrierControlStop(nullptr, nullptr).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierMovingState(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BarrierControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBarrierMovingState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierSafetyStatus(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BarrierControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBarrierSafetyStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierCapabilities(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BarrierControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBarrierCapabilities(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_BarrierPosition(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BarrierControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBarrierPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BarrierControl_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BarrierControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster BarrierControl |
| // Cluster Basic |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_Basic_MfgSpecificPing(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MfgSpecificPing(nullptr, nullptr).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_InteractionModelVersion(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeInteractionModelVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_VendorName(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_VendorID(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeVendorID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductName(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeProductName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductID(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeProductID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_UserLabel(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeUserLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_Basic_UserLabel(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t * value, |
| size_t len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .WriteAttributeUserLabel(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), chip::ByteSpan(value, len)) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_Location(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeLocation(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_Basic_Location(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t * value, |
| size_t len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .WriteAttributeLocation(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), chip::ByteSpan(value, len)) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_HardwareVersion(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeHardwareVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_HardwareVersionString(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeHardwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SoftwareVersion(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSoftwareVersion(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SoftwareVersionString(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSoftwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ManufacturingDate(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeManufacturingDate(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_PartNumber(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePartNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductURL(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeProductURL(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ProductLabel(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeProductLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_SerialNumber(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSerialNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_LocalConfigDisabled(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeLocalConfigDisabled(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_Basic_LocalConfigDisabled(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| bool value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeLocalConfigDisabled(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_Reachable(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeReachable(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Basic_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster Basic |
| // Cluster BinaryInputBasic |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_OutOfService(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BinaryInputBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeOutOfService(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_BinaryInputBasic_OutOfService(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| bool value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BinaryInputBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeOutOfService(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_PresentValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BinaryInputBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePresentValue(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ConfigureAttribute_BinaryInputBasic_PresentValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| uint16_t minInterval, uint16_t maxInterval) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BinaryInputBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributePresentValue(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, |
| maxInterval) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_BinaryInputBasic_PresentValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| bool value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BinaryInputBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributePresentValue(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_StatusFlags(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BinaryInputBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeStatusFlags(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ConfigureAttribute_BinaryInputBasic_StatusFlags(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| uint16_t minInterval, uint16_t maxInterval) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BinaryInputBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeStatusFlags(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BinaryInputBasic_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BinaryInputBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster BinaryInputBasic |
| // Cluster Binding |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::BindingCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.Bind(nullptr, nullptr, nodeId, groupId, endpointId, clusterId).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::BindingCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.Unbind(nullptr, nullptr, nodeId, groupId, endpointId, clusterId).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Binding_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BindingCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster Binding |
| // Cluster BridgedDeviceBasic |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_VendorName(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeVendorName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_VendorID(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeVendorID(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ProductName(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeProductName(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_UserLabel(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeUserLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_BridgedDeviceBasic_UserLabel(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t * value, size_t len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .WriteAttributeUserLabel(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), chip::ByteSpan(value, len)) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersion(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeHardwareVersion(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_HardwareVersionString(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeHardwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersion(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSoftwareVersion(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_SoftwareVersionString(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSoftwareVersionString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ManufacturingDate(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeManufacturingDate(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_PartNumber(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePartNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ProductURL(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeProductURL(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ProductLabel(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeProductLabel(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_SerialNumber(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSerialNumber(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_Reachable(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeReachable(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_BridgedDeviceBasic_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::BridgedDeviceBasicCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster BridgedDeviceBasic |
| // Cluster ColorControl |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_ColorLoopSet(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t updateFlags, uint8_t action, |
| uint8_t direction, uint16_t time, uint16_t startHue, |
| uint8_t optionsMask, uint8_t optionsOverride) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ColorLoopSet(nullptr, nullptr, updateFlags, action, direction, time, startHue, optionsMask, optionsOverride) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_EnhancedMoveHue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t moveMode, uint16_t rate, |
| uint8_t optionsMask, uint8_t optionsOverride) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.EnhancedMoveHue(nullptr, nullptr, moveMode, rate, optionsMask, optionsOverride).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_EnhancedMoveToHue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t enhancedHue, uint8_t direction, |
| uint16_t transitionTime, uint8_t optionsMask, |
| uint8_t optionsOverride) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.EnhancedMoveToHue(nullptr, nullptr, enhancedHue, direction, transitionTime, optionsMask, optionsOverride) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_EnhancedMoveToHueAndSaturation( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t enhancedHue, uint8_t saturation, |
| uint16_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .EnhancedMoveToHueAndSaturation(nullptr, nullptr, enhancedHue, saturation, transitionTime, optionsMask, optionsOverride) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_EnhancedStepHue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t stepMode, uint16_t stepSize, |
| uint16_t transitionTime, uint8_t optionsMask, |
| uint8_t optionsOverride) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.EnhancedStepHue(nullptr, nullptr, stepMode, stepSize, transitionTime, optionsMask, optionsOverride).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MoveColor(nullptr, nullptr, rateX, rateY, optionsMask, optionsOverride).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .MoveColorTemperature(nullptr, nullptr, moveMode, rate, colorTemperatureMinimum, colorTemperatureMaximum, optionsMask, |
| optionsOverride) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MoveHue(nullptr, nullptr, moveMode, rate, optionsMask, optionsOverride).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MoveSaturation(nullptr, nullptr, moveMode, rate, optionsMask, optionsOverride).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MoveToColor(nullptr, nullptr, colorX, colorY, transitionTime, optionsMask, optionsOverride).AsInteger(); |
| } |
| chip::ChipError::StorageType |
| 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MoveToColorTemperature(nullptr, nullptr, colorTemperature, transitionTime, optionsMask, optionsOverride) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MoveToHue(nullptr, nullptr, hue, direction, transitionTime, optionsMask, optionsOverride).AsInteger(); |
| } |
| chip::ChipError::StorageType |
| 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MoveToHueAndSaturation(nullptr, nullptr, hue, saturation, transitionTime, optionsMask, optionsOverride) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MoveToSaturation(nullptr, nullptr, saturation, transitionTime, optionsMask, optionsOverride).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.StepColor(nullptr, nullptr, stepX, stepY, transitionTime, optionsMask, optionsOverride).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .StepColorTemperature(nullptr, nullptr, stepMode, stepSize, transitionTime, colorTemperatureMinimum, |
| colorTemperatureMaximum, optionsMask, optionsOverride) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_StepHue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t stepMode, uint8_t stepSize, |
| uint16_t transitionTime, uint8_t optionsMask, |
| uint8_t optionsOverride) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.StepHue(nullptr, nullptr, stepMode, stepSize, transitionTime, optionsMask, optionsOverride).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_ColorControl_StepSaturation(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t stepMode, uint8_t stepSize, |
| uint16_t transitionTime, uint8_t optionsMask, |
| uint8_t optionsOverride) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.StepSaturation(nullptr, nullptr, stepMode, stepSize, transitionTime, optionsMask, optionsOverride).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.StopMoveStep(nullptr, nullptr, optionsMask, optionsOverride).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentHue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentHue(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeCurrentHue(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval, |
| change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentSaturation(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentSaturation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeCurrentSaturation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, |
| maxInterval, change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_RemainingTime(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRemainingTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentX(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeCurrentX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval, |
| change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CurrentY(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeCurrentY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval, |
| change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_DriftCompensation(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeDriftCompensation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CompensationText(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCompensationText(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTemperature(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorTemperature(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeColorTemperature(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, |
| maxInterval, change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorMode(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorControlOptions(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorControlOptions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorControlOptions(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeColorControlOptions(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_NumberOfPrimaries(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeNumberOfPrimaries(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1X(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary1X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1Y(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary1Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary1Intensity(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary1Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2X(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary2X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2Y(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary2Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary2Intensity(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary2Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3X(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary3X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3Y(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary3Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary3Intensity(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary3Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4X(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary4X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4Y(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary4Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary4Intensity(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary4Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5X(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary5X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5Y(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary5Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary5Intensity(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary5Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6X(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary6X(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6Y(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary6Y(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_Primary6Intensity(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePrimary6Intensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_WhitePointX(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeWhitePointX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_WhitePointX(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeWhitePointX(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_WhitePointY(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeWhitePointY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_WhitePointY(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeWhitePointY(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRX(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorPointRX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointRX(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeColorPointRX(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRY(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorPointRY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointRY(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeColorPointRY(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointRIntensity(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorPointRIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointRIntensity(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId, uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeColorPointRIntensity(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGX(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorPointGX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointGX(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeColorPointGX(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGY(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorPointGY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointGY(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeColorPointGY(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointGIntensity(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorPointGIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointGIntensity(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId, uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeColorPointGIntensity(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBX(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorPointBX(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointBX(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeColorPointBX(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBY(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorPointBY(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointBY(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeColorPointBY(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorPointBIntensity(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorPointBIntensity(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_ColorPointBIntensity(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId, uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeColorPointBIntensity(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_EnhancedCurrentHue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeEnhancedCurrentHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_EnhancedColorMode(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeEnhancedColorMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopActive(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorLoopActive(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopDirection(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorLoopDirection(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopTime(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorLoopTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopStartEnhancedHue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorLoopStartEnhancedHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorLoopStoredEnhancedHue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorLoopStoredEnhancedHue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorCapabilities(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorCapabilities(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMin(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorTempPhysicalMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ColorTempPhysicalMax(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeColorTempPhysicalMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_CoupleColorTempToLevelMinMireds(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCoupleColorTempToLevelMinMireds(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_StartUpColorTemperatureMireds(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeStartUpColorTemperatureMireds(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ColorControl_StartUpColorTemperatureMireds(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId, uint16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .WriteAttributeStartUpColorTemperatureMireds(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ColorControl_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ColorControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster ColorControl |
| // Cluster ContentLauncher |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_ContentLauncher_LaunchContent(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| bool autoPlay, const uint8_t * data, |
| uint32_t data_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ContentLauncherCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.LaunchContent(nullptr, nullptr, autoPlay, chip::ByteSpan(data, data_Len)).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_ContentLauncher_LaunchURL(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| const uint8_t * contentURL, uint32_t contentURL_Len, |
| const uint8_t * displayString, |
| uint32_t displayString_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ContentLauncherCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .LaunchURL(nullptr, nullptr, chip::ByteSpan(contentURL, contentURL_Len), chip::ByteSpan(displayString, displayString_Len)) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_AcceptsHeaderList(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ContentLauncherCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeAcceptsHeaderList(gContentLauncherAcceptsHeaderListListAttributeCallback.Cancel(), |
| gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_SupportedStreamingTypes(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ContentLauncherCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeSupportedStreamingTypes(gContentLauncherSupportedStreamingTypesListAttributeCallback.Cancel(), |
| gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ContentLauncher_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ContentLauncherCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster ContentLauncher |
| // Cluster Descriptor |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_DeviceList(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DescriptorCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeDeviceList(gDescriptorDeviceListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ServerList(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DescriptorCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeServerList(gDescriptorServerListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ClientList(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DescriptorCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClientList(gDescriptorClientListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_PartsList(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DescriptorCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePartsList(gDescriptorPartsListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Descriptor_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DescriptorCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster Descriptor |
| // Cluster DiagnosticLogs |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_DiagnosticLogs_RetrieveLogsRequest( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t intent, uint8_t requestedProtocol, |
| const uint8_t * transferFileDesignator, uint32_t transferFileDesignator_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DiagnosticLogsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .RetrieveLogsRequest(nullptr, nullptr, intent, requestedProtocol, |
| chip::ByteSpan(transferFileDesignator, transferFileDesignator_Len)) |
| .AsInteger(); |
| } |
| |
| // End of Cluster DiagnosticLogs |
| // Cluster DoorLock |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearAllPins(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ClearAllPins(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearAllRfids(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ClearAllRfids(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearHolidaySchedule(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t scheduleId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ClearHolidaySchedule(nullptr, nullptr, scheduleId).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearPin(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t userId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ClearPin(nullptr, nullptr, userId).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_ClearRfid(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t userId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ClearRfid(nullptr, nullptr, userId).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ClearWeekdaySchedule(nullptr, nullptr, scheduleId, userId).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ClearYeardaySchedule(nullptr, nullptr, scheduleId, userId).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetHolidaySchedule(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t scheduleId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GetHolidaySchedule(nullptr, nullptr, scheduleId).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetLogRecord(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t logIndex) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GetLogRecord(nullptr, nullptr, logIndex).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetPin(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t userId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GetPin(nullptr, nullptr, userId).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetRfid(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t userId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GetRfid(nullptr, nullptr, userId).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_DoorLock_GetUserType(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t userId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GetUserType(nullptr, nullptr, userId).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GetWeekdaySchedule(nullptr, nullptr, scheduleId, userId).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GetYeardaySchedule(nullptr, nullptr, scheduleId, userId).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.LockDoor(nullptr, nullptr, chip::ByteSpan(pin, pin_Len)).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.SetHolidaySchedule(nullptr, nullptr, scheduleId, localStartTime, localEndTime, operatingModeDuringHoliday) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.SetPin(nullptr, nullptr, userId, userStatus, userType, chip::ByteSpan(pin, pin_Len)).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.SetRfid(nullptr, nullptr, userId, userStatus, userType, chip::ByteSpan(id, id_Len)).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.SetUserType(nullptr, nullptr, userId, userType).AsInteger(); |
| } |
| chip::ChipError::StorageType |
| 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.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.SetWeekdaySchedule(nullptr, nullptr, scheduleId, userId, daysMask, startHour, startMinute, endHour, endMinute) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.SetYeardaySchedule(nullptr, nullptr, scheduleId, userId, localStartTime, localEndTime).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.UnlockDoor(nullptr, nullptr, chip::ByteSpan(pin, pin_Len)).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.UnlockWithTimeout(nullptr, nullptr, timeoutInSeconds, chip::ByteSpan(pin, pin_Len)).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_LockState(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeLockState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeLockState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_LockType(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeLockType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_ActuatorEnabled(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeActuatorEnabled(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_DoorLock_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::DoorLockCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster DoorLock |
| // Cluster ElectricalMeasurement |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_MeasurementType(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ElectricalMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMeasurementType(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_TotalActivePower(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ElectricalMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTotalActivePower(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltage(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ElectricalMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRmsVoltage(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMin(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ElectricalMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRmsVoltageMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsVoltageMax(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ElectricalMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRmsVoltageMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrent(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ElectricalMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRmsCurrent(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMin(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ElectricalMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRmsCurrentMin(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_RmsCurrentMax(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ElectricalMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRmsCurrentMax(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ActivePower(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ElectricalMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeActivePower(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMin(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ElectricalMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeActivePowerMin(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ActivePowerMax(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ElectricalMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeActivePowerMax(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ElectricalMeasurement_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ElectricalMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster ElectricalMeasurement |
| // Cluster EthernetNetworkDiagnostics |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_EthernetNetworkDiagnostics_ResetCounts(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::EthernetNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ResetCounts(nullptr, nullptr).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketRxCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::EthernetNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePacketRxCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_PacketTxCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::EthernetNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePacketTxCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_TxErrCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::EthernetNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxErrCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_CollisionCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::EthernetNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCollisionCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_OverrunCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::EthernetNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_EthernetNetworkDiagnostics_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::EthernetNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster EthernetNetworkDiagnostics |
| // Cluster FixedLabel |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_FixedLabel_LabelList(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::FixedLabelCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeLabelList(gFixedLabelLabelListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_FixedLabel_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::FixedLabelCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster FixedLabel |
| // Cluster FlowMeasurement |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MeasuredValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::FlowMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MinMeasuredValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::FlowMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_MaxMeasuredValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::FlowMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_FlowMeasurement_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::FlowMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster FlowMeasurement |
| // Cluster GeneralCommissioning |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::GeneralCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ArmFailSafe(nullptr, nullptr, expiryLengthSeconds, breadcrumb, timeoutMs).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_GeneralCommissioning_CommissioningComplete(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GeneralCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.CommissioningComplete(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType |
| chip_ime_AppendCommand_GeneralCommissioning_SetRegulatoryConfig(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId, uint8_t location, const uint8_t * countryCode, |
| uint32_t countryCode_Len, uint64_t breadcrumb, uint32_t timeoutMs) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GeneralCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .SetRegulatoryConfig(nullptr, nullptr, location, chip::ByteSpan(countryCode, countryCode_Len), breadcrumb, timeoutMs) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_Breadcrumb(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GeneralCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBreadcrumb(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_GeneralCommissioning_Breadcrumb(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint64_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GeneralCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeBreadcrumb(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_BasicCommissioningInfoList( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GeneralCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeBasicCommissioningInfoList(gGeneralCommissioningBasicCommissioningInfoListListAttributeCallback.Cancel(), |
| gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralCommissioning_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GeneralCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster GeneralCommissioning |
| // Cluster GeneralDiagnostics |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_NetworkInterfaces(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GeneralDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeNetworkInterfaces(gGeneralDiagnosticsNetworkInterfacesListAttributeCallback.Cancel(), |
| gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_RebootCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GeneralDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRebootCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_GeneralDiagnostics_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GeneralDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster GeneralDiagnostics |
| // Cluster GroupKeyManagement |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_Groups(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GroupKeyManagementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeGroups(gGroupKeyManagementGroupsListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_GroupKeys(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GroupKeyManagementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeGroupKeys(gGroupKeyManagementGroupKeysListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_GroupKeyManagement_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GroupKeyManagementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster GroupKeyManagement |
| // Cluster Groups |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::GroupsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.AddGroup(nullptr, nullptr, groupId, chip::ByteSpan(groupName, groupName_Len)).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::GroupsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.AddGroupIfIdentifying(nullptr, nullptr, groupId, chip::ByteSpan(groupName, groupName_Len)).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::GroupsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GetGroupMembership(nullptr, nullptr, groupCount, groupList).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_Groups_RemoveAllGroups(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GroupsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.RemoveAllGroups(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_Groups_RemoveGroup(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t groupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GroupsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.RemoveGroup(nullptr, nullptr, groupId).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_Groups_ViewGroup(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t groupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GroupsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ViewGroup(nullptr, nullptr, groupId).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Groups_NameSupport(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GroupsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeNameSupport(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Groups_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::GroupsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster Groups |
| // Cluster Identify |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_Identify_Identify(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t identifyTime) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::IdentifyCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.Identify(nullptr, nullptr, identifyTime).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_Identify_IdentifyQuery(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::IdentifyCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.IdentifyQuery(nullptr, nullptr).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_IdentifyTime(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::IdentifyCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeIdentifyTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_Identify_IdentifyTime(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::IdentifyCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeIdentifyTime(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Identify_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::IdentifyCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster Identify |
| // Cluster KeypadInput |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_KeypadInput_SendKey(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t keyCode) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::KeypadInputCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.SendKey(nullptr, nullptr, keyCode).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_KeypadInput_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::KeypadInputCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster KeypadInput |
| // Cluster LevelControl |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::LevelControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.Move(nullptr, nullptr, moveMode, rate, optionMask, optionOverride).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::LevelControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MoveToLevel(nullptr, nullptr, level, transitionTime, optionMask, optionOverride).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::LevelControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MoveToLevelWithOnOff(nullptr, nullptr, level, transitionTime).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::LevelControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MoveWithOnOff(nullptr, nullptr, moveMode, rate).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::LevelControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.Step(nullptr, nullptr, stepMode, stepSize, transitionTime, optionMask, optionOverride).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::LevelControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.StepWithOnOff(nullptr, nullptr, stepMode, stepSize, transitionTime).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::LevelControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.Stop(nullptr, nullptr, optionMask, optionOverride).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_LevelControl_StopWithOnOff(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::LevelControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.StopWithOnOff(nullptr, nullptr).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_CurrentLevel(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::LevelControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::LevelControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeCurrentLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, |
| maxInterval, change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_LevelControl_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::LevelControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster LevelControl |
| // Cluster LowPower |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_LowPower_Sleep(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::LowPowerCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.Sleep(nullptr, nullptr).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_LowPower_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::LowPowerCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster LowPower |
| // Cluster MediaInput |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_HideInputStatus(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaInputCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.HideInputStatus(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_RenameInput(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t index, const uint8_t * name, uint32_t name_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaInputCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.RenameInput(nullptr, nullptr, index, chip::ByteSpan(name, name_Len)).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_SelectInput(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t index) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaInputCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.SelectInput(nullptr, nullptr, index).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_MediaInput_ShowInputStatus(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaInputCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ShowInputStatus(nullptr, nullptr).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_MediaInputList(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaInputCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeMediaInputList(gMediaInputMediaInputListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_CurrentMediaInput(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaInputCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentMediaInput(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_MediaInput_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaInputCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster MediaInput |
| // Cluster MediaPlayback |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaFastForward(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MediaFastForward(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaNext(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MediaNext(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaPause(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MediaPause(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaPlay(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MediaPlay(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaPrevious(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MediaPrevious(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaRewind(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MediaRewind(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaSeek(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint64_t position) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MediaSeek(nullptr, nullptr, position).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaSkipBackward(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint64_t deltaPositionMilliseconds) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MediaSkipBackward(nullptr, nullptr, deltaPositionMilliseconds).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaSkipForward(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint64_t deltaPositionMilliseconds) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MediaSkipForward(nullptr, nullptr, deltaPositionMilliseconds).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaStartOver(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MediaStartOver(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_MediaPlayback_MediaStop(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.MediaStop(nullptr, nullptr).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PlaybackState(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePlaybackState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_StartTime(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeStartTime(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_Duration(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeDuration(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PositionUpdatedAt(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePositionUpdatedAt(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_Position(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePosition(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_PlaybackSpeed(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePlaybackSpeed(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_SeekRangeEnd(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSeekRangeEnd(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_SeekRangeStart(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSeekRangeStart(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_MediaPlayback_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::MediaPlaybackCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster MediaPlayback |
| // Cluster NetworkCommissioning |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::NetworkCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .AddThreadNetwork(nullptr, nullptr, chip::ByteSpan(operationalDataset, operationalDataset_Len), breadcrumb, timeoutMs) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::NetworkCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .AddWiFiNetwork(nullptr, nullptr, chip::ByteSpan(ssid, ssid_Len), chip::ByteSpan(credentials, credentials_Len), breadcrumb, |
| timeoutMs) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::NetworkCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.DisableNetwork(nullptr, nullptr, chip::ByteSpan(networkID, networkID_Len), breadcrumb, timeoutMs).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::NetworkCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.EnableNetwork(nullptr, nullptr, chip::ByteSpan(networkID, networkID_Len), breadcrumb, timeoutMs).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_NetworkCommissioning_GetLastNetworkCommissioningResult( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint32_t timeoutMs) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::NetworkCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GetLastNetworkCommissioningResult(nullptr, nullptr, timeoutMs).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::NetworkCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.RemoveNetwork(nullptr, nullptr, chip::ByteSpan(networkID, networkID_Len), breadcrumb, timeoutMs).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::NetworkCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ScanNetworks(nullptr, nullptr, chip::ByteSpan(ssid, ssid_Len), breadcrumb, timeoutMs).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::NetworkCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .UpdateThreadNetwork(nullptr, nullptr, chip::ByteSpan(operationalDataset, operationalDataset_Len), breadcrumb, timeoutMs) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::NetworkCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .UpdateWiFiNetwork(nullptr, nullptr, chip::ByteSpan(ssid, ssid_Len), chip::ByteSpan(credentials, credentials_Len), |
| breadcrumb, timeoutMs) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_NetworkCommissioning_FeatureMap(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::NetworkCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_NetworkCommissioning_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::NetworkCommissioningCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster NetworkCommissioning |
| // Cluster OtaSoftwareUpdateProvider |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_OtaSoftwareUpdateProvider_ApplyUpdateRequest( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * updateToken, |
| uint32_t updateToken_Len, uint32_t newVersion) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OtaSoftwareUpdateProviderCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ApplyUpdateRequest(nullptr, nullptr, chip::ByteSpan(updateToken, updateToken_Len), newVersion).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_OtaSoftwareUpdateProvider_NotifyUpdateApplied( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * updateToken, |
| uint32_t updateToken_Len, uint32_t currentVersion) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OtaSoftwareUpdateProviderCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.NotifyUpdateApplied(nullptr, nullptr, chip::ByteSpan(updateToken, updateToken_Len), currentVersion).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_OtaSoftwareUpdateProvider_QueryImage( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint16_t vendorId, uint16_t productId, |
| uint16_t imageType, uint16_t hardwareVersion, uint32_t currentVersion, uint8_t protocolsSupported, const uint8_t * location, |
| uint32_t location_Len, bool requestorCanConsent, const uint8_t * metadataForProvider, uint32_t metadataForProvider_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OtaSoftwareUpdateProviderCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .QueryImage(nullptr, nullptr, vendorId, productId, imageType, hardwareVersion, currentVersion, protocolsSupported, |
| chip::ByteSpan(location, location_Len), requestorCanConsent, |
| chip::ByteSpan(metadataForProvider, metadataForProvider_Len)) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateProvider_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OtaSoftwareUpdateProviderCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster OtaSoftwareUpdateProvider |
| // Cluster OtaSoftwareUpdateRequestor |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_OtaSoftwareUpdateRequestor_AnnounceOtaProvider( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * serverLocation, |
| uint32_t serverLocation_Len, uint16_t vendorId, uint8_t announcementReason, const uint8_t * metadataForNode, |
| uint32_t metadataForNode_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .AnnounceOtaProvider(nullptr, nullptr, chip::ByteSpan(serverLocation, serverLocation_Len), vendorId, announcementReason, |
| chip::ByteSpan(metadataForNode, metadataForNode_Len)) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeDefaultOtaProvider(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_OtaSoftwareUpdateRequestor_DefaultOtaProvider( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t * value, size_t len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .WriteAttributeDefaultOtaProvider(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| chip::ByteSpan(value, len)) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_UpdatePossible(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeUpdatePossible(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OtaSoftwareUpdateRequestor_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster OtaSoftwareUpdateRequestor |
| // Cluster OccupancySensing |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_Occupancy(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OccupancySensingCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeOccupancy(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ConfigureAttribute_OccupancySensing_Occupancy(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| uint16_t minInterval, uint16_t maxInterval) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OccupancySensingCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeOccupancy(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_OccupancySensorType(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OccupancySensingCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeOccupancySensorType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_OccupancySensorTypeBitmap(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OccupancySensingCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeOccupancySensorTypeBitmap(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OccupancySensing_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OccupancySensingCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster OccupancySensing |
| // Cluster OnOff |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_Off(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.Off(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_OffWithEffect(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t effectId, uint8_t effectVariant) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.OffWithEffect(nullptr, nullptr, effectId, effectVariant).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_On(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.On(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_OnWithRecallGlobalScene(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.OnWithRecallGlobalScene(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_OnWithTimedOff(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t onOffControl, uint16_t onTime, |
| uint16_t offWaitTime) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.OnWithTimedOff(nullptr, nullptr, onOffControl, onTime, offWaitTime).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_OnOff_Toggle(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.Toggle(nullptr, nullptr).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_OnOff(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeOnOff(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeOnOff(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_GlobalSceneControl(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeGlobalSceneControl(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_OnTime(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeOnTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_OnOff_OnTime(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId, uint16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeOnTime(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_OffWaitTime(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeOffWaitTime(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_OnOff_OffWaitTime(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeOffWaitTime(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_StartUpOnOff(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeStartUpOnOff(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_OnOff_StartUpOnOff(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeStartUpOnOff(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_FeatureMap(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OnOff_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster OnOff |
| // Cluster OnOffSwitchConfiguration |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchType(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffSwitchConfigurationCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSwitchType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_SwitchActions(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffSwitchConfigurationCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSwitchActions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_OnOffSwitchConfiguration_SwitchActions(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId, uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffSwitchConfigurationCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeSwitchActions(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OnOffSwitchConfiguration_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OnOffSwitchConfigurationCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster OnOffSwitchConfiguration |
| // Cluster OperationalCredentials |
| |
| chip::ChipError::StorageType |
| chip_ime_AppendCommand_OperationalCredentials_AddNOC(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId, const uint8_t * nOCValue, uint32_t nOCValue_Len, |
| const uint8_t * iCACValue, uint32_t iCACValue_Len, const uint8_t * iPKValue, |
| uint32_t iPKValue_Len, chip::NodeId caseAdminNode, uint16_t adminVendorId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OperationalCredentialsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .AddNOC(nullptr, nullptr, chip::ByteSpan(nOCValue, nOCValue_Len), chip::ByteSpan(iCACValue, iCACValue_Len), |
| chip::ByteSpan(iPKValue, iPKValue_Len), caseAdminNode, adminVendorId) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_AddTrustedRootCertificate( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * rootCertificate, |
| uint32_t rootCertificate_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OperationalCredentialsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.AddTrustedRootCertificate(nullptr, nullptr, chip::ByteSpan(rootCertificate, rootCertificate_Len)).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_AttestationRequest(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId, |
| const uint8_t * attestationNonce, |
| uint32_t attestationNonce_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OperationalCredentialsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.AttestationRequest(nullptr, nullptr, chip::ByteSpan(attestationNonce, attestationNonce_Len)).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_CertificateChainRequest( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t certificateType) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OperationalCredentialsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.CertificateChainRequest(nullptr, nullptr, certificateType).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_OpCSRRequest(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId, const uint8_t * cSRNonce, |
| uint32_t cSRNonce_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OperationalCredentialsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.OpCSRRequest(nullptr, nullptr, chip::ByteSpan(cSRNonce, cSRNonce_Len)).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_RemoveFabric(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId, uint8_t fabricIndex) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OperationalCredentialsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.RemoveFabric(nullptr, nullptr, fabricIndex).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_OperationalCredentials_RemoveTrustedRootCertificate( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, const uint8_t * trustedRootIdentifier, |
| uint32_t trustedRootIdentifier_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OperationalCredentialsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.RemoveTrustedRootCertificate(nullptr, nullptr, chip::ByteSpan(trustedRootIdentifier, trustedRootIdentifier_Len)) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::OperationalCredentialsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.UpdateFabricLabel(nullptr, nullptr, chip::ByteSpan(label, label_Len)).AsInteger(); |
| } |
| chip::ChipError::StorageType |
| chip_ime_AppendCommand_OperationalCredentials_UpdateNOC(chip::Controller::Device * device, chip::EndpointId ZCLendpointId, |
| chip::GroupId, const uint8_t * nOCValue, uint32_t nOCValue_Len, |
| const uint8_t * iCACValue, uint32_t iCACValue_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OperationalCredentialsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.UpdateNOC(nullptr, nullptr, chip::ByteSpan(nOCValue, nOCValue_Len), chip::ByteSpan(iCACValue, iCACValue_Len)) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_FabricsList(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OperationalCredentialsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeFabricsList(gOperationalCredentialsFabricsListListAttributeCallback.Cancel(), |
| gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_SupportedFabrics(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OperationalCredentialsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSupportedFabrics(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_CommissionedFabrics(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OperationalCredentialsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCommissionedFabrics(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_OperationalCredentials_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::OperationalCredentialsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster OperationalCredentials |
| // Cluster PowerSource |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Status(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PowerSourceCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Order(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PowerSourceCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeOrder(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_Description(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PowerSourceCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeDescription(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryVoltage(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PowerSourceCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBatteryVoltage(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryPercentRemaining(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PowerSourceCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBatteryPercentRemaining(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryTimeRemaining(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PowerSourceCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBatteryTimeRemaining(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryChargeLevel(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PowerSourceCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBatteryChargeLevel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_ActiveBatteryFaults(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PowerSourceCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeActiveBatteryFaults(gPowerSourceActiveBatteryFaultsListAttributeCallback.Cancel(), |
| gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_BatteryChargeState(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PowerSourceCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBatteryChargeState(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_FeatureMap(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PowerSourceCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PowerSource_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PowerSourceCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster PowerSource |
| // Cluster PressureMeasurement |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MeasuredValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PressureMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ConfigureAttribute_PressureMeasurement_MeasuredValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| uint16_t minInterval, |
| uint16_t maxInterval, int16_t change) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PressureMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, |
| maxInterval, change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MinMeasuredValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PressureMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_MaxMeasuredValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PressureMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PressureMeasurement_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PressureMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster PressureMeasurement |
| // Cluster PumpConfigurationAndControl |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxPressure(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PumpConfigurationAndControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMaxPressure(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxSpeed(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PumpConfigurationAndControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMaxSpeed(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_MaxFlow(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PumpConfigurationAndControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMaxFlow(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveOperationMode( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PumpConfigurationAndControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeEffectiveOperationMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_EffectiveControlMode( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PumpConfigurationAndControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeEffectiveControlMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_Capacity(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PumpConfigurationAndControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCapacity(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ConfigureAttribute_PumpConfigurationAndControl_Capacity(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| uint16_t minInterval, |
| uint16_t maxInterval, int16_t change) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PumpConfigurationAndControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeCapacity(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, maxInterval, |
| change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_OperationMode(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PumpConfigurationAndControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeOperationMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_PumpConfigurationAndControl_OperationMode(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId, uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PumpConfigurationAndControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeOperationMode(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_PumpConfigurationAndControl_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::PumpConfigurationAndControlCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster PumpConfigurationAndControl |
| // Cluster RelativeHumidityMeasurement |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_MeasuredValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::RelativeHumidityMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ConfigureAttribute_RelativeHumidityMeasurement_MeasuredValue( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval, uint16_t change) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::RelativeHumidityMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, |
| maxInterval, change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_MinMeasuredValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::RelativeHumidityMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMinMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_MaxMeasuredValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::RelativeHumidityMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMaxMeasuredValue(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_RelativeHumidityMeasurement_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::RelativeHumidityMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster RelativeHumidityMeasurement |
| // Cluster Scenes |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ScenesCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .AddScene(nullptr, nullptr, groupId, sceneId, transitionTime, chip::ByteSpan(sceneName, sceneName_Len), clusterId, length, |
| value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_GetSceneMembership(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t groupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ScenesCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GetSceneMembership(nullptr, nullptr, groupId).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ScenesCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.RecallScene(nullptr, nullptr, groupId, sceneId, transitionTime).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_Scenes_RemoveAllScenes(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t groupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ScenesCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.RemoveAllScenes(nullptr, nullptr, groupId).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ScenesCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.RemoveScene(nullptr, nullptr, groupId, sceneId).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ScenesCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.StoreScene(nullptr, nullptr, groupId, sceneId).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ScenesCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ViewScene(nullptr, nullptr, groupId, sceneId).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_SceneCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ScenesCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSceneCount(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_CurrentScene(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ScenesCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentScene(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_CurrentGroup(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ScenesCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentGroup(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_SceneValid(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ScenesCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSceneValid(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_NameSupport(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ScenesCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeNameSupport(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Scenes_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ScenesCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster Scenes |
| // Cluster SoftwareDiagnostics |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_SoftwareDiagnostics_ResetWatermarks(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::SoftwareDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ResetWatermarks(nullptr, nullptr).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_CurrentHeapHighWatermark(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::SoftwareDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentHeapHighWatermark(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_SoftwareDiagnostics_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::SoftwareDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster SoftwareDiagnostics |
| // Cluster Switch |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_NumberOfPositions(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::SwitchCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeNumberOfPositions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_CurrentPosition(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::SwitchCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ConfigureAttribute_Switch_CurrentPosition(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| uint16_t minInterval, uint16_t maxInterval, |
| uint8_t change) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::SwitchCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeCurrentPosition(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, |
| maxInterval, change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Switch_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::SwitchCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster Switch |
| // Cluster TvChannel |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_TvChannel_ChangeChannel(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| const uint8_t * match, uint32_t match_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TvChannelCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ChangeChannel(nullptr, nullptr, chip::ByteSpan(match, match_Len)).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_TvChannel_ChangeChannelByNumber(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t majorNumber, uint16_t minorNumber) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TvChannelCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ChangeChannelByNumber(nullptr, nullptr, majorNumber, minorNumber).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_TvChannel_SkipChannel(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t count) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TvChannelCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.SkipChannel(nullptr, nullptr, count).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_TvChannelList(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TvChannelCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeTvChannelList(gTvChannelTvChannelListListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_TvChannelLineup(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TvChannelCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTvChannelLineup(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_CurrentTvChannel(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TvChannelCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentTvChannel(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TvChannel_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TvChannelCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster TvChannel |
| // Cluster TargetNavigator |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_TargetNavigator_NavigateTarget(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t target, const uint8_t * data, |
| uint32_t data_Len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TargetNavigatorCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.NavigateTarget(nullptr, nullptr, target, chip::ByteSpan(data, data_Len)).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TargetNavigator_TargetNavigatorList(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TargetNavigatorCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeTargetNavigatorList(gTargetNavigatorTargetNavigatorListListAttributeCallback.Cancel(), |
| gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TargetNavigator_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TargetNavigatorCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster TargetNavigator |
| // Cluster TemperatureMeasurement |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MeasuredValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TemperatureMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::TemperatureMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, |
| maxInterval, change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MinMeasuredValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TemperatureMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMinMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_MaxMeasuredValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TemperatureMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMaxMeasuredValue(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TemperatureMeasurement_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TemperatureMeasurementCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster TemperatureMeasurement |
| // Cluster TestCluster |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_Test(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.Test(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestAddArguments(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t arg1, uint8_t arg2) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.TestAddArguments(nullptr, nullptr, arg1, arg2).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestNotHandled(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.TestNotHandled(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestSpecific(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.TestSpecific(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_TestCluster_TestUnknownCommand(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.TestUnknownCommand(nullptr, nullptr).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Boolean(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBoolean(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Boolean(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, bool value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeBoolean(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap8(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBitmap8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Bitmap8(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeBitmap8(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap16(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBitmap16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Bitmap16(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeBitmap16(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap32(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBitmap32(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Bitmap32(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint32_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeBitmap32(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Bitmap64(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBitmap64(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Bitmap64(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint64_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeBitmap64(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int8u(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeInt8u(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int8u(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeInt8u(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int16u(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeInt16u(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int16u(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeInt16u(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int32u(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeInt32u(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int32u(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint32_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeInt32u(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int64u(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeInt64u(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int64u(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint64_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeInt64u(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int8s(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeInt8s(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int8s(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, int8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeInt8s(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int16s(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeInt16s(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int16s(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| int16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeInt16s(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int32s(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeInt32s(gInt32sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int32s(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| int32_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeInt32s(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Int64s(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeInt64s(gInt64sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Int64s(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| int64_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeInt64s(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Enum8(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeEnum8(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Enum8(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeEnum8(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Enum16(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeEnum16(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Enum16(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeEnum16(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_OctetString(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_OctetString(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t * value, size_t len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .WriteAttributeOctetString(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), chip::ByteSpan(value, len)) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListInt8u(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeListInt8u(gTestClusterListInt8uListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListOctetString(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeListOctetString(gTestClusterListOctetStringListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ListStructOctetString(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeListStructOctetString(gTestClusterListStructOctetStringListAttributeCallback.Cancel(), |
| gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_LongOctetString(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeLongOctetString(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_LongOctetString(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t * value, size_t len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .WriteAttributeLongOctetString(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| chip::ByteSpan(value, len)) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_CharString(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_CharString(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t * value, size_t len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .WriteAttributeCharString(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), chip::ByteSpan(value, len)) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_LongCharString(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeLongCharString(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_LongCharString(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t * value, size_t len) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .WriteAttributeLongCharString(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| chip::ByteSpan(value, len)) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_EpochUs(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeEpochUs(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_EpochUs(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint64_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeEpochUs(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_EpochS(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeEpochS(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_EpochS(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint32_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeEpochS(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_Unsupported(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeUnsupported(gBooleanAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_TestCluster_Unsupported(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| bool value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeUnsupported(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_TestCluster_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::TestClusterCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster TestCluster |
| // Cluster Thermostat |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_ClearWeeklySchedule(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ClearWeeklySchedule(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_Thermostat_GetRelayStatusLog(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GetRelayStatusLog(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GetWeeklySchedule(nullptr, nullptr, daysToReturn, modeToReturn).AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .SetWeeklySchedule(nullptr, nullptr, numberOfTransitionsForSequence, dayOfWeekForSequence, modeForSequence, payload) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.SetpointRaiseLower(nullptr, nullptr, mode, amount).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_LocalTemperature(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeLocalTemperature(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType 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.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeLocalTemperature(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, |
| maxInterval, change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMinHeatSetpointLimit(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeAbsMinHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMaxHeatSetpointLimit(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeAbsMaxHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMinCoolSetpointLimit(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeAbsMinCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_AbsMaxCoolSetpointLimit(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeAbsMaxCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_OccupiedCoolingSetpoint(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeOccupiedCoolingSetpoint(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_OccupiedCoolingSetpoint(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId, int16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeOccupiedCoolingSetpoint(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_OccupiedHeatingSetpoint(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeOccupiedHeatingSetpoint(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_OccupiedHeatingSetpoint(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId, int16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeOccupiedHeatingSetpoint(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinHeatSetpointLimit(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMinHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MinHeatSetpointLimit(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| int16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeMinHeatSetpointLimit(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MaxHeatSetpointLimit(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMaxHeatSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MaxHeatSetpointLimit(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| int16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeMaxHeatSetpointLimit(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MinCoolSetpointLimit(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMinCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MinCoolSetpointLimit(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| int16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeMinCoolSetpointLimit(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_MaxCoolSetpointLimit(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMaxCoolSetpointLimit(gInt16sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_MaxCoolSetpointLimit(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| int16_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeMaxCoolSetpointLimit(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_ControlSequenceOfOperation(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeControlSequenceOfOperation(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_ControlSequenceOfOperation(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId, uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .WriteAttributeControlSequenceOfOperation(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_SystemMode(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSystemMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_Thermostat_SystemMode(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeSystemMode(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_StartOfWeek(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeStartOfWeek(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_NumberOfWeeklyTransitions(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeNumberOfWeeklyTransitions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_NumberOfDailyTransitions(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeNumberOfDailyTransitions(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_FeatureMap(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeFeatureMap(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_Thermostat_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster Thermostat |
| // Cluster ThermostatUserInterfaceConfiguration |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTemperatureDisplayMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ThermostatUserInterfaceConfiguration_TemperatureDisplayMode( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeTemperatureDisplayMode(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeKeypadLockout(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ThermostatUserInterfaceConfiguration_KeypadLockout( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeKeypadLockout(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeScheduleProgrammingVisibility(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_ThermostatUserInterfaceConfiguration_ScheduleProgrammingVisibility( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId, uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .WriteAttributeScheduleProgrammingVisibility(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value) |
| .AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThermostatUserInterfaceConfiguration_ClusterRevision( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThermostatUserInterfaceConfigurationCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster ThermostatUserInterfaceConfiguration |
| // Cluster ThreadNetworkDiagnostics |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_ThreadNetworkDiagnostics_ResetCounts(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ResetCounts(nullptr, nullptr).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Channel(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeChannel(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RoutingRole(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRoutingRole(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NetworkName(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeNetworkName(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PanId(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePanId(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ExtendedPanId(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeExtendedPanId(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_MeshLocalPrefix(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMeshLocalPrefix(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OverrunCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeOverrunCount(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_NeighborTableList(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeNeighborTableList(gThreadNetworkDiagnosticsNeighborTableListListAttributeCallback.Cancel(), |
| gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouteTableList(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeRouteTableList(gThreadNetworkDiagnosticsRouteTableListListAttributeCallback.Cancel(), |
| gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionId(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePartitionId(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Weighting(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeWeighting(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DataVersion(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeDataVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_StableDataVersion(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeStableDataVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRouterId(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeLeaderRouterId(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_DetachedRoleCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeDetachedRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChildRoleCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeChildRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RouterRoleCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRouterRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_LeaderRoleCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeLeaderRoleCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_AttachAttemptCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeAttachAttemptCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PartitionIdChangeCount( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePartitionIdChangeCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_BetterPartitionAttachAttemptCount( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeBetterPartitionAttachAttemptCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ParentChangeCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeParentChangeCount(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxTotalCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxTotalCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxUnicastCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxUnicastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBroadcastCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxBroadcastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckRequestedCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxAckRequestedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxAckedCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxAckedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxNoAckRequestedCount( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxNoAckRequestedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxDataCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDataPollCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxDataPollCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxBeaconCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxBeaconRequestCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxBeaconRequestCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxOtherCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxRetryCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxRetryCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxDirectMaxRetryExpiryCount( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxDirectMaxRetryExpiryCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxIndirectMaxRetryExpiryCount( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxIndirectMaxRetryExpiryCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrCcaCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxErrCcaCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrAbortCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxErrAbortCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_TxErrBusyChannelCount( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTxErrBusyChannelCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxTotalCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxTotalCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxUnicastCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxUnicastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBroadcastCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxBroadcastCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxDataCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDataPollCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxDataPollCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxBeaconCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxBeaconRequestCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxBeaconRequestCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxOtherCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxAddressFilteredCount( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxAddressFilteredCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDestAddrFilteredCount( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxDestAddrFilteredCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxDuplicatedCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxDuplicatedCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrNoFrameCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxErrNoFrameCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrUnknownNeighborCount( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxErrUnknownNeighborCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrInvalidSrcAddrCount( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxErrInvalidSrcAddrCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrSecCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxErrSecCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrFcsCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxErrFcsCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_RxErrOtherCount(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRxErrOtherCount(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveTimestamp(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeActiveTimestamp(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_PendingTimestamp(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributePendingTimestamp(gInt64uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_Delay(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeDelay(gInt32uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_SecurityPolicy(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeSecurityPolicy(gThreadNetworkDiagnosticsSecurityPolicyListAttributeCallback.Cancel(), |
| gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ChannelMask(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeChannelMask(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_OperationalDatasetComponents( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeOperationalDatasetComponents( |
| gThreadNetworkDiagnosticsOperationalDatasetComponentsListAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ActiveNetworkFaultsList( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeActiveNetworkFaultsList(gThreadNetworkDiagnosticsActiveNetworkFaultsListListAttributeCallback.Cancel(), |
| gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_ThreadNetworkDiagnostics_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::ThreadNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster ThreadNetworkDiagnostics |
| // Cluster WakeOnLan |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WakeOnLan_WakeOnLanMacAddress(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WakeOnLanCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeWakeOnLanMacAddress(gCharStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WakeOnLan_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WakeOnLanCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster WakeOnLan |
| // Cluster WiFiNetworkDiagnostics |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_WiFiNetworkDiagnostics_ResetCounts(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WiFiNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ResetCounts(nullptr, nullptr).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Bssid(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WiFiNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeBssid(gOctetStringAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_SecurityType(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WiFiNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSecurityType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_WiFiVersion(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WiFiNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeWiFiVersion(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ChannelNumber(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WiFiNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeChannelNumber(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_Rssi(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WiFiNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeRssi(gInt8sAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WiFiNetworkDiagnostics_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WiFiNetworkDiagnosticsCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster WiFiNetworkDiagnostics |
| // Cluster WindowCovering |
| |
| chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_DownOrClose(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.DownOrClose(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToLiftPercentage(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t liftPercentageValue, |
| uint16_t liftPercent100thsValue) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GoToLiftPercentage(nullptr, nullptr, liftPercentageValue, liftPercent100thsValue).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToLiftValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t liftValue) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GoToLiftValue(nullptr, nullptr, liftValue).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToTiltPercentage(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t tiltPercentageValue, |
| uint16_t tiltPercent100thsValue) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GoToTiltPercentage(nullptr, nullptr, tiltPercentageValue, tiltPercent100thsValue).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_GoToTiltValue(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint16_t tiltValue) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.GoToTiltValue(nullptr, nullptr, tiltValue).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_StopMotion(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.StopMotion(nullptr, nullptr).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_AppendCommand_WindowCovering_UpOrOpen(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.UpOrOpen(nullptr, nullptr).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_Type(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionLift(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentPositionLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionTilt(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentPositionTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_ConfigStatus(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeConfigStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercentage(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentPositionLiftPercentage(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionLiftPercentage( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval, uint8_t change) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeCurrentPositionLiftPercentage(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| minInterval, maxInterval, change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercentage(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeCurrentPositionTiltPercentage(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionTiltPercentage( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval, uint8_t change) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeCurrentPositionTiltPercentage(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| minInterval, maxInterval, change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_OperationalStatus(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeOperationalStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ConfigureAttribute_WindowCovering_OperationalStatus(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| uint16_t minInterval, |
| uint16_t maxInterval) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeOperationalStatus(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, |
| maxInterval) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_TargetPositionLiftPercent100ths( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTargetPositionLiftPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ConfigureAttribute_WindowCovering_TargetPositionLiftPercent100ths( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval, uint16_t change) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeTargetPositionLiftPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| minInterval, maxInterval, change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_TargetPositionTiltPercent100ths( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeTargetPositionTiltPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ConfigureAttribute_WindowCovering_TargetPositionTiltPercent100ths( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval, uint16_t change) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeTargetPositionTiltPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| minInterval, maxInterval, change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_EndProductType(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeEndProductType(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionLiftPercent100ths( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeCurrentPositionLiftPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionLiftPercent100ths( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval, uint16_t change) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeCurrentPositionLiftPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| minInterval, maxInterval, change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_CurrentPositionTiltPercent100ths( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ReadAttributeCurrentPositionTiltPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ConfigureAttribute_WindowCovering_CurrentPositionTiltPercent100ths( |
| chip::Controller::Device * device, chip::EndpointId ZCLendpointId, uint16_t minInterval, uint16_t maxInterval, uint16_t change) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeCurrentPositionTiltPercent100ths(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), |
| minInterval, maxInterval, change) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitLift(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeInstalledOpenLimitLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitLift(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeInstalledClosedLimitLift(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledOpenLimitTilt(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeInstalledOpenLimitTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_InstalledClosedLimitTilt(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeInstalledClosedLimitTilt(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_Mode(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeMode(gInt8uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_WriteAttribute_WindowCovering_Mode(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, chip::GroupId, |
| uint8_t value) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.WriteAttributeMode(gDefaultSuccessCallback.Cancel(), gDefaultFailureCallback.Cancel(), value).AsInteger(); |
| } |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_SafetyStatus(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeSafetyStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ConfigureAttribute_WindowCovering_SafetyStatus(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| uint16_t minInterval, uint16_t maxInterval) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster |
| .ConfigureAttributeSafetyStatus(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel(), minInterval, |
| maxInterval) |
| .AsInteger(); |
| } |
| |
| chip::ChipError::StorageType chip_ime_ReadAttribute_WindowCovering_ClusterRevision(chip::Controller::Device * device, |
| chip::EndpointId ZCLendpointId, |
| chip::GroupId /* ZCLgroupId */) |
| { |
| VerifyOrReturnError(device != nullptr, CHIP_ERROR_INVALID_ARGUMENT.AsInteger()); |
| chip::Controller::WindowCoveringCluster cluster; |
| cluster.Associate(device, ZCLendpointId); |
| return cluster.ReadAttributeClusterRevision(gInt16uAttributeCallback.Cancel(), gDefaultFailureCallback.Cancel()).AsInteger(); |
| } |
| |
| // End of Cluster WindowCovering |
| } |